<html>
<head>
<LINK href="style.css" type=text/css rel=stylesheet>
<title>选择一个文件</title>
</head>
<script>
function select(name,width,height) {
        if (window.opener) {
                window.opener.form1.download.value=name;
                self.close();
        } else {
                alert("The window that opened this window is closed.. (try again, from the 'new log'-screen)");
                self.close();
        }
}

</script>
<body onload="self.focus();">
<table width=100% cellpadding=3 cellspacing=0 border=0>
  <tr>
    <td bgcolor=#a6a7d9><font color=#FFFFFF> <b>欢迎来到险情文章管理程式 / 选择文件</b></font>
    </td>
  </tr>
</table><br>
<?
@include ("../config.php");
@include ("xqfunc.php");
echo "<center><table border=0 width=98% bgcolor=c0c0c0 cellspacing=1 cellpadding=1>";
echo "<td bgcolor=C0C0C0 align=center width=12%>编号</td>";
echo "<td bgcolor=C0C0C0>文件名(单击文件名即可选中)</td>";
echo "<td bgcolor=C0C0C0 align=center width=12%>预览</td>";
echo "<td bgcolor=C0C0C0 align=center width=12%>格式</td>";
echo "<td bgcolor=C0C0C0 align=center width=12%>(约)Kb</td></tr>";
$NO=0;
$d= dir("../images/upfile/");
while ($entry=$d->read()) {
        $ext=getextension($entry);
        if ($entry!="" and $entry!="." and $entry!="..") {
                $fullentry="images/upfile/".$entry;
                list($x, $y)=GetImageSize ("../$fullentry");
                $filesize= round(filesize("../$fullentry")/1024);
                $NO=$NO+1;
                echo "<tr height=16>";
                echo "<td bgcolor=efefef align=center>$NO</td>";
                echo "<td bgcolor=white><a href=\"javascript:select('$file_url/$fullentry');\">&nbsp;$entry</a></td>";
                echo "<td bgcolor=efefef align=center><a href=\"$file_url/$fullentry\" target=blank>see</a></td>";
                $FILE = split("\.", $entry);
                $ftype = GET_FILE_TYPE($FILE[1]);
                echo "<td bgcolor=efefef align=center><img src='../images/file/$ftype'></td>";
                echo "<td bgcolor=efefef align=center>$filesize kb</td>";
                echo "</tr>";
        }
}
$d->close();
echo "</tr></table>";
?>
<br>
<table width=100% cellpadding=3 cellspacing=0 border=0>
  <tr>
    <td bgcolor=#a6a7d9><font color=#FFFFFF> </font><font color=#FFFFFF><b>程式制作：险情
      版权所有：上海财经大学99国际工商管理</b></font> </td>
  </tr>
</table>
</body>
<script>
self.focus();
</script>
</html>
