예제 #1
0
파일: index.php 프로젝트: cretzu89/EPESI
require_once 'include/data_dir.php';
if (!file_exists(DATA_DIR . '/config.php')) {
    header('Location: setup.php');
    exit;
}
if (!is_writable(DATA_DIR)) {
    die('Cannot write into "' . DATA_DIR . '" directory. Please fix privileges.');
}
// require_once('include/include_path.php');
require_once 'include/config.php';
require_once 'include/maintenance_mode.php';
require_once 'include/error.php';
require_once 'include/misc.php';
require_once 'include/database.php';
require_once 'include/variables.php';
if (epesi_requires_update()) {
    header('Location: update.php');
    exit;
}
$tables = DB::MetaTables();
if (!in_array('modules', $tables) || !in_array('variables', $tables) || !in_array('session', $tables)) {
    die('Database structure you are using is apparently out of date or damaged. If you didn\'t perform application update recently you should try to restore the database. Otherwise, please refer to EPESI documentation in order to perform database update.');
}
ob_start();
if (IPHONE) {
    if (!isset($_GET['force_epesi'])) {
        ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
예제 #2
0
파일: update.php 프로젝트: 62BRAINS/EPESI
 public function run()
 {
     $this->load_epesi();
     if ($this->check_user()) {
         if (!epesi_requires_update()) {
             if ($this->handle_update_package() == false) {
                 $this->version_up_to_date();
             }
         }
         $this->update_process();
     } else {
         $this->require_admin_login();
     }
 }
예제 #3
0
파일: update.php 프로젝트: cretzu89/EPESI
 public function run()
 {
     try {
         $this->load_epesi();
         if ($this->check_user()) {
             if (!epesi_requires_update()) {
                 if ($this->handle_update_package() == false) {
                     $this->version_up_to_date();
                 }
             }
             $this->update_process();
         } else {
             $this->require_admin_login();
         }
     } catch (Exception $ex) {
         $this->quit('Exception occured: ' . $ex->getMessage());
     }
 }