=convert(char(8),getdate(),112) group by t.Serial, t.Name, m.Serial, m.Title, m.Source, convert(char(10),m.STime,120), convert(char(10),m.ETime,120), v.IdvName, convert(char(10),m.Created,120) order by STime DESC"; //分页 $result = mssql_query($Sql); $numrows = mssql_num_rows($result); $page_size=10;//单页N笔 $offset = $_REQUEST['offset'] == "" ? 0 : $_REQUEST['offset'];//第N笔 $page_select = pages($numrows, $offset, $page_size,"typeserial=".$_GET['typeserial'],"manu", 2); //(总笔数,第N页,单页N笔,URL,CSS,显示模式) //列表 $news_list = getValueList($Sql,$_GET['page'],$page_size); //print '
'. print_r($news_list, TRUE) .'
'; $smarty->assign('PAGE_SELECT', $page_select); $smarty->assign('getValue', $news_list); }elseif ($_GET['state'] == "view" && $_GET['no'] !=""){ $news_content = getMsgContent($_GET['no']); //print '
'. print_r($news_content, TRUE) .'
'; //$Http=($_SERVER["SERVER_ADDR"]=='10.1.2.198'||$_SERVER["SERVER_ADDR"]=='')?'channel.wpgcnc.com':$_SERVER['HTTP_HOST']; if(isRealIpInternal()){ $Http='channel.wpgcnc.com'; }else{ $Http=$_SERVER['HTTP_HOST']; } $news_content['MsgContent']=str_replace('src="/channel/File','src="http://'.$Http.'/channel/File',$news_content['MsgContent']); $smarty->assign('MSGTITLE', $news_content['MsgTitle']); $smarty->assign('CREATED', $news_content['Created']); $smarty->assign('STIME', $news_content['STime']); $smarty->assign('MSGCONTENT', $news_content['MsgContent']); }else{ } }else{ $smarty->assign('ERROR', "非法访问!"); } $smarty->assign('STATE', $_GET['state']); $smarty->assign('TYPESERIAL', $_GET['typeserial']); $smarty->assign('NEWSTIT', $newsTit); $smarty->assign('PCITITNAME', $pciTitName); $smarty->display('news.tpl'); require_once("footer.php"); ?>