<?php /* * Copyright VeryIDE 2009-2012 * http://www.veryide.com/ */ require '../../source/dialog/loader.php'; html_start("更新管理 - VeryIDE"); ?> <?php //更新基准目录 $base = Database::direct('update'); $action = getgpc('action'); $update = getgpc("update"); //连接数据库 System::connect(); switch ($action) { case "update": //检查权限 $func = 'system-update-add'; System::check_func($func, FALSE); $res = Database::update($update); switch ($res) { case 'locked': echo '<div id="state" class="failure">抱歉!安装已经存在。更新于早前已经安装,并在使用中:<span class="text-key">' . $update . '</span></div>'; break; case 'abort': echo '<div id="state" class="failure">抱歉!安装更新失败。以下是本错误信息详细报告:</div>'; break; case 'success':
/* * Copyright VeryIDE 2009-2012 * http://www.veryide.com/ */ require '../../source/dialog/loader.php'; html_start("数据备份 - VeryIDE"); ?> <?php //延长程序运行时间 set_time_limit(0); //载入类库 require_once VI_ROOT . "source/class/database.php"; //备份基准目录 $base = Database::direct('backup'); $action = getgpc('action'); if ($action) { //连接数据库 System::connect(); switch ($action) { case "execute": //检查权限 $func = 'system-backup-exe'; System::check_func($func, FALSE); $update = getgpc("update"); $sqlfile = $base . $update; //锁文件 $lock = str_replace(".sql", ".lock", $sqlfile); if (file_exists($lock)) { echo '<div id="state" class="failure">抱歉!备份已经使用。恢复时间:<span class="text-key">' . $update . '</span></div>';