📄 add.php
字号:
<?
include("../../../include/include.inc");
$GetCustomer = mysql_db_query($_dbname,"SELECT primid FROM tbl_customer WHERE customer='$name'");
if(mysql_num_rows($GetCustomer)>0)
{
print("<script langue=javascript>alert(\"增加客户失败,该客户已经存在!\")</script>");
print("<script langue=javascript>history.back();</script>");
}
else
{
mysql_db_query($_dbname,"INSERT INTO tbl_customer(customer,tel,contact,contacttel,passwd,address,logo,qq,fax,web) VALUES('$name','$tel','$contact','$contacttel','$passwd','$address','$logo','$qq','$fax','$web')");
$primid = mysql_insert_id();
if($logo != "")
{
$LogoArr = explode(".",$logo_name);
$LogoName = $LogoArr[0];
$LogoExt = $LogoArr[1];
$CopyResult = copy($logo,"../../../upload/customer/$primid.$LogoExt");
mysql_db_query($_dbname,"UPDATE tbl_customer SET logo='$LogoName',ext='$LogoExt' WHERE primid='$primid'");
}
}
?>
<meta HTTP-EQUIV='Refresh' Content='0;URL=../../index.php?inc=customer'>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -