Beispiel #1
0
<?php

require_once '../../class.interpool.php';
require_once '../class.playoffs2.php';
$playoffs2 = new playoffs2();
$pool = new interPool();
$id_pool = $_GET["id_pool"];
$id_saison = $_GET["id_saison"];
$gerant = $_GET["gerant"];
$id_gerant = $gerant;
$tab = $_GET["tab"];
$gerant_sel = $gerant;
$poolName = $_GET["poolName"];
$pool->dbConnect(strtolower($poolName));
// config des séries
$data = $playoffs2->getConfig($id_pool, $id_saison, $pool);
$ronde_nhl = $data["ronde_nhl"];
// array des équipes qui jouent ce soir
$play_tonightA = array();
$query = "select home,visitor from schedule_playoffs\n          where date = '{$pool->today}'";
$resultID = mysql_query($query, $pool->handle);
while ($data = mysql_fetch_array($resultID, MYSQL_ASSOC)) {
    $home = $data["home"];
    $visitor = $data["visitor"];
    $play_tonightA[] = $home;
    $play_tonightA[] = $visitor;
}
mysql_free_result($resultID);
switch ($tab) {
    case "live":
        echo "<table cellpadding=0 cellspacing=0 border=0 width=100%>\n";
Beispiel #2
0
<?php

require_once 'config.DB_eSession.php';
require_once 'class.DB_eSession.php';
require_once '../class.interpool.php';
require_once '../class.db.php';
require_once '../browser_detection.php';
require_once '../phpMyBorder2.class.php';
$sess_param['name'] = "DRAFT_INTERPOOL";
$sess = new DB_eSession($sess_param);
// session_start() done.
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
$pool = new interPool();
// récupérer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$id_saison = $sess->getSessVar('id_saison', 0);
$gerant = $sess->getSessVar('gerant', 0);
$poolName = $sess->getSessVar('poolName', 0);
$tab = $sess->getSessVar('draft_tab', 'avants');
$forwards_limit_debut = $sess->getSessVar('forwards_limit_debut', 0);
$defenseurs_limit_debut = $sess->getSessVar('defenseurs_limit_debut', 0);
$gardiens_limit_debut = $sess->getSessVar('gardiens_limit_debut', 0);
$allPlayers_limit_debut = $sess->getSessVar('allPlayers_limit_debut', 0);
$forwards_limit_nombre = $sess->getSessVar('forwards_limit_nombre', 30);
$defenseurs_limit_nombre = $sess->getSessVar('defenseurs_limit_nombre', 30);
$gardiens_limit_nombre = $sess->getSessVar('gardiens_limit_nombre', 30);
$allPlayers_limit_nombre = $sess->getSessVar('allPlayers_limit_nombre', 30);
$forwards_limit_debut_prev = $forwards_limit_debut - $forwards_limit_nombre;
$forwards_limit_debut_next = $forwards_limit_debut + $forwards_limit_nombre;
$defenseurs_limit_debut_prev = $defenseurs_limit_debut - $defenseurs_limit_nombre;
Beispiel #3
0
// session_start() done.
// Retrieve $_SESSION['authenticated'] value if set, otherwise return FALSE.
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
// récupérer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$pool = new interPool();
// récupérer certaines informations de la session
$userName = $sess->getSessVar('user', '');
$periode = $sess->getSessVar('periode', '1');
//$periode_sel = $sess->getSessVar('periode_sel','1');
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $gerant;
$id_saison = $sess->getSessVar('id_saison', '0');
$poolName = $sess->getSessVar('poolName', '');
$msg_draft_online_random = "";
// Connexion a la bd
if (!$pool->dbConnect(strtolower($poolName))) {
    session_destroy();
    // Delete session created (new DB_eSession)
    echo "<SCRIPT language=\"javascript\">";
    echo "alert('Erreur lors de la connexion à la base de données. Vous serez ramené à la page d'acceuil.');";
Beispiel #4
0
// session_start() done.
// Retrieve $_SESSION['authenticated'] value if set, otherwise return FALSE.
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
// récupérer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$pool = new interPool();
// récupérer certaines informations de la session
$userName = $sess->getSessVar('user', '');
$periode = $sess->getSessVar('periode', '1');
//$periode_sel = $sess->getSessVar('periode_sel','1');
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $gerant;
$id_saison = $sess->getSessVar('id_saison', '0');
$poolName = $sess->getSessVar('poolName', '');
// Connexion a la bd
if (!$pool->dbConnect(strtolower($poolName))) {
    session_destroy();
    // Delete session created (new DB_eSession)
    echo "<SCRIPT language=\"javascript\">";
    echo "alert('Erreur lors de la connexion à la base de données. Vous serez ramené à la page d'acceuil.');";
    echo "top.location.href=\"/index.php\";";
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// formulaire du choix du calendrier...
if (isset($_REQUEST['choix'])) {
    $sess->setSessVar('calendrier', $_REQUEST['choix']);
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
$pool = new interPool();
// rיcupיrer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$userName = $sess->getSessVar('user', '');
$periode = $sess->getSessVar('periode', '1');
$periode_sel = $sess->getSessVar('periode_sel', '1');
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $sess->getSessVar('gerant_sel', '1');
$id_saison = $sess->getSessVar('id_saison', '0');
$poolName = $sess->getSessVar('poolName', '');
$kit_rapport_choix_team = $sess->getSessVar('kit_rapport_choix_team', '0');
$kit_rapport_choix_pos = $sess->getSessVar('kit_rapport_choix_pos', '10000');
$kit_rapport_limite_aff = $sess->getSessVar('kit_rapport_limite_aff', '50');
// Connexion a la bd
if (!$pool->dbConnect(strtolower($poolName))) {
    session_destroy();
Beispiel #6
0
$sess_param['name'] = "INTERPOOL";
$sess = new DB_eSession(&$sess_param);
// session_start() done.
// Retrieve $_SESSION['authenticated'] value if set, otherwise return FALSE.
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
$pool = new interPool();
// récupérer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$userName = $sess->getSessVar('user', '');
$periode = $sess->getSessVar('periode', '1');
$periode_sel = $periode;
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $gerant;
$id_saison = $sess->getSessVar('id_saison', '0');
$id_saison2show = $sess->getSessVar('id_saison2show_fantasy_salaryCap', $id_saison);
$poolName = $sess->getSessVar('poolName', '');
// Connexion a la bd
if (!$pool->dbConnect(strtolower($poolName))) {
    session_destroy();
    // Delete session created (new DB_eSession)
    echo "<SCRIPT language=\"javascript\">";
$sess_param['name'] = "INTERPOOL";
$sess = new DB_eSession(&$sess_param);
// session_start() done.
// Retrieve $_SESSION['authenticated'] value if set, otherwise return FALSE.
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
$pool = new interPool();
$poolName = $sess->getSessVar('poolName', '');
$id_team = $sess->getSessVar('edit_player_sel_team', '0');
// Connexion a la bd
if (!$pool->dbConnect(strtolower($poolName))) {
    session_destroy();
    // Delete session created (new DB_eSession)
    echo "<SCRIPT language=\"javascript\">";
    echo "alert('Erreur lors de la connexion à la base de données. Vous serez ramené à la page d'acceuil.');";
    echo "top.location.href=\"/interPool/index.php\";";
    echo "</SCRIPT>";
    exit;
}
if (isset($_GET[id_team])) {
    $id_team = $_GET[id_team];
}
Beispiel #8
0
$sess_param['name'] = "INTERPOOL";
$sess = new DB_eSession(&$sess_param);
// session_start() done.
// Retrieve $_SESSION['authenticated'] value if set, otherwise return FALSE.
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
$pool = new interPool();
// POUR LES ADMINS (il suffit de taper l'url : ......./accueil.php?admin=1
if (isset($_GET["admin"]) && $_GET["admin"] == 1) {
    $sess->setSessVar('affiche_admin_menu', 1);
}
// récupérer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$userName = $sess->getSessVar('user', '');
$periode = $sess->getSessVar('periode', '1');
//$periode_sel = $sess->getSessVar('periode_sel','1');
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $gerant;
$id_saison = $sess->getSessVar('id_saison', '0');
$poolName = $sess->getSessVar('poolName', '');
$pool_type = $sess->getSessVar('poolType', '');
// Connexion a la bd
<?php

//pour la dev
//$dev = "-dev";
require_once '../class.interpool.php';
require_once 'config.DB_eSession.php';
require_once 'class.DB_eSession.php';
$poolname = $_GET["poolname"];
$email = $_GET["email"];
$pool = new interPool();
$pool->dbConnect(strtolower($poolName));
// passe croche pour le pool K&G (le problème du signe & dans l'url...)
$poolname = str_replace("^", "&", $poolname);
// pour les accents français
//header("Content-Type:application/xhtml+xml; charset=ISO-8859-1");
// id du pool
$query = "select id,saison from pools where name = '{$poolname}'";
$resultID = mysql_query($query, $pool->handle);
$data = mysql_fetch_array($resultID, MYSQL_ASSOC);
mysql_free_result($resultID);
$id_pool = $data[id];
$id_saison = $data[saison];
// recherche du email entré en paramètre parmi les gérants du pool
$query = "select username,password\n          from accounts\n          where id_pool = {$id_pool}\n          and saison_id = {$id_saison}\n          and email like '%{$email}%'";
$resultID = mysql_query($query, $pool->handle);
$data = mysql_fetch_array($resultID, MYSQL_ASSOC);
mysql_free_result($resultID);
if ($data != "") {
    $username = $data[username];
    $password = $data[password];
    $headers = "MIME-Version: 1.0\n";
Beispiel #10
0
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// formulaire du choix des stats...
if (isset($_REQUEST['choix'])) {
    $sess->setSessVar('stats_gerant', $_REQUEST['choix']);
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
$pool = new interPool();
// récupérer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$userName = $sess->getSessVar('user', '');
$periode = $sess->getSessVar('periode', '1');
$periode_sel = $periode;
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $sess->getSessVar('gerant_sel_stats_gerants', $gerant);
$poolName = $sess->getSessVar('poolName', '');
$id_saison = $sess->getSessVar('id_saison', '0');
$choix_stats = $sess->getSessVar('stats_gerant', "pts");
$cur_id_saison = $id_saison;
// Connexion a la bd
if (!$pool->dbConnect(strtolower($poolName))) {
    session_destroy();
    // Delete session created (new DB_eSession)
Beispiel #11
0
// session_start() done.
// Retrieve $_SESSION['authenticated'] value if set, otherwise return FALSE.
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
// récupérer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$pool = new interPool();
// récupérer certaines informations de la session
$userName = $sess->getSessVar('user', '');
$periode = $sess->getSessVar('periode', '1');
//$periode_sel = $sess->getSessVar('periode_sel','1');
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $gerant;
$id_saison = $sess->getSessVar('id_saison', '0');
$poolName = $sess->getSessVar('poolName', '');
$edit_player_choix = $sess->getSessVar('edit_player_choix', 'all');
$edit_player_choix_pos = $sess->getSessVar('edit_player_choix_pos', 'all');
$edit_player_sel_team = $sess->getSessVar('edit_player_sel_team', '0');
// Connexion a la bd
if (!$pool->dbConnect(strtolower($poolName))) {
    session_destroy();
    // Delete session created (new DB_eSession)
Beispiel #12
0
$sess_param['name'] = "INTERPOOL";
$sess = new DB_eSession($sess_param);
// session_start() done.
// Retrieve $_SESSION['authenticated'] value if set, otherwise return FALSE.
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
$pool = new interPool();
// récupérer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$userName = $sess->getSessVar('user', '');
$periode = $sess->getSessVar('periode', '1');
$periode_sel = $periode;
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $gerant;
$id_saison = $sess->getSessVar('id_saison', '0');
$poolName = $sess->getSessVar('poolName', '');
$tab = $sess->getSessVar('tab_draft', 'draft_by_year');
$id_saison_overall_draft = $sess->getSessVar('id_saison_overall_draft', $id_saison);
$choix_overall_draft = $sess->getSessVar('choix_overall_draft', 'all');
$choix_pos_statsDraft = $sess->getSessVar('choix_pos_statsDraft', 'all');
$statsDraft_limite_aff = $sess->getSessVar('statsDraft_limite_aff', 'top20');
$choix_pos_statsDraft2 = $sess->getSessVar('choix_pos_statsDraft2', 'all');
Beispiel #13
0
<?php

require_once '../../class.interpool.php';
require_once '../class.playoffs2.php';
$playoffs2 = new playoffs2();
$pool = new interPool();
$id_pool = $_GET["id_pool"];
$id_saison = $_GET["id_saison"];
$gerant = $_GET["gerant"];
$gerant_sel = $gerant;
$poolName = $_GET["poolName"];
$pool->dbConnect(strtolower($poolName));
echo "<table cellpadding=0 cellspacing=0 border=0 width=100%>\n";
echo "<tr>\n";
echo "<td class=\"tableCellBold1\" style=\"padding-top:3px;padding-bottom:3px;\">Rg</td>\n";
echo "<td class=\"tableCellBold3\" style=\"padding-top:3px;padding-bottom:3px;\">Gérant</td>\n";
echo "<td class=\"tableCellBold3\" style=\"padding-top:3px;padding-bottom:3px;\">Pts</td>\n";
echo "<td class=\"tableCellBold4\" style=\"padding-top:3px;padding-bottom:3px;\">Hier</td>\n";
echo "</tr>\n";
$dataA = $playoffs2->getClassement($id_pool, $id_saison, $pool);
if (count($dataA) > 0) {
    $rang = 1;
    foreach ($dataA as $valueA) {
        $my_id_gerant = $valueA["gerant"];
        $nickname = $valueA["nickname"];
        $pts = $valueA["pts"];
        $logo = $valueA["logo"];
        $pts_yest = $playoffs2->getPtsYesterday_tab_accueil($id_pool, $id_saison, $pool, $my_id_gerant);
        if ($pts_yest == "") {
            $pts_yest = 0;
        }
Beispiel #14
0
                        $sess->setSessVar('admin', $rtnL[2]);
                        $sess->setSessVar('id_saison', $id_saison);
                        $sess->setSessVar('poolName', $rtnL[3]);
                        $sess->setSessVar('pool_type', $pool_type);
                        header("Location: /src/main2.php");
                        $pool->dbClose();
                        exit;
                    }
                }
            }
        } else {
            $message = "";
        }
    }
}
$pool = new interPool();
if (!$pool->dbConnect("pmh")) {
    $message = "Problèmes avec la base de données. Ré-essayez plus tard...";
} else {
    $poolsA = $pool->getAllPools();
}
?>
<HTML>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<HEAD>
<TITLE>PMH</TITLE>
<link rel="shortcut icon" type="image/x-icon" href="http://www.pmh.lamoria.ca/images/PMH.ico" />
<link rel="shortcut" type="image/x-icon" href="http://www.pmh.lamoria.ca/images/PMH.ico" />
	<?php 
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
echo "<LINK REL=stylesheet TYPE=\"text/css\" HREF=\"/css/interpool-" . $browser . ".css\">";
Beispiel #15
0
<?php

require_once '../../class.interpool.php';
$id_pool = $_GET["id_pool"];
$id_saison = $_GET["saison_id"];
$gerant = $_GET["gerant"];
$poolName = $_GET["poolName"];
$salary_cap_enabled = $_GET["salary_cap"];
$ronde_rendue = $_GET["ronde"];
$pool = new interPool();
$pool->dbConnect(strtolower($poolName));
// quelques config du pool...
$query = "select nbre_forwards_total,nbre_defense_total,nbre_goalie_total,nbre_team_total,nbreJoueurGrandClub\n      from configPool\n      where\n         id_pool = {$id_pool}\n         and saison_id = {$id_saison}";
$resultID = mysql_query($query, $pool->handle);
$data = mysql_fetch_array($resultID, MYSQL_ASSOC);
mysql_free_result($resultID);
$nbre_avants_GC = $data["nbre_forwards_total"];
$nbre_defenseurs_GC = $data["nbre_defense_total"];
$nbre_gardiens_GC = $data["nbre_goalie_total"];
$nbre_teams_GC = $data["nbre_team_total"];
$nbre_joueur_GC = $data["nbreJoueurGrandClub"];
// config du draft
$query = "select draft_equipes from draft_config\n          where\n            id_pool = {$id_pool}\n            and saison_id = {$id_saison}";
$resultID = mysql_query($query, $pool->handle);
$data = mysql_fetch_array($resultID, MYSQL_ASSOC);
mysql_free_result($resultID);
$draft_equipes = $data['draft_equipes'];
// si les équipes font partie du repêchage, il faut en tenir compte comme joueur du GC
if ($draft_equipes != "Y") {
    $nbre_joueur_GC_2_use = $nbre_joueur_GC;
} else {
Beispiel #16
0
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
$id_pool = $sess->getSessVar('id_pool', 0);
$id_saison = $sess->getSessVar('id_saison', '0');
$poolName = strtolower($sess->getSessVar('poolName', ''));
if ($poolName == "") {
    return;
}
$pool = new interPool();
// connexion א la bd
if (!$pool->dbConnect(strtolower($poolName))) {
    session_destroy();
    // Delete session created (new DB_eSession)
    echo "<SCRIPT language=\"javascript\">";
    echo "alert('Erreur lors de la connexion א la base de donnיes. Vous serez ramenי א la page d'acceuil.');";
    echo "top.location.href=\"/interPool/index.php\";";
    echo "</SCRIPT>";
    exit;
}
$data = $pool->getConfigPool($id_pool, $id_saison);
$rules_version = $data["rules_version"];
$rules_filename = $data[rules_filename];
if ($rules_filename == "") {
    $query = "select texte1 from saison\n                    where id_pool = {$id_pool}\n                    and id = {$id_saison}";
Beispiel #17
0
$sess_param['name'] = "INTERPOOL";
$sess = new DB_eSession($sess_param);
// session_start() done.
// Retrieve $_SESSION['authenticated'] value if set, otherwise return FALSE.
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
$pool = new interPool();
// récupérer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$userName = $sess->getSessVar('user', '');
$periode = $sess->getSessVar('periode', '1');
$periode_sel = $periode;
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $gerant;
$id_saison = $sess->getSessVar('id_saison', '0');
$poolName = $sess->getSessVar('poolName', '');
$kit_choix_team = $sess->getSessVar('kit_choix_team', '1');
$kit_choix_pos = $sess->getSessVar('kit_choix_pos', 'all');
$kit_choix_sortCol = $sess->getSessVar('kit_choix_sortCol', 'res2');
$kit_detail_abrege = $sess->getSessVar('kit_detail_abrege', 'abrege');
$kit_limite_aff = $sess->getSessVar('kit_limite_aff', '50');
$kit_aff_first = $sess->getSessVar('kit_aff_first', '1');
Beispiel #18
0
<?php

require_once '../class.interpool.php';
$id_pool = $_GET["id_pool"];
$id_saison = $_GET["id_saison"];
$periode = $_GET["periode"];
$gerant = $_GET["gerant"];
$type = $_GET["type"];
$choix_scratchs = isset($_GET["choix_scratchs"]) ? $_GET["choix_scratchs"] : "";
$data2 = $_GET["data"];
$poolName = $_GET["poolName"];
$gerant_sel = $gerant;
$pool = new interPool();
$pool->dbConnect(strtolower($poolName));
$nhl_team_as_gerant_name = "Y";
$data = $pool->getConfigPool($id_pool, $id_saison);
$nbre_periodes = $data["nbre_periodes"];
if ($periode > $nbre_periodes) {
    $periode_sel = $nbre_periodes;
} else {
    $periode_sel = $periode;
}
if ($periode_sel >= $periode) {
    $date_injury = $pool->today;
} else {
    $datesA = $pool->getDatesPeriode($id_pool, $periode_sel, $id_saison);
    $date_injury = $datesA[0];
}
// pour les accents français
header("Content-Type:application/xhtml+xml; charset=ISO-8859-1");
echo "<INPUT TYPE=\"HIDDEN\" ID=\"id_pool\" VALUE=\"{$id_pool}\" />\n";
Beispiel #19
0
$sess_param['name'] = "INTERPOOL";
$sess = new DB_eSession(&$sess_param);
// session_start() done.
// Retrieve $_SESSION['authenticated'] value if set, otherwise return FALSE.
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
$pool = new interPool();
// récupérer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$userName = $sess->getSessVar('user', '');
$periode = $sess->getSessVar('periode', '1');
$periode_sel = $periode;
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $gerant;
$id_saison = $sess->getSessVar('id_saison', '0');
$id_saison2show = $sess->getSessVar('id_saison2show', $id_saison);
$poolName = $sess->getSessVar('poolName', '');
$tab = $sess->getSessVar('tab_fantasy', 'pred_classements');
// Connexion a la bd
if (!$pool->dbConnect(strtolower($poolName))) {
    session_destroy();
    // Delete session created (new DB_eSession)
Beispiel #20
0
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
// retrieve the league name and the user name
$ligue_id = $sess->getSessVar('id_pool', 0);
$userName = $sess->getSessVar('user', '');
$active_user = $sess->getSessVar('active_user', '');
$periode = $sess->getSessVar('periode', '1');
$active_periode = $sess->getSessVar('active_periode', '1');
$tab = $sess->getSessVar('tab', "accueil");
// passage entre les pages séries et les pages saison...
if ($tab == "series") {
    $tab = "accueil";
}
$pool = new interPool();
// Connexion a la bd
if (!$pool->dbConnect()) {
    session_destroy();
    // Delete session created (new DB_eSession)
    echo "<SCRIPT language=\"javascript\">";
    echo "alert('Erreur lors de la connexion à la base de données. Vous serez ramené à la page d'acceuil de Poolsvr.');";
    echo "top.location.href=\"/interPool/index.php\";";
    echo "</SCRIPT>";
    exit;
}
switch ($tab) {
    case "calendrier":
        header("Location:/interPool/src/series/calendrier.php");
        break;
    case "face2face":
Beispiel #21
0
$sess_param['name'] = "INTERPOOL";
$sess = new DB_eSession($sess_param);
// session_start() done.
// Retrieve $_SESSION['authenticated'] value if set, otherwise return FALSE.
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
$pool = new interPool();
$playoffs2 = new playoffs2();
// récupérer certaines informations de la session
$id_saison = $sess->getSessVar('id_saison', '0');
$id_pool = $sess->getSessVar('id_pool', 0);
$userName = $sess->getSessVar('user', '');
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $gerant;
$poolName = strtolower($sess->getSessVar('poolName', ''));
//$poolLogo = $sess->getSessVar('logo_pool','');
$tab = $sess->getSessVar('tab_equipe', 'live');
if (isset($_REQUEST["tab"])) {
    $tab = $_REQUEST["tab"];
    $sess->setSessVar('tab_equipe', $tab);
}
// Connexion a la bd
Beispiel #22
0
            if ($label_len - $start > 0) {
                $no_highlight = substr($label, $start);
                $label_highlight .= $no_highlight;
            }
            $a_json[$row]["label"] = $label_highlight;
        }
    }
    return $a_json;
}
$sess_param['name'] = "DRAFT_INTERPOOL";
$sess = new DB_eSession($sess_param);
// session_start() done.
$id_pool = $sess->getSessVar('id_pool', 0);
$id_saison = $sess->getSessVar('id_saison', 0);
$poolName = $sess->getSessVar('poolName', 0);
$pool = new interPool();
$pool->dbConnect(strtolower($poolName));
$q = trim($_GET["term"]);
//$limit = $_GET["limit"];
$limit = 10;
$a_json = array();
$a_json_row = array();
// replace multiple spaces with one
$q = preg_replace('/\\s+/', ' ', $q);
$parts = explode(' ', $q);
$date = new DateTime(null, new DateTimeZone("America/Montreal"));
$this_year = $date->format('Y');
$query = "select a.id,a.last_name,a.first_name,a.id_forecaster,a.salary_frozen,b.abbr,a.url_photo,a.contrat_fin,a.ufa_rfa,a.pos\n          from nhl_players a, teams b\n          where a.team = b.id\n          and a.date_expiration = '2099-12-31'\n          and (a.salary_frozen > 0 OR a.contrat_fin = '{$this_year}')\n          and (a.team < 31 or a.team = 34)";
for ($i = 0; $i < count($parts); $i++) {
    $query .= " AND CONCAT(a.first_name,' ',a.last_name) like \"%" . $parts[$i] . "%\"";
}
$sess_param['name'] = "INTERPOOL";
$sess = new DB_eSession(&$sess_param);
// session_start() done.
// Retrieve $_SESSION['authenticated'] value if set, otherwise return FALSE.
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
$pool = new interPool();
// rיcupיrer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$id_saison = $sess->getSessVar('id_saison', '0');
$poolName = $sess->getSessVar('poolName', '');
// Connexion a la bd
if (!$pool->dbConnect(strtolower($poolName))) {
    session_destroy();
    // Delete session created (new DB_eSession)
    echo "<SCRIPT language=\"javascript\">";
    echo "alert('Erreur lors de la connexion א la base de donnיes. Vous serez ramenי א la page d'acceuil.');";
    echo "top.location.href=\"/interPool{$dev}/index.php\";";
    echo "</SCRIPT>";
    exit;
}
// pour les accents franחais
Beispiel #24
0
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// formulaire du choix historique/période...
if (isset($_REQUEST['type'])) {
    $sess->setSessVar('ballotage', $_REQUEST['type']);
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
$pool = new interPool();
// récupérer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$userName = $sess->getSessVar('user', '');
$periode = $sess->getSessVar('periode', '1');
$periode_sel = $sess->getSessVar('periode_sel_ballotage', $periode);
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $gerant;
$type_ballotage = $sess->getSessVar('ballotage', "periode");
$id_saison = $sess->getSessVar('id_saison', '0');
$poolName = $sess->getSessVar('poolName', '');
// Connexion a la bd
if (!$pool->dbConnect(strtolower($poolName))) {
    session_destroy();
    // Delete session created (new DB_eSession)
    echo "<SCRIPT language=\"javascript\">";
Beispiel #25
0
<?php

require_once '../class.interpool.php';
$gerant = $_GET["gerant"];
$name = $_GET["name"];
$value = $_GET["value"];
$poolName = $_GET["poolName"];
$pool = new interPool();
$pool->dbConnect(strtolower($poolName));
$query = "select 1 from accounts_prefs\r\n          where gerant = {$gerant}\r\n          and name = '{$name}'";
$resultID = mysql_query($query, $pool->handle);
$num_rows = mysql_num_rows($resultID);
mysql_free_result($resultID);
if ($num_rows) {
    $query = "update accounts_prefs set value='{$value}'\r\n               where gerant = {$gerant}\r\n               and name = '{$name}'";
} else {
    $query = "insert into accounts_prefs (gerant,name,value)\r\n               values ({$gerant},'{$name}','{$value}')";
}
mysql_query($query, $pool->handle);
<?php

require_once '../class.interpool.php';
require_once '../class.db.php';
$id_pool = $_GET["id_pool"];
$id_saison = $_GET["id_saison"];
$periode = $_GET["periode"];
$gerant_logged = $_GET["gerant_logged"];
$gerant = $_GET["gerant"];
$id_gerant2 = $_GET["id_gerant2"];
$poolName = $_GET["poolName"];
$sess_id = $_GET["sess_id"];
isset($_GET["afficheHeader"]) ? $afficheHeader = $_GET["afficheHeader"] : ($afficheHeader = 0);
$gerant_sel = $gerant;
$pool = new interPool();
DB::dbConnect(strtolower($poolName));
$pool->dbConnect(strtolower($poolName));
// récupérer certaines informations du pool
$data = $pool->getConfigPool($id_pool, $id_saison);
$match_max_trade = $data["match_max_trade"];
$match_max_trade_goalie = $data["match_max_trade_goalie"];
$trade_howto_switch_players = $data["trade_howto_switch_players"];
$match_max_trade_team = $data["match_max_trade_team"];
$can_trade_teams = $data["trade_teams"];
$salary_cap_enabled = $data['enable_salary_cap'];
$nbre_team_total = $data['nbre_team_total'];
$trade_draftPicks = $data['trade_draftPicks'];
$date_debut_saison = $data['date_debut_saison'];
$tradecenter_show_both_pts = $data['tradecenter_show_both_pts'];
$trade_before_draft = $data['trade_before_draft'];
$trade_before_draft_dateBegin = $data['trade_before_draft_dateBegin'];
Beispiel #27
0
$sess_param['name'] = "INTERPOOL";
$sess = new DB_eSession($sess_param);
// session_start() done.
// Retrieve $_SESSION['authenticated'] value if set, otherwise return FALSE.
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
$pool = new interPool();
// récupérer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$userName = $sess->getSessVar('user', '');
$periode = $sess->getSessVar('periode', '1');
$periode_sel = $periode;
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $gerant;
$id_saison = $sess->getSessVar('id_saison', '0');
$poolName = $sess->getSessVar('poolName', '');
$cb_gerant_selected = $sess->getSessVar('tradecenter_cb_gerant', '');
$sess_ar = $sess->getSessInfo();
$sess_id = $sess_ar['sess_id'];
// Connexion à la bd
DB::dbConnect(strtolower($poolName));
// pour fin de compatibilité avec l'ancienne méthode de fonctionnement (jusqu'à ce que le code soit changé...)
<?php

require_once '../../class.interpool.php';
$id_pool = $_GET["id_pool"];
$id_saison = $_GET["id_saison"];
$poolName = $_GET["poolName"];
$pool = new interPool();
$pool->dbConnect(strtolower($poolName));
// on va chercher les infos du dernier joueur repêchéי:
// - info du joueur: prיnom, nom, pos, salaire, photo et logo de l'יquipe
// - info du gיrant
$query = "select a.draft_overall,a.round,b.id,b.first_name,b.last_name,b.pos,b.id_forecaster,b.pays,b.birthday,c.logo\n               ,d.real_name_abrege,b.salary_frozen,b.url_photo\n          from draft a\n               , nhl_players b\n               , teams c\n               , accounts d\n          where a.id_player = b.id\n               and b.team = c.id\n               and a.gerant = d.id\n               and a.id_pool = d.id_pool\n               and a.saison_id = d.saison_id\n               and a.id_pool = {$id_pool}\n               and a.saison_id = {$id_saison}\n               and a.round > 0\n               and b.date_expiration = '2099-12-31'\n          order by a.draft_overall desc\n          limit 1";
$resultID = mysql_query($query, $pool->handle);
$data = mysql_fetch_array($resultID, MYSQL_ASSOC);
mysql_free_result($resultID);
$id_player = $data['id'];
$draft_overall = $data['draft_overall'];
$this_round = $data['round'];
$first_name = $data['first_name'];
$last_name = $data['last_name'];
$pos = $data['pos'];
$logo = $data['logo'];
$this_real_name_abrege = $data['real_name_abrege'];
$id_forecaster = $data['id_forecaster'];
$pays = $data['pays'];
$birthday = $data['birthday'];
$photo = $data['url_photo'];
$salaire = number_format($data['salary_frozen'], 0, ".", ",");
if ($pos != "TM") {
    if ($id_forecaster < 10) {
        $id_forecaster_photo = "000{$id_forecaster}";
Beispiel #29
0
// session_start() done.
// Retrieve $_SESSION['authenticated'] value if set, otherwise return FALSE.
// For security, don't use the same variable name as the session name
// (especially if you have register_globals turned on).
$logged_in = $sess->getSessVar('authenticated', FALSE);
if (!$logged_in) {
    // Not yet authenticated?
    session_destroy();
    // Delete session created (new DB_eSession)
    exit;
}
// browser detection
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
// rיcupיrer certaines informations de la session
$id_pool = $sess->getSessVar('id_pool', 0);
$pool = new interPool();
// rיcupיrer certaines informations de la session
$userName = $sess->getSessVar('user', '');
$periode = $sess->getSessVar('periode', '1');
$periode_sel = $sess->getSessVar('periode_sel', '1');
$gerant = $sess->getSessVar('gerant', '1');
$gerant_sel = $sess->getSessVar('gerant_sel', '1');
$id_saison = $sess->getSessVar('id_saison', '0');
$tab = $sess->getSessVar('tab_journal', 'saison');
$id_saison_journal = $sess->getSessVar('id_saison_journal', '0');
$poolName = strtolower($sess->getSessVar('poolName', ''));
// Connexion a la bd
if (!$pool->dbConnect(strtolower($poolName))) {
    session_destroy();
    // Delete session created (new DB_eSession)
    echo "<SCRIPT language=\"javascript\">";
<?php

//echo "Coming Soon...";
//return;
require_once '../class.interpool.php';
$id_pool = $_GET["id_pool"];
$id_saison = $_GET["id_saison"];
$poolName = $_GET["poolName"];
$pool = new interPool();
$pool->dbConnect(strtolower($poolName));
// pour les accents français
header("Content-Type:application/xhtml+xml; charset=ISO-8859-1");
$query = "select id,image,name from nhl_conference order by id";
$resultID = mysql_query($query, $pool->handle);
while ($data = mysql_fetch_array($resultID, MYSQL_ASSOC)) {
    $id_conf[] = $data['id'];
    $conf_logo[] = $data['image'];
    $conf_name[] = $data['name'];
}
mysql_free_result($resultID);
// je vais afficher le magic number seulement après le 1er mars de la saison en cours...
$query = "select annees from saison\n          where id_pool = {$id_pool}\n               and id = {$id_saison}";
$resultID = mysql_query($query, $pool->handle);
$data = mysql_fetch_array($resultID, MYSQL_ASSOC);
mysql_free_result($resultID);
$annees = $data['annees'];
$anneesA = split("-", $annees);
$annee = $anneesA[1];
if (time() > mktime(00, 00, 00, 03, 01, $annee)) {
    $affiche_magic_number = TRUE;
} else {