<commit_before><?php
require_once('base_editor.php');
/**
 *	DRAFT.
 *	The primary controller for draft capabilities and functionlaity.
 *
 *	NOTE: This class contains draft functionlaity originally developed by <NAME> and 
 *	Published as part of the StasLab Mod for Out of the Park Baseball.
 *	(http://www.ootpdevelopments.com/board/ootp-mods-database-tools/185408-statslab-sql-utilities-ootpx.html)
 *
 *	@author			<NAME>
 *	@author			<NAME>
 *	@dateCreated	03/23/10
 *	@lastModified	07/16/10
 *
 */
class draft extends BaseEditor {

	/*--------------------------------
	/	VARIABLES
	/-------------------------------*/
	/**
	 *	SLUG.
	 *	@var $_NAME:Text
	 */
	var $_NAME = 'draft';
	/**
	 *	LEAGUE ID.
	 *	@var $league_id:Int
	 */
	var $league_id = -1;
	/*--------------------------------
	/	C'TOR
	/-------------------------------*/
	/**
	 *	Creates a new instance of draft.
	 */
	public function draft() {
		parent::BaseEditor();
	}
	/**
	 *	INDEX.
	 *	The default handler when the controller is called.
	 */
	public function index() { 
		$this->getURIData(); 
		redirect('draft/info/'.$this->uriVars['id']);
	}
	/*---------------------------------------
	/	CONTROLLER SUBMISSION HANDLERS
	/--------------------------------------*/
	/**
	 *	INIT.
	 *	Creates and instaitates the basic properties required
	 *	by this controller.
	 */
	function init() {
		parent::init();
		$this->modelName = 'draft_model';
		
		$this->enqueStyle('content.css');
		
		$this->getURIData();
		if (!$this->isAjax() && isset($this->uriVars['league_id'])) {
			$this->load->model($this->modelName,'dataModel');
			$this->loadModel();
			$this->load->model('league_model');
			$this->league_model->load($this->uriVars['league_id']);
			
			//print("ID = ".$this->uriVars['id']."<br />");
			if ($this->league_model->id != -1 && $this->league_model->access_type == -1) {
				$isAdmin = ($this->params['accessLevel'] == ACCESS_ADMINISTRATE) ? true : false;
				$isCommish = $this->league_model->userIsCommish($this->params['currUser']) ? true: false;
				if (!$isAdmin && !$isCommish) {
					if (!$this->league_model->userHasAccess($this->params['currUser'])) {
						redirect('/league/privateLeague/'.$this->uriVars['league_id']);
					}
				}
			}
		}
		$this->views['EDIT'] = 'draft/draft_editor';
		$this->views['VIEW'] = 'draft/draft_info';
		$this->views['FAIL'] = 'draft/draft_message';
		$this->views['SUCCESS'] = 'draft/draft_message';
		$this->views['SELECT'] = 'draft/draft_selection';
		$this->views['HISTORY'] = 'draft/draft_history';
		$this->views['ORDER'] = 'draft/draft_order';
		$this->views['TEAM_SETTINGS'] = 'draft/draft_team_settings';
		
		$this->restrictAccess = true;
		$this->minAccessLevel = ACCESS_WRITE;
		
		$this->debug = true; 
	}
	/*--------------------------------
	/	PRIVATE FUNCTIONS
	/-------------------------------*/
	/**
	 *	DRAFT ADMIN.
	 *	Creates and instaitates the basic properties required
	 *	by this controller.
	 */
	public function admin() {
		if ($this->params['loggedIn']) {
			$this->getURIData();<commit_msg>Draft Debug Status Change<commit_after><?php
require_once('base_editor.php');
/**
 *	DRAFT.
 *	The primary controller for draft capabilities and functionlaity.
 *
 *	NOTE: This class contains draft functionlaity originally developed by <NAME> and 
 *	Published as part of the StasLab Mod for Out of the Park Baseball.
 *	(http://www.ootpdevelopments.com/board/ootp-mods-database-tools/185408-statslab-sql-utilities-ootpx.html)
 *
 *	@author			<NAME>
 *	@author			<NAME>
 *	@dateCreated	03/23/10
 *	@lastModified	07/16/10
 *
 */
class draft extends BaseEditor {

	/*--------------------------------
	/	VARIABLES
	/-------------------------------*/
	/**
	 *	SLUG.
	 *	@var $_NAME:Text
	 */
	var $_NAME = 'draft';
	/**
	 *	LEAGUE ID.
	 *	@var $league_id:Int
	 */
	var $league_id = -1;
	/*--------------------------------
	/	C'TOR
	/-------------------------------*/
	/**
	 *	Creates a new instance of draft.
	 */
	public function draft() {
		parent::BaseEditor();
	}
	/**
	 *	INDEX.
	 *	The default handler when the controller is called.
	 */
	public function index() { 
		$this->getURIData(); 
		redirect('draft/info/'.$this->uriVars['id']);
	}
	/*---------------------------------------
	/	CONTROLLER SUBMISSION HANDLERS
	/--------------------------------------*/
	/**
	 *	INIT.
	 *	Creates and instaitates the basic properties required
	 *	by this controller.
	 */
	function init() {
		parent::init();
		$this->modelName = 'draft_model';
		
		$this->enqueStyle('content.css');
		
		$this->getURIData();
		if (!$this->isAjax() && isset($this->uriVars['league_id'])) {
			$this->load->model($this->modelName,'dataModel');
			$this->loadModel();
			$this->load->model('league_model');
			$this->league_model->load($this->uriVars['league_id']);
			
			//print("ID = ".$this->uriVars['id']."<br />");
			if ($this->league_model->id != -1 && $this->league_model->access_type == -1) {
				$isAdmin = ($this->params['accessLevel'] == ACCESS_ADMINISTRATE) ? true : false;
				$isCommish = $this->league_model->userIsCommish($this->params['currUser']) ? true: false;
				if (!$isAdmin && !$isCommish) {
					if (!$this->league_model->userHasAccess($this->params['currUser'])) {
						redirect('/league/privateLeague/'.$this->uriVars['league_id']);
					}
				}
			}
		}
		$this->views['EDIT'] = 'draft/draft_editor';
		$this->views['VIEW'] = 'draft/draft_info';
		$this->views['FAIL'] = 'draft/draft_message';
		$this->views['SUCCESS'] = 'draft/draft_message';
		$this->views['SELECT'] = 'draft/draft_selection';
		$this->views['HISTORY'] = 'draft/draft_history';
		$this->views['ORDER'] = 'draft/draft_order';
		$this->views['TEAM_SETTINGS'] = 'draft/draft_team_settings';
		
		$this->restrictAccess = true;
		$this->minAccessLevel = ACCESS_WRITE;
		
		$this->debug = false; 
	}
	/*--------------------------------
	/	PRIVATE FUNCTIONS
	/-------------------------------*/
	/**
	 *	DRAFT ADMIN.
	 *	Creates and instaitates the basic properties required
	 *	by this controller.
	 */
	public function admin() {
		if ($this->params['loggedIn']) {
			$this->getURIData();
{'fraction_non_alphanumeric': 0.26487461071955415, 'fraction_numerical': 0.006884117357810195, 'mean_word_length': 2.5068965517241377, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 95, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5087502', 'n_tokens_mistral': 2261, 'n_tokens_neox': 2010, 'n_words': 360}