0) { while ( $row = mysql_fetch_array($result) ) { $ID1 = $row["cid"]; $padd=$lvl*10-10; // $padnb=($padd>0?str_repeat(" ", $padd):''); $padding=10+$padd; echo ''; //if($lvl==1) {echo ''; $clsa='acat';$bullet='';} if($lvl==1) {echo '

'; $clsa='acat';$bullet='';} elseif($lvl==2) {$bullet='';$clsa='acatsub2';} else {$bullet='';$clsa='acatsub';} echo($padnb.$bullet."".$row[1].""); if($lvl==2) {echo '';} if($lvl==1) echo '

'; echo ''; ShowTree($ID1, $lvl, $row[4]); $lvl--; // echo(str_repeat(" ", $padd).$bullet."".$row[1].""); } } } $rez=sql_query('SELECT vname, value FROM '.$dbprefix.'settings WHERE value!="-1"AND (vname="lf_content" OR vname="lf_catalogue") ORDER by value ASC',1); foreach($rez as $val){ $dbBlock[$val[0]]=$val[1]; $gotBlock[$val[1]]=$val[0]; } if($dbBlock['lf_content']!=-1){ $gotMenu=sql_query('SELECT mid, name_'.$_SESSION['lang'].', type, linkto FROM '.$dbprefix.'menu WHERE status=1 ORDER By sortid ASC',1); foreach ($gotMenu as $key=>$val){ if($val[2]=='C') $gotMenu[$key][3]='content.php?id='.$val[3]; if($val[3]=="/") $gotMenu[$key][3]=''; } } if($dbBlock['lf_catalogue']!=-1){ ob_start(); ShowTree(0,0); $gotTree=ob_get_contents(); ob_end_clean(); } ?>$val){ $subNews=explode('[pagebreak]', $val[1]); $gotNews[$key][1]=str_replace('[pagebreak]','',$subNews[0]); $gotNews[$key][1]=strip_tags($gotNews[$key][1],'


'); if($val[5]==''){ preg_match_all('/src=("[^"]*")/i', $val[1], $aMatches); if($aMatches[1][0]!='') $gotNews[$key][9]=substr($aMatches[1][0],1,-1); else $gotNews[$key][9]='files/image/noimage.jpg'; } else $gotNews[$key][9]='files/image/news_images/'.$val[0].'/tn_'.strtolower($val[5]); } ?>$val) { $parLastID=$curCID=$val[0]; if($val[4]=='_catalog'){ while($parLastID!=0){ $gotLastParent=sql_query('SELECT cid, name_'.$_SESSION['lang'].', parentid, url_name FROM '.$dbprefix.'categories WHERE status=1 AND cid="'.$parLastID.'"',0); $gotLastPath[$curCID][]=array($gotLastParent[0], $gotLastParent[1], $gotLastParent[2], $gotLastParent[3]); $parLastID=$gotLastParent[2]; } unset($gotLastPath[$curCID][0]); } } $gotNewsWorld=sql_query('SELECT nid, created, url_name, name_'.$_SESSION['lang'].' FROM '.$dbprefix.'newsworld WHERE status=1 AND type=1 ORDER By created DESC LIMIT 0,7',1); $gotNewsHealth=sql_query('SELECT nid, created, url_name, name_'.$_SESSION['lang'].' FROM '.$dbprefix.'newsworld WHERE status=1 AND type=2 ORDER By created DESC LIMIT 0,3',1); $gotNewsPopular=sql_query('SELECT nid, created, url_name, name_'.$_SESSION['lang'].', main_image FROM '.$dbprefix.'news WHERE status=1 AND (created>='.mktime(0,0,0,date("m")-1,1,date("Y")).' AND created<="'.mktime(23,59,59,date("m")-1,date("t", mktime(0,0,0, date("m")-1)) ,date("Y")).'") AND nid!=98 AND nid!=579 ORDER By visited DESC LIMIT 0,5',1); ?>