Changeset 16379


Ignore:
Timestamp:
2007/10/11 16:41:56 (16 years ago)
Author:
nanasess
Message:

addslashes() を SC_Utils_Ex::sfQuoteSmart() に修正

Location:
branches/feature-module-update
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/SC_SelectSql.php

    r15571 r16379  
    170170        for( $i = 0; $i < $count; $i++ ) { 
    171171 
    172             if( isset( $arrWhere[$i]["value"] ) ) $statement .= $arrWhere[$i]["column"] ." = '" . addslashes( $arrWhere[$i]["value"] ) ."' OR "  ; 
     172            if( isset( $arrWhere[$i]["value"] ) ) $statement .= $arrWhere[$i]["column"] ." = " . SC_Utils_Ex::sfQuoteSmart($arrWhere[$i]["value"]) ." OR "  ; 
    173173        } 
    174174 
  • branches/feature-module-update/data/class/pages/admin/customer/LC_Page_Admin_Customer.php

    r16326 r16379  
    206206            if ($result_customer[0]["status"] == 2) {           //本会員削除 
    207207                $arrDel = array("del_flg" => 1, "update_date" => "NOW()"); 
    208                 $objQuery->conn->autoExecute("dtb_customer", $arrDel, "customer_id = " .addslashes($_POST["edit_customer_id"]) ); 
     208                $objQuery->conn->autoExecute("dtb_customer", $arrDel, "customer_id = " . SC_Utils_Ex::sfQuoteSmart($_POST["edit_customer_id"]) ); 
    209209            } elseif ($result_customer[0]["status"] == 1) {     //仮会員削除 
    210210                $sql = "DELETE FROM dtb_customer WHERE customer_id = ?"; 
     
    244244 
    245245                if ($_POST["mode"] == 'csv') { 
    246                     $searchSql = $objSelect->getListCSV($arrColumnCSV); 
     246                    $searchSql = $objSelect->getListCSV($this->arrColumnCSV); 
    247247                }else{ 
    248248                    $searchSql = $objSelect->getList(); 
     
    279279 
    280280                    //- CSV出力 
    281                     $data = lfGetCSVData($this->search_data, $arrColumn); 
    282  
    283                     sfCSVDownload($header.$data); 
     281                    $data = $this->lfGetCSVData($this->search_data, $arrColumn); 
     282 
     283                    SC_Utils_Ex::sfCSVDownload($header.$data); 
    284284                    exit; 
    285285                    break; 
     
    295295                    if ($result_customer[0]["status"] == 2) {           //本会員削除 
    296296                        $arrDel = array("del_flg" => 1, "update_date" => "NOW()"); 
    297                         $objQuery->conn->autoExecute("dtb_customer", $arrDel, "customer_id = " .addslashes($_POST["del_customer_id"]) ); 
     297                        $objQuery->conn->autoExecute("dtb_customer", $arrDel, "customer_id = " . SC_Utils_Ex::sfQuoteSmart($_POST["del_customer_id"]) ); 
    298298                    } elseif ($result_customer[0]["status"] == 1) {     //仮会員削除 
    299299                        $sql = "DELETE FROM dtb_customer WHERE customer_id = ?"; 
  • branches/feature-module-update/data/class/pages/admin/products/LC_Page_Admin_Products.php

    r16326 r16379  
    113113            if($_POST['category_id'] != "") { 
    114114                // ランク付きレコードの削除 
    115                 $where = "category_id = " . addslashes($_POST['category_id']); 
     115                $where = "category_id = " . SC_Utils_Ex::sfQuoteSmart($_POST['category_id']); 
    116116                $objDb->sfDeleteRankRecord("dtb_products", "product_id", $_POST['product_id'], $where); 
    117117            } else { 
  • branches/feature-module-update/data/class/pages/admin/products/LC_Page_Admin_Products_ClassCategory.php

    r15532 r16379  
    1414 * @package Page 
    1515 * @author LOCKON CO.,LTD. 
    16  * @version $Id$ 
     16 * @version $Id:LC_Page_Admin_Products_ClassCategory.php 15532 2007-08-31 14:39:46Z nanasess $ 
    1717 */ 
    1818class LC_Page_Admin_Products_ClassCategory extends LC_Page { 
     
    7070 
    7171        if (!isset($_POST['mode'])) $_POST['mode'] = ""; 
     72 
     73        if (isset($_POST['class_id'])) { 
     74            if (!SC_Utils_Ex::sfIsInt($_POST['class_id'])) { 
     75                SC_Utils_Ex::sfDispError(""); 
     76            } 
     77        } 
    7278 
    7379        // 新規作成 or 編集 
     
    98104        case 'delete': 
    99105            // ランク付きレコードの削除 
    100             $where = "class_id = " . addslashes($_POST['class_id']); 
     106            $where = "class_id = " . SC_Utils_Ex::sfQuoteSmart($_POST['class_id']); 
    101107            $objDb->sfDeleteRankRecord("dtb_classcategory", "classcategory_id", $_POST['classcategory_id'], $where, true); 
    102108            break; 
     
    112118            break; 
    113119        case 'down': 
    114             $where = "class_id = " . addslashes($_POST['class_id']); 
     120            $where = "class_id = " . SC_Utils_Ex::sfQuoteSmart($_POST['class_id']); 
    115121            $objDb->sfRankDown("dtb_classcategory", "classcategory_id", $_POST['classcategory_id'], $where); 
    116122            break; 
    117123        case 'up': 
    118             $where = "class_id = " . addslashes($_POST['class_id']); 
     124            $where = "class_id = " . SC_Utils_Ex::sfQuoteSmart($_POST['class_id']); 
    119125            $objDb->sfRankUp("dtb_classcategory", "classcategory_id", $_POST['classcategory_id'], $where); 
    120126            break; 
  • branches/feature-module-update/data/class/pages/regist/LC_Page_Regist.php

    r16371 r16379  
    130130                //$this->tpl_mainpage = 'regist/complete.tpl'; 
    131131                //$this->tpl_title = ' 会員登録(完了ページ)'; 
    132                 $registSecretKey = lfRegistData($_GET);         //本会員登録(フラグ変更) 
    133                 lfSendRegistMail($registSecretKey);             //本会員登録完了メール送信 
     132                $registSecretKey = $this->lfRegistData($_GET);          //本会員登録(フラグ変更) 
     133                $this->lfSendRegistMail($registSecretKey);              //本会員登録完了メール送信 
    134134 
    135135                // ログイン済みの状態にする。 
     
    137137                $email = $objQuery->get("dtb_customer", "email", "secret_key = ?", array($registSecretKey)); 
    138138                $objCustomer->setLogin($email); 
    139                 $this->sendRedirect($this->getLocation("./complete.php")); 
    140                 header("Location: " . gfAddSessionId("./complete.php")); 
     139                $this->sendRedirect($this->getLocation("./complete.php"), true); 
    141140                exit; 
    142141            } 
     
    188187        $arrRet = $objQuery->select("point", "dtb_customer", $where, array($array["id"])); 
    189188        // 会員登録時の加算ポイント(購入時会員登録の場合は、ポイント加算) 
    190         $arrRegist['point'] = $arrRet[0]['point'] + addslashes($arrInfo['welcome_point']); 
     189        $arrRegist['point'] = $arrRet[0]['point'] + $arrInfo['welcome_point']; 
    191190 
    192191        $objQuery->update("dtb_customer", $arrRegist, $where, array($array["id"])); 
     
    229228        } 
    230229 
    231         $objQuery->update("dtb_customer", $arrRegistMail, "email = '" .addslashes($email). "' AND del_flg = 0"); 
     230        $objQuery->update("dtb_customer", $arrRegistMail, "email = " . SC_Utils_Ex::sfQuoteSmart($email). " AND del_flg = 0"); 
    232231        $objConn->query("COMMIT"); 
    233232 
  • branches/feature-module-update/data/class/pages/shopping/LC_Page_Shopping_Deliv.php

    r16170 r16379  
    136136            // 別のお届け先がチェックされている場合 
    137137            } elseif($_POST['deliv_check'] >= 1) { 
    138                 if (sfIsInt($_POST['deliv_check'])) { 
     138                if (SC_Utils_Ex::sfIsInt($_POST['deliv_check'])) { 
    139139                    // 登録済みの別のお届け先を受注一時テーブルに書き込む 
    140                     lfRegistOtherDelivData($uniqid, $objCustomer, $_POST['deliv_check']); 
     140                    $this->lfRegistOtherDelivData($uniqid, $objCustomer, $_POST['deliv_check']); 
    141141                    // 正常に登録されたことを記録しておく 
    142142                    $objSiteSess->setRegistFlag(); 
  • branches/feature-module-update/data/class/util/SC_Utils.php

    r16327 r16379  
    12781278 
    12791279            case '1': 
    1280             $objConn->autoExecute("dtb_customer_mail_temp",$arrRegistMailMagazine, "email = '" .addslashes($email). "'"); 
     1280                $objConn->autoExecute("dtb_customer_mail_temp",$arrRegistMailMagazine, "email = " .SC_Utils::sfQuoteSmart($email)); 
    12811281            break; 
    12821282        } 
  • branches/feature-module-update/html/mobile/regist/index.php

    r16322 r16379  
    8787    $arrRet = $objQuery->select("point", "dtb_customer", $where, array($array["id"])); 
    8888    // 会員登録時の加算ポイント(購入時会員登録の場合は、ポイント加算) 
    89     $arrRegist['point'] = $arrRet[0]['point'] + addslashes($arrInfo['welcome_point']); 
     89    $arrRegist['point'] = $arrRet[0]['point'] + $arrInfo['welcome_point']; 
    9090     
    9191    $objQuery->update("dtb_customer", $arrRegist, $where, array($array["id"])); 
     
    128128    } 
    129129 
    130     $objQuery->update("dtb_customer", $arrRegistMail, "email = '" .addslashes($email). "' AND del_flg = 0"); 
     130    $objQuery->update("dtb_customer", $arrRegistMail, "email = " . SC_Utils_Ex::sfQuoteSmart($email). " AND del_flg = 0"); 
    131131    $objConn->query("COMMIT"); 
    132132         
  • branches/feature-module-update/html/mobile/shopping/deliv_addr.php

    r15532 r16379  
    210210    $objConn->query("BEGIN"); 
    211211    if ($array['other_deliv_id'] != ""){ 
    212         $objConn->autoExecute("dtb_other_deliv", $arrRegist, "other_deliv_id='" .addslashes($array["other_deliv_id"]). "'"); 
     212        $objConn->autoExecute("dtb_other_deliv", $arrRegist, "other_deliv_id=" SC_Utils_Ex::sfQuoteSmart($array["other_deliv_id"])); 
    213213    }else{ 
    214214        $objConn->autoExecute("dtb_other_deliv", $arrRegist); 
Note: See TracChangeset for help on using the changeset viewer.