📄 index.php
字号:
<?php
include_once( "inc/oa_config.php" );
include_once( "inc/auth.php" );
include_once( "inc/conn.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/function_page_01.php" );
include_once( "inc/function_picture.php" );
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />\r\n<title>生日贺卡设计</title>\r\n</head>\r\n<body>\r\n<form name=\"form1\" action=\"\" method=\"post\" >\r\n\t<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n\t\t<t";
echo "r class=\"tablehead1\">\r\n\t\t\t<td ><img src=\"/images/workflow.gif\" align=\"absmiddle\">生日贺卡设置\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr class=\"tablehead2\">\r\n\t\t\t<td>\r\n\t\t\t\t<button onclick=\"save()\" class=\"btn\" title=\"保存\"><table><tr valign=\"top\"><td><img src=\"/images/littlegif/b_u.gif\"></td><td>";
echo "<s";
echo "pan id=\"savebir\">保存</span></td></tr></table></button> <button onclick=\"newbircard()\" class=\"btn\" title=\"新建\"><table><tr valign=\"top\"><td><img src=\"/images/littlegif/b_u.gif\"></td><td>";
echo "<s";
echo "pan id=\"savebir\">新建</span></td></tr></table></button>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</table>\r\n\t<br />\r\n\t<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\">\r\n\t\t\t\t<div style=\"padding:1px 1px; margin:1px 1px;\" >\r\n\t\t\t\t";
$query = "SELECT * FROM birthday ";
$connection = openconnection( );
$rs = exequery( $connection, $query );
while ( $rows = mysql_fetch_array( $rs ) )
{
$picpath = "";
$usernamequery = "SELECT USER_NAME FROM user WHERE USER_ID = '".$rows['UNDERWRITE']."'";
$usernamers = exequery( $connection, $usernamequery );
while ( $usernamerows = mysql_fetch_array( $usernamers ) )
{
$USER_NAME = $usernamerows['USER_NAME'];
}
$check = "";
if ( $rows['SELECTED'] == 1 )
{
$check = "checked=\"ckeckded\"";
$title = $rows['TITLE'];
$sms = $rows['SMS_REMIND'];
$sentperson = $USER_NAME;
}
$picquery = "SELECT * FROM attachment WHERE TABLE_ID = ".$rows['ID']." AND TABLE_NAME = 'birthday'";
$picrs = exequery( $connection, $picquery );
while ( $picrows = mysql_fetch_array( $picrs ) )
{
$picpath = ROOT_PATH.substr( $picrows['HTTP_URL'], 1, strlen( $picrows['HTTP_URL'] ) );
$picname = substr( $picrows['HTTP_URL'], strrpos( $picrows['HTTP_URL'], "/" ) + 1, strlen( $picrows['HTTP_URL'] ) );
}
if ( $picpath == "" )
{
$picpath = ROOT_PATH."images/nopicture.gif";
$picname = "nopicture.gif";
}
$picpath = createjpeg( $picpath, $picname, "130", "110" );
echo "<div id=\"".$rows['ID']."\" style=\"border:#CCCCCC solid 1px; float:left; margin:1px 1px; padding:1px 1px; width:120px; height:auto\"><img src=\"".$picpath."\" /><input type=\"radio\"".$check." value=\"1\" id=\"".$rows['ID']."\" name=\"choose\" onclick=\"dochoose("."'".$rows['ID']."'".","."'".$rows['TITLE']."'".","."'".$rows['SMS_REMIND']."'".","."'".$USER_NAME."'".")\" style=\" width:13px;\" /> 选用 <a href=\"#\" onclick=\"edit("."'".$rows['ID']."'".")\" style=\"font-size:11px\">编辑</a> <a href=\"#\" onclick=\"deleteit("."'".$rows['ID']."'".")\" style=\"font-size:11px\">删除</a>\r\n\t\t\t\t\t</div>";
}
echo "\t\t\t\t</div>\t\t\t\t\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td class=\"Tableline2\">\r\n\t\t\t\t标题:\r\n\t\t\t</td>\r\n\t\t\t<td class=\"Tableline1\">\r\n\t\t\t\t<input type=\"text\" name=\"birthday_title\" value=\"";
echo $title;
echo "\" disabled=\"disabled\" /> (生日卡片标题)\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td class=\"Tableline2\">\r\n\t\t\t\t发送人:\r\n\t\t\t</td>\r\n\t\t\t <td class=\"Tableline1\">\r\n\t\t\t \t<input type=\"text\" name=\"sentperson_name\" value=\"";
echo $sentperson;
echo "\" disabled=\"disabled\" /> \r\n\t\t\t </td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td class=\"Tableline2\">\r\n\t\t\t\t短信提醒\r\n\t\t\t</td>\r\n\t\t\t<td class=\"Tableline1\">\r\n\t\t\t\t<input type=\"checkbox\" name=\"sms\" value=\"1\"";
if ( $sms == 1 )
{
echo "checked='checked'";
}
echo " disabled=\"disabled\"/>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td class=\"Tableline1\" colspan=\"2\">\r\n\t\t\t\t设定生日卡后,员工过生日系统将会自动发出邮件祝福.\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</table>\r\n</form>\r\n</body>\r\n</html>\r\n";
echo "<s";
echo "cript language=\"javascript\">\r\nfunction dochoose(id,title,sms,sentperson)\r\n{\r\n\tdocument.getElementById(\"birthday_title\").value = title;\r\n\tdocument.getElementById(\"sentperson_name\").value = sentperson;\r\n\tif(sms==1)\r\n\t\tdocument.getElementById(\"sms\").checked = true;\r\n\telse\r\n\t\tdocument.getElementById(\"sms\").checked = false;\r\n}\r\nfunction save()\r\n{\r\n\tvar choosed_bir = document.getElementsByName(\"choose\")";
echo " ;\r\n\tfor(i=0;i<choosed_bir.length;i++)\r\n\t{\r\n\t\tif(choosed_bir[i].checked)\r\n\t\t{\r\n\t\t\tchoosed_bir_id = choosed_bir[i].id;\r\n\t\t}\r\n\t}\r\n\tif(choosed_bir_id==\"\")\r\n\t{\r\n\t\talert(\"请选择一个贺卡!\");\r\n\t\treturn false ;\r\n\t}\r\n\turl = \"save.php?choosed_bir_id=\"+choosed_bir_id;\r\n\twindow.location = url ;\r\n}\r\nfunction newbircard()\r\n{\r\n\turl = \"new.php\";\r\n\twindow.location = url ;\r\n}\r\nfunction edit(birthday_id)\r\n{\r\n\turl = ";
echo "\"edit.php?birthday_id=\"+birthday_id;\t\r\n\twindow.location = url ;\r\n}\r\nfunction deleteit(birthday_id)\r\n{\r\n\turl = \"delete.php?birthday_id=\"+birthday_id;\t\r\n\twindow.location = url ;\r\n}\r\n</script>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -