本文整理匯總了PHP中interPool::readCookie方法的典型用法代碼示例。如果您正苦於以下問題:PHP interPool::readCookie方法的具體用法?PHP interPool::readCookie怎麽用?PHP interPool::readCookie使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類interPool
的用法示例。
在下文中一共展示了interPool::readCookie方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
$sess->setSessVar('admin', $rtnL[2]);
$sess->setSessVar('id_saison', $id_saison);
$sess->setSessVar('poolName', $rtnL[3]);
$sess->setSessVar('pool_type', $pool_type);
$pool->writeCookie($user, $pswd, $id_pool, "pmh");
$pool->dbClose();
header("Location: /src/main2.php");
exit;
}
$pool->dbClose();
}
}
} else {
if (!isset($_GET['logout'])) {
$pool = new interPool();
if (!is_null($pool->readCookie("pmh"))) {
$cValue = $pool->readCookie("pmh");
$cValueA = explode(":", $cValue);
$username = $cValueA[0];
$password = $cValueA[1];
$id_pool = $cValueA[2];
if (!$pool->dbConnect("pmh")) {
$message = "Problèmes avec la base de données. Ré-essayez plus tard...";
} else {
$id_pool = $pool->getIdPoolForLogin("PMH");
$rtn = $pool->validate_login($username, $password, $id_pool);
$rtnL = explode(" ", $rtn);
if ($rtnL[0] != "OK") {
$message = $rtn;
} else {
$id_gerant = $rtnL[1];
示例2: header
$sess->setSessVar('admin', $rtnL[2]);
$sess->setSessVar('id_saison', $id_saison);
$sess->setSessVar('poolName', $rtnL[3]);
$sess->setSessVar('pool_type', $pool_type);
$pool->writeCookie($user, $pswd, $id_pool, "bchtl");
$pool->dbClose();
header("Location: /bchtl{$dev}/src/main2.php");
exit;
}
$pool->dbClose();
}
}
} else {
if (!isset($_GET['logout'])) {
$pool = new interPool();
if (!is_null($pool->readCookie("bchtl"))) {
$cValue = $pool->readCookie("bchtl");
$cValueA = explode(":", $cValue);
$username = $cValueA[0];
$password = $cValueA[1];
$id_pool = $cValueA[2];
if (!$pool->dbConnect()) {
$message = "Problèmes avec la base de données. Ré-essayez plus tard...";
} else {
$id_pool = $pool->getIdPoolForLogin("BCHTL");
$rtn = $pool->validate_login($username, $password, $id_pool);
$rtnL = explode(" ", $rtn);
if ($rtnL[0] != "OK") {
$message = $rtn;
} else {
$id_gerant = $rtnL[1];