<?php
require_once(SITE_LOGICS . 'withdraw/logic.php');

class ControlWithdraw extends LogicWithdraw {

	/*-------------------------------------------------------------------------
	* @ メンバ変数
	-------------------------------------------------------------------------*/

	/*-------------------------------------------------------------------------
	* @function_name: ロジックのコンストラクタ
	* @parameter	: なし
	* @return		: なし
	-------------------------------------------------------------------------*/
	function __construct() {
		parent::__construct();
	}

	/*-------------------------------------------------------------------------
	* @function_name: コントロールパネルシステム動画データ編集ロジック（各クラス共通）
	* @parameter	: なし
	* @return		: なし
	-------------------------------------------------------------------------*/
	function action() {

		// 変数宣言部
		$result = NO_STRING;

		try {

			// アクション実行
			$result = $this -> logic();

			// 画面の表示
			if($this -> getType() == TYPE_INPUT) {					// 入力画面
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_INPUT_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_CONFIRM) {			// 確認画面
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_CONFIRM_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_COMPLETE) {		// 完了画面
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_COMPLETE_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_BACK) {			// 戻る画面（入力画面へ）
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_INPUT_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_LOCKED) {			// 戻る画面（入力画面へ）
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_LOCKED', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_CARD_INPUT) {		// カード入力
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_CARD_INPUT_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_CARD_CONFIRM) {	// カード確認
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_CARD_CONFIRM_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_CARD_COMPLETE) {	// カード完了
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_CARD_COMPLETE_PATH', $this -> dispHTML()));
			}  else if($this -> getType() == TYPE_LOCAL_INPUT) {	// カード完了
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_LOCALINPUT_INPUT_PATH', $this -> dispHTML()));
			}  else if($this -> getType() == TYPE_LOCAL_BACK) {	// local back
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_LOCALINPUT_INPUT_PATH', $this -> dispHTML()));
			}  else if($this -> getType() == TYPE_LOCAL_CONFIRM) {	// local back
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_LOCALINPUT_CONFIRM', $this -> dispHTML()));
			}   else if($this -> getType() == TYPE_LOCAL_BACK_SUCCESS) { // RETURN SUCCESS
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_LOCALRETURN_SUCCESS', $this -> dispHTML()));
			}   else if($this -> getType() == TYPE_LOCAL_BACK_FAILED) {	// RETURN FAILED
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_LOCALRETURN_FAILED', $this -> dispHTML()));
			}   else if($this -> getType() == TYPE_LOCAL_BACK_LOCKED) {	// RETURN FAILED
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_LOCAL_LOCKED', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_FLAT3_INPUT) {					// FLAT3 input
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_FLAT3_INPUT_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_FLAT3_CONFIRM) {			// FLAT3 confirm
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_FLAT3_CONFIRM_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_FLAT3_COMPLETE) {		// 完了画面
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_FLAT3_COMPLETE_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_FLAT3_BACK) {			// FLAT3 back
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_FLAT3_INPUT_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_FLAT3_LOCKED) {			// FLAT3 back
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_FLAT3_LOCKED_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_WITHDRAW_H2P_INPUT) {					// H2P input
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_H2P_INPUT_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_WITHDRAW_H2P_CONFIRM) {			// H2P confirm
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_H2P_CONFIRM_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_WITHDRAW_H2P_SUCCESS) {		// H2P success
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_H2P_SUCCESS_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_WITHDRAW_H2P_FAIL) {			// H2P fail
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_H2P_FAIL_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_WITHDRAW_H2P_LOCKED) {			// h2p locked
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_H2P_LOCKED_PATH', $this -> dispHTML()));
			}else if($this -> getType() == TYPE_WITHDRAW_H2P_BACK) {					// H2P input
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_H2P_INPUT_PATH', $this -> dispHTML()));
			} else if($this -> getType() == TYPE_WITHDRAW_NOTICE_KYC) {	// RETURN FAILED
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_NOTICE_KYC', $this -> dispHTML()));
			} else {
				require_once($this -> getUserHTML('TEMPLATE_WITHDRAW_STEP1_PATH', $this -> dispHTML()));
			}

		} catch (Exception $e) {

			if($e -> getMessage() != NO_STRING) {
				require_once($this -> getUserHTML('TEMPLATE_TMP_PROCESS_INVALID_PATH', $this -> dispHTML()));
			} else {
				header('Location: /' . $this ->  getLangage() . '/login');
			}
		}
	}
}
?>
