Changeset 16972 for branches


Ignore:
Timestamp:
2008/01/11 12:54:22 (15 years ago)
Author:
satou
Message:

#160 会員登録時付与ポイントが反映されない不具合を改修

Location:
branches/beta
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/beta/data/lib/slib.php

    r16817 r16972  
    13421342    } 
    13431343    return $ret; 
     1344} 
     1345 
     1346/* ²ñ°÷ÅÐÏ¿¥Ý¥¤¥ó¥ÈÉÕÍ¿ */ 
     1347function sfSetWelcomePoint($secret_key, $CONF) { 
     1348    $objQuery = new SC_Query(); 
     1349     
     1350    // ¥Ý¥¤¥ó¥ÈÉÕÍ¿ 
     1351    $col = "point"; 
     1352    $where = "secret_key = ? AND status = 2"; 
     1353    $arrRet = $objQuery->select($col, "dtb_customer", $where, array($secret_key)); 
     1354    $sqlval['point'] = $arrRet[0]['point'] + $CONF['welcome_point']; 
     1355     
     1356    // ¥Ý¥¤¥ó¥È¤¬ÉÔ­¤·¤Æ¤¤¤ë¾ì¹ç 
     1357    if($sqlval['point'] < 0) { 
     1358        $objQuery->rollback(); 
     1359        sfDispSiteError(LACK_POINT); 
     1360    } 
     1361     
     1362    $objQuery->update("dtb_customer", $sqlval, $where, array($secret_key)); 
    13441363} 
    13451364 
  • branches/beta/html/entry/index.php

    r14676 r16972  
    140140            // ²¾²ñ°÷¤¬Í­¸ú¤Î¾ì¹ç 
    141141            if(CUSTOMER_CONFIRM_MAIL == true) { 
     142                // ¥á¡¼¥ë¥Æ¥ó¥×¥ìÀßÄê 
    142143                $subject = sfMakesubject('²ñ°÷ÅÐÏ¿¤Î¤´³Îǧ'); 
    143144                $toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl"); 
     145            // ²¾²ñ°÷¤¬Ìµ¸ú¤Î¾ì¹ç 
    144146            } else { 
     147                // ¥á¡¼¥ë¥Æ¥ó¥×¥ìÀßÄê 
    145148                $subject = sfMakesubject('²ñ°÷ÅÐÏ¿¤Î¤´´°Î»'); 
    146149                $toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl"); 
     150                // ²ñ°÷ÅÐÏ¿¥Ý¥¤¥ó¥ÈÉÕÍ¿ 
     151                sfSetWelcomePoint($objPage->uniqid, $CONF); 
    147152                // ¥í¥°¥¤¥ó¾õÂ֤ˤ¹¤ë 
    148153                $objCustomer->setLogin($_POST["email"]); 
     
    248253    $objQuery->insert("dtb_customer", $arrRegist); 
    249254 
    250  
    251255/* ¥á¥ë¥Þ¥¬²ñ°÷µ¡Ç½¤Ï¸½ºßÄä»ßÃæ¡¡2007/03/07 
    252  
    253  
    254256    //--¡¡Èó²ñ°÷¤Ç¥á¥ë¥Þ¥¬ÅÐÏ¿¤·¤Æ¤¤¤ë¤«¤ÎȽÄê 
    255257    $sql = "SELECT count(*) FROM dtb_customer_mail WHERE email = ?"; 
  • branches/beta/html/mobile/entry/index.php

    r15093 r16972  
    263263            // ²¾²ñ°÷¤¬Í­¸ú¤Î¾ì¹ç 
    264264            if(CUSTOMER_CONFIRM_MAIL == true) { 
     265                // ¥á¡¼¥ë¥Æ¥ó¥×¥ìÀßÄê 
    265266                $subject = sfMakesubject('²ñ°÷ÅÐÏ¿¤Î¤´³Îǧ'); 
    266267                $toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl"); 
     268            // ²¾²ñ°÷¤¬Ìµ¸ú¤Î¾ì¹ç 
    267269            } else { 
     270                // ¥á¡¼¥ë¥Æ¥ó¥×¥ìÀßÄê 
    268271                $subject = sfMakesubject('²ñ°÷ÅÐÏ¿¤Î¤´´°Î»'); 
    269272                $toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl"); 
     273                // ²ñ°÷ÅÐÏ¿¥Ý¥¤¥ó¥ÈÉÕÍ¿ 
     274                sfSetWelcomePoint($objPage->uniqid, $CONF); 
    270275                // ¥í¥°¥¤¥ó¾õÂ֤ˤ¹¤ë 
    271276                $objCustomer->setLogin($_POST["email"]); 
  • branches/beta/html/mobile/regist/index.php

    r11842 r16972  
    3939 
    4040    } else { 
    41         //$objPage->tpl_mainpage = 'regist/complete.tpl'; 
    42         //$objPage->tpl_title = ' ²ñ°÷ÅÐÏ¿(´°Î»¥Ú¡¼¥¸)'; 
    43         $registSecretKey = lfRegistData($_GET);         //Ëܲñ°÷ÅÐÏ¿¡Ê¥Õ¥é¥°Êѹ¹¡Ë 
    44         lfSendRegistMail($registSecretKey);             //Ëܲñ°÷ÅÐÏ¿´°Î»¥á¡¼¥ëÁ÷¿® 
    45  
     41        //Ëܲñ°÷ÅÐÏ¿¡Ê¥Õ¥é¥°Êѹ¹¡Ë 
     42        $registSecretKey = lfRegistData($_GET); 
     43        //Ëܲñ°÷ÅÐÏ¿´°Î»¥á¡¼¥ëÁ÷¿® 
     44        lfSendRegistMail($registSecretKey); 
     45        // ²ñ°÷ÅÐÏ¿¥Ý¥¤¥ó¥ÈÉÕÍ¿ 
     46        sfSetWelcomePoint($registSecretKey, $CONF); 
    4647        // ¥í¥°¥¤¥óºÑ¤ß¤Î¾õÂ֤ˤ¹¤ë¡£ 
    4748        $objQuery = new SC_Query(); 
     
    8485    $objQuery = new SC_Query(); 
    8586    $where = "secret_key = ? AND status = 1"; 
    86      
    87     $arrRet = $objQuery->select("point", "dtb_customer", $where, array($array["id"])); 
    88     // ²ñ°÷ÅÐÏ¿»þ¤Î²Ã»»¥Ý¥¤¥ó¥È(¹ØÆþ»þ²ñ°÷ÅÐÏ¿¤Î¾ì¹ç¤Ï¡¢¥Ý¥¤¥ó¥È²Ã»»¡Ë 
    89     $arrRegist['point'] = $arrRet[0]['point'] + addslashes($arrInfo['welcome_point']); 
    90      
    9187    $objQuery->update("dtb_customer", $arrRegist, $where, array($array["id"])); 
    92  
    93     /* ¹ØÆþ»þ¤Î¼«Æ°²ñ°÷ÅÐÏ¿¤Ï¹Ô¤ï¤Ê¤¤¤¿¤áDEL 
    94     // ¹ØÆþ»þÅÐÏ¿¤Î¾ì¹ç¡¢¤½¤Î²ó¤Î¹ØÆþ¤ò²ñ°÷¹ØÆþ¤È¤ß¤Ê¤¹¡£ 
    95     // ²ñ°÷¾ðÊó¤ÎÆÉ¤ß¹þ¤ß 
    96     $where1 = "secret_key = ? AND status = 2"; 
    97     $customer = $objQuery->select("*", "dtb_customer", $where1, array($secret)); 
    98     // ½é²ó¹ØÆþ¾ðÊó¤ÎÆÉ¤ß¹þ¤ß 
    99     $order_temp_id = $objQuery->get("dtb_order_temp", "order_temp_id"); 
    100     // ¹ØÆþ¾ðÊó¤Î¹¹¿· 
    101     if ($order_temp_id != null) { 
    102         $arrCustomer['customer_id'] = $customer[0]['customer_id']; 
    103         $where3 = "order_temp_id = ?"; 
    104         $objQuery->update("dtb_order_temp", $arrCustomer, $where3, array($order_temp_id)); 
    105         $objQuery->update("dtb_order", $arrCustomer, $where3, array($order_temp_id)); 
    106     } 
    107     */ 
    10888 
    10989    $sql = "SELECT mailmaga_flg FROM dtb_customer WHERE email = ?"; 
  • branches/beta/html/regist/index.php

    r11588 r16972  
    4545 
    4646    } else { 
    47         //$objPage->tpl_mainpage = 'regist/complete.tpl'; 
    48         //$objPage->tpl_title = ' ²ñ°÷ÅÐÏ¿(´°Î»¥Ú¡¼¥¸)'; 
    49         $registSecretKey = lfRegistData($_GET);         //Ëܲñ°÷ÅÐÏ¿¡Ê¥Õ¥é¥°Êѹ¹¡Ë 
    50         lfSendRegistMail($registSecretKey);             //Ëܲñ°÷ÅÐÏ¿´°Î»¥á¡¼¥ëÁ÷¿® 
    51  
     47        //Ëܲñ°÷ÅÐÏ¿¡Ê¥Õ¥é¥°Êѹ¹¡Ë 
     48        $registSecretKey = lfRegistData($_GET); 
     49        //Ëܲñ°÷ÅÐÏ¿´°Î»¥á¡¼¥ëÁ÷¿® 
     50        lfSendRegistMail($registSecretKey); 
     51        // ²ñ°÷ÅÐÏ¿¥Ý¥¤¥ó¥ÈÉÕÍ¿ 
     52        sfSetWelcomePoint($registSecretKey, $CONF); 
    5253        // ¥í¥°¥¤¥óºÑ¤ß¤Î¾õÂ֤ˤ¹¤ë¡£ 
    5354        $email = $objQuery->get("dtb_customer", "email", "secret_key = ?", array($registSecretKey)); 
    5455        $objCustomer->setLogin($email); 
     56         
    5557        header("Location: ./complete.php$etc_val"); 
    5658        exit; 
     
    9092    $objQuery = new SC_Query(); 
    9193    $where = "secret_key = ? AND status = 1"; 
    92      
    93     $arrRet = $objQuery->select("point", "dtb_customer", $where, array($array["id"])); 
    94     // ²ñ°÷ÅÐÏ¿»þ¤Î²Ã»»¥Ý¥¤¥ó¥È(¹ØÆþ»þ²ñ°÷ÅÐÏ¿¤Î¾ì¹ç¤Ï¡¢¥Ý¥¤¥ó¥È²Ã»»¡Ë 
    95     $arrRegist['point'] = $arrRet[0]['point'] + addslashes($arrInfo['welcome_point']); 
    96      
    9794    $objQuery->update("dtb_customer", $arrRegist, $where, array($array["id"])); 
    98  
    99     /* ¹ØÆþ»þ¤Î¼«Æ°²ñ°÷ÅÐÏ¿¤Ï¹Ô¤ï¤Ê¤¤¤¿¤áDEL 
    100     // ¹ØÆþ»þÅÐÏ¿¤Î¾ì¹ç¡¢¤½¤Î²ó¤Î¹ØÆþ¤ò²ñ°÷¹ØÆþ¤È¤ß¤Ê¤¹¡£ 
    101     // ²ñ°÷¾ðÊó¤ÎÆÉ¤ß¹þ¤ß 
    102     $where1 = "secret_key = ? AND status = 2"; 
    103     $customer = $objQuery->select("*", "dtb_customer", $where1, array($secret)); 
    104     // ½é²ó¹ØÆþ¾ðÊó¤ÎÆÉ¤ß¹þ¤ß 
    105     $order_temp_id = $objQuery->get("dtb_order_temp", "order_temp_id"); 
    106     // ¹ØÆþ¾ðÊó¤Î¹¹¿· 
    107     if ($order_temp_id != null) { 
    108         $arrCustomer['customer_id'] = $customer[0]['customer_id']; 
    109         $where3 = "order_temp_id = ?"; 
    110         $objQuery->update("dtb_order_temp", $arrCustomer, $where3, array($order_temp_id)); 
    111         $objQuery->update("dtb_order", $arrCustomer, $where3, array($order_temp_id)); 
    112     } 
    113     */ 
    11495 
    11596    $sql = "SELECT mailmaga_flg FROM dtb_customer WHERE email = ?"; 
Note: See TracChangeset for help on using the changeset viewer.