2 /****************************************************************************/
4 /****************************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /****************************************************************************/
14 define('AT_INCLUDE_PATH', '../../../include/');
15 require (AT_INCLUDE_PATH.'vitals.inc.php');
17 authenticate(AT_PRIV_FORUMS);
19 if ($_POST['cancel']) {
20 $msg->addFeedback('CANCELLED');
21 header('Location: '.AT_BASE_HREF.'mods/_standard/forums/index.php');
25 if ($_POST['add_forum'] && (authenticate(AT_PRIV_FORUMS, AT_PRIV_RETURN))) {
26 if ($_POST['title'] == '') {
27 $msg->addError(array('EMPTY_FIELDS', _AT('title')));
29 $_POST['title'] = validate_length($_POST['title'], 60);
32 if (!$msg->containsErrors()) {
33 require(AT_INCLUDE_PATH.'../mods/_standard/forums/lib/forums.inc.php');
36 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
37 header('Location: '.AT_BASE_HREF.'mods/_standard/forums/index.php');
42 $onload = 'document.form.title.focus();';
44 require(AT_INCLUDE_PATH.'header.inc.php');
46 $savant->display('instructor/forums/add_forum.tmpl.php');
47 require(AT_INCLUDE_PATH.'footer.inc.php'); ?>