getBinaryTexture('skin'); } else if ($_GET['type'] == "cape") { header('Content-Type: image/png'); echo $user->getBinaryTexture('cape'); } else { header('Content-type: application/json'); echo $user->getJsonProfile(); } } else { utils::raise(1, 'Illegal parameters.'); } } else { session_start(); if (utils::getValue('uname', $_COOKIE) && utils::getValue('token', $_COOKIE)) { $user = new user($_COOKIE['uname']); if ($_COOKIE['token'] == $user -> getToken()) { $_SESSION['uname'] = $_COOKIE['uname']; $_SESSION['token'] = $user -> getToken(); } } /** * 越写越像 MVC 。。。路由了以后就不得不视图层分离了啊。。等有时间用模板吧 * * 这个入口也是神 TM 丑(扶额 */ ?>