Source for file LC_Page_Admin_System_Delete.php
Documentation is available at LC_Page_Admin_System_Delete.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2011 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
require_once CLASS_EX_REALDIR . 'page_extends/admin/LC_Page_Admin_Ex.php';
* @author LOCKON CO.,LTD.
* @version $Id: LC_Page_Admin_System_Delete.php 20970 2011-06-10 10:27:24Z Seasoft $
if ($objFormParam->checkError()
|| !SC_Utils_ex::sfIsInt($id = $objFormParam->getValue('id'))) {
GC_Utils_Ex::gfPrintLog("error id=$id");
SC_Utils_Ex::sfDispError(INVALID_MOVE_ERRORR);
$id = $objFormParam->getValue('id');
$url = $this->getLocation(ADMIN_SYSTEM_URLPATH)
. '?pageno=' . $objFormParam->getValue('pageno');
SC_Response_Ex::sendRedirect($url);
* @param object $objFormParam
* @param array $arrParams $_GET値
function initParam(&$objFormParam, &$arrParams) {
$objFormParam->addParam('pageno', 'pageno', INT_LEN, '', array('NUM_CHECK', 'MAX_LENGTH_CHECK', 'EXIST_CHECK'));
$objFormParam->addParam('id', 'id', INT_LEN, '', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
$objFormParam->setParam($arrParams);
* @param integer $id 削除対象のmember_id
$objQuery = & SC_Query_Ex::getSingletonInstance();
* @param object $objQuery
* @param integer $id 削除対象のmember_id
* @return void|UPDATEの結果フラグ
$where1 = "member_id = ?";
$rank = $objQuery->get('rank', "dtb_member", $where1, array($id));
$where2 = "rank > ? AND del_flg <> 1";
// UPDATEの実行 - 削除したレコードより上のランキングを下げてRANKの空きを埋める。
return $objQuery->update("dtb_member", array(), $where2, array($rank), array('rank' => 'rank-1'));
* @param object $objQuery
* @param integer $id 削除対象のmember_id
* @return void|UPDATEの結果フラグ
$where = "member_id = ?";
// UPDATEの実行 - ランクを最下位にする、DELフラグON
return $objQuery->update("dtb_member", $sqlVal, $where, array($id));
Documentation generated on Fri, 24 Feb 2012 14:01:48 +0900 by Seasoft
|