| Server IP : 20.75.53.88 / Your IP : 216.73.217.72 [ Web Server : Apache System : Linux VMRALP-3 4.4.0-256-generic #290~14.04.1-Ubuntu SMP Thu Jun 20 09:24:50 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29+esm15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Domains : 3 Domains MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/merenda/vicosa23/modulos/escola/ |
Upload File : |
<?php
/**
* Created by PhpStorm.
* User: RalpAlves
* Date: 04/03/15
* Time: 14:02
*/
if (empty($_GET['cod_escola'])) {
$ult_cod = '';
} else {
$ult_cod = $_GET['cod_escola'];
}
//retorna os dados da escola após a inclusão do form escola_prg_crud.php
$_inepe = $_GET['inepe'];
$_crede = $_GET['crede'];
$_escol = $_GET['escola'];
$_distr = $_GET['distri'];
$_qalun = $_GET['qaluno'];
$_ufesc = $_GET['ufesco'];
$_munic = $_GET['munici'];
$_ender = $_GET['endere'];
$_bairr = $_GET['bairro'];
$_cepes = $_GET['cepesc'];
$_telef = $_GET['telefo'];
$_rotas = $_GET['rotaes'];
$_diret = $_GET['direto'];
$_email = $_GET['emaild'];
$_teldi = $_GET['teledi'];
mysql_select_db($banco, $conexao);
$rs_dis = mysql_query("SELECT * FROM distrito where dis_ativo='1'");
$rs_prg = mysql_query("SELECT * FROM programa where prg_ativo='1'");
$rs_rot = mysql_query("SELECT * FROM rotas where rota_ativo='1'");
$rs_tip = mysql_query("SELECT * FROM tipoescola");
//PROGRAMAS
$rsPrograma = mysql_query("SELECT * from v_lista_prgrama_escola where esp_esc_id = '999999999'");
$rsPrograma_totalRows = mysql_num_rows($rsPrograma);
?>
<head id="Head1">
<meta charset="utf-8"/>
<link href="Styles/Site.css" rel="stylesheet" type="text/css"/>
<link rel="icon" href="img/favicon.png"/>
<link href="Styles/smoothness/jquery-ui-1.8.24.custom.css" rel="stylesheet" type="text/css"/>
<script src="Scripts/jquery-1.8.2.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
<link href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link href="Styles/bootstrap.css" rel="stylesheet" type="text/css"/>
<!--MOSTRAR / ESCONDER DIV-->
<script>
function m_div(el) {
var display = document.getElementById(el).style.display;
if (display == "none")
document.getElementById(el).style.display = 'block';
else
document.getElementById(el).style.display = 'none';
}
</script>
<!--USO: <button type="submit" name="bt_novo" class="btn" onclick="m_div('id_da_div')"></button>-->
<!--MOSTRAR / ESCONDER DIV-->
<!--Atulizar somente div dos programas-->
<script>
var var_inc = 'cadastrar';
function alterar_div() {
$.ajax({
type: "POST",
url: "modulos/escola/escola_prg_crud.php",
data: {
txt_programa_esc: $('#txt_programa_esc').val(),
txt_adesao: $('#txt_adesao').val(),
txt_id: $('#txt_id').val(),
txt_aluno_manha: $('#txt_aluno_manha').val(),
txt_aluno_tarde: $('#txt_aluno_tarde').val(),
txt_aluno_noite: $('#txt_aluno_noite').val(),
txt_aluno_integral: $('#txt_aluno_integral').val(),
txt_aluno_ampliada: $('#txt_aluno_ampliada').val(),
txt_cardapio: $('#txt_cardapio').val(),
var_inc: var_inc
},
success: function (data) {
$('#conteudo').html(data);
}
});
}
</script>
<script>
function combo(id, acao, valor) {
$.ajax({
type: "GET",
url: './ajax.php?a=' + acao + '&valor=' + valor,
dataType: "html",
success: function (resultado) {
//alert(resultado);
$('#' + id).html(resultado);
//$('#resposta').html(resultado);
}
});
}
</script>
<!--ABRIR JANELA COLORBOX-->
<script src="colorbox/jquery.colorbox.js"></script>
<script src="colorbox/jquery.colorbox-min.js"></script>
<link rel="stylesheet" href="colorbox/colorbox.css"/>
<script>
$(document).ready(function () {
$(".janela40").colorbox({iframe: true, width: "40%", height: "43%"});
$(".janela50").colorbox({iframe: true, width: "50%", height: "52%"});
$(".janela10").colorbox({iframe: true, width: "20%", height: "50%"});
$(".janela60").colorbox({iframe: true, width: "60%", height: "72%"});
$(".janela70").colorbox({iframe: true, width: "70%", height: "80%"});
$(".janela75").colorbox({iframe: true, width: "70%", height: "87%"});
$(".janela80").colorbox({iframe: true, width: "85%", height: "80%"});
$(".janela90").colorbox({iframe: true, width: "95%", height: "85%"});
$(".janela100").colorbox({iframe: true, width: "100%", height: "100%"});
});
</script>
<!--ABRIR JANELA COLORBOX-->
</head>
<!--FORM DE PRODUTOS-->
<form id="form1" name="form1" id="cad_produto" method="post" action="?page=./escola/escola_crud&var_acao=cadastrar">
<div class="container panel-body">
<div class="container">
<div class="panel panel-info">
<div class="panel-heading">
<div class="panel-title">
<button type="submit" name="bt_novo" class="btn" onClick="history.go(-1)"><i class="fa fa-arrow-left"></i></button>
<span style="font-size:20px;"> Escola | Cadastro</span>
<button type="submit" name="bt_novo" class="btn botao_direita" title="salvar"><i class="fa fa-check"></i></button>
</div>
</div>
</div>
</div>
<!--
ESCOLAS
-->
<div id="id_form" class="container">
<div class='col-xs-12 col-sm-12 com-md-12 col-lg-12'>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
ID
<input type="text" name="txt_ID" size="20px" style="text-align: center;" readonly="readonly"
value="<?php echo $ult_cod ?>" class="form-control" id="txt_id">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
INEP
<input type="text" name="txt_inep" autofocus class="form-control lm" value="<?php echo $_inepe ?>">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
CREDE
<input type="text" name="txt_crede" class="form-control lm" value="<?php echo $_crede ?>">
</div>
</div>
<div class='col-xs-12 col-sm-12 com-md-12 col-lg-12'>
<div class="col-xs-12 col-sm-8 com-md-8 col-lg-8">
Escola
<input type="text" name="txt_escola" class="form-control lm" value="<?php echo $_escol ?>">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Distrito
<!--ADD DE OUTRO MÓDULO-->
<a class='janela70 text-black' href="index2.php?page=escola/distrito"> <i class='glyphicon glyphicon-plus'></i></a>
<i class='glyphicon glyphicon-refresh' onclick="combo('distrito','sel_distrito','0')" style="cursor: hand;"></i>
<!--ADD DE OUTRO MÓDULO-->
<div id='distrito'>
<select name="txt_distrito" class="form-control">
<?php while ($_dis = mysql_fetch_array($rs_dis)) { ?>
<option
value="<?php echo $_dis['dis_id'] ?>"><?php echo utf8_encode($_dis['dis_distrito']) ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class='col-xs-12 col-sm-12 com-md-12 col-lg-12'>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Alunos Matriculados
<input type="text" name="txt_qtd_alunos" class="form-control" value="<?php echo $_qalun ?>">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
UF
<input type="text" name="txt_uf" class="form-control lm" value="<?php echo $_ufesc ?>">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Municipio
<input type="text" name="txt_municipio" class="form-control lm" value="<?php echo $_munic ?>">
</div>
</div>
<div class='col-xs-12 col-sm-12 com-md-12 col-lg-12'>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Endereço
<input type="text" name="txt_endereco" class="form-control lm" value="<?php echo $_ender ?>">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Bairro
<input type="text" name="txt_bairro" class="form-control lm" value="<?php echo $_bairr ?>">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
CEP
<input type="text" name="txt_cep" class="form-control" value="<?php echo $_cepes ?>">
</div>
</div>
<div class='col-xs-12 col-sm-12 com-md-12 col-lg-12'>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Telefone
<input type="text" name="txt_telefone" class="form-control" value="<?php echo $_telef ?>">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
rota
<!--ADD DE OUTRO MÓDULO-->
<a class='janela70 text-black' href="index2.php?page=escola/rota"> <i class='glyphicon glyphicon-plus'></i></a>
<i class='glyphicon glyphicon-refresh' onclick="combo('rota','sel_rota','0')" style="cursor: hand;"></i>
<!--ADD DE OUTRO MÓDULO-->
<div id='rota'>
<select name="txt_rota" class="form-control">
<?php while ($_rot = mysql_fetch_array($rs_rot)) { ?>
<option value="<?php echo $_rot['rota_id'] ?>"><?php echo utf8_encode($_rot['rota']) ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Diretor
<input type="text" name="txt_diretor" class="form-control lm" value="<?php echo $_diret ?>">
</div>
</div>
<div class='col-xs-12 col-sm-12 com-md-12 col-lg-12'>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Telefone diretor
<input type="text" name="txt_tel_diretor" class="form-control" value="<?php echo $_teldi ?>">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
E-mail diretor
<input type="text" name="txt_mail_diretor" class="form-control" value="<?php echo $_email ?>">
</div>
</div>
</div>
</div>
</div>
</form>
<!--
PROGRAMAS
-->
<!--<form id="form1" name="form1" id="cad_escola" method="post" action="?page=./escola/escola_prg_crud&var_acao=cadastrar&cod_escola=$ult_cod">-->
<div id="id_form_2" class="container">
<div id="id_form_2" class="container">
<div class="container label-primary cfb">
<div class="col-md-2"><span style="font-size:20px;"> Programas</span></div>
<div class="col-md-1">
<button id="id_bt_salvar" name="id_bt_salvar" class="btn"
onclick="m_div('id_cad_prg'), m_div('id_bt_salvar'), m_div('id_bt_cancelar'), alterar_div()"
style="display: none;">
<i class="fa fa-check" title="salvar"></i>
</button>
</div>
<div class="col-md-1">
<button id="id_bt_cancelar" name="id_bt_cancelar" class="btn"
onclick="m_div('id_cad_prg'), m_div('id_bt_salvar'), m_div('id_bt_cancelar')"
style="display: none;">
<i class="fa fa-arrow-left" title="Voltar"></i>
</button>
</div>
</div>
</div>
</div>
<!--PROGRAMAS-->
<div id="id_cad_prg" class="container" style="display: none;">
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
ID
<input type="text" name="txt_id_prg" class="form-control" id="txt_id_prg">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Programa
<select name="txt_programa" class="form-control" autofocus id="txt_programa_esc">
<?php while ($_prg = mysql_fetch_array($rs_prg)) { ?>
<option value="<?php echo $_prg['prg_id'] ?>"><?php echo utf8_encode($_prg['prg_programa']) ?></option>
<?php } ?>
</select>
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Tipo Cardápio
<select name="txt_cardapio" class="form-control" id="txt_cardapio">
<?php while ($_tip = mysql_fetch_array($rs_tip)) { ?>
<option
value="<?php echo $_tip['tpe_id'] ?>"><?php echo utf8_encode($_tip['tpe_tipoescola']) ?></option>
<?php } ?>
</select>
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Percentual Adesão
<input type="text" name="txt_adesao" class="form-control" id="txt_adesao">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Qtd. alunos manhã
<input type="text" name="txt_manha" class="form-control" id="txt_aluno_manha">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Qtd. alunos tarde
<input type="text" name="txt_tarde" class="form-control" id="txt_aluno_tarde">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Qtd. alunos noite
<input type="text" name="txt_noite" class="form-control" id="txt_aluno_noite">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Qtd. alunos integral
<input type="text" name="txt_integral" class="form-control" id="txt_aluno_integral">
</div>
<div class="col-xs-12 col-sm-4 com-md-4 col-lg-4">
Qtd. alunos ampliada
<input type="text" name="txt_ampliada" class="form-control" id="txt_aluno_ampliada">
</div>
</div>
<!--</form>-->
<br>
<div id="id_lista_prg" class='container form-inline panel panel-primary filterable'>
<table class='tabe1 table table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<!--mostra conteúdo na div-->
<div id="conteudo1">
<div id='dialog' class='modal modal-dialog'></div>
<div class='bs-example'>
<div class='alert alert-warning' style='text-align: center;'>
<strong>Cadastrar novo programa </strong>
<a href='#' onclick="javascript:;m_div('id_cad_prg'); m_div('id_bt_salvar'); m_div('id_bt_cancelar')">
<img src='img/novo.png' width='16' title='Incluir programa'/></a>
</div>
</div>
</div>
<!--Mostra o conteúdo após a inclusão-->
<div id="conteudo">
</div>
</table>
</div>
</html>