template_dir='../xpl_templates'; $smarty->compile_dir='../xpl_templates/compile'; $smarty->register_modifier('esch','esch'); if ($GLOBALS['sysctl']['submissions.disabled']=='y') { submitError('submissions.disabled.tpl',$smarty); exit(); } $l=$GLOBALS['sysctl']['frontend.max_news']>0?" LIMIT ".$GLOBALS['sysctl']['frontend.max_news']:''; $news=$db->Select("SELECT id,ndate,descr,content FROM ".DB_PREFIX."news ORDER BY id DESC".$l); $categories=$db->Select("SELECT c.id,c.text_id,c.name,c.title_text,c.header_text,c.field1,c.field2,c.field3,s.id AS section_id,s.name AS section FROM ".DB_PREFIX."categories c INNER JOIN ".DB_PREFIX."sections s ON c.ref_id_sections=s.id ORDER BY s.pos,c.name"); for (reset($categories); list($idx,$category)=each($categories);) { $categories[$idx]['url']=getCategoryURL($category['text_id'],false); } $sql_sponsored="SELECT i.id,i.rating_admin,ROUND(i.rating_user) AS rating_user,i.rating_user_votes,i.pos, DATE_FORMAT(i.ndate,'{$date_format}') AS `date`,i.name AS title,i.url,i.spare1,i.spare2,i.thumbnail,i.description, c.text_id AS category_text_id, c.name AS category_name, s.name AS section_name, t.name AS type_name, t.description AS type_description, t.spare1 AS type_spare1, t.spare2 AS type_spare2, t.display AS type_display FROM ".DB_PREFIX."items i INNER JOIN ".DB_PREFIX."categories c ON i.ref_id_categories=c.id INNER JOIN ".DB_PREFIX."sections s ON c.ref_id_sections=s.id INNER JOIN ".DB_PREFIX."link_types t ON i.ref_id_link_types=t.id WHERE sponsored_link='y'"; $sponsored_links=$db->Select($sql_sponsored); $sponsored_count=count($sponsored_links); if ($sponsored_count<=$GLOBALS['sysctl']['frontend.ipp.search_sponsored']) { $items_sponsored=$sponsored_links; shuffle($items_sponsored); } else { $items_sponsored=getSponsoredLinks($sponsored_links,$GLOBALS['sysctl']['frontend.ipp.search_sponsored']); } $errors=array(); $error=false; $smarty->assign('categories',$categories); $smarty->assign('news',$news); $smarty->assign('items_sponsored',$items_sponsored); $smarty->assign('errors',$errors); $content=$smarty->fetch('formulaire.tpl'); $smarty->assign('content',$content); $smarty->display('contactpage.tpl'); ?>