include "header1.php"; ?> <link rel="stylesheet" type="text/css" href="css/admin_table.css" /> <script src='scripts/admin_table.js'></script> <?php include "header2.php"; ?> <?php include "admin_table_tabs.php"; ?> <?php include_once 'Brain/functions.php'; include_once 'Brain/District.php'; include_once 'Brain/field_const.php'; regPost('distNo', 'distName', 'newDistName', 'dels'); if (isset($distNo)) { //handle add/modify/delete; foreach ($newDistName as $newD) { if ($newD != "prevent_required") { addDistrict($newD); } } $dists = sizeof($distNo); for ($i = 0; $i < $dists; $i++) { updateDistrict($distNo[$i], $distName[$i]); } foreach ($dels as $delDistNo) { if (!delDistrict($delDistNo)) { //cannot delete district message }
</head> <body> <?php error_reporting(0); include_once "Brain/functions.php"; include_once "Brain/User.php"; include_once "Brain/UserControl.php"; regPost('login', 'pw'); echo "<div>"; // if (isset($login) && isset($pw)) { // if (UserControl::login($login, $pw)) { // $loginUser = getUser(UserControl::getUserNo()); // echo 'Logged in as ' . $loginUser[userNo] . ' '. UserControl::getType() . '<br/>' // . 'use $loginUser to get the the current user'; // } // else { // echo 'Login failed'; // } // } // else if (UserControl::checkState()) { // $loginUser = getUser(UserControl::getUserNo()); // echo 'Already logged in as ' . $loginUser[userNo] . ' ' . UserControl::getType() . '<br/>' // . 'user $loginUser to get the the current user'; // } // else { // echo 'Not logged in.'; // } // // echo '</div>'; ?>
<title>Admin Category</title> <?php include "header2.php"; ?> <?php include "admin_table_tabs.php"; ?> <form id="adminCatForm" action="admin_cat.php" method="post"> <div class="adminTable_C"> <div id="adminCat_C" class="adminCat_C"> <?php include_once 'Brain/field_const.php'; include_once 'Brain/functions.php'; include_once 'Brain/Category.php'; regPost('catNo', 'catName', 'newCatNo', 'newCatName', 'newCatParent', 'dels'); if (isset($catNo)) { //from post method $size = sizeof($catNo); for ($i = 0; $i < $size; $i++) { updateCategory($catNo[$i], $catName[$i]); } } if (isset($newCatNo)) { $catNoTable = array(); foreach ($newCatNo as $i => $v) { if ($newCatNo[$i] == "") { continue; } $nCatParent = $newCatParent[$i]; if ($nCatParent[0] != 'C') {