<?php

namespace Main\Src;

use Dever;

class Data
{
	# 启用测试服务
	public function test()
	{
		return Dever::test();
	}
	
	# 启用代理服务
	public function proxy()
	{
		$user = Dever::load('passport/user.data');
		
		if (!$user) {
			//Dever::abert('请先登录');
		}
		
		return Dever::proxy();
	}
	
	# 启用安装服务
	public function setup()
	{
		return Dever::setup();
	}

	public function page($id)
	{
		if ($id < 5) {
			$url = 'javascript:;';
		} else {
			$url = Dever::url("page?id=" . $id, "main");
		}

		return $url;
	}
}
