コード例 #1
0
ファイル: submit.php プロジェクト: kgrayjr/ezleague
<?php

session_start();
include 'lib/class-db.php';
include 'lib/class-ezadmin.php';
$ez = new ezAdmin();
if (isset($_POST['form'])) {
    $form = strip_tags($_POST['form']);
    switch ($form) {
        case 'login':
            $username = $_POST['username'];
            $password = $_POST['password'];
            $ez->login($username, $password);
            break;
        case 'register':
            $username = $_POST['username'];
            $password = $_POST['password'];
            $confirm = $_POST['confirm'];
            $email = $_POST['email'];
            $ez->register($username, $password, $email);
            break;
        case 'install':
            $site_name = $_POST['site_name'];
            $ez->run_installer($site_name);
            break;
        default:
            break;
    }
}
コード例 #2
0
ファイル: upgrade.php プロジェクト: Toyohara/ezleague
<?php

session_start();
date_default_timezone_set('America/Chicago');
include 'lib/class-db.php';
include 'lib/class-ezadmin.php';
$ez = new ezAdmin();
if (isset($_SESSION['ez_admin'])) {
    $ez->run_upgrade();
    unlink('upgrade.php');
} else {
    echo 'Ты не пройдешь!!!';
}
コード例 #3
0
ファイル: header.php プロジェクト: kgrayjr/ezleague
<?php

session_start();
define('EZL_VERSION', '3.5.9');
$check_for_update = file_get_contents('http://www.mdloring.com/ezleague_version.php', TRUE);
include 'lib/class-db.php';
include 'lib/class-ezadmin.php';
$ez = new ezAdmin();
$ez->setup_ezadmin();
$ez_settings = new ezAdmin_Settings();
$site_settings = $ez_settings->get_settings();
if (!empty($site_settings['timezone'])) {
    date_default_timezone_set('' . $site_settings['timezone'] . '');
} else {
    date_default_timezone_set('UTC');
}
$ez_news = new ezAdmin_News();
$ez_frontend = new ezAdmin_Frontend();
$ez_user = new ezAdmin_User();
$ez_team = new ezAdmin_Team();
$ez_league = new ezAdmin_League();
$ez_match = new ezAdmin_Match();
$ez_forum = new ezAdmin_Forum();
$ez_schedule = new ezAdmin_Schedule();
$ez_tournament = new ezAdmin_Tournament();
if (!isset($_SESSION['ez_admin'])) {
    if ($ez_frontend->test_connection()) {
        header("Location: login.php");
    } else {
        header("Location: install.php");
    }