• 每日总结5.21


    <?php 
    session_start();
    include_once 'conn.php';

    ?>
    <!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>
    <script type="text/javascript" src="js/My97DatePicker/WdatePicker.js" charset="gb2312"></script>
    <link rel="stylesheet" href="css.css" type="text/css">
    </head>
    <!--hxsglxiangdxongjxs-->
    <body>

    <p>已有订单列表:</p>
    <form id="form1" name="form1" method="post" action="">
    搜索: 订单号:<input name="dingdanhao" type="text" id="dingdanhao" style='border:solid 1px #000000; color:#666666;80px' /> 金额:<input name="jine" type="text" id="jine" style='border:solid 1px #000000; color:#666666;80px' /> 购买人:<input name="goumairen" type="text" id="goumairen" style='border:solid 1px #000000; color:#666666;80px' />
    <input type="submit" name="Submit" value="查找" style='border:solid 1px #000000; color:#666666' />
    </form>
    <table width="100%" border="1" align="center" cellpadding="3" cellspacing="1" bordercolor="#00FFFF" style="border-collapse:collapse">
    <tr>
    <td width="25" bgcolor="#CCFFFF">序号</td>
    <td bgcolor='#CCFFFF'>订单号</td>
    <td bgcolor='#CCFFFF'>金额</td>
    <td bgcolor='#CCFFFF'>购买人</td>
    <td bgcolor='#CCFFFF'>联系电话</td>
    <td bgcolor='#CCFFFF'>邮编</td>
    <td bgcolor='#CCFFFF'>地址</td>
    <td bgcolor='#CCFFFF'>快递类型</td>
    <td bgcolor='#CCFFFF' width='80' align='center'>是否支付</td>

    <!--dpinglun1-->
    <td width="120" align="center" bgcolor="#CCFFFF">添加时间</td>
    <td width="120" align="center" bgcolor="#CCFFFF">操作</td>
    </tr>
    <?php
    $sql="select * from dingdan where 1=1";

    if ($_POST["dingdanhao"]!=""){$nreqdingdanhao=$_POST["dingdanhao"];$sql=$sql." and dingdanhao like '%$nreqdingdanhao%'";}
    if ($_POST["jine"]!=""){$nreqjine=$_POST["jine"];$sql=$sql." and jine like '%$nreqjine%'";}
    if ($_POST["goumairen"]!=""){$nreqgoumairen=$_POST["goumairen"];$sql=$sql." and goumairen like '%$nreqgoumairen%'";}
    $sql=$sql." order by id desc";

    $query=mysql_query($sql);
    $rowscount=mysql_num_rows($query);
    if($rowscount==0)
    {}
    else
    {
    $pagelarge=10;//每页行数;
    $pagecurrent=$_GET["pagecurrent"];
    if($rowscount%$pagelarge==0)
    {
    $pagecount=$rowscount/$pagelarge;
    }
    else
    {
    $pagecount=intval($rowscount/$pagelarge)+1;
    }
    if($pagecurrent=="" || $pagecurrent<=0)
    {
    $pagecurrent=1;
    }

    if($pagecurrent>$pagecount)
    {
    $pagecurrent=$pagecount;
    }
    $ddddd=$pagecurrent*$pagelarge;
    if($pagecurrent==$pagecount)
    {
    if($rowscount%$pagelarge==0)
    {
    $ddddd=$pagecurrent*$pagelarge;
    }
    else
    {
    $ddddd=$pagecurrent*$pagelarge-$pagelarge+$rowscount%$pagelarge;
    }
    }
    //youzuiping1
    for($i=$pagecurrent*$pagelarge-$pagelarge;$i<$ddddd;$i++)
    {
    //zoxngxetxoxngjxvi
    //txixgihxngjs
    //youzuiping2

    ?>
    <tr>
    <td width="25"><?php echo $i+1;?></td>
    <td><?php echo mysql_result($query,$i,dingdanhao);?></td>
    <td><?php echo mysql_result($query,$i,jine);?></td>
    <td><?php echo mysql_result($query,$i,goumairen);?></td>
    <td><?php echo mysql_result($query,$i,lianxidianhua);?></td>
    <td><?php echo mysql_result($query,$i,youbian);?></td>
    <td><?php echo mysql_result($query,$i,dizhi);?></td>
    <td><?php echo mysql_result($query,$i,kuaidileixing);?></td>

    <td align='center'><?php echo mysql_result($query,$i,iszf);?></td>

    <!--dpinglun2-->
    <td width="120" align="center"><?php echo mysql_result($query,$i,"addtime");?></td>
    <td width="120" align="center"><a href="del.php?id=<?php echo mysql_result($query,$i,"id");?>&tablename=dingdan" onclick="return confirm('真的要删除?')">删除</a> <a href="dingdan_updt.php?id=<?php echo mysql_result($query,$i,"id");?>">修改</a> <a href="dingdan_detail.php?id=<?php echo mysql_result($query,$i,"id");?>">详细</a> </td>
    </tr>
    <?php
    }
    }
    ?>
    </table>
    <p>以上数据共<?php echo $rowscount;?>条,<!--yoxugonxgzitoxnxgjxi--> <!--youzuiping3-->
    <input type="button" name="Submit2" onclick="javascript:window.print();" value="打印本页" style='border:solid 1px #000000; color:#666666' /> <input type="button" name="Submit3" onclick="javascript:location.href='dingdan_listxls.php';" value="导出EXCEL" style='border:solid 1px #000000; color:#666666' />
    </p>
    <p align="center"><a href="dingdan_list.php?pagecurrent=1">首页</a>, <a href="dingdan_list.php?pagecurrent=<?php echo $pagecurrent-1;?>">前一页</a> ,<a href="dingdan_list.php?pagecurrent=<?php echo $pagecurrent+1;?>">后一页</a>, <a href="dingdan_list.php?pagecurrent=<?php echo $pagecount;?>">末页</a>, 当前第<?php echo $pagecurrent;?>页,共<?php echo $pagecount;?>页 </p>
    <?php
    //yoxutixinxg if($kucddduntx>0)
    //yoxutixinxg{
    //yoxutixinxg tsgehxdhdm
    //yoxutixinxg}
    ?>
    </body>
    </html>

  • 相关阅读:
    Ext5实现树形下拉框ComboBoxTree
    SQL常用语句整理
    第九篇——鼓掌,学籍管理系统的相关两篇报告终于写完啦!
    第八篇——源程序版本管理软件及项目管理软件
    第七篇——Mobile Apps,软件的曙光。
    第六篇——初尝Python,意犹未尽
    第五篇——C++实现四则运算
    第四篇——是什么让我们勇往直前? 兴趣使然
    第三篇——软件之殇,WE ARE THOUSANDS APART!
    第二篇——The communication during software engineering.
  • 原文地址:https://www.cnblogs.com/wanghaoning/p/14914856.html
Copyright © 2020-2023  润新知