Exemple #1
0
 private function DisplayBackups()
 {
     TableHeader('数据库备份文件');
     TableRow(array('文件名 (/config/)', '大小', '备份日期', '操作', '', ''), 'tr0');
     if (is_dir($this->backupDir)) {
         $dir = opendir($this->backupDir);
         while (false !== ($file = readdir($dir))) {
             if (strpos(strtolower($file), '.sql') > 0) {
                 $stats = stat($this->backupDir . $file);
                 if ($stats['size'] > 0) {
                     TableRow(array($file, DisplayFilesize($stats['size']), DisplayDate($stats['mtime']), '<a file="' . $file . '" class="link-btn restore">恢复</a>', '<a href="' . BURL('database/ajax?action=download&file=' . $file) . '" class="link-btn">下载</a>', '<a file="' . $file . '" class="link-btn ajax">删除</a>'));
                 }
             }
         }
     }
     TableFooter();
 }
Exemple #2
0
    private function DisplayFileDetails($file)
    {
        echo '<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
		<td width="10" valign="top" style="padding-right: 15px;">
		<a href="' . BURL('language/edit?filename=' . $file) . '"><img style="border:1px solid #e8e8e8; padding:3px;" src="' . SYSDIR . 'public/img/editablefile.gif" /></a>
		</td>
		<td valign="top">
		<b>' . $file . '</b> (' . DisplayFilesize(@filesize($this->lang_path . $file)) . ')<br /><br />
		<a href="' . BURL('language/edit?filename=' . $file) . '" class="link-btn">编辑文件</a>
		<a file="' . $file . '" class="link-btn ajax">删除文件</a>
		</td>
		</tr>
		</table>';
    }