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

📄 config_edit.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 language=javascript src=\"/inc/calendar/time.js\"></SCRIPT>\r\n";
echo "<S";
echo "CRIPT language=javascript src=\"/inc/common.js\"></SCRIPT>\r\n";
echo "<s";
echo "cript Language=\"JavaScript\">\r\nfunction td_clock1(fieldname)\r\n{\r\n\tmyleft=document.body.scrollLeft+event.clientX-event.offsetX-80;\r\n\tmytop=document.body.scrollTop+event.clientY-event.offsetY+140;\r\n\twindow.showModalDialog(\"/inc/clock1.php?FIELDNAME=\"+fieldname,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:120px;dialogTop:\"+mytop+\"px;dialogLeft:\"+myleft+\"px\");\r\n";
echo "}\r\n\r\nfunction td_clock2(fieldname)\r\n{\r\n\tmyleft=document.body.scrollLeft+event.clientX-event.offsetX-80;\r\n\tmytop=document.body.scrollTop+event.clientY-event.offsetY+140;\r\n\twindow.showModalDialog(\"/inc/clock1.php?FIELDNAME=\"+fieldname,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:120px;dialogTop:\"+mytop+\"px;dialogLeft:\"+myleft+\"px\");\r\n}\r\n\r\nfunction td_clock3(f";
echo "ieldname)\r\n{\r\n\tmyleft=document.body.scrollLeft+event.clientX-event.offsetX-80;\r\n\tmytop=document.body.scrollTop+event.clientY-event.offsetY+140;\r\n\twindow.showModalDialog(\"/inc/clock1.php?FIELDNAME=\"+fieldname,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:120px;dialogTop:\"+mytop+\"px;dialogLeft:\"+myleft+\"px\");\r\n}\r\n\r\nfunction td_clock4(fieldname)\r\n{\r\n\tmyleft=doc";
echo "ument.body.scrollLeft+event.clientX-event.offsetX-80;\r\n\tmytop=document.body.scrollTop+event.clientY-event.offsetY+140;\r\n\twindow.showModalDialog(\"/inc/clock1.php?FIELDNAME=\"+fieldname,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:120px;dialogTop:\"+mytop+\"px;dialogLeft:\"+myleft+\"px\");\r\n}\r\n\r\nfunction td_clock5(fieldname)\r\n{\r\n\tmyleft=document.body.scrollLeft+eve";
echo "nt.clientX-event.offsetX-80;\r\n\tmytop=document.body.scrollTop+event.clientY-event.offsetY+140;\r\n\twindow.showModalDialog(\"/inc/clock1.php?FIELDNAME=\"+fieldname,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:120px;dialogTop:\"+mytop+\"px;dialogLeft:\"+myleft+\"px\");\r\n}\r\n\r\nfunction td_clock6(fieldname)\r\n{\r\n\tmyleft=document.body.scrollLeft+event.clientX-event.offsetX-";
echo "80;\r\n\tmytop=document.body.scrollTop+event.clientY-event.offsetY+140;\r\n\twindow.showModalDialog(\"/inc/clock1.php?FIELDNAME=\"+fieldname,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:120px;dialogTop:\"+mytop+\"px;dialogLeft:\"+myleft+\"px\");\r\n}\r\n\r\nfunction CheckForm()\r\n{\r\n\tvar work_time_1 = document.getElementById('work_time_1').value;\r\n\tif(work_time_1.length==5)\r\n\t";
echo "{\r\n\t\twork_time_1 = work_time_1+':00';\r\n\t}\r\n\tdocument.getElementById('DUTY_TIME1').value = work_time_1;\r\n\tvar work_time_2 = document.getElementById('work_time_2').value;\r\n\tif(work_time_2.length==5)\r\n\t{\r\n\t\twork_time_2 = work_time_2+':00';\r\n\t}\r\n\tdocument.getElementById('DUTY_TIME2').value = work_time_2;\r\n\tvar work_time_3 = document.getElementById('work_time_3').value;\r\n\tif(work_time_3.length==5)\r\n\t{\r";
echo "\n\t\twork_time_3 = work_time_3+':00';\r\n\t}\r\n\tdocument.getElementById('DUTY_TIME3').value = work_time_3;\r\n\tvar work_time_4 = document.getElementById('work_time_4').value;\r\n\tif(work_time_4.length==5)\r\n\t{\r\n\t\twork_time_4 = work_time_4+':00';\r\n\t}\r\n\tdocument.getElementById('DUTY_TIME4').value = work_time_4;\r\n\tvar work_time_5 = document.getElementById('work_time_5').value;\r\n\tif(work_time_5.length==5)\r\n\t{\r\n\t";
echo "\twork_time_5 = work_time_5+':00';\r\n\t}\r\n\tdocument.getElementById('DUTY_TIME5').value = work_time_5;\r\n\tvar work_time_6 = document.getElementById('work_time_6').value;\r\n\tif(work_time_6.length==5)\r\n\t{\r\n\t\twork_time_6 = work_time_6+':00';\r\n\t}\r\n\tdocument.getElementById('DUTY_TIME6').value = work_time_6;\r\n   if(document.form1.DUTY_NAME.value==\"\")\r\n   { alert(\"说明不能为空!\");\r\n     return (false);\r\n   }\r";
echo "\n   return (true);\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\" onLoad=\"document.form1.DUTY_NAME.focus();\">\r\n\r\n";
if ( $DUTY_TYPE != "" )
{
	$TITLE = "编辑上下班时间";
}
else
{
	$TITLE = "新建上下班时间";
}
echo "<form action=\"";
if ( $DUTY_TYPE != "" )
{
	echo "config_update";
}
else
{
	echo "config_insert";
}
echo ".php\"  method=\"post\" name=\"form1\" onSubmit=\"return CheckForm();\">\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n  <tr class=\"tablehead1\">\r\n    <td><img src=\"/images/menu/attendance.gif\" align=\"absmiddle\">";
echo $TITLE;
echo "    </td>\r\n  </tr>\r\n  <tr class=\"tablehead2\">\r\n  <td>\r\n  <input type=\"image\" src=\"/images/button/submit.gif\" border=\"0\" title=\"新建排班类型\">\r\n  <a href=\"../duty_interval\"><img src=\"/images/button/dutydata.gif\" border=\"0\" title=\"设置上下班登记间隔时间\"></a>\r\n  </td>\r\n  </tr>\r\n</table>\r\n\r\n";
if ( $DUTY_TYPE != "" )
{
	$connection = openconnection( );
	$query = "SELECT * from ATTEND_CONFIG where DUTY_TYPE={$DUTY_TYPE}";
	$cursor = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor ) )
	{
		$DUTY_NAME = $ROW['DUTY_NAME'];
		$DUTY_TIME1 = $ROW['DUTY_TIME1'];
		$DUTY_TIME2 = $ROW['DUTY_TIME2'];
		$DUTY_TIME3 = $ROW['DUTY_TIME3'];
		$DUTY_TIME4 = $ROW['DUTY_TIME4'];
		$DUTY_TIME5 = $ROW['DUTY_TIME5'];
		$DUTY_TIME6 = $ROW['DUTY_TIME6'];
		$DUTY_TYPE1 = $ROW['DUTY_TYPE1'];
		$DUTY_TYPE2 = $ROW['DUTY_TYPE2'];
		$DUTY_TYPE3 = $ROW['DUTY_TYPE3'];
		$DUTY_TYPE4 = $ROW['DUTY_TYPE4'];
		$DUTY_TYPE5 = $ROW['DUTY_TYPE5'];
		$DUTY_TYPE6 = $ROW['DUTY_TYPE6'];
	}
}
echo "\r\n\r\n<hr width=\"95%\" height=\"1\" align=\"left\" color=\"#ffffff\">\r\n\r\n";
message( "", "说明:上下班登记时间范围在 0:00:00 至 23:59:59 之间,请按时间顺序指定" );
echo "<br>\r\n <table border=\"0\" width=\"100%\" cellpadding=\"2\" cellspacing=\"1\" align=\"center\" class=\"small\">\r\n  \r\n    <tr>\r\n\t\t<td nowrap class=\"TableLine2\" width=\"100px\"> 排班类型说明:</td>\r\n\t\t<td colspan=\"2\" class=\"TableLine1\" width='20px' >\r\n        <input type=\"text\" name=\"DUTY_NAME\" size=\"25\" maxlength=\"100\" class=\"BigInput\" value=\"";
echo $DUTY_NAME;
echo "\">\r\n\t\t</td>\r\n    </tr>\r\n    <tr>\r\n      <td nowrap class=\"TableLine2\" width=\"100px\"> 第1次登记:</td>\r\n      <td width=\"30px\" class=\"TableLine1\">";
echo "<s";
echo "elect name=\"DUTY_TYPE1\" class=\"BigSelect\">\r\n        <option value=\"1\" ";
if ( $DUTY_TYPE1 == "1" )
{
	echo "selected";
}
echo ">上班</option>\r\n        <option value=\"2\" ";
if ( $DUTY_TYPE1 == "2" )
{
	echo "selected";
}
echo ">下班</option>\r\n      </select>\r\n\t  </td>\r\n\t  <td align='left' class=\"TableLine1\">\r\n\t\t  <input class=\"Wtime\" type=\"text\" name=\"work_time_1\" id=\"work_time_1\" value=\"";
echo $DUTY_TIME1;
echo "\" size=\"12\" maxlength=\"10\"  style=\"width:'80px'\"\r\n\t\t\t\tonclick=\"new CallTime(null,null,0,0,null,null).show(this)\"/>\r\n\t\t  <input type='hidden' name=\"DUTY_TIME1\" >\r\n\t  </td>\r\n    </tr>\r\n    <tr>\r\n      <td nowrap class=\"TableLine2\"> 第2次登记:</td>\r\n      <td class=\"TableLine1\">";
echo "<s";
echo "elect name=\"DUTY_TYPE2\" class=\"BigSelect\">\r\n        <option value=\"1\" ";
if ( $DUTY_TYPE2 == "1" )
{
	echo "selected";
}
echo ">上班</option>\r\n        <option value=\"2\" ";
if ( $DUTY_TYPE2 == "2" )
{
	echo "selected";
}
echo ">下班</option>\r\n      </select></td>\r\n\t  <td class=\"TableLine1\">\r\n\t\t  <input class=\"Wtime\" type=\"text\" name=\"work_time_2\" id=\"work_time_2\" value=\"";
echo $DUTY_TIME2;
echo "\" size=\"12\" maxlength=\"10\"  style=\"width:'80px'\"\r\n\t\t\t\tonclick=\"new CallTime(null,null,0,0,null,null).show(this)\"/>\r\n\t\t  <input type='hidden' name=\"DUTY_TIME2\" >\r\n\r\n         </td>\r\n    </tr>\r\n    <tr>\r\n      <td nowrap class=\"TableLine2\"> 第3次登记:</td>\r\n      <td class=\"TableLine1\">";
echo "<s";
echo "elect name=\"DUTY_TYPE3\" class=\"BigSelect\">\r\n        <option value=\"1\" ";
if ( $DUTY_TYPE3 == "1" )
{
	echo "selected";
}
echo ">上班</option>\r\n        <option value=\"2\" ";
if ( $DUTY_TYPE3 == "2" )
{
	echo "selected";
}
echo ">下班</option>\r\n      </select></td>\r\n\t  <td class=\"TableLine1\">\r\n\t\t   <input class=\"Wtime\" type=\"text\" name=\"work_time_3\" id=\"work_time_3\" value=\"";
echo $DUTY_TIME3;
echo "\" size=\"12\" maxlength=\"10\" \tstyle=\"width:'80px'\"\r\n\t\t\t\tonclick=\"new CallTime(null,null,0,0,null,null).show(this)\"/>\r\n\t\t  <input type='hidden' name=\"DUTY_TIME3\" >\r\n\r\n\r\n          </td>\r\n    </tr>\r\n    <tr>\r\n      <td nowrap class=\"TableLine2\"> 第4次登记:</td>\r\n      <td class=\"TableLine1\">";
echo "<s";
echo "elect name=\"DUTY_TYPE4\" class=\"BigSelect\">\r\n        <option value=\"1\" ";
if ( $DUTY_TYPE4 == "1" )
{
	echo "selected";
}
echo ">上班</option>\r\n        <option value=\"2\" ";
if ( $DUTY_TYPE4 == "2" )
{
	echo "selected";
}
echo ">下班</option>\r\n      </select></td>\r\n\t  <td class=\"TableLine1\">\r\n\t\t  <input class=\"Wtime\" type=\"text\" name=\"work_time_4\" id=\"work_time_4\" value=\"";
echo $DUTY_TIME4;
echo "\" size=\"12\" maxlength=\"10\"  style=\"width:'80px'\"\r\n\t\t\t\tonclick=\"new CallTime(null,null,0,0,null,null).show(this)\"/>\r\n\t\t  <input type='hidden' name=\"DUTY_TIME4\" >\r\n\r\n          \r\n\t  </td>\r\n    </tr>\r\n    <tr>\r\n      <td nowrap class=\"TableLine2\"> 第5次登记:</td>\r\n      <td class=\"TableLine1\">";
echo "<s";
echo "elect name=\"DUTY_TYPE5\" class=\"BigSelect\">\r\n        <option value=\"1\" ";
if ( $DUTY_TYPE5 == "1" )
{
	echo "selected";
}
echo ">上班</option>\r\n        <option value=\"2\" ";
if ( $DUTY_TYPE5 == "2" )
{
	echo "selected";
}
echo ">下班</option>\r\n      </select></td>\r\n\t  <td class=\"TableLine1\">\r\n\r\n\t\t <input class=\"Wtime\" type=\"text\" name=\"work_time_5\" id=\"work_time_5\" value=\"";
echo $DUTY_TIME5;
echo "\" size=\"12\" maxlength=\"10\" \tstyle=\"width:'80px'\"\r\n\t\t\t\tonclick=\"new CallTime(null,null,0,0,null,null).show(this)\"/>\r\n\t\t  <input type='hidden' name=\"DUTY_TIME5\" >\r\n\r\n          </td>\r\n    </tr>\r\n    <tr>\r\n      <td nowrap class=\"TableLine2\"> 第6次登记:</td>\r\n      <td class=\"TableLine1\">";
echo "<s";
echo "elect name=\"DUTY_TYPE6\" class=\"BigSelect\">\r\n        <option value=\"1\" ";
if ( $DUTY_TYPE6 == "1" )
{
	echo "selected";
}
echo ">上班</option>\r\n        <option value=\"2\" ";
if ( $DUTY_TYPE6 == "2" )
{
	echo "selected";
}
echo ">下班</option>\r\n      </select></td>\r\n\t  <td class=\"TableLine1\">\r\n\t\t <input class=\"Wtime\" type=\"text\" name=\"work_time_6\" id=\"work_time_6\" value=\"";
echo $DUTY_TIME6;
echo "\" size=\"12\" maxlength=\"10\" \tstyle=\"width:'80px'\"\r\n\t\t\t\tonclick=\"new CallTime(null,null,0,0,null,null).show(this)\"/>\r\n\t\t  <input type='hidden' name=\"DUTY_TIME6\" >\r\n\r\n        </td>\r\n    </tr>\r\n        <input type=\"hidden\" value=\"";
echo $DUTY_TYPE;
echo "\" name=\"DUTY_TYPE\">\r\n  </table>\r\n</form>\r\n\r\n</body>\r\n</html>";
?>

⌨️ 快捷键说明

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