$class = "success"; } } print "<div class='{$class}'>"; print $updateReturnMessage; print "</div>"; } //Get class variable $gibbonPlannerEntryID = $_GET["gibbonPlannerEntryID"]; if ($gibbonPlannerEntryID == "") { print "<div class='warning'>"; print _('You have not specified one or more required parameters.'); print "</div>"; } else { $and = " AND gibbonPlannerEntryID={$gibbonPlannerEntryID}"; $sql = getLessons($guid, $connection2, $and); try { $result = $connection2->prepare($sql[1]); $result->execute($sql[0]); } catch (PDOException $e) { print "<div class='error'>" . $e->getMessage() . "</div>"; } if ($result->rowCount() != 1) { print "<div class='error'>"; print _("The selected record does not exist, or you do not have access to it."); print "</div>"; } else { $row = $result->fetch(); print "<table class='smallIntBorder' cellspacing='0' style='width: 100%'>"; print "<tr>"; print "<td style='width: 34%; vertical-align: top'>";
if (isset($_GET['m']) && $_GET['m'] == 'table') { $where = " AND `hall` = '" . mysql_real_escape_string(trim($_GET['hall'])) . "'"; if (isset($_GET['trainer']) && $_GET['trainer'] != 'NULL') { $where .= " AND tr.tid ='" . mysql_real_escape_string(trim($_GET['trainer'])) . "'"; } if (isset($_GET['lesson']) && $_GET['lesson'] != 'NULL') { $where .= " AND le.lid ='" . mysql_real_escape_string(trim($_GET['lesson'])) . "'"; } $res = json_encode(getTimeTableForWeek("'" . $_GET['pikDate'] . "'", $where)); OUT($res); echo $res; } elseif (isset($_GET['m']) && $_GET['m'] == 'trainers') { //OUT(json_encode(getTrainers())); echo json_encode(getTrainers()); } elseif (isset($_GET['m']) && $_GET['m'] == 'lessons') { echo json_encode(getLessons()); } elseif (isset($_GET['m']) && $_GET['m'] == 'update') { $query = "SELECT id, `lesson` FROM `training_times` WHERE id > 8"; $result = mysql_query($query) or die(mysql_error()); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $id = $row['id']; $res = $row['lesson']; $res1 = mysql_query("SELECT `duration` FROM lessons WHERE lid = {$res}") or die(mysql_error()); $row1 = mysql_fetch_array($res1, MYSQL_ASSOC) or die(mysql_error()); $time = $row1['duration']; $hour = 0; if ($time > 0) { while ($time - 60 >= 0) { $time -= 60; $hour++; }
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @session_start(); //Module includes include "./modules/" . $_SESSION[$guid]["module"] . "/moduleFunctions.php"; if (isActionAccessible($guid, $connection2, "/modules/Crowd Assessment/crowdAssess.php") == FALSE) { //Acess denied print "<div class='error'>"; print _("You do not have access to this action."); print "</div>"; } else { print "<div class='trail'>"; print "<div class='trailHead'><a href='" . $_SESSION[$guid]["absoluteURL"] . "'>" . _("Home") . "</a> > <a href='" . $_SESSION[$guid]["absoluteURL"] . "/index.php?q=/modules/" . getModuleName($_GET["q"]) . "/" . getModuleEntry($_GET["q"], $connection2, $guid) . "'>" . _(getModuleName($_GET["q"])) . "</a> > </div><div class='trailEnd'>" . _('View All Assessments') . "</div>"; print "</div>"; $sql = getLessons($guid, $connection2); try { $result = $connection2->prepare($sql[1]); $result->execute($sql[0]); } catch (PDOException $e) { print "<div class='error'>" . $e->getMessage() . "</div>"; } print "<p>"; print _("The list below shows all lessons in which there is work that you can crowd assess."); print "</p>"; if ($result->rowCount() < 1) { print "<div class='error'>"; print _("There are currently no lessons to for you to crowd asess."); print "</div>"; } else { print "<table cellspacing='0' style='width: 100%'>";