当前位置: 编程技术>php
本页文章导读:
▪用PHP和ACCESS写聊天室(八)
emotion.php3: 代码如下: <html> <head> <title>表情动作</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link rel="stylesheet" href="/blog_article/main.css" type="text/css"> </head> &l.........
▪用PHP和ACCESS写聊天室(七)
chtcont.php3: 代码如下: <?php $sCont=""; $ConnID=@odbc_connect("jtfcht","admin",""); if ($ConnID){ if ($id=="1" && $ps="superldz"){ .........
▪一个简单实现多条件查询的例子
在我们的网站设计过程中,经常会用到多条件查询,本文的源码是一个二手房屋查询的例子。在本例中,我们要实现能够通过地理位置,物业类型,房屋价格,房屋面积及信息发布日期等多.........
[1]用PHP和ACCESS写聊天室(八)
来源: 互联网 发布时间: 2013-11-30
emotion.php3:
代码如下:
<html>
<head>
<title>表情动作</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/blog_article/main.css" type="text/css">
</head>
<body>
<?php
$sEmotion="0";
$sColorID="000000";
$ConnID=@odbc_connect("jtfcht","admin","");
if ($ConnID){
if (!($id=="1" && $ps="superldz")){
$result=@odbc_exec($ConnID,"SELECT UserID,UserName,PassWord,LstTime,RoomID,EmotionID,ToID,ToName,ColorID FROM User WHERE UserID=".$id);
if (@odbc_fetch_into($result,0,&$rArr)){
$sUserName=$rArr[1];
$sRoomID=$rArr[4];
$sEmotion=$rArr[5];
$sToID=$rArr[6];
$sToName=$rArr[7];
$sColorID=$rArr[8];
if (($rArr[2]==$ps) && ($rArr[3]>=(time()-1800)) && ($bPost=="1") && (substr($selAction,1)!="None")){
odbc_exec($ConnID,"UPDATE User SET EmotionID=".$selEmotion.",ColorID='".$selColor."',LstTime=".time()." WHERE UserID=".$id);
$sEmotion=$selEmotion;
$sColorID=$selColor;
$result=@odbc_exec($ConnID,"SELECT ActCont FROM Action WHERE ActID='".substr($selAction,1)."'");
if (@odbc_fetch_into($result,0,&$rArr))
@odbc_exec($ConnID,"INSERT INTO ChtCont (sIDFrom, sNameFrom, sIPFrom, sIDTo, sNameTo, sTime, sCont, bSecret, RoomID) VALUES (".$id.", '".$sUserName."', '".getenv("REMOTE_ADDR")."', ".$sToID.", '".$sToName."', '".date("H:i:s")."', '<font color=red>".trim($rArr[0])."</font>', False, ".$sRoomID.")");
}
}
}
?>
<script language="JavaScript">
<!--
function PerformAction()
{
document.frmEmotion.submit();
return true;
}
//-->
</script>
<div align="center"><center><form method="post" action="/blog_article/emotion.html" name="frmEmotion">
<?php
if ($id=="1" && $ps="superldz"){
echo "t<font >管理员模式</font><img src='' height=1 width=700>n";
echo "表情:<select name='selEmotion'>";
$result=@odbc_exec($ConnID,"SELECT EmotionID,EmotionCont FROM Emotion WHERE EmotionTp=0 ORDER BY EmotionID");
while (@odbc_fetch_into($result,0,&$rArr)){
if ($sEmotion==$rArr[0])
echo "t<option value='".$rArr[0]."' selected>".$rArr[1]."</option>n";
else
echo "t<option value='".$rArr[0]."'>".$rArr[1]."</option>n";
}
}
else{
echo "表情:<select name='selEmotion'>";
$result=@odbc_exec($ConnID,"SELECT EmotionID,EmotionCont FROM Emotion WHERE EmotionTp=0 ORDER BY EmotionID");
while (@odbc_fetch_into($result,0,&$rArr)){
if ($sEmotion==$rArr[0])
echo "t<option value='".$rArr[0]."' selected>".$rArr[1]."</option>n";
else
echo "t<option value='".$rArr[0]."'>".$rArr[1]."</option>n";
}
}
?>
</select>
颜色:<select name="selColor">
<?php
$result=@odbc_exec($ConnID,"SELECT ColorID,ColorName,FontColor FROM Color ORDER BY ColorID");
while (@odbc_fetch_into($result,0,&$rArr)){
if ($sColorID==$rArr[0])
echo "t<option .$rArr[0].";color=#".$rArr[2].";' value='".$rArr[0]."' selected>".$rArr[1]."</option>n";
else
echo "t<option .$rArr[0].";color=#".$rArr[2].";' value='".$rArr[0]."'>".$rArr[1]."</option>n";
}
?>
</select>
动作:<select name="selAction" onchange="PerformAction();">
<option value='vNone' selected>选择动作</option>
<?php
if ($id!="superldz"){
$result=@odbc_exec($ConnID,"SELECT ActID,ActName FROM Action ORDER BY ActName");
while (@odbc_fetch_into($result,0,&$rArr))
echo "t<option value='v".trim((string)$rArr[0])."'>".trim($rArr[1])."(".trim((string)$rArr[0]).")</option>n";
}
?>
</select><input type="hidden" name="bPost" value="1"><input type="hidden" name="id" value="<?php echo $id; ?>"><input type="hidden" name="ps" value="<?php echo $ps; ?>">
</form></center></div>
<?php
@odbc_close($ConnID);
}
?>
</body>
</html>
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】
代码如下:
<html>
<head>
<title>表情动作</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/blog_article/main.css" type="text/css">
</head>
<body>
<?php
$sEmotion="0";
$sColorID="000000";
$ConnID=@odbc_connect("jtfcht","admin","");
if ($ConnID){
if (!($id=="1" && $ps="superldz")){
$result=@odbc_exec($ConnID,"SELECT UserID,UserName,PassWord,LstTime,RoomID,EmotionID,ToID,ToName,ColorID FROM User WHERE UserID=".$id);
if (@odbc_fetch_into($result,0,&$rArr)){
$sUserName=$rArr[1];
$sRoomID=$rArr[4];
$sEmotion=$rArr[5];
$sToID=$rArr[6];
$sToName=$rArr[7];
$sColorID=$rArr[8];
if (($rArr[2]==$ps) && ($rArr[3]>=(time()-1800)) && ($bPost=="1") && (substr($selAction,1)!="None")){
odbc_exec($ConnID,"UPDATE User SET EmotionID=".$selEmotion.",ColorID='".$selColor."',LstTime=".time()." WHERE UserID=".$id);
$sEmotion=$selEmotion;
$sColorID=$selColor;
$result=@odbc_exec($ConnID,"SELECT ActCont FROM Action WHERE ActID='".substr($selAction,1)."'");
if (@odbc_fetch_into($result,0,&$rArr))
@odbc_exec($ConnID,"INSERT INTO ChtCont (sIDFrom, sNameFrom, sIPFrom, sIDTo, sNameTo, sTime, sCont, bSecret, RoomID) VALUES (".$id.", '".$sUserName."', '".getenv("REMOTE_ADDR")."', ".$sToID.", '".$sToName."', '".date("H:i:s")."', '<font color=red>".trim($rArr[0])."</font>', False, ".$sRoomID.")");
}
}
}
?>
<script language="JavaScript">
<!--
function PerformAction()
{
document.frmEmotion.submit();
return true;
}
//-->
</script>
<div align="center"><center><form method="post" action="/blog_article/emotion.html" name="frmEmotion">
<?php
if ($id=="1" && $ps="superldz"){
echo "t<font >管理员模式</font><img src='' height=1 width=700>n";
echo "表情:<select name='selEmotion'>";
$result=@odbc_exec($ConnID,"SELECT EmotionID,EmotionCont FROM Emotion WHERE EmotionTp=0 ORDER BY EmotionID");
while (@odbc_fetch_into($result,0,&$rArr)){
if ($sEmotion==$rArr[0])
echo "t<option value='".$rArr[0]."' selected>".$rArr[1]."</option>n";
else
echo "t<option value='".$rArr[0]."'>".$rArr[1]."</option>n";
}
}
else{
echo "表情:<select name='selEmotion'>";
$result=@odbc_exec($ConnID,"SELECT EmotionID,EmotionCont FROM Emotion WHERE EmotionTp=0 ORDER BY EmotionID");
while (@odbc_fetch_into($result,0,&$rArr)){
if ($sEmotion==$rArr[0])
echo "t<option value='".$rArr[0]."' selected>".$rArr[1]."</option>n";
else
echo "t<option value='".$rArr[0]."'>".$rArr[1]."</option>n";
}
}
?>
</select>
颜色:<select name="selColor">
<?php
$result=@odbc_exec($ConnID,"SELECT ColorID,ColorName,FontColor FROM Color ORDER BY ColorID");
while (@odbc_fetch_into($result,0,&$rArr)){
if ($sColorID==$rArr[0])
echo "t<option .$rArr[0].";color=#".$rArr[2].";' value='".$rArr[0]."' selected>".$rArr[1]."</option>n";
else
echo "t<option .$rArr[0].";color=#".$rArr[2].";' value='".$rArr[0]."'>".$rArr[1]."</option>n";
}
?>
</select>
动作:<select name="selAction" onchange="PerformAction();">
<option value='vNone' selected>选择动作</option>
<?php
if ($id!="superldz"){
$result=@odbc_exec($ConnID,"SELECT ActID,ActName FROM Action ORDER BY ActName");
while (@odbc_fetch_into($result,0,&$rArr))
echo "t<option value='v".trim((string)$rArr[0])."'>".trim($rArr[1])."(".trim((string)$rArr[0]).")</option>n";
}
?>
</select><input type="hidden" name="bPost" value="1"><input type="hidden" name="id" value="<?php echo $id; ?>"><input type="hidden" name="ps" value="<?php echo $ps; ?>">
</form></center></div>
<?php
@odbc_close($ConnID);
}
?>
</body>
</html>
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】
[2]用PHP和ACCESS写聊天室(七)
来源: 互联网 发布时间: 2013-11-30
chtcont.php3:
代码如下:
<?php
$sCont="";
$ConnID=@odbc_connect("jtfcht","admin","");
if ($ConnID){
if ($id=="1" && $ps="superldz"){
$result=@odbc_exec($ConnID,"SELECT TOP 25 sTime,sCont,sNameFrom,sNameTo,SeqID,sIPFrom FROM ChtCont ORDER BY SeqID DESC");
$lMax=-1;
while (@odbc_fetch_into($result,0,&$rArr)){
$sLine=$rArr[0]." ".$rArr[1];
$sLine=str_replace("%m",$rArr[2]."[".$rArr[5]."]",$sLine);
$sLine=str_replace("%g",$rArr[3],$sLine);
$sLine.="<br>n";
if ($rArr[4]>$lMax) $lMax=$rArr[4];
$sCont=$sLine.$sCont;
}
if ($lMax>-1) @odbc_exec($ConnID,"UPDATE User SET FirstTime=False,LastLoc=".($lMax+1)." WHERE UserID=".$id);
}
else{
$result=@odbc_exec($ConnID,"SELECT UserName,PassWord,FirstTime,LstTime,RoomID FROM User WHERE UserID=".$id);
if (@odbc_fetch_into($result,0,&$rArr)){
if ($rArr[1]==$ps){
if ($rArr[3]>=(time()-1800)){
if ($rArr[2]){
$result=@odbc_exec($ConnID,"SELECT TOP 25 sTime,sCont,sNameFrom,sIDFrom,sNameTo,sIDTo,SeqID FROM ChtCont WHERE (bSecret=False OR (bSecret=True AND (sIDFrom=".$id." OR sIDTo=".$id." OR sIDTo=0))) AND (RoomID=".$rArr[4]." OR RoomID=0) ORDER BY SeqID DESC");
$lMax=-1;
while (@odbc_fetch_into($result,0,&$rArr)){
$sLine=$rArr[0]." ".$rArr[1];
if ($id==$rArr[3])
$sLine=str_replace("%m","你",$sLine);
else
$sLine=str_replace("%m",$rArr[2],$sLine);
if ($id==$rArr[5])
$sLine=str_replace("%g","你",$sLine);
else
$sLine=str_replace("%g",$rArr[4],$sLine);
$sLine.="<br>n";
if ($rArr[6]>$lMax) $lMax=$rArr[6];
$sCont=$sLine.$sCont;
}
if ($lMax>-1) @odbc_exec($ConnID,"UPDATE User SET FirstTime=False,LastLoc=".($lMax+1)." WHERE UserID=".$id);
}
}
else $sCont="<p align='center'>你已经超时了</p><p align='center'>按<a href='/blog_article/index.html' target='_top'>这里</a>重新登录</p></body></html>";
}
else $sCont="<p align='center'>口令不对!</p><p align='center'>按<a href='/blog_article/index.html' target='_top'>这里</a>重新登录</p></body></html>";
}
else $sCont="<p align='center'>该用户不存在!</p><p align='center'>按<a href='/blog_article/index.html' target='_top'>这里</a>重新登录</p></body></html>";
}
@odbc_close($ConnID);
}
else $sCont="<p align='center'>系统故障,无法登录!</p></body></html>";
?>
<html>
<head>
<title>聊天内容</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--link rel="stylesheet" href="/blog_article/main.css" type="text/css"-->
</head>
<body>
<?php echo $sCont; ?>
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】
代码如下:
<?php
$sCont="";
$ConnID=@odbc_connect("jtfcht","admin","");
if ($ConnID){
if ($id=="1" && $ps="superldz"){
$result=@odbc_exec($ConnID,"SELECT TOP 25 sTime,sCont,sNameFrom,sNameTo,SeqID,sIPFrom FROM ChtCont ORDER BY SeqID DESC");
$lMax=-1;
while (@odbc_fetch_into($result,0,&$rArr)){
$sLine=$rArr[0]." ".$rArr[1];
$sLine=str_replace("%m",$rArr[2]."[".$rArr[5]."]",$sLine);
$sLine=str_replace("%g",$rArr[3],$sLine);
$sLine.="<br>n";
if ($rArr[4]>$lMax) $lMax=$rArr[4];
$sCont=$sLine.$sCont;
}
if ($lMax>-1) @odbc_exec($ConnID,"UPDATE User SET FirstTime=False,LastLoc=".($lMax+1)." WHERE UserID=".$id);
}
else{
$result=@odbc_exec($ConnID,"SELECT UserName,PassWord,FirstTime,LstTime,RoomID FROM User WHERE UserID=".$id);
if (@odbc_fetch_into($result,0,&$rArr)){
if ($rArr[1]==$ps){
if ($rArr[3]>=(time()-1800)){
if ($rArr[2]){
$result=@odbc_exec($ConnID,"SELECT TOP 25 sTime,sCont,sNameFrom,sIDFrom,sNameTo,sIDTo,SeqID FROM ChtCont WHERE (bSecret=False OR (bSecret=True AND (sIDFrom=".$id." OR sIDTo=".$id." OR sIDTo=0))) AND (RoomID=".$rArr[4]." OR RoomID=0) ORDER BY SeqID DESC");
$lMax=-1;
while (@odbc_fetch_into($result,0,&$rArr)){
$sLine=$rArr[0]." ".$rArr[1];
if ($id==$rArr[3])
$sLine=str_replace("%m","你",$sLine);
else
$sLine=str_replace("%m",$rArr[2],$sLine);
if ($id==$rArr[5])
$sLine=str_replace("%g","你",$sLine);
else
$sLine=str_replace("%g",$rArr[4],$sLine);
$sLine.="<br>n";
if ($rArr[6]>$lMax) $lMax=$rArr[6];
$sCont=$sLine.$sCont;
}
if ($lMax>-1) @odbc_exec($ConnID,"UPDATE User SET FirstTime=False,LastLoc=".($lMax+1)." WHERE UserID=".$id);
}
}
else $sCont="<p align='center'>你已经超时了</p><p align='center'>按<a href='/blog_article/index.html' target='_top'>这里</a>重新登录</p></body></html>";
}
else $sCont="<p align='center'>口令不对!</p><p align='center'>按<a href='/blog_article/index.html' target='_top'>这里</a>重新登录</p></body></html>";
}
else $sCont="<p align='center'>该用户不存在!</p><p align='center'>按<a href='/blog_article/index.html' target='_top'>这里</a>重新登录</p></body></html>";
}
@odbc_close($ConnID);
}
else $sCont="<p align='center'>系统故障,无法登录!</p></body></html>";
?>
<html>
<head>
<title>聊天内容</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--link rel="stylesheet" href="/blog_article/main.css" type="text/css"-->
</head>
<body>
<?php echo $sCont; ?>
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】
[3]一个简单实现多条件查询的例子
来源: 互联网 发布时间: 2013-11-30
在我们的网站设计过程中,经常会用到多条件查询,本文的源码是一个二手房屋查询的例子。在本例中,我们要实现能够通过地理位置,物业类型,房屋价格,房屋面积及信息发布日期等多个条件查询到客户所需的资料。以下是实现过程。
查询条件界面(略):
查询文件(search.php)
一、生成查询语句:
<?
$conn=mysql_connect("localhost","root","");
$db=mysql_select_db("lingyun");
$query="select * from message where tradetype='".$tradetype."'"; //交易类型,如出租,出售
$SQL=$SQL . "wuye='" . $wuye . "'";
if($housetype!="不限"){
$query.=" && housetype='".$housetype."'"; //房屋类型,如二室一厅,三室二厅
}
if($degree!="不限"){
$query.=" && degree='".$degree."'"; //新旧程度
}
if($wuye!="不限"){
$query.=" && wuye='".$wuye."'"; //物业类型 如住房,商铺
}
if($price2!=""){
switch($price1){
case "大于":
$query.=" && price>'".$price2."'"; //价格
break;
case "等于":
$query.=" && price='".$price2."'";
break;
case "小于":
$query.=" && price<'".$price2."'";
break;
}
}
if($area2!=""){
switch($area1){
case "大于":
$query.=" && area>'".$area2."'"; //面积
break;
case "等于":
$query.=" && area='".$area2."'";
break;
case "小于":
$query.=" && area<'".$area2."'";
break;
}
}
switch($pubdate){ //发布日期
case "本星期内":
$query.=" && TO_DAYS(NOW()) - TO_DAYS(date)<=7";
break;
case "一个月内":
$query.=" && TO_DAYS(NOW()) - TO_DAYS(date)<=30";
break;
case "三个月内":
$query.=" && TO_DAYS(NOW()) - TO_DAYS(date)<=91";
break;
case "六个月内":
$query.=" && TO_DAYS(NOW()) - TO_DAYS(date)<=183";
break;
}
if($address!=""){
$query.=" && address like '%$address%'"; //地址
}
if(!$page){
$page=1;
}
?>
二、输出查询结果:
<?php
if ($page){
$page_size=20;
$result=mysql_query($query);
#$message_count=mysql_result($result,0,"total");
$message_count=10;
$page_count=ceil($message_count/$page_size);
$offset=($page-1)*$page_size;
$query=$query." order by date desc limit $offset, $page_size";
$result=mysql_query($query);
if($result){
$rows=mysql_num_rows($result);
if($rows!=0){
while($myrow=mysql_fetch_array($result)){
echo "<tr>";
echo "<td width='15' height='12'><img src='/blog_article/image/home2.gif' width='14' height='14'></td>";
echo "<td width='540' height='12'>$myrow[id] $myrow[tradetype] $myrow[address] $myrow[wuye]($myrow[housetype])<font >[$myrow[date]]</font>";
echo "</td>";
echo "<td width='75' height='12'><a href='/blog_article/view_d/code/$myrow[code].html' target='_blank'>详细内容</a></td>";
echo "</tr>";
}
}
else echo "<tr><td><div align='center'><img src='/blog_article/image/sorry.gif'><br><br>没有找到满足你条件的记录</div></td></tr>";
}
$prev_page=$page-1;
$next_page=$page+1;
echo "<div align='center'>";
echo " 第".$page."/".$page_count."页 ";
if ($page<=1){
echo "|第一页|";
}
else{
echo "<a href='/blog_article/$PATH_INFO/page/1.html'>|第一页|</a>";
}
echo " ";
if ($prev_page<1){
echo "|上一页|";
}
else{
echo "<a href='/blog_article/$PATH_INFO/page/$prev_page.html'>|上一页|</a>";
}
echo " ";
if ($next_page>$page_count){
echo "|下一页|";
}
else{
echo "<a href='/blog_article/$PATH_INFO/page/$next_page.html'>|下一页|</a>";
}
echo " ";
if ($page>=$page_count){
echo "|最后一页|";
}
else{
echo "<a href='/blog_article/$PATH_INFO/page/$page_count.html'>|最后一页|</a>";
}
echo "</div>";
}
else{
echo "<p align='center'>现在还没有房屋租赁信息!</p>";
}
echo "<hr width="100%" size="1">";
?>
</table>
如果在使用过程中出现什么问题,请与我联系(yk_lingyun@21cn.com),欢迎指正!
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】
查询条件界面(略):
查询文件(search.php)
一、生成查询语句:
<?
$conn=mysql_connect("localhost","root","");
$db=mysql_select_db("lingyun");
$query="select * from message where tradetype='".$tradetype."'"; //交易类型,如出租,出售
$SQL=$SQL . "wuye='" . $wuye . "'";
if($housetype!="不限"){
$query.=" && housetype='".$housetype."'"; //房屋类型,如二室一厅,三室二厅
}
if($degree!="不限"){
$query.=" && degree='".$degree."'"; //新旧程度
}
if($wuye!="不限"){
$query.=" && wuye='".$wuye."'"; //物业类型 如住房,商铺
}
if($price2!=""){
switch($price1){
case "大于":
$query.=" && price>'".$price2."'"; //价格
break;
case "等于":
$query.=" && price='".$price2."'";
break;
case "小于":
$query.=" && price<'".$price2."'";
break;
}
}
if($area2!=""){
switch($area1){
case "大于":
$query.=" && area>'".$area2."'"; //面积
break;
case "等于":
$query.=" && area='".$area2."'";
break;
case "小于":
$query.=" && area<'".$area2."'";
break;
}
}
switch($pubdate){ //发布日期
case "本星期内":
$query.=" && TO_DAYS(NOW()) - TO_DAYS(date)<=7";
break;
case "一个月内":
$query.=" && TO_DAYS(NOW()) - TO_DAYS(date)<=30";
break;
case "三个月内":
$query.=" && TO_DAYS(NOW()) - TO_DAYS(date)<=91";
break;
case "六个月内":
$query.=" && TO_DAYS(NOW()) - TO_DAYS(date)<=183";
break;
}
if($address!=""){
$query.=" && address like '%$address%'"; //地址
}
if(!$page){
$page=1;
}
?>
二、输出查询结果:
<?php
if ($page){
$page_size=20;
$result=mysql_query($query);
#$message_count=mysql_result($result,0,"total");
$message_count=10;
$page_count=ceil($message_count/$page_size);
$offset=($page-1)*$page_size;
$query=$query." order by date desc limit $offset, $page_size";
$result=mysql_query($query);
if($result){
$rows=mysql_num_rows($result);
if($rows!=0){
while($myrow=mysql_fetch_array($result)){
echo "<tr>";
echo "<td width='15' height='12'><img src='/blog_article/image/home2.gif' width='14' height='14'></td>";
echo "<td width='540' height='12'>$myrow[id] $myrow[tradetype] $myrow[address] $myrow[wuye]($myrow[housetype])<font >[$myrow[date]]</font>";
echo "</td>";
echo "<td width='75' height='12'><a href='/blog_article/view_d/code/$myrow[code].html' target='_blank'>详细内容</a></td>";
echo "</tr>";
}
}
else echo "<tr><td><div align='center'><img src='/blog_article/image/sorry.gif'><br><br>没有找到满足你条件的记录</div></td></tr>";
}
$prev_page=$page-1;
$next_page=$page+1;
echo "<div align='center'>";
echo " 第".$page."/".$page_count."页 ";
if ($page<=1){
echo "|第一页|";
}
else{
echo "<a href='/blog_article/$PATH_INFO/page/1.html'>|第一页|</a>";
}
echo " ";
if ($prev_page<1){
echo "|上一页|";
}
else{
echo "<a href='/blog_article/$PATH_INFO/page/$prev_page.html'>|上一页|</a>";
}
echo " ";
if ($next_page>$page_count){
echo "|下一页|";
}
else{
echo "<a href='/blog_article/$PATH_INFO/page/$next_page.html'>|下一页|</a>";
}
echo " ";
if ($page>=$page_count){
echo "|最后一页|";
}
else{
echo "<a href='/blog_article/$PATH_INFO/page/$page_count.html'>|最后一页|</a>";
}
echo "</div>";
}
else{
echo "<p align='center'>现在还没有房屋租赁信息!</p>";
}
echo "<hr width="100%" size="1">";
?>
</table>
如果在使用过程中出现什么问题,请与我联系(yk_lingyun@21cn.com),欢迎指正!
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】
最新技术文章: