Changeset 11982 for branches/comu/html/entry/index.php
- Timestamp:
- 2007/03/28 13:01:38 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu/html/entry/index.php
r11730 r11982 20 20 $objPage = new LC_Page(); 21 21 $objView = new SC_SiteView(); 22 $objCustomer = new SC_Customer(); 22 23 $objCampaignSess = new SC_CampaignSession(); 23 24 $objDate = new SC_Date(START_BIRTH_YEAR, date("Y",strtotime("now"))); … … 67 68 array( "column" => "reminder_answer", "convert" => "aKV"), 68 69 array( "column" => "password", "convert" => "a" ), 69 array( "column" => "password02", "convert" => "a" ) 70 array( "column" => "password02", "convert" => "a" ), 71 array( "column" => "mailmaga_flg", "convert" => "n" ), 70 72 ); 71 73 … … 113 115 } 114 116 115 //--¡¡² ¾ÅÐÏ¿¤È´°Î»²èÌÌ117 //--¡¡²ñ°÷ÅÐÏ¿¤È´°Î»²èÌÌ 116 118 if ($_POST["mode"] == "complete") { 117 119 // ¥¥ã¥ó¥Ú¡¼¥ó¤«¤é¤ÎÁ«°Ü¤Î»þÍѤÎÃÍ … … 120 122 } 121 123 122 $objPage->uniqid = lfRegistData ($objPage->arrForm, $arrRegistColumn, $arrRejectRegistColumn); 124 // ²ñ°÷¾ðÊó¤ÎÅÐÏ¿ 125 $objPage->uniqid = lfRegistData ($objPage->arrForm, $arrRegistColumn, $arrRejectRegistColumn, CUSTOMER_CONFIRM_MAIL); 123 126 124 127 $objPage->tpl_css = '/css/layout/entry/complete.css'; … … 126 129 $objPage->tpl_title = '²ñ°÷ÅÐÏ¿(´°Î»¥Ú¡¼¥¸)'; 127 130 128 //¡¡ ²¾ÅÐÏ¿´°Î»¥á¡¼¥ëÁ÷¿®131 //¡¡´°Î»¥á¡¼¥ëÁ÷¿® 129 132 $objPage->CONF = $CONF; 130 $objPage-> to_name01 = $_POST['name01'];131 $objPage-> to_name02 = $_POST['name02'];133 $objPage->name01 = $_POST['name01']; 134 $objPage->name02 = $_POST['name02']; 132 135 $objMailText = new SC_SiteView(); 133 136 $objMailText->assignobj($objPage); 134 $subject = sfMakesubject('²ñ°÷ÅÐÏ¿¤Î¤´³Îǧ'); 135 $toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl"); 137 138 // ²¾²ñ°÷¤¬Í¸ú¤Î¾ì¹ç 139 if(CUSTOMER_CONFIRM_MAIL == true) { 140 $subject = sfMakesubject('²ñ°÷ÅÐÏ¿¤Î¤´³Îǧ'); 141 $toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl"); 142 } else { 143 $subject = sfMakesubject('²ñ°÷ÅÐÏ¿¤Î¤´´°Î»'); 144 $toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl"); 145 // ¥í¥°¥¤¥ó¾õÂ֤ˤ¹¤ë 146 $objCustomer->setLogin($_POST["email"]); 147 } 148 136 149 $objMail = new GC_SendMail(); 137 150 $objMail->setItem( … … 144 157 , $CONF["email04"] //¡¡return_path 145 158 , $CONF["email04"] // Errors_to 146 , $CONF["email01"] // Bcc 147 ); 159 ); 148 160 // °¸Àè¤ÎÀßÄê 149 161 $name = $_POST["name01"] . $_POST["name02"] ." ÍÍ"; … … 168 180 169 181 //---------------------------------------------------------------------------------------------------------------------- 170 171 //---- function·² 172 function lfRegistData ($array, $arrRegistColumn, $arrRejectRegistColumn) { 182 // ²ñ°÷¾ðÊó¤ÎÅÐÏ¿ 183 function lfRegistData ($array, $arrRegistColumn, $arrRejectRegistColumn, $confirm_flg) { 173 184 global $objConn; 174 175 // ²¾ÅÐÏ¿185 186 // ÅÐÏ¿¥Ç¡¼¥¿¤ÎÀ¸À® 176 187 foreach ($arrRegistColumn as $data) { 177 188 if (strlen($array[ $data["column"] ]) > 0 && ! in_array($data["column"], $arrRejectRegistColumn)) { … … 188 199 $arrRegist["password"] = sha1($arrRegist["password"] . ":" . AUTH_MAGIC); 189 200 190 $count = 1; 191 while ($count != 0) { 192 $uniqid = sfGetUniqRandomId("t"); 193 $count = $objConn->getOne("SELECT COUNT(*) FROM dtb_customer WHERE secret_key = ?", array($uniqid)); 194 } 195 196 $arrRegist["secret_key"] = $uniqid; // ²¾ÅÐÏ¿IDȯ¹Ô 201 // ²¾²ñ°÷ÅÐÏ¿¤Î¾ì¹ç 202 if($confirm_flg == true) { 203 // ½ÅÊ£¤·¤Ê¤¤²ñ°÷ÅÐÏ¿¥¡¼¤òȯ¹Ô¤¹¤ë¡£ 204 $count = 1; 205 while ($count != 0) { 206 $uniqid = sfGetUniqRandomId("t"); 207 $count = $objConn->getOne("SELECT COUNT(*) FROM dtb_customer WHERE secret_key = ?", array($uniqid)); 208 } 209 switch($array["mailmaga_flg"]) { 210 case 1: 211 $arrRegist["mailmaga_flg"] = 4; 212 break; 213 case 2: 214 $arrRegist["mailmaga_flg"] = 5; 215 break; 216 default: 217 $arrRegist["mailmaga_flg"] = 6; 218 break; 219 } 220 221 $arrRegist["status"] = "1"; // ²¾²ñ°÷ 222 } else { 223 // ½ÅÊ£¤·¤Ê¤¤²ñ°÷ÅÐÏ¿¥¡¼¤òȯ¹Ô¤¹¤ë¡£ 224 $count = 1; 225 while ($count != 0) { 226 $uniqid = sfGetUniqRandomId("r"); 227 $count = $objConn->getOne("SELECT COUNT(*) FROM dtb_customer WHERE secret_key = ?", array($uniqid)); 228 } 229 $arrRegist["status"] = "2"; // Ëܲñ°÷ 230 } 231 232 /* 233 secret_key¤Ï¡¢¥Æ¡¼¥Ö¥ë¤Ç½ÅÊ£µö²Ä¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤¬¤¢¤ë¤Î¤Ç¡¢ 234 Ëܲñ°÷ÅÐÏ¿¤Ç¤ÏÍøÍѤµ¤ì¤Ê¤¤¤¬¥»¥Ã¥È¤·¤Æ¤ª¤¯¡£ 235 */ 236 $arrRegist["secret_key"] = $uniqid; // ²ñ°÷ÅÐÏ¿¥¡¼ 197 237 $arrRegist["create_date"] = "now()"; // ºîÀ®Æü 198 238 $arrRegist["update_date"] = "now()"; // ¹¹¿·Æü … … 205 245 $objQuery->insert("dtb_customer", $arrRegist); 206 246 247 248 /* ¥á¥ë¥Þ¥¬²ñ°÷µ¡Ç½¤Ï¸½ºßÄä»ßÃæ¡¡2007/03/07 249 250 207 251 //--¡¡Èó²ñ°÷¤Ç¥á¥ë¥Þ¥¬ÅÐÏ¿¤·¤Æ¤¤¤ë¤«¤ÎȽÄê 208 252 $sql = "SELECT count(*) FROM dtb_customer_mail WHERE email = ?"; … … 211 255 //--¡¡¥á¥ë¥Þ¥¬²¾ÅÐÏ¿¼Â¹Ô 212 256 $arrRegistMail["email"] = $arrRegist["email"]; 213 if ($array["mail _flag"] == 1) {214 $arrRegistMail["mail _flag"] = 4;215 } elseif ($array["mail _flag"] == 2) {216 $arrRegistMail["mail _flag"] = 5;257 if ($array["mailmaga_flg"] == 1) { 258 $arrRegistMail["mailmaga_flg"] = 4; 259 } elseif ($array["mailmaga_flg"] == 2) { 260 $arrRegistMail["mailmaga_flg"] = 5; 217 261 } else { 218 $arrRegistMail["mail _flag"] = 6;262 $arrRegistMail["mailmaga_flg"] = 6; 219 263 } 220 264 $arrRegistMail["update_date"] = "now()"; … … 227 271 $objQuery->insert("dtb_customer_mail", $arrRegistMail); 228 272 } 273 */ 229 274 $objConn->query("COMMIT"); 230 275 … … 313 358 $objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É¤ò˺¤ì¤¿¤È¤¤Î¥Ò¥ó¥È ¼ÁÌä", "reminder") ,array("SELECT_CHECK", "NUM_CHECK")); 314 359 $objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É¤ò˺¤ì¤¿¤È¤¤Î¥Ò¥ó¥È Åú¤¨", "reminder_answer", STEXT_LEN) ,array("EXIST_CHECK","SPTAB_CHECK" , "MAX_LENGTH_CHECK")); 315 $objErr->doFunc(array("¥á¡¼¥ë¥Þ¥¬¥¸¥ó", "mail _flag") ,array("SELECT_CHECK", "NUM_CHECK"));360 $objErr->doFunc(array("¥á¡¼¥ë¥Þ¥¬¥¸¥ó", "mailmaga_flg") ,array("SELECT_CHECK", "NUM_CHECK")); 316 361 317 362 $objErr->doFunc(array("À¸Ç¯·îÆü", "year", "month", "day"), array("CHECK_DATE")); 318 $objErr->doFunc(array("¥á¡¼¥ë¥Þ¥¬¥¸¥ó", 'mail _flag'), array("SELECT_CHECK"));363 $objErr->doFunc(array("¥á¡¼¥ë¥Þ¥¬¥¸¥ó", 'mailmaga_flg'), array("SELECT_CHECK")); 319 364 320 365 return $objErr->arrErr;
Note: See TracChangeset
for help on using the changeset viewer.