📄 hzc_ach.php
字号:
<?php////////////////////////////////////////////////////////// Author by Shuweich// Date : 2007.07.27// 建站支持: http://www.shuweich.net// 作者: Shuweich// QQ: 1502384// ICQ: 190492112// MSN: shuweich@hotmail.com// E-mail: root@shuweich.net// E-mail: shuweich@163.com// CMS交流站点: http://www.shuweich.net////////////////////////////////////////////////////////// 模块管理 by market// For 系统管理员(站长及经理)////////////////////////////////////////////////////////include '../../../include/cp_header.php';xoops_cp_header();include 'admhead.php';echo "<span style='font-size:18px;color:#8dff8d;'>当天业绩汇总</span><br />\n";$del = "delete from ".$xoopsDB->prefix("market_achm")." where substring(rdate,1,10)='".date("Y-m-d",time())."'"; ## echo $del."<hr />";$st0 = $xoopsDB->queryF($del);if ( $st0 ) echo "旧帐清理完毕<br />\n";## 日期格式为yyyy-mm-dd,如有其它格式,请自行处理## 下面的 1 是为统计小组人数预留的$que = "select store_id,user_id,count(*),1,sum(sj),sum(tcj) from ".$xoopsDB->prefix("market_seri")." where substring(rdate,1,10)='".date("Y-m-d",time())."' and shbz='1' group by user_id";$res = $xoopsDB->query($que);while ( $row = $xoopsDB->fetchrow($res) ) { $ins = "insert into ".$xoopsDB->prefix("market_achm")." (bh,store_id,user_id,rdate,ccust,grp_rs,yj,fd,shbz) values "; $ins .="(0,'$row[0]','$row[1]','".date("Y-m-d",time())."','$row[2]','$row[3]','$row[4]','$row[5]','0')"; ## echo $ins."<hr />"; $st0 = $xoopsDB->queryF($ins); if ( $st0 ) { $que = "select user_id,user_name from ".$xoopsDB->prefix("market_member")." where user_id=".$row[1]." limit 1"; list($u_id,$u_name) = $xoopsDB->fetchrow($xoopsDB->query($que)); echo $u_id."=>".$u_name.",本日业绩记帐成功……<br />\n"; }}xoops_cp_footer();?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -