⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 job_file_show.php

📁 开源的OA系统
💻 PHP
字号:
<?php
session_start();
if (!empty($downfile)) {
	if (!@file_exists($downfile)) {
		echo "<script>alert('你要下的文件不存在!')</script>";
		//echo "下载出错";
	} else {
		$filename = basename($downfile);
		$filename_info = explode('.', $filename);
		$fileext = $filename_info[count($filename_info)-1];
		header('Content-type: application/x-'.$fileext);
		header('Content-Disposition: attachment; filename='.$filename);
		header('Content-Description: PHP Generated Data');
		header('Content-Length: '.filesize($downfile));
		@readfile($downfile);
		exit;
	}
}
?>
<html>
<head>
<title>查看上报文件</title>
<link rel="stylesheet" href="../css/a1.css" type="text/css">
<style type="text/css">
.title14 {font-size:14px;line-height:120%}
td,li,select,input,textarea {font-size:12px}
.f7 {font-size:7px;}
.f24{font-size:24px;}
.f12{font-size:12px;}
.f14{font-size:14px;}
.l17 {line-height:180%;}
</style>
</head>
<body topmargin=0 leftmargin=0>
<?
include "../datasource.inc.php";
if ($_SESSION['userjs'] == '0') {
    $sql     = "select * from job_file where id='$_REQUEST[id]';";
} else {
    $sql     = "select * from job_file where id='$_REQUEST[id]' and ( userid='$_SESSION[userid]' or department='$_SESSION[department]');";

}
$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']);
?>

<center> 
 <table border=0 cellpadding=0 cellspacing=1 bgcolor=#3494d4 width=400>
 <tr height=25><td bgcolor=#0F5099 colspan=2><font color=ffffff><center>查看上报文件</center></font></td></tr>
  <tr height=24> 
    <td width="30%" bgColor=#ffffff align=center>上报人</td>
    <td bgcolor=ffffff> <font color=red>
    &nbsp;<?php echo $row['name']; ?>
	</font>
    </td>
  </tr>
  <tr height=24> 
    <td width="30%" bgColor=#ffffff align=center>上报时间</td>
    <td bgcolor=ffffff> 
    &nbsp;<?php echo $row['job_date']; ?>
    </td>
  </tr>
  <tr> 
    <td width="30%" bgColor=#ffffff align=center height=24>所属分类</td>
    <td bgcolor=ffffff> 
 &nbsp;<?php echo $row['job_fl']; ?>
    </td>
  </tr>
  <tr> 
    <td width="30%" bgColor=#ffffff align=center height=24>文件名称</td>
    <td bgcolor=ffffff> 
 &nbsp;<?php echo $row['job_name']; ?>
    </td>
  </tr>
  <tr> 
    <td width="30%" bgColor=#ffffff align=center height=24>下&nbsp;载</td>
    <td bgcolor=ffffff> 
    &nbsp;<?php 
	$path0     = "../upload-files";
	$path1     = $row['job_path'];
	$filepath = "$path0/$path1";
	echo "<a href=\"?downfile=".urlencode($filepath)."\">下载</a>"; 
	
	 ?>
    </td>
  </tr>
  <tr> 
    <td width="30%" bgColor=#ffffff align=center height=24>文件描述</td>
	<td bgColor=#ffffff>
    &nbsp;<?php 
	echo $job_body;
	?>
	</td>
  </tr>  
  <tr> 
    <td width="30%" bgColor=#ffffff align=center height=24>管理员回复</td>
	<td bgColor=#ffffff>
    &nbsp;<?php 
	echo $job_body1;
	?>
	</td>
  </tr>  
</table>
<br>
</center>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0" class="未命名1">
  <tr>
    <td align="center" style="background:#FFFFFF;"><a href="javascript:window.close();">
     <img src="../images/close.gif" width="94" height="20" border="0"></a></td>
  </tr>
  <tr>
    <td align="center" style="background:#FFFFFF;">&nbsp;</td>
  </tr>
</table>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0" class="未命名1">
 <tr>
   <td width="400" height="20" style="background:#1677E4;color:#FFFFFF;" align="center">
&copy; 2006 上海明宏生物工程有限公司</td>
</tr>
</table>
</center>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -