当前位置: 首页>>代码示例>>PHP>>正文


PHP SC_Utils_Ex::sfMergeParamCheckBoxes方法代码示例

本文整理汇总了PHP中SC_Utils_Ex::sfMergeParamCheckBoxes方法的典型用法代码示例。如果您正苦于以下问题:PHP SC_Utils_Ex::sfMergeParamCheckBoxes方法的具体用法?PHP SC_Utils_Ex::sfMergeParamCheckBoxes怎么用?PHP SC_Utils_Ex::sfMergeParamCheckBoxes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SC_Utils_Ex的用法示例。


在下文中一共展示了SC_Utils_Ex::sfMergeParamCheckBoxes方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: lfSetHidden

 /**
  * hidden情報の作成
  *
  * @param array $arrForm フォームデータ
  * @return array hidden情報
  */
 function lfSetHidden($arrForm)
 {
     $arrHidden = array();
     foreach ($arrForm as $key => $val) {
         if (preg_match("/^search_/", $key)) {
             switch ($key) {
                 case 'search_sex':
                     $arrHidden[$key] = SC_Utils_Ex::sfMergeParamCheckBoxes($val);
                     if (!is_array($val)) {
                         $arrForm[$key] = explode("-", $val);
                     }
                     break;
                 default:
                     $arrHidden[$key] = $val;
                     break;
             }
         }
     }
     return $arrHidden;
 }
开发者ID:nanasess,项目名称:ec-azure,代码行数:26,代码来源:LC_Page_Admin_Products_Review.php

