?? job_download_show.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";
$sql = "select * from job_download where id='$_REQUEST[id]';";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$job_body = str_replace("\n", "<BR>", $row['job_body']);
?>
<center>
<table border=0 cellpadding=0 cellspacing=1 bgcolor=#3494d4 width=400>
<tr height=25>
<td colspan="2" td bgcolor=#0F5099 ><font color=ffffff><center>查看文件學習</center></font></td></tr>
<tr>
<td width="30%" bgColor=#ffffff align=center height=24>所屬分類</td>
<td width="70%" bgcolor=#ffffff>
<?php echo $row['job_fl']; ?>
</td>
</tr>
<tr>
<td width="30%" bgColor=#ffffff align=center height=24>文檔名稱</td>
<td width="70%" bgcolor=#ffffff>
<?php echo $row['job_name']; ?>
</td>
</tr>
<tr>
<td width="30%" bgColor=#ffffff align=center height=24>下載</td>
<td width="70%" bgcolor=#ffffff>
<?php
$path0 = "../upload-files";
$path1 = $row['job_path'];
$filepath = "$path0/$path1";
if (substr($filepath,0,-4)=="")
echo "<a href=\"?downfile=".urlencode($filepath)."\">下載</a>";
?>
</td>
</tr>
<tr>
<td bgColor=#ffffff width="30%" align=center height=24>內(nèi)容</td>
<td width="70%" bgcolor=#ffffff>
<?php
echo $job_body;
?>
</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;"> </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">
© 2006 上海明宏生物工程有限公司</td>
</tr>
</table>
</center>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -