<?
/////////////////////////////////////////////////////
//  险情文章管理 1.0正式版本--php文本存储格式      //
//  作者：上海财经大学99国际工管    险情           //
//  email：indraw@sina.com                         //
//  qq：   30467826                                //
//  技术支持：http://shcj.51.net/wdb               //
//  最新演示：http://xqart.126.com                 //
//  2002/4/10                                      //
//  最新下载地址 http;//shcj.51.net/wdb            //
/////////////////////////////////////////////////////
include ("xqfunc.php");
include ("admin_log.php");
        echo "<html><head><STYLE><!--A:link {text-decoration:none}A:visited {text-decoration:none}A:hover {  text-decoration:underline;  color:brown;}p,br,body,td {color:black; font-size:9pt; line-height:140%;}--></STYLE></head><body BGCOLOR='EFEFEF'>";
        echo "<table width=100% cellpadding=6 cellspacing=0 border=0>\n";
        echo "<tr>\n";
        echo "<td bgcolor=#a6a7d9 colspan=3><font color=#FFFFFF> <b>欢迎来到险情文章管理程式 / 图片管理</b></font>\n";
        echo "</td> \n";
        echo "</tr> \n";
        echo "</table> \n";
        echo "<DIV ALIGN=<center>";
        echo "<center><table border=0 width=98% bgcolor=c0c0c0 cellspacing=1 cellpadding=1>";
        echo "<FORM method=get ACTION='$PHP_SELF'><tr>";
        echo "<td bgcolor=C0C0C0 align=center width=8%>编号</td>";
        echo "<td bgcolor=C0C0C0>图片名</td>";
        echo "<td bgcolor=C0C0C0 align=center width=8%>Kbyte</td>";
        echo "<td bgcolor=C0C0C0 align=center width=8%>属性</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%>删除图片</td>";
        echo "</tr></FORM>\n";

        $DIR_PATH = "../images/upimage/";
        $indexskin_dir = opendir("../images/upimage/");
        while($indexskdir = readdir($indexskin_dir)) {
                $FILES[] = $indexskdir;
        }
        closedir($indexskin_dir);

        $recnum = 20;
        $listnum = 10;
        $data_num = sizeof($FILES);
        $totalnum = intval(($data_num)/$recnum)+1;

        if ( !$p ) { $p = 1; }
        for( $i = $data_num-(($p-1)*$recnum); $i > $data_num-($p*$recnum);$i--) {
                $NO = $i-1;
                if ( $FILES[$i] && $FILES[$i] != '.' && $FILES[$i] != '..') {
                        if (is_file("$DIR_PATH/$FILES[$i]")) {
                        $FILE = split("\.", $FILES[$i]);
                        $fsize = filesize("$DIR_PATH/$FILES[$i]");
                        $fsize = $fsize/1024;
                        $fsize = substr($fsize, 0,4);
                        $ftype = GET_FILE_TYPE($FILE[1]);
                        echo "<tr height=22>";
                        echo "<td bgcolor=efefef align=center>$NO</td>";
                        echo "<td bgcolor=white> &nbsp;";
                        echo "<IMG SRC='../images/file/$ftype'> <A HREF=\"$DIR_PATH/$FILES[$i]\" TARGET=_BLANK>$FILES[$i]</a></td>";
                        echo "<td bgcolor=efefef align=center>$fsize</td>";
                        echo "<td bgcolor=efefef align=center>";
                        printf("%o", (fileperms("$DIR_PATH/$FILES[$i]")) & 0777);
                            echo "<td bgcolor=efefef align=center><A HREF=\"managepic1.php?act=reatt&file=$FILES[$i]&p=$p&model=upfile\"><IMG SRC='../images/file/recover.gif' BORDER='0'></a></td>";
                        echo "</td><td bgcolor=efefef align=center><A HREF=\"managepic1.php?act=rename&file=$FILES[$i]&p=$p&model=upfile\"><IMG SRC='../images/file/recover.gif' BORDER='0'></a></td>";
                        echo "<td bgcolor=efefef align=center><A HREF=\"managepic1.php?file=$FILES[$i]&p=$p&act=del&model=upfile\"><IMG SRC='../images/file/boarddel.gif' BORDER='0'></a></td>";
                        echo "</tr>";
                        }
                }
        }

        echo "<br></TABLE></DIV><DIV ALIGN=LEFT><center><B>";
                 page_menu($totalnum);

        echo "</b><br><hr><table border=0 width=98% bgcolor=c0c0c0 cellspacing=1 cellpadding=1>";
        echo "<tr><td bgcolor=C0C0C0 align=left width=8% colspan=2>&nbsp;上传图片</td>";
        echo "<FORM action='managepic1.php' method=post enctype='multipart/form-data'>";
        echo "<tr><td bgcolor=efefef width=8% align=center>注意：</td><td bgcolor=white width=92%>&nbsp;上传的图片图片名不能相同，而且图片名中不能有空格！<br></td></tr>";
        echo "<tr><td bgcolor=efefef width=8% align=center>10</td><td bgcolor=white width=92%>&nbsp;<INPUT TYPE=file NAME=phpfile[] SIZE=64 style=border-bottom:1px;border-left:1px;border-right:1px;border-top:1px;border-style:solid;font-size:9pt;background:#ffffff;><br></td></tr>";
        echo "<tr><td bgcolor=efefef width=8% align=center>9</td><td bgcolor=white width=92%>&nbsp;<INPUT TYPE=file NAME=phpfile[] SIZE=64 style=border-bottom:1px;border-left:1px;border-right:1px;border-top:1px;border-style:solid;font-size:9pt;background:#ffffff;><br></td></tr>";
        echo "<tr><td bgcolor=efefef width=8% align=center>8</td><td bgcolor=white width=92%>&nbsp;<INPUT TYPE=file NAME=phpfile[] SIZE=64 style=border-bottom:1px;border-left:1px;border-right:1px;border-top:1px;border-style:solid;font-size:9pt;background:#ffffff;><br></td></tr>";
        echo "<tr><td bgcolor=efefef width=8% align=center>7</td><td bgcolor=white width=92%>&nbsp;<INPUT TYPE=file NAME=phpfile[] SIZE=64 style=border-bottom:1px;border-left:1px;border-right:1px;border-top:1px;border-style:solid;font-size:9pt;background:#ffffff;><br></td></tr>";
        echo "<tr><td bgcolor=efefef width=8% align=center>6</td><td bgcolor=white width=92%>&nbsp;<INPUT TYPE=file NAME=phpfile[] SIZE=64 style=border-bottom:1px;border-left:1px;border-right:1px;border-top:1px;border-style:solid;font-size:9pt;background:#ffffff;><br></td></tr>";
        echo "<tr><td bgcolor=efefef width=8% align=center>5</td><td bgcolor=white width=92%>&nbsp;<INPUT TYPE=file NAME=phpfile[] SIZE=64 style=border-bottom:1px;border-left:1px;border-right:1px;border-top:1px;border-style:solid;font-size:9pt;background:#ffffff;><br></td></tr>";
        echo "<tr><td bgcolor=efefef width=8% align=center>4</td><td bgcolor=white width=92%>&nbsp;<INPUT TYPE=file NAME=phpfile[] SIZE=64 style=border-bottom:1px;border-left:1px;border-right:1px;border-top:1px;border-style:solid;font-size:9pt;background:#ffffff;><br></td></tr>";
        echo "<tr><td bgcolor=efefef width=8% align=center>3</td><td bgcolor=white width=92%>&nbsp;<INPUT TYPE=file NAME=phpfile[] SIZE=64 style=border-bottom:1px;border-left:1px;border-right:1px;border-top:1px;border-style:solid;font-size:9pt;background:#ffffff;><br></td></tr>";
        echo "<tr><td bgcolor=efefef width=8% align=center>2</td><td bgcolor=white width=92%>&nbsp;<INPUT TYPE=file NAME=phpfile[] SIZE=64 style=border-bottom:1px;border-left:1px;border-right:1px;border-top:1px;border-style:solid;font-size:9pt;background:#ffffff;><br></td></tr>";
        echo "<tr><td bgcolor=efefef width=8% align=center>1</td><td bgcolor=white width=92%>&nbsp;<INPUT TYPE=file NAME=phpfile[] SIZE=64 style=border-bottom:1px;border-left:1px;border-right:1px;border-top:1px;border-style:solid;font-size:9pt;background:#ffffff;><br>";
        echo "<tr><td bgcolor=efefef width=8% align=center>路径：</td><td bgcolor=white width=92%>&nbsp;/xqart/images/upimage/";
        echo "<input type='hidden' name='act' size='10' value='add' class='input'>";
        echo "<input type='hidden' name='model' size='10' value='upfile' class='input'>";
        echo "<br></td></tr>";

        echo "</td></tr><tr><td align=center colspan=2 bgcolor=efefef><INPUT TYPE=SUBMIT VALUE=' 上 传 ' style=\"font-family: 新细明体, 宋体, Arial; font-size: 9pt; height:20px;background-color:#f3f3f3;border:1 solid black\" onMouseOver =\"this.style.backgroundColor='#a6a7d9'\" onMouseOut =\"this.style.backgroundColor='#f3f3f3'\">&nbsp;";
        echo "<INPUT TYPE=reset VALUE=' 取 消 ' style=\"font-family: 新细明体, 宋体, Arial; font-size: 9pt; height:20px;background-color:#f3f3f3;border:1 solid black\" onMouseOver =\"this.style.backgroundColor='#a6a7d9'\" onMouseOut =\"this.style.backgroundColor='#f3f3f3'\"></td>";
        echo "</tr></FORM>";
        echo "</table>";
        echo "<br><table width=100% cellpadding=6 cellspacing=0 border=0>";
        echo "<tr> ";
        echo "<td bgcolor=#a6a7d9 colspan=3><font color=#FFFFFF> </font><font color=#FFFFFF><b>程式制作：险情版权所有：上海财经大学99国际工商管理</b></font> </td>";
        echo "</tr>";
        echo "</table>";
        echo "</body></html>";
?>