<?php
class helper{
	function __construct(){
		//开启游客支付流程
		//value:default(默認方式),quick（一頁支付）
		$_SESSION['checkout_process_style']="quick";
		
	}
	function Run(){
	}
	function articleDate($data){
		
			$date=date_create($data['archives_date_added']);
			$m="<span>".date_format($date,"M")."</span>";
			$d="<strong>".date_format($date,"d")."</strong>";
			$y="<span>".date_format($date,"Y")."</span>";
			$data['archives_date_added']=$m.$d.$y;
	
		
		return $data;
	}
	//会员中心图标
	function accountIcon($data=[]){
		switch($data['page']){
			case FILENAME_ACCOUNT:
				$data['icon']="<i class='fas fa-tachometer-alt'></i>";
			break;
			case FILENAME_ACCOUNT_HISTORY:
				$data['icon']="<i class='fa fa-cart-arrow-down'></i>";
			break;
			case FILENAME_ACCOUNT_EDIT:
				$data['icon']="<i class='fa fa-user'></i>";
			break;
			case FILENAME_ADDRESS_BOOK:
				$data['icon']="<i class='fas fa-map-marker-alt'></i>";
			break;
			case FILENAME_ACCOUNT_PASSWORD:
				$data['icon']="<i class='fa fa-key'></i>";
			break;
			case FILENAME_ACCOUNT_NEWSLETTERS:
				$data['icon']="<i class='fa fa-rss-square'></i>";
			break;
			case FILENAME_ACCOUNT_NOTIFICATIONS:
				$data['icon']="<i class='far fa-bell'></i>";
			break;
			case FILENAME_LOGOFF:
				$data['icon']="<i class='fas fa-sign-out-alt'></i>";
			break;
		}
		return $data;
	}
}
?>