diff --git a/src/admin/inc/inc_action_info.php b/src/admin/inc/inc_action_info.php index ca5376e5..278be1a1 100644 --- a/src/admin/inc/inc_action_info.php +++ b/src/admin/inc/inc_action_info.php @@ -231,24 +231,12 @@ $actionSearch[6] = array( 'purview' => 'sys_Data', 'linkurl' => 'member_operations.php' ), - 4 => array( - 'title' => '商店订单记录', - 'description' => '前台会员商店提交的订单记录,这里可以对这些订单进行一个统一的管理', - 'purview' => 'sys_Data', - 'linkurl' => 'shops_operations.php' - ), 5 => array( 'title' => '支付接口设置', 'description' => '商店以及会员产品付款用到的在线付款方式需要设置的支付接口,这里含有常用的接口', 'purview' => 'sys_Data', 'linkurl' => 'sys_payment.php' ), - 6 => array( - 'title' => '配货方式设置', - 'description' => '网站在线商城的送货方式,这里可以对其进行编辑管理', - 'purview' => 'sys_Data', - 'linkurl' => 'shops_delivery.php' - ), ) ); $actionSearch[7] = array( diff --git a/src/admin/inc/inc_menu.php b/src/admin/inc/inc_menu.php index 01453afd..e58fa096 100644 --- a/src/admin/inc/inc_menu.php +++ b/src/admin/inc/inc_menu.php @@ -54,9 +54,7 @@ if ($cuserLogin->getUserType() >= 10) { - - diff --git a/src/admin/shops_delivery.php b/src/admin/shops_delivery.php deleted file mode 100644 index 190f092c..00000000 --- a/src/admin/shops_delivery.php +++ /dev/null @@ -1,77 +0,0 @@ - 100)) { - ShowMsg("请填写配送方式名称", "-1"); - exit(); - } - $price = preg_replace("#[^.0-9]#", "", $price); - if ($price < 0.01) { - $price = '0.00'; - } - $des = cn_substrR($des, 255); - $InQuery = "INSERT INTO `#@__shops_delivery` (`dname`,`price`,`des`) VALUES ('$dname','$price','$des');"; - $result = $dsql->ExecuteNoneQuery($InQuery); - if ($result) { - ShowMsg("成功添加一个配送方式", "shops_delivery.php"); - } else { - ShowMsg("添加配送方式时发生SQL错误", "-1"); - } - exit(); -} else if ($do == 'del') { - $id = intval($id); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__shops_delivery` WHERE pid='$id'"); - ShowMsg("已删除当前配送方式", "shops_delivery.php"); - exit(); -} else if ($do == 'edit') { - foreach ($pid as $id) { - $id = intval($id); - $row = $dsql->GetOne("SELECT pid,dname,price,des FROM `#@__shops_delivery` WHERE pid='$id' LIMIT 0,1"); - if (!is_array($row)) { - continue; - } - $dname = ${"m_dname".$id}; - $price = ${"m_price".$id}; - $des = ${"m_des".$id}; - if (empty($dname) || (strlen($dname) > 100)) { - $dname = addslashes($row['dname']); - } - $price = preg_replace("#[^.0-9]#", "", $price); - if (empty($price)) { - $price = $row['price']; - } - if (empty($des)) { - $des = addslashes($row['des']); - } else { - $des = cn_substrR($des, 255); - } - $dsql->ExecuteNoneQuery("UPDATE `#@__shops_delivery` SET dname='$dname',price='$price',des='$des' WHERE pid='$id'"); - } - ShowMsg("成功修改配送方式", "shops_delivery.php"); - exit(); -} -$deliveryarr = array(); -$dsql->SetQuery("SELECT pid,dname,price,des FROM `#@__shops_delivery` ORDER BY orders ASC"); -$dsql->Execute(); -while ($row = $dsql->GetArray()) { - $deliveryarr[] = $row; -} -$dlist = new DataListCP(); -$dlist->pagesize = 30;//设定每页显示记录数 -//这两句的顺序不能更换 -$dlist->SetTemplate(DEDEADMIN."/templets/shops_delivery.htm");//载入模板 -$dlist->SetSource("SELECT `pid`,`dname`,`price`,`des` FROM `#@__shops_delivery` ORDER BY `orders` ASC");//设定查询SQL -$dlist->Display();//显示 -?> \ No newline at end of file diff --git a/src/admin/shops_operations.php b/src/admin/shops_operations.php deleted file mode 100644 index dc3daa8a..00000000 --- a/src/admin/shops_operations.php +++ /dev/null @@ -1,117 +0,0 @@ -ExecuteNoneQuery($sql); - } else if ($dopost == 'push') { - $nids = explode('`', $nid); - $wh = ''; - foreach ($nids as $n) { - if ($wh == '') $wh = " WHERE oid='$n' "; - else $wh .= " OR oid='$n' "; - } - $sql = "UPDATE `#@__shops_orders` SET `state`='2' $wh "; - $dsql->ExecuteNoneQuery($sql); - } else if ($dopost == 'ok') { - $nids = explode('`', $nid); - $wh = ''; - foreach ($nids as $n) { - if ($wh == '') $wh = " WHERE oid='$n' "; - else $wh .= " OR oid='$n' "; - } - $sql = "UPDATE `#@__shops_orders` SET `state`='4' $wh "; - $dsql->ExecuteNoneQuery($sql); - } else if ($dopost == 'delete') { - $nids = explode('`', $nid); - foreach ($nids as $n) { - $query = "DELETE FROM `#@__shops_products` WHERE oid='$n'"; - $query2 = "DELETE FROM `#@__shops_orders` WHERE oid='$n'"; - $query3 = "DELETE FROM `#@__shops_userinfo` WHERE oid='$n'"; - $dsql->ExecuteNoneQuery($query); - $dsql->ExecuteNoneQuery($query2); - $dsql->ExecuteNoneQuery($query3); - } - ShowMsg("成功删除指定的订单记录", $ENV_GOBACK_URL); - exit(); - } else { - ShowMsg("不充许的操作范围", $ENV_GOBACK_URL); - exit(); - } - ShowMsg("成功修改指定的订单记录", $ENV_GOBACK_URL); - exit(); -} -$addsql = ''; -if (empty($oid)) $oid = 0; -setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); -if (isset($buyid)) { - $buyid = preg_replace("#[^-0-9A-Z]#", "", $buyid); - $addsql = "WHERE s.oid='".$buyid."'"; -} -if (isset($sta)) { - $addsql = "WHERE s.`state`='$sta'"; -} -$sql = "SELECT s.`oid`,s.`cartcount`,s.`price`,s.`state`,s.`stime`,s.priceCount,s.dprice,s.paytype,u.`consignee`,u.`tel`,s.`userid` FROM `#@__shops_orders` AS s LEFT JOIN `#@__shops_userinfo` AS u ON s.oid=u.oid $addsql ORDER BY `stime` DESC"; -$dlist = new DataListCP(); -$dlist->SetParameter("oid", $oid); -if (isset($sta)) $dlist->SetParameter("sta", $sta); -$tplfile = DEDEADMIN."/templets/shops_operations.htm"; -//这两句的顺序不能更换 -$dlist->SetTemplate($tplfile); //载入模板 -$dlist->SetSource($sql); //设定查询SQLexit('dd'); -$dlist->Display(); -function GetSta($sta) -{ - if ($sta == 0) { - return '未付款'; - } else if ($sta == 1) { - return '已付款'; - } else if ($sta == 2) { - return '已发货'; - } else if ($sta == 3) { - return '已确认'; - } else { - return '已完成'; - } -} -function GetsType($pid) -{ - global $dsql; - $pid = intval($pid); - $row = $dsql->GetOne("SELECT name FROM `#@__payment` WHERE id='$pid'"); - if (is_array($row)) { - return $row['name']; - } else { - return '-'; - } -} -function GetMemberID($mid) -{ - global $dsql; - if ($mid == 0) return '0'; - $row = $dsql->GetOne("SELECT userid FROM `#@__member` WHERE mid='$mid' "); - if (is_array($row)) { - return "".$row['userid'].""; - } else { - return '0'; - } -} -?> \ No newline at end of file diff --git a/src/admin/shops_operations_cart.php b/src/admin/shops_operations_cart.php deleted file mode 100644 index 21543004..00000000 --- a/src/admin/shops_operations_cart.php +++ /dev/null @@ -1,41 +0,0 @@ -无效操作"); -$oid = preg_replace("#[^-0-9A-Z]#", "", $oid); -if (empty($oid)) exit("无效订单号"); -$row = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE oid='$oid'"); -$sql = "SELECT o.*,p.title,p.price as uprice,d.dname FROM `#@__shops_orders` as o LEFT JOIN `#@__shops_products` as p on o.oid=p.oid LEFT JOIN `#@__shops_delivery` as d on d.pid=o.pid WHERE o.oid='$oid'"; -$dlist = new DataListCP(); -$dlist->pagesize = 30; -$dlist->SetParameter("oid", $oid); -$dlist->SetTemplate(DEDEADMIN."/templets/shops_operations_cart.htm"); -$dlist->SetSource($sql); -$dlist->Display(); -$dlist->Close(); -function GetSta($sta, $oid) -{ - global $dsql; - $row = $dsql->GetOne("SELECT paytype FROM `#@__shops_orders` WHERE oid='$oid'"); - $payname = $dsql->GetOne("SELECT name,fee FROM `#@__payment` WHERE id='{$row['paytype']}'"); - if ($sta == 0) { - return $payname['name']." 手续费:".$payname['fee']."元"; - } else if ($sta == 1) { - return '已付款,等发货'; - } else if ($sta == 2) { - return '确认'; - } else { - return '已完成'; - } -} -?> \ No newline at end of file diff --git a/src/admin/shops_operations_userinfo.php b/src/admin/shops_operations_userinfo.php deleted file mode 100644 index 52423e12..00000000 --- a/src/admin/shops_operations_userinfo.php +++ /dev/null @@ -1,30 +0,0 @@ -无效操作"); -$oid = preg_replace("#[^-0-9A-Z]#", "", $oid); -if (empty($oid)) exit("无效订单号"); -$rows = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE oid='$oid' LIMIT 0,1"); -if (!is_array($rows)) { - $dsql->Close(); - exit("该订单下没相关用户信息"); -} -$row = $dsql->GetOne("SELECT pid,dprice FROM `#@__shops_orders` WHERE oid='$oid'"); -if (is_array($row)) { - $rs = $dsql->GetOne("SELECT dname FROM `#@__shops_delivery` WHERE pid='$row[pid]'"); - $rows['dname'] = $rs['dname']; - $rows['dprice'] = $row['dprice']; -} -$rows['des'] = stripslashes($rows['des']); -include DEDEADMIN."/templets/shops_operations_userinfo.htm"; -unset($rows); -?> \ No newline at end of file diff --git a/src/admin/templets/shops_delivery.htm b/src/admin/templets/shops_delivery.htm deleted file mode 100644 index b02334ed..00000000 --- a/src/admin/templets/shops_delivery.htm +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - 配送方式配置 - - - - - -
-
- - - - - - - - - - - - - - - - - - - - -
增加一个配送方式
名称: * 此处填写配送方式名称
手续费: 元 * 发货时所用的手续费,若要收取,请填写(精确到小数位两位)
简要说明:
- - -
-
-
- - - - - - - - - - - -
已有配送方式列表
- - - - - - - - -
- - 删除 - - 手续费: - -
-
-
-
- - \ No newline at end of file diff --git a/src/admin/templets/shops_operations.htm b/src/admin/templets/shops_operations.htm deleted file mode 100644 index d9b753d2..00000000 --- a/src/admin/templets/shops_operations.htm +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - 商店订单记录 - - - - - - - - -
- - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - {dede:datalist empty=''} - - - - - - - - - - - - - - {/dede:datalist} - - - - - - - -
商店订单记录
选择订单号收货人数量生成日期订单价配送费总计支付方式状态用户
暂无内容
'> - - 详情 - ({dede:field.stime function="floorTime(time()-@me,@me)"/})
- - - - - -
{dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="6"/}
- - \ No newline at end of file diff --git a/src/admin/templets/shops_operations_cart.htm b/src/admin/templets/shops_operations_cart.htm deleted file mode 100644 index 831f3b42..00000000 --- a/src/admin/templets/shops_operations_cart.htm +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - <?php echo $oid;?> - - - - - - - - -{dede:datalist} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{/dede:datalist} - - - -
订单信息
订单号: {dede:field.oid/}
商品名称: {dede:field.title/}
单价(元/单位): {dede:field.uprice/}
数量: {dede:field.cartcount/}
支付方式:
配送: {dede:field.dname/} 费用:{dede:field.dprice/}元
购买时间: {dede:field.stime function=GetDateTimeMk(@me)/}
收货人:
地址:
邮编:
联系电话:
邮箱:
留言:
合计(元): {dede:field.priceCount/}元
- - 订单总计:{dede:field.priceCount/}元 - {dede:pagelist listsize='6'/} -
- - \ No newline at end of file diff --git a/src/admin/templets/shops_operations_userinfo.htm b/src/admin/templets/shops_operations_userinfo.htm deleted file mode 100644 index 3e5f79a3..00000000 --- a/src/admin/templets/shops_operations_userinfo.htm +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - <?php echo $rows['oid'];?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
订单号:
配送: 方式: 费用:
收货人:
地址:
邮编:
电话:
E-Mail:
留言:
- - - \ No newline at end of file diff --git a/src/install/sql-dfdata.txt b/src/install/sql-dfdata.txt index 403c6f7b..f25a7ffe 100755 --- a/src/install/sql-dfdata.txt +++ b/src/install/sql-dfdata.txt @@ -505,7 +505,6 @@ INSERT INTO `#@__area` VALUES ('1','北京市','0','0'), INSERT INTO `#@__channeltype` VALUES ('1','article','文档模型','#@__archives','#@__addonarticle','article_add.php','content_list.php','article_edit.php','article_add.php','content_list.php','article_edit.php','\t\n\t\n','','','1','1','1','-1','','10','0','1','1','标题','0','0'), ('2','image','图片模型','#@__archives','#@__addonimages','album_add.php','content_i_list.php','album_edit.php','album_add.php','content_list.php','album_edit.php','\t\n\t\n','','','1','1','1','-1','','10','0','1','1','标题','0','0'), ('3','soft','软件模型','#@__archives','#@__addonsoft','soft_add.php','content_i_list.php','soft_edit.php','','','','\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n','filetype,language,softtype,os,accredit,softrank','','1','1','1','-1','','10','0','1','1','标题','0','0'), -('6','shop','商品模型','#@__archives','#@__addonshop','archives_add.php','content_list.php','archives_edit.php','archives_add.php','content_list.php','archives_edit.php','\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\n\t\n\t\n\n\t\n\t\n\n\t\n\t\n','price,trueprice,brand,units','','0','1','1','-1','','10','0','1','1','商品名称','0','0'), ('-1','spec','专题模型','#@__archives','#@__addonspec','spec_add.php','content_s_list.php','spec_edit.php','','','','','','','1','1','0','-1','','10','0','1','1','标题','0','0'), ('-8','infos','分类模型','#@__archives','#@__addoninfos','archives_sg_add.php','content_sg_list.php','archives_sg_edit.php','archives_sg_add.php','content_sg_list.php','archives_sg_edit.php','\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n','channel,arcrank,mid,click,title,senddate,flag,litpic,lastpost,scores,goodpost,badpost,nativeplace,infotype,endtime','','-1','1','1','-1','','0','0','0','1','信息标题','0','0'); @@ -554,11 +553,6 @@ INSERT INTO `#@__scores` VALUES ('2','列兵','1','0','1'), ('12','上将','11','24000','1'), ('15','大将','12','29000','1'); -INSERT INTO `#@__shops_delivery` VALUES ('1','送货上门','10.21','送货上门,领取商品时付费.','0'), -('2','特快专递(EMS)','25.00','特快专递(EMS),要另收手续费.','0'), -('3','普通邮递','5.00','普通邮递','0'), -('4','邮局快邮','12.00','邮局快邮','0'); - INSERT INTO `#@__member_stowtype` VALUES ('sys','系统收藏','archives_do.php'), ('book','小说收藏','/book/book.php?bid'); diff --git a/src/install/sql-dftables.txt b/src/install/sql-dftables.txt index d9ef78bd..cb636391 100755 --- a/src/install/sql-dftables.txt +++ b/src/install/sql-dftables.txt @@ -864,61 +864,6 @@ CREATE TABLE `#@__sgpage` ( KEY `likeid` (`likeid`) ) TYPE=MyISAM; -DROP TABLE IF EXISTS `#@__shops_delivery`; -CREATE TABLE `#@__shops_delivery` ( - `pid` int(10) unsigned NOT NULL auto_increment, - `dname` char(80) NOT NULL, - `price` float(13,2) NOT NULL default '0.00', - `des` char(255) default NULL, - `orders` int(10) NOT NULL default '0', - PRIMARY KEY (`pid`), - KEY `orders` (`orders`) -) TYPE=MyISAM; - -DROP TABLE IF EXISTS `#@__shops_orders`; -CREATE TABLE `#@__shops_orders` ( - `oid` varchar(80) NOT NULL, - `userid` int(10) NOT NULL, - `pid` int(10) NOT NULL default '0', - `paytype` tinyint(2) NOT NULL default '1', - `cartcount` int(10) NOT NULL default '0', - `dprice` float(13,2) NOT NULL default '0.00', - `price` float(13,2) NOT NULL default '0.00', - `priceCount` float(13,2) NOT NULL, - `state` tinyint(1) NOT NULL default '0', - `ip` char(46) NOT NULL default '', - `stime` int(10) NOT NULL default '0', - KEY `stime` (`stime`), - KEY `userid` (`userid`), - KEY `oid` (`oid`) -) TYPE=MyISAM; - -DROP TABLE IF EXISTS `#@__shops_products`; -CREATE TABLE `#@__shops_products` ( - `aid` mediumint(8) NOT NULL default '0', - `oid` varchar(80) NOT NULL default '', - `userid` int(10) NOT NULL, - `title` varchar(80) NOT NULL default '', - `price` float(13,2) NOT NULL default '0.00', - `buynum` int(10) NOT NULL default '9', - KEY `oid` (`oid`), - KEY `userid` (`userid`) -) TYPE=MyISAM; - -DROP TABLE IF EXISTS `#@__shops_userinfo`; -CREATE TABLE `#@__shops_userinfo` ( - `userid` int(10) NOT NULL, - `oid` varchar(80) NOT NULL default '', - `consignee` char(15) NOT NULL default '', - `address` varchar(255) NOT NULL default '', - `zip` int(10) NOT NULL default '0', - `tel` varchar(255) NOT NULL default '', - `email` varchar(255) NOT NULL default '', - `des` varchar(255) NOT NULL default '', - KEY `oid` (`oid`), - KEY `userid` (`userid`) -) TYPE=MyISAM; - DROP TABLE IF EXISTS `#@__softconfig`; CREATE TABLE `#@__softconfig` ( `downtype` smallint(6) NOT NULL default '0', diff --git a/src/theme/templet-pluslist.inc b/src/theme/templet-pluslist.inc index 60158be5..93a57f7c 100644 --- a/src/theme/templet-pluslist.inc +++ b/src/theme/templet-pluslist.inc @@ -1,4 +1,3 @@ -carbuyaction.htm,订单信息 download_links_templet.htm,下载地址列表 flink-add.htm,增加友情链接 flink-list.htm,友情链接列表 diff --git a/src/theme/templets/article_shop.htm b/src/theme/templets/article_shop.htm deleted file mode 100644 index 48d3c106..00000000 --- a/src/theme/templets/article_shop.htm +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - {dede:field.title/}-{dede:global.cfg_webname/} - - - - - - - - - - - {dede:include filename='top.htm'/} - {dede:include filename='head.htm'/} -
-
-
-
- -
-
-
-
-
-
-
-

{dede:field.title/}

- -
{dede:field name='image'/}
-
-

商品原价:{dede:field.price/}

-

优惠价格:{dede:field.trueprice/}

-

品牌:{dede:field.brand/}

-

上架日期:{dede:field.pubdate function="MyDate('y-m-d H:i',@me)"/}

-
-
-
- - - - - 购物车:查看购物车 - 购买: -
-
-
{dede:field.body/}
-
- {dede:include comment='文档顶踩模块' filename='widget_article_digg.htm'/} -
-
-
{dede:prenext get='pre'/}
-
{dede:prenext get='next'/}
-
-
-
- -
-
-
- {dede:include comment='文档评论模块' file='widget_article_feedback.htm'/} -
-
- {dede:include comment='推荐内容' filename='widget_recommend.htm'/} - {dede:include comment='热点内容' filename='widget_hot.htm'/} - {dede:include comment='QR二维码' filename='widget_qrcode.htm'/} -
-
-
- {dede:include filename='foot.htm'/} - - - \ No newline at end of file diff --git a/src/theme/templets/index_shop.htm b/src/theme/templets/index_shop.htm deleted file mode 100644 index c3d3338a..00000000 --- a/src/theme/templets/index_shop.htm +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - {dede:field.title/}-{dede:global.cfg_webname/} - - - - - - - - - - {dede:include filename='top.htm'/} - {dede:include filename='head.htm'/} -
-
-
-
- -
-
-
-
-
-
-
-
- {dede:channelartlist} -
-
- -
    - {dede:arclist titlelen='60' row='8'} -
  • [field:title/]
  • - {/dede:arclist} -
-
-
- {/dede:channelartlist} -
-
-
- {dede:include comment='推荐内容' filename='widget_recommend.htm'/} - {dede:include comment='热点内容' filename='widget_hot.htm'/} - {dede:include comment='QR二维码' filename='widget_qrcode.htm'/} -
-
-
- {dede:include filename='foot.htm'/} - - \ No newline at end of file diff --git a/src/theme/templets/list_shop.htm b/src/theme/templets/list_shop.htm deleted file mode 100644 index 4be225a9..00000000 --- a/src/theme/templets/list_shop.htm +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - {dede:field.title/}-{dede:pagelist listsize='0' listitem='pageno' function='html2text(@me)' runphp='yes'}if (@me>1) @me='第'.trim(@me).'页-';else @me='';{/dede:pagelist}{dede:global.cfg_webname/} - - - - - - - - - - {dede:include filename='top.htm'/} - {dede:include filename='head.htm'/} -
-
-
-
- -
-
-
-
-
-
-
-
    - {dede:list pagesize='10'} -
  • - [field:title/] -
    - - -
    日期:[field:pubdate function="MyDate('Y-m-d', @me)"/] 价格:[field:trueprice/] 品牌:[field:brand/] 人气:[field:click/]
    -
    -
  • - {/dede:list} -
-
    - {dede:pagelist listitem='info,index,end,pre,next,pageno' listsize='1'/} -
-
-
- {dede:include comment='栏目列表' filename='widget_channels.htm'/} - {dede:include comment='推荐内容' filename='widget_recommend.htm'/} - {dede:include comment='热点内容' filename='widget_hot.htm'/} - {dede:include comment='QR二维码' filename='widget_qrcode.htm'/} -
-
-
- {dede:include filename='foot.htm'/} - - \ No newline at end of file diff --git a/src/user/buy_action.php b/src/user/buy_action.php index af67351e..cb038b22 100755 --- a/src/user/buy_action.php +++ b/src/user/buy_action.php @@ -96,43 +96,6 @@ if (!isset($paytype)) { $tpl = new DedeTemplate(); $tpl->LoadTemplate(DEDEMEMBER.'/templets/buy_action_payment.htm'); $tpl->Display(); -} else { - $rs = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$paytype' "); - $rs['code'] = preg_replace("#[^0-9a-z]#i", "", $rs['code']); - if (!file_exists(DEDEINC.'/payment/'.$rs['code'].'.php')) { - ShowMsg("未发现支付接口文件,请到后台配置", 'javascript:;'); - exit(); - } - require_once DEDEINC.'/payment/'.$rs['code'].'.php'; - $pay = new $rs['code']; - $payment = ""; - if ($rs['code'] == "cod" || $rs['code'] == "bank") { - $order = $buyid; - $payment = "member"; - } else { - $order = array( - 'out_trade_no' => $buyid, - 'price' => sprintf("%01.2f", $price) - ); - require_once DEDEDATA.'/payment/'.$rs['code'].'.php'; - } - $button = $pay->GetCode($order, $payment); - $dtp = new DedeTemplate(); - $carts = array( - 'orders_id' => $buyid, - 'cart_count' => '1', - 'price_count' => sprintf("%01.2f", $price) - ); - $row = $dsql->GetOne("SELECT pname,money FROM `#@__member_operation` WHERE buyid='{$buyid}'"); - $dtp->SetVar('pay_name', $row['pname']); - $dtp->SetVar('price', $row['money']); - $dtp->SetVar('pay_way', $rs['name']); - $dtp->SetVar('description', $rs['description']); - $dtp->SetVar('button', $button); - $dtp->Assign('carts', $carts); - $dtp->LoadTemplate(DEDEMEMBER.'/templets/shops_action_payment.htm'); - $dtp->Display(); - exit(); } /** * 加密函数 diff --git a/src/user/shops_orders.php b/src/user/shops_orders.php deleted file mode 100755 index 055d27af..00000000 --- a/src/user/shops_orders.php +++ /dev/null @@ -1,62 +0,0 @@ -GetOne("SELECT p.name FROM `#@__shops_orders` AS s LEFT JOIN `#@__payment` AS p ON s.paytype=p.id WHERE s.oid='$oid'"); - if ($sta == 0) { - return '未付款('.$row['name'].') < 去付款'; - } else if ($sta == 1) { - return '已付款,等发货'; - } else if ($sta == 2) { - return '确认'; - } else { - return '已完成'; - } -} -if ($dopost == '') { - $sql = "SELECT * FROM `#@__shops_orders` WHERE userid='".$cfg_ml->M_ID."' ORDER BY stime DESC"; - $dl = new DataListCP(); - $dl->pagesize = 10; - //这两句的顺序不能更换 - $dl->SetTemplate(dirname(__FILE__)."/templets/shops_orders.htm"); //载入模板 - $dl->SetSource($sql); //设定查询SQL - $dl->Display(); //显示 -} else if ($dopost == 'del') { - $ids = explode(',', $ids); - if (isset($ids) && is_array($ids)) { - foreach ($ids as $id) { - $id = preg_replace("/^[a-z][0-9]$/", "", $id); - $query = "DELETE FROM `#@__shops_products` WHERE oid='$id' AND userid='{$cfg_ml->M_ID}'"; - $query2 = "DELETE FROM `#@__shops_orders` WHERE oid='$id' AND userid='{$cfg_ml->M_ID}'"; - $query3 = "DELETE FROM `#@__shops_userinfo` WHERE oid='$id' AND userid='{$cfg_ml->M_ID}'"; - $dsql->ExecuteNoneQuery($query); - $dsql->ExecuteNoneQuery($query2); - $dsql->ExecuteNoneQuery($query3); - } - ShowMsg("成功删除指定的交易记录", "shops_orders.php"); - exit(); - } -} -?> \ No newline at end of file diff --git a/src/user/shops_point.php b/src/user/shops_point.php deleted file mode 100755 index 4ab6eb41..00000000 --- a/src/user/shops_point.php +++ /dev/null @@ -1,36 +0,0 @@ -GetOne("SELECT paytype,priceCount FROM `#@__shops_orders` WHERE userid='".$cfg_ml->M_ID."' AND oid='$oid'"); - if ($rs['paytype'] != 5) { - ShowMsg("订单不支持该支付方式", "javascript:;"); - exit(); - } - $priceCount = $row['priceCount']; - $members = $dsql->GetOne("SELECT `money` FROM `#@__member` WHERE mid='".$cfg_ml->M_ID."'"); - if ($members['money'] < $priceCount) { - ShowMsg("支付失败点数不够", "-1"); - exit(); - } - if ($dsql->ExecuteNoneQuery("UPDATE `#@__shops_orders` SET `state`='1' WHERE `oid`='$oid' AND `userid`='".$cfg_ml->M_ID."' AND `state`<1")) { - $res = $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET money=money-$priceCount WHERE mid='{$cfg_ml->M_ID}'"); - ShowMsg("下单,支付成功,等待商家发货", "../user/shops_products.php?oid=".$oid); - exit(); - } else { - ShowMsg("支付失败,请联系管理员", "-1"); - exit(); - } -} else { - exit("403 Forbidden!"); -} -?> \ No newline at end of file diff --git a/src/user/shops_products.php b/src/user/shops_products.php deleted file mode 100755 index d4089ad7..00000000 --- a/src/user/shops_products.php +++ /dev/null @@ -1,103 +0,0 @@ -ExecuteNoneQuery("UPDATE `#@__shops_orders` SET `state`='4' WHERE oid='$oid'"); - ShowMsg("已确认订单", 'shops_products.php?oid='.$oid); - exit(); - } - $row = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE userid='".$cfg_ml->M_ID."' AND oid='$oid'"); - if (!isset($row['oid'])) { - ShowMsg("订单不存在", -1); - exit(); - } - $row['des'] = stripslashes($row['des']); - $rs = $dsql->GetOne("SELECT * FROM `#@__shops_orders` WHERE userid='".$cfg_ml->M_ID."' AND oid='$oid'"); - $row['state'] = $rs['state']; - $row['stime'] = $rs['stime']; - $row['cartcount'] = $rs['cartcount']; - $row['price'] = $rs['price']; - $row['uprice'] = $rs['price'] / $rs['cartcount']; - $row['dprice'] = $rs['dprice']; - $row['priceCount'] = $rs['priceCount']; - $rs = $dsql->GetOne("SELECT `dname` FROM `#@__shops_delivery` WHERE pid='$rs[pid]' LIMIT 0,1"); - $row['dname'] = $rs['dname']; - unset($rs); - $addsql = " AND oid='".$oid."'"; - } - $sql = "SELECT * FROM `#@__shops_products` WHERE userid='".$cfg_ml->M_ID."' $addsql ORDER BY aid ASC"; - $dl = new DataListCP(); - $dl->pagesize = 10; - if (!empty($oid)) $dl->SetParameter('oid', $oid); - //这两句的顺序不能更换 - $dl->SetTemplate(dirname(__FILE__)."/templets/shops_products.htm"); //载入模板 - $dl->SetSource($sql); //设定查询SQL - $dl->Display(); -} else if ($dopost == 'del') { - $ids = explode(',', $ids); - if (isset($ids) && is_array($ids)) { - foreach ($ids as $id) { - $id = preg_replace("/^[a-z][0-9]$/", "", $id); - $query = "DELETE FROM `#@__shops_products` WHERE oid='$id' AND userid='{$cfg_ml->M_ID}'"; - $query2 = "DELETE FROM `#@__shops_orders` WHERE oid='$id' AND userid='{$cfg_ml->M_ID}'"; - $query3 = "DELETE FROM `#@__shops_userinfo` WHERE oid='$id' AND userid='{$cfg_ml->M_ID}'"; - $dsql->ExecuteNoneQuery($query); - $dsql->ExecuteNoneQuery($query2); - $dsql->ExecuteNoneQuery($query3); - } - ShowMsg("成功删除指定的交易记录", "shops_products.php"); - exit(); - } -} -/** - * 获取状态 - * - * @param string $sta 状态ID - * @param string $oid 订单ID - * @return string - */ -function GetSta($sta, $oid) -{ - global $dsql; - $row = $dsql->GetOne("SELECT paytype FROM `#@__shops_orders` WHERE oid='$oid'"); - $payname = $dsql->GetOne("SELECT name,fee FROM `#@__payment` WHERE id='{$row['paytype']}'"); - if ($sta == 0) { - return $payname['name']." 手续费:".$payname['fee']."元"; - } elseif ($sta == 1) { - return '已付款,等发货'; - } elseif ($sta == 2) { - return '确认'; - } else { - return '已完成'; - } -} -/** - * 购物车时间 - * - * @param string $oid 订单ID - * @return string - */ -function carTime($oid) -{ - global $dsql; - $row = $dsql->GetOne("SELECT stime FROM `#@__shops_orders` WHERE oid='$oid'"); - return Mydate('Y-m-d h:i:s', $row['stime']); -} -?> \ No newline at end of file diff --git a/src/user/templets/index.htm b/src/user/templets/index.htm index 555e8078..38d4ea4d 100755 --- a/src/user/templets/index.htm +++ b/src/user/templets/index.htm @@ -58,14 +58,6 @@
钱包积分
-
  • - -
    - -
    -
    订单管理
    -
    -
  • \ No newline at end of file diff --git a/src/user/templets/menu.htm b/src/user/templets/menu.htm index 32b6bb41..0da1c878 100644 --- a/src/user/templets/menu.htm +++ b/src/user/templets/menu.htm @@ -43,7 +43,6 @@ while ($channel = $dsql->GetArray('addmod')) { diff --git a/src/user/templets/shops_action_payment.htm b/src/user/templets/shops_action_payment.htm deleted file mode 100755 index 9d1e61a2..00000000 --- a/src/user/templets/shops_action_payment.htm +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - 商品购买-会员中心-<?php echo $cfg_webname;?> - - - - - - - - -
    -
    -
    -

    商品购买

    - - - - - - - -
    下单购买买家付款确认收货交易结束
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    确认订单并付款
    订单编号:{dede:var.carts.orders_id/}
    商品总数:{dede:var.carts.cart_count/}件
    商品名称:{dede:var.pay_name/}
    订单价格:{dede:var.carts.price_count/}
    支付方式:{dede:var.pay_way/}
    支付信息:{dede:var.description/}
    - {dede:var.button/} -
    -
    -
    -
    - - \ No newline at end of file diff --git a/src/user/templets/shops_orders.htm b/src/user/templets/shops_orders.htm deleted file mode 100755 index 0e09f3be..00000000 --- a/src/user/templets/shops_orders.htm +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - 商城订单-会员中心-<?php echo $cfg_webname;?> - - - - - - - - -
    -
    - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - {/dede:datalist} - - - - - -
    订单号状态数量总计时间
    {dede:field.oid/}{dede:field.cartcount/}{dede:field.priceCount/}{dede:field.stime function="Mydate('Y-m-d h:i:s',@me)"/}
    - - -
    - -
    -
    -
    -
    - - - - \ No newline at end of file diff --git a/src/user/templets/shops_products.htm b/src/user/templets/shops_products.htm deleted file mode 100755 index 6ca424a7..00000000 --- a/src/user/templets/shops_products.htm +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - 已购商品-会员中心-<?php echo $cfg_webname;?> - - - - - - - - -
    -
    - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    订单信息
    订单号:
    支付方式:
    单价(元):
    数量:
    配送: - 费用:元 -
    总计:
    发生时间:
    收货人:
    地址:
    邮编:
    联系电话:
    邮箱:
    留言:
    - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - {/dede:datalist} - - - - - -
    订单号名称数量单价时间
    {dede:field.oid/}{dede:field.title/}{dede:field.buynum/}{dede:field.price/}{dede:field.oid function="carTime(@me)"/}
    - - -
    - -
    -
    -
    -
    - - - - \ No newline at end of file