<commit_before><?php
class Main extends Controller {
	function index() {
		if ($this->auth)
			$this->dashboard();
		else
			$this->render();
	}
	function noAuth() {
		$this->redirect();
	}
	function login() {
		if ($this->form['username'] == 'shnergle' &&
			$this->form['password'] == <PASSWORD>')
				$this->session['auth'] = true;
		else
			$this->flash('<strong>Wrong credentials!</strong>', 'danger');
		$this->redirect();
	}
	function logout() {
		session_unset();
		session_destroy();
		$this->redirect();
	}
	function dashboard() {
    $this->counts = array('Media' => $this->db_count('media'),
                          'Posts' => $this->db_count('posts'),
                          'PostLikes' => $this->db_count('post_likes'),
                          'PostReports' => $this->db_count('post_reports'),
                          'PostShares' => $this->db_count('post_shares'),
                          'PostViews' => $this->db_count('post_views'),
                          'Promotions' => $this->db_count('promotions'),
                          'PromotionRedemptions' => $this->db_count('promotion_redemptions'),
                          'Users' => $this->db_count('users'),
                          'UserSearches' => $this->db_count('user_searches'),
                          'Venues' => $this->db_count('venues'),
                          'VenueCategories' => $this->db_count('venue_categories'),
                          'VenueFollowers' => $this->db_count('venue_followers'),
                          'VenueLoads' => $this->db_count('venue_loads'),
                          'VenueRsvps' => $this->db_count('venue_rsvps'),
                          'VenueShares' => $this->db_count('venue_shares'),
                          'VenueViews' => $this->db_count('venue_views'));
    $this->app_versions = $this->db_result('SELECT app_version, COUNT(id) AS no FROM users GROUP BY app_version');
    $this->iphone_models = $this->db_result('SELECT iphone_model, COUNT(id) AS no FROM users GROUP BY iphone_model');
    $this->iphone_models_h = array('iPhone1,1' => 'iPhone',
                                   'iPhone1,2' => 'iPhone 3G',
                                   'iPhone2,1' => 'iPhone 3GS',
                                   'iPhone3,1' => 'iPhone 4 GSM',
                                   'iPhone3,2' => 'iPhone 4 GSM (A)',
                                   'iPhone3,3' => 'iPhone 4 CDMA',
                                   'iPhone4,1' => 'iPhone 4S',
                                   'iPhone5,1' => 'iPhone 5',
                                   'iPhone5,2' => 'iPhone 5',
                                   'iPad1,1' => 'iPad',
                                   'iPad2,1' => 'iPad 2 WiFi',
                                   'iPad2,2' => 'iPad 2 GSM',
                                   'iPad2,3' => 'iPad 2 CDMA',
                                   'iPad2,4' => 'iPad 2 WiFi (A)',
                                   'iPad2,5' => 'iPad mini WiFi',
                                   'iPad2,6' => 'iPad mini GSM',
                                   'iPad2,7' => 'iPad mini CDMA',
                                   'iPad3,1' => 'iPad 3 WiFi',
                                   'iPad3,2' => 'iPad 3 CDMA',
                                   'iPad3,3' => 'iPad 3 Global',
                                   'iPad3,4' => 'iPad WiFi',
                                   'iPad3,5' => 'iPad GSM',
                                   'iPad3,6' => 'iPad Global',
                                   'iPod1,1' => 'iPod touch 1G',
                                   'iPod2,1' => 'iPod touch 2G',
                                   'iPod3,1' => 'iPod touch 3G',<commit_msg>/test<commit_after><?php
class Main extends Controller {
	function index() {
		if ($this->auth)
			$this->dashboard();
		else
			$this->render();
	}
	function noAuth() {
		$this->redirect();
	}
	function login() {
		if ($this->form['username'] == 'shnergle' &&
			$this->form['password'] == <PASSWORD>')
				$this->session['auth'] = true;
		else
			$this->flash('<strong>Wrong credentials!</strong>', 'danger');
		$this->redirect();
	}
	function logout() {
		session_unset();
		session_destroy();
		$this->redirect();
	}
	function dashboard() {
    $this->counts = array('Media' => $this->db_count('media'),
                          'Posts' => $this->db_count('posts'),
                          'PostLikes' => $this->db_count('post_likes'),
                          'PostReports' => $this->db_count('post_reports'),
                          'PostShares' => $this->db_count('post_shares'),
                          'PostViews' => $this->db_count('post_views'),
                          'Promotions' => $this->db_count('promotions'),
                          'PromotionRedemptions' => $this->db_count('promotion_redemptions'),
                          'Users' => $this->db_count('users'),
                          'UserSearches' => $this->db_count('user_searches'),
                          'Venues' => $this->db_count('venues'),
                          'VenueCategories' => $this->db_count('venue_categories'),
                          'VenueFollowers' => $this->db_count('venue_followers'),
                          'VenueLoads' => $this->db_count('venue_loads'),
                          'VenueRsvps' => $this->db_count('venue_rsvps'),
                          'VenueShares' => $this->db_count('venue_shares'),
                          'VenueViews' => $this->db_count('venue_views'));
    $this->app_versions = $this->db_result('SELECT app_version, COUNT(id) AS no FROM users GROUP BY app_version');
    $this->iphone_models = $this->db_result('SELECT iphone_model, COUNT(id) AS no FROM users GROUP BY iphone_model');
    $this->iphone_models_h = array('iPhone1,1' => 'iPhone',
                                   'iPhone1,2' => 'iPhone 3G',
                                   'iPhone2,1' => 'iPhone 3GS',
                                   'iPhone3,1' => 'iPhone 4 GSM',
                                   'iPhone3,2' => 'iPhone 4 GSM (A)',
                                   'iPhone3,3' => 'iPhone 4 CDMA',
                                   'iPhone4,1' => 'iPhone 4S',
                                   'iPhone5,1' => 'iPhone 5 GSM',
                                   'iPhone5,2' => 'iPhone 5 Global',
                                   'iPad1,1' => 'iPad',
                                   'iPad2,1' => 'iPad 2 WiFi',
                                   'iPad2,2' => 'iPad 2 GSM',
                                   'iPad2,3' => 'iPad 2 CDMA',
                                   'iPad2,4' => 'iPad 2 WiFi (A)',
                                   'iPad2,5' => 'iPad mini WiFi',
                                   'iPad2,6' => 'iPad mini GSM',
                                   'iPad2,7' => 'iPad mini CDMA',
                                   'iPad3,1' => 'iPad 3 WiFi',
                                   'iPad3,2' => 'iPad 3 CDMA',
                                   'iPad3,3' => 'iPad 3 Global',
                                   'iPad3,4' => 'iPad WiFi',
                                   'iPad3,5' => 'iPad GSM',
                                   'iPad3,6' => 'iPad Global',
                                   'iPod1,1' => 'iPod touch 1G',
                                   'iPod2,1' => 'iPod touch 2G',
                                   'iPod3,1' => 'iPod touch 3G',
{'fraction_non_alphanumeric': 0.15583186917150965, 'fraction_numerical': 0.01892147587511826, 'mean_word_length': 1.2643818849449204, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 161, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 50, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7618293', 'n_tokens_mistral': 2300, 'n_tokens_neox': 2107, 'n_words': 377}