###############index.php######################
require"./inc/func.php";
mscon();
require "./inc/header.inc";
?>
<表幅="100%" ボーダー="0" セルスペース="0" セルパディング="0">
|
$type=trim($type);
if($comm)
{
$sec="and comm=1";
$fir="where comm=1";
}
if(!empty($type))
$query="select count(*) from $table where type='$type' $sec";
else
$query="$table $fir から count(*) を選択";
$res=mysql_db_query("$database",$query);
if(@mysql_num_rows($res)>0)
$tot=mysql_fetch_array($res);
$total=$tot[0];
$total_page=ceil($total/$pagenum);
echo "
";
echo "共:".$total."篇".$total_page."页 |
";
if(empty($page))
$page=0;
if(empty($offset))
$offset=0;
$offset=$pagenum*$page;
if(!empty($type))
$query="select * from $table where type='$type' $sec order by id desc limit $offset,$pagenum";
else
$query="select * from $table $fir order by id desc limit $offset,$pagenum";
$res=mysql_db_query("$database",$query);
if(@mysql_num_rows($res)>0)
while($topic=mysql_fetch_array($res))
{
if(strlen($topic[title])>40)
{
$topic[title]=substr($topic[title],0,40) ;
$topic[タイトル]=$topic[タイトル]."....";
}
if(trim($topic[time])==date(Y年m月d日))
$topic[time]="$topic[時間]";
echo" [$topic[type]]$topic[title]($topic[time])"; if($topic[comm]==1) echo ""; if($topic[locked]==1) echo ""; echo " |
阅读:$topic[hits] 次;评论:$topic[p_num]次 |
";
}
else
echo "申し訳ありませんが、この列にはまだ記事がありません!!!";
echo "
";
< br>
inc/footer.inc";?>
###################read_article.php############### ########### #
require"./inc/func.php";
if(!$id)
{
echo" <script>window.close();< ;/script>"; <br> exit(); <br>} <br>mscon(); <br>$query="select * from $table where id= '$id'"; <br>$res =mysql_db_query("$database",$query); <br>if(!$res) <br> { <br> echo "この記事は削除されているか、この記事はありません!!"; <br> exit(); <br> } <br>$data=mysql_fetch_array($res); <br>add_hits($data[id]); <br>$pre=$data[id] -1; <br>$next=$data; <br><HTML> <br><br>< "$data[タイトル]--[$data [タイプ]]";?> <br></TITLE> <br><META http-equiv=Content-Type content="text/html; charset= gb2312"> <br><style type =text/css> <br><!-- <br>body,table,td,input,textarea { font-family: "宋体"; font-size: 9pt } <br>select { font-family: "宋体"; font-size: 9pt} <br>code {font-family: "Courier" ; font-size: 10pt} <br>a { color: #005500} <br>a:ホバー { color: #CC0000} <br>.border {border: 1px #000000 solid; background-color:transparent; list-style-position: inside; list-style-type: square} <br>--> <br></style> <br><script language="javascript"> <br>function name() <br>{ <br> var theResult = true; <br> var elem4 = null; <br><br> if (document.forms[0].elements[0].value == "" || document.forms[0].elements[0].value == "undefined" || document.forms[0].elements[0].value == "null") <br> { <br> elem4 = prompt("请输入您的姓名:",""); <br> theResult = false; <br> document.forms[0].elements[0].value = elem4; <br> } <br> return theResult; <br>} <br>function mail() <br>{ <br> var theResult = true; <br> var elem1 = null <br> if ((document.forms[0].elements[1].value.indexOf('@') == -1 || document.forms[0].elements[1].value == "" || document.forms[0].elements[1].value.indexOf('.') == -1)) <br> { <br> elem1 = prompt("请输入您的正确的电子邮件地址。谢谢!!",""); <br> theResult = false; <br> document.forms[0].elements[1].value = elem1; <br> } <br> return theResult; <br>} <br>function go() <br>{ <br>var theResult=true; <br>theResult = name()&&mail(); <br>return theResult; <br>} <br></script>
cellPadding=0 align=center borderColorLight=#000000 border=1 width=545>
|
|
if($data[locked]<>0) { echo "对不起!本文已经被管理员锁定!"; } else if($data[html]==1) highlight_string($data[cont]); else echo nl2br($data[cont]); ?> |
cellpadding=0 align=center bordercolorlight=#000000 border=1 width=545>
发表评论 |
|
🎜>
;
$query="select * from $ping_tab where p_id='$id' order by time desc";クエリ); if(mysql_num_rows($res)>0) {$i=1; while($ping=mysql_fetch_array($res)) echo " コメント者: $ping[名前] 電子メール: $ping[mail] ".nl2br($ping[p_cont])." 時刻: $ping[time] 差出人: $ping[ip] n" ; } else echo "現在、この記事に関連するコメントはありません!"; ?> |
href="javascript:window.close()" >ウィンドウを閉じる< /a> |
inc/フッター.inc";?>