?? fileadd.php
字號:
<?php
session_start(); //使用session存儲用戶ID信息
include("FileManager.php");
if(isset($_POST["btnAdd"]))
{
//實例化用戶對象
require_once("FileClass.php");
$File=new File();
//獲取表單信息
$new_File_array=Array(
"FromUserId"=>$_SESSION["ss_user_id"],
"CreateTime"=>date("y-m-d"),
"ToUserName"=>$_POST["ToUserName"],
"Title"=>$_POST["Title"],
"KeyWords"=>$_POST["KeyWords"],
"Content"=>$_POST["Content"],
"StatusId"=>$_POST["StatusSelect"],
"CategoryId"=>$_POST["CategorySelect"]
);
//利用File的Add()方法添加數據
$File->Add($new_File_array);
//頁面重定位
echo "<script language='javascript'>";
echo " alert('新建公文成功');";
echo " location='FileKeyWordsQueryView.php';";
echo "</script>";
}
?>
<html>
<head>
<title>新建公文</title>
</head>
<body>
<h1 align="center">新建公文</h1>
<table width="90%" border="1" align="center" bgcolor="#F0F0F0">
<form method="POST" name="frmAdd" action=<?php echo $_SERVER['PHP_SELF'];?>>
<tr>
<td align="center" colspan=2></td>
</tr>
<tr>
<td width="30%" height="29">TO:</td>
<td colspan="2" height="29" width="78%">
<input type="text" name="ToUserName" size="40" >
</td>
</tr>
<tr>
<td width="30%" height="29">標題:</td>
<td colspan="3" valign="middle" align="left">
<input type="text" name="Title">
</td>
</tr>
<tr>
<td width="30%" height="29">關鍵字:</td>
<td colspan="2" height="29" width="78%">
<input type="text" name="KeyWords" size="40">
</td>
</tr>
<tr>
<td width="30%" height="29">內容:</td>
<td colspan="2" height="29" width="78%">
<textarea rows="5" name="Content" cols="50" wrap="VIRTUAL"></textarea>
</td>
</tr>
<tr>
<td width="30%" height="29">狀態:</td>
<td colspan="2" height="29" width="78%">
<?php include("StatusSelect.php");?>
</td>
</tr>
<tr>
<td width="30%" height="29">類別:</td>
<td colspan="2" height="29" width="78%">
<?php include("CategorySelect.php");?>
</td>
</tr>
<tr>
<td colspan="3" height="24">
<div align="center"><font color="#00FF00">
<input type="submit" name="btnAdd" value="確定">
<input type="reset" value="重 寫" name="cencel">
</font></div>
</td>
</tr>
</form>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -