<?php
	require_once "pageBase.php";

	class _memberlogout extends pageBase{
		public function load(){
			if(!isset($_SESSION["CustomerID"])){
				parent::alert("Bạn chưa đăng nhập!!","/");
			}

	 		$this->loadData();
			
			parent::load();
		}
		
		public function loadData(){
			//加載模板
			parent::loadTemplateFile("templates/".$this->registry->webTemplates."/memberlogout.html");
			
			//會員資料//
			unset($_SESSION["CustomerID"]);
			unset($_SESSION["CustomerLevel"]);
			unset($_SESSION["LoginName"]);
			unset($_SESSION["CustomerName"]);
			unset($_SESSION["FacebookID"]);
			//
			parent::alert2("Đã đăng xuất!","/");

			//父類方法
			parent::loadData();
		}
	}

	$page = new _memberlogout();
	$page->load();
	$page->render();
?>