} } if ($_POST["saveAddCats"] && $admingroup && $_POST["addcategory"]) { $db = new clsDBNetConnect(); $newcats = explode(";", $_POST["addcategory"]); $i = 0; while ($newcats[$i]) { $newcats[$i] = trim($newcats[$i]); if (strlen($newcats[$i]) > 0) { $db->query("insert into `categories` set `name` = '" . mysql_escape_string($newcats[$i]) . "', `sub_cat_id` = '" . $_GET["CatID"] . "'"); } $i++; } header("Location: ViewCat.php?" . CCGetQueryString("QueryString", array())); } $itemcatcounts = get_catcounts($_GET["CatID"]); if (!CCGetUserID() && $_GET["CatID"]) { $db = new CLSDBNetConnect(); $query = "select * from categories where cat_id=" . $_GET["CatID"]; $db->query($query); if ($db->next_record()) { if ($db->f("member") == 1) { CCSecurityRedirect("1;2", "login.php", "ViewCat.php", CCGetQueryString("QueryString", "")); } } } //End Include Common Files $page = "Viewing Listings"; global $REMOTE_ADDR; global $now; $ip = $REMOTE_ADDR;
if ($value) { $keyarray = explode("_", $key); $db->query("update categories set `name` = '" . mysql_escape_string(html_entity_decode($value)) . "' where `cat_id` = '" . $keyarray[1] . "'"); } } } $order = explode("|", $_POST["order"]); $i = 0; while ($order[$i]) { $x = $i + 1; $db->query("update categories set `weight` = '" . $x . "' where `cat_id` = '" . $order[$i] . "'"); $i++; } header("Location: index.php"); } $itemcatcounts = get_catcounts(1); //End Include Common Files $page = "On Main Page"; global $REMOTE_ADDR; global $now; $ip = $REMOTE_ADDR; $timeout = $now["timeout"]; $db1 = new clsDBNetConnect(); $db2 = new clsDBNetConnect(); $db3 = new clsDBNetConnect(); $db4 = new clsDBNetConnect(); $db5 = new clsDBNetConnect(); $times = time(); $SQL1 = "DELETE FROM online WHERE datet < {$times}"; $SQL2 = "SELECT * FROM online WHERE ip='{$ip}'"; $SQL3 = "UPDATE online SET datet={$times} + {$timeout}, page='{$page}', user='******' WHERE ip='{$ip}'";