📄 new.php
字号:
<?php
include_once( "inc/auth.php" );
echo "\r\n<html>\r\n<head>\r\n<title>新建销售记录</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n\r\n";
echo "<s";
echo "cript Language=\"JavaScript\">\r\nfunction CheckForm()\r\n{\r\n if(document.form1.CUSTOMER_ID.value==\"\")\r\n { alert(\"客户不能为空!\");\r\n return (false);\r\n }\r\n if(document.form1.PRODUCT_ID.value==\"\")\r\n { alert(\"产品不能为空!\");\r\n return (false);\r\n }\r\n}\r\n\r\nfunction LoadWindow1()\r\n{\r\n URL=\"/general/sale/sale_history/customer_select\";\r\n loc_x=document.body.scrollLeft+event.clientX-event.";
echo "offsetX-100;\r\n loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;\r\n window.showModalDialog(URL,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:245px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n}\r\nfunction LoadWindow2()\r\n{\r\n URL=\"/general/sale/sale_history/product_select\";\r\n loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;\r\n ";
echo " loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;\r\n window.showModalDialog(URL,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:245px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n}\r\n\r\nfunction td_calendar(fieldname)\r\n{\r\n myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;\r\n mytop=document.body.scrollTop+event.clientY-event.offse";
echo "tY+140;\r\n\r\n window.showModalDialog(\"/inc/calendar.php?FIELDNAME=\"+fieldname,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:205px;dialogTop:\"+mytop+\"px;dialogLeft:\"+myleft+\"px\");\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\" onload=\"document.form1.CUSTOMER_NAME.focus();\">\r\n\r\n";
$connection = openconnection( );
$query = "select count(*) from SALE_HISTORY";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$HISTORY_COUNT = $ROW[0];
}
echo "\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n <td class=\"Big\"><img src=\"/images/notify_new.gif\" align=\"absmiddle\">";
echo "<s";
echo "pan class=\"big3\"> 新建销售记录(销售记录总数 <font color=\"FF0000\">";
echo $HISTORY_COUNT;
echo " </font>)</span>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<table border=\"0\" cellspacing=\"1\" width=\"450\" class=\"small\" bgcolor=\"#000000\" cellpadding=\"3\" align=\"center\" >\r\n <form action=\"add.php\" method=\"post\" name=\"form1\" onsubmit=\"return CheckForm();\"> \r\n <tr>\r\n <td nowrap class=\"TableData\">客户: </td>\r\n <td class=\"TableData\">\r\n <input type=\"hidden\" name=\"CUSTOMER_ID\" value=\"";
echo $CUSTOMER_ID;
echo "\">\r\n <input type=\"text\" name=\"CUSTOMER_NAME\" class=\"BigStatic\" size=\"33\" maxlength=\"100\" readonly value=\"";
echo $CUSTOMER_NAME;
echo "\"> \r\n <input type=\"button\" value=\"选 择\" class=\"SmallButton\" onClick=\"LoadWindow1()\" title=\"选择客户\" name=\"button\">\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\">产品: </td>\r\n <td class=\"TableData\">\r\n <input type=\"hidden\" name=\"PRODUCT_ID\" value=\"";
echo $PRODUCT_ID;
echo "\">\r\n <input type=\"text\" name=\"PRODUCT_NAME_TYPE\" class=\"BigStatic\" size=\"33\" maxlength=\"100\" readonly value=\"";
echo $PRODUCT_NAME_TYPE;
echo "\"> \r\n <input type=\"button\" value=\"选 择\" class=\"SmallButton\" onClick=\"LoadWindow2()\" title=\"选择产品\" name=\"button\">\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\">销售日期: </td>\r\n <td nowrap class=\"TableData\">\r\n <input type=\"text\" name=\"DATE\" class=\"BigInput\" size=\"33\" maxlength=\"10\" value=\"";
echo $DATE;
echo "\"> \r\n <img src=\"/images/menu/calendar.gif\" border=\"0\" style=\"cursor:hand\" onclick=\"td_calendar('form1.DATE');\">\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td nowrap class=\"TableData\" width=\"120\">数量:</td>\r\n <td nowrap class=\"TableData\">\r\n <input type=\"text\" name=\"AMT\" class=\"BigInput\" size=\"33\" maxlength=\"11\" value=\"";
echo $AMT;
echo "\"> \r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td nowrap class=\"TableData\" width=\"120\">价格:</td>\r\n <td nowrap class=\"TableData\">\r\n <input type=\"text\" name=\"PRICE\" class=\"BigInput\" size=\"33\" maxlength=\"25\" value=\"";
echo $PRICE;
echo "\"> \r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\" width=\"120\">折扣:</td>\r\n <td nowrap class=\"TableData\">\r\n <input type=\"text\" name=\"DISCOUNT\" class=\"BigInput\" size=\"33\" maxlength=\"100\" value=\"";
echo $DISCOUNT;
echo "\"> \r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\" width=\"120\">销售员:</td>\r\n <td nowrap class=\"TableData\">\r\n <input type=\"text\" name=\"SALESMAN\" class=\"BigInput\" size=\"33\" maxlength=\"100\" value=\"";
echo $SALESMAN;
echo "\"> \r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\">备注: </td>\r\n <td nowrap class=\"TableData\">\r\n <textarea cols=37 rows=3 name=\"MEMO\" class=\"BigInput\" wrap=\"yes\">";
echo $MEMO;
echo "</textarea>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableControl\" colspan=\"2\" align=\"center\">\r\n <input type=\"submit\" value=\"确定\" class=\"BigButton\" title=\"新建销售记录\" name=\"button\"> \r\n <input type=\"button\" value=\"返回\" class=\"BigButton\" onclick=\"location='index.php'\">\r\n </td>\r\n </tr>\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -