'."\n"; $TOKEN = 'NEWS'; $UPP = 10; if(!isset($_REQUEST['s']) || $_REQUEST['s'] == ''){$_FIRST_PAGE = true;} if((int)$_REQUEST['s'] != 0){$_REQUEST['s'] = (int)$_REQUEST['s'] -1;} ?>

Pocket PC News

fetch_assoc($sql -> query($query)); $total = $tmp['total']; if($_FIRST_PAGE){ $query = "SELECT content_title, content_headline, content_url, content_id FROM content WHERE content_type = 1 AND content_status = 1 ORDER BY content_id DESC LIMIT ".((int)$_REQUEST['s']*(int)$UPP).", ".(int)$UPP.";"; } else{ $query = "SELECT content_title, content_headline, content_url, content_id FROM content WHERE content_type = 1 AND content_status = 1 ORDER BY content_id ASC LIMIT ".((int)$_REQUEST['s']*(int)$UPP).", ".(int)$UPP.";"; } $news = new Listing($sql, $query); if($news){ if($_FIRST_PAGE){ foreach($news -> data as $n){ echo ''.$n['content_title'].''; echo strip_tags($n['content_headline'], '


  • '); echo '
    Read more...'; echo '

    '; } } else{ $tmp = ''; foreach($news -> data as $n){ $tmp = '

    '.$tmp; $tmp = '
    Read more...'.$tmp; $tmp = strip_tags($n['content_headline'], '


    • ').$tmp; $tmp = ''.$n['content_title'].''.$tmp; } echo $tmp; unset($tmp); } } // CREATE PAGINATION // ------------------------------------------------ if($total > ($UPP)){ echo '
        '; $pages = (int)($total/$UPP); if(($pages*$UPP) < $total){$pages++;} if($_FIRST_PAGE){ echo '
      • < older news
      • '; } else { if($pages > $_REQUEST['s'] && $_REQUEST['s'] != 0){ echo '
      • < older news
      • '; } echo '
      • Pocket PC news home
      • '; if($pages > $_REQUEST['s'] && ($_REQUEST['s']+1) != $pages){ echo '
      • next news >
      • '; } } echo '
      '; } } catch(Exception $e){echo showError($e);} ?>