Changeset 15439 for branches/beta
- Timestamp:
- 2007/08/29 20:38:38 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/beta/data/include/mobile.inc
r13355 r15439 15 15 */ 16 16 function lfMobileCheckCompatibility() { 17 18 19 17 20 if (!GC_MobileUserAgent::isSupported()) { 18 21 header('Location: ' . URL_DIR . 'unsupported/index.php'); 19 22 exit; 20 23 } 24 25 21 26 } 22 27 … … 89 94 $sessionId = lfMobileGetExtSessionId(); 90 95 } 96 91 97 if (!isset($sessionId)) { 92 98 return false; … … 116 122 // ÇÛÎó mobile ¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£ 117 123 if (!is_array(@$_SESSION['mobile'])) { 124 gfprintlog("ÇÛÎómobile¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤Ê¤¤¡£"); 118 125 return false; 119 126 } … … 124 131 date('Y/m/d H:i:s', @$_SESSION['mobile']['expires']) . 125 132 ' : sid=' . session_id()); 126 133 gfprintlog("SESSION͸ú´ü¸Â¤ò²á¤®¤Æ¤¤¤ë"); 127 134 return false; 128 135 } … … 134 141 "\"$model\" != \"" . @$_SESSION['mobile']['model'] . 135 142 '" (expected), sid=' . session_id()); 136 return false;137 }138 143 gfprintlog("·ÈÂÓüËö¤Îµ¡¼ï¤¬°ìÃפ·¤Ê¤¤"); 144 return false; 145 } 139 146 return true; 140 147 } … … 146 153 */ 147 154 function lfMobileInitSession() { 155 $session_ok = true; 156 148 157 // ¥»¥Ã¥·¥ç¥óID¤Î¼õ¤±ÅϤ·¤Ë¥¯¥Ã¥¡¼¤ò»ÈÍѤ·¤Ê¤¤¡£ 149 158 ini_set('session.use_cookies', '0'); … … 153 162 154 163 session_start(); 155 164 165 // ¿·µ¬¤Ë¥»¥Ã¥È¤µ¤ì¤ë¤¿¤álfMobileGetSessionId()¤«¤é¤ÎÌá¤ê¤Ï""¤È¤Ê¤ë¡£ 166 if($sessionId == "") { 167 gfprintlog("lfMobileInitSession()¡§¥»¥Ã¥·¥ç¥ó¥»¥Ã¥È -> OK"); 168 } else { 169 gfprintlog("lfMobileInitSession()¡§¥»¥Ã¥·¥ç¥ó¥»¥Ã¥È -> NG"); 170 $session_ok = false; 171 } 172 173 if(lfMobileValidateSession()) { 174 gfprintlog("lfMobileInitSession()¡§Í¸úÀ¥Á¥§¥Ã¥¯ -> OK"); 175 } else { 176 gfprintlog("lfMobileInitSession()¡§Í¸úÀ¥Á¥§¥Ã¥¯ -> NG"); 177 $session_ok = false; 178 } 179 gfprintlog("lfMobileInitSession()¡§REQUEST_METHOD -> " . $_SERVER['REQUEST_METHOD']); 180 gfprintlog("lfMobileInitSession()¡§session_id() -> " . session_id()); 181 gfprintlog("lfMobileInitSession()¡§GET PHPSESSID ---> " . $_GET["PHPSESSID"]); 182 156 183 // ¥»¥Ã¥·¥ç¥óID¤Þ¤¿¤Ï¥»¥Ã¥·¥ç¥ó¥Ç¡¼¥¿¤¬Ìµ¸ú¤Ê¾ì¹ç¤Ï¡¢¥»¥Ã¥·¥ç¥óID¤òºÆÀ¸À® 157 184 // ¤·¡¢¥»¥Ã¥·¥ç¥ó¥Ç¡¼¥¿¤ò½é´ü²½¤¹¤ë¡£ 158 if ( $sessionId === false || !lfMobileValidateSession()) {185 if (!$session_ok) { 159 186 session_regenerate_id(); 160 187 $_SESSION = array('mobile' => array('model' => GC_MobileUserAgent::getModel(), … … 164 191 // ¿·¤·¤¤¥»¥Ã¥·¥ç¥óID¤òÉղ䷤ƥê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£ 165 192 if ($_SERVER['REQUEST_METHOD'] == 'GET') { 193 gfprintlog("GETÍ×µá¤Î¼èÆÀ:".$_GET['PHPSESSID']); 194 gfprintlog("¥ê¥À¥¤¥ì¥¯¥È:".gfAddSessionId()); 166 195 // GET ¤Î¾ì¹ç¤ÏƱ¤¸¥Ú¡¼¥¸¤Ë¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£ 167 196 header('Location: ' . gfAddSessionId()); 168 197 } else { 198 gfprintlog("GETÍ׵᤬¤Ê¤·"); 169 199 // GET °Ê³°¤Î¾ì¹ç¤Ï¥È¥Ã¥×¥Ú¡¼¥¸¤Ø¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£ 170 200 header('Location: ' . URL_SITE_TOP . '?' . SID); … … 223 253 function sfMobileInit() { 224 254 lfMobileInitInput(); 225 226 255 if (basename(dirname($_SERVER['SCRIPT_NAME'])) != 'unsupported') { 227 256 lfMobileCheckCompatibility(); … … 397 426 */ 398 427 function gfIsMobileMailAddress($address) { 399 // pdx.ne.jp(¥¦¥£¥ë¥³¥à)Äɲà 400 $arrMobileMailDomains = array('docomo.ne.jp', 'ezweb.ne.jp', 'softbank.ne.jp', 'vodafone.ne.jp', 'pdx.ne.jp'); 428 $arrMobileMailDomains = array('docomo.ne.jp', 'ezweb.ne.jp', 'softbank.ne.jp', 'vodafone.ne.jp'); 401 429 402 430 if (defined('MOBILE_ADDITIONAL_MAIL_DOMAINS')) {
Note: See TracChangeset
for help on using the changeset viewer.