<commit_before><?php
class admin extends CI_Controller {
	function __construct() {
		global $dd, $acao;
		parent::__construct();

		$this -> lang -> load("app", "portuguese");
		$this -> load -> library('form_validation');
		$this -> load -> database();
		$this -> load -> helper('form');
		$this -> load -> helper('form_sisdoc');
		$this -> load -> helper('url');
		$this -> load -> library('session');
		$this -> load -> library("nuSoap_lib");

		date_default_timezone_set('America/Sao_Paulo');
		/* Security */
		$this -> security();
	}

	function security() {

		/* Seguranca */
		$this -> load -> model('login/josso_login_pucpr');
		$this -> josso_login_pucpr -> security();
	}

	function cab() {
		/* Carrega classes adicionais */
		$css = array();
		$js = array();
		array_push($css, 'style_cab.css');
		array_push($css, 'switch_onoff.css');
		array_push($css, 'form_sisdoc.css');
		array_push($js, 'js_cab.js');
		array_push($js, 'unslider.min.js');

		/* transfere para variavel do codeigniter */
		$data['css'] = $css;
		$data['js'] = $js;

		/* Menu */
		$menus = array();
		array_push($menus, array('Perfis', 'index.php/admin/logins/'));
		$data['menu'] = 1;
		$data['menus'] = $menus;

		/* Monta telas */
		$this -> load -> view('header/header', $data);
		$data['title_page'] = 'Administrao';

		if (perfil('#ADM')) {
			$data['menu'] = 1;
			$data['menus'] = $menus;
		} else {
			$data['menu'] = 0;
			$data['menus'] = $menus;
		}
		$this -> load -> view('header/cab', $data);
		$this -> load -> view('header/content_open');

		if (perfil('#ADM', 1) == false) {
			redirect(base_url('index.php'));
			return (0);
		}
	}
	
	function checar_cpf($pg=0)
		{
			$this -> load -> model('usuarios');
			$this -> cab();
			
			$tela = $this->usuarios->checar_cpf($pg);
			echo $tela;
		}
	function cracha_duplicados()
		{
			$this -> load -> model('usuarios');
			$this -> cab();
			
			$sx = $this->usuarios->cracha_duplicados();
			$data['content'] = $sx;
			$this->load->view('content',$data);			
		}
	function checar_cracha_aluno_ic()
		{
			$this -> load -> model('webservice/ws_sga');
			$this -> load -> model('usuarios');
			$this -> cab();
						
			$sql = "SELECT distinct ic_aluno_cracha FROM ic_aluno 
						left join us_usuario on us_cracha = ic_aluno_cracha 
					where us_nome is null and ic_aluno_cracha <> ''";
			$rlt = $this->db->query($sql);
			$rlt = $rlt->result_array();
			
			$sx = '';
			
			for ($r=0;$r < count($rlt);$r++)
				{
					$line = $rlt[$r];
					$cracha = $line['ic_aluno_cracha'];
					
					$sx .= '<br>->'.$cracha;
					$this->ws_sga->findStudentByCracha($cracha,1);
					$sx .= 'ok';					
				}
			$data['content'] = $sx;
			$this->load->view('content',$data);
			
			
		}

