} if (!isset($_SESSION['uid'])) { header("Location: {$comMemberLoginURL}?msg={$msgstr}"); exit; } if (!isset($_SESSION['pwd'])) { header("Location: {$comMemberLoginURL}?msg={$msgstr}"); exit; } $sess_uid = $_SESSION['uid']; $sess_pwd = $_SESSION['pwd']; $sess_unm = $_SESSION['unm']; funcPdoClear($arrNm, $arrVal, $arrType); $strQuery = "select * from m_member where member_id=:member_id"; funcPdoParaSet(":member_id", $sess_uid, PDO::PARAM_STR, $arrNm, $arrVal, $arrType); if (!($pdo_st = funcPdoSelect($pdo, $strQuery, $arrNm, $arrVal, $arrType))) { throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } if ($pdo_st->rowCount() == 0) { header("Location: {$comMemberLoginURL}?msg={$msgstr}"); exit; } if (!($w = $pdo_st->fetch())) { throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } if ($sess_pwd != $w["member_pass"]) { header("Location: {$comMemberLoginURL}?msg={$msgstr}"); exit; } $pdo = null; } catch (Exception $e) {
function funcGetCookNm($cook_id) { global $conn_id_com; global $comDEBUG; try { funcPdoClear($arrNm, $arrVal, $arrType); $strQuery = "select * from m_cook " . "where cook_id={$cook_id}"; funcPdoParaSet(":cook_id", $cook_id, PDO::PARAM_INT, $arrNm, $arrVal, $arrType); if (!($st = funcPdoSelect($conn_id_com, $strQuery, $arrNm, $arrVal, $arrType))) { throw new Exception("PDO::error:" . $conn_id_com->errorCode() . ":" . $conn_id_com->errorInfo()); } if (!($w = $st->fetch())) { throw new Exception("PDO::error:" . $conn_id_com->errorCode() . ":" . $conn_id_com->errorInfo()); } return $w; } catch (Exception $e) { $msg = "エラー発生:" . $e->getMessage(); if ($comDEBUG) { echo $msg; } } }