📄 acc_spkcbg.php
字号:
<?php
////////////////////////////////////////////////////////
// Author by Shuweich
// Date : 2007.11.13
// 建站支持: http://www.shuweich.net
// 作者: Shuweich
// QQ: 1502384
// ICQ: 190492112
// MSN: shuweich@hotmail.com
// E-mail: root@shuweich.net
// E-mail: shuweich@163.com
////////////////////////////////////////////////////////
// 模块管理 by txdyz
// For 商品库存变更
////////////////////////////////////////////////////////
include_once '../../mainfile.php';$ss=2;
include_once 'head_win.php';
if ( isset($_REQUEST['smit0']) && $_REQUEST['smit0'] == '1' ) {
$fors = 0; $aa = 0; $ss = 0;
if ( strlen($_REQUEST['sp_code_a0']) == 12 && $_REQUEST['p_a0'] > 0 ) { $aa = 1; $fors++; }
if ( strlen($_REQUEST['sp_code_s0']) == 12 && $_REQUEST['p_s0'] > 0 ) { $ss = 1; $fors++; }
for ( $i = 0; $i < $fors; $i++ ) {
## 取本店最大流水 + 1(代码待改进) !!!!!
$que = "select sdbh ";
$que.= " from ".$xoopsDB->prefix("market_mdseri");
$que.= " where store_id='".$_REQUEST['s_id0']."' order by sdbh desc limit 0,1";
$res = $xoopsDB->query($que);
$row = $xoopsDB->fetchrow($res);
$sdbh0 = $row[0] + 1;
## echo "<hr />$que<hr />\n";
## 取本店最大流水 + 1 !!!!!
if ( $aa == 1 ) { $sp_code=$_REQUEST['sp_code_a0'];$sp_bg=$_REQUEST['p_a0'];$zy='kczj';$sm=$_REQUEST['ar0']; }
if ( $ss == 1 ) { $sp_code=$_REQUEST['sp_code_s0'];$sp_bg=$_REQUEST['p_s0'];$zy='kcjs';$sm=$_REQUEST['sr0'];$ss=2; }
$ins = "insert into ".$xoopsDB->prefix("market_mdseri");
$ins .= " (bh,store_id,sdbh,bdxh,sp_code,date_q,date_h,xssl,rz_user_id,shbz,zy,oth_read) values ";
$ins .= " (0,'".$_REQUEST['s_id0']."',".$sdbh0.",1,'".$sp_code."','".$_REQUEST['curr_time0']."',now(),".$sp_bg.",".$xoopsUser->getVar('uid').",'0','".$zy."','".$sm."')";
## echo $ins."<hr />\n";
$in0 = $xoopsDB->queryF($ins);
if ( $in0 ) echo "操作已完成!\n";
}
echo "<hr /><center><input type='button' value='关闭窗口' onclick='returnValue=1;window.close();' /></center>\n";
} else {
?>
<script language='javascript'>
<!--
function chk_sl() {
var pa = Number(document.getElementById('p_a0').value);
var ps = Number(document.getElementById('p_s0').value);
if ( pa <= 0 && ps <= 0 ) return false;
else return true;
}
// -->
</script>
<form action='<?php echo $_SERVER['PHP_SELF']; ?>' name='frj' method='post' onSubmit='javascript:return chk_sl();'>
<font style='font-size:24px;color:#f00;'>商品库存调整</font><hr />
时间:<input type='text' name='curr_time0' value='' size='19' readonly /><br /><br />
<input type='hidden' name='smit0' value='1' />
<input type='hidden' name='s_id0' value='<? echo $_REQUEST['s_id0']; ?>' />
<center>增加(借)商品<hr style='width:260px;height:2px;color:#00ffff;' /></center>
唯一店内码:<input type='text' name='sp_code_a0' value='0' size='13' maxlength='13' /><br />
数量:<input type='text' name='p_a0' value='0' size='10' maxlength='10' />
交易留言:<input type='text' name='ar0' value='' /><hr />
<center><hr style='width:390px;height:6px;color:#0000ff;' /></center>
<center>减少(贷)商品<hr style='width:260px;height:2px;color:#00ffff;' /></center>
唯一店内码:<input type='text' name='sp_code_s0' value='0' size='13' maxlength='13' /><br />
数量:<input type='text' name='p_s0' value='0' size='10' maxlength='10' />
交易留言:<input type='text' name='sr0' value='' /><hr />
<script language='javascript'>
<!--
today = new Date();
yy = today.getYear(); mm = today.getMonth() + 1; dd = today.getDate();
hh = today.getHours(); mi = today.getMinutes(); ss = today.getSeconds();
if (mm <= 9) mm = "0" + mm; if (dd <= 9) dd = "0" + dd;
if (hh <= 9) hh = "0" + hh; if (mi <= 9) mi = "0" + mi; if (ss <= 9) ss = "0" + ss;
var clocktext = yy + "-" + mm + "-" + dd + " " + hh + ":" + mi + ":" + ss;
document.getElementById("curr_time0").value = clocktext;
// -->
</script>
<input type='reset' name='s01' value='取消' onclick='javascript:window.close();' />
<input type='submit' name='s02' value='确定' />
</form>
<?php
}
include_once '../../footer.php';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -