query($query); while ($admin->next_record()){ $key = md5($admin->f("username") . "AdMin kkkkkey" . $admin->f("password")); if ($key == $_REQUEST["adminkey"]) $valid = $key; } } if (!$valid) CCSecurityRedirect("1;2", "login.php", "catlist.php", CCGetQueryString("QueryString", "")); //End Include Common Files $page="Selecting a Category for a new listing"; 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='" . CCGetUserName() . "' WHERE ip='$ip'"; $SQL4 = "INSERT INTO online (ip, datet, user, page) VALUES ('$ip', $times+$timeout,'". CCGetUserName() . "', '$page')"; $SQL5 = "SELECT * FROM online"; $db1->query($SQL1); $db2->query($SQL2); if($db2->next_record()){ $db3->query($SQL3); } else { $db4->query($SQL4); } $db5->query($SQL5); $usersonline = $db5->num_rows(); unset($db1); unset($db2); unset($db3); unset($db4); unset($db5); unset($SQL); unset($SQL); unset($SQL); unset($SQL); unset($SQL); //Include Page implementation @2-503267A8 include("./Header.php"); //End Include Page implementation //Include Page implementation @3-353B2997 include("./Footer.php"); //End Include Page implementation //Initialize Page @1-49274B25 // Variables $FileName = ""; $Redirect = ""; $Tpl = ""; $TemplateFileName = ""; $BlockToParse = ""; $ComponentName = ""; // Events; $CCSEvents = ""; $CCSEventResult = ""; $FileName = "catlist.php"; $Redirect = ""; $TemplateFileName = "templates/catlist.html"; $BlockToParse = "main"; $PathToRoot = "./"; //End Initialize Page //Initialize Objects @1-DBA4AC3D // Controls $Header = new clsHeader(); $Header->BindEvents(); $Header->TemplatePath = "./"; $Header->Initialize(); $Footer = new clsFooter(); $Footer->BindEvents(); $Footer->TemplatePath = "./"; $Footer->Initialize(); // Events include("./catlist_events.php"); BindEvents(); $CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize"); //End Initialize Objects //Execute Components @1-351F985C $Header->Operations(); $Footer->Operations(); //End Execute Components //Go to destination page @1-BEB91355 if($Redirect) { $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload"); header("Location: " . $Redirect); exit; } //End Go to destination page //Initialize HTML Template @1-A0111C9D $CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView"); $Tpl = new clsTemplate(); $Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main"); $CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow"); buildcats($box2,$box3,$box4,$box5,$selected2,$selected3,$selected4,$selected5); //End Initialize HTML Template //Show Page @1-A025E414 $Header->Show("Header"); $Footer->Show("Footer"); $Tpl->PParse("main", false); //End Show Page //Unload Page @1-AB7622EF $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload"); unset($Tpl); //End Unload Page ?>