delete.php

来自「极限网络智能办公系统 Office Automation V3.0官方100%源」· PHP 代码 · 共 41 行

PHP
41
字号
<?
include_once("inc/auth.php");
include_once("inc/utility_all.php");
?>

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body class="bodycolor" topmargin="5">

<?
   $query="select TRANS_QTY,PRO_ID from OFFICE_TRANSHISTORY where TRANS_ID='$TRANS_ID'";
   $cursor1= exequery($connection,$query);
   if($ROW=mysql_fetch_array($cursor1))
   {
   	$MOD_STOCK=$ROW["TRANS_QTY"]*(-1);
    $PRO_ID=$ROW["PRO_ID"];
   }

   //--------修改库存---------
   $query="select PRO_STOCK from OFFICE_PRODUCTS where PRO_ID='$PRO_ID'";
   $cursor1= exequery($connection,$query);
   if($ROW=mysql_fetch_array($cursor1))
   $PRO_STOCK=$ROW["PRO_STOCK"];
   $PRO_STOCK=$PRO_STOCK+$TRANS_QTY+$MOD_STOCK;
   $query="update OFFICE_PRODUCTS set PRO_STOCK='$PRO_STOCK' where PRO_ID='$PRO_ID'";
   exequery($connection,$query);
   //------------------------

   $query="delete from OFFICE_TRANSHISTORY where TRANS_ID='$TRANS_ID'";
   exequery($connection,$query);

  header("location:record.php");
?>

</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?