?? job_file_info.php
字號:
<tr>
<td width="15%" bgColor=#ffffff align=center height=24>管理員回復</td>
<td width="85%" bgColor=#ffffff >
<?php
echo "<textarea name=\"job_body1\" cols=60 rows=5>$job_body1</textarea>
";
?>
</td>
</tr>
</table></td></table>
<br>
<input type="hidden" value="update" name="action">
<?php echo "<input type=hidden name=id value=$id>"; ?>
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input type="submit" name="submit" value=" 確 定 "> <input type="reset" name="submit1" value=" 重 置 ">
</form>
</center>
<?php
break;
case "text":
$sql = "select * from job_file where id='$id';";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$job_body = str_replace("<BR>", "\n", $row['job_body']);
$job_body1 = str_replace("<BR>", "\n", $row['job_body1']);
?>
<br>
<center>
<table border=0 cellpadding=0 cellspacing=1 width=776>
<tr><td width=10 bgcolor=#ffffff> </td>
<td><table border=0 cellpadding=0 cellspacing=1 bgcolor=#3494d4 width=766 height=400>
<tr height=24>
<td width="15%" bgColor=#ffffff align=center>上報人</td>
<td width="85%" bgColor=#ffffff > <font color=red>
<?php echo $row['name']; ?>
</font>
</td>
</tr>
<tr height=24>
<td width="15%" bgColor=#ffffff align=center>上報時間</td>
<td width="85%" bgColor=#ffffff >
<?php echo $row['job_date']; ?>
</td>
</tr>
<tr>
<td width="15%" bgColor=#ffffff align=center height=24>所屬分類</td>
<td width="85%" bgColor=#ffffff >
<?php echo $row['job_fl']; ?>
</td>
</tr>
<tr>
<td width="15%" bgColor=#ffffff align=center height=24>文件名稱</td>
<td width="85%" bgColor=#ffffff >
<?php echo $row['job_name']; ?>
</td>
</tr>
<tr>
<td width="15%" bgColor=#ffffff align=center height=24>下載</td>
<td width="85%" bgColor=#ffffff >
<?php
$path0 = "../upload-files";
$path1 = $row['job_path'];
$filepath = "$path0/$path1";
echo "<a href=\"?downfile=".urlencode($filepath)."\">下載</a>";
?>
</td>
</tr>
<tr>
<td width="15%" bgColor=#ffffff align=center height=24>文件描述</td>
<td colspan=2 bgColor=#ffffff>
<?php
echo "<textarea cols=60 rows=10>$job_body</textarea>
";
?>
</td>
</tr>
<tr>
<td width="15%" bgColor=#ffffff align=center height=24>管理員回復</td>
<td colspan=2 bgColor=#ffffff>
<?php
echo "<textarea cols=60 rows=10>$job_body1</textarea>
";
?>
</td>
</tr>
</table></td></table>
<br>
</center>
<?php
break;
default:
echo "<center>";
echo "<form action=job_file_info.php method=post>";
echo "<table border=0 width=776 cellpadding=0 cellspacing=0>";
echo "<tr>";
echo "<td width=10 bgcolor=#ffffff> </td>";
echo "<td bgColor=#ffffff align=left>";
echo "文檔名:<input type=text size=20 name=search maxlength=20>";
echo " <input type=submit value=搜索>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</form>";
if ($_SESSION['userjs'] == "0") {
if ($_REQUEST['search']){
$sql = "select * from job_file where job_name like '%$_REQUEST[search]%' order by id desc;";
} else {
$sql = "select * from job_file order by id desc;";
}
}else {
if ($_REQUEST['search']){
$sql = "select * from job_file where name='$_SESSION[realname]' and job_name like '%$_REQUEST[search]%' order by id desc;";
} else {
$sql = "select * from job_file where name='$_SESSION[realname]' order by id desc;";
}
}
$result = mysql_query($sql);
$num = mysql_num_rows($result);
if ( $num>0 ){
$last = intval(($num-1)/40)+1;
if ( $page < 1 ) $page=1;
if ( $page > $last ) $page=$last;
mysql_data_seek($result,($page-1)*40);
echo "<table border=0 cellpadding=0 cellspacing=0 width=776>";
echo "<tr><td width=10 bgcolor=#ffffff> </td>";
echo "<td><table border=0 cellpadding=0 cellspacing=1 bgcolor=#3494d4 width=766>";
echo "<tr height=24>";
echo "<td width=100 height=18 bgColor=#3494d4><div align=center><font color=#ffffff><b>上報人</b></font></div></td>";
echo "<td width=133 height=18 bgColor=#3494d4><div align=center><font color=#ffffff><b>上報時間</b></font></div></td>";
echo "<td width=233 height=18 bgColor=#3494d4><div align=center><font color=#ffffff><b>文件名稱</b></font></div></td>";
echo "<td width=40 height=18 bgColor=#3494d4><div align=center><font color=#ffffff><b>查看</b></font></div></td>";
echo "<td width=40 height=18 bgColor=#3494d4><div align=center><font color=#ffffff><b>下載</b></font></div></td>";
echo "<td width=100 height=18 bgColor=#3494d4><div align=center><font color=#ffffff><b>管理員回復</b></font></div></td>";
if ($_SESSION['userjs']=="0") {
echo "<td width=40 height=18 bgColor=#3494d4><div align=center><font color=#ffffff><b>Return</b></font></div></td>";
echo "<td width=40 height=18 bgColor=#3494d4><div align=center><font color=#ffffff><b>刪除</b></font></div></td>";
}
echo "</tr>";
for ( $i=0;$i<40;$i++ ) {
$row = mysql_fetch_array($result);
$id = $row['id'];
$job_body = substr($row['job_body'],0,30);
if ( $id ) {
echo "<tr bgColor=#ffffff height=22>";
echo "<td width=100 height=18 bgColor=#ffffff><div align=center>$row[name]</div></td>";
echo "<td width=133 height=18 bgColor=#ffffff><div align=center>$row[job_date]</div></td>";
echo "<td width=233 height=18 bgColor=#ffffff><div align=center>$row[job_name]</div></td>";
echo "<td width=40 height=18 bgColor=#ffffff><div align=center><a href=# onClick=\"window.open('job_file_show.php?id=$row[id]',1,'top=50,left=50,height=500,width=500,scrollbars=yes')\">查看</a></div></td>";
$path0 = "../upload-files";
$path1 = $row['job_path'];
$filepath = "$path0/$path1";
echo "<td width=40 height=18 bgColor=#ffffff><div align=center><a href=\"?downfile=".urlencode($filepath)."\">下載</a></div></td>";
if ( $row['job_body1'] ) {
echo "<td width=100 height=18 bgColor=#ffffff><div align=center><font color=red>是</font>(<a title=點擊查看回覆 href=# onClick=\"window.open('job_file_show.php?id=$row[id]',1,'top=50,left=50,height=500,width=500,scrollbars=yes')\">查看</a>)</div></div></td>";
} else {
echo "<td width=100 height=18 bgColor=#ffffff><div align=center>否</div></div></td>";
}
if ($_SESSION['userjs']=="0") {
echo "<td width=40 height=18 bgColor=#ffffff><div align=center><a title=點擊編輯內容 href=job_file_info.php?page=update&id=$row[id]>Return</div></td>";
echo "<td width=40 height=18 bgColor=#ffffff><div align=center><a title=點擊刪除內容 href=job_file_info.php?page=delete&id=$row[id] onclick=\"return confirm('是否確定刪除此記錄')\"><img src=../images/clearicon.gif border=0></a></div></td>";
}
echo "</tr>";
}
}
echo "</table></td></table><br>";
echo "<table width=500 border=0 cellspacing=0 cellpadding=0 height=24>";
echo "<tbody>";
echo "<tr><td><center>";
echo "總共找到<font color=red>$num</font>條記錄,第<font color=red>$page</font>頁,共<font color=red>$last</font>頁。";
echo "</center></td></tr><tr>";
if ( $page <> 1 ) {
echo "<td align=center> <a href=job_file_info.php?page=1>第一頁</a></td>";
echo "<td align=center><a href=job_file_info.php?page=".($page-1).">上一頁</a></td>";
}
if ( $page <> $last ) {
echo "<td align=center><a href=job_file_info.php?page=".($page+1).">下一頁</a></td>";
echo "<td align=center><a href=job_file_info.php?page=$last>最后一頁</a></td>";
}
echo "</tbody>";
echo "</tr>";
echo "</table><br>";
echo "</center>";
} else {
echo "<center>對不起,您還沒有添加記錄,<a href=job_file_info.php?page=add>我要添加</a>!</center>";
}
break;
}
} else {
$Message->setMessage("對不起,您沒有權限進入后臺管理!","index.php");
$Message->showMessage();
}
?>
</td>
<td width="13" align="right" background="../images/home_16.jpg" height="457"> </td>
</tr>
<tr>
<td height="8" colspan="2" valign="top"><img src="../images/home_24.jpg" width="789"></td>
</tr>
</table>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -