本文整理汇总了PHP中interPool::dbConnect方法的典型用法代码示例。如果您正苦于以下问题:PHP interPool::dbConnect方法的具体用法?PHP interPool::dbConnect怎么用?PHP interPool::dbConnect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类interPool
的用法示例。
在下文中一共展示了interPool::dbConnect方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: interPool
$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\">";
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($_REQUEST["tab"])) {
$tab = $_REQUEST["tab"];
$sess->setSessVar('tab_journal', $tab);
}
if ($tab == "saison") {
$id_saison_journal = $id_saison;
}
示例2: interPool
<?php
// pour la dev...
//$dev = "-dev";
require_once '../class.interpool.php';
$pool = new interPool();
$pool->dbConnect();
$id_pool = $_GET["id_pool"];
$id_saison = $_GET["id_saison"];
$str = $_GET["str"];
// pour les accents français
//header("Content-Type:application/xhtml+xml; charset=ISO-8859-1");
if (strlen($str) < 3) {
echo "";
return;
}
$query = "select a.id,a.last_name,a.first_name,b.abbr\n from nhl_players a, teams b\n where a.team = b.id\n and a.date_expiration = '2099-12-31'\n and concat(a.first_name,' ',a.last_name) like \"%{$str}%\"\n order by a.last_name,a.first_name";
$resultID = mysql_query($query, $pool->handle);
$compteur = 0;
while ($data = mysql_fetch_array($resultID, MYSQL_ASSOC)) {
$compteur++;
if ($compteur == 10) {
break;
}
$id_player = $data['id'];
$first_name = $data['first_name'];
$last_name = $data['last_name'];
$abbr = $data['abbr'];
if ($hint == "") {
$hint = "<a class=\"right_corner_menu\" " . "href=\"/src/ajax/menu_contextuel.php?id_pool={$id_pool}&saison_id={$id_saison}&id_player={$id_player}&aff=full\" " . "target='_blank'>{$last_name}, {$first_name} - {$abbr}</a>";
} else {
示例3: interPool
// 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":
header("Location:/interPool/src/series/face2face.php");
break;
示例4: header
$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("lge")) {
$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>LGE</TITLE>
<link rel="shortcut icon" type="image/x-icon" href="http://www.lge.lamoria.ca/images/LGE.ico" />
<link rel="shortcut" type="image/x-icon" href="http://www.lge.lamoria.ca/images/LGE.ico" />
<?php
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
echo "<LINK REL=stylesheet TYPE=\"text/css\" HREF=\"/css/interpool-" . $browser . ".css\">";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/popup.css\" />\n";
示例5: header
$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\">";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/popup.css\" />\n";
示例6: interPool
require_once 'config.DB_eSession.php';
require_once 'class.DB_eSession.php';
require_once '../class.interpool.php';
require_once '../browser_detection.php';
$sess_param['name'] = "DRAFT_SERIES_INTERPOOL";
$sess = new DB_eSession($sess_param);
// session_start() done.
// 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);
$pool = new interPool();
// Connexion a la bd
$pool->dbConnect(strtolower($poolName)) or die("Erreur de connexion × la bd '{$poolName}'");
//print_r($_POST);
// r×cup×rer le nouveau message
isset($_POST['message']) ? $message = $_POST['message'] : ($message = "");
$message = str_replace("\"", "'", $message);
// S'il y a un nouveau message, on l'ins×re dans la bd
if ($message != "") {
//$temps = date("Y-m-d H:i:s",time());
$today = new Datetime(null, new DateTimeZone('America/Montreal'));
$temps = $today->format("Y-m-d H:i:s");
$query = "insert into chat_draft_series (id_pool,saison_id,message,id_gerant,temps)\r\n values ({$id_pool},{$id_saison},\"{$message}\",{$gerant},\"{$temps}\")";
mysql_query($query, $pool->handle);
}
// On va chercher TOUS les messages du chat
$query = "select a.message,a.id_gerant,a.temps,b.real_name_abrege\r\n from chat_draft_series a, accounts b\r\n where\r\n a.id_gerant = b.id\r\n and a.id_pool = b.id_pool\r\n and a.saison_id = b.saison_id\r\n and a.id_pool = {$id_pool}\r\n and a.saison_id = {$id_saison}\r\n order by a.id desc";
$resultID = mysql_query($query, $pool->handle);
示例7: header
$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("pgc")) {
$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>PGC</TITLE>
<link rel="shortcut icon" type="image/x-icon" href="http://www.pgc.lamoria.ca/images/PGC.ico" />
<link rel="shortcut" type="image/x-icon" href="http://www.pgc.lamoria.ca/images/PGC.ico" />
<?php
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
echo "<LINK REL=stylesheet TYPE=\"text/css\" HREF=\"/css/interpool-" . $browser . ".css\">";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/popup.css\" />\n";
示例8: header
$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("st-nic")) {
$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>ST-NIC</TITLE>
<link rel="shortcut icon" type="image/x-icon" href="http://www.st-nic.lamoria.ca/images/st-nic.ico" />
<link rel="shortcut" type="image/x-icon" href="http://www.st-nic.lamoria.ca/images/st-nic.ico" />
<?php
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
echo "<LINK REL=stylesheet TYPE=\"text/css\" HREF=\"/css/interpool-" . $browser . ".css\">";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/popup.css\" />\n";
示例9: interPool
## ------------------------------------------------------------------------------- ##
## Date: 2010-10-06 ##
## Version: 1.0.0 ##
## Auteur: Jean-Francois Anctil ##
## Contact: anctil.jeff@gmail.com ##
## ------------------------------------------------------------------------------- ##
## Description: Script qui met le champ 'injured' à 'Y' des joueurs qui sont ##
## blessés. ##
## ------------------------------------------------------------------------------- ##
## Modification: ##
## ##
## ------------------------------------------------------------------------------- ##
#####################################################################################
require_once '../src/class.interpool.php';
$pool = new interPool();
$pool->dbConnect();
$query = "select id,name,saison\n from pools\n where toUpdate = 'Y'";
$resultID = mysql_query($query, $pool->handle);
while ($data = mysql_fetch_array($resultID, MYSQL_ASSOC)) {
$id_pool = $data['id'];
$poolNamesA[$id_pool] = $data['name'];
$id_saisonA[$id_pool] = $data['saison'];
}
mysql_free_result($resultID);
$pool->dbClose();
foreach ($poolNamesA as $id_pool => $poolName) {
echo "Update du pool {$poolName}\n";
$pool->dbConnect(strtolower($poolName));
$periode = $pool->getPeriode($id_pool, $id_saisonA[$id_pool]);
$query = "select a.id_player\n from injuries a\n where date_insert = '{$pool->today}'\n and exists (select distinct b.id_player from joueurs_nhl b where id_pool = {$id_pool} and saison_id = {$id_saisonA[$id_pool]}\n and a.id_player = b.id_player)";
$resultID = mysql_query($query, $pool->handle);
示例10: header
$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("poolvpti")) {
$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>K&G</TITLE>
<link rel="shortcut icon" type="image/x-icon" href="http://www.poolvpti.lamoria.ca/images/poolvpti.ico" />
<link rel="shortcut" type="image/x-icon" href="http://www.poolvpti.lamoria.ca/images/poolvpti.ico" />
<?php
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
echo "<LINK REL=stylesheet TYPE=\"text/css\" HREF=\"/css/interpool-" . $browser . ".css\">";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/popup.css\" />\n";
示例11: header
$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("bliz")) {
$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>BLIZ</TITLE>
<link rel="shortcut icon" type="image/x-icon" href="http://www.bliz.lamoria.ca/images/bliz.ico" />
<link rel="shortcut" type="image/x-icon" href="http://www.bliz.lamoria.ca/images/bliz.ico" />
<?php
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
echo "<LINK REL=stylesheet TYPE=\"text/css\" HREF=\"/css/interpool-" . $browser . ".css\">";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/popup.css\" />\n";
示例12: header
$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("bchtl")) {
$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>BCHTL</TITLE>
<link rel="shortcut icon" type="image/x-icon" href="http://www.bchtl.lamoria.ca/images/BCHTL.ico" />
<link rel="shortcut" type="image/x-icon" href="http://www.bchtl.lamoria.ca/images/BCHTL.ico" />
<?php
$browser = Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
echo "<LINK REL=stylesheet TYPE=\"text/css\" HREF=\"/css/interpool-" . $browser . ".css\">";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/popup.css\" />\n";
示例13: header
$sess->setSessVar('id_saison', $id_saison);
$sess->setSessVar('poolName', $rtnL[3]);
$sess->setSessVar('pool_type', $pool_type);
header("Location: /poolailler{$dev}/src/main2.php");
$pool->dbClose();
exit;
}
}
}
} else {
$message = "";
}
}
}
$pool = new interPool();
if (!$pool->dbConnect("poolailler")) {
$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>Pool Intéractif (powered by lamoria.ca)</TITLE>
<link rel="shortcut icon" type="image/x-icon" href="http://www.lamoria.ca/interPool<?php
echo $dev;
?>
/images/POOLAILLER.ico" />
<link rel="shortcut" type="image/x-icon" href="http://www.lamoria.ca/interPool<?php
echo $dev;