Beispiel #1
0
<?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 = "";
Beispiel #2
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);
}
Beispiel #3
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());
     }
 }
Beispiel #4
0
 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;
 }