source: branches/feature-module-zeus/html/user_data/include/campaign/default/src/entry.php @ 15376

Revision 15376, 14.7 KB checked in by naka, 13 years ago (diff)
Line 
1<?php
2/*
3 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7require_once("../../require.php");
8
9class LC_Page {
10    function LC_Page() {
11        $this->tpl_css = URL_DIR.'css/layout/entry/index.css';  // ¥á¥¤¥óCSS¥Ñ¥¹
12        $this->tpl_mainpage = 'entry/index.tpl';                // ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
13        $this->tpl_title .= '²ñ°÷ÅÐÏ¿(ÆþÎÏ¥Ú¡¼¥¸)';             //¡¡¥Ú¡¼¥¸¥¿¥¤¥È¥ë
14    }
15}
16
17//---- ¥Ú¡¼¥¸½é´üÀßÄê
18$CONF = sf_getBasisData();                  // ŹÊÞ´ðËܾðÊó
19$objConn = new SC_DbConn();
20$objQuery = new SC_Query();
21$objPage = new LC_Page();
22$objView = new SC_SiteView();
23$objCampaignSess = new SC_CampaignSession();
24$objDate = new SC_Date(START_BIRTH_YEAR, date("Y",strtotime("now")));
25$objPage->arrPref = $arrPref;
26$objPage->arrJob = $arrJob;
27$objPage->arrReminder = $arrReminder;
28$objPage->arrYear = $objDate->getYear('', 1950);    //¡¡ÆüÉÕ¥×¥ë¥À¥¦¥óÀßÄê
29$objPage->arrMonth = $objDate->getMonth();
30$objPage->arrDay = $objDate->getDay();
31
32//SSLURLȽÄê
33if (SSLURL_CHECK == 1){
34    $ssl_url= sfRmDupSlash(SSL_URL.$_SERVER['REQUEST_URI']);
35    if (!ereg("^https://", $non_ssl_url)){
36        sfDispSiteError(URL_ERROR);
37    }
38}
39
40// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
41$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
42
43//---- ÅÐÏ¿ÍÑ¥«¥é¥àÇÛÎó
44$arrRegistColumn = array(
45                             array(  "column" => "name01", "convert" => "aKV" ),
46                             array(  "column" => "name02", "convert" => "aKV" ),
47                             array(  "column" => "kana01", "convert" => "CKV" ),
48                             array(  "column" => "kana02", "convert" => "CKV" ),
49                             array(  "column" => "zip01", "convert" => "n" ),
50                             array(  "column" => "zip02", "convert" => "n" ),
51                             array(  "column" => "pref", "convert" => "n" ),
52                             array(  "column" => "addr01", "convert" => "aKV" ),
53                             array(  "column" => "addr02", "convert" => "aKV" ),
54                             array(  "column" => "email", "convert" => "a" ),
55                             array(  "column" => "email2", "convert" => "a" ),
56                             array(  "column" => "email_mobile", "convert" => "a" ),
57                             array(  "column" => "email_mobile2", "convert" => "a" ),
58                             array(  "column" => "tel01", "convert" => "n" ),
59                             array(  "column" => "tel02", "convert" => "n" ),
60                             array(  "column" => "tel03", "convert" => "n" ),
61                             array(  "column" => "fax01", "convert" => "n" ),
62                             array(  "column" => "fax02", "convert" => "n" ),
63                             array(  "column" => "fax03", "convert" => "n" ),
64                             array(  "column" => "sex", "convert" => "n" ),
65                             array(  "column" => "job", "convert" => "n" ),
66                             array(  "column" => "birth", "convert" => "n" ),
67                             array(  "column" => "reminder", "convert" => "n" ),
68                             array(  "column" => "reminder_answer", "convert" => "aKV"),
69                             array(  "column" => "password", "convert" => "a" ),
70                             array(  "column" => "password02", "convert" => "a" ),
71                             array(  "column" => "mailmaga_flg", "convert" => "n" )
72                         );
73
74//---- ÅÐÏ¿½ü³°ÍÑ¥«¥é¥àÇÛÎó
75$arrRejectRegistColumn = array("year", "month", "day", "email02", "email_mobile02", "password02");
76
77if ($_SERVER["REQUEST_METHOD"] == "POST") {
78
79    //-- POST¥Ç¡¼¥¿¤Î°ú¤­·Ñ¤®
80    $objPage->arrForm = $_POST;
81   
82    if($objPage->arrForm['year'] == '----') {
83        $objPage->arrForm['year'] = '';
84    }
85   
86    $objPage->arrForm['email'] = strtolower($objPage->arrForm['email']);        // email¤Ï¤¹¤Ù¤Æ¾®Ê¸»ú¤Ç½èÍý
87    $objPage->arrForm['email02'] = strtolower($objPage->arrForm['email02']);    // email¤Ï¤¹¤Ù¤Æ¾®Ê¸»ú¤Ç½èÍý
88
89    //-- ÆþÎϥǡ¼¥¿¤ÎÊÑ´¹
90    $objPage->arrForm = lfConvertParam($objPage->arrForm, $arrRegistColumn);
91       
92    //--¡¡ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯
93    $objPage->arrErr = lfErrorCheck($objPage->arrForm);
94
95    if ($objPage->arrErr || $_POST["mode"] == "return") {       // ÆþÎÏ¥¨¥é¡¼¤Î¥Á¥§¥Ã¥¯
96        foreach($objPage->arrForm as $key => $val) {
97            $objPage->$key = $val;
98        }
99
100    } else {
101
102        //--¡¡³Îǧ
103        if ($_POST["mode"] == "confirm") {
104            foreach($objPage->arrForm as $key => $val) {
105                if ($key != "mode" && $key != "subm") $objPage->list_data[ $key ] = $val;
106            }
107            //¥Ñ¥¹¥ï¡¼¥Éɽ¼¨
108            $passlen = strlen($objPage->arrForm['password']);
109            $objPage->passlen = lfPassLen($passlen);
110           
111            $objPage->tpl_css = '/css/layout/entry/confirm.css';
112            $objPage->tpl_mainpage = 'entry/confirm.tpl';
113            $objPage->tpl_title = '²ñ°÷ÅÐÏ¿(³Îǧ¥Ú¡¼¥¸)';
114
115        }
116       
117        //--¡¡²¾ÅÐÏ¿¤È´°Î»²èÌÌ
118        if ($_POST["mode"] == "complete") {
119            $objPage->uniqid = lfRegistData ($objPage->arrForm, $arrRegistColumn, $arrRejectRegistColumn);
120
121            if($objCampaignSess->getIsCampaign()) {
122                $objPage->etc_value = "&cp=".$objCampaignSess->getCampaignId();
123            }
124                       
125            $objPage->tpl_css = '/css/layout/entry/complete.css';
126            $objPage->tpl_mainpage = 'entry/complete.tpl';
127            $objPage->tpl_title = '²ñ°÷ÅÐÏ¿(´°Î»¥Ú¡¼¥¸)';
128
129           
130            //¡¡²¾ÅÐÏ¿´°Î»¥á¡¼¥ëÁ÷¿®
131            $objPage->CONF = $CONF;
132            $objPage->to_name01 = $_POST['name01'];
133            $objPage->to_name02 = $_POST['name02'];
134            $objMailText = new SC_SiteView();
135            $objMailText->assignobj($objPage);
136            $subject = sfMakesubject('²ñ°÷ÅÐÏ¿¤Î¤´³Îǧ');
137            $toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl");
138            $objMail = new GC_SendMail();
139            $objMail->setItem(
140                                ''                                  //¡¡°¸Àè
141                                , $subject                          //¡¡¥µ¥Ö¥¸¥§¥¯¥È
142                                , $toCustomerMail                   //¡¡ËÜʸ
143                                , $CONF["email03"]                  //¡¡ÇÛÁ÷¸µ¥¢¥É¥ì¥¹
144                                , $CONF["shop_name"]                //¡¡ÇÛÁ÷¸µ¡¡Ì¾Á°
145                                , $CONF["email03"]                  //¡¡reply_to
146                                , $CONF["email04"]                  //¡¡return_path
147                                , $CONF["email04"]                  //  Errors_to
148                                , $CONF["email01"]                  //  Bcc
149                                                                );
150            // °¸Àè¤ÎÀßÄê
151            $name = $_POST["name01"] . $_POST["name02"] ." ÍÍ";
152            $objMail->setTo($_POST["email"], $name);
153            $objMail->sendMail();
154
155            // ¥­¥ã¥ó¥Ú¡¼¥ó¼õÃí¾ðÊó¤òÅÐÏ¿
156            lfRegistCampaignOrder($objPage->uniqid);
157           
158            // ´°Î»¥Ú¡¼¥¸¤Ë°ÜÆ°¤µ¤»¤ë¡£
159            header("Location: ./complete.php");
160            exit;
161        }
162    }
163}
164
165if($objPage->year == '') {
166    $objPage->year = '----';
167}
168
169//----¡¡¥Ú¡¼¥¸É½¼¨
170$objView->assignobj($objPage);
171// ¥Õ¥ì¡¼¥à¤òÁªÂò(¥­¥ã¥ó¥Ú¡¼¥ó¥Ú¡¼¥¸¤«¤éÁ«°Ü¤Ê¤éÊѹ¹)
172$objCampaignSess->pageView($objView);
173
174//----------------------------------------------------------------------------------------------------------------------
175
176//---- function·²
177function lfRegistData ($array, $arrRegistColumn, $arrRejectRegistColumn) {
178    global $objConn;
179
180    // ²¾ÅÐÏ¿
181    foreach ($arrRegistColumn as $data) {
182        if (strlen($array[ $data["column"] ]) > 0 && ! in_array($data["column"], $arrRejectRegistColumn)) {
183            $arrRegist[ $data["column"] ] = $array[ $data["column"] ];
184        }
185    }
186       
187    // ÃÂÀ¸Æü¤¬ÆþÎϤµ¤ì¤Æ¤¤¤ë¾ì¹ç
188    if (strlen($array["year"]) > 0 ) {
189        $arrRegist["birth"] = $array["year"] ."/". $array["month"] ."/". $array["day"] ." 00:00:00";
190    }
191   
192    // ¥Ñ¥¹¥ï¡¼¥É¤Î°Å¹æ²½
193    $arrRegist["password"] = sha1($arrRegist["password"] . ":" . AUTH_MAGIC);
194   
195    $count = 1;
196    while ($count != 0) {
197        $uniqid = sfGetUniqRandomId("t");
198        $count = $objConn->getOne("SELECT COUNT(*) FROM dtb_customer WHERE secret_key = ?", array($uniqid));
199    }
200   
201    $arrRegist["secret_key"] = $uniqid;     // ²¾ÅÐÏ¿IDȯ¹Ô
202    $arrRegist["create_date"] = "now()";    // ºîÀ®Æü
203    $arrRegist["update_date"] = "now()";    // ¹¹¿·Æü
204    $arrRegist["first_buy_date"] = "";      // ºÇ½é¤Î¹ØÆþÆü
205   
206    //-- ²¾ÅÐÏ¿¼Â¹Ô
207    $objConn->query("BEGIN");
208
209    $objQuery = new SC_Query();
210    $objQuery->insert("dtb_customer", $arrRegist);
211
212/* ¥á¥ë¥Þ¥¬²ñ°÷µ¡Ç½¤Ï¸½ºßÄä»ßÃæ¡¡2007/03/07
213   
214    //--¡¡Èó²ñ°÷¤Ç¥á¥ë¥Þ¥¬ÅÐÏ¿¤·¤Æ¤¤¤ë¤«¤ÎȽÄê
215    $sql = "SELECT count(*) FROM dtb_customer_mail WHERE email = ?";
216    $mailResult = $objConn->getOne($sql, array($arrRegist["email"]));
217
218    //--¡¡¥á¥ë¥Þ¥¬²¾ÅÐÏ¿¼Â¹Ô
219    $arrRegistMail["email"] = $arrRegist["email"]; 
220    if ($array["mailmaga_flg"] == 1) {
221        $arrRegistMail["mailmaga_flg"] = 4;
222    } elseif ($array["mailmaga_flg"] == 2) {
223        $arrRegistMail["mailmaga_flg"] = 5;
224    } else {
225        $arrRegistMail["mailmaga_flg"] = 6;
226    }
227    $arrRegistMail["update_date"] = "now()";
228   
229    // Èó²ñ°÷¤Ç¥á¥ë¥Þ¥¬ÅÐÏ¿¤·¤Æ¤¤¤ë¾ì¹ç
230    if ($mailResult == 1) {     
231        $objQuery->update("dtb_customer_mail", $arrRegistMail, "email = '" .addslashes($arrRegistMail["email"]). "'");         
232    } else {                //¡¡¿·µ¬ÅÐÏ¿¤Î¾ì¹ç
233        $arrRegistMail["create_date"] = "now()";
234        $objQuery->insert("dtb_customer_mail", $arrRegistMail);     
235    }
236*/
237    $objConn->query("COMMIT");
238
239    return $uniqid;
240}
241
242//----¡¡¼èÆÀʸ»úÎó¤ÎÊÑ´¹
243function lfConvertParam($array, $arrRegistColumn) {
244    /*
245     *  ʸ»úÎó¤ÎÊÑ´¹
246     *  K :  ¡ÖȾ³Ñ(ŽÊŽÝŽ¶Ž¸)ÊÒ²¾Ì¾¡×¤ò¡ÖÁ´³ÑÊÒ²¾Ì¾¡×¤ËÊÑ´¹
247     *  C :  ¡ÖÁ´³Ñ¤Ò¤é²¾Ì¾¡×¤ò¡ÖÁ´³Ñ¤«¤¿²¾Ì¾¡×¤ËÊÑ´¹
248     *  V :  ÂùÅÀÉÕ¤­¤Îʸ»ú¤ò°ìʸ»ú¤ËÊÑ´¹¡£"K","H"¤È¶¦¤Ë»ÈÍѤ·¤Þ¤¹ 
249     *  n :  ¡ÖÁ´³Ñ¡×¿ô»ú¤ò¡ÖȾ³Ñ(ŽÊŽÝŽ¶Ž¸)¡×¤ËÊÑ´¹
250     *  a :  Á´³Ñ±Ñ¿ô»ú¤òȾ³Ñ±Ñ¿ô»ú¤ËÊÑ´¹¤¹¤ë
251     */
252    // ¥«¥é¥à̾¤È¥³¥ó¥Ð¡¼¥È¾ðÊó
253    foreach ($arrRegistColumn as $data) {
254        $arrConvList[ $data["column"] ] = $data["convert"];
255    }
256    // ʸ»úÊÑ´¹
257    foreach ($arrConvList as $key => $val) {
258        // POST¤µ¤ì¤Æ¤­¤¿ÃͤΤßÊÑ´¹¤¹¤ë¡£
259        if(strlen(($array[$key])) > 0) {
260            $array[$key] = mb_convert_kana($array[$key] ,$val);
261        }
262    }
263    return $array;
264}
265
266//---- ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯
267function lfErrorCheck($array) {
268
269    global $objConn;
270    $objErr = new SC_CheckError($array);
271   
272    $objErr->doFunc(array("¤ªÌ¾Á°¡ÊÀ«¡Ë", 'name01', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
273    $objErr->doFunc(array("¤ªÌ¾Á°¡Ê̾¡Ë", 'name02', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" , "MAX_LENGTH_CHECK"));
274    $objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡Ê¥»¥¤¡Ë", 'kana01', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
275    $objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡Ê¥á¥¤¡Ë", 'kana02', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
276    $objErr->doFunc(array("͹ÊØÈÖ¹æ1", "zip01", ZIP01_LEN ) ,array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));
277    $objErr->doFunc(array("͹ÊØÈÖ¹æ2", "zip02", ZIP02_LEN ) ,array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));
278    $objErr->doFunc(array("͹ÊØÈÖ¹æ", "zip01", "zip02"), array("ALL_EXIST_CHECK"));
279    $objErr->doFunc(array("ÅÔÆ»Éܸ©", 'pref'), array("SELECT_CHECK","NUM_CHECK"));
280    $objErr->doFunc(array("¤´½»½ê1", "addr01", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
281    $objErr->doFunc(array("¤´½»½ê2", "addr02", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
282    $objErr->doFunc(array('¥á¡¼¥ë¥¢¥É¥ì¥¹', "email", MTEXT_LEN) ,array("NO_SPTAB", "EXIST_CHECK", "EMAIL_CHECK", "SPTAB_CHECK" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK"));
283    $objErr->doFunc(array('¥á¡¼¥ë¥¢¥É¥ì¥¹(³Îǧ)', "email02", MTEXT_LEN) ,array("NO_SPTAB", "EXIST_CHECK", "EMAIL_CHECK","SPTAB_CHECK" , "EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK"));
284    $objErr->doFunc(array('¥á¡¼¥ë¥¢¥É¥ì¥¹', '¥á¡¼¥ë¥¢¥É¥ì¥¹(³Îǧ)', "email", "email02") ,array("EQUAL_CHECK"));
285
286    //¸½²ñ°÷¤ÎȽÄê ¢ª¡¡¸½²ñ°÷¤â¤·¤¯¤Ï²¾ÅÐÏ¿Ãæ¤Ï¡¢¥á¥¢¥É°ì°Õ¤¬Á°Äó¤Ë¤Ê¤Ã¤Æ¤ë¤Î¤ÇƱ¤¸¥á¥¢¥É¤ÇÅÐÏ¿ÉÔ²Ä
287    if (strlen($array["email"]) > 0) {
288        $objQuery = new SC_Query();
289        $arrRet = $objQuery->select("email, update_date, del_flg", "dtb_customer","email ILIKE ? ORDER BY del_flg", array($array["email"]));
290               
291        if(count($arrRet) > 0) {
292            if($arrRet[0]['del_flg'] != '1') {
293                // ²ñ°÷¤Ç¤¢¤ë¾ì¹ç
294                $objErr->arrErr["email"] .= "¢¨ ¤¹¤Ç¤Ë²ñ°÷ÅÐÏ¿¤Ç»ÈÍѤµ¤ì¤Æ¤¤¤ë¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ç¤¹¡£<br />";
295            } else {
296                // Âà²ñ¤·¤¿²ñ°÷¤Ç¤¢¤ë¾ì¹ç
297                $leave_time = sfDBDatetoTime($arrRet[0]['update_date']);
298                $now_time = time();
299                $pass_time = $now_time - $leave_time;
300                // Âà²ñ¤«¤é²¿»þ´Ö-·Ð²á¤·¤Æ¤¤¤ë¤«È½Äꤹ¤ë¡£
301                $limit_time = ENTRY_LIMIT_HOUR * 3600;                     
302                if($pass_time < $limit_time) {
303                    $objErr->arrErr["email"] .= "¢¨ Âà²ñ¤«¤é°ìÄê´ü´Ö¤Î´Ö¤Ï¡¢Æ±¤¸¥á¡¼¥ë¥¢¥É¥ì¥¹¤ò»ÈÍѤ¹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£<br />";
304                }
305            }
306        }
307    }
308
309    $objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ1", 'tel01'), array("EXIST_CHECK","SPTAB_CHECK" ));
310    $objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ2", 'tel02'), array("EXIST_CHECK","SPTAB_CHECK" ));
311    $objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ3", 'tel03'), array("EXIST_CHECK","SPTAB_CHECK" ));
312    $objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ", "tel01", "tel02", "tel03",TEL_ITEM_LEN) ,array("TEL_CHECK"));
313    $objErr->doFunc(array("FAXÈÖ¹æ1", 'fax01'), array("SPTAB_CHECK"));
314    $objErr->doFunc(array("FAXÈÖ¹æ2", 'fax02'), array("SPTAB_CHECK"));
315    $objErr->doFunc(array("FAXÈÖ¹æ3", 'fax03'), array("SPTAB_CHECK"));
316    $objErr->doFunc(array("FAXÈÖ¹æ", "fax01", "fax02", "fax03", TEL_ITEM_LEN) ,array("TEL_CHECK"));
317    $objErr->doFunc(array("¤´À­ÊÌ", "sex") ,array("SELECT_CHECK", "NUM_CHECK"));
318    $objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É", 'password', PASSWORD_LEN1, PASSWORD_LEN2), array("EXIST_CHECK", "SPTAB_CHECK" ,"ALNUM_CHECK", "NUM_RANGE_CHECK"));
319    $objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É(³Îǧ)", 'password02', PASSWORD_LEN1, PASSWORD_LEN2), array("EXIST_CHECK", "SPTAB_CHECK" ,"ALNUM_CHECK", "NUM_RANGE_CHECK"));
320    $objErr->doFunc(array('¥Ñ¥¹¥ï¡¼¥É', '¥Ñ¥¹¥ï¡¼¥É(³Îǧ)', "password", "password02") ,array("EQUAL_CHECK"));
321    $objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É¤ò˺¤ì¤¿¤È¤­¤Î¥Ò¥ó¥È ¼ÁÌä", "reminder") ,array("SELECT_CHECK", "NUM_CHECK"));
322    $objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É¤ò˺¤ì¤¿¤È¤­¤Î¥Ò¥ó¥È Åú¤¨", "reminder_answer", STEXT_LEN) ,array("EXIST_CHECK","SPTAB_CHECK" , "MAX_LENGTH_CHECK"));
323    $objErr->doFunc(array("¥á¡¼¥ë¥Þ¥¬¥¸¥ó", "mailmaga_flg") ,array("SELECT_CHECK", "NUM_CHECK"));
324    $objErr->doFunc(array("À¸Ç¯·îÆü", "year", "month", "day"), array("CHECK_DATE"));
325
326   
327    return $objErr->arrErr;
328}
329
330// ¥­¥ã¥ó¥Ú¡¼¥ó¼õÃí¥Æ¡¼¥Ö¥ë¤ØÅÐÏ¿
331function lfRegistCampaignOrder($uniqid) {
332
333    global $objQuery;
334    global $objCampaignSess;
335    $campaign_id = $objCampaignSess->getCampaignId();
336
337    // ¸ÜµÒ¥Ç¡¼¥¿¤ò¼èÆÀ
338    $cols = "
339            customer_id,
340            name01 as order_name01,
341            name02 as order_name02,
342            kana01 as order_kana01,
343            kana02 as order_kana02,
344            zip01 as order_zip01,
345            zip02 as order_zip02,
346            pref as order_pref,
347            addr01 as order_addr01,
348            addr02 as order_addr02,
349            email as order_email,
350            tel01 as order_tel01,
351            tel02 as order_tel02,
352            tel03 as order_tel03,
353            fax01 as order_fax01,
354            fax02 as order_fax02,
355            fax03 as order_fax03,
356            sex as order_sex,
357            job as order_job,
358            birth as order_birth
359            ";
360           
361    $arrCustomer = $objQuery->select($cols, "dtb_customer", "secret_key = ?", array($uniqid));
362
363    $sqlval = $arrCustomer[0];
364    $sqlval['campaign_id'] = $campaign_id;
365    $sqlval['create_date'] = 'now()';
366       
367    // INSERT¤Î¼Â¹Ô
368    $objQuery->insert("dtb_campaign_order", $sqlval);
369   
370    // ¿½¤·¹þ¤ß¿ô¤Î¹¹¿·
371    $total_count = $objQuery->get("dtb_campaign", "total_count", "campaign_id = ?", array($campaign_id));
372    $arrCampaign['total_count'] = $total_count += 1;
373    $objQuery->update("dtb_campaign", $arrCampaign, "campaign_id = ?", array($campaign_id));
374}
375
376//³Îǧ¥Ú¡¼¥¸Íѥѥ¹¥ï¡¼¥Éɽ¼¨ÍÑ
377
378function lfPassLen($passlen){
379    $ret = "";
380    for ($i=0;$i<$passlen;true){
381    $ret.="*";
382    $i++;
383    }
384    return $ret;
385}
386
387//-----------------------------------------------------------------------------------------------------------------------------------
388?>
Note: See TracBrowser for help on using the repository browser.