<? if ($act=='articles' && $id!=0) { $_logic['content']=Array(); $_logic['content'] = GetArticlesItem($id); $_logic['content']['allnewsurl'] = GetSeoUrl('articles',0); } if ($act=='articles' && $id==0) { $_logic['content']=Array(); $sql = "SELECT * FROM $par->topmenutable WHERE `url`='/articles'"; $res = mysql_query($sql); if($line = mysql_fetch_array($res,MYSQL_ASSOC)) { $line = LangProcess($line); $_logic['content']['title'] = $line['title']; $_logic['content']['text'] = $line['text']; } $newsinpage = 5; $_logic['content']['items'] = GetArticlesList( Array('orderby'=>'prior DESC', 'start'=>$start, 'itemsinpage'=>$newsinpage) ); $sql2 = "SELECT COUNT(id) AS ccc FROM $par->news2table WHERE `hide`=0"; $linkstr = GetSeoUrl('articles',0); $_logic['content']['pagerarr']=GetPager($sql2,$linkstr,$newsinpage); } ?>
<? if ($act=='articles') { $_logic['content']=Array(); if($id==0) { $sql = "SELECT * FROM $par->topmenutable WHERE `url`='/articles'"; $res = mysql_query($sql); if($line = mysql_fetch_array($res,MYSQL_ASSOC)) { $line = LangProcess($line); $_logic['content'] = $line; } } else $_logic['content'] = GetArticlesItem($id); $_logic['content']['allarticlesurl'] = GetSeoUrl('articles',0); $orderby = 'prior DESC'; $newsinpage = $varsline['articlesinpage']; $_logic['content']['items'] = GetArticlesList( Array('parentid'=>$id, 'orderby'=>$orderby, 'start'=>$start, 'itemsinpage'=>$newsinpage) ); $sql2 = "SELECT COUNT(id) AS ccc FROM $par->news1table WHERE `hide`=0"; $linkstr = GetSeoUrl('articles',$id); $_logic['content']['pagerarr']=GetPager($sql2,$linkstr,$newsinpage); } ?>