Changeset 15040 for branches/dev/data/include/module.inc
- Timestamp:
- 2007/07/12 15:06:41 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dev/data/include/module.inc
r8 r15040 1 1 <?php 2 2 3 // ¥ ¿¥°½ÐÎÏÍÑ¥¯¥é¥¹3 // ¥¨¥Ó¥¹¥¿¥°½ÐÎÏÍÑ¥¯¥é¥¹ 4 4 class LC_EbisPage { 5 6 7 5 function LC_EbisPage() { 6 $this->tpl_mainpage = MODULE_PATH . "ebis_tag_text.tpl"; 7 } 8 8 } 9 9 … … 11 11 function sfPrintEbisTag($pid = "") { 12 12 $objQuery = new SC_Query(); 13 $arrRet = $objQuery->select("sub_data", "dtb_module", "module_id = ?", array(EBIS_TAG_MID));13 $arrRet = $objQuery->select("sub_data", "dtb_module", "module_id = ?", array(EBIS_TAG_MID)); 14 14 $arrSubData = unserialize($arrRet[0]['sub_data']); 15 $arrEbis = array(); 16 17 if($arrSubData['cid'] != "") { 18 $arrEbis['cid'] = $arrSubData['cid']; 19 } else { 20 return; 21 } 22 23 // ¡Ö/¡×¤¬½ÅÊ£¤·¤Æ¤¤¤ë¤â¤Î¤Ø¤ÎÂбþ 24 $php_self = ereg_replace("[/]+", "/", $_SERVER['PHP_SELF']); 25 // PHP¥Õ¥¡¥¤¥ë¤Î¸å¤í¤Ë¡Ö/¡×¤¬¤Ä¤¤¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë¤â¤Î¤Ø¤ÎÂбþ 26 $php_self = ereg_replace(".php[/]+$", ".php", $php_self); 27 15 16 if ( empty($arrSubData['cid']) ) return; 17 18 $arrEbis = array( 19 'cid' => $arrSubData['cid'], 20 'login_url' => $arrSubData['login_url'], 21 ); 22 28 23 if(!is_array($pid) && $pid != "") { 29 24 if(!ereg(".tpl$", $pid)) { … … 32 27 } else { 33 28 // ¥Æ¥ó¥×¥ì¡¼¥È¤Î¥Ñ¥¹¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤ë¾ì¹ç 34 $temp_id = ereg_replace(HTML_PATH,"",$pid); 35 $temp_id = ereg_replace("^[/]+","",$temp_id); 36 $temp_id = ereg_replace(".tpl$","",$temp_id); 37 $temp_id = ereg_replace("[\./]","_",$temp_id); 29 $temp_id = str_replace(USER_TEMPLATE_PATH, '', $pid); 30 $temp_id = str_replace(HTML_PATH, '', $temp_id); 31 $temp_id = preg_replace('|^/+|', '', $temp_id); 32 $temp_id = preg_replace('|\.tpl$|', '', $temp_id); 33 $temp_id = preg_replace('|[\./]|', '_', $temp_id); 38 34 $arrEbis['pid'] = $temp_id; 39 35 } … … 51 47 $arrEbis['pid'] = ereg_replace("detail.php\?product_id=", "detail-p", $filename); 52 48 } 53 49 50 // ¹ØÆþ´°Î»¥Ú¡¼¥¸(thanks¥Ú¡¼¥¸)¤ÏÆüìID¤òȯ¹Ô 51 if(preg_match("|/shopping/complete.php$|", $_SERVER["REQUEST_URI"])) { 52 global $arrEBiSTagAttrKeys; 53 global $arrEBiSTagAttrTagName; 54 global $arrJob; 55 global $arrSex; 56 57 $arrEbis['pid'] = 'thanks'; // ¥Ú¡¼¥¸ID¤ò¥»¥Ã¥È 58 $customerInfo = $_SESSION['customer']; 59 60 /** 61 * $arrSubData == Array ( 62 * [user] => username 63 * [pass] => password 64 * [login_url] => http://login_url/ 65 * [cid] => ebis_parameter 66 * [m1id] => 1 67 * [a1id] => 2 68 * [o1id] => 3 69 * [o2id] => 4 70 * [o3id] => 0 71 * [o4id] => 0 72 * [o5id] => 0 73 * ) 74 **/ 75 76 foreach ($arrSubData as $key => $value) { 77 if (!in_array($key , $arrEBiSTagAttrTagName)) continue; 78 if (empty($arrEBiSTagAttrKeys[$value])) continue; 79 80 // °À¾ðÊó¤ò¥»¥Ã¥È 81 switch ($value) { 82 case EBiS_TAG_ATTR_CUSTOMER_ID: 83 case EBiS_TAG_ATTR_PAYMENT: 84 $tmp_key = $arrEBiSTagAttrKeys[$value]; 85 $arrEbis[$key] = $customerInfo[$tmp_key]; 86 break; 87 case EBiS_TAG_ATTR_JOB: 88 $tmp_key = $arrEBiSTagAttrKeys[$value]; 89 $arrEbis[$key] = $arrJob[$customerInfo[$tmp_key]]; 90 break; 91 case EBiS_TAG_ATTR_SEX: 92 $tmp_key = $arrEBiSTagAttrKeys[$value]; 93 $arrEbis[$key] = $arrSex[$customerInfo[$tmp_key]]; 94 break; 95 default: 96 } 97 } 98 } 99 54 100 // ID³ä¤êÅö¤Æ¤µ¤ì¤Æ¤¤¤Ê¤¤¥Ú¡¼¥¸¤Ï¡¢¼«Æ°Åª¤ËÀ¸À®¤¹¤ë¡£ 55 101 if($arrEbis['pid'] == "") { … … 59 105 $arrEbis['pid'] = $temp_id; 60 106 } 61 107 62 108 // ¥Ú¡¼¥¸ID¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Î¤ß¥¿¥°¤ò½ÐÎϤ¹¤ë¡£ 63 109 if($arrEbis['pid'] != "") {
Note: See TracChangeset
for help on using the changeset viewer.