📄 edit.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/conn.php" );
$Birth_Id = $_REQUEST['birthday_id'];
$connection = openconnection( );
$query = "SELECT * FROM birthday WHERE ID = '".$Birth_Id."' ";
$rs = exequery( $connection, $query );
while ( $rows = mysql_fetch_array( $rs ) )
{
$title = $rows['TITLE'];
$content = $rows['CONTENT'];
$sentperson_id = $rows['UNDERWRITE'];
$sms = $rows['SMS_REMIND'];
$usernamequery = "SELECT USER_NAME FROM user WHERE USER_ID = '".$sentperson_id."' ";
$usernamers = exequery( $connection, $usernamequery );
while ( $usernamerows = mysql_fetch_array( $usernamers ) )
{
$USER_NAME = $usernamerows['USER_NAME'];
}
}
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";
echo "<s";
echo "cript language=\"javascript\" src=\"/fck/added.js\" ></script>\r\n";
echo "<s";
echo "cript language=\"javascript\" src=\"/fck/fckeditor.js\" ></script>\r\n";
echo "<s";
echo "cript language=\"javascript\" src=\"/inc/common.js\"></script>\r\n</head>\r\n<body>\r\n<form name=\"form1\" action=\"update.php\" method=\"post\" enctype=\"multipart/form-data\" >\r\n<input type=\"hidden\" name=\"Birth_Id\" id=\"Birth_Id\" value=\"";
echo $Birth_Id;
echo "\" />\r\n\t<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n\t\t<tr 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=\"updatebircard()\" 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=\"javascript:history.back();\" class=\"btn\" title=\"返回\"><table><tr valign=\"top\"><td><img src=\"/images/littlegif/b_u.gif\"></td><td>";
echo "<s";
echo "pan id=\"returnback\">返回</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<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 "\" /> (生日卡片标题)\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<textarea id=\"fckeditor1\" name=\"fckeditor1\" >";
echo $content;
echo "</textarea>\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\" id=\"sentperson_name\" value=\"";
echo $USER_NAME;
echo "\" readonly=\"\"/> <input type=\"button\" name=\"sentpersonbt\" class=\"SmallButton\" value=\"选 择\" onclick=\"LoadWindowUserSingle('sentperson_id','sentperson_name','form1')\" /><input type=\"hidden\" name=\"sentperson_id\" id=\"sentperson_id\" value=\"";
echo $sentperson_id;
echo "\" />\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\" ";
if ( $sms == 1 )
{
echo "checked=\"checked\" ";
}
echo " value=\"1\" id=\"sms\" />\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\t";
echo "<s";
echo "cript type=\"text/javascript\">\r\n\t\tcreatepicdiv();\r\n\t\tvar oFCKeditor = new FCKeditor('fckeditor1') ;\r\n\t\toFCKeditor.BasePath = \"/fck/\" ;\r\n\t\toFCKeditor.Width = '100%' ;\r\n\t\toFCKeditor.Height = '400' ;\r\n\t\toFCKeditor.ToolbarSet = 'Eoffice' ;\r\n\t\toFCKeditor.ReplaceTextarea() ;\r\n\t</script>\r\n</form>\r\n</body>\r\n</html>\r\n";
echo "<s";
echo "cript language=\"javascript\" >\r\n\tfunction LoadWindow(sentperson_id,sentperson_name)\r\n\t{\r\n\t\tURL=\"/module/user_select_move/?inputName=\"+sentperson_name+\"&inputID=\"+sentperson_id;\r\n\t\tloc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;\r\n\t\tloc_y=document.body.scrollTop+event.clientY-event.offsetY+170;\r\n\t\twindow.showModalDialog(URL,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialog";
echo "Width:300px;dialogHeight:250px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n\t}\r\n\tfunction updatebircard()\r\n\t{\r\n\t\t/*alert(document.getElementById(\"birthday_title\").value) ;\r\n\t\tvar oEditor = FCKeditorAPI.GetInstance('fckeditor1') ;\r\n\t\tvar content = oEditor.GetXHTML();\r\n\t\talert(content) ;\r\n\t\talert(document.getElementById(\"sentperson_name\").value) ;\r\n\t\talert(document.getElementById(\"sentpers";
echo "on_id\").value) ;\r\n\t\talert(document.getElementById(\"sms\").value) ;*/\r\n\t\tdocument.getElementById(\"form1\").submit();\r\n\t}\r\n</script>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -