Ignore:
Timestamp:
2007/08/29 20:38:38 (17 years ago)
Author:
naka
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/beta/data/include/mobile.inc

    r13355 r15439  
    1515 */ 
    1616function lfMobileCheckCompatibility() { 
     17     
     18 
     19     
    1720    if (!GC_MobileUserAgent::isSupported()) { 
    1821        header('Location: ' . URL_DIR . 'unsupported/index.php'); 
    1922        exit; 
    2023    } 
     24     
     25 
    2126} 
    2227 
     
    8994        $sessionId = lfMobileGetExtSessionId(); 
    9095    } 
     96     
    9197    if (!isset($sessionId)) { 
    9298        return false; 
     
    116122    // ÇÛÎó mobile ¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£ 
    117123    if (!is_array(@$_SESSION['mobile'])) { 
     124        gfprintlog("ÇÛÎómobile¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤Ê¤¤¡£"); 
    118125        return false; 
    119126    } 
     
    124131                   date('Y/m/d H:i:s', @$_SESSION['mobile']['expires']) . 
    125132                   ' : sid=' . session_id()); 
    126  
     133        gfprintlog("SESSIONÍ­¸ú´ü¸Â¤ò²á¤®¤Æ¤¤¤ë");                  
    127134        return false; 
    128135    } 
     
    134141                   "\"$model\" != \"" . @$_SESSION['mobile']['model'] . 
    135142                   '" (expected), sid=' . session_id()); 
    136         return false; 
    137     } 
    138  
     143        gfprintlog("·ÈÂÓüËö¤Îµ¡¼ï¤¬°ìÃפ·¤Ê¤¤");    
     144        return false; 
     145    } 
    139146    return true; 
    140147} 
     
    146153 */ 
    147154function lfMobileInitSession() { 
     155    $session_ok = true; 
     156     
    148157    // ¥»¥Ã¥·¥ç¥óID¤Î¼õ¤±ÅϤ·¤Ë¥¯¥Ã¥­¡¼¤ò»ÈÍѤ·¤Ê¤¤¡£ 
    149158    ini_set('session.use_cookies', '0'); 
     
    153162 
    154163    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     
    156183    // ¥»¥Ã¥·¥ç¥óID¤Þ¤¿¤Ï¥»¥Ã¥·¥ç¥ó¥Ç¡¼¥¿¤¬Ìµ¸ú¤Ê¾ì¹ç¤Ï¡¢¥»¥Ã¥·¥ç¥óID¤òºÆÀ¸À® 
    157184    // ¤·¡¢¥»¥Ã¥·¥ç¥ó¥Ç¡¼¥¿¤ò½é´ü²½¤¹¤ë¡£ 
    158     if ($sessionId === false || !lfMobileValidateSession()) { 
     185    if (!$session_ok) { 
    159186        session_regenerate_id(); 
    160187        $_SESSION = array('mobile' => array('model'    => GC_MobileUserAgent::getModel(), 
     
    164191        // ¿·¤·¤¤¥»¥Ã¥·¥ç¥óID¤òÉղ䷤ƥê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£ 
    165192        if ($_SERVER['REQUEST_METHOD'] == 'GET') { 
     193            gfprintlog("GETÍ×µá¤Î¼èÆÀ:".$_GET['PHPSESSID']); 
     194            gfprintlog("¥ê¥À¥¤¥ì¥¯¥È:".gfAddSessionId()); 
    166195            // GET ¤Î¾ì¹ç¤ÏƱ¤¸¥Ú¡¼¥¸¤Ë¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£ 
    167196            header('Location: ' . gfAddSessionId()); 
    168197        } else { 
     198            gfprintlog("GETÍ׵᤬¤Ê¤·"); 
    169199            // GET °Ê³°¤Î¾ì¹ç¤Ï¥È¥Ã¥×¥Ú¡¼¥¸¤Ø¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£ 
    170200            header('Location: ' . URL_SITE_TOP . '?' . SID); 
     
    223253function sfMobileInit() { 
    224254    lfMobileInitInput(); 
    225  
    226255    if (basename(dirname($_SERVER['SCRIPT_NAME'])) != 'unsupported') { 
    227256        lfMobileCheckCompatibility(); 
     
    397426 */ 
    398427function 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'); 
    401429 
    402430    if (defined('MOBILE_ADDITIONAL_MAIL_DOMAINS')) { 
Note: See TracChangeset for help on using the changeset viewer.