示例2: process

 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $conn = new SC_DBConn();
     $objView = new SC_AdminView();
     $objDb = new SC_Helper_DB_Ex();
     $objSess = new SC_Session();
     // パラメータ管理クラス
     $this->objFormParam = new SC_FormParam();
     // パラメータ情報の初期化
     $this->lfInitParam();
     $this->objFormParam->setParam($_POST);
     $this->objFormParam->splitParamCheckBoxes('search_order_sex');
     $this->objFormParam->splitParamCheckBoxes('search_payment_id');
     // 検索ワードの引き継ぎ
     foreach ($_POST as $key => $val) {
         if (ereg("^search_", $key)) {
             switch ($key) {
                 case 'search_order_sex':
                 case 'search_payment_id':
                     $this->arrHidden[$key] = SC_Utils_Ex::sfMergeParamCheckBoxes($val);
                     break;
                 default:
                     $this->arrHidden[$key] = $val;
                     break;
             }
         }
     }
     // ページ送り用
     $this->arrHidden['search_pageno'] = isset($_POST['search_pageno']) ? $_POST['search_pageno'] : "";
     // 認証可否の判定
     SC_Utils_Ex::sfIsSuccess($objSess);
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     if (!isset($arrRet)) {
         $arrRet = array();
     }
     if ($_POST['mode'] == 'delete') {
         if (SC_Utils_Ex::sfIsInt($_POST['order_id'])) {
             $objQuery = new SC_Query();
             $where = "order_id = ?";
             $sqlval['del_flg'] = '1';
             $objQuery->update("dtb_order", $sqlval, $where, array($_POST['order_id']));
         }
     }
     switch ($_POST['mode']) {
         case 'delete':
         case 'csv':
         case 'pdf':
         case 'delete_all':
         case 'search':
             // 入力値の変換
             $this->objFormParam->convParam();
             $this->arrErr = $this->lfCheckError($arrRet);
             $arrRet = $this->objFormParam->getHashArray();
             // 入力なし
             if (count($this->arrErr) == 0) {
                 $where = "del_flg = 0";
                 foreach ($arrRet as $key => $val) {
                     if ($val == "") {
                         continue;
                     }
                     $val = SC_Utils_Ex::sfManualEscape($val);
                     switch ($key) {
                         case 'search_order_name':
                             if (DB_TYPE == "pgsql") {
                                 $where .= " AND order_name01||order_name02 ILIKE ?";
                             } elseif (DB_TYPE == "mysql") {
                                 $where .= " AND concat(order_name01,order_name02) ILIKE ?";
                             }
                             $nonsp_val = mb_ereg_replace("[  ]+", "", $val);
                             $arrval[] = "%{$nonsp_val}%";
                             break;
                         case 'search_order_kana':
                             if (DB_TYPE == "pgsql") {
                                 $where .= " AND order_kana01||order_kana02 ILIKE ?";
                             } elseif (DB_TYPE == "mysql") {
                                 $where .= " AND concat(order_kana01,order_kana02) ILIKE ?";
                             }
                             $nonsp_val = mb_ereg_replace("[  ]+", "", $val);
                             $arrval[] = "%{$nonsp_val}%";
                             break;
                         case 'search_order_id1':
                             $where .= " AND order_id >= ?";
                             $arrval[] = $val;
                             break;
                         case 'search_order_id2':
                             $where .= " AND order_id <= ?";
                             $arrval[] = $val;
                             break;
                         case 'search_order_sex':
                             $tmp_where = "";
                             foreach ($val as $element) {
                                 if ($element != "") {
                                     if ($tmp_where == "") {
//.........这里部分代码省略.........
开发者ID:khrisna,项目名称:eccubedrm,代码行数:101,代码来源:LC_Page_Admin_Order.php

示例3: process

 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     //---- ページ初期設定
     $objQuery = new SC_Query();
     $objView = new SC_AdminView();
     $objDate = new SC_Date(1901);
     $objDb = new SC_Helper_DB_Ex();
     $this->arrYear = $objDate->getYear();
     // 日付プルダウン設定
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     $this->objDate = $objDate;
     // 認証可否の判定
     $objSess = new SC_Session();
     SC_Utils_Ex::sfIsSuccess($objSess);
     // POST値の引き継ぎ
     $this->arrForm = $_POST;
     // ページ送り用
     $this->arrHidden['search_pageno'] = isset($_POST['search_pageno']) ? $_POST['search_pageno'] : "";
     // 検索ワードの引き継ぎ
     foreach ($_POST as $key => $val) {
         switch ($key) {
             case 'sex':
             case 'status':
                 $this->arrHidden[$key] = SC_Utils_Ex::sfMergeParamCheckBoxes($val);
                 if (!is_array($val)) {
                     $this->arrForm[$key] = split("-", $val);
                 }
                 break;
             default:
                 $this->arrHidden[$key] = $val;
                 break;
         }
     }
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     // 顧客削除
     if ($_POST['mode'] == "delete") {
         $sql = "SELECT status,email FROM dtb_customer WHERE customer_id = ? AND del_flg = 0";
         $result_customer = $objQuery->conn->getAll($sql, array($_POST["edit_customer_id"]));
         if ($result_customer[0]["status"] == 2) {
             //本会員削除
             $arrDel = array("del_flg" => 1, "update_date" => "NOW()");
             $objQuery->conn->autoExecute("dtb_customer", $arrDel, "customer_id = " . SC_Utils_Ex::sfQuoteSmart($_POST["edit_customer_id"]));
         } elseif ($result_customer[0]["status"] == 1) {
             //仮会員削除
             $sql = "DELETE FROM dtb_customer WHERE customer_id = ?";
             $objQuery->conn->query($sql, array($_POST["edit_customer_id"]));
         }
     }
     //if ($_POST['mode'] == "search" || $_POST['mode'] == "csv"  || $_POST['mode'] == "delete" || $_POST['mode'] == "delete_all") {
     // 登録メール再送
     if ($_POST['mode'] == "resend_mail") {
         $arrRet = $objQuery->select("name01, name02, secret_key, email", "dtb_customer", "customer_id = ? AND del_flg <> 1 AND status = 1", array($_POST["edit_customer_id"]));
         if (is_array($arrRet) === true && count($arrRet) > 0) {
             $CONF = $objDb->sf_getBasisData();
             $this->CONF = $CONF;
             $objMailText = new SC_SiteView();
             $objMailText->assignobj($this);
             $mailHelper = new SC_Helper_Mail_Ex();
             $this->name01 = $arrRet[0]['name01'];
             $this->name02 = $arrRet[0]['name02'];
             $this->uniqid = $arrRet[0]['secret_key'];
             $subject = $mailHelper->sfMakesubject($objQuery, $objMailText, $this, '会員登録のご確認');
             $toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl");
             $objMail = new SC_SendMail();
             $objMail->setItem('', $subject, $toCustomerMail, $CONF["email03"], $CONF["shop_name"], $CONF["email03"], $CONF["email04"], $CONF["email04"]);
             // 宛先の設定
             $name = $this->name01 . $this->name02 . " 様";
             $objMail->setTo($arrRet[0]["email"], $name);
             $objMail->sendMail();
         }
     }
     if ($_POST['mode'] == "search" || $_POST['mode'] == "csv" || $_POST['mode'] == "delete" || $_POST['mode'] == "delete_all" || $_POST['mode'] == "resend_mail") {
         // 入力文字の強制変換
         $this->lfConvertParam();
         // エラーチェック
         $this->arrErr = $this->lfCheckError($this->arrForm);
         $where = "del_flg = 0";
         /* 入力エラーなし */
         if (count($this->arrErr) == 0) {
             //-- 検索データ取得
             $objSelect = new SC_CustomerList($this->arrForm, "customer");
             // 表示件数設定
             $page_rows = $this->arrForm['page_rows'];
             if (is_numeric($page_rows)) {
                 $page_max = $page_rows;
             } else {
                 $page_max = SEARCH_PMAX;
             }
             if (!isset($this->arrForm['search_pageno'])) {
                 $this->arrForm['search_pageno'] = "";
             }
             if ($this->arrForm['search_pageno'] == 0) {
//.........这里部分代码省略.........
开发者ID:khrisna,项目名称:eccubedrm,代码行数:101,代码来源:LC_Page_Admin_Customer.php

示例4: process

 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_AdminView();
     $objSess = new SC_Session();
     $objDate = new SC_Date();
     $objQuery = new SC_Query();
     // 登録・更新検索開始年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE("Y"));
     $this->arrStartYear = $objDate->getYear();
     $this->arrStartMonth = $objDate->getMonth();
     $this->arrStartDay = $objDate->getDay();
     // 登録・更新検索終了年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE("Y"));
     $this->arrEndYear = $objDate->getYear();
     $this->arrEndMonth = $objDate->getMonth();
     $this->arrEndDay = $objDate->getDay();
     // 認証可否の判定
     SC_Utils_Ex::sfIsSuccess($objSess);
     //レビュー情報のカラムの取得
     $select = "review_id, A.product_id, reviewer_name, sex, recommend_level, ";
     $select .= "reviewer_url, title, comment, A.status, A.create_date, A.update_date, name";
     $from = "dtb_review AS A LEFT JOIN dtb_products AS B ON A.product_id = B.product_id ";
     // 検索ワードの引き継ぎ
     foreach ($_POST as $key => $val) {
         if (ereg("^search_", $key)) {
             switch ($key) {
                 case 'search_sex':
                     $this->arrHidden[$key] = SC_Utils_Ex::sfMergeParamCheckBoxes($val);
                     if (!is_array($val)) {
                         $this->arrForm[$key] = split("-", $val);
                     }
                     break;
                 default:
                     $this->arrHidden[$key] = $val;
                     break;
             }
         }
     }
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     if ($_POST['mode'] == "delete") {
         //レビューの削除
         $objQuery->exec("UPDATE dtb_review SET del_flg=1 WHERE review_id=?", array($_POST['review_id']));
     }
     if ($_POST['mode'] == 'search' || $_POST['mode'] == 'csv' || $_POST['mode'] == 'delete') {
         //削除されていない商品を検索
         $where = "A.del_flg = 0 AND B.del_flg = 0";
         $this->arrForm = $_POST;
         if (isset($_POST['search_sex']) && !is_array($_POST['search_sex'])) {
             $this->arrForm['search_sex'] = split("-", $_POST['search_sex']);
         }
         //エラーチェック
         $this->arrErr = $this->lfCheckError();
         if (!$this->arrErr) {
             foreach ($_POST as $key => $val) {
                 $val = SC_Utils_Ex::sfManualEscape($val);
                 if ($val == "") {
                     continue;
                 }
                 switch ($key) {
                     case 'search_reviewer_name':
                         $val = ereg_replace(" ", "%", $val);
                         $val = ereg_replace(" ", "%", $val);
                         $where .= " AND reviewer_name ILIKE ? ";
                         $arrval[] = "%{$val}%";
                         break;
                     case 'search_reviewer_url':
                         $val = ereg_replace(" ", "%", $val);
                         $val = ereg_replace(" ", "%", $val);
                         $where .= " AND reviewer_url ILIKE ? ";
                         $arrval[] = "%{$val}%";
                         break;
                     case 'search_name':
                         $val = ereg_replace(" ", "%", $val);
                         $val = ereg_replace(" ", "%", $val);
                         $where .= " AND name ILIKE ? ";
                         $arrval[] = "%{$val}%";
                         break;
                     case 'search_product_code':
                         $val = ereg_replace(" ", "%", $val);
                         $val = ereg_replace(" ", "%", $val);
                         $where .= " AND A.product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? )";
                         $arrval[] = "%{$val}%";
                         break;
                     case 'search_sex':
                         $tmp_where = "";
                         //$val=配列の中身,$element=各キーの値(1,2)
                         if (is_array($val)) {
                             foreach ($val as $element) {
                                 if ($element != "") {
                                     if ($tmp_where == "") {
                                         $tmp_where .= " AND (sex = ?";
//.........这里部分代码省略.........
开发者ID:khrisna,项目名称:eccubedrm,代码行数:101,代码来源:LC_Page_Admin_Products_Review.php

示例5: lfRegistData

 function lfRegistData(&$objFormParam, $questionnaire_id)
 {
     $objCustomer = new SC_Customer_Ex();
     $objQuery =& SC_Query_Ex::getSingletonInstance();
     $objQuery->begin();
     $result_id = $objQuery->nextVal('dtb_questionnaire_result_id_id');
     $sqlval['customer_id'] = $objCustomer->getValue('customer_id');
     $sqlval['questionnaire_id'] = $questionnaire_id;
     $sqlval['result_id'] = $result_id;
     $sqlval['del_flg'] = '0';
     $sqlval['create_date'] = 'now()';
     $objQuery->insert("dtb_questionnaire_result", $sqlval);
     $arrResults = $objFormParam->getDbArray();
     $i = 0;
     foreach ($arrResults as $key => $result) {
         $sqlval = array();
         $sqlval['answer_id'] = $i;
         $sqlval['result_id'] = $result_id;
         $sqlval['answer'] = SC_Utils_Ex::sfMergeParamCheckBoxes($result);
         $objQuery->insert("dtb_questionnaire_result_answer", $sqlval);
         $i++;
     }
     $objQuery->commit();
 }
开发者ID:nobuhiko,项目名称:questionnaire,代码行数:24,代码来源:LC_Page_FrontParts_Bloc_Questionnaire.php

示例6: process

 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_AdminView();
     $objDb = new SC_Helper_DB_Ex();
     $objDate = new SC_Date();
     // 登録・更新検索開始年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE("Y"));
     $this->arrStartYear = $objDate->getYear();
     $this->arrStartMonth = $objDate->getMonth();
     $this->arrStartDay = $objDate->getDay();
     // 登録・更新検索終了年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE("Y"));
     $this->arrEndYear = $objDate->getYear();
     $this->arrEndMonth = $objDate->getMonth();
     $this->arrEndDay = $objDate->getDay();
     // 認証可否の判定
     $objSess = new SC_Session();
     SC_Utils_Ex::sfIsSuccess($objSess);
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     //キャンペーンの編集時
     if (isset($_POST['campaign_id']) && SC_Utils_Ex::sfIsInt($_POST['campaign_id']) && $_POST['mode'] == "camp_search") {
         $objQuery = new SC_Query();
         $search_data = $objQuery->get("dtb_campaign", "search_condition", "campaign_id = ? ", array($_POST['campaign_id']));
         $arrSearch = unserialize($search_data);
         foreach ($arrSearch as $key => $val) {
             $_POST[$key] = $val;
         }
     }
     // POST値の引き継ぎ
     $this->arrForm = $_POST;
     // 検索ワードの引き継ぎ
     foreach ($_POST as $key => $val) {
         if (ereg("^search_", $key) || ereg("^campaign_", $key)) {
             switch ($key) {
                 case 'search_product_flag':
                 case 'search_status':
                     $this->arrHidden[$key] = SC_Utils_Ex::sfMergeParamCheckBoxes($val);
                     if (!is_array($val)) {
                         $this->arrForm[$key] = split("-", $val);
                     }
                     break;
                 default:
                     $this->arrHidden[$key] = $val;
                     break;
             }
         }
     }
     // ページ送り用
     $this->arrHidden['search_pageno'] = isset($_POST['search_pageno']) ? $_POST['search_pageno'] : "";
     // 商品削除
     if ($_POST['mode'] == "delete") {
         if ($_POST['category_id'] != "") {
             // ランク付きレコードの削除
             $where = "category_id = " . SC_Utils_Ex::sfQuoteSmart($_POST['category_id']);
             $objDb->sfDeleteRankRecord("dtb_products", "product_id", $_POST['product_id'], $where);
         } else {
             $objDb->sfDeleteRankRecord("dtb_products", "product_id", $_POST['product_id']);
         }
         // 子テーブル(商品規格)の削除
         $objQuery = new SC_Query();
         $objQuery->delete("dtb_products_class", "product_id = ?", array($_POST['product_id']));
         // 件数カウントバッチ実行
         $objDb->sfCategory_Count($objQuery);
     }
     if ($_POST['mode'] == "search" || $_POST['mode'] == "csv" || $_POST['mode'] == "delete" || $_POST['mode'] == "delete_all" || $_POST['mode'] == "camp_search") {
         // 入力文字の強制変換
         $this->lfConvertParam();
         // エラーチェック
         $this->arrErr = $this->lfCheckError();
         $where = "del_flg = 0";
         $view_where = "del_flg = 0";
         // 入力エラーなし
         if (count($this->arrErr) == 0) {
             $arrval = array();
             foreach ($this->arrForm as $key => $val) {
                 $val = SC_Utils_Ex::sfManualEscape($val);
                 if ($val == "") {
                     continue;
                 }
                 switch ($key) {
                     case 'search_product_id':
                         // 商品ID
                         $where .= " AND product_id = ?";
                         $view_where .= " AND product_id = ?";
                         $arrval[] = $val;
                         break;
                     case 'search_product_class_name':
                         //規格名称
                         $where_in = " (SELECT classcategory_id FROM dtb_classcategory WHERE class_id IN (SELECT class_id FROM dtb_class WHERE name LIKE ?)) ";
                         $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE classcategory_id1 IN " . $where_in;
                         $where .= " OR classcategory_id2 IN" . $where_in . ")";
//.........这里部分代码省略.........
开发者ID:khrisna,项目名称:eccubedrm,代码行数:101,代码来源:LC_Page_Admin_Products.php


注:本文中的SC_Utils_Ex::sfMergeParamCheckBoxes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。