⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sale_log.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 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";
echo "<s";
echo "cript>\r\nfunction LoadWindow1()\r\n{\r\n  URL=\"/general/sale/sale_history/customer_select\";\r\n  loc_x=document.body.scrollLeft+event.clientX-event.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:400px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n}\r\n\r\nfunc";
echo "tion 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  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:400px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n}\r\n\r\nfunction td_calen";
echo "dar(fieldname)\r\n{\r\n  myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;\r\n  mytop=document.body.scrollTop+event.clientY-event.offsetY+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\r\nfunction search_click(){\r\n\tvar ur";
echo "l\t= \"search.php\";\r\n\tlocation = url;\r\n}\r\n\r\nfunction del(history_id)\r\n{\r\n\tvar msg\t= \"你确认要删除所选记录吗?\";\r\n\tif(window.confirm(msg))\r\n\t{\r\n\t\tvar url\t= \"delete.php?history_id=\"+history_id+\"&cur_page=";
echo $cur_page;
echo "&sens=";
echo $_REQUEST['sens'];
echo "&order=";
echo $_REQUEST['order'];
echo "&del_r=index_r\";\r\n\t\tlocation = url;\r\n\t}\r\n}\r\n\r\nfunction edt(history_id)\r\n{\r\n\tvar url\t= \"edit.php?history_id=\"+history_id;\r\n\tlocation = url;\r\n}\r\n\r\nfunction customer_detail(customer_id)\r\n{\r\n\tvar url\t= \"../../crm/customer/detail.php?CUSTOMER_ID=\"+customer_id;\r\n\tmyleft=(screen.availWidth-500)/2;\r\n\twindow.open(url,\"\",\"height=400,width=500,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150";
echo ",left=\"+myleft+\",resizable=yes\");\r\n}\r\n\r\nfunction product_detail(product_id)\r\n{\r\n\tvar url\t= \"../../sale/product/manage/detail.php?product_id=\"+product_id;\r\n\twindow.open(url, '', 'height=600,width=800,top=50, left=100,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no, status=yes');\r\n}\r\n\r\nfunction provider_detail(provider_id)\r\n{\r\n\tvar url\t= \"../../provider/manage/detail.php?provider_id=\"";
echo "+provider_id;\r\n\twindow.open(url, '', 'height=600,width=800,top=50, left=100,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no, status=yes');\r\n}\r\n\r\nfunction sale_detail(history_id)\r\n{\r\n\tvar url\t= \"../../sale/sale_history/sale_detail.php?history_id=\"+history_id;\r\n\twindow.open(url, '', 'height=600,width=800,top=50, left=100,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no, ";
echo "status=yes');\r\n}\r\n</script>\r\n</head>\r\n\r\n<body style=\"background-color: transparent\" class=\"bodycolor\" topmargin=\"5\">\r\n";
$connection = openconnection( );
$query = "SELECT p.PRODUCT_NAME, p.PRODUCT_ID, pr.PROVIDER_NAME,pr.PROVIDER_ID, sl.MEMO, sl.HISTORY_ID from product as p, provider as pr, sale_history as sl where pr.PROVIDER_ID=p.PROVIDER_ID and sl.PRODUCT_ID=p.PRODUCT_ID and sl.CUSTOMER_ID=".$_REQUEST['CUSTOMER_ID']."";
$cursor = exequery( $connection, $query );
$count = 0;
echo "<table border=\"0\" cellspacing=\"1\" width=\"100%\" cellpadding=\"5\">\r\n";
while ( $row = mysql_fetch_array( $cursor ) )
{
	++$count;
	$product_id = $row['PRODUCT_ID'];
	$product_name = $row['PRODUCT_NAME'];
	$provider_id = $row['PROVIDER_ID'];
	$provider_name = $row['PROVIDER_NAME'];
	$memo = $row['MEMO'];
	$history_id = $row['HISTORY_ID'];
	if ( $count % 2 == 1 )
	{
		$TableLine = "TableLine1";
	}
	else
	{
		$TableLine = "TableLine2";
	}
	echo "<tr class=\"";
	echo $TableLine;
	echo "\">\r\n\t\t<td nowrap title=\"";
	echo $provider_name;
	echo "\"><a href=\"#\" onclick=\"provider_detail('";
	echo $provider_id;
	echo "');\">";
	echo strlen( $provider_name ) <= 50 ? $provider_name : substr( $provider_name, 0, 50 ).chr( 0 )."...";
	echo "</a></td>\r\n\t\t<td title=\"";
	echo $product_name;
	echo "\"><a href=\"#\" onclick=\"product_detail('";
	echo $product_id;
	echo "');\">";
	echo strlen( $product_name ) <= 50 ? $product_name : substr( $product_name, 0, 50 ).chr( 0 )."...";
	echo "</a></td>\r\n\t\t<td title=\"";
	echo $memo;
	echo "\"><a href=\"#\" onclick=\"sale_detail('";
	echo $history_id;
	echo "');\">";
	echo strlen( $memo ) <= 70 ? $memo : substr( $memo, 0, 70 ).chr( 0 )."...";
	echo "</a></td>\r\n\t</tr>\r\n";
}
echo "<center>";
if ( $count == 0 )
{
	message( "提示", "暂无记录" );
	exit( );
}
echo "</center>";
echo "\t<thead class='TableHeader'>\r\n\t\t<td nowrap>供应商</td>\r\n\t\t<td nowrap>产品</td>\r\n\t\t<td width='60%'>记录内容</td>\r\n\t</thead>\r\n</table>\r\n</body>\r\n</html>";
?>

⌨️ 快捷键说明

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