//echo date_format(date_add(DateTime::createFromFormat('d/m/Y', date("d/m/Y")),date_interval_create_from_date_string("5 years")),"d/m/Y"); echo date("d/m/Y"); $a = Item::search(["item_id" => 2]); print_r($a); $sql = "UPDATE item_copy SET item_copy_status=1;"; DB::getInstance()->directUpdate($sql); $data = array("id" => null, "purpose" => "sdasd", "comment" => "asdsdf", "member_id" => 16); $salt = '5&JDDlwz%Rwh!t2Yg-Igae@QxPzFTSId'; $enc_pass = md5($salt . 'admin'); echo "paswowkjhkfjw"; DB::getInstance()->directUpdate("UPDATE member SET member_password='******' WHERE member_nic='000000000';"); $t = new Transaction(); $t->create($data); $t->add(); print_r(DB::getInstance()->search("schedule", ["semester_no" => 2])); print_r(Schedule::search(["semester_no" => 2])); echo isset($_SESSION["basket"]); ?> <html> <script type="text/javascript"> function display(msg){ alert(msg); } </script> </html> <!DOCTYPE HTML> <html> <head>
<?php require_once 'core/init.php'; $member_role = $_SESSION['roles']; if (in_array("Laboratory Administrator", $member_role)) { } else { header('location:restricted_page.php'); } $sid = $_POST["sid"]; $schedule = Schedule::search(["schedule_id" => $sid]); $time = $_POST["time"]; $labtime = ""; $day1 = $_POST["day"]; $subject = $_POST["subject"]; $res = DB::getInstance()->directSelect("SELECT course_id FROM course WHERE course_name='{$subject}';"); if (count($res) > 0) { $cid = $res[0]["course_id"]; } switch ($time) { case "m1": $labtime = "8-9"; break; case "m2": $labtime = "9-10"; break; case "m3": $labtime = "10-11"; break; case "m4": $labtime = "11-12"; break;