Exemple #1
0
<?php

$body = new body();
$body->send();
Exemple #2
0
 public function cookies($login, $pass)
 {
     $cfg = new config();
     $sql = new sql();
     $body = new body();
     $result = $sql->exe($cfg->get("realmd"), "SELECT * FROM `account` WHERE `username` = '" . $login . "' AND `sha_pass_hash` = SHA1(UPPER('" . $login . ":" . $pass . "'))");
     $user = $sql->fetch($result);
     if ($user['gmlevel'] >= $cfg->get("mingm")) {
         $user['site_notice'] = $body->CheckVersion();
     }
     if ($user['id'] > "0") {
         return $user;
     }
 }
Exemple #3
0
<?php

$body = new body();
$body->redirect();
$body->htmlstart($title);
if (isset($_POST['login']) && isset($_POST['passw'])) {
    $log = htmlspecialchars(addslashes($_POST['login']));
    $pas = htmlspecialchars(addslashes($_POST['passw']));
    if ($body->authorization($log, $pas)) {
        $hash = md5($pas . ":" . $pas);
        echo '<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=index.php?cookies=1&l=' . $log . '&p=' . $pas . '&hash=' . $hash . '">';
        exit;
    }
}
$user['id'] = "-1";
$user['gmlevel'] = "0";
Exemple #4
0
<?php

include 'body.php';
session_start();
if (!isset($_SESSION['cod_user'])) {
    header('location: ../login.php');
}
$BODY = new body();
if (isset($_GET['funcionario'])) {
    $BODY->func();
}
if (isset($_GET['cadastroequip'])) {
    $BODY->cadastroequip();
}
if (isset($_GET['cadastrofornec'])) {
    $BODY->cadastrofornec();
}
if (isset($_GET['pesqfunc'])) {
    $BODY->pesqfunc();
}
if (isset($_GET['cadastroconj'])) {
    $BODY->cadastroconj();
}
$BODY->footer();
?>

Exemple #5
0
<?php

/*
 * @Auth: Rostom
 * Desc: routes to body.php passes the post values from forms to form processes
 * Use this area and add a unique post value for each case (i.e $_POST['login'])
 * 02/20/2016
 */
