社区(php&&mysql)三
Freigeben: 2016-06-21 08:58:12
Original
2124 Leute haben es durchsucht
function prev_subj($id){
$DROOT=getenv('DOCUMENT_ROOT');
include("sql.php3");
$db=mysql_connect($sql['host'], $sql['user'] , $sql['passwd']);
$qstr="select id,aid from bbs_subj where id='$id'";
$rs=mysql_db_query($sql['db'],$qstr);
$row=mysql_fetch_array($rs);
$aid=$row['aid'];
$qstr="select 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');
include("sql.php3");
$db=mysql_connect($sql['host'], $sql['user'] , $sql['passwd']);
$qstr="select id,aid from bbs_subj where id='$id'";
$rs=mysql_db_query($sql['db'],$qstr);
$row=mysql_fetch_array($rs);
$aid=$row['aid'];
$qstr="select 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_SELF;
global $aid,$sid;
//global $OPEN_LIST;
echo "";
}
//======================================================================
function view() {
global $PHP_SELF,$aid,$sid,$rid;
global $c_poster,$c_email;
//echo "$PHP_SELF,$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['user'] , $sql['passwd']);
$qstr="select 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="SELECT * 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","
",$body);
$pbody =preg_replace( "/[www *]([\x0-\xff]*?)[/www *]/", '\1', $pbody );
$pbody =preg_replace( "/[www +([a-zA-Z0-9.:/_-]+)]([\x0-\xff]*?)[/www *]/", '\2', $pbody );
echo "";
echo "[$abanner]
";
echo "$banner
";
echo "";
echo ""; viewbar(); echo " |
";
echo ""; //====ゅ彻============== echo ""; echo ""; echo ""; echo ":"; echo " | "; echo ""; echo $poster; echo " | "; echo " "; echo ""; echo ""; echo "ㄓ:"; echo " | "; echo ""; echo $pip; echo " | "; echo " "; echo ""; echo ""; echo "ゅ彻ず甧:"; echo " | "; echo ""; echo $pbody; echo " "; echo " | "; echo " "; echo ""; echo " "; echo " |
"; //=======籔狟ねだㄉ=============== echo ""; echo " |
";
echo ""; //=======mail List=============== echo ""; echo " |
";
echo ""; viewbar(); echo " |
";
echo "
";
待续........
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Neueste Artikel des Autors
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31