throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } if (!($w = $pdo_st->fetch())) { throw new Exception(mysql_errno($conn_id) . ":" . mysql_error($conn_id) . $strQuery); } //var_dump($work); foreach ($w as $column => $val) { ${$column} = $val; } break; case "D": //削除作業 $msg = urlencode(削除完了しました。); funcPdoClear($arrNm, $arrVal, $arrType); $strQuery = "update t_pdf set del_dt=now() where pdf_id=:pdf_id"; funcPdoParaSet(":pdf_id", $pdf_id, PDO::PARAM_INT, $arrNm, $arrVal, $arrType); if (!($pdo_st = funcPdoExecute($pdo, $strQuery, $arrNm, $arrVal, $arrType))) { throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } header("Location: ./index.php?msg={$msg}"); exit; break; } if ($flg == "U") { $botannm = "変更"; } else { $botannm = "登録"; } } catch (Exception $e) { $msg = "エラー発生:" . $e->getMessage(); if ($comDEBUG) {
$tbl_spchar = array("member_nm", "member_mail", "member_pass"); $tbl_numini = array("member_id"); try { $data = rhePDO($_REQUEST); foreach ($data as $column => $val) { ${$column} = $val; } if (!funcPdoConnect($pdo)) { throw new Exception("PDO::error1:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } //ラウンド情報 $_SESSION["round_index"] = array(); funcPdoClear($arrNm, $arrVal, $arrType); $strQuery = "select * from t_round " . "where member_id=:member_id and del_dt is NULL "; funcPDOSetLikeS($strQuery, $url, "round_dt", "round_dt", $round_yy, $_SESSION["round_index"], $arrNm, $arrVal, $arrType); funcPdoParaSet(":member_id", $sess_uid, PDO::PARAM_INT, $arrNm, $arrVal, $arrType); $strQuery .= " order by round_dt desc"; //echo $strQuery; if (!($pdo_st = funcPdoExecute($pdo, $strQuery, $arrNm, $arrVal, $arrType))) { throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } while ($w = $pdo_st->fetch()) { $round[] = $w; } } catch (Exception $e) { $msg = "エラー発生:" . $e->getMessage(); if ($comDEBUG) { echo $msg; } } ?>
//送信してきたメールアドレスの取得 $stdin = fopen("php://stdin", "r"); $email = ""; while ($line = fgets($stdin)) { $line = trim($line); if (!$line || $email) { break; } // 送信元メールアドレスの取得 if (eregi("^from:", $line) || eregi("^Return-Path:", $line)) { $email = getmail($line); } } funcPdoClear($arrNm, $arrVal, $arrType); $strQuery = "select * from m_member where member_mail=:member_mail"; funcPdoParaSet(":member_mail", $email, PDO::PARAM_STR, $arrNm, $arrVal, $arrType); if (!($pdo_st = funcPdoExecute($pdo, $strQuery, $arrNm, $arrVal, $arrType))) { throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } $sw_ari = 0; if ($pdo_st->rowCount() > 0) { $sw_ari = 1; } $enc_email = funcEncrypt($email, ENCRYPTION_KEY); //メール送信処理 //送られてきたメールに、メール本文に送られてきたメールアドレスを記載して返す $to = $email; if ($sw_ari == 0) { $subject = "相模カンツリー倶楽部会員登録URLのご案内"; $det = <<<EOL ==================================================================
exit; } if ($_SESSION['token'] != $token) { header("location: ./index.php"); exit; } unset($_SESSION['token']); //使用済みチケット削除 //仮会員登録 if (!funcPdoConnect($pdo)) { throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } funcPdoClear($arrNm, $arrVal, $arrType); foreach ($tbl_spchar as $column) { ${$column} = htmlspecialchars(${$column}, ENT_QUOTES); funcPdoParaSet(":{$column}", ${$column}, PDO::PARAM_STR, $arrNm, $arrVal, $arrType); } require_once "./sql/m_member_ins.sql"; if (!($pdo_st = funcPdoExecute($pdo, $strQuery, $arrNm, $arrVal, $arrType))) { throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } $member_id = $pdo->lastInsertId(); //ログイン状態にする為、セッション変数にセット session_start(); $_SESSION['uid'] = $member_id; $_SESSION['pwd'] = $member_pass; $_SESSION['unm'] = $member_nm; session_write_close(); //メール送信 $to = $member_mail; $subject = "相模カンツリー倶楽部会員登録完了のご案内";
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; } } }
require_once "../common/common.php"; try { $data = rhePDO($_REQUEST); foreach ($data as $column => $val) { ${$column} = $val; } if (!funcPdoConnect($pdo)) { throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } funcPdoClear($arrNm, $arrVal, $arrType); $strQuery = "select * from m_original " . "where del_dt is NULL and replace(replace(org_nm,' ',''),' ','')=:org_nm and org_birthday=:org_birthday "; $member_nm = my_str_replace(" ", "", $member_nm, "UTF-8"); $member_nm = my_str_replace(" ", "", $member_nm, "UTF-8"); funcPdoParaSet(":org_nm", $member_nm, PDO::PARAM_STR, $arrNm, $arrVal, $arrType); $member_birthday = my_str_replace("/", "-", $member_birthday, "UTF-8"); funcPdoParaSet(":org_birthday", $member_birthday, 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) { echo "NG"; } else { echo "OK"; } exit; } catch (Exception $e) { $msg = "エラー発生:" . $e->getMessage(); if ($comDEBUG) { echo $msg; } }
} if (!($w = $pdo_st->fetch())) { throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } //var_dump($work); foreach ($w as $column => $val) { ${$column} = $val; } list($round_hh, $round_mm) = explode(":", $round_stime); break; case "D": //削除作業 $msg = urlencode(削除完了しました。); funcPdoClear($arrNm, $arrVal, $arrType); $strQuery = "update t_round set del_dt=now() where round_id=:round_id"; funcPdoParaSet(":round_id", $round_id, PDO::PARAM_INT, $arrNm, $arrVal, $arrType); if (!($pdo_st = funcPdoExecute($pdo, $strQuery, $arrNm, $arrVal, $arrType))) { throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo()); } header("Location: ./index.php?msg={$msg}"); exit; break; } if ($flg == "U") { $botannm = "変更"; } else { $botannm = "登録"; } } catch (Exception $e) { $msg = "エラー発生:" . $e->getMessage(); if ($comDEBUG) {