$_POST['definition'][$i] = $addslashes($_POST['definition'][$i]); $_POST['related_term'][$i] = $addslashes($_POST['related_term'][$i]); $terms_sql .= "(NULL, {$_SESSION['course_id']}, '{$_POST[word][$i]}', '{$_POST[definition][$i]}', {$_POST[related_term][$i]})"; } } } if ($missing_fields) { $missing_fields = implode(', ', $missing_fields); $msg->addError(array('EMPTY_FIELDS', $missing_fields)); } if (!$msg->containsErrors()) { $sql = "INSERT INTO %sglossary VALUES {$terms_sql}"; $result = queryDB($sql, array(TABLE_PREFIX), false, false); $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY'); $return_url = $_SESSION['tool_origin']['url']; tool_origin('off'); header('Location: ' . $return_url); exit; } $_GET['pcid'] = $_POST['pcid']; } $onload = 'document.form.title0.focus();'; unset($word); $num_terms = 1; $sql = "SELECT * FROM %sglossary WHERE course_id=%d ORDER BY word"; $rows_g = queryDB($sql, array(TABLE_PREFIX, $_SESSION['course_id'])); require AT_INCLUDE_PATH . 'header.inc.php'; $savant->assign('rows_g', $rows_g); $savant->assign('num_terms', $num_terms); $savant->display('instructor/glossary/add.tmpl.php'); require AT_INCLUDE_PATH . 'footer.inc.php';
<?php define('AT_INCLUDE_PATH', '../../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; tool_origin(); $sql = "SELECT forum_id, title FROM %sforums"; $rows_forums = queryDB($sql, array(TABLE_PREFIX)); if (count($rows_forums) == 0) { $msg->addInfo('NO_FORUMS'); require AT_INCLUDE_PATH . 'header.inc.php'; exit; } require AT_INCLUDE_PATH . 'header.inc.php'; ?> <form name='forumExp' action='send_zip_archive.php' method='post'> <div class='input-form'> <div class='row'> <h3><?php echo _AT('farchive_select_forum'); ?> </h3> </div> <div class='row'> <select name='selForum' id='selForum'> <?php $course_id = $_SESSION['course_id']; // ---Get course forums for the specific course id $courseOptions = "";
/****************************************************************/ /* ATutor */ /****************************************************************/ /* Copyright (c) 2002-2010 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or*/ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /****************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; authenticate(AT_PRIV_STYLES); tool_origin($_SERVER['HTTP_REFERER']); if (isset($_POST['up'])) { $up = key($_POST['up']); $_new_modules = array(); if (isset($_POST['main'])) { foreach ($_POST['main'] as $m) { if ($m == $up) { $last_m = array_pop($_new_modules); $_new_modules[] = $m; $_new_modules[] = $last_m; } else { $_new_modules[] = $m; } } $_POST['main'] = $_new_modules; }