Файл: Kagao-v3.0/upload/inc/extra.php
Строк: 42
<?php
class extras extends db
{
    public function anzeigen()
    {
        $this->pro = $this->query('SELECT * FROM list WHERE ip = "'.$_SERVER['REMOTE_ADDR'].'" ORDER BY id DESC LIMIT 4');
        while($this->po = $this->fetch_assoc($this->pro)){
            
            $indata = $this->query('SELECT * FROM produkte WHERE id = "'.$this->po["aid"].'"  AND statuscode = "1"');
            $cdata = $this->fetch_assoc($indata);
            
            if(!empty($cdata['titel'])){
            $data[] = $cdata;
            }
        }
        
        return $data;
    }
    public function getList()
    {
        $this->listing = $this->query('SELECT aid FROM list WHERE ip = "'.$_SERVER['REMOTE_ADDR'].'" ORDER by id DESC');
        while($this->in = $this->fetch_assoc($this->listing)){
            
            $this->data = $this->query('SELECT * FROM produkte WHERE id = "'.$this->in["aid"].'" AND statuscode = "1"');
            $this->dat  = $this->fetch_assoc($this->data);
            
            $data[] = array(
                "id" => $this->dat["id"],
                "bild" => $this->dat["bild"],
                "titel" => substr($this->dat["titel"],0,120),
                "postleitzahl" => $this->dat["postleitzahl"],
                "preis" => $this->dat["preis"],
                "preisart" => $this->dat["preisart"],
                "erstellung" => $this->dat["erstellung"]
            );
            
        }
        
        return $data;
    }    
    
    public function getList1()
    {
        $this->listing = $this->query('SELECT * FROM produkte WHERE uid = "'.$_GET['id'].'" AND statuscode = "1" LIMIT 100');
        while($this->dat = $this->fetch_assoc($this->listing)){
            
            $data[] = array(
                "id" => $this->dat["id"],
                "bild" => $this->dat["bild"],
                "titel" => substr($this->dat["titel"],0,40),
                "postleitzahl" => $this->dat["postleitzahl"],
                "preis" => $this->dat["preis"],
                "preisart" => $this->dat["preisart"],
                "erstellung" => $this->dat["erstellung"],
                "topanzeige" => $this->dat['topanzeige']
            );
            
        }
        
        return $data;
    }    
    
    public function getList2()
    {
        $this->listing = $this->query('SELECT * FROM produkte WHERE uid = "'.$_SESSION['login'].'" ORDER BY id DESC LIMIT 100');
        while($this->dat = $this->fetch_assoc($this->listing)){
            
            $data[] = array(
                "id"                 => $this->dat["id"],
                "bild"                 => $this->dat["bild"],
                "titel"             => substr($this->dat["titel"],0,120),
                "postleitzahl"        => $this->dat["postleitzahl"],
                "preis"             => $this->dat["preis"],
                "preisart"             => $this->dat["preisart"],
                "erstellung"         => $this->dat["erstellung"],
                "topanzeige"        => $this->dat['topanzeige'],
                "counter"            => $this->dat['counter'],
                "beobachter"        => $this->dat['beobachter'],
                "statuscode"        => $this->dat['statuscode'],
                "topbis"            => $this->dat['topbis'],
                "ad_hochschieben"    => $this->dat['ad_hochschieben_time'],
                "ad_galerie_time"    => $this->dat['ad_galerie_time'],
                "ad_highlight_time"    => $this->dat['ad_highlight_time'],
                "ad_highlight"        => $this->dat['ad_highlight'],
                "ad_galerie"        => $this->dat['ad_galerie'],
                "ad_hoch_datum"        => $this->dat['ad_hochschieben']
                
            );
            
        }
        
        return $data;
    }    
    
    
}
?>