Viewing file: getschedule.php (1.32 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
error_reporting(E_ERROR);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
include("core/Template.inc.php");
include("config/config.inc.php");
include("core/database.inc.php");
include("core/xmlparser.inc.php");
if (isset($_GET['init'])) {
$xml = new XMLParser();
Schedule::EraseData();
$xml->LoadActivities("xml/mynew111_activities.xml");
$xml->LoadSubgroupsFromTeachers("xml/mynew111_teachers.xml");
}
//$xml->LoadActivities("xml/mynew111_activities.xml");
//$xml->LoadSubgroupsFromTeachers("xml/mynew111_teachers.xml");
if (isset($_GET['group'])) {
$tpl = new Template();
$res = Schedule::GetScheduleForGroup(urldecode(substr($_GET["group"], 0, 100)));
if ($res['subgroupCount'] < 1)
die;
$tpl->SetParam('schedule', $res);
//if ($res['subgroupCount'] == 2)
$tpl->display('templates/user.tpl');
}
if (isset($_GET['teacher']))
{
$tpl = new Template();
$res = Schedule::GetScheduleForTeacher(urldecode(substr($_GET["teacher"],0,100)));
$tpl->SetParam('schedule', $res);
$tpl->display('templates/user.tpl');
}
if (isset($_GET['room']))
{
$tpl = new Template();
$res = Schedule::GetScheduleForRoom(urldecode(substr($_GET["room"],0,100)));
$tpl->SetParam('schedule', $res);
$tpl->display('templates/user.tpl');
}
?>
|