Файл: Kagao-v3.0/upload/inc/kategorie.php
Строк: 111
<?php
class controller_cate extends db
{
    public function str($text){
        $text = str_replace(' ', '-', $text);
        $text = str_replace(',', '', $text);
        
        return $text;
    }
    public function getCategory(){
        
        $this->cate = $this->query('SELECT * FROM kategorie_big ORDER BY name');
        while($this->row = $this->fetch_row($this->cate))
        {
            $zahl = $this->query('SELECT id FROM produkte WHERE kategorie = "'.$this->row[0].'"');
            $endzahl = mysql_num_rows($zahl);
            $data[] = array($this->row[0], $this->row[1], $this->row[2], $this->str($this->row[1]), $endzahl );
        }
        
        return $data;
        
    }
}
function copyright(){ return date('Y'); }
function footerlinks(){
    global $e;
    return $e->setFooter();
}
function lastSuche(){
    global $db;
    $last = $db->query('SELECT * FROM lastsuche WHERE ip = "'.$_SERVER['REMOTE_ADDR'].'" ORDER by id DESC LIMIT 3');
    while($l = $db->fetch_assoc($last)){
?><div class="topMenu"><a href="<?php print $l["link"]; ?>"><?php print $l['name']; ?></a></div><?php
    }
}
function getCate($i, $a)
{
    global $e;
    return $e->rowCategoryName($i, $a);
}
function undercats($i)
{
    global $db;
    $cat = $db->query('SELECT * FROM kategorie_under WHERE bigid = "'.$i.'" LIMIT 2');
    while($row = $db->fetch_row($cat))
    {
        ?><li><a href="cat<?php print $i; ?>-<?php print $row[0]; ?>" style="font-size:12px;"><?php print $row[1]; ?></a></li><?php
    }
    
    if($i != 12){ ?><li><a href="#" style="font-size:12px;">Mehr...</a></li><?php }
}
function undercats1_($i)
{
    global $db;
    
    $cat = $db->query('SELECT * FROM kategorie_under WHERE bigid = "'.$i.'" ORDER by name');
    while($row = $db->fetch_row($cat))
    {
        ?><a href="cat<?php print $i; ?>-<?php print $row[0]; ?>" style="font-size:12px;"><div class="_d1001"><?php print $row[1]; ?> <font style="font-size:11px;">(<?php 
        $zahl = $db->query('SELECT id FROM produkte WHERE unterkategorie = "'.$row[0].'"');
        $endzahl = mysql_num_rows($zahl); print $endzahl; ?>)</font></div></a><?php
    }
}
function undercats2($i)
{
    global $e;
    return $e->rowCategoryNameUnder2($i);
}
function undercats3($i)
{
    global $db;
    
    $cat = $db->query('SELECT * FROM kategorie_under1 WHERE bigid = "'.$i.'" ORDER by name');
    while($row = $db->fetch_row($cat))
    {
        
        if($_SESSION['mobile']){
        ?><div style="float:left; clear:both; padding:20px; color:#666; width:100%; border-bottom:1px solid #eee;"><a href="javascript:void()" onclick="ajaxCat('<?php print $row[0]; ?>')" style="font-size:11px;" class="allendFonts bigFont<?php print $row[0]; ?>"><?php print $row[1]; ?></a> <font style="font-size:11px;">(<?php 
        $zahl = $db->query('SELECT id FROM produkte WHERE unterkategorie1 = "'.$row[0].'"');
        $endzahl = mysql_num_rows($zahl); print $endzahl; ?>)</font></div>
        <div style="float:left; clear:both; display:none; padding:20px; width:100%; border-bottom:1px solid #eee;" class="mobile allloadunder loadundercat_<?php print $row[0]; ?>"></div><?php
        }else{
        ?><div style="float:left; clear:both; padding-top:2px; color:#666;"><a href="javascript:void()" onclick="ajaxCat('<?php print $row[0]; ?>')" style="font-size:11px;" class="allendFonts bigFont<?php print $row[0]; ?>"><?php print $row[1]; ?></a> <font style="font-size:11px;">(<?php 
        $zahl = $db->query('SELECT id FROM produkte WHERE unterkategorie1 = "'.$row[0].'"');
        $endzahl = mysql_num_rows($zahl); print $endzahl; ?>)</font></div><div style="float:left; clear:both; display:none;" class="allloadunder loadundercat_<?php print $row[0]; ?>"></div><?php
        }
    }
}
?>