<?php

/*
  PHP version 5
  Copyright (c) 2002-2018 ECISP.CN、EarcLink.COM
  警告：这不是一个免费的软件，请在许可范围内使用，请尊重知识产权，侵权必究，举报有奖
  作者：黄祥云 E-mail:6326420@qq.com  QQ:6326420 TEL:18665655030 / 13797552220
*/



namespace admin_application\link;

class UserMainLink {

	public static function getLink($linkcode = false) {

		$action = null;

		$action_key = array();
		switch ($linkcode) {

			case 'login':
				$action = 'Portal/login';
				$action_key['act'] = $action;
				break;

			case 'login_verify':
				$action = 'Portal/userLoginVerify';
				$action_key['act'] = $action;
				break;

			case 'center':
				$action_key['act'] = 'MainCenter/MainPage';
				$action_key['app'] = 'Admin/Portal/mainCenter';
				break;

			case 'quit':
				$action = 'Portal/mainQuit';
				$action_key['act'] = $action;
				$action_key['outtype'] = 'mini';
				break;

			case 'mini':
				$action = 'Portal/loginMini';
				$action_key['act'] = $action;
				break;

			case 'verification':
				$action = 'Portal/verification_code';
				$action_key['act'] = $action;
				break;
		}
		return linkOut($action_key);
	}

	public static function get_user_link_array($linkcode = false, $array = array()) {
		$link_array = array();

		$action_key['act'] = 'AdminUser/editPassword';
		$link_array['editpassword'] = linkOut($action_key);

		$action_key['act'] = 'UpgradeSoft/entranceUpgradeSoft';
		$link_array['UpgradeSoft'] = linkOut($action_key);

		$action_key['act'] = 'CacheMange/entranceCacheMange';
		$link_array['editCacheManage'] = linkOut($action_key);

		$action_key['act'] = 'AdminUserLog/editAdminUserLog';
		$link_array['edituserlog'] = linkOut($action_key);

		$action_key['act'] = 'Portal/viewSoftInfo';
		$link_array['about'] = linkOut($action_key);
		return $linkcode ? $link_array[$linkcode] : $link_array;
	}

}
