'); if($_REQUEST['id']!="")dpBlog($_REQUEST['id']); else dpBlogFullList(); print(''); print(''); print('

'); if($_REQUEST['id']!="")dpBlogReview($_REQUEST['id']); else{ dpInterviewList(5); dpDJList(5); } print(''); } //======================================================= function dpBlogFullList(){ GLOBAL $db; //------------------------------------------------ $maxshown=5; $filter=""; //------------------------------------------------ $curpage=1; if(isset($_GET['st']))$curpage=$_GET['st']; $curpos=($curpage-1)*$maxshown+1; //------------------------------------------------ $maxrec=0; $result=mysql_query("select count(*) as cnt from cz_news where news_status=1",$db); if( ($rs=mysql_fetch_array($result))){ $maxrec=$rs['cnt'];} mysql_free_result($result); //------------------------------------------------ $cnt=0; $result=mysql_query("select n.*,t.nt_name,m.username from cz_news n,cz_news_type t,cz_members m where n.news_status=1 and n.nt_id=t.nt_id and n.mem_id=m.mem_id order by news_dt desc LIMIT ".($curpos-1).",".($maxshown),$db); $col=1; while( ($rs=mysql_fetch_array($result))){ if(++$col>1)$col=0; print(''); print('
'); print('
posted by '.$rs['username'].'
'); print(''.$rs['news_title'].'
'.$rs['nt_name'].' | '.fmtdate("l - F d, Y h:ia",$rs['news_dt'])); print('
'); print(''); print('

'.str_replace("\n","
",str_replace("
'); //if($rs['has_cmt']==1)print('
'); } mysql_free_result($result); if($maxrec>$maxshown)print('
'.writepages($maxrec,$maxshown,$curpage,"blog.php?").'

'); } //======================================================= function dpBlog($id){ GLOBAL $db; //------------------------------------------------ $maxshown=5; $filter=""; //------------------------------------------------ $curpage=1; if(isset($_GET['st']))$curpage=$_GET['st']; $curpos=($curpage-1)*$maxshown+1; //------------------------------------------------ $cnt=0; $result=mysql_query("select n.*,t.nt_name,m.username from cz_news n,cz_news_type t,cz_members m where n.news_status=1 and n.nt_id=t.nt_id and n.mem_id=m.mem_id and news_id=".$id,$db); if( ($rs=mysql_fetch_array($result))){ if(++$col>1)$col=0; print(''); print('
'); print('
posted by '.$rs['username'].'
'); print(''.$rs['news_title'].'
'.$rs['nt_name'].' | '.fmtdate("l - F d, Y h:ia",$rs['news_dt'])); print('
'); print(''); print('

'.str_replace("\n","
",str_replace("
'); print('
'); //if($rs['has_cmt']==1) } mysql_free_result($result); } //======================================================= function dpBlogReview($id){ GLOBAL $db,$gbMemID; divConfirm('confirmCmtDel','delete?','Delete','newsCmtDelete(document.fmconfirmCmtDel);'); ?> Comments
'); if($gbMemID==0){ print('

Please Login to comment


'); } else{ print('


'); print('
  
'); } print('

'); //------------------------------------------ print(''); } ?>