php 前台页面发布数据库(实例二 文本版)

这是一个展示物品租赁信息的网页,通过PHP脚本从数据库获取物品详情并展示租金、押金等信息,同时推荐热门租赁产品。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<?
session_start();
if($_SESSION['Company']=='' or $_SESSION['MemberId']=='')
{
 //exit();
}

$path = dirname(__FILE__);
require_once($path.'/../../Module/Factory.php');
$Factory = new Factory();
$BLL_Trade = $Factory->FactoryTrade();
$Infor = new Infor();

$Page = new Page();
if ($_GET['Page'] == '')
{
 $Page->Page = 0;
}
else
{
 $Page->Page = $_GET['Page'];
}
$Page->Pager = 10;
try {
 $InforList = $BLL_Trade->PageScanInfor($Infor,$Page);
}
catch (Exception $Err){
 echo $Err->getMessage() ;
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>灵风换客--物品浏览</title>
<link type="text/css" rel="stylesheet" href="../news/news_upload.css" />
<link type="text/css" rel="stylesheet" href="view.css" />
</head>
<body>
<div class="top">
  <div style="width:920px; text-align:center;"> <img src="img/001_r2_c12.jpg" style="float:right; margin-top:10px;"/> <img src="img/001_r1_c3.jpg" style="margin-left:200px;" /> </div>
  <ul class="nav">
    <li><a href="http://www.lfcha.com">首页</a></li>
    <li><a href="#"  title="该栏目正在建设中">灵风换客<img src="img/News.gif" /></a></li>
    <li><a href="allNews.aspx">公司动态</a></li>
    <li><a href="allProducts.aspx">产品介绍</a></li>
    <li><a href="#" title="该栏目正在建设中">加盟商家</a></li>
    <li><a href="#" title="该栏目正在建设中">广告支持</a></li>
    <li><a href="#" title="该栏目正在建设中">哈哈搜索</a></li>
    <li><a href="memberLogin.aspx">普通会员登陆</a></li>
  </ul>
</div>
<div class="mainbox" style=" background:#FFFFFF; height:auto;">
  <div class="left">
    <h3 style="height:22px;padding-bottom:0; padding-top:11px; border:none;">浏览物品</h3>
   <?
   if(count($InforList) != 0){
    $BLL_Member = $Factory->FactoryMember();
    foreach ($InforList as $Infor){
     $Member = new Member();
     $Member->ID = $Infor->Member->ID;
     $Member = $BLL_Member->GetMember($Member);
    
   ?>
   <div class="V1">
   <div class="V1_img"><a href="ViewInfor.php?ID=<?echo $Infor->ID?>"><img src="TradeImg/<?echo $Infor->Pic?>" style="width:90px; height:90px;" /></a></div>
   <div class="V1_mes">
    <div class="V1_title"><a href="ViewInfor.php?ID=<?echo $Infor->ID?>"><strong><?echo $Infor->Title?></strong></a></div>
    <div class="V1_seller">主人:<span><?echo $Member->TrueName?></span></div>
   
   </div>
   <ul class="V1_ul"><li><img src="img/zujin.gif" />租金<br /><span class="mesText" style=" color:#FF0000; font-weight:bold"><?echo $Infor->Hire?>元/天</span></li><li><img src="img/yajin.gif" />压金<br /><span class="mesText"><?echo $Infor->Deposit?>元</span></li><li><img src="img/weizhi.gif" />现位置<br /><span class="mesText"><?echo $Infor->Location?></span></li></ul>
   </div>
   <div style="clear:both;"></div>
   <?
     }
    }
   ?>
  
 <div class="Page" style="font-size: 12px;line-height: 20px;text-align: center; margin-top:20px;">
     <?echo $Page->Page+1?>页/<?echo $Page->MaxPage+1?>页
     <?
     if ($Page->Page==0)
     {
      echo '首页';
     }
     else
     {
      echo ' <a href="ListInfoTxt.php?Page=0">首页</a>';
     }
     ?>
    
   
     <?if ($Page->Page>0) {?>
      <a href="ListInfoTxt.php?Page=<?echo $Page->Page-1?>">上一页</a> 
     <?
     }
     else {
      echo '上一页';
     }
     ?>
     <?if ($Page->Page<$Page->MaxPage) {?>
     <a href="ListInfoTxt.php?Page=<?echo $Page->Page+1?>">下一页</a> 
     <?
  }
  else {
   echo '下一页';
  }
  ?>
  <?
     if ($Page->Page==$Page->MaxPage)
     {
      
      echo '尾页';
     }
     else
     {
      echo '<a href="ListInfoTxt.php?Page='.$Page->MaxPage.'">尾页</a>';
     }
    
  ?>
    
     共<?echo $Page->Sum?>条记录
  </div>

    <img src="img/ViewL_B.gif" style="margin-bottom:-10px;"/> </div>
  <div class="V_right">
    <div>
      <h5>热租产品推荐榜</h5>
      <div class="Right_block">
      <?
      $Infor2 = new Infor();
      $Infor2->Recommend = 1;
      $InforList = $BLL_Trade->ScanInfor($Infor2);
      if(count($InforList) !=0){
       foreach ($InforList as $Infor2){
        ?>
      <div class="V2_pic"><a href="ViewInfor.php?ID=<?$Infor2->ID?>"><img src="TradeImg/<?echo $Infor2->Pic?>" style="width:150px; height:150px;"/></a></div>
      <div class="V2_mes" style="margin-bottom:15px;"><span class="V2_price">租金:<?echo $Infor2->Hire?>元/天</span><br /><span class="V2_title" ><a href="ViewInfor.php?ID=<?echo $Infor2->ID?>"><?echo $Infor2->Title?></a></span></div>
     
      <?
       }
      }
      ?>
      </div>
    </div>
    <div>
     
    </div>
</div>
<div style="clear:both;"></div>
<div class="foot"> <img src="img/001_r16_c7.jpg" style="margin:5px;"/>
  <p>地址:中国洛阳涧西区南昌路杜康大厦12/13楼   电话:0379-65186858   传真:0379-65186185<br />
    Email:lfcha@lfcha.com</p>
</div>
</div>
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值