Пример #1
0
         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');
     }
     break;
 case 'close':
     if ($isset_id and $loged and isset($_GET['estado']) and in_array($_GET['estado'], [0, 1])) {
         $temas->Close($_GET['estado']);
     } else {
         header('location: index.php?view=index');
     }
     break;
 case 'responder':
     if ($isset_id and $loged) {
         $tema = $temas->Check();
         if (false != $tema) {