<?php
/*
 * content/variable/Delete.class.php
 * 
 * CopyRight(C) 2010 Shopformer Development Team. All Right Reserved
 * URL: http://sourceforge.jp/projects/shopformer/
 * 
 * 
 * Mail: m_nakashima@users.sourceforge.jp
 * Auther: Masanori Nakashima
 * Last Update: 2010-07-22
 */
require_once( dirname(dirname(dirname(__FILE__)))
	.DIRECTORY_SEPARATOR.'system'
	.DIRECTORY_SEPARATOR.'login'
	.DIRECTORY_SEPARATOR.'ModuleBase.class.php');
require_once( dirname(dirname(__FILE__))
	.DIRECTORY_SEPARATOR.'Variable.class.php');
class content_variable_Delete extends system_login_ModuleBase {
	function content_variable_Delete() {
	}
	function execute( & $request ) {
		$variableObject			= new content_Variable($request);
		if( !$request->isError() ) {
			$variableKeyArray		= $request->getParam('variable_key','post','array');
			if( is_array($variableKeyArray) ) {
				foreach( $variableKeyArray as $num => $key ) {
					$variableObject->delete( $request, $key );
				}
			}
			$variableObject->_save( $request );
			$request->setAttribute('content.variable.VariableObject',$variableObject );
		}
	}
}
?>