📄 new.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";
echo "<s";
echo "cript Language=\"JavaScript\">\r\nfunction CheckForm()\r\n{\r\n if(document.form1.FLOW_TITLE.value==\"\")\r\n { alert(\"考核任务标题不能空!!\");\r\n \t form1.FLOW_TITLE.focus()\r\n return (false);\r\n }\r\n\r\n if(document.form1.TO_ID.value==\"\")\r\n { alert(\"被考核人不能空!!\");\r\n return (false);\r\n }\r\n\r\n if(document.form1.SECRET_TO_ID.value==\"\")\r\n { alert(\"考核人不能空!!\");\r\n return (false";
echo ");\r\n }\r\n\r\n\r\n if(document.form1.GROUP_ID.value==\"\")\r\n { alert(\"考核指标集不能空!!\");\r\n return (false);\r\n }\r\n if(document.form1.BEGIN_DATE.value!=\"\" & document.form1.END_DATE.value!=\"\")\r\n {\r\n \t if (DateCompare(document.form1.BEGIN_DATE.value,document.form1.END_DATE.value)==\"0\")\r\n \t {\r\n \t \talert(\"终止日期不能小于生效日期!!\");\r\n return (false);\r\n }\r\n }";
echo "\r\n\r\n document.form1.submit();\r\n}\r\n\r\nfunction DateCompare(datestr1,datestr2){\r\n\r\n var miStart = Date.parse(datestr1.replace(/-/g,'/'));\r\n var miEnd = Date.parse(datestr2.replace(/-/g,'/'));\r\n if((miEnd-miStart)<=0) return 0;\r\n return 1;\r\n\r\n}\r\n\r\nfunction clear_dept()\r\n{\r\n document.form1.TO_NAME.value=\"\";\r\n document.form1.TO_ID.value=\"\";\r\n}\r\n\r\nfunction clear_dept1()\r\n{\r\n document.form1.SECRET_T";
echo "O_NAME.value=\"\";\r\n document.form1.SECRET_TO_ID.value=\"\";\r\n}\r\n\r\nfunction LoadWindow()\r\n{\r\n URL=\"/module/user_select?MANAGE_FLAG=1\";\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:1;status:0;help:0;resizable:1;dialogWidth:400px;dialogHeight:330px;dialogTop:\"+";
echo "loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n\r\n }\r\n\r\nfunction LoadWindow1()\r\n{\r\n URL=\"/module/user_select?ID=1\";\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:350px;dialogHeight:300px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_";
echo "x+\"px\");\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:205px;dialogTop:\"+mytop+\"px;dialogLeft:\"+myleft+\"px\");\r\n}\r\n</scri";
echo "pt>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n";
if ( $FLOW_ID != "" )
{
$query = "SELECT * from SCORE_FLOW where FLOW_ID={$FLOW_ID}";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$GROUP_ID = $ROW['GROUP_ID'];
$FLOW_TITLE = $ROW['FLOW_TITLE'];
$FLOW_DESC = $ROW['FLOW_DESC'];
$FLOW_FLAG = $ROW['FLOW_FLAG'];
$BEGIN_DATE = $ROW['BEGIN_DATE'];
$END_DATE = $ROW['END_DATE'];
$RANKMAN = $ROW['RANKMAN'];
$PARTICIPANT = $ROW['PARTICIPANT'];
$ANONYMITY = $ROW['ANONYMITY'];
if ( $BEGIN_DATE == "0000-00-00" )
{
$BEGIN_DATE = "";
}
if ( $END_DATE == "0000-00-00" )
{
$END_DATE = "";
}
$RAN_NAME = "";
$TOK = strtok( $RANKMAN, "," );
while ( $TOK != "" )
{
$query1 = "select * from USER where USER_ID='{$TOK}'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$RAN_NAME .= $ROW['USER_NAME'].",";
}
$TOK = strtok( "," );
}
$PARTI_NAME = "";
$TOK = strtok( $PARTICIPANT, "," );
while ( $TOK != "" )
{
$query1 = "select * from USER where USER_ID='{$TOK}'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$PARTI_NAME .= $ROW['USER_NAME'].",";
}
$TOK = strtok( "," );
}
}
}
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\">";
echo "<s";
echo "pan class=\"big3\"> ";
if ( $FLOW_ID == "" )
{
echo "新建";
}
else
{
echo "编辑";
}
echo "考核任务</span>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<table border=\"0\" width=\"70%\" 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 \t<tr>\r\n <td nowrap class=\"TableData\">考核任务标题:</td>\r\n <td class=\"TableData\">\r\n <input type=\"text\" name=\"FLOW_TITLE\" size=\"40\" maxlength=\"40\" c";
echo "lass=\"BigInput\" value=\"";
echo $FLOW_TITLE;
echo "\">\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td nowrap class=\"TableData\">考核人:</td>\r\n <td class=\"TableData\">\r\n <input type=\"hidden\" name=\"SECRET_TO_ID\" value=\"";
echo $RANKMAN;
echo "\">\r\n <textarea cols=40 name=\"SECRET_TO_NAME\" rows=\"3\" class=\"BigStatic\" wrap=\"yes\" readonly>";
echo $RAN_NAME;
echo "</textarea>\r\n <input type=\"button\" value=\"添 加\" class=\"SmallButton\" onClick=\"LoadWindow1()\" title=\"添加\" name=\"button\">\r\n <input type=\"button\" value=\"清 空\" class=\"SmallButton\" onClick=\"clear_dept1()\" title=\"清空\" name=\"button\">\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td nowrap class=\"TableData\">被考核人:</td>\r\n <td class=\"TableData\">\r\n <input type=\"hidden\" name=\"";
echo "TO_ID\" value=\"";
echo $PARTICIPANT;
echo "\">\r\n <textarea cols=40 name=TO_NAME rows=5 class=\"BigStatic\" wrap=\"yes\" readonly>";
echo $PARTI_NAME;
echo "</textarea>\r\n <input type=\"button\" value=\"添 加\" class=\"SmallButton\" onClick=\"LoadWindow()\" title=\"添加\" name=\"button\">\r\n <input type=\"button\" value=\"清 空\" class=\"SmallButton\" onClick=\"clear_dept()\" 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=\"checkbox\" name";
echo "=\"FLOW_FLAG\" id=\"Id_FLOWFLAG\" ";
if ( $FLOW_FLAG == "1" )
{
echo "checked";
}
echo " ><label for=\"Id_FLOWFLAG\">按照管理范围</label>\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td nowrap class=\"TableData\">考核指标集:</td>\r\n <td class=\"TableData\">\r\n ";
echo "<s";
echo "elect name=\"GROUP_ID\" class=\"BigSelect\">\r\n";
$query = "SELECT * from SCORE_GROUP";
$connection = openconnection( );
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$GROUPID = $ROW['GROUP_ID'];
$GROUPNAME = $ROW['GROUP_NAME'];
echo " <option value=\"";
echo $GROUPID;
echo "\" ";
if ( $GROUPID == $GROUP_ID )
{
echo "selected";
}
echo ">";
echo $GROUPNAME;
echo "</option>\r\n";
}
echo " </select>\r\n\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td nowrap class=\"TableData\"> 匿名:</td>\r\n <td class=\"TableData\">\r\n <input type=\"checkbox\" name=\"ANONYMITY\" id=\"Id_ANONYMITY\" ";
if ( $ANONYMITY == "1" )
{
echo "checked";
}
echo "><label for=\"Id_ANONYMITY\">允许匿名</label>\r\n </td>\r\n </tr>\r\n <tr>\r\n\r\n <td nowrap class=\"TableData\"> 有效期:</td>\r\n <td class=\"TableData\">\r\n 生效日期:<input type=\"text\" name=\"BEGIN_DATE\" size=\"10\" maxlength=\"10\" class=\"BigInput\" value=\"";
echo $BEGIN_DATE;
echo "\">\r\n <img src=\"/images/menu/calendar.gif\" border=\"0\" style=\"cursor:hand\" onclick=\"td_calendar('form1.BEGIN_DATE');\">\r\n 为空为立即生效<br>\r\n 终止日期:<input type=\"text\" name=\"END_DATE\" size=\"10\" maxlength=\"10\" class=\"BigInput\" value=\"";
echo $END_DATE;
echo "\">\r\n <img src=\"/images/menu/calendar.gif\" border=\"0\" style=\"cursor:hand\" onclick=\"td_calendar('form1.END_DATE');\">\r\n 为空为手动终止\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=\"checkbox\" name=\"SMS_REMIND\" id=\"SMS\" checked><label for=\"SMS\">使用内部短消息提醒</label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <t";
echo "d nowrap class=\"TableData\">描述:</td>\r\n <td class=\"TableData\">\r\n <textarea name=\"FLOW_DESC\" cols=\"45\" rows=\"5\" class=\"BigInput\">";
echo $FLOW_DESC;
echo "</textarea>\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=\"FLOW_ID\" value=\"";
echo $FLOW_ID;
echo "\">\r\n <input type=\"button\" value=\"发布\" class=\"BigButton\" onclick=\"CheckForm();\"> \r\n\r\n";
if ( $FLOW_ID == "" )
{
echo " <input type=\"reset\" value=\"重填\" class=\"BigButton\"> \r\n";
}
if ( $FLOW_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 + -