//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'] . "';"; // $select="SELECT cod_formulario_resposta FROM vepinho1.cad_formulario_resposta where cod_formulario='8' and descricao='Parentes';";
</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 echo $preceptorias->listar_preceptarias($cod_aluno);