0) { $user = new \App\Models\User(Auth::userid()); Router::get('/lk', 'ProfileController@lk'); Router::get('/lk/upload', 'ProfileController@upload'); Router::get('/lk/history', 'ProfileController@lkhistory'); Router::get('/lk/profile', 'ProfileController@lkprofile'); Router::get('/fav_authors', 'MainController@favauthors'); Router::get('/search', 'SearchController@i'); Router::post('/api/upload', 'ApiController@upload'); Router::post('/api/profile/update', 'ApiController@updateprofile'); Router::post('/api/photo/comment', 'ApiController@photocomment'); Router::get('/api/subscribe', 'ApiController@subscribeuser'); Router::post('/api/photo/getcomments/$id', 'ApiController@photocommentload'); Router::get('/api/photo/vote', 'ApiController@photovote'); Router::get('/api/photo/checkall', 'ApiController@checkallphotos'); Router::get('/api/photo/comment/rate', 'ApiController@photocommentvote'); Router::post('/api/photo/comment/$id/edit', 'ApiController@photocommentedit'); if ($user->i('admin') > 0) { Router::any('/admin', 'AdminController@index'); Router::any('/api/admin/images/setvisibility', 'ApiController@adminsetvis'); Router::any('/api/admin/createnews', 'ApiController@admincreatenews'); Router::any('/api/admin/loadnews', 'ApiController@adminloadnews'); } Router::get('/logout', 'MainController@logout'); Router::get('/404', 'ExceptionRegister@notfound'); } else { Router::redirect('/login?return='.$_SERVER['HTTP_REFERER']); } } }