예제 #1
0
 switch ($mode) {
     case 'add':
         if ($loged and $cerrado) {
             if ($_POST) {
                 $temas->Add();
             } else {
                 include HTML_DIR . 'temas/add_tema.php';
             }
         }
         break;
     case 'edit':
         if ($isset_id and $loged) {
             $tema = $temas->Check();
             if (false != $tema) {
                 if ($_POST) {
                     $temas->Edit();
                 } else {
                     include HTML_DIR . 'temas/edit_tema.php';
                 }
             } else {
                 header('location: index.php?view=index');
             }
         } else {
             header('location: index.php?view=index');
         }
         break;
     case 'delete':
         if ($isset_id and $loged) {
             $temas->Delete();
         } else {
             header('location: index.php?view=index');