📄 new.php
字号:
<?
include_once 'inc/auth.php';
include_once 'inc/utility_all.php';
echo '
<html>
<head>
<title>新建考核任务</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
echo '<s';
echo 'cript Language="JavaScript">
function CheckForm()
{
if(document.form1.FLOW_TITLE.value=="")
{ alert("考核任务标题不能空!!");
form1.FLOW_TITLE.focus()
return (false);
}
if(document.form1.TO_ID.value=="")
{ alert("被考核人不能空!!");
return (false);
}
if(document.form1.SECRET_TO_ID.value=="")
{ alert("考核人不能空!!");
return (false';
echo ');
}
if(document.form1.GROUP_ID.value=="")
{ alert("考核指标集不能空!!");
return (false);
}
if(document.form1.BEGIN_DATE.value!="" & document.form1.END_DATE.value!="")
{
if (DateCompare(document.form1.BEGIN_DATE.value,document.form1.END_DATE.value)=="0")
{
alert("终止日期不能小于生效日期!!");
return (false);
}
}';
echo '
document.form1.submit();
}
function DateCompare(datestr1,datestr2){
var miStart = Date.parse(datestr1.replace(/-/g,\'/\'));
var miEnd = Date.parse(datestr2.replace(/-/g,\'/\'));
if((miEnd-miStart)<=0) return 0;
return 1;
}
function clear_dept()
{
document.form1.TO_NAME.value="";
document.form1.TO_ID.value="";
}
function clear_dept1()
{
document.form1.SECRET_T';
echo 'O_NAME.value="";
document.form1.SECRET_TO_ID.value="";
}
function LoadWindow()
{
URL="/module/user_select?MANAGE_FLAG=1";
loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
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");
}
function LoadWindow1()
{
URL="/module/user_select?ID=1";
loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:400px;dialogHeight:350px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_';
echo 'x+"px");
}
function td_calendar(fieldname)
{
myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;
mytop=document.body.scrollTop+event.clientY-event.offsetY+140;
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");
}
</scri';
echo 'pt>
</head>
<body class="bodycolor" topmargin="5">
';
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">
<tr>
<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>
</td>
</tr>
</table>
<table border="0" width="70%" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">
<form enctype="multipart/form-data" action="add.php" method="post" name="form1">
<tr>
<td nowrap class="TableData">考核任务标题:</td>
<td class="TableData">
<input type="text" name="FLOW_TITLE" size="40" maxlength="40" c';
echo 'lass="BigInput" value="';
echo $FLOW_TITLE;
echo '">
</td>
</tr>
<tr>
<td nowrap class="TableData">考核人:</td>
<td class="TableData">
<input type="hidden" name="SECRET_TO_ID" value="';
echo $RANKMAN;
echo '">
<textarea cols=40 name="SECRET_TO_NAME" rows="3" class="BigStatic" wrap="yes" readonly>';
echo $RAN_NAME;
echo '</textarea>
<input type="button" value="添 加" class="SmallButton" onClick="LoadWindow1()" title="添加" name="button">
<input type="button" value="清 空" class="SmallButton" onClick="clear_dept1()" title="清空" name="button">
</td>
</tr>
<tr>
<td nowrap class="TableData">被考核人:</td>
<td class="TableData">
<input type="hidden" name="';
echo 'TO_ID" value="';
echo $PARTICIPANT;
echo '">
<textarea cols=40 name=TO_NAME rows=5 class="BigStatic" wrap="yes" readonly>';
echo $PARTI_NAME;
echo '</textarea>
<input type="button" value="添 加" class="SmallButton" onClick="LoadWindow()" title="添加" name="button">
<input type="button" value="清 空" class="SmallButton" onClick="clear_dept()" title="清空" name="button">
</td>
</tr>
<tr>
<td nowrap class="TableData">按照管理范围:</td>
<td class="TableData">
<input type="checkbox" name';
echo '="FLOW_FLAG" id="Id_FLOWFLAG" ';
if (($FLOW_FLAG == '1'))
{
echo 'checked';
}
echo ' ><label for="Id_FLOWFLAG">按照管理范围</label>
</td>
</tr>
<tr>
<td nowrap class="TableData">考核指标集:</td>
<td class="TableData">
';
echo '<s';
echo 'elect name="GROUP_ID" class="BigSelect">
';
$query = 'SELECT * from SCORE_GROUP';
$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>
';
}
echo ' </select>
</td>
</tr>
<tr>
<td nowrap class="TableData"> 匿名:</td>
<td class="TableData">
<input type="checkbox" name="ANONYMITY" id="Id_ANONYMITY" ';
if (($ANONYMITY == '1'))
{
echo 'checked';
}
echo '><label for="Id_ANONYMITY">允许匿名</label>
</td>
</tr>
<tr>
<td nowrap class="TableData"> 有效期:</td>
<td class="TableData">
生效日期:<input type="text" name="BEGIN_DATE" size="10" maxlength="10" class="BigInput" value="';
echo $BEGIN_DATE;
echo '">
<img src="/images/menu/calendar.gif" border="0" style="cursor:hand" onclick="td_calendar(\'form1.BEGIN_DATE\');">
为空为立即生效<br>
终止日期:<input type="text" name="END_DATE" size="10" maxlength="10" class="BigInput" value="';
echo $END_DATE;
echo '">
<img src="/images/menu/calendar.gif" border="0" style="cursor:hand" onclick="td_calendar(\'form1.END_DATE\');">
为空为手动终止
</td>
</tr>
<tr>
<td nowrap class="TableData"> 提醒:</td>
<td class="TableData">
';
echo sms_remind (15);
echo ' </td>
</tr>
<tr>
<td nowrap class="TableData">描述:</td>
<td class="TableData">
<textarea name="FLOW_DESC" cols="45" rows="5" class="BigInput">';
echo $FLOW_DESC;
echo '</textarea>
</td>
</tr>
<tr align="center" class="TableControl">
<td colspan="2" nowrap>
<input type="hidden" name="FLOW_ID" value="';
echo $FLOW_ID;
echo '">
<input type="button" value="发布" class="BigButton" onclick="CheckForm();">
';
if (($FLOW_ID == ''))
{
echo ' <input type="reset" value="重填" class="BigButton">
';
}
if (($FLOW_ID != ''))
{
echo ' <input type="button" value="返回" class="BigButton" onclick="location=\'index1.php?CUR_PAGE=$CUR_PAGE\'">
';
}
echo ' </td>
</tr>
</table>
</form>
</body>
</html>';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -