Changeset 13360 for branches/beta/html


Ignore:
Timestamp:
2007/05/24 14:21:17 (17 years ago)
Author:
kakinaka
Message:
 
Location:
branches/beta/html/mobile/entry
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/beta/html/mobile/entry/complete.php

    r11842 r13360  
    1010    function LC_Page() { 
    1111        $this->tpl_css = '/css/layout/entry/complete.css';  // ¥á¥¤¥óCSS¥Ñ¥¹ 
    12         $this->tpl_mainpage = 'entry/complete.tpl';         // ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È 
     12         
     13        if(CUSTOMER_CONFIRM_MAIL == true) { 
     14            // ²¾²ñ°÷ÅÐÏ¿´°Î» 
     15            $this->tpl_mainpage = 'entry/complete.tpl';         // ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È 
     16        } else { 
     17            // Ëܲñ°÷ÅÐÏ¿´°Î» 
     18            $this->tpl_mainpage = 'regist/complete.tpl';        // ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È            
     19        } 
     20         
    1321        $this->tpl_title .= '²ñ°÷ÅÐÏ¿(´°Î»¥Ú¡¼¥¸)';         //¡¡¥Ú¡¼¥¸¥¿¥¤¥È¥ë 
    1422    } 
  • branches/beta/html/mobile/entry/index.php

    r11902 r13360  
    2020$objPage = new LC_Page(); 
    2121$objView = new SC_MobileView(); 
     22$objCustomer = new SC_Customer(); 
    2223$objDate = new SC_Date(START_BIRTH_YEAR, date("Y",strtotime("now"))); 
    2324$objPage->arrPref = $arrPref; 
     
    203204        //--¡¡²¾ÅÐÏ¿¤È´°Î»²èÌÌ 
    204205        if ($_POST["mode"] == "complete") { 
    205             $objPage->uniqid = lfRegistData ($objPage->arrForm, $arrRegistColumn, $arrRejectRegistColumn); 
     206             
     207            // ³Îǧ²èÌ̤ǺÆÅÙ¥¨¥é¡¼¥Á¥§¥Ã¥¯¤ò¹Ô¤¦¡£¡Ê²èÌÌ1¡Ë 
     208            $arrErr = lfErrorCheck1($objPage->arrForm); 
     209            if(count($arrErr) > 0){ 
     210                $objPage->tpl_mainpage = 'entry/index.tpl'; 
     211                $objPage->tpl_title = '²ñ°÷ÅÐÏ¿(1/3)'; 
     212                $objPage->arrErr = $arrErr; 
     213                //----¡¡¥Ú¡¼¥¸É½¼¨ 
     214                $objView->assignobj($objPage); 
     215                $objView->display(SITE_FRAME); 
     216                exit(); 
     217            } 
     218             
     219            // ³Îǧ²èÌ̤ǺÆÅÙ¥¨¥é¡¼¥Á¥§¥Ã¥¯¤ò¹Ô¤¦¡£¡Ê²èÌÌ2¡Ë 
     220            $arrErr = lfErrorCheck2($objPage->arrForm); 
     221            if(count($arrErr) > 0){ 
     222                $objPage->tpl_mainpage = 'entry/set1.tpl'; 
     223                $objPage->tpl_title = '²ñ°÷ÅÐÏ¿(2/3)'; 
     224                $objPage->arrErr = $arrErr; 
     225                //----¡¡¥Ú¡¼¥¸É½¼¨ 
     226                $objView->assignobj($objPage); 
     227                $objView->display(SITE_FRAME); 
     228                exit(); 
     229            } 
     230 
     231            // ³Îǧ²èÌ̤ǺÆÅÙ¥¨¥é¡¼¥Á¥§¥Ã¥¯¤ò¹Ô¤¦¡£¡Ê²èÌÌ3¡Ë 
     232            $arrErr = lfErrorCheck3($objPage->arrForm); 
     233            if(count($arrErr) > 0){ 
     234                $objPage->tpl_mainpage = 'entry/set2.tpl'; 
     235                $objPage->tpl_title = '²ñ°÷ÅÐÏ¿(3/3)'; 
     236                $objPage->arrErr = $arrErr; 
     237                //----¡¡¥Ú¡¼¥¸É½¼¨ 
     238                $objView->assignobj($objPage); 
     239                $objView->display(SITE_FRAME); 
     240                exit(); 
     241            } 
     242             
     243            $objPage->uniqid = lfRegistData ($objPage->arrForm, $arrRegistColumn, $arrRejectRegistColumn, CUSTOMER_CONFIRM_MAIL); 
    206244 
    207245            // ¶õ¥á¡¼¥ë¤ò¼õ¿®ºÑ¤ß¤Î¾ì¹ç¤Ï¤¹¤°¤ËËÜÅÐÏ¿´°Î»¤Ë¤¹¤ë¡£ 
     
    222260            $objMailText = new SC_MobileView(); 
    223261            $objMailText->assignobj($objPage); 
    224             $subject = sfMakesubject('²ñ°÷ÅÐÏ¿¤Î¤´³Îǧ'); 
    225             $toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl"); 
     262             
     263            // ²¾²ñ°÷¤¬Í­¸ú¤Î¾ì¹ç 
     264            if(CUSTOMER_CONFIRM_MAIL == true) { 
     265                $subject = sfMakesubject('²ñ°÷ÅÐÏ¿¤Î¤´³Îǧ'); 
     266                $toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl"); 
     267            } else { 
     268                $subject = sfMakesubject('²ñ°÷ÅÐÏ¿¤Î¤´´°Î»'); 
     269                $toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl"); 
     270                // ¥í¥°¥¤¥ó¾õÂ֤ˤ¹¤ë 
     271                $objCustomer->setLogin($_POST["email"]); 
     272            } 
     273             
    226274            $objMail = new GC_SendMail(); 
    227275            $objMail->setItem( 
     
    255303 
    256304//---- function·² 
    257 function lfRegistData ($array, $arrRegistColumn, $arrRejectRegistColumn) { 
     305function lfRegistData ($array, $arrRegistColumn, $arrRejectRegistColumn, $confirm_flg) { 
    258306    global $objConn; 
    259307 
     
    272320    // ¥Ñ¥¹¥ï¡¼¥É¤Î°Å¹æ²½ 
    273321    $arrRegist["password"] = sha1($arrRegist["password"] . ":" . AUTH_MAGIC); 
    274      
    275     $count = 1; 
    276     while ($count != 0) { 
    277         $uniqid = sfGetUniqRandomId("t"); 
    278         $count = $objConn->getOne("SELECT COUNT(*) FROM dtb_customer WHERE secret_key = ?", array($uniqid)); 
    279     } 
    280  
    281     switch($array["mailmaga_flg"]) { 
    282         case 1: 
    283             $arrRegist["mailmaga_flg"] = 4;  
    284             break; 
    285         case 2: 
    286             $arrRegist["mailmaga_flg"] = 5;  
    287             break; 
    288         default: 
    289             $arrRegist["mailmaga_flg"] = 6; 
    290             break; 
    291     } 
    292          
     322 
     323    // ²¾²ñ°÷ÅÐÏ¿¤Î¾ì¹ç 
     324    if($confirm_flg == true) { 
     325        // ½ÅÊ£¤·¤Ê¤¤²ñ°÷ÅÐÏ¿¥­¡¼¤òȯ¹Ô¤¹¤ë¡£ 
     326        $count = 1; 
     327        while ($count != 0) { 
     328            $uniqid = sfGetUniqRandomId("t"); 
     329            $count = $objConn->getOne("SELECT COUNT(*) FROM dtb_customer WHERE secret_key = ?", array($uniqid)); 
     330        } 
     331     
     332        switch($array["mailmaga_flg"]) { 
     333            case 1: 
     334                $arrRegist["mailmaga_flg"] = 4;  
     335                break; 
     336            case 2: 
     337                $arrRegist["mailmaga_flg"] = 5;  
     338                break; 
     339            default: 
     340                $arrRegist["mailmaga_flg"] = 6; 
     341                break; 
     342        } 
     343        $arrRegist["status"] = "1";             // ²¾²ñ°÷ 
     344    } else { 
     345        // ½ÅÊ£¤·¤Ê¤¤²ñ°÷ÅÐÏ¿¥­¡¼¤òȯ¹Ô¤¹¤ë¡£ 
     346        $count = 1; 
     347        while ($count != 0) { 
     348            $uniqid = sfGetUniqRandomId("r"); 
     349            $count = $objConn->getOne("SELECT COUNT(*) FROM dtb_customer WHERE secret_key = ?", array($uniqid)); 
     350        } 
     351        $arrRegist["status"] = "2";             // Ëܲñ°÷ 
     352    } 
     353     
    293354    $arrRegist["secret_key"] = $uniqid;     // ²¾ÅÐÏ¿IDȯ¹Ô 
    294355    $arrRegist["create_date"] = "now()";    // ºîÀ®Æü 
Note: See TracChangeset for help on using the changeset viewer.