コード例 #1
0
ファイル: educar_turma_cad.php プロジェクト: krlsdu/ieducar
 function Excluir()
 {
     @session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     @session_write_close();
     $obj = new clsPmieducarTurma($this->cod_turma, $this->pessoa_logada, null, null, null, null, null, null, null, null, null, null, 0);
     $excluiu = $obj->excluir();
     if ($excluiu) {
         $obj = new clsPmieducarTurmaModulo();
         $excluiu1 = $obj->excluirTodos($this->cod_turma);
         if ($excluiu1) {
             $obj = new clsPmieducarTurmaDiaSemana(NULL, $this->cod_turma);
             $excluiu2 = $obj->excluirTodos();
             if ($excluiu2) {
                 $this->mensagem .= Portabilis_String_utils::toLatin1('Exclusão efetuada com sucesso.');
                 header('Location: educar_turma_lst.php');
                 die;
             } else {
                 $this->mensagem = Portabilis_String_utils::toLatin1('Exclusão não realizada.');
                 echo "<!--\nErro ao excluir clsPmieducarTurma\nvalores obrigatorios\nif( is_numeric( {$this->cod_turma} ) && is_numeric( {$this->pessoa_logada} ) )\n-->";
                 return FALSE;
             }
         } else {
             $this->mensagem = Portabilis_String_utils::toLatin1('Exclusão não realizada.');
             echo "<!--\nErro ao excluir clsPmieducarTurma\nvalores obrigatorios\nif( is_numeric( {$this->cod_turma} ) && is_numeric( {$this->pessoa_logada} ) )\n-->";
             return FALSE;
         }
     }
     $this->mensagem = Portabilis_String_utils::toLatin1('Exclusão não realizada.');
     echo "<!--\nErro ao excluir clsPmieducarTurma\nvalores obrigatorios\nif( is_numeric( {$this->cod_turma} ) && is_numeric( {$this->pessoa_logada} ) )\n-->";
     return FALSE;
 }