Ejemplo n.º 1
0
                     <?php 
require 'connectionInfo.php';
//添加引用文件
mb_internal_encoding('utf-8');
//        $query = 'select * from '.$officeFileInfoTableName.'  order by filetype;'; //写入sql语句
$query = 'select * from ' . $officeFileInfoTableName;
//写入sql语句
/* Example */
//<!--读取数据库中的文件-->
$DB = new mysql_db();
//建立数据库辅助类
$DB->sql_connect($ip, $sqlname, $sqlpw, $dbname);
//建立一个新连接
$DB->query($query);
//执行sql
$rs = $DB->sql_result();
/* 处理结果集 */
while ($row = mysql_fetch_array($rs, MYSQL_BOTH)) {
    //       echo "<tr><td>{$row['id']}</td><td>{$row['filename']}</td><td>{$row['filetype']}</td><td>{$row['filesize']}</td><td><a href=\'javascript:showFileEditPage(\"FileEdit.php?FileId={{$row['id']}}\",900,800);\' > 编辑 </a></td></tr>";
    echo '<tr><td>' . $row['filename'] . '</td><td>' . $row['filetype'] . '</td><td>' . $row['filesize'] . '</td><td><a href="javascript:showFileEditPage(\'FileEdit.php?FileId=' . $row['id'] . '\',900,800);">编辑</a></td></tr>';
}
?>
		    <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
               </table>
               <table>
               <!--office文件列表-->
               </table>
           </div>
           <div id="htmllist" class="officelist">
           <span>HTML文件列表:</span>
            <table class="tabletitle">