	function index() {
		$this -> cab();
		$data = array();

		/* Menu de botes na tela Admin*/
		$menu = array();
		array_push($menu, array('Parceiros', 'Parceiros da PUCPR', 'ITE', '/parceiro'));
		array_push($menu, array('Idiomas', 'Idiomas do Sistema', 'ITE', '/idioma'));

		array_push($menu, array('Usurios', 'Integrao SGA/CIP Estudantes', 'ITE', '/usuario/integracao_sga'));
		array_push($menu, array('Usurios', 'Perfil de usurio do Sistema', 'ITE', '/perfil'));
		array_push($menu, array('Unidades', 'Unidades da PUCPR', 'ITE', '/unidade'));
		array_push($menu, array('Instituies', 'Instituies de ensino', 'ITE', '/instituicao'));

		array_push($menu, array('Iniciao Cientfica', 'Manuteno de Bolsas', 'ITE', '/admin/ic'));
		array_push($menu, array('Iniciao Cientfica', 'Manuteno bolsas/modalidade', 'ITE', '/admin/ic_modal_bolsas'));
		
		array_push($menu, array('Iniciao Cientfica', 'ID/usuarios bas bolsas', 'ITE', '/admin/ic_id'));
		array_push($menu, array('Iniciao Cientfica', 'Vinculo Usurios / Bolsas', 'ITE', '/admin/checar_cracha_aluno_ic'));
		array_push($menu, array('Iniciao Cientfica', 'Finalizar projetos do ano anterior', 'ITE', '/admin/finalizar_ic'));
		array_push($menu, array('Iniciao Cientfica', 'Converter Pasta GED', 'ITE', '/admin/ged_ic'));
		
		array_push($menu, array('SEMIC', 'Salas de Apresentao', 'ITE', '/semic/salas'));
		array_push($menu, array('SEMIC', 'Trabalhos', 'ITE', '/semic/trabalhos_row'));
		array_push($menu, array('SEMIC', 'Correo UTF8', 'ITE', '/semic/trabalhos_correcao'));
		array_push($menu, array('Usurios', 'Limpa Curso (Turnos)', 'ITE', '/admin/limpa_curso'));
		array_push($menu, array('Usurios', 'Cruzar dados do professor', 'ITE', '/admin/inporta_professor'));
		array_push($menu, array('Usurios', 'Ajustar/Validar CPF', 'ITE', '/admin/checar_cpf'));
		array_push($menu, array('Usurios', 'Crachas duplicados', 'ITE', '/admin/cracha_duplicados'));

		/*View principal*/
		$data['menu'] = $menu;
		$data['title_menu'] = 'Menu Administrao';
		$this -> load -> view('header/main_menu', $data);

		/*Fecha */ 		/*Gera rodap*/
		$this -> load -> view('header/content_close');
		$this -> load -> view('header/foot', $data);
	}

