Esempio n. 1
0
        $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 = "";
$Redirect = "";
$Tpl = "";
$TemplateFileName = "";
$BlockToParse = "";
Esempio n. 2
0
 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}>&nbsp;" . $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}>&nbsp;&nbsp;" . $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}>&nbsp;&nbsp;&nbsp;" . $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}>&nbsp;&nbsp;&nbsp;&nbsp;" . $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}>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . $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 = "";
 }
Esempio n. 3
0
 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}>&nbsp;" . $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}>&nbsp;&nbsp;" . $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}>&nbsp;&nbsp;&nbsp;" . $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}>&nbsp;&nbsp;&nbsp;&nbsp;" . $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}>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . $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 = "";
 }
Esempio n. 4
0
 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());
     }
 }
Esempio n. 5
0
                 $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'";
 $db->query($query);
 foreach ($cats as $key => $value) {
     $query = "update categories set `count` = '" . $cats[$key]["total"] . "' where `cat_id` = '" . $key . "'";
Esempio n. 6
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);
}
Esempio n. 7
0
     $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 .= "&nbsp;</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;
     }
     if ($custom_pricing) {
         $cattable .= "  <img border=\"0\" src=\"Themes/images/custpricing_inherit.gif\">";
     }
     if ($mods[$catlist6->f("cat_id")]["pricing"] == 1) {
Esempio n. 8
0
 } 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") {
     $a = 0;
     $b = 0;
     $c = 0;
     $d = 0;
     $a = index_listing($ItemNum);
     $query = "select * from `custom_dropdown_values` where `ItemNum` = '" . $ItemNum . "'";
     $db2->query($query);
     while ($db2->next_record()) {
         $bb = index_listing($ItemNum, $db2->f("option_id"), "dd", $db2->f("field_id"), $db2->f("option_id"));
         $b = $b + $bb;
     }
     $query = "select * from `custom_textarea_values` where `ItemNum` = '" . $ItemNum . "'";
     $db2->query($query);
     while ($db2->next_record()) {
         $cc = index_listing($ItemNum, $db2->f("value"), "ta", $db2->f("field_id"));
         $c = $c + $cc;
     }
     $query = "select * from `custom_textbox_values` where `ItemNum` = '" . $ItemNum . "'";
     $db2->query($query);
     while ($db2->next_record()) {
         $dd = index_listing($ItemNum, $db2->f("value"), "tb", $db2->f("field_id"));
         $d = $d + $dd;
     }
     $pageterms = $pageterms + $a + $b + $c + $d;