Example #1
0
 public static function check_upgrade()
 {
     global $_CACHE;
     $result = array('list' => array(), 'stat' => 0);
     //////////////////
     $base = VI_ROOT . 'data/update/';
     $list = loop_file($base, array(), array('sql'));
     //读取配置
     foreach ($list as $file) {
         //锁文件
         $lock = $base . str_replace(".sql", ".lock", $file);
         $vers = fileparm($base . $file, 'version');
         //有锁文件
         if (file_exists($lock)) {
             array_push($result['list'], array('name' => $file, 'version' => $vers, 'size' => filesize($base . $file), 'ctime' => filemtime($base . $file), 'lock' => TRUE, 'mtime' => filemtime($lock)));
         } else {
             array_push($result['list'], array('name' => $file, 'version' => $vers, 'size' => filesize($base . $file), 'ctime' => filemtime($base . $file), 'lock' => FALSE));
             $result['stat'] += 1;
         }
     }
     //////////////////
     return $result;
 }
Example #2
0
		<?php 
//未登录
if (!$_G['manager']['id']) {
    exit('<div id="state" class="failure">未登录,请先登录!</div>');
}
?>
	
		<ul id="theme">
	
			<?php 
//遍历皮肤目录
$root = VI_ROOT . 'static/theme/';
$dirs = loop_dir($root);
foreach ($dirs as $file) {
    //皮肤名称
    $name = fileparm($root . $file . '/style.css', 'name');
    //忽略没有名称的,为删除皮肤提供方法
    if ($name) {
        echo '<li rel="' . $file . '"><img src="' . VI_BASE . 'static/theme/' . $file . '/preview.png" />' . $name . ' </li>';
    }
}
?>
	
	
		</ul>
        
        <div class="tabs"></div>
        <script type="text/javascript">
		
			Mo.TabXXX = function( tab, box, e, number ){
				this.Event = e;