<commit_before><?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/


Route::get('json/get-ip-list/{id}',function($subnet_id){
	$list = SubnetIP::where('subnet_id',$subnet_id)
					->whereNull('user_id')
					->lists('ip','id');
	foreach($list as $id => $ip) {
		$ips[$id] = long2ip($ip);
	}
	return Response::json($ips);
});



Route::get('/',[
	'as'	=>		'welcome.user',
	function(){
		return Redirect::route('user-panel');
	}]);

Route::get('admin',[
	'as'	=>		'welcome.admin',
	function(){
		return Redirect::to('admin-panel');
	}]);

Route::get('admin/login',[
	'as'		=>		'admin.login.form',
	'uses'		=>		'LoginController@getAdmin',
	]);

Route::post('admin/login',[
	'as'		=>		'admin.login',
	'uses'		=>		'LoginController@postAdmin',
	]);

Route::get('internet/login',[
	'as'		=>		'internet.login.form',
	'uses'		=>		'LoginController@getInternetLogin'
	]);

Route::post('internet/login',[
	'as'		=>		'internet.login',
	'uses'		=>		'LoginController@postInternetLogin'
	]);
Route::post('internet/authorize',[
	'as'		=>		'internet.login.authorize',
	'uses'		=>		'LoginController@postAuthorizeInternetLogin',
	]);

Route::controller('/login','LoginController',[
	'getIndex'		=>		'user.login.form',
	'postLogin'		=>		'user.login',
	]);


/**
 * Prefix all the routes to User Panel with /user-panel/
 */
Route::group(['prefix'=>'user-panel','before'=>'isUser'], function(){
	

	Route::get('/',function(){
		return Redirect::route('user-panel');
	});

	Route::get('logout',[<commit_msg>added routes for user self-registration<commit_after><?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/


Route::get('json/get-ip-list/{id}',function($subnet_id){
	$list = SubnetIP::where('subnet_id',$subnet_id)
					->whereNull('user_id')
					->lists('ip','id');
	foreach($list as $id => $ip) {
		$ips[$id] = long2ip($ip);
	}
	return Response::json($ips);
});



Route::get('/',[
	'as'	=>		'welcome.user',
	function(){
		return Redirect::route('user-panel');
	}]);

Route::get('admin',[
	'as'	=>		'welcome.admin',
	function(){
		return Redirect::to('admin-panel');
	}]);

Route::get('admin/login',[
	'as'		=>		'admin.login.form',
	'uses'		=>		'LoginController@getAdmin',
	]);

Route::post('admin/login',[
	'as'		=>		'admin.login',
	'uses'		=>		'LoginController@postAdmin',
	]);

Route::get('internet/login',[
	'as'		=>		'internet.login.form',
	'uses'		=>		'LoginController@getInternetLogin'
	]);

Route::post('internet/login',[
	'as'		=>		'internet.login',
	'uses'		=>		'LoginController@postInternetLogin'
	]);
Route::post('internet/authorize',[
	'as'		=>		'internet.login.authorize',
	'uses'		=>		'LoginController@postAuthorizeInternetLogin',
	]);
Route::get('user/self-registration',[
	'as'		=>		'user.selfregistration.form',
	'uses'		=>		'LoginController@getSelfRegister'
	]);
Route::post('user/self-registration',[
	'as'		=>		'user.selfregistration',
	'uses'		=>		'LoginController@postSelfRegister'
	]);

Route::controller('/login','LoginController',[
	'getIndex'		=>		'user.login.form',
	'postLogin'		=>		'user.login',
	]);


/**
 * Prefix all the routes to User Panel with /user-panel/
 */
Route::group(['prefix'=>'user-panel','before'=>'isUser'], function(){
	

	Route::get('/',function(){
		return Redirect::route('user-panel');
	});

	Route::get('logout',[
{'fraction_non_alphanumeric': 0.28171878972794306, 'fraction_numerical': 0.0005085176709890668, 'mean_word_length': 3.308871851040526, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3790289', 'n_tokens_mistral': 1445, 'n_tokens_neox': 1394, 'n_words': 233}