Changeset 17139


Ignore:
Timestamp:
2008/03/12 21:04:32 (16 years ago)
Author:
adachi
Message:

merge r17125, r17138

Location:
branches/comu-ver2/data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/pages/mypage/LC_Page_Mypage_Change.php

    r16582 r17139  
    159159                //セッション情報を最新の状態に更新する 
    160160                $this->objCustomer->updateSession(); 
     161 
     162                // Do楽SNS連携モジュールユーザ情報更新処理 
     163                if (function_exists('sfUpdateSourakuSNSUserInfo')) { 
     164                    sfUpdateSourakuSNSUserInfo(); 
     165                } 
     166 
    161167                //完了ページへ 
    162168                $this->sendRedirect($this->getLocation("./change_complete.php")); 
  • branches/comu-ver2/data/include/module.inc

    r16969 r17139  
    11<?php 
     2/* 
     3 * This file is part of EC-CUBE 
     4 * 
     5 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
     6 * 
     7 * http://www.lockon.co.jp/ 
     8 * 
     9 * This program is free software; you can redistribute it and/or 
     10 * modify it under the terms of the GNU General Public License 
     11 * as published by the Free Software Foundation; either version 2 
     12 * of the License, or (at your option) any later version. 
     13 * 
     14 * This program is distributed in the hope that it will be useful, 
     15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     17 * GNU General Public License for more details. 
     18 * 
     19 * You should have received a copy of the GNU General Public License 
     20 * along with this program; if not, write to the Free Software 
     21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
     22 */ 
    223 
    3 // タグ出力用クラス 
    4 class LC_EbisPage { 
    5     function LC_EbisPage() { 
    6         $this->tpl_mainpage = MODULE_PATH . "ebis_tag_text.tpl"; 
    7     } 
     24if (!defined('ECCUBE_INSTALL')) { 
     25    return; 
    826} 
    927 
    10 // エビスタグの発行 
    11 function sfPrintEbisTag($pid = "") { 
    12     $objQuery = new SC_Query(); 
    13     $arrRet = $objQuery->select("sub_data", "dtb_module", "module_id = ?", array(EBIS_TAG_MID)); 
    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      
    28     if(!is_array($pid) && $pid != "") { 
    29         if(!ereg(".tpl$", $pid)) { 
    30             // ページIDを上書きする 
    31             $arrEbis['pid'] = $pid; 
    32         } else { 
    33             // テンプレートのパスが与えられている場合 
    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); 
    38             $arrEbis['pid'] = $temp_id; 
    39         } 
    40     }    
    41      
    42     // 商品一覧ページは、特殊IDを発行 
    43     if(ereg("/products/list.php\?category_id=[0-9]+$", $_SERVER["REQUEST_URI"])) { 
    44         $filename = basename($_SERVER["REQUEST_URI"]); 
    45         $arrEbis['pid'] = ereg_replace("list.php\?category_id=", "list-c", $filename); 
    46     } 
    47      
    48     // 商品詳細ページは、特殊IDを発行 
    49     if(ereg("/products/detail.php\?product_id=[0-9]+$", $_SERVER["REQUEST_URI"])) { 
    50         $filename = basename($_SERVER["REQUEST_URI"]); 
    51         $arrEbis['pid'] = ereg_replace("detail.php\?product_id=", "detail-p", $filename); 
    52     } 
    53      
    54     // ID割り当てされていないページは、自動的に生成する。 
    55     if($arrEbis['pid'] == "") {              
    56         $temp_id = ereg_replace("^[/]+","",$_SERVER['PHP_SELF']); 
    57         $temp_id = ereg_replace(".php$","",$temp_id); 
    58         $temp_id = ereg_replace("[\./]","_",$temp_id); 
    59         $arrEbis['pid'] = $temp_id; 
    60     } 
    61              
    62     // ページIDが登録されている場合のみタグを出力する。 
    63     if($arrEbis['pid'] != "") { 
    64         $objSubPage = new LC_EbisPage(); 
    65         $objSubPage->arrEbis = $arrEbis; 
    66         $objSubView = new SC_SiteView(); 
    67         $objSubView->assignobj($objSubPage); 
    68         $objSubView->display($objSubPage->tpl_mainpage); 
    69     } 
     28// {{{ requires 
     29require_once CLASS_PATH . 'SC_DbConn.php'; 
     30require_once CLASS_PATH . 'SC_Query.php'; 
     31require_once CLASS_PATH . 'db/SC_DB_DBFactory.php'; 
     32 
     33/** 
     34 * ダウンロード済みモジュールのinclude.phpを読み込む. 
     35 * テンプレート関数用. 
     36 * 
     37 * クラス化したかったが、グローバル変数をかなり使ってたので断念. 
     38 * そのうち変数名とか衝突しそう... 
     39 * 
     40 * sfPrintEbisTag(), sfPrintAffTag()は今は使用しない関数だが、 
     41 * 互換性維持のため残しておく. 
     42 */ 
     43 
     44/** 
     45 * インクルードするモジュールの一覧 
     46 * FIXME dtb_moduleとかに保持する 
     47 */ 
     48$_arrModule = array( 
     49    'mdl_a8', 
     50    'mdl_moba8', 
     51    'mdl_opebuilder', 
     52    'mdl_souraku', 
     53); 
     54 
     55$_objQuery = new SC_Query; 
     56$_arrModuleCode = $_objQuery->getCol('dtb_module', 'module_code'); 
     57 
     58if (is_array($_arrModuleCode)) { 
     59    foreach ($_arrModuleCode as $_moduleCode) { 
     60        $_file = MODULE_PATH . "$_moduleCode/include.php"; 
     61        if (in_array($_moduleCode, $_arrModule) && file_exists($_file)) { 
     62            include_once($_file); 
     63        } 
     64    } 
    7065} 
    7166 
    72 // コンバージョンタグの発行 
    73 function sfPrintAffTag($conv_page, $option) { 
    74     if(is_numeric($conv_page)) { 
    75         // sub_dataよりタグ情報を読み込む 
    76         $objQuery = new SC_Query(); 
    77         $arrRet = $objQuery->select("sub_data", "dtb_module", "module_id = ?", array(AFF_TAG_MID)); 
    78         $arrSubData = unserialize($arrRet[0]['sub_data']); 
    79         $aff_tag = $arrSubData[$conv_page]; 
    80          
    81         $array = split("\|", $option); 
    82          
    83         // 特定文字の置き換え 
    84         foreach($array as $each) { 
    85             list($key, $value) = split("=", $each); 
    86             $aff_tag = ereg_replace("\[\[" . $key . "\]\]", $value, $aff_tag); 
    87         } 
    88         print($aff_tag);         
    89     } 
    90 } 
     67// グローバル変数は残しておきたくないのでunset 
     68unset( 
     69    $_arrModule, $_objQuery, $_arrModuleCode, 
     70    $_moduleCode, $_file 
     71); 
    9172 
    92 // dtb_paymentに汎用項目が存在していなければ追加する 
    93 function sfAlterMemo(){ 
    94     $objQuery = new SC_Query(); 
    95      
    96     // 汎用項目の存在チェック 
    97     if(!sfColumnExists("dtb_payment", "memo01")){ 
    98          
    99         // モジュールIDを追加 
    100         $objQuery->query("alter table dtb_payment add module_id int4;"); 
    101          
    102         // モジュールパスを追加 
    103         $objQuery->query("alter table dtb_payment add module_path text;"); 
    104          
    105         // 汎用項目を10個追加 
    106         for($i=1; $i<=9; $i++){ 
    107             $objQuery->query("alter table dtb_payment add memo0".$i." text;"); 
    108         } 
    109         $objQuery->query("alter table dtb_payment add memo10 text;"); 
    110     } 
    111 } 
    112  
    113 /*------------- ▼A8FLYタグ出力 -------------*/ 
    114 if (file_exists(MODULE_PATH. "mdl_a8/include.php") === TRUE) { 
    115     require_once(MODULE_PATH. "mdl_a8/include.php"); 
    116 } 
    117  
    118 /*------------- ▼Moba8FLY連携 -------------*/ 
    119 if (file_exists(MODULE_PATH. "mdl_moba8/include.php") === TRUE) { 
    120     require_once(MODULE_PATH. "mdl_moba8/include.php"); 
    121 } 
    122  
    123 /*------------- ▼オペビルダー連携 -------------*/ 
    124 if (file_exists(MODULE_PATH. "mdl_opebuilder/include.php") === TRUE) { 
    125     require_once(MODULE_PATH. "mdl_opebuilder/include.php"); 
    126 } 
    127  
    128 ?> 
     73// 互換性保持のため空の関数を残しておく 
     74function sfPrintEbisTag() {} 
     75function sfPrintAffTag() {} 
Note: See TracChangeset for help on using the changeset viewer.