首页 > 作文

社区(php&&mysql)三

更新时间:2023-04-06 05:03:03 阅读: 评论:0

function prev_subj($id){

$droot=getenv(‘document_root’);

include(“sql.php3”);

$db=mysql_connect($sql[‘host’], $sql[‘ur’] , $sql[‘passwd’]);

$qstr=”lect id,aid from bbs_subj where id=’$id'”;

$rs=mysql_db_query($sql[‘db’],$qstr);

$row=mysql_fetch_array($rs);

$aid=$row[‘aid’];

$qstr=”lect id from bbs_subj where aid=’$aid’ order by wdate desc”;

$rs=mysql_db_query($sql[‘db’],$qstr);

$pid=$id;

while($row=mysql_fetch_array($rs)){

$tid=$row[‘id’];

if($id==$tid) break;

$pid=$tid;

}

return $pid;

}

// 絞

function next_subj($id){

$droot=getenv(‘document_root’);艹bxx

include(“sql.php3”);

$db=mysql_connect($sql[‘host’], $sql[‘ur’] , $sql[‘passwd’]);

$qstr=”lect id,aid from bbs_subj where id=’$id'”;

$rs=mysql_db_query($sql[‘db’],$qstr);

$row=mysql_fetch_array($rs);

$aid=$row[‘aid’];

$qstr=”lect id from bbs_subj where aid=’$aid’ order by wdate desc”;

$rs=mysql_db_query($sql[‘db’],$qstr);

$pid=$id;

while($row=mysql_fetch_array($rs)){

$pid=$row[‘id’];

if($id==$pid) break;

}

if($row=mysql_fetch_array($rs)) {

$pid=$row[‘id’];

}

return $pid;

}

//======================================================================

function viewbar() {

global $pgno;

global $php_lf;

global $aid,$sid;

//global $open_list;

echo “<table width=85% border=0 cellpadding=0 cellspacing=1 align=center align=center class=’num’>”;

echo “<tr><td align=center>”;

$nextid=next_subj($sid);

$previd=prev_subj($sid);

echo “<a href=$php_lf?aid=$aid&sid=$sid>[夹肈跋]</a>”;

echo “<a href=#re>[莱セ絞]</a>”;

echo “<a href=$php_lf?proc=view&aid=$aid>[祇穝ゅ彻]</a>”;

echo “<a href=$php_lf?proc=view&aid=$aid&sid=$nextid&rid=$nextid>[絞]</a>”;

echo “<a href=$php_lf?proc=view&aid=$aid&sid=$previd&rid=$previd>[絞]</a>”;

//echo “<a href=$php_lf?proc=view&pgno=$pgno&aid=$aid&sid=$previd&rid=$previd>[程絞]</a>”;

echo “</td>”;

echo “</tr></table>”;

}

//======================================================================

