Beispiel #1
0
     $forums->editPermissions($tpl_dir);
     break;
     // Удаление категории
 // Удаление категории
 case 'delcategory':
     $forums->deleteCat($tpl_dir, $_GET['id']);
     break;
     // Добавление форума
 // Добавление форума
 case 'addforum':
     $forums->addForum($tpl_dir, $_GET['id']);
     break;
     // Добавление категории
 // Добавление категории
 case 'addcategory':
     $forums->addCategory($tpl_dir);
     break;
 case 'attachment_manager':
     $forums->attachmentManager($tpl_dir);
     break;
 case 'show_attachments':
     $forums->showAttachments($tpl_dir);
     break;
 case 'user_ranks':
     $forums->userRanks($tpl_dir);
     break;
     // Смайлы
 // Смайлы
 case 'list_smilies':
     $forums->listSmilies($tpl_dir);
     break;
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require_once '../classes/Forum.php';
require_once '../classes/Evaluation.php';
require_once '../classes/Course.php';
$forum = new Forum();
$course = new Course();
session_start();
if (isset($_POST["cat"])) {
    $cat_target = htmlentities(htmlspecialchars($_POST["cat"]));
    $cat_by = $_SESSION['username'];
    $cat_name = htmlentities(htmlspecialchars($_POST["cat_name"]));
    $cat_desc = htmlentities(htmlspecialchars($_POST["cat_desc"]));
    $reply = $forum->addCategory($cat_by, $cat_name, $cat_desc);
    if ($reply == true) {
        echo 'Category added succesfully';
    } else {
    }
}
if (isset($_POST["catall"])) {
    $reply = true;
    //= $formu->getAllCategory();
    if ($reply == true) {
        echo 'Category added succesfully';
    } else {
        print '<option>Nothing Selected</option>';
    }
}
if (isset($_POST["newcategory"])) {