查看文件: body_mysale_edit.php
大小: 7.97 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <?php if (!isset($_SESSION)){ session_start(); } include "../config.data.php"; if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { $odate=($_POST['pcar']>1)?$_POST['odate']:'' ; $updateSQL = sprintf("UPDATE order_express SET ocar=%s,odate=%s, pcar=%s, pcode=%s WHERE zid=%s", GetSQLValueString($_POST['ocar'], "text"), GetSQLValueString($odate, "date"), GetSQLValueString($_POST['pcar'], "text"), GetSQLValueString($_POST['pcode'], "text"), GetSQLValueString($_POST['zid'], "int")); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($updateSQL, $BE2) or die(mysql_error()); $msg='更新完成!....' ; $updateGoTo = "mysale.html"; echo "<script>alert('".$msg."');location.href='mysale.html';</script>"; } //update `member` set company_title=mem_name WHERE mem_auto>10 and mem_auto<26 //$currentPage ="mysale_eedit.html";// $colname_Rt2 = "-1"; if (isset($_GET['id'])) { $colname_Rt2 = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']); } mysql_select_db($database_BE2, $BE2); // zid $query_Rt2 = sprintf("SELECT a.*,b.mem_name,c.* FROM order_datam as a ,member as b, order_express as c WHERE a.duser=b.mem_auto AND a.dcode=c.dcode AND a.did='%s' ",$colname_Rt2); //,$colname_Rt2 // update order_tmp as a,product_data as b set a.coid=b.company_num where a.mem_auto=b.mem_auto /* fix order_datam add companny id //update order_datam as a,order_datas as b ,product_data as c set a.coid=c.company_num where a.dcode=b.dcode and b.mem_auto=c.mem_auto */ $Rt2 = mysql_query($query_Rt2, $BE2) or die(mysql_error()); $row_Rt2 = mysql_fetch_assoc($Rt2); $totalRows_Rt2 = mysql_num_rows($Rt2); ?> <div class="main "> <div class="row"> <div class="col-lg-12"> <h3 class="page-header"><i class="fa fa-indent"></i>出貨管理</h3> <ol class="breadcrumb"> <li><i class="fa fa-home"></i><a href="index.html">首頁</a></li> <li><i class="fa fa-list-alt"></i><a href="#">定單管理</a></li> <li><i class="fa fa-indent"></i>出貨管理</li> </ol> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="panel panel-default"> <div class="panel-heading"> <h2><i class="fa fa-indent red"></i><strong>出貨管理</strong></h2> </div> <div class="panel-body"> <form action="mysale_edit.html" method="post" name="form1" id="form1" > <div class="form-group"> <label class="col-md-3 control-label" for="ddate">訂單日期:</label> <div class="col-md-9"> <?= $row_Rt2['ddate'];?> <span class="help-block"> </span> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="dcode">訂單編號:</label> <div class="col-md-9"><?= $row_Rt2['dcode'];?> <span class="help-block"> </span> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="dcode">已付款</label> <div class="col-md-9"><?= $row_Rt2['dflag'] ?> <span class="help-block"> </span> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="dcode">付款銀行</label> <div class="col-md-9"><?= $row_Rt2['dbank'] ?> <span class="help-block"> </span> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="dcode">付款方式</label> <div class="col-md-9"> <? echo $pay_ar[$row_Rt2['dpay']];?> <span class="help-block"> </span> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="ocar">物流公司:</label> <div class="col-md-9"> <input type="text" name="ocar" id="ocar" value="<?= $row_Rt2['ocar'];?>" class="form-control" /> <span class="help-block"> </span> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="odate"> 出貨日期</label> <div class="col-md-9"> <input type="text" name="odate" id="odate" value="<?= ($row_Rt2['odate']=='')?date('Y-m-d'):$row_Rt2['odate'];?>" class="form-control" /> <span class="help-block"> </span> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="pcar"> 物流狀態</label> <div class="col-md-9"> <? $pcar_ar=array(",","等待出貨","等待物流攬收","已出貨","買家已收貨"); ?> <select name="pcar" id="pcar" class="form-control placeholder col-xs-4 col-sm-4 mb-4"> <? for($i=1;$i<count($pcar_ar);$i++){ ?> <option value="<?= $i ?>" <?= ($row_Rt2['pcar']==$i)?"selected='selected'":"" ?>> <?=$pcar_ar[$i] ?> </option> <? }?> </select> <span class="help-block"> </span> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="pcar"> 物流單號:</label> <div class="col-md-9"> <input type="text" name="pcode" id="pcode" value="<?= $row_Rt2['pcode'];?>" class="form-control" /> <span class="help-block"></span> </div> </div> <div class="form-group form-actions"> <button type="submit" class="btn btn-primary">保存</button> </div> <input type="hidden" name="MM_update1" value="formpass" /> <input type="hidden" id="zid" name="zid" value="<?= $row_Rt2['zid']; ?>" /> <input type="hidden" id="mem_auto" name="mem_auto" value="<?= $_SESSION['login_memid']; ?>" /> <input type="hidden" name="MM_update" value="form1" /> </form> </div> </div> </div> <!--/row--> </div> <!-- end: Content --> <input type ="button" onclick="javascript:location.href='mysale.html'" value="回到上一頁"></input> </div> <!-- end: Content --> <?php mysql_free_result($Rt2); ?>
保存
取消
返回文件列表