📄 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 + -