require_once 'autoLoader.php';
$ajax = new body();
if (isset($_POST['login'])) {
    $page_content_array[] = array("id" => "304", "login" => $_POST);
    $ajax->BuildPages($page_content_array);
} else {
    if (isset($_POST['signup'])) {
        unset($page_content_array);
        $page_content_array[] = array("id" => "305", "signup" => $_POST);
        $ajax->BuildPages($page_content_array);
    } else {
        if (isset($_POST['createleagues'])) {
            unset($page_content_array);
            $page_content_array[] = array("id" => "306", "create_league" => $_POST);
            $ajax->BuildPages($page_content_array);
        } else {
            if (isset($_POST['add_fields'])) {
                unset($page_content_array);
                $page_content_array[] = array("id" => "307", "add_more_fields" => $_POST);
                $ajax->BuildPages($page_content_array);
            } else {
                if (isset($_POST['do_invite'])) {
                    unset($page_content_array);
Exemple #6
0
<?php

require_once "config.php";
require_once "lib/classes.php";
require_once "pages.php";
require_once "special.php";
$body = new body();
$cfg = new config();
$sql = new sql();
if (isset($_COOKIE['wul']) && isset($_COOKIE['wup']) && $_COOKIE['wul'] != '' && $_COOKIE['wup'] != '') {
    $user = $body->cookies();
}
$body->header();
if (isset($_POST['login']) && isset($_POST['passw']) && $user['id'] == "-1") {
    $body->failedlogin();
}
if (file_exists("install.php")) {
    if ($sql->exe($cfg->get("realmd"), "SELECT 1 FROM `bt_message`")) {
        $body->blocknot('<div class="pad">Внимание!<br><br>Необходимо удалить файл <b>install.php</b> в корневой директории баг-трекера.</div>');
    } else {
        $body->install();
    }
    $body->end();
    exit;
}
if ($user['id'] != "-1") {
    $body->success();
}
if ($user['gmlevel'] >= $cfg->get("mingm")) {
    $body->admin();
}
Exemple #7
0
<?php

global $user;
$body = new body();
$cfg = new config();
if ($user['gmlevel'] >= $cfg->get("mingm")) {
    $body->adminpanel();
} else {
    echo '<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=index.php">';
    exit;
}
Exemple #8
0
<?php

$body = new body();
$body->view();
Exemple #9
0
 public function LoadPageBody()
 {
     $function = new functions();
     $command = new commands();
     $forms = new forms();
     $curl = new cron();
     $command->FindAllCommands($_GET['cmd']);
     $this->_post_values = $_POST;
     /*
      * IF THE USER COMES FROM EMAIL URL 
      */
     if (isset($_GET['lid'])) {
         $table = array("0" => "temp_invite");
         $fields = array("0" => "linkid", "1" => "status");
         $values = array("0" => $_GET['lid'], "1" => "0");
         $option = "4";
         $option2 = "1";
     }
     /*
      * Pages 
      * Default set for Home page
      * follow the procedure from below
      * Do NOT Change fist if statment 
      */
     if (!isset($_GET['cmd']) || $_GET['cmd'] == "") {
         if (isset($_GET['lid']) && $function->CheckIfExists($table, $fields, $values, $option, $option2)) {
             $page_content_array[] = array("id" => "55", "invite_info" => $_GET['lid']);
         } else {
             $numUsers = $function->GetNumUsers();
             $numLeagues = $function->GetNumLeagues();
             $numTeams = $function->GetNumTeams();
             $numPoints = $function->GetNumPoints();
             $page_content_array[] = array("id" => "0", "page_name" => "Landing", "div_name" => "landing", "signup" => $this->_post_values, "login" => $this->_post_values, "numUsers" => $numUsers, "numLeagues" => $numLeagues, "numTeams" => $numTeams, "numPoints" => $numPoints);
         }
         /*
          * Profile
          * id @ 1
          * DO not Change this
          * RS 20160201
          * 
          */
     } else {
         if (isset($_GET['cmd']) && $function->CheckSSID("users", $_GET['ssid']) == true && $command->ReturnAllCommands() && isset($_SESSION['isLoggedin'])) {
             switch ($_GET['cmd']) {
                 case "profile":
                     $data = $function->getDataQuery("users", "ssid", $_GET['ssid']);
                     $data = $function->SetDataQuery();
                     $userleagues = $function->GetUserLeagues();
                     $page_content_array[] = array("id" => "1", "page_name" => "Profile", "div_name" => "m-a-n", "data" => $data, "forms" => $forms, "functions" => $function, "invite" => $this->_post_values, "link_stat" => $link_status, "delete_key" => $_GET['id'], "user_leagues" => $userleagues);
                     break;
                 case "home":
                     $leagueName = $function->GetLeagueName();
                     $function->SetPoints();
                     $leagueStandings = $function->GetStandings();
                     $dailyChanges = $function->GetDailyChanges();
                     $page_content_array[] = array("id" => "2", "page_name" => "Home", "div_name" => "home", "league_name" => $leagueName, "league_standings" => $leagueStandings, "dailyChanges" => $dailyChanges);
                     break;
                 case "roster":
                     $data = $function->GetData();
                     $teamName = $function->GetTeamName();
                     $userRoster = $function->GetRoster();
                     $getTradeOffers = $function->GetTradeOffers();
                     $incomingTradeOffers = $function->IncomingTrades();
                     $teamRank = $function->GetTeamRank();
                     $page_content_array[] = array("id" => "3", "page_name" => "Roster", "div_name" => "team", "data" => $data, "roster" => $userRoster, "functions" => $function, "teamName" => $teamName, "trades" => $getTradeOffers, "incoming" => $incomingTradeOffers, "teamRank" => $teamRank);
                     break;
                 case "add-drop":
                     $userRoster = $function->GetRoster();
                     $data = $function->GetData();
                     $taken = $function->TakenTeams();
                     $page_content_array[] = array("id" => "4", "page_name" => "Add/Drop", "div_name" => "add-drop", "data" => $data, "roster" => $userRoster, "taken" => $taken);
                     break;
                 case "trades":
                     $userRoster = $function->GetRoster();
                     $pool = $function->GetData();
                     $teamID = $function->GetTeamsID();
                     $teamMembers = $function->GetTeamMembers();
                     $page_content_array[] = array("id" => "5", "page_name" => "Trades", "div_name" => "trades", "roster" => $userRoster, "pool" => $pool, "teamsID" => $teamID, "teamMembers" => $teamMembers);
                     break;
                 case "matchup":
                     $function->getDataQuery("users", "ssid", $_GET['ssid']);
                     $data = $function->SetDataQuery();
                     $page_content_array[] = array("id" => "6", "page_name" => "Match Up", "div_name" => "matchup", "data" => $data);
                     break;
                 case "draft":
                     $pool = $function->GetData();
                     $draftOrder = $function->DraftOrder();
                     $reverseOrder = $function->DraftReverseOrder();
                     $onTheClock = $function->OnTheClock();
                     $teamsTaken = $function->TeamsTaken();
                     $taken = $function->TakenTeams();
                     $totalPicks = $function->GetTotalPicks();
                     $draftStatus = $function->GetDraftStatus();
                     $getRosterStatus = $function->GetRosterStatus();
                     $commisioner = $function->GetCommisioner();
                     $page_content_array[] = array("id" => "7", "page_name" => "Draft", "div_name" => "draft", "pool" => $pool, "draftOrder" => $draftOrder, "reverseOrder" => $reverseOrder, "clock" => $onTheClock, "teamsTaken" => $teamsTaken, "totalPicks" => $totalPicks, "taken" => $taken, "status" => $draftStatus, "rosterStatus" => $getRosterStatus, "commisioner" => $commisioner);
                     break;
                 case "settings":
                     $page_content_array[] = array("id" => "8", "page_name" => "Setting", "div_name" => "m-a-n", "data" => $data);
                     break;
                 case "edit-profile":
                     $function->getDataQuery("users", "ssid", $_GET['ssid']);
                     $data = $function->SetDataQuery();
                     $page_content_array[] = array("id" => "9", "page_name" => "Edit Profile", "div_name" => "m-a-n", "data" => $data);
                     break;
                 case "log-out":
                     $function->UpdateLoginSSID("users", $_SESSION['isLoggedin'], "ssid", $_GET['ssid']);
                     $page_content_array[] = array("id" => "10", "page_name" => "Logout");
                     break;
                 case "help":
                     $page_content_array[] = array("id" => "11", "page_name" => "Help", "div_name" => "help", "data" => $data);
                     break;
                 case "faq":
                     $page_content_array[] = array("id" => "12", "page_name" => "FAQ", "div_name" => "faq", "data" => $data);
                     break;
                 case "invited":
                     $page_content_array[] = array("id" => "13", "page_name" => "Invited page", "div_name" => "m-a-n", "data" => $_GET['lid'], "forms" => $forms, "functions" => $function, "invite" => $this->_post_values, "ssid" => $_GET['ssid']);
                     break;
             }
         } else {
             if (isset($_GET['cmd']) && $function->CheckSSID("users", $_GET['ssid']) == false && !isset($_SESSION['isLoggedin'])) {
                 header("Location: loader.php?cmd=");
             } else {
                 $page_content_array[] = array("id" => "404", "page_name" => "404");
             }
         }
     }
     $body = new body();
     echo $body->BuildPages($page_content_array);
 }