assign('indexTitle2', ''); include('inc/seo.inc.php'); $smarty -> register_function('nopl', 'parse'); $smarty -> assign('showStateLicz', $object -> showStateLicz( $mysql )); $smarty -> assign('reklamaD', $object -> showReklamaD( $mysql )); $smarty -> assign('reklamaB', $object -> showReklamaB( $mysql )); $smarty -> assign('reklamaC', $object -> showReklamaC( $mysql )); $smarty -> assign('showPromoM', $object -> showPromoM( $mysql )); $smarty -> assign('showPromoMM', $object -> showPromoMM( $mysql )); $smarty -> assign('schow', $object -> pozycjeSchowka( $mysql )); //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx require_once('kategorie2.php'); //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $sql = "SELECT a.*, b.*, c.* FROM object AS a, kategoria AS b, podkategoria AS c WHERE a.obKat = b.katId AND a.obPod = c.idPod AND a.obPromo = '1' AND a.obConfirm = '1' AND a.obDateEnd > NOW() ORDER by RAND() LIMIT ".$cfg['objectIndexPromo'].""; //a.obId DESC $q = $mysql -> q( $sql ); $smarty -> assign('nump', $mysql -> num( $sql )); $promo = array(); $count = 0; while ( $db = mysql_fetch_array( $q ) ) { $idpro = $db['obId']; $promo[$count] = $db; $sql2 = "SELECT photoUrl FROM photos WHERE photoObjectId = '$idpro' ORDER by photoId ASC LIMIT 1"; $q2 = $mysql -> q( $sql2 ); $db2 = mysql_fetch_array( $q2 ); $promo[$count]['photo'] = $db2[0]; $count++; } $smarty -> assign('promo', $promo); //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $sql = "SELECT a.*, b.*, c.* , d.* FROM object AS a, kategoria AS b, podkategoria AS c, state AS d WHERE a.obKat = b.katId AND a.obPod = c.idPod AND a.obStateId = d.stateId AND a.obConfirm = '1' AND a.obDateEnd > NOW() ORDER by a.obId DESC LIMIT ".$cfg['objectIndex'].""; $q = $mysql -> q( $sql ); $smarty -> assign('num', $mysql -> num( $sql )); $index = array(); $count = 0; while ( $db = mysql_fetch_array( $q ) ) { $idno = $db['obId']; $index[$count] = $db; $sql2 = "SELECT photoUrl FROM photos WHERE photoObjectId = '".$idno."' ORDER by photoId ASC LIMIT 1"; $q2 = $mysql -> q( $sql2 ); $db2 = mysql_fetch_array( $q2 ); $index[$count]['photo'] = $db2[0]; $index[$count]['gwiazdanowe'] = rating_bar($idno,'10','static'); $count++; } $smarty -> assign('index', $index); //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $sql = "SELECT pagesTxt FROM pages WHERE pagesId = '2'"; $q = $mysql -> q( $sql ); $db = mysql_fetch_array( $q ); $smarty -> assign('glowna', $db[0]); //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $smarty -> display('index.tpl'); ?>