$inoptions .= "<option value=\"" . $ingroupdata->f("cat_id") . "\">" . $ingroupdata->f("name") . "</option>\n"; $catingroup[] = $ingroupdata->f("cat_id"); } if ($catingroup) { $extra = "AND cat.cat_id NOT IN ('" . implode("','", $catingroup) . "')"; } else { $extra = ""; } $notinoptions = ""; $notingroupdata = new clsDBDBNetConnect(); $notingroupdata->query("SELECT distinct cat.name, cat.cat_id FROM categories AS cat LEFT JOIN groups_categories AS cg USING ( cat_id ) WHERE (cg.group_id NOT IN ( '" . $groupid->f("id") . "' ) OR cg.group_id IS NULL) and cat.sub_cat_id=1 {$extra} ORDER BY name ASC"); while ($notingroupdata->next_record()) { $notinoptions .= "<option value=\"" . $notingroupdata->f("cat_id") . "\">" . $notingroupdata->f("name") . "</option>\n"; } } $groups = new clsDBDBNetConnect(); $groups->query("select * from `groups` ORDER BY `id` ASC"); $groupoptions = ""; while ($groups->next_record()) { if ($groups->f("id") != $selected) { $groupoptions .= "<option value=\"" . $groups->f("id") . "\">" . $groups->f("id") . " -- " . $groups->f("title") . "</option>\n"; } else { $groupoptions .= "<option value=\"" . $groups->f("id") . "\" selected>" . $groups->f("id") . " -- " . $groups->f("title") . "</option>\n"; } } //Include Page implementation @34-353B2997 include "./Footer.php"; //End Include Page implementation //Initialize Page @1-4491C9BD // Variables $FileName = "";
function Show() { global $Tpl; global $FileName; $Error = ""; if (!$this->Visible) { return; } $this->NewReg->Prepare(); $this->ds->open(); $RecordBlock = "Record " . $this->ComponentName; $Tpl->block_path = $RecordBlock; if ($this->EditMode) { if ($this->Errors->Count() == 0) { if ($this->ds->Errors->Count() > 0) { echo "Error in Record settings_charges"; } else { if ($this->ds->next_record()) { $this->ds->SetValues(); if (!$this->FormSubmitted) { $this->currency->SetValue($this->ds->currency->GetValue()); $this->currencycode->SetValue($this->ds->currencycode->GetValue()); $this->NewReg->SetValue($this->ds->NewReg->GetValue()); $this->CreditAmount->SetValue($this->ds->CreditAmount->GetValue()); $this->tokens->SetValue($this->ds->tokens->GetValue()); $this->TransactReason->SetValue($this->ds->TransactReason->GetValue()); $this->listing_fee->SetValue($this->ds->listing_fee->GetValue()); $this->home_fee->SetValue($this->ds->home_fee->GetValue()); $this->cat_fee->SetValue($this->ds->cat_fee->GetValue()); $this->gallery_fee->SetValue($this->ds->gallery_fee->GetValue()); $this->image_pre_fee->SetValue($this->ds->image_pre_fee->GetValue()); $this->slide_fee->SetValue($this->ds->slide_fee->GetValue()); $this->counter_fee->SetValue($this->ds->counter_fee->GetValue()); $this->bold_fee->SetValue($this->ds->bold_fee->GetValue()); $this->high_fee->SetValue($this->ds->high_fee->GetValue()); $this->upload_fee->SetValue($this->ds->upload_fee->GetValue()); $this->set_id->SetValue($this->ds->set_id->GetValue()); } } else { $this->EditMode = false; } } } } if (!$this->FormSubmitted) { } if ($this->FormSubmitted) { $Error .= $this->currency->Errors->ToString(); $Error .= $this->currencycode->Errors->ToString(); $Error .= $this->NewReg->Errors->ToString(); $Error .= $this->CreditAmount->Errors->ToString(); $Error .= $this->tokens->Errors->ToString(); $Error .= $this->TransactReason->Errors->ToString(); $Error .= $this->listing_fee->Errors->ToString(); $Error .= $this->home_fee->Errors->ToString(); $Error .= $this->cat_fee->Errors->ToString(); $Error .= $this->gallery_fee->Errors->ToString(); $Error .= $this->image_pre_fee->Errors->ToString(); $Error .= $this->slide_fee->Errors->ToString(); $Error .= $this->counter_fee->Errors->ToString(); $Error .= $this->bold_fee->Errors->ToString(); $Error .= $this->high_fee->Errors->ToString(); $Error .= $this->upload_fee->Errors->ToString(); $Error .= $this->set_id->Errors->ToString(); $Error .= $this->Errors->ToString(); $Error .= $this->ds->Errors->ToString(); $Tpl->SetVar("Error", $Error); $Tpl->Parse("Error", false); } $cat = $_GET["cat_id"]; $catoptions = ""; $catlist = new clsDBDBNetConnect(); $catlist->query("select * from categories where cat_id=1"); while ($catlist->next_record()) { if ($cat == $catlist->f("cat_id")) { $selected = " selected"; } $catoptions .= "<option value=\"" . $catlist->f("cat_id") . "\"{$selected}>" . $catlist->f("name") . "</option>"; $selected = ""; $catlist2 = new clsDBDBNetConnect(); $catlist2->query("select * from categories where sub_cat_id=" . $catlist->f("cat_id")); while ($catlist2->next_record()) { if ($cat == $catlist2->f("cat_id")) { $selected = " selected"; } $catoptions .= "<option value=\"" . $catlist2->f("cat_id") . "\"{$selected}> " . $catlist2->f("name") . "</option>"; $selected = ""; $catlist3 = new clsDBDBNetConnect(); $catlist3->query("select * from categories where sub_cat_id=" . $catlist2->f("cat_id")); while ($catlist3->next_record()) { if ($cat == $catlist3->f("cat_id")) { $selected = " selected"; } $catoptions .= "<option value=\"" . $catlist3->f("cat_id") . "\"{$selected}> " . $catlist3->f("name") . "</option>"; $selected = ""; $catlist4 = new clsDBDBNetConnect(); $catlist4->query("select * from categories where sub_cat_id=" . $catlist3->f("cat_id")); while ($catlist4->next_record()) { if ($cat == $catlist4->f("cat_id")) { $selected = " selected"; } $catoptions .= "<option value=\"" . $catlist4->f("cat_id") . "\"{$selected}> " . $catlist4->f("name") . "</option>"; $selected = ""; $catlist5 = new clsDBDBNetConnect(); $catlist5->query("select * from categories where sub_cat_id=" . $catlist4->f("cat_id")); while ($catlist5->next_record()) { if ($cat == $catlist5->f("cat_id")) { $selected = " selected"; } $catoptions .= "<option value=\"" . $catlist5->f("cat_id") . "\"{$selected}> " . $catlist5->f("name") . "</option>"; $selected = ""; $catlist6 = new clsDBDBNetConnect(); $catlist6->query("select * from categories where sub_cat_id=" . $catlist5->f("cat_id")); while ($catlist6->next_record()) { if ($cat == $catlist6->f("cat_id")) { $selected = " selected"; } $catoptions .= "<option value=\"" . $catlist6->f("cat_id") . "\"{$selected}> " . $catlist6->f("name") . "</option>"; $selected = ""; } } } } } } $Tpl->SetVar("Action", $this->HTMLFormAction); $dbcon = new clsDBNetConnect(); $query = "select * from settings_charges where set_id=" . $_GET["cat_id"]; $dbcon->query($query); if ($dbcon->next_record()) { $this->Insert->Visible = 0; $this->Update->Visible = 1; if ($_GET["cat_id"] != 1 && $_GET["cat_id"]) { $this->Delete->Visible = 1; } } else { $this->Insert->Visible = 1; $this->Update->Visible = 0; $this->Delete->Visible = 0; } $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow"); $this->currency->Show(); $this->currencycode->Show(); $this->NewReg->Show(); $this->CreditAmount->Show(); $this->tokens->Show(); $this->TransactReason->Show(); $this->listing_fee->Show(); $this->home_fee->Show(); $this->cat_fee->Show(); $this->gallery_fee->Show(); $this->image_pre_fee->Show(); $this->slide_fee->Show(); $this->counter_fee->Show(); $this->bold_fee->Show(); $this->high_fee->Show(); $this->upload_fee->Show(); $this->Insert->Show(); $this->Update->Show(); if ($_GET["cat_id"] != 1 && $_GET["cat_id"]) { $this->Delete->Show(); } $this->Cancel->Show(); $this->set_id->Show(); if ($cat != 1) { $Tpl->SetVar("disabled", "disabled"); } $Tpl->SetVar("CatOptions", $catoptions); $Tpl->parse("", false); $Tpl->block_path = ""; }
<?php //Include Common Files @1-5471E0F2 define("RelativePath", "."); include RelativePath . "/Common.php"; include RelativePath . "/Template.php"; include RelativePath . "/Sorter.php"; include RelativePath . "/Navigator.php"; //End Include Common Files $db1 = new clsDBDBNetConnect(); $db1->connect(); $times = time(); $SQL1 = "DELETE FROM online WHERE datet < {$times}"; $db1->query($SQL1); //Include Page implementation @13-503267A8 include "./Header.php"; //End Include Page implementation class clsGridonline { //online class @2-AA5BB468 //Variables @2-A73A82D3 // Public variables var $ComponentName; var $Visible; var $Errors; var $ds; var $PageSize; var $SorterName = ""; var $SorterDirection = ""; var $PageNumber; var $CCSEvents = "";
function Delete() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildDelete"); $remi = new clsDBDBNetConnect(); $remi->connect(); $remi->query("SELECT * FROM items WHERE " . $this->Where); while ($remi->next_record()) { @unlink("../" . $remi->f("image_one")); @unlink("../" . $remi->f("image_two")); @unlink("../" . $remi->f("image_three")); @unlink("../" . $remi->f("image_four")); @unlink("../" . $remi->f("image_five")); } unset($remi); $SQL = "DELETE FROM items WHERE " . $this->Where; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteDelete"); $this->query($SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteDelete"); if ($this->Errors->Count() > 0) { $this->Errors->AddError($this->Errors->ToString()); } }
function Show() { global $Tpl; if (!$this->Visible) { return; } $ShownRecords = 0; $this->ds->Prepare(); $this->ds->Open(); $GridBlock = "Grid " . $this->ComponentName; $Tpl->block_path = $GridBlock; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow"); $is_next_record = $this->ds->next_record(); if ($is_next_record && $ShownRecords < $this->PageSize) { do { $this->ds->SetValues(); $Tpl->block_path = $GridBlock . "/Row"; $this->Detail->Parameters = CCGetQueryString("QueryString", array("ccsForm", "cat_id")); $this->Detail->Parameters = CCAddParam($this->Detail->Parameters, "date_id", $this->ds->f("date_id")); $this->Detail->Parameters = CCAddParam($this->Detail->Parameters, "cat_id", $_GET["cat_id"]); $this->Detail->Page = "ListingDatesEdit.php"; $this->days->SetValue($this->ds->days->GetValue()); $this->fee->SetValue($this->ds->fee->GetValue()); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow"); $this->Detail->Show(); $this->days->Show(); $this->fee->Show(); $Tpl->block_path = $GridBlock; $Tpl->parse("Row", true); $ShownRecords++; $is_next_record = $this->ds->next_record(); } while ($is_next_record && $ShownRecords < $this->PageSize); } else { $Tpl->parse("NoRecords", false); } $cat = $_GET["cat_id"]; $catoptions = ""; $catlist = new clsDBDBNetConnect(); $catlist->query("select * from categories where cat_id=1"); while ($catlist->next_record()) { if ($cat == $catlist->f("cat_id")) { $selected = " selected"; } $catoptions .= "<option value=\"" . $catlist->f("cat_id") . "\"{$selected}>" . $catlist->f("name") . "</option>"; $selected = ""; $catlist2 = new clsDBDBNetConnect(); $catlist2->query("select * from categories where sub_cat_id=" . $catlist->f("cat_id")); while ($catlist2->next_record()) { if ($cat == $catlist2->f("cat_id")) { $selected = " selected"; } $catoptions .= "<option value=\"" . $catlist2->f("cat_id") . "\"{$selected}> " . $catlist2->f("name") . "</option>"; $selected = ""; $catlist3 = new clsDBDBNetConnect(); $catlist3->query("select * from categories where sub_cat_id=" . $catlist2->f("cat_id")); while ($catlist3->next_record()) { if ($cat == $catlist3->f("cat_id")) { $selected = " selected"; } $catoptions .= "<option value=\"" . $catlist3->f("cat_id") . "\"{$selected}> " . $catlist3->f("name") . "</option>"; $selected = ""; $catlist4 = new clsDBDBNetConnect(); $catlist4->query("select * from categories where sub_cat_id=" . $catlist3->f("cat_id")); while ($catlist4->next_record()) { if ($cat == $catlist4->f("cat_id")) { $selected = " selected"; } $catoptions .= "<option value=\"" . $catlist4->f("cat_id") . "\"{$selected}> " . $catlist4->f("name") . "</option>"; $selected = ""; $catlist5 = new clsDBDBNetConnect(); $catlist5->query("select * from categories where sub_cat_id=" . $catlist4->f("cat_id")); while ($catlist5->next_record()) { if ($cat == $catlist5->f("cat_id")) { $selected = " selected"; } $catoptions .= "<option value=\"" . $catlist5->f("cat_id") . "\"{$selected}> " . $catlist5->f("name") . "</option>"; $selected = ""; $catlist6 = new clsDBDBNetConnect(); $catlist6->query("select * from categories where sub_cat_id=" . $catlist5->f("cat_id")); while ($catlist6->next_record()) { if ($cat == $catlist6->f("cat_id")) { $selected = " selected"; } $catoptions .= "<option value=\"" . $catlist6->f("cat_id") . "\"{$selected}> " . $catlist6->f("name") . "</option>"; $selected = ""; } } } } } } $Tpl->SetVar("CatOptions", $catoptions); $this->Navigator->TotalPages = $this->ds->PageCount(); $this->Sorter_days->Show(); $this->lookup_listing_dates_Insert->Show(); $this->Navigator->Show(); $Tpl->parse("", false); $Tpl->block_path = ""; }
while ($db4->next_record()) { $cats[$db->f("cat_id")]["total"] = $cats[$db->f("cat_id")]["total"] + $itemcats[$db4->f("cat_id")]; $cats[$db2->f("cat_id")]["total"] = $cats[$db2->f("cat_id")]["total"] + $itemcats[$db4->f("cat_id")]; $cats[$db3->f("cat_id")]["total"] = $cats[$db3->f("cat_id")]["total"] + $itemcats[$db4->f("cat_id")]; $cats[$db4->f("cat_id")]["total"] = $cats[$db4->f("cat_id")]["total"] + $itemcats[$db4->f("cat_id")]; $query = "select `cat_id`, `sub_cat_id` from categories where `sub_cat_id` = '" . $db4->f("cat_id") . "'"; $db5 = new clsDBDBNetConnect(); $db5->query($query); while ($db5->next_record()) { $cats[$db->f("cat_id")]["total"] = $cats[$db->f("cat_id")]["total"] + $itemcats[$db5->f("cat_id")]; $cats[$db2->f("cat_id")]["total"] = $cats[$db2->f("cat_id")]["total"] + $itemcats[$db5->f("cat_id")]; $cats[$db3->f("cat_id")]["total"] = $cats[$db3->f("cat_id")]["total"] + $itemcats[$db5->f("cat_id")]; $cats[$db4->f("cat_id")]["total"] = $cats[$db4->f("cat_id")]["total"] + $itemcats[$db5->f("cat_id")]; $cats[$db5->f("cat_id")]["total"] = $cats[$db5->f("cat_id")]["total"] + $itemcats[$db5->f("cat_id")]; $query = "select `cat_id`, `sub_cat_id` from categories where `sub_cat_id` = '" . $db5->f("cat_id") . "'"; $db6 = new clsDBDBNetConnect(); $db6->query($query); while ($db6->next_record()) { $cats[$db->f("cat_id")]["total"] = $cats[$db->f("cat_id")]["total"] + $itemcats[$db6->f("cat_id")]; $cats[$db2->f("cat_id")]["total"] = $cats[$db2->f("cat_id")]["total"] + $itemcats[$db6->f("cat_id")]; $cats[$db3->f("cat_id")]["total"] = $cats[$db3->f("cat_id")]["total"] + $itemcats[$db6->f("cat_id")]; $cats[$db4->f("cat_id")]["total"] = $cats[$db4->f("cat_id")]["total"] + $itemcats[$db6->f("cat_id")]; $cats[$db5->f("cat_id")]["total"] = $cats[$db5->f("cat_id")]["total"] + $itemcats[$db6->f("cat_id")]; $cats[$db6->f("cat_id")]["total"] = $cats[$db6->f("cat_id")]["total"] + $itemcats[$db6->f("cat_id")]; } } } } } } $query = "update categories set `count` = '0'";
function GetUserNameID($Ider) { $dbs = new clsDBDBNetConnect(); $dbs->connect(); $dbs->query("SELECT user_login FROM users WHERE user_id='" . $Ider . "'"); if ($dbs->next_record()) { return $dbs->f(0); } else { return "No User Found!"; } unset($dbs); }
if ($mods[$catlist5->f("cat_id")]["pricing"] == 1) { $cattable .= " <img border=\"0\" src=\"Themes/images/custpricing.gif\">"; $custom_pricing = 1; } if (($custom_template[0] || $custom_template[1] || $custom_template[2] || $custom_template[3]) && $mods[$catlist5->f("cat_id")]["template"] != 1) { $cattable .= " <img border=\"0\" src=\"Themes/images/custtemplate_inherit.gif\">"; } elseif ($mods[$catlist5->f("cat_id")]["template"] == 1) { $cattable .= " <img border=\"0\" src=\"Themes/images/custtemplate.gif\">"; $custom_template[4] = 1; } else { $custom_template[4] = 0; } $cattable .= " <a href=\"CatDetails.php?cat=" . $catlist5->f("cat_id") . "\" border=\"0\"><font color=#ff0000>Edit</font></a></td>\n <td width=\"125\">"; $cattable .= $thisgroups; $cattable .= " </td></tr>"; $catlist6 = new clsDBDBNetConnect(); $catlist6->query("select * from categories where sub_cat_id=" . $catlist5->f("cat_id")); while ($catlist6->next_record()) { $custom_template[4] = ""; $bgcolor = "#808080"; if ($_GET["cat"] == $catlist6->f("cat_id")) { $bgcolor = "#FFFFFF"; } $cattable .= " <td width=\"225\" bgcolor=\"{$bgcolor}\">"; $cattable .= "<font size=\"1\">------------------" . $catlist6->f("name") . "</font>"; if ($custom_field) { $cattable .= " <img border=\"0\" src=\"Themes/images/custfield_inherit.gif\">"; } if ($mods[$catlist6->f("cat_id")]["field"] == 1) { $cattable .= " <img border=\"0\" src=\"Themes/images/custfield.gif\">"; $custom_field = 1;
function UpdateRow() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeUpdate"); if (!$this->UpdateAllowed) { return false; } //$this->ds->ItemNumLabel->SetValue($this->ItemNumLabel->GetValue()); //$this->ds->UserIDLabel->SetValue($this->UserIDLabel->GetValue()); //$this->ds->StartedLabel->SetValue($this->StartedLabel->GetValue()); //$this->ds->ClosesLabel->SetValue($this->ClosesLabel->GetValue()); $this->ds->title->SetValue($this->title->GetValue()); $this->ds->status->SetValue($this->status->GetValue()); $this->ds->end_reason->SetValue($this->end_reason->GetValue()); $this->ds->category->SetValue($this->category->GetValue()); $this->ds->close->SetValue($this->close->GetValue()); $this->ds->asking_price->SetValue($this->asking_price->GetValue()); $this->ds->make_offer->SetValue($this->make_offer->GetValue()); $this->ds->quantity->SetValue($this->quantity->GetValue()); $this->ds->city_town->SetValue($this->city_town->GetValue()); $this->ds->state->SetValue($this->state->GetValue()); $this->ds->country->SetValue($this->country->GetValue()); $this->ds->description->SetValue($this->description->GetValue()); $this->ds->dateadded->SetValue($this->dateadded->GetValue()); $this->ds->added_description->SetValue($this->added_description->GetValue()); $this->ds->image_one->SetValue($this->image_one->GetValue()); $this->ds->image_two->SetValue($this->image_two->GetValue()); $this->ds->image_three->SetValue($this->image_three->GetValue()); $this->ds->image_four->SetValue($this->image_four->GetValue()); $this->ds->image_five->SetValue($this->image_five->GetValue()); $this->ds->bold->SetValue($this->bold->GetValue()); $this->ds->background->SetValue($this->background->GetValue()); $this->ds->cat_featured->SetValue($this->cat_featured->GetValue()); $this->ds->home_featured->SetValue($this->home_featured->GetValue()); $this->ds->gallery_featured->SetValue($this->gallery_featured->GetValue()); $this->ds->image_preview->SetValue($this->image_preview->GetValue()); $this->ds->slide_show->SetValue($this->slide_show->GetValue()); $this->ds->counter->SetValue($this->counter->GetValue()); $this->ds->hits->SetValue($this->hits->GetValue()); $this->ds->user_id->SetValue($this->user_id->GetValue()); $this->ds->started->SetValue($this->started->GetValue()); $this->ds->closes->SetValue($this->closes->GetValue()); $ld = new clsDBDBNetConnect(); $ld->connect(); if ($this->close->GetValue() != 979) { $thedays = CCDLookUp("days", "lookup_listing_dates", "date_id='" . $this->close->GetValue() . "'", $ld); $this->ds->closes->SetValue(86400 * $thedays + time()); } if ($this->close->GetValue() == 979) { $this->ds->closes->SetValue($this->ds->closes->GetValue()); } unset($ld); $this->ds->ItemNum->SetValue($this->ItemNum->GetValue()); $this->ds->Update(); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterUpdate"); if ($this->ds->Errors->Count() > 0) { echo "Error in Record " . $this->ComponentName . " / Update Operation"; $this->ds->Errors->Clear(); $this->Errors->AddError("Database command error."); } return $this->Errors->Count() == 0; }
$b = 0; $c = 0; $d = 0; $a = index_listing($db->f("ItemNum")); $pageterms = $pageterms + $a; $totalterms = $totalterms + $a; } if ($pageterms > $_REQUEST["perpage"]) { header("Location: ReIndex.php?Submit=1&totalterms=" . $totalterms . "&ItemNum=Alllistings&itemID=" . $db->f("itemID") . "&fields=" . $_REQUEST["fields"] . "&perpage=" . $_REQUEST["perpage"]); exit; } } } elseif (is_array($_POST["ItemNum"]) && !in_array("Alllistings", $_POST["ItemNum"])) { foreach ($_POST["ItemNum"] as $ItemNum) { $query = ""; $db2 = new clsDBDBNetConnect(); if ($_POST["fields"] == "All" && $totalterms < 1) { $query = "delete from `listing_index` where `ItemNum` = '" . $ItemNum . "'"; } elseif ($_POST["fields"] == "Allcust" && $totalterms < 1) { $query = "delete from `listing_index` where (`field_type` = 'dd' or `field_type` = 'ta' or `field_type` = 'tb') and `ItemNum` = '" . $ItemNum . "'"; } elseif ($_POST["fields"] == "CustTA" && $totalterms < 1) { $query = "delete from `listing_index` where `field_type` = 'ta' and `ItemNum` = '" . $ItemNum . "'"; } elseif ($_POST["fields"] == "CustTB" && $totalterms < 1) { $query = "delete from `listing_index` where `field_type` = 'tb' and `ItemNum` = '" . $ItemNum . "'"; } elseif ($_POST["fields"] == "CustDD" && $totalterms < 1) { $query = "delete from `listing_index` where `field_type` = 'dd' and `ItemNum` = '" . $ItemNum . "'"; } elseif ($_POST["fields"] == "Main" && $totalterms < 1) { $query = "delete from `listing_index` where `field_type` = 'main' and `ItemNum` = '" . $ItemNum . "'"; } $db2->query($query); if ($_POST["fields"] == "All") {