Пример #1
0
 function Show()
 {
     global $Tpl;
     if (!$this->Visible) {
         return;
     }
     $ShownRecords = 0;
     $this->ds->Parameters["urls_user_id"] = CCGetFromGet("s_user_id", "");
     $this->ds->Parameters["urls_date"] = CCGetFromGet("s_date", "");
     $this->ds->Parameters["urls_charge"] = CCGetFromGet("s_charge", "");
     $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"));
             $this->Detail->Parameters = CCAddParam($this->Detail->Parameters, "charge_id", $this->ds->f("charge_id"));
             $this->Detail->Page = "ChargesMaintanence.php";
             $this->user_id->SetValue(GetUserNameID($this->ds->user_id->GetValue()));
             $this->date->SetValue(date("F j, Y, g:i a", $this->ds->date->GetValue()));
             $this->charge->SetValue($this->ds->charge->GetValue());
             $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow");
             $this->Detail->Show();
             $this->user_id->Show();
             $this->date->Show();
             $this->charge->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);
     }
     $this->Navigator->TotalPages = $this->ds->PageCount();
     $this->Sorter_user_id->Show();
     $this->Sorter_date->Show();
     $this->Sorter_charge->Show();
     $this->charges_Insert->Show();
     $this->Navigator->Show();
     $Tpl->parse("", false);
     $Tpl->block_path = "";
 }
Пример #2
0
 function Show()
 {
     global $Tpl;
     global $key;
     if (!$this->Visible) {
         return;
     }
     $ShownRecords = 0;
     $this->ds->Parameters["urls_title"] = CCGetFromGet("s_title", "");
     $this->ds->Parameters["urls_ItemNum"] = CCGetFromGet("s_ItemNum", "");
     $this->ds->Parameters["urls_city_town"] = CCGetFromGet("s_city_town", "");
     $this->ds->Parameters["urls_state_province"] = CCGetFromGet("s_state_province", "");
     $this->ds->Parameters["urls_status"] = CCGetFromGet("s_status", "");
     $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", "ItemNum", "Item_Number", "finalcat", "adminkey"));
             //$this->Detail->Parameters = CCAddParam($this->Detail->Parameters, "itemID", $this->ds->f("itemID"));
             $this->Detail->Page = "../catlist.php?adminkey=" . $key . "&Item_Number=" . $this->ds->ItemNum->GetValue();
             $this->ItemNum->SetValue($this->ds->ItemNum->GetValue());
             $this->title->SetValue($this->ds->title->GetValue());
             $this->user_id->SetValue(GetUserNameID($this->ds->user_id->GetValue()));
             $this->status->SetValue(GetItemStatus($this->ds->status->GetValue()));
             $this->started->SetValue(date("F j, Y, g:i a", $this->ds->started->GetValue()));
             $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow");
             $Tpl->setVar("adminkey", $key);
             //$this->Detail->Show();
             $this->ItemNum->Show();
             $this->title->Show();
             $this->user_id->Show();
             $this->status->Show();
             $this->started->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);
     }
     $Tpl->setVar("adminkey", $key);
     $this->Navigator->TotalPages = $this->ds->PageCount();
     $this->Sorter_ItemNum->Show();
     $this->Sorter_title->Show();
     $this->Sorter_user_id->Show();
     $this->Sorter_status->Show();
     $this->Sorter_started->Show();
     $this->items_Insert->Show();
     $this->Navigator->Show();
     $Tpl->parse("", false);
     $Tpl->block_path = "";
 }
