<?php session_start(); include 'index.php'; require_once 'class.Database.php'; require_once 'class.blogData.php'; require_once 'class.CRUDE.php'; //This makes it so it doesn't try and create a new entry everytime you refresh $check = strlen($_POST["name"]); if ($check != 0) { $callClass = new Data_Class(); $callClass->createData($_POST["name"], $_POST["comments"]); $callOther = new Category_Class(); $art = FALSE; $left_brain = FALSE; $diversity = FALSE; if (isset($_POST["art"])) { $art = TRUE; } if (isset($_POST["left_brain"])) { $left_brain = TRUE; } if (isset($_POST["diversity"])) { $diversity = TRUE; } $callOther->createCategory($art, $left_brain, $diversity); } if (isset($_POST["delete"])) { $callClass->deleteData($_POST["delete"]); } if (isset($_POST["sort"]) && !empty($_POST["sort"])) {
<?php session_start(); include 'index.php'; require_once 'class.Database.php'; require_once 'class.Potion.php'; require_once 'class.CRUDE.php'; //This makes it so it doesn't try and create a new entry everytime you refresh $check = strlen($_POST["name"]); if ($check != 0) { $callClass = new Data_Class(); $callClass->createData($_POST["name"], $_POST["effects"], $_POST["ingredients"], $_POST["stock"]); } if (isset($_POST["delete"])) { $callClass->deleteData($_POST["delete"]); } if (isset($_POST["sort"])) { $criteria = $_POST["sort"]; $callForm = new Data_Class(); $callForm->displayData($criteria); } if (isset($_POST["search"])) { $search = $_POST["search"]; $callForm = new Data_Class(); $callForm->searchData($search); } if (isset($_POST["update"])) { $callForm = new Data_Class(); $changeID = $callForm->getID($_POST["update"]); } ?>
if ($check != 0) { $callClass = new Data_Class(); switch ($_POST["method"]) { case "Prime (5 days)": $due_date = date('Y-m-d', strtotime("+5 days")); break; case "Regular (10 days)": $due_date = date('Y-m-d', strtotime("+10 days")); break; case "Economy (15 days)": $due_date = date('Y-m-d', strtotime("+15 days")); break; default: $due_date = date('Y-m-d', strtotime("+300 days")); } $callClass->createData($_POST["name"], $_POST["address"], $_POST["item"], $due_date); $callOther = new Category_Class(); $date = date('Y-m-d'); $callOther->createDelivery($date); } if (isset($_POST["delete"])) { $callClass->deleteData($_POST["delete"]); } if (isset($_POST["update"]) && !empty($_POST["update"])) { $callForm = new Data_Class(); $changeID = $callForm->getID($_POST["update"]); } if (isset($_POST["status"]) && $_POST["status"] != "--Get Status--") { $callClass = new Data_Class(); switch ($_POST["status"]) { case "Still Assembling":