Exemplo n.º 1
0
<?php

session_start();
define('EZL_VERSION', '3.5.9');
include 'lib/class-db.php';
include 'lib/class-ezleague.php';
$ez = new ezLeague();
$ez->setup_ezleague();
$ez->test_connection();
$ez_frontend = new ezLeague_Frontend();
$site_settings = $ez_frontend->get_site_settings();
if (!empty($site_settings['timezone'])) {
    date_default_timezone_set('' . $site_settings['timezone'] . '');
} else {
    date_default_timezone_set('UTC');
}
$ez_news = new ezLeague_News();
$ez_users = new ezLeague_User();
$ez_team = new ezLeague_Team();
$ez_league = new ezLeague_League();
$ez_inbox = new ezLeague_Inbox();
$ez_schedule = new ezLeague_Schedule();
$ez_tournament = new ezLeague_Tournament();
if (isset($_SESSION['ez_username'])) {
    $profile = $ez_users->get_user($_SESSION['ez_username']);
}
$site_settings = $ez_frontend->get_site_settings();
$social_networks = $ez_frontend->get_social_networks();
if ($site_settings['handle'] != '') {
    require_once dirname(__FILE__) . '/lib/codebird.php';
    \Codebird\Codebird::setConsumerKey('' . $site_settings['api'] . '', '' . $site_settings['secret'] . '');
Exemplo n.º 2
0
<?php

session_start();
include 'lib/class-db.php';
include 'lib/objects/class-user.php';
include 'lib/class-frontend.php';
$ez_user = new ezLeague_User();
$ez_frontend = new ezLeague_Frontend();
if (isset($_POST['form'])) {
    $form = $_POST['form'];
    switch ($form) {
        /*
         * LOGIN, REGISTRATION & INSTALLATION
         */
        case 'login':
            $username = $_POST['username'];
            $password = $_POST['password'];
            $ez_user->login($username, $password);
            break;
        case 'register':
            $username = $_POST['username'];
            $password = $_POST['password'];
            $confirm = $_POST['confirm'];
            $email = $_POST['email'];
            $ez_user->register($username, $password, $email);
            break;
        case 'reset_password':
            $email = $_POST['email'];
            $ez->resetPassword($email);
            break;
        case 'new_password':