本文整理汇总了PHP中SC_Utils_Ex::sfManualEscape方法的典型用法代码示例。如果您正苦于以下问题:PHP SC_Utils_Ex::sfManualEscape方法的具体用法?PHP SC_Utils_Ex::sfManualEscape怎么用?PHP SC_Utils_Ex::sfManualEscape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SC_Utils_Ex
的用法示例。
在下文中一共展示了SC_Utils_Ex::sfManualEscape方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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 == "") {
//.........这里部分代码省略.........
示例2: 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 = ?";
//.........这里部分代码省略.........
示例3: SC_CustomerList
//.........这里部分代码省略.........
$this->arrSql['end_month'] = "";
}
if (!isset($this->arrSql['end_day'])) {
$this->arrSql['end_day'] = "";
}
if (strlen($this->arrSql['start_year']) > 0 && strlen($this->arrSql['start_month']) > 0 && strlen($this->arrSql['start_day']) > 0 || strlen($this->arrSql['end_year']) > 0 && strlen($this->arrSql['end_month']) > 0 && strlen($this->arrSql['end_day']) > 0) {
$arrRegistTime = $this->selectTermRange($this->arrSql['start_year'], $this->arrSql['start_month'], $this->arrSql['start_day'], $this->arrSql['end_year'], $this->arrSql['end_month'], $this->arrSql['end_day'], $regdate_col);
if (is_array($arrRegistTime)) {
foreach ($arrRegistTime as $data4) {
$this->arrVal[] = $data4;
}
}
}
// 最終購入日指定
if (!isset($this->arrSql['buy_start_year'])) {
$this->arrSql['buy_start_year'] = "";
}
if (!isset($this->arrSql['buy_start_month'])) {
$this->arrSql['buy_start_month'] = "";
}
if (!isset($this->arrSql['buy_start_day'])) {
$this->arrSql['buy_start_day'] = "";
}
if (!isset($this->arrSql['buy_end_year'])) {
$this->arrSql['buy_end_year'] = "";
}
if (!isset($this->arrSql['buy_end_month'])) {
$this->arrSql['buy_end_month'] = "";
}
if (!isset($this->arrSql['buy_end_day'])) {
$this->arrSql['buy_end_day'] = "";
}
if (strlen($this->arrSql['buy_start_year']) > 0 && strlen($this->arrSql['buy_start_month']) > 0 && strlen($this->arrSql['buy_start_day']) > 0 || strlen($this->arrSql['buy_end_year']) > 0 && strlen($this->arrSql['buy_end_month']) > 0 && strlen($this->arrSql['buy_end_day']) > 0) {
$arrRegistTime = $this->selectTermRange($this->arrSql['buy_start_year'], $this->arrSql['buy_start_month'], $this->arrSql['buy_start_day'], $this->arrSql['buy_end_year'], $this->arrSql['buy_end_month'], $this->arrSql['buy_end_day'], "last_buy_date");
if (is_array($arrRegistTime)) {
foreach ($arrRegistTime as $data4) {
$this->arrVal[] = $data4;
}
}
}
//購入商品コード
if (!isset($this->arrSql['buy_product_code'])) {
$this->arrSql['buy_product_code'] = "";
}
if (strlen($this->arrSql['buy_product_code']) > 0) {
$this->setWhere("customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_code LIKE ? ))");
$search_buyproduct_code = $this->addSearchStr($this->arrSql['buy_product_code']);
$this->arrVal[] = $search_buyproduct_code;
}
//購入商品名称
if (!isset($this->arrSql['buy_product_name'])) {
$this->arrSql['buy_product_name'] = "";
}
if (strlen($this->arrSql['buy_product_name']) > 0) {
$this->setWhere("customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_name LIKE ? ))");
$search_buyproduct_name = $this->addSearchStr($this->arrSql['buy_product_name']);
$this->arrVal[] = $search_buyproduct_name;
}
//カテゴリーを選択している場合のみ絞込検索を行う
if (!isset($this->arrSql['category_id'])) {
$this->arrSql['category_id'] = "";
}
if (strlen($this->arrSql['category_id']) != "") {
//カテゴリーで絞込検索を行うSQL文生成
list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere(SC_Utils_Ex::sfManualEscape($this->arrSql['category_id']));
//カテゴリーで絞込みが可能の場合
if ($tmp_where != "") {
$this->setWhere(" customer_id IN (SELECT distinct customer_id FROM dtb_order WHERE order_id IN (SELECT distinct order_id FROM dtb_order_detail WHERE product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . " ))) ");
$this->arrVal = array_merge((array) $this->arrVal, (array) $tmp_arrval);
}
}
//携帯電話番号
if (!isset($this->arrSql['cell'])) {
$this->arrSql['cell'] = "";
}
if (is_numeric($this->arrSql['cell'])) {
$this->setWhere("(cell01 || cell02 || cell03 LIKE ?)");
$searchTel = $this->addSearchStr($this->arrSql['cell']);
$this->arrVal[] = ereg_replace("-", "", $searchTel);
}
//キャンペーン
if (!isset($this->arrSql['campaign_id'])) {
$this->arrSql['campaign_id'] = "";
}
if (is_numeric($this->arrSql['campaign_id'])) {
$this->setWhere(" customer_id IN (SELECT distinct customer_id FROM dtb_campaign_order WHERE campaign_id = ?)");
$this->arrVal[] = $this->arrSql['campaign_id'];
}
//会員状態
if (!isset($this->arrSql['status'])) {
$this->arrSql['status'] = "";
}
if (is_array($this->arrSql['status'])) {
$arrStatusVal = $this->setItemTerm($this->arrSql['status'], "status");
foreach ($arrStatusVal as $data) {
$this->arrVal[] = $data;
}
}
$this->setOrder("customer_id DESC");
}
示例4: addSearchStr
function addSearchStr($val)
{
$return = SC_Utils_Ex::sfManualEscape($val);
$return = "%" . $return . "%";
return $return;
}
示例5: lfGetCustomerOrderId
function lfGetCustomerOrderId($keyword)
{
$arrCustomerOrderId = null;
if ($keyword != "") {
$col = "dtb_order.customer_id, dtb_order.order_id";
$from = "dtb_order LEFT JOIN dtb_order_detail USING(order_id)";
$where = "product_code LIKE ? AND del_flg = 0";
$val = SC_Utils_Ex::sfManualEscape($keyword);
$arrVal[] = "%{$val}%";
$objQuery = new SC_Query();
$objQuery->setgroupby("customer_id, order_id");
$arrRet = $objQuery->select($col, $from, $where, $arrVal);
$arrCustomerOrderId = SC_Utils_Ex::sfArrKeyValues($arrRet, "customer_id", "order_id");
}
return $arrCustomerOrderId;
}
示例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 . ")";
//.........这里部分代码省略.........
示例7: lfDispProductsList
function lfDispProductsList($category_id, $name, $disp_num, $orderby)
{
$objQuery = new SC_Query();
$objDb = new SC_Helper_DB_Ex();
$this->tpl_pageno = defined("MOBILE_SITE") ? @$_GET['pageno'] : @$_POST['pageno'];
//表示順序
switch ($orderby) {
//価格順
case 'price':
$col = "DISTINCT price02_min, product_id, product_code_min, product_code_max," . " name, comment1, comment2, comment3," . " main_list_comment, main_image, main_list_image," . " price01_min, price01_max, price02_max," . " stock_min, stock_max, stock_unlimited_min, stock_unlimited_max," . " point_rate, sale_limit, sale_unlimited, deliv_date_id, deliv_fee," . " status, product_flag, create_date, del_flg";
$from = "vw_products_allclass AS T1";
$order = "price02_min, product_id";
break;
//新着順
//新着順
case 'date':
$col = "DISTINCT create_date, product_id, product_code_min, product_code_max," . " name, comment1, comment2, comment3," . " main_list_comment, main_image, main_list_image," . " price01_min, price01_max, price02_min, price02_max," . " stock_min, stock_max, stock_unlimited_min, stock_unlimited_max," . " point_rate, sale_limit, sale_unlimited, deliv_date_id, deliv_fee," . " status, product_flag, del_flg";
$from = "vw_products_allclass AS T1";
$order = "create_date DESC, product_id";
break;
default:
$col = "DISTINCT T1.product_id, product_code_min, product_code_max," . " price01_min, price01_max, price02_min, price02_max," . " stock_min, stock_max, stock_unlimited_min," . " stock_unlimited_max, del_flg, status, name, comment1," . " comment2, comment3, main_list_comment, main_image," . " main_list_image, product_flag, deliv_date_id, sale_limit," . " point_rate, sale_unlimited, create_date, deliv_fee, " . " T4.product_rank, T4.category_rank";
$from = "vw_products_allclass AS T1" . " JOIN (" . " SELECT max(T3.rank) AS category_rank," . " max(T2.rank) AS product_rank," . " T2.product_id" . " FROM dtb_product_categories T2" . " JOIN dtb_category T3 USING (category_id)" . " GROUP BY product_id) AS T4 USING (product_id)";
$order = "T4.category_rank DESC, T4.product_rank DESC";
break;
}
// 商品検索条件の作成(未削除、表示)
$where = "del_flg = 0 AND status = 1 ";
// カテゴリからのWHERE文字列取得
if ($category_id) {
list($tmp_where, $arrval) = $objDb->sfGetCatWhere($category_id);
if ($tmp_where != "") {
$where .= " AND {$tmp_where}";
}
}
// 商品名をwhere文に
$name = ereg_replace(",", "", $name);
// XXX
// 全角スペースを半角スペースに変換
$name = str_replace(' ', ' ', $name);
// スペースでキーワードを分割
$names = preg_split("/ +/", $name);
// 分割したキーワードを一つずつwhere文に追加
foreach ($names as $val) {
if (strlen($val) > 0) {
$where .= " AND ( name ILIKE ? OR comment3 ILIKE ?) ";
$ret = SC_Utils_Ex::sfManualEscape($val);
$arrval[] = "%{$ret}%";
$arrval[] = "%{$ret}%";
}
}
if (empty($arrval)) {
$arrval = array();
}
// 行数の取得
$linemax = count($objQuery->getAll("SELECT DISTINCT product_id " . "FROM vw_products_allclass AS allcls " . (!empty($where) ? " WHERE " . $where : ""), $arrval));
$this->tpl_linemax = $linemax;
// 何件が該当しました。表示用
// ページ送りの取得
$this->objNavi = new SC_PageNavi($this->tpl_pageno, $linemax, $disp_num, "fnNaviPage", NAVI_PMAX);
$strnavi = $this->objNavi->strnavi;
$strnavi = str_replace('onclick="fnNaviPage', 'onclick="form1.mode.value=\'' . '\'; fnNaviPage', $strnavi);
// 表示文字列
$this->tpl_strnavi = empty($strnavi) ? " " : $strnavi;
$startno = $this->objNavi->start_row;
// 開始行
// 取得範囲の指定(開始行番号、行数のセット)
$objQuery->setlimitoffset($disp_num, $startno);
// 表示順序
$objQuery->setorder($order);
// 検索結果の取得
$this->arrProducts = $objQuery->select($col, $from, $where, $arrval);
// 規格名一覧
$arrClassName = $objDb->sfGetIDValueList("dtb_class", "class_id", "name");
// 規格分類名一覧
$arrClassCatName = $objDb->sfGetIDValueList("dtb_classcategory", "classcategory_id", "name");
// 規格セレクトボックス設定
if ($disp_num == 15) {
for ($i = 0; $i < count($this->arrProducts); $i++) {
$this->lfMakeSelect($this->arrProducts[$i]['product_id'], $arrClassName, $arrClassCatName);
// 購入制限数を取得
$this->lfGetSaleLimit($this->arrProducts[$i]);
}
}
}
示例8: 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);
// トラックバック情報のカラムの取得(viewとの結合のため、テーブルをAと定義しておく)
$select = "A.trackback_id, A.product_id, A.blog_name, A.title, A.url, ";
$select .= "A.excerpt, A.status, A.create_date, A.update_date, B.name";
$from = "dtb_trackback AS A LEFT JOIN dtb_products AS B ON A.product_id = B.product_id ";
// 検索ワードの引き継ぎ
foreach ($_POST as $key => $val) {
if (ereg("^search_", $key)) {
$this->arrHidden[$key] = $val;
}
}
if (!isset($_POST['mode'])) {
$_POST['mode'] = "";
}
// トラックバックの削除
if ($_POST['mode'] == "delete") {
$objQuery->exec("UPDATE dtb_trackback SET del_flg = 1, update_date = now() WHERE trackback_id = ?", array($_POST['trackback_id']));
}
if ($_POST['mode'] == 'search' || $_POST['mode'] == 'csv' || $_POST['mode'] == 'delete') {
//削除されていない商品を検索
$where = "A.del_flg = 0 AND B.del_flg = 0";
$this->arrForm = $_POST;
//エラーチェック
$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_blog_name':
$val = ereg_replace(" ", "%", $val);
$val = ereg_replace(" ", "%", $val);
$where .= " AND A.blog_name ILIKE ? ";
$arrval[] = "%{$val}%";
break;
case 'search_blog_title':
$val = ereg_replace(" ", "%", $val);
$val = ereg_replace(" ", "%", $val);
$where .= " AND A.title ILIKE ? ";
$arrval[] = "%{$val}%";
break;
case 'search_blog_url':
$val = ereg_replace(" ", "%", $val);
$val = ereg_replace(" ", "%", $val);
$where .= " AND A.url ILIKE ? ";
$arrval[] = "%{$val}%";
break;
case 'search_status':
if (isset($_POST['search_status'])) {
$where .= " AND A.status = ? ";
$arrval[] = $val;
}
break;
case 'search_name':
$val = ereg_replace(" ", "%", $val);
$val = ereg_replace(" ", "%", $val);
$where .= " AND B.name ILIKE ? ";
$arrval[] = "%{$val}%";
break;
case 'search_product_code':
$val = ereg_replace(" ", "%", $val);
$val = ereg_replace(" ", "%", $val);
$where .= " AND B.product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? )";
$arrval[] = "%{$val}%";
break;
case 'search_startyear':
if (isset($_POST['search_startyear']) && isset($_POST['search_startmonth']) && isset($_POST['search_startday'])) {
$date = SC_Utils_Ex::sfGetTimestamp($_POST['search_startyear'], $_POST['search_startmonth'], $_POST['search_startday']);
$where .= " AND A.create_date >= ? ";
$arrval[] = $date;
}
break;
case 'search_endyear':
//.........这里部分代码省略.........