代码拉取完成,页面将自动刷新
同步操作将从 gujiejing/WEBWMS 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
require_once('connDB.php');
$id = " ";
$custidt=" ";
$custcnt=" ";
$custent= " ";
$addrt=" ";
$telt=" ";
$contactt=" ";
$typet = " ";
if(isset($_POST['custid'])){
//echo $_POST['custid'];
$id = $_POST['id'];
//echo $id;
$custidt = $_POST['custid'];
$custcnt = $_POST['custcn'];
$custent = $_POST['custen'];
$addrt = $_POST['addr'];
$telt = $_POST['tel'];
$contactt = $_POST['contact'];
$typet = $_POST['type'];
$sql="UPDATE cust SET custid = '$custidt', ".
"custcn = '$custcnt', ".
"custen = '$custent', ".
"addr = '$addrt', ".
"tel = '$telt', ".
"contact = '$contactt', ".
"type = '$typet' ".
"WHERE cust.id = $id ";
//$sql="UPDATE cust SET custid = '$_POST['custid']', custcn = '$_POST['custcn']', custen = '$_POST['custen']', addr = '$_POST['addr']', tel = '$_POST['tel']', contact = '$_POST['contact']' WHERE cust.id = $id ";
echo $sql;
mysql_query($sql,$dbc);
mysql_close($dbc);
header("Location: " ."cust.php" );
/*
UPDATE cust SET custid = 'Test5',
custcn = '测试客户5',
custen = 'Test5 Customer',
addr = 'wuwuwuwuw',
tel = '1123400234',
contact = 'woziji' WHERE cust.id =2;
*/
}
if(isset($_GET['id'])){
$id = $_GET['id'];
$dbc = mysql_connect("localhost","root","root");
mysql_select_db("webwms",$dbc);
mysql_query("set names utf8");
$sql="SELECT * FROM cust WHERE id = $id;";
$result = mysql_query($sql,$dbc);
$row_Rec = mysql_fetch_assoc($result);
echo json_encode($row_Rec);
return;
}
/*
if(isset($_GET['id'])){
//echo $_GET['id'];
$id = $_GET['id'];
$dbc = mysql_connect("localhost","root","root");
mysql_select_db("webwms",$dbc);
mysql_query("set names utf8");
$sql="SELECT * FROM cust WHERE id = $id;";
$result = mysql_query($sql,$dbc);
$row_Rec = mysql_fetch_assoc($result);
echo '<form action="modcust.php" method="POST">';
echo '<input name="id" type="hidden" id="id" value="'.
$id .'"/>';
echo '<label>客户ID</label>';
echo '<input type="text" id="custid" = name="custid" value="'.$row_Rec['custid'].'" /><br>(*只可英文字符,不可为空*)<br>';
echo '<label>客户中文名</label>';
echo '<input type="text" id="custcn" = name="custcn" value="'.$row_Rec['custcn'].'" /><br>';
echo '<label>客户英文名</label>';
echo '<input type="text" id="custen" = name="custen" value="'.$row_Rec['custen'].'" /><br>';
echo '<label>客户地址</label>';
echo '<input type="text" id="addr" = name="addr" value="'.$row_Rec['addr'].'" /><br>';
echo '<label>客户电话</label>';
echo '<input type="text" id="tel" = name="tel" value="'.$row_Rec['tel'].'" /><br>';
echo '<label>客户联系人</label>';
echo '<input type="text" id="contact" = name="contact" value="'.$row_Rec['contact'].'" /><br>';
echo '<input type="submit" value="Update" name="submit" />';
echo '</form>';
mysql_free_result($result);
mysql_close($dbc);
}
*/
//SELECT * FROM cust WHERE id =2
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。