	function inporta_professor() {<commit_msg>At.02.12.2015.a<commit_after><?php
class admin extends CI_Controller {
	function __construct() {
		global $dd, $acao;
		parent::__construct();

		$this -> lang -> load("app", "portuguese");
		$this -> load -> library('form_validation');
		$this -> load -> database();
		$this -> load -> helper('form');
		$this -> load -> helper('form_sisdoc');
		$this -> load -> helper('url');
		$this -> load -> library('session');
		$this -> load -> library("nuSoap_lib");

		date_default_timezone_set('America/Sao_Paulo');
		/* Security */
		$this -> security();
	}

	function security() {

		/* Seguranca */
		$this -> load -> model('login/josso_login_pucpr');
		$this -> josso_login_pucpr -> security();
	}

	function cab() {
		/* Carrega classes adicionais */
		$css = array();
		$js = array();
		array_push($css, 'style_cab.css');
		array_push($css, 'switch_onoff.css');
		array_push($css, 'form_sisdoc.css');
		array_push($js, 'js_cab.js');
		array_push($js, 'unslider.min.js');

		/* transfere para variavel do codeigniter */
		$data['css'] = $css;
		$data['js'] = $js;

		/* Menu */
		$menus = array();
		array_push($menus, array('Perfis', 'index.php/admin/logins/'));
		$data['menu'] = 1;
		$data['menus'] = $menus;

		/* Monta telas */
		$this -> load -> view('header/header', $data);
		$data['title_page'] = 'Administrao';

		if (perfil('#ADM')) {
			$data['menu'] = 1;
			$data['menus'] = $menus;
		} else {
			$data['menu'] = 0;
			$data['menus'] = $menus;
		}
		$this -> load -> view('header/cab', $data);
		$this -> load -> view('header/content_open');

		if (perfil('#ADM', 1) == false) {
			redirect(base_url('index.php'));
			return (0);
		}
	}
	
	function checar_cpf($pg=0)
		{
			$this -> load -> model('usuarios');
			$this -> cab();
			
			$tela = $this->usuarios->checar_cpf($pg);
			echo $tela;
		}
	function cracha_duplicados()
		{
			$this -> load -> model('usuarios');
			$this -> cab();
			
			$sx = $this->usuarios->cracha_duplicados();
			$data['content'] = $sx;
			$this->load->view('content',$data);			
		}
	function checar_cracha_aluno_ic()
		{
			$this -> load -> model('webservice/ws_sga');
			$this -> load -> model('usuarios');
			$this -> cab();
						
			$sql = "SELECT distinct ic_aluno_cracha FROM ic_aluno 
						left join us_usuario on us_cracha = ic_aluno_cracha 
					where us_nome is null and ic_aluno_cracha <> ''";
			$rlt = $this->db->query($sql);
			$rlt = $rlt->result_array();
			
			$sx = '';
			
			for ($r=0;$r < count($rlt);$r++)
				{
					$line = $rlt[$r];
					$cracha = $line['ic_aluno_cracha'];
					
					$sx .= '<br>->'.$cracha;
					$this->ws_sga->findStudentByCracha($cracha,1);
					$sx .= 'ok';					
				}
			$data['content'] = $sx;
			$this->load->view('content',$data);
			
			
		}

	function index() {
		$this -> cab();
		$data = array();

		/* Menu de botes na tela Admin*/
		$menu = array();
		array_push($menu, array('Parceiros', 'Parceiros da PUCPR', 'ITE', '/parceiro'));
		array_push($menu, array('Idiomas', 'Idiomas do Sistema', 'ITE', '/idioma'));

		array_push($menu, array('Usurios', 'Integrao SGA/CIP Estudantes', 'ITE', '/usuario/integracao_sga'));
		array_push($menu, array('Usurios', 'Perfil de usurio do Sistema', 'ITE', '/perfil'));
		array_push($menu, array('Unidades', 'Unidades da PUCPR', 'ITE', '/unidade'));
		array_push($menu, array('Instituies', 'Instituies de ensino', 'ITE', '/instituicao'));

		array_push($menu, array('Iniciao Cientfica', 'Manuteno de Bolsas', 'ITE', '/admin/ic'));
		array_push($menu, array('Iniciao Cientfica', 'Manuteno de Bolsas por modalidade', 'ITE', '/admin/ic_modal_bolsas'));
		
		array_push($menu, array('Iniciao Cientfica', 'ID/usuarios bas bolsas', 'ITE', '/admin/ic_id'));
		array_push($menu, array('Iniciao Cientfica', 'Vinculo Usurios / Bolsas', 'ITE', '/admin/checar_cracha_aluno_ic'));
		array_push($menu, array('Iniciao Cientfica', 'Finalizar projetos do ano anterior', 'ITE', '/admin/finalizar_ic'));
		array_push($menu, array('Iniciao Cientfica', 'Converter Pasta GED', 'ITE', '/admin/ged_ic'));
		
		array_push($menu, array('SEMIC', 'Salas de Apresentao', 'ITE', '/semic/salas'));
		array_push($menu, array('SEMIC', 'Trabalhos', 'ITE', '/semic/trabalhos_row'));
		array_push($menu, array('SEMIC', 'Correo UTF8', 'ITE', '/semic/trabalhos_correcao'));
		array_push($menu, array('Usurios', 'Limpa Curso (Turnos)', 'ITE', '/admin/limpa_curso'));
		array_push($menu, array('Usurios', 'Cruzar dados do professor', 'ITE', '/admin/inporta_professor'));
		array_push($menu, array('Usurios', 'Ajustar/Validar CPF', 'ITE', '/admin/checar_cpf'));
		array_push($menu, array('Usurios', 'Crachas duplicados', 'ITE', '/admin/cracha_duplicados'));

		/*View principal*/
		$data['menu'] = $menu;
		$data['title_menu'] = 'Menu Administrao';
		$this -> load -> view('header/main_menu', $data);

		/*Fecha */ 		/*Gera rodap*/
		$this -> load -> view('header/content_close');
		$this -> load -> view('header/foot', $data);
	}

	function inporta_professor() {
{'fraction_non_alphanumeric': 0.21833047340264458, 'fraction_numerical': 0.0026244069849601292, 'mean_word_length': 4.016708860759493, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 125, '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': '951453', 'n_tokens_mistral': 4265, 'n_tokens_neox': 3763, 'n_words': 735}