<!DOCTYPE html> <?php require_once './view/formulario.php'; require_once './controller/constantes.php'; require_once './view/classFormAdesao.php'; require_once './view/slideShow.php'; $formulario = new formulario(); ?> <html lang="pt-br"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no" /> <meta name="description" content="REDE UNA VIVA"> <meta name="keywords" content="rede una viva ruv jr jornada real"> <meta name="author" href="autor.txt"> <meta name="robots" content="nofollow"> <meta name="google" content="notranslate"> <title><?php echo TITULORUV; ?> </title> <link rel="stylesheet" href="assets/css/font-awesome.min.css"> <link rel="stylesheet" href="css/font-awesome.min.css"> <link rel="shortcut icon" href="icon/ruv.ico"> <link rel="icon" type="image/png" href="images/ruvicon.png"> <!--<link rel="stylesheet" href="css/bootstrap-responsive.css">-->
<?php include_once '../../vista/phpusado.php'; include_once './vista/formulario.php'; $inicio = new htmlprincipal(); $inicio->inicio(); $formulario = new formulario(); $formulario->formulario();
</form> </div> </div> </div> <?php if ($cod_aluno != "") { if ($_SESSION['tipo_usuario'] == "preceptor" or $_SESSION['tipo_usuario'] == "administrador") { ?> <div class="uk-width-1-1 uk-form uk-form-stacked"> <?php $formulario = new formulario(); $formulario->ficha_complementar($cod_aluno, "N"); ?> </div> <div class="uk-width-1-1 uk-form uk-form-stacked"> <div class="uk-grid" style="margin-left: -10px; padding-right: 30px;" > <div class="uk-width-1-1 uk-form uk-form-stacked"> <?php $preceptorias = new preceptorias(); echo $preceptorias->box_preceptoria(); ?> </div> <div class="uk-width-1-1" > <div class="uk-grid" id="preceptorias"> <?php
if (isset($_POST) and isset($_POST['act']) and $_POST['act'] == 'salvar_formulario') { //var_dump($_POST); if ($_POST['cod_formulario'] == '') { $table = "`cad_formulario`"; $campos = "`texto_pergunta`, `texto_ajuda`, `tipo_formulario`"; $values = "'" . $_POST['texto_pergunta'] . "','" . $_POST['texto_ajuda'] . "','" . $_POST['tipo_formulario'] . "'"; $msg = "N"; $sql->insert($table, $campos, $values, $msg); } else { $table = "cad_formulario"; $campos = "`texto_pergunta`='" . $_POST['texto_pergunta'] . "', `texto_ajuda`='" . $_POST['texto_ajuda'] . "', `tipo_formulario`='" . $_POST['tipo_formulario'] . "' "; $where = "cod_formulario='" . $_POST['cod_formulario'] . "'"; $msg = "N"; $sql->update($table, $campos, $where, $msg); } $formulario = new formulario(); $formulario->ficha_complementar("", "S"); } if (isset($_POST) and isset($_POST['act']) and $_POST['act'] == 'salvar_ficha_complementar') { // var_dump($_POST); include "config.php"; $sql = new sql(); $table = "cad_ficha_complementar"; $msg = "N"; //excluir resposta antiga $where = " cod_formulario='" . $_POST['cod_formulario'] . "' and cod_aluno='" . $_POST['cod_aluno'] . "' "; $sql->delete($table, $where, $msg); //se type==text, incluir resposta de texto if ($_POST['type'] == 'text') { //1 - verificar se existe resposta $select = "SELECT cod_formulario_resposta FROM vepinho1.cad_formulario_resposta where cod_formulario='" . $_POST['cod_formulario'] . "' and descricao='" . $_POST['texto'] . "';";
} if ($this->asunto == "") { $this->errores .= "<strong>* Ingrese su asunto por favor. </strong><br />"; } else { if (strlen($this->asunto) > 20) { $errores .= "<strong>* Escriba un asunto con menos caracteres. </strong><br />"; } } if ($this->msj == "") { $this->errores .= "<strong>* Ingrese su mensaje por favor. </strong><br />"; } else { if (strlen($this->msj) > 200) { $this->errores .= "<strong>* Maximo permitido 200 caracteres. </strong><br />"; } } } public function response() { if (!empty($this->errores)) { echo '<u>Lista de errores:</u> <br />'; echo $this->errores; } else { //mail($destinatario, $asunto, $msj); echo "Mensaje enviado con exito"; echo "<script type='text/javascript'> parent.document.formu.reset(); </script>"; } } } $resp_peticion = new formulario(); $resp_peticion->validaDatos(); $resp_peticion->response();