Пример #3
0
 function Show()
 {
     global $Tpl;
     global $FileName;
     $Error = "";
     if (!$this->Visible) {
         return;
     }
     $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 items1";
             } else {
                 if ($this->ds->next_record()) {
                     $this->ds->SetValues();
                     $this->ItemNumLabel->SetValue($this->ds->ItemNumLabel->GetValue());
                     $this->UserIDLabel->SetValue(GetUserNameID($this->ds->UserIDLabel->GetValue()));
                     $this->StartedLabel->SetValue(date("F j, Y, g:i a", $this->ds->StartedLabel->GetValue()));
                     $this->ClosesLabel->SetValue(date("F j, Y, g:i a", $this->ds->ClosesLabel->GetValue()));
                     if (!$this->FormSubmitted) {
                         $this->title->SetValue($this->ds->title->GetValue());
                         $this->status->SetValue($this->ds->status->GetValue());
                         $this->end_reason->SetValue($this->ds->end_reason->GetValue());
                         $this->category->SetValue($this->ds->category->GetValue());
                         $this->asking_price->SetValue($this->ds->asking_price->GetValue());
                         $this->make_offer->SetValue($this->ds->make_offer->GetValue());
                         $this->quantity->SetValue($this->ds->quantity->GetValue());
                         $this->city_town->SetValue($this->ds->city_town->GetValue());
                         $this->states->SetValue($this->ds->states->GetValue());
                         $this->description->SetValue($this->ds->description->GetValue());
                         $this->dateadded->SetValue($this->ds->dateadded->GetValue());
                         $this->added_description->SetValue($this->ds->added_description->GetValue());
                         $this->image_one->SetValue($this->ds->image_one->GetValue());
                         $this->image_two->SetValue($this->ds->image_two->GetValue());
                         $this->image_three->SetValue($this->ds->image_three->GetValue());
                         $this->image_four->SetValue($this->ds->image_four->GetValue());
                         $this->image_five->SetValue($this->ds->image_five->GetValue());
                         $this->bold->SetValue($this->ds->bold->GetValue());
                         $this->background->SetValue($this->ds->background->GetValue());
                         $this->cat_featured->SetValue($this->ds->cat_featured->GetValue());
                         $this->home_featured->SetValue($this->ds->home_featured->GetValue());
                         $this->gallery_featured->SetValue($this->ds->gallery_featured->GetValue());
                         $this->image_preview->SetValue($this->ds->image_preview->GetValue());
                         $this->slide_show->SetValue($this->ds->slide_show->GetValue());
                         $this->counter->SetValue($this->ds->counter->GetValue());
                         $this->hits->SetValue($this->ds->hits->GetValue());
                         $this->user_id->SetValue($this->ds->user_id->GetValue());
                         $this->started->SetValue($this->ds->started->GetValue());
                         $this->closes->SetValue($this->ds->closes->GetValue());
                         $this->ItemNum->SetValue($this->ds->ItemNum->GetValue());
                     }
                 } else {
                     $this->EditMode = false;
                 }
             }
         }
     }
     if (!$this->FormSubmitted) {
     }
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow");
     if ($this->FormSubmitted) {
         $Error .= $this->ItemNumLabel->Errors->ToString();
         $Error .= $this->UserIDLabel->Errors->ToString();
         $Error .= $this->StartedLabel->Errors->ToString();
         $Error .= $this->ClosesLabel->Errors->ToString();
         $Error .= $this->title->Errors->ToString();
         $Error .= $this->status->Errors->ToString();
         $Error .= $this->end_reason->Errors->ToString();
         $Error .= $this->category->Errors->ToString();
         $Error .= $this->close->Errors->ToString();
         $Error .= $this->asking_price->Errors->ToString();
         $Error .= $this->make_offer->Errors->ToString();
         $Error .= $this->quantity->Errors->ToString();
         $Error .= $this->city_town->Errors->ToString();
         $Error .= $this->states->Errors->ToString();
         $Error .= $this->description->Errors->ToString();
         $Error .= $this->dateadded->Errors->ToString();
         $Error .= $this->added_description->Errors->ToString();
         $Error .= $this->image_one->Errors->ToString();
         $Error .= $this->image_two->Errors->ToString();
         $Error .= $this->image_three->Errors->ToString();
         $Error .= $this->image_four->Errors->ToString();
         $Error .= $this->image_five->Errors->ToString();
         $Error .= $this->bold->Errors->ToString();
         $Error .= $this->background->Errors->ToString();
         $Error .= $this->cat_featured->Errors->ToString();
         $Error .= $this->home_featured->Errors->ToString();
         $Error .= $this->gallery_featured->Errors->ToString();
         $Error .= $this->image_preview->Errors->ToString();
         $Error .= $this->slide_show->Errors->ToString();
         $Error .= $this->counter->Errors->ToString();
         $Error .= $this->hits->Errors->ToString();
         $Error .= $this->user_id->Errors->ToString();
         $Error .= $this->started->Errors->ToString();
         $Error .= $this->closes->Errors->ToString();
         $Error .= $this->ItemNum->Errors->ToString();
         $Error .= $this->Errors->ToString();
         $Error .= $this->ds->Errors->ToString();
         $Tpl->SetVar("Error", $Error);
         $Tpl->Parse("Error", false);
     }
     $Tpl->SetVar("Action", $this->HTMLFormAction);
     $this->Update->Visible = $this->EditMode;
     $this->Delete->Visible = $this->EditMode;
     $this->ItemNumLabel->Show();
     $this->UserIDLabel->Show();
     $this->StartedLabel->Show();
     $this->ClosesLabel->Show();
     $this->title->Show();
     $this->status->Show();
     $this->end_reason->Show();
     $this->category->Show();
     $this->close->Show();
     $this->asking_price->Show();
     $this->make_offer->Show();
     $this->quantity->Show();
     $this->city_town->Show();
     $this->states->Show();
     $this->description->Show();
     $this->dateadded->Show();
     $this->added_description->Show();
     $this->image_one->Show();
     $this->image_two->Show();
     $this->image_three->Show();
     $this->image_four->Show();
     $this->image_five->Show();
     $this->bold->Show();
     $this->background->Show();
     $this->cat_featured->Show();
     $this->home_featured->Show();
     $this->gallery_featured->Show();
     $this->image_preview->Show();
     $this->slide_show->Show();
     $this->counter->Show();
     $this->hits->Show();
     $this->Update->Show();
     $this->Delete->Show();
     $this->Cancel->Show();
     $this->user_id->Show();
     $this->started->Show();
     $this->closes->Show();
     $this->ItemNum->Show();
     $Tpl->parse("", false);
     $Tpl->block_path = "";
 }
Пример #4
0
 function Show()
 {
     global $Tpl;
     global $FileName;
     $Error = "";
     if (!$this->Visible) {
         return;
     }
     $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 charges";
             } else {
                 if ($this->ds->next_record()) {
                     $this->ds->SetValues();
                     $this->charge_id->SetValue($this->ds->charge_id->GetValue());
                     $this->user_id->SetValue(GetUserNameID($this->ds->user_id->GetValue()));
                     if (!$this->FormSubmitted) {
                         $twodays = $this->ds->date->GetValue();
                         $theday = getdate($twodays);
                         $lastofyear = substr($theday["year"], -2);
                         $enddate = $theday["mon"] . "/" . $theday["mday"] . "/" . $lastofyear;
                         $this->date->SetValue(date("F j, Y, g:i a", $this->ds->date->GetValue()));
                         $this->charge->SetValue($this->ds->charge->GetValue());
                         $this->cause->SetValue($this->ds->cause->GetValue());
                     }
                 } else {
                     $this->EditMode = false;
                 }
             }
         }
     }
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow");
     if ($this->FormSubmitted) {
         $Error .= $this->charge_id->Errors->ToString();
         $Error .= $this->user_id->Errors->ToString();
         $Error .= $this->date->Errors->ToString();
         $Error .= $this->charge->Errors->ToString();
         $Error .= $this->cause->Errors->ToString();
         $Error .= $this->Errors->ToString();
         $Error .= $this->ds->Errors->ToString();
         $Tpl->SetVar("Error", $Error);
         $Tpl->Parse("Error", false);
     }
     $Tpl->SetVar("Action", $this->HTMLFormAction);
     $this->Update->Visible = $this->EditMode;
     $this->Delete->Visible = $this->EditMode;
     $this->charge_id->Show();
     $this->user_id->Show();
     $this->date->Show();
     $this->charge->Show();
     $this->cause->Show();
     $this->Update->Show();
     $this->Delete->Show();
     $this->Cancel->Show();
     $Tpl->parse("", false);
     $Tpl->block_path = "";
 }