function view() {

global $php_lf,$aid,$sid,$rid;

global $c_poster,$c_email;

//echo “$php_lf,$aid,$sid,$rid,$pgno”;

$type=0; //秨穝杠肈

if($sid && $rid) {

addhitviews($sid,$rid);

$type=1; //莱

$db_table=”bbs_subj”;

if($sid!=$rid)$db_table=”bbs_docs”;

$droot=getenv(‘document_root’);

include(“sql.php3”);

$db=mysql_connect($sql[‘host’], $sql[‘ur’] , $sql[‘passwd’]);

$qstr=”lect banner from bbs_area where id=’$aid'”;

$rs=mysql_db_query($sql四氟化硅是气体吗[‘db’],$qstr);

echo mysql_error();

$row=mysql_fetch_array($rs);

$abanner=$row[‘banner’];

$qsql=”lect * from $db_table where id=’$rid’ “;

$rs=mysql_db_query($sql[‘db’],$qsql);

$row=mysql_fetch_array($rs);

$poster=$row[‘poster’];

$pip=$row[‘pip’];

$wdate=$row[‘wdate’];

$rebanner=$banner=$row[‘banner’];

$body=$row[‘body’];

$body=htmlspecialchars($body);

$pbody=ereg_replace(“n”,”<br>”,$body);

$pbody =preg_replace( “/[www *]([\x0-\xff]*?)[/www *]/”, ‘<a href=”\1″target=”_blank”>\1</a>’, $pbody );

$pbody =preg_replace( “/[www +([a-za-z0-9.:/_-]+)]([\x0-\xff]*?)[/www *]/”, ‘<a href=”\1″target=”_blank”>\2</a>’, $p什么是惯性body );

echo “<center>”;

echo &2016年万圣节#8220;<font color=green size=5><b>[$abanner]<br>”;

echo “$banner</b></font></center>”;

echo “<table border=0 width=95%align=center cellpadding=1 cellspacing=0 class=’tablefont’>”;

echo “<tr><td >”;

viewbar();

echo “</td></tr>”;

echo “<tr><td>”;

//====ゅ彻==============

echo “<table border=0 width=100%align=center cellpadding=1 cellspacing=0 class=’tablefont’>”;

echo “<tr>”;

echo “<tdwidth=’120′ align=’right’>”;

echo “:”;

echo “</td>”;

echo “<td align=’left’>”;

echo $poster;

echo “</td>”;

echo “</tr>”;

echo “<tr>”;

echo “<td width=’120′ align=’right’>”;

echo “ㄓ:”;

echo “</td>”;

echo “<td align=’left’>”;

echo $pip;

echo “</td>”;

echo “</tr>”;

echo “<tr>”;

echo “<td width=’120′ align=’right’ valign=’top’>”;

echo “ゅ彻ず甧:”;

echo “</td>”;

echo “<td valign=’top’ class=’bodycolor’ align=’left’>”;

echo $pbody;

echo “<hr size=1>”;

echo “</td>”;

echo “</tr>”;

echo “</td></tr>”;

echo “</table>”;

echo “<tr><td >”;

//=======籔狟ねだㄉ===============

echo “<table border=0 width=100%align=center cellpadding=3 cellspacing=0 class=’menufont’>”;

echo “<formname=mtab enctype=multipart/form-data method=post action=$php_lf?proc=mail_friend>”;

echo “<input type=’hidden’ name=sid value=’$sid’>”;

echo “&西安城市建设职业学院lt;input type=’hidden’ name=aid value=’$aid’>”;

echo “<input type=’hidden’ name=rid value=’$rid’>”;

echo “<input type=’hidden’ name=poster value=’$c_poster’>”;

echo “<input type=’hidden’ name=email value=’$c_email’>”;

echo “<tr>”;

echo “<td align=’right’ width=250>”;

echo “籔狟ねだㄉ硂絞ゅ彻:”;

echo “</td>”;

echo “<td>”;

echo “<input type=’text’ name=’frmail’ size=25 value=’ねe-mail’>”;

echo “<input type=’submit’value=’癳’>”;

echo “</td>”;

echo “</tr>”;

echo “</form>”;

echo “</table>”;

echo “</td></tr>”;

echo “<tr><td >”;

//=======mail list===============

echo “<table border=0 width=100%align=center cellpadding=3 cellspacing=0 class=’menufont’>”;

echo “<formname=mtab enctype=multipart/form-data method=post action=$php_lf?proc=mail_list>”;

echo “<input type=’hidden’ name=sid value=’$sid’>”;

echo “<input type=’hidden’ name=aid value=’$aid’>”;

echo “<input type=’hidden’ name=rid value=’$rid’>”;

echo “<input type=’hidden’ name=poster value=’$c_poster’>”;

echo “<input type=’hidden’ name=email value=’$c_email’>”;

echo “<tr >”;

echo “<td align=’right’ width=250>”;

echo “璹境o肈尿癚阶:”;

echo “</td>”;

echo “<td>”;

if(strlen($c_email)) $addmail=$c_email;

el $addmail=”e-mail”;

echo “<input type=’text’ name=’email’ size=25 value=’$addmail’>”;

echo “<input type=’submit’ name=’way1′ value=’璹?>”;

echo “<input type=’submit’ name=’way2′ value=’璹?>”;

$qsql=”lect id from bbs_sml where sid=’$sid'”;

$rs=mysql_db_query($sql[‘db’],$qsql);

$nums=mysql_num_rows($rs);

echo “<br>硂肈ヘ玡璹兢h计:$nums”;

echo “</td>”;

echo “</tr>”;

echo “</form>”;

echo “</table>”;

echo “</td></tr>”;

echo “<tr><td >”;

viewbar();

echo “</td></tr>”;

echo “</table>”;



待续……..

本文发布于:2023-04-06 05:03:00,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/zuowen/92dcabc365dbb0c0c0883d4fd16becad.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:社区(php&&mysql)三.doc

本文 PDF 下载地址:社区(php&&mysql)三.pdf

标签:西安   万圣节   城市建设   惯性
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图