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

📄 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   if(document.form1.BOOK_NAME.value==\"\")\r\n   { alert(\"书名不能为空!\");\r\n     return (false);\r\n   }\r\n   \r\n   if(document.form1.BOOK_NO.value==\"\")\r\n   { alert(\"编号不能为空!\");\r\n     return (false);\r\n   }\r\n}\r\n\r\nfunction delete_all()\r\n{\r\n msg='确认要删除全部图书吗?';\r\n if(window.confirm(msg))\r\n {\r\n  URL=\"delete_all.php\";\r\n  window.location=URL;\r\n }\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.open(\"/inc/calendar.php?FIELDNAME=\"+fieldname,\"td_calendar\",\"height=176,width=240,status=0,toolbar=no,menubar=no,location=no,scrollbars=no,top=\"+mytop+\",left=\"+myleft+\",resizable=yes\");\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\n\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n";
$connection = openconnection( );
$query = "select * from BOOK_TYPE";
$cursor = exequery( $connection, $query );
if ( !( $ROW = mysql_fetch_array( $cursor ) ) )
{
	echo "    <body class=\"bodycolor\" topmargin=\"5\">\r\n";
	message( "提示", "请首先定义图书类别" );
	button_back( );
	exit( );
}
echo "\r\n<body class=\"bodycolor\" topmargin=\"5\" onload=\"document.form1.BOOK_NAME.focus();\">\r\n\r\n";
$query = "SELECT * from USER where USER_ID='".$LOGIN_USER_ID."'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
	$POST_PRIV = $ROW['POST_PRIV'];
	$POST_DEPT = $ROW['POST_DEPT'];
}
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\"><span class=\"big3\"> 新建图书</span>\r\n    </td>\r\n  </tr>\r\n</table>\r\n\r\n<table border=\"0\" cellspacing=\"1\" width=\"500\" 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 nowrap class=\"TableData\">\r\n        <select name=\"DEPT_ID\" class=\"BigSelect\">\r\n";
echo my_dept_tree( 0, $LOGIN_DEPT_ID, 0 );
echo "        </select>\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=\"BOOK_NAME\" class=\"BigInput\" size=\"33\" maxlength=\"100\" value=\"";
echo $BOOK_NAME;
echo "\">&nbsp;\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=\"BOOK_NO\" class=\"BigInput\" size=\"33\" maxlength=\"100\" value=\"";
echo $BOOK_NO;
echo "\">&nbsp;\r\n    </td>\r\n   </tr>\r\n   <tr>\r\n    <td nowrap class=\"TableData\">图书类别:</td>\r\n    <td nowrap class=\"TableData\">\r\n        <select name=\"TYPE_ID\" class=\"BigSelect\">\r\n";
echo my_booktype_tree( 0, 0 );
echo "\r\n        </select>\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=\"AUTHOR\" class=\"BigInput\" size=\"33\" maxlength=\"100\" value=\"";
echo $AUTHOR;
echo "\">&nbsp;\r\n    </td>\r\n   </tr>\r\n   <tr>\r\n    <td nowrap class=\"TableData\" width=\"120\">ISBN号:</td>\r\n    <td nowrap class=\"TableData\">\r\n        <input type=\"text\" name=\"ISBN\" class=\"BigInput\" size=\"33\" maxlength=\"100\" value=\"";
echo $ISBN;
echo "\">&nbsp;\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=\"PUB_HOUSE\" class=\"BigInput\" size=\"33\" maxlength=\"100\" value=\"";
echo $PUB_HOUSE;
echo "\">&nbsp;\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=\"PUB_DATE\" class=\"BigInput\" size=\"30\" maxlength=\"10\" value=\"";
echo $PUB_DATE;
echo "\">&nbsp;\r\n        <img src=\"/images/menu/calendar.gif\" border=\"0\" style=\"cursor:hand\" onclick=\"td_calendar('form1.PUB_DATE');\">\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      <textarea cols=37 rows=3 name=\"BRIEF\" class=\"BigInput\" wrap=\"yes\">";
echo $BRIEF;
echo "</textarea>\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=\"BORR_PERSON\" class=\"BigStatic\" size=\"33\" maxlength=\"100\" value=\"";
echo $LOGIN_USER_NAME;
echo "\" readonly>&nbsp;\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=\"MEMO\" class=\"BigInput\" size=\"33\" maxlength=\"100\" value=\"";
echo $MEMO;
echo "\">&nbsp;\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\">&nbsp;\r\n        <input type=\"button\" value=\"返回\" class=\"BigButton\" onclick=\"location='index.php'\">\r\n    </td>\r\n   </tr>\r\n  </form>\r\n</table>\r\n\r\n</body>\r\n</html>\r\n";
?>

⌨️ 快捷键说明

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