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

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

<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";
$sql     = "select * from inbox where id='$id';";
$result  = mysql_query($sql);
$row     = mysql_fetch_array($result);
$content         = str_replace("<BR>", "\n", $row['content']);
?>
<center>
<table border=0 cellpadding=0 cellspacing=1 bgcolor=#3494d4 width=400 >
  <tr height=25>
    <td colspan="2" bgcolor=#0F5099><font color=ffffff><center> 查看收件箱</center></font></td>
  </tr>
  <tr height=24> 
    <td width="30%" bgColor=#ffffff align=center>发件时间</td>
    <td bgcolor=ffffff> 
    &nbsp;<?php echo $row['time']; ?>
    </td>
  </tr>
  <tr height=24>
    <td width="30%" bgcolor=#ffffff align="center">主&nbsp;&nbsp;旨</td>
	<td width="70%" bgcolor=#ffffff>
	&nbsp;<? echo $row['title'];?>
	</td>
  </tr>
  <tr> 
    <td width="30%" bgColor=#ffffff align=center height=24>发件人</td>
    <td width="70%" bgcolor=ffffff> 
 &nbsp;<?php echo $row['addresser']; ?>
    </td>
  </tr>
  <?
  if ( strlen($row['job_path']) > 9 ) {
  ?>
  <tr> 
    <td width="30%" bgColor=#ffffff align=center height=24>发送文件</td>
    <td width="70%" 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>内&nbsp;&nbsp;容</td>
	<td bgColor=#ffffff>
    &nbsp;<?php 
	echo $content;
	?>
	</td>
  </tr>  
</table><br>
<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>

⌨️ 快捷键说明

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