コード例 #1
0
ファイル: theme.php プロジェクト: evangelion62/Quiz
         $themeManager->add($theme);
         header('Location: ?controler=theme&action=list');
     } else {
         ob_start();
         require_once 'view/theme/addTheme.php';
         $content = ob_get_contents();
         ob_end_clean();
         require_once 'view/layout/layout.php';
     }
     break;
 case 'update':
     $adminLvlThisControler = 3;
     require_once 'lib/checkRights.php';
     if (isset($_GET['id']) && !isset($_POST['theme'])) {
         $themeManager = new ThemeManager($bdd);
         $theme = $themeManager->get($_GET['id']);
         ob_start();
         require_once 'view/theme/updateTheme.php';
         $content = ob_get_contents();
         ob_end_clean();
         require_once 'view/layout/layout.php';
     } elseif (isset($_POST['theme'])) {
         $themeManager = new ThemeManager($bdd);
         $theme = new Theme($_POST);
         $themeManager->update($theme);
         header('Location: ?controler=theme&action=list');
     } else {
         header('Location: ?controler=theme&action=list');
     }
     break;
 case 'delete':