<?php 

require "../Run.php";
require "../include/page.inc.php";

$sql="SELECT htmlid,userid,title,content,bz,v,time,gro FROM html WHERE htmlid='{$_GET['id']}'";
$view = mysql_query($sql);
if($view && mysql_num_rows($view)>0){
list($articleid,$userid,$title,$content,$bz,$v,$time,$gro) = mysql_fetch_row($view);
}else{
$tip="抱歉 内容获取失败";
}
/*访问量统计*/
$vs=$v+1;
$sql="UPDATE html SET v='{$vs}' WHERE htmlid='{$_GET["id"]}'";
$result=mysql_query($sql);
if($result && mysql_affected_rows()>0){
}
$title = $title; 
//统计字数
function utf8_strlen($string = null) {
preg_match_all("/./us", $string, $match);
return count($match[0]);
}
$content = htmlspecialchars_decode($content);
$html='
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>'.$title.'</title>'.$css.'</head>
<body>'.$wap_top.$content.'<div class="mylink">
<a href="list.php?&cid='.$gro.'&">返回上级</a><a href="../index.php?">返回首页</a></div>
'.$wap_bottom.'</body></html>';
//输出
echo UBB($html,$wapid);