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

📄 new.php

📁 极限网络智能办公系统 - Office Automation 2008 官方100% 源码
💻 PHP
字号:
<?php
 

include_once( "inc/auth.php" );
include_once( "inc/utility_all.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<script Language=\"JavaScript\">\r\nfunction CheckForm()\r\n{\r\n\r\n   if(document.form1.TO_ID.value==\"\")\r\n   { alert(\"费用人员不能为空!\");\r\n     return (false);\r\n   }\r\n   if(document.form1.BILL_DATE.value==\"\")\r\n   { alert(\"费用日期不能为空!\");\r\n     return (false);\r\n   }\r\n\r\n   document.form1.submit();\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.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:215px;dialogTop:\"+mytop+\"px;dialogLeft:\"+myleft+\"px\");\r\n}\r\nfunction LoadWindow()\r\n{\r\n  URL=\"/module/user_select_single\";\r\n  loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;\r\n  loc_y=document.body.scrollTop+event.clientY-event.offsetY+200;\r\n  window.showModalDialog(URL,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:350px;dialogHeight:350px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n";
if ( $INFO_ID != "" )
{
	$query = "SELECT * from BILL_INFO where INFO_ID=".$INFO_ID;
	$cursor = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor ) )
	{
		$ITEM_ID = $ROW['ITEM_ID'];
		$DEPT_ID = $ROW['DEPT_ID'];
		$PRICE = $ROW['PRICE'];
		$USER_ID = $ROW['USER_ID'];
		$BILL_DATE = $ROW['BILL_DATE'];
		$REMARK = $ROW['REMARK'];
		if ( $BILL_DATE == "0000-00-00" )
		{
			$BILL_DATE = "";
		}
	}
	$query = "SELECT USER_NAME from USER where USER_ID='".$USER_ID."'";
	$cursor = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor ) )
	{
		$USER_NAME = $ROW['USER_NAME'];
	}
}
echo "<table border=\"0\" width=\"90%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n  <tr>\r\n    <td class=\"Big\"><img src=\"/images/notify_new.gif\" align=\"absmiddle\"><span class=\"big3\"> ";
if ( $INFO_ID != "" )
{
	echo "修改";
}
else
{
	echo "新建";
}
echo "费用</span>\r\n    </td>\r\n  </tr>\r\n</table>\r\n\r\n<table border=\"0\" width=\"60%\" cellpadding=\"2\" cellspacing=\"1\" align=\"center\" bgcolor=\"#000000\" class=\"small\">\r\n  <form enctype=\"multipart/form-data\" action=\"add.php\"  method=\"post\" name=\"form1\">\r\n   <tr>\r\n    <td nowrap class=\"TableContent\">部门:</td>\r\n    <td nowrap class=\"TableContent\">\r\n        <select name=\"DEPT_ID\" class=\"BigSelect\">\r\n";
echo my_dept_tree( 0, $DEPT_ID, 1 );
echo "        </select>\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=\"text\" name=\"TO_NAME\" size=\"15\" class=\"BigStatic\" readonly value=\"";
echo $USER_NAME;
echo "\">\r\n         <input type=\"button\" value=\"选择\" class=\"SmallButton\" onClick=\"LoadWindow()\" title=\"指定费用人员\" name=\"button\">\r\n\t\t<input type=\"hidden\" name=\"TO_ID\" value=\"";
echo $USER_ID;
echo "\">\r\n\t  </td>\r\n    </tr>\r\n    <tr>\r\n      <td nowrap class=\"TableData\">费用项目:</td>\r\n      <td class=\"TableData\">\r\n        <select name=\"ITEM_ID\" class=\"BigSelect\">\r\n          <option value=\"\"></option>\r\n";
$query = "SELECT * from BILL_ITEM ORDER BY ITEM_ID";
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	$ITEM_ID1 = $ROW['ITEM_ID'];
	$ITEM_NAME = $ROW['ITEM_NAME'];
	echo "          <option value=\"";
	echo $ITEM_ID1;
	echo "\" ";
	if ( $ITEM_ID1 == $ITEM_ID )
	{
		echo "selected";
	}
	echo ">";
	echo $ITEM_NAME;
	echo "</option>\r\n";
}
echo "\t\t</select>&nbsp;\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td nowrap class=\"TableData\">费用日期:</td>\r\n      <td class=\"TableData\">\r\n\t\t<input type=\"text\" name=\"BILL_DATE\" size=\"10\" maxlength=\"10\" class=\"BigInput\" value=\"";
echo $BILL_DATE;
echo "\">\r\n\t\t<img src=\"/images/menu/calendar.gif\" border=\"0\" style=\"cursor:hand\" onclick=\"td_calendar('form1.BILL_DATE');\">\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=\"text\" name=\"PRICE\" size=\"10\" maxlength=\"20\" class=\"BigInput\" value=\"";
echo $PRICE;
echo "\">\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=\"text\" name=\"REMARK\" size=\"30\" maxlength=\"80\" class=\"BigInput\" value=\"";
echo $REMARK;
echo "\">\r\n      </td>\r\n    </tr>\r\n    <tr align=\"center\" class=\"TableControl\">\r\n      <td colspan=\"2\" nowrap>\r\n        <input type=\"hidden\" name=\"INFO_ID\" value=\"";
echo $INFO_ID;
echo "\">\r\n        <input type=\"hidden\" name=\"CUR_PAGE\" value=\"";
echo $CUR_PAGE;
echo "\">\r\n        <input type=\"button\" value=\"保存\" class=\"BigButton\" onclick=\"CheckForm();\">&nbsp;&nbsp;\r\n        <input type=\"reset\" value=\"重填\" class=\"BigButton\">&nbsp;&nbsp;\r\n";
if ( $INFO_ID != "" )
{
	echo "        <input type=\"button\" value=\"返回\" class=\"BigButton\" onclick=\"location='index1.php?CUR_PAGE=\$CUR_PAGE'\">\r\n";
}
echo "      </td>\r\n    </tr>\r\n  </table>\r\n</form>\r\n\r\n</body>\r\n</html>";
?>

⌨️ 快捷键说明

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