index.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. require("../../class/connect.php");
  3. require("../../class/db_sql.php");
  4. require("../../class/q_functions.php");
  5. require("../../member/class/user.php");
  6. require("../../data/dbcache/class.php");
  7. require "../".LoadLang("pub/fun.php");
  8. require("../class/ShopSysFun.php");
  9. eCheckCloseMods('shop');//关闭模块
  10. $link=db_connect();
  11. $empire=new mysqlquery();
  12. $editor=1;
  13. //是否登陆
  14. $user=islogin();
  15. //更新库存
  16. $shoppr=ShopSys_ReturnSet();
  17. ShopSys_TimeCutMaxnum($user['userid'],$shoppr);
  18. $page=(int)$_GET['page'];
  19. $page=RepPIntvar($page);
  20. $start=0;
  21. $line=16;//每页显示条数
  22. $page_line=10;//每页显示链接数
  23. $offset=$page*$line;//总偏移量
  24. $add="";
  25. $search='';
  26. $totalquery="select count(*) as total from {$dbtbpre}enewsshopdd where userid='$user[userid]'";
  27. $query="select ddid,ddno,ddtime,userid,username,outproduct,haveprice,checked,truename,psid,psname,pstotal,alltotal,payfsid,payfsname,payby,alltotalfen,fp,fptotal,pretotal from {$dbtbpre}enewsshopdd where userid='$user[userid]'";
  28. //搜索
  29. $sear=(int)$_GET['sear'];
  30. $keyboard='';
  31. $starttime='';
  32. $endtime='';
  33. if($sear)
  34. {
  35. $keyboard=RepPostVar($_GET['keyboard']);
  36. $add=" and ddno like '%$keyboard%'";
  37. //时间
  38. $starttime=RepPostVar($_GET['starttime']);
  39. $endtime=RepPostVar($_GET['endtime']);
  40. if($endtime!="")
  41. {
  42. $ostarttime=$starttime." 00:00:00";
  43. $oendtime=$endtime." 23:59:59";
  44. $add.=" and ddtime>='$ostarttime' and ddtime<='$oendtime'";
  45. }
  46. $search="&sear=1&keyboard=$keyboard&starttime=$starttime&endtime=$endtime";
  47. }
  48. $totalquery.=$add;
  49. $num=$empire->gettotal($totalquery);//取得总条数
  50. $query.=$add;
  51. $query=$query." order by ddid desc limit $offset,$line";
  52. $sql=$empire->query($query);
  53. $returnpage=page1($num,$line,$page_line,$start,$page,$search);
  54. //导入模板
  55. require(ECMS_PATH.'e/template/ShopSys/ListDd.php');
  56. db_close();
  57. $empire=null;
  58. ?>