$DB->Query("DELETE FROM " . $_GET["param_0"] . " WHERE id=:id", array("id" => $_GET["delete"])); $DB->error = array(); $PHPZevelop->Location("select/" . $_GET["param_0"]); } ?> <h2>Searching <?php echo ucfirst(str_replace("_", " ", $_GET["param_0"])); ?> </h2> <br /> <?php // SQL Form $FormGen = new FormGen(); $FormGen->AddElement(array("name" => "Fields", "value" => $_POST["Fields"]), array("title" => "Fields")); $FormGen->AddElement(array("name" => "Where", "value" => $_POST["Where"], "placeholder" => "key=value"), array("title" => "Where", "postHTML" => "test")); $FormGen->AddElement(array("name" => "Order", "value" => $_POST["Order"]), array("title" => "Order")); $FormGen->AddElement(array("name" => "Limit", "value" => $_POST["Limit"]), array("title" => "Limit")); $FormGen->AddElement(array("type" => "submit", "value" => "Run query")); echo $FormGen->Build(array("ColNum" => 5)); ?> <?php // Checks foreach (array("Fields", "Where", "Order") as $Key) { if ($Key == "Fields" && strlen($_POST["Fields"]) == 0) { $Error = "Fields is empty, try *"; } else { foreach (array(";", "FROM", "DROP", "UNION", "DELETE", "REMOVE", "CREATE", "SHOW", "UPDATE", "FLUSH", "INSERT", "ALTER", "DESCRIBE", "LIMIT") as $BannedWord) { if (strstr(strtolower($_POST[$Key]), strtolower($BannedWord)) != false) {
?> <h2>File Manager <?php if (isset($_FILES["image"]) && strlen($_FILES["image"]["name"]) > 0) { echo "<input value='" . $FrontEndImageLocationRoot . str_replace("//", "/", "/" . $DirectoryString . "/") . $Image->file_new_name_body . "." . $Image->file_new_name_ext . "' style='padding: 5px; margin-left: 15px; margin-top: -5px;' />"; } ?> </h2> <div style="width: 50%;"> <?php $FormGen = new FormGen(); $PreHTML = "<table style='width: 100%;'><tr><td><img src='" . $PHPZevelop->Path->GetImage("components/no-image-icon.jpg", true) . "' style='width: 100px;' class='PreviewImage' /></td><td>"; $PostHTML = "</td></tr></table>"; $FormGen->AddElement(array("type" => "file", "name" => "image", "class" => "ImageSelector"), array("prehtml" => $PreHTML, "posthtml" => $PostHTML)); $FormGen->AddElement(array("name" => "renameto", "placeholder" => "eg image.png", "style" => "width: 230px;")); $FormGen->AddElement(array("type" => "submit", "value" => "Upload", "class" => "highlight")); echo $FormGen->Build(array("ColNum" => 3)); ?> </div> <?php if (isset($OnlyUploadForm) && $OnlyUploadForm == true) { die; } ?> <style type="text/css"> .item {height: 58px; box-sizing: border-box; width: 90%; display: inline-block;} .item a {color: #333333; width: 100%; height: 100%; display: inline-block; padding: 6px; box-sizing: border-box;}
foreach ($Temp1 as $Temp2) { $Options[$Temp2] = $Temp2; } } } } else { if (isset($ColumnCommands[$Item["column_name"]]["values"])) { foreach ($ColumnCommands[$Item["column_name"]]["values"] as $Val) { $Val = explode("|", $Val); $Options[$Val[0]] = $Val[1]; } } } } } $FormGen->AddElement(array("type" => $Type, "name" => $Item["column_name"], "value" => $Item["column_default"], "class" => $Class), array("title" => $Title, "data" => $Options)); } elseif ($Type == "checkbox") { $Options = array(); if (isset($ColumnCommands[$Item["column_name"]]["confignlgroup"])) { $ConfigNLGroups = $DB->SelectSingle("*", "config", array(array("_key", "=", $ColumnCommands[$Item["column_name"]]["confignlgroup"][0]))); foreach (explode("\r\n\r\n", $ConfigNLGroups["_value"]) as $Temp1) { $Temp1 = explode("\r\n", $Temp1); if ($Temp1[0] == $ColumnCommands[$Item["column_name"]]["confignlgroup"][1]) { unset($Temp1[0]); foreach ($Temp1 as $Temp2) { $Options[$Temp2] = $Temp2; } } } } $FormGen->AddElement(array("type" => $Type, "name" => $Item["column_name"], "class" => $Class), array("title" => $Title, "data" => $Options));
<?php /* Page setup ------------------------------*/ $PHPZevelop->OverrideObjectData("CFG", array("PageTitle" => "Edit")); ?> <h2>Generate a password for the user system</h2> <p>This will produce a hashed password and salt based on the origional visible password.<br /><br /></p> <?php $FormGen = new FormGen(); $FormGen->AddElement(array("type" => "text", "name" => "password", "placeholder" => "Password"), array("title" => "Password")); $FormGen->AddElement(array("type" => "submit", "value" => "Submit")); echo $FormGen->Build(array("ColNum" => 3, "data" => $_POST)); ?> <?php if (count($_POST) > 0) { $TempUser = new User(); $TempUser->SetPassword($_POST["password"]); echo "<p>Origional password: <b>" . $_POST["password"] . "</b></p>"; echo "<p>Hashed password: <b>" . $TempUser->Data["password"] . "</b></p>"; echo "<p>Generated salt: <b>" . $TempUser->Data["salt"] . "</b></p>"; unset($TempUser); }
} ?> <div style="width: 50%;"> <?php $FormGen = new FormGen(); $PreHTML = "<table style='width: 100%;'><tr><td><img src='" . $PHPZevelop->Path->GetImage("components/no-image-icon.jpg", true) . "' style='width: 100px;' class='PreviewImage' /></td><td>"; $PostHTML = "</td></tr></table>"; $FormGen->AddElement(array("type" => "file", "name" => "image", "class" => "ImageSelector"), array("prehtml" => $PreHTML, "posthtml" => $PostHTML)); $FormGen->AddElement(array("name" => "renameto", "placeholder" => "eg image.png", "style" => "width: 230px;")); $FormGen->AddElement(array("type" => "submit", "value" => "Upload", "class" => "highlight")); echo $FormGen->Build(array("ColNum" => 3)); $Dirs = glob(str_replace("//", "/", $RootDirectory . "/*"), GLOB_ONLYDIR); $Files = glob(str_replace("//", "/", $RootDirectory . "/*.*")); $FormGen = new FormGen(); $FormGen->AddElement(array("name" => "search", "placeholder" => "File name")); $FormGen->AddElement(array("type" => "submit", "value" => "Search", "class" => "highlight")); $FormGen->AddElement(array("type" => "html", "value" => "Total directories: " . count($Dirs) . ", files: " . count($Files) . (count($Files) > 100 ? " (limited to 100)" : ""))); echo $FormGen->Build(array("ColNum" => 3, "data" => $_POST)); ?> </div> <?php if (isset($OnlyUploadForm) && $OnlyUploadForm == true) { die; } ?> <style type="text/css"> .file-manager-item {height: 58px; box-sizing: border-box; width: 90%; display: inline-block;} .file-manager-item a {color: #333333; width: 100%; height: 100%; display: inline-block; padding: 6px; box-sizing: border-box;}
<style type="text/css"> #loginForm {width: 50%; margin: auto; background: #EEEEEE; border: 1px solid #009ACD; box-sizing: border-box; padding-bottom: 15px;} #loginForm h2 {margin: 0px; padding: 15px;} #loginForm h3 {margin: 0px; padding: 9px 13px;} #loginForm table.FormGen {width: 95%; margin: auto;} @media screen and (max-width: 900px){ #loginForm {width: 100%;} } </style> <br /> <div id="loginForm"> <h2>Login</h2> <?php if (isset($MSG)) { echo $MSG; } ?> <?php $FormGen = new FormGen(); $FormGen->AddElement(array("type" => "text", "name" => "username", "autofocus" => "autofocus", "required" => "required"), array("title" => "Username")); $FormGen->AddElement(array("type" => "password", "name" => "password", "required" => "required"), array("title" => "Password")); $FormGen->AddElement(array("type" => "submit", "value" => "Login")); unset($_POST["password"]); echo $FormGen->Build(array("data" => $_POST)); ?> </div>