function HandleDefault() { require_once "Http_Cache.php"; Http_Cache::setExpires(4 * 60 * 60); require_once "FileUtils.php"; require_once "TreeUtils.php"; require_once "RubricsData.php"; require_once "Cache/Lite/Function.php"; print " "; $options = array("cacheDir" => "../tmpcache/", "lifeTime" => 4 * 60 * 60); $cache = new Cache_Lite_Function($options); $rubrics = new RubricsData(); $res = $cache->call(array(&$rubrics, "getRootRubrics")); // $res = $rubrics->getRootRubrics(); $treeBuilder = new TreeBuilder(true, true, "TreeSrcData"); ob_start(); $treeBuilder->show($res); $_GLOBAL["Tree"] = ob_get_contents(); ob_end_clean(); $_GLOBAL["RegionsList"] = ""; $res = $rubrics->getRegions(); $_GLOBAL["RegionsList"] .= "<option value=\"0\" selected>Все</option>\n"; foreach ($res as $r) { $_GLOBAL["RegionsList"] .= "<option value=\"" . $r["id"] . "\">" . trim($r["region"]) . "</option>\n"; } $_GLOBAL["UsualStr"] = getUsual("Обычная очередь"); $_GLOBAL["TestStr"] = getTest("Тестовая очередь"); $_GLOBAL["SpecStr"] = getSpec("Специальная очередь"); include "templates/index.html"; }
function getTestObjsForReport($ids) { $list = array(); $temparray = array(); $ids = trim($ids); if ($ids != '') { $temparray = explode(";", $ids); foreach ($temparray as $t) { $temp = getTest($t); array_push($list, $temp); } if (count($list) != 0) { return $list; } return NULL; } return NULL; }
echo "No Test Selected"; die; } $smssent = 0; if (isset($_POST['custom'])) { $custom = trim($_POST['custom']); } else { $custom = ''; } if (isset($_POST['smsID'])) { $smsID = trim($_POST['smsID']); } else { echo "No Sms Selected"; die; } $testObj = getTest($testID); $temparray = array(); for ($i = 0; $i < 3; $i++) { if (isset($_POST['to' . $i]) && $_POST['to' . $i] == 1) { array_push($temparray, $i); } } $list = array(); $studentarray = array(); $list = getAllMarksOfTestArranged($testObj, 'DESC'); //echo count($list)."<br />"; for ($i = 0; $i < count($list); $i++) { if (isset($_POST['id' . $list[$i][0]->getID()]) && $_POST['id' . $list[$i][0]->getID()] == 1) { //$ID = $list[$i][0]->getID(); //$tempStudent=getStudent($ID,0); $number = getStudentSmsNumber($list[$i][0], $temparray);
function getTestObj() { return getTest($this->testID); }
function getActiveQuizTestsByBatch($batchobj, $no) { $conn = getConnection(); $list = array(); $query = "SELECT * FROM test WHERE batchID='" . $batchobj->getID() . "' AND activeflag = 1 AND quiztype = '" . $no . "' ORDER BY subjectID ASC, datetest DESC"; //echo $query; $result = mysql_query($query); while ($member = mysql_fetch_array($result)) { $temp = getTest($member['ID']); array_push($list, $temp); } if (count($list) != 0) { return $list; } return NULL; }
function read() { $conn = getConnection(); $query = "SELECT * FROM marks WHERE ID='" . $this->ID . "'"; $result = mysql_query($query); if (!$result) { return; } else { $member = mysql_fetch_array($result); $this->setStudentID(trim($member['studentID'])); $this->setMark(trim($member['mark'])); $this->setCreatedBy(trim($member['createdby'])); $this->setLastUpdated(trim($member['lastupdated'])); $this->TestObj = getTest(trim($member['testID'])); $this->setDateCreated(trim($member['datecreated'])); } }