2 require_once("../Class/database-connection.php");
3 $database = new DatabaseConnection("../");
6 if($_POST["Query"] == 1){
7 $JSON_Properties = $database->getPostDetails("JSONProperties");
8 foreach($JSON_Properties as $key=>$json_property){
9 echo $json_property[0] . " " . $json_property[1] . "-";
12 // else if($_POST["Query"] == 2 && isset($_POST["Page"])){
13 // $bans_list = $database->getPostDetailsAllUpperLower("Bans", "BanEntryID", ($_POST["Page"])*1000);
14 // foreach($bans_list as $key=>$ban){
15 // echo $ban["board"] . "<>" . $ban["name"] ."<>" . $ban["trip"] ."<>" . $ban["com"] ."<>" . $ban["action"] ."<>" . $ban["length"] ."<>" . $ban["reason"] ."<>" . $ban["now"] . "<>" . $ban["filename"] ."</>";
18 // else if($_POST["Query"] == 3 && isset($_POST["Page"]) && isset($_POST["Board"])){
19 // $bans_list_board = $database->getPostDetailsLimit("Bans", "BanEntryID", $_POST["Page"]*1000, "Board", $_POST["Board"]);
20 // foreach($bans_list_board as $key=>$ban){
21 // echo $ban["board"] . "<>" . $ban["name"] ."<>" . $ban["trip"] ."<>" . $ban["com"] ."<>" . $ban["action"] ."<>" . $ban["length"] ."<>" . $ban["reason"] ."<>" . $ban["now"] . "<>" . $ban["filename"] . "</>";
24 else if($_POST["Query"] == 4 && isset($_POST["Board"]) && isset($_POST["Comment"]) && isset($_POST["Rule"])){
25 $_POST["Board"] = trim($_POST["Board"]);
26 $item_count = $database->getCountOfAllSettings("Bans", $_POST["Board"], $_POST["Comment"], $_POST["Rule"]);
27 echo ($item_count[0][0]);
29 else if($_POST["Query"] == 5 && isset($_POST["Page"]) && isset($_POST["Board"]) && isset($_POST["Comment"]) && isset($_POST["Rule"])) {
30 $bans_list_board = $database->getPostDetailsAllSettingsLimit("Bans", "BanEntryID", $_POST["Page"]*1000, $_POST["Board"], $_POST["Comment"], $_POST["Rule"]);
31 foreach($bans_list_board as $key=>$ban){
32 echo $ban["board"] . "<>" . $ban["name"] ."<>" . $ban["trip"] ."<>" . $ban["com"] ."<>" . $ban["action"] ."<>" . $ban["length"] ."<>" . $ban["reason"] ."<>" . $ban["now"] . "<>" . $ban["filename"] . "</>";
37 //SELECT * FROM `Bans` WHERE `board` LIKE '%' AND `com` LIKE '%/qa/%' AND `reason` LIKE '%' ORDER BY `BanEntryID` ASC LIMIT 0, 1000