/** * Creates examination subjects for the given examination * * @param Examination $examination * @param PropelPDO $con */ public function createExaminationSubjects($examination, PropelPDO $con) { if (!$examination->isNew()) { return; } $career_subject_school_years = CareerSubjectSchoolYearPeer::retrieveForExamination($examination, $con); foreach ($career_subject_school_years as $career_subject_school_year) { $examination_subject = new ExaminationSubject(); $examination_subject->setCareerSubjectSchoolYearId($career_subject_school_year->getId()); $examination->addExaminationSubject($examination_subject); } }
echo "<option>{$row['stdId']}</option>"; } echo "</select>"; ?> </td> <td> <input type='submit' value='Check Results' name ='btncheck' class='style3' onclick="return emptyId()"/></td><br /> </tr></table> </form> <?php if (isset($_POST['stdid'])) { $result = new Examination(); $result->checkResult(); } } ?> </div> <br /><br /><br /><br /> <marquee> <p class="style2">::Designed and Developed by Udara Senanayake:: </p> </marquee> </body> </html>
echo "<option>{$row['subjType']}</option>"; } echo "</select>"; ?> </td> <td> <input type='submit' value='Check Exam Time Table' name ='btncheck' class='style3' onclick="return emptyId()"/></td><br /> </tr></table> </form> <?php if (isset($_POST['type'])) { $tt = new Examination(); $tt->checkSchedule(); } } mysql_close(); ?> </div> <br /><br /><br /><br /> <marquee> <p class="style2">::Designed and Developed by Udara Senanayake:: </p> </marquee>
public static function dropDownList($id, $name, $type, $class = NULL, $input = NULL) { global $objPDO; include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_class.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/section_class.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/teacher_class.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/examination_class.php'; $sec = new Section($objPDO); $section = $sec->getSectionArray(); if ($input != NULL && !is_array($input)) { $tea = new Teacher($objPDO); $teacher = $tea->getTeacherArray($input); } $sub = new Subject($objPDO); $subject = $sub->getSubjectArray(); $ex = new Examination($objPDO); $exams = $ex->getExaminationArray(); $importance_array = array("select" => "--Notice Type--", "1" => "Important", "2" => "Announcement", "3" => "Reminder", "4" => "Others"); $numeric_level = array("select" => "--Select--", "1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6", "7" => "7", "8" => "8", "9" => "9", "10" => "10", "11" => "11", "12" => "12"); $months = array("1" => "January", "2" => "February", "3" => "March", "4" => "April", "5" => "May", "6" => "June", "7" => "July", "8" => "August", "9" => "September", "10" => "October", "11" => "November", "12" => "December"); $blood_group = array("select" => "--Select--", "A+" => "A+", "B+" => "B+", "O+" => "O+", "AB+" => "AB+", "A-" => "A-", "B-" => "B-", "O-" => "O-", "AB-" => "AB-"); $category = array("select" => "--Select--", "OC" => "General(OC)", "SC" => "SC", "ST" => "ST", "OBC" => "OBC", "NRI" => "NRI", "Defence" => "Defence"); $to_type = array("1" => "Individual", "2" => "Section Wise", "3" => "All Parents", "4" => "Individual Parents", "5" => "Everyone"); $event_type = array("select" => "--Event Type--", "1" => "Holiday", "2" => "Fee Payment", "3" => "School Event", "4" => "Examination"); $fn_an = array('1' => 'ForeNoon', '2' => 'AfterNoon', '3' => 'ForeNoon and AfterNoon'); if ($class == NULL) { $class = "text"; } $list = array(); if ($type == "exams") { $list = $exams; } if ($type == "fn_an") { $list = $fn_an; } else { if ($type == "event_type") { $list = $event_type; } else { if ($type == "months") { $list = $months; } else { if ($type == "to_type") { $list = $to_type; } else { if ($type == "importance") { $list = $importance_array; } else { if ($type == "numeric_level") { $list = $numeric_level; } else { if ($type == "blood_group") { $list = $blood_group; } else { if ($type == "category") { $list = $category; } else { if ($type == "subject") { $list = $subject; } else { if ($type == "section") { $list = $section; } else { if ($type == "teacher") { $list = $teacher; } else { if (is_array($input)) { $list = $input; } } } } } } } } } } } } $html = '<select id="' . $id . '" class="' . $class . '" name="' . $name . '" >'; foreach ($list as $key => $value) { if ($key == $input) { $html .= '<option selected="selected" value="' . $key . '">' . $value . '</option>'; } else { $html .= '<option value="' . $key . '">' . $value . '</option>'; } } $html .= '</select>'; echo $html; }
} echo "</select> "; ?> <input type='submit' value='Check GPA' name ='btncheck' class='style4' align="center" /> </td> </tr> </table> </form> </td> </tr> </table> <?php if (isset($_POST['btncheck'])) { $getgpa = new Examination(); $getgpa->checkGPA(); } } mysql_close(); ?> <p align="center">*<i>You can get a class only if you have atleast grade C for all subjects</i>*</p> <marquee> <span class="style2"><em><strong>::Designed and Developed by Udara Senanayake::</strong></em></span> </marquee> </body> </html>
$add->addTimeTableData(); } elseif (isset($_POST['btnupdate'])) { $update = new Examination(); $update->updateTimeTableData(); } elseif (isset($_POST['btnget']) && $_POST['subjid'] != "SELECT") { //get timetable details in database $subjid = $_POST['subjid']; $get_details = "SELECT date_format(examStart, '%m') AS month,\n\t\t\t\t\t\tdate_format(examStart, '%Y') AS year,\n\t\t\t\t\t\tdate_format(examStart, '%e') AS day,\n\t\t\t\t\t\tdate_format(examStart,'%H:%i') AS fmt_examStart,\n\t\t\t\t\t\tdate_format(examFinish,'%H:%i') AS fmt_examFinish\n \t\t\t\t\t\tFROM exam WHERE subjId='{$subjid}'"; $get_details_res = mysql_query($get_details); $getyear = mysql_result($get_details_res, 0, 'year'); $getmonth = mysql_result($get_details_res, 0, 'month'); $getday = mysql_result($get_details_res, 0, 'day'); $getestart = mysql_result($get_details_res, 0, 'fmt_examStart'); $getefinish = mysql_result($get_details_res, 0, 'fmt_examFinish'); } elseif (isset($_POST['btndeldata']) && $_POST['subjid'] != "SELECT") { $delete = new Examination(); $delete->deleteTimeTableData(); } elseif (isset($_POST['btnclrdata'])) { //clears form data to get an empty form header("Location:examttdata.php"); } mysql_close(); } ?> <input type="submit" name="btnget" value="Get Data" class="style3" onclick="return emptyRegNo_Get()"/> <input type="submit" name="btnclrdata" value="Clear Data" class="style3" /> <input type="submit" name="btndeldata" value="Delete Record" class="style3" onclick="return emptyRegNo_Del()"/> </td> </tr>
align="center" onclick="return emptyId()"/> </p> </form> </td> </tr> </table> </td> </tr> </table> <?php if (isset($_POST['btncheck2'])) { $res = new Examination(); $res->checkResultByLecturer(); } elseif (isset($_POST['btnstat2'])) { $res = new Examination(); $res->checkResultStatistics(); } } } mysql_close(); echo "</table>"; ?> <br /><br /> <p> <marquee> <span class="style2"><em><strong>::Designed and Developed by Udara Senanayake::</strong></em></span> </marquee> </p> </body>
protected function createexam() { $required = array("name" => "Examination Name", "start_date" => "Start Date", "end_date" => "End Date", "fn_an" => "Sessions"); global $user; if ($user->checkAdmin() == true) { if (isset($_POST)) { foreach ($required as $key => $value) { if (!isset($_POST[$key]) || $_POST[$key] == '' || $_POST[$key] == 'select') { echo $value . ' is Required<br/>'; return; } } echo 'Saving...'; global $objPDO; require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/examination_class.php'; $exam = new Examination($objPDO); $exam->setName($_POST['name']); $exam->setStartDate(date('Y-m-d H:i:s T', strtotime($_POST['start_date']))); $exam->setEndDate(date('Y-m-d H:i:s T', strtotime($_POST['end_date']))); $exam->setFnAn($_POST['fn_an']); $exam->save(); echo '<meta http-equiv="Refresh" content="0;url=http://localhost/cloud/examination/selectsubjects"/>'; } } else { header('Location:http://localhost/cloud'); } }
<input type='submit' value='Check Overall Rankings' name ='btnoverall' class='style6' align="center" onclick="return emptyOverall()" /></p> </form> </td> </tr> </table> <?php if (isset($_POST['btncheck1'])) { $rank = new Examination(); $rank->checkRankByType(); } elseif (isset($_POST['btncheck2'])) { $rank = new Examination(); $rank->checkRankByCombination(); } elseif (isset($_POST['btnoverall'])) { $rank = new Examination(); $rank->checkOverallRank(); } } mysql_close(); ?> <br /><br /> <p> <marquee> <span class="style2"><em><strong>::Designed and Developed by Udara Senanayake::</strong></em></span> </marquee> </p> </body> </html>
/** * Returns CareerSubjectSchoolYears for a given examination and year * * @param Examination $examination * @param Integer $year * @param PropelPDO $con * @return CareerSubjectSchoolYear[] */ public static function retrieveForExaminationAndYear(Examination $examination, $year, PropelPDO $con = null) { $con = is_null($con) ? Propel::getConnection() : $con; $c = new Criteria(); $c->addJoin(CourseSubjectStudentExaminationPeer::COURSE_SUBJECT_STUDENT_ID, CourseSubjectStudentPeer::ID); $c->addJoin(CourseSubjectStudentPeer::COURSE_SUBJECT_ID, CourseSubjectPeer::ID); $c->addJoin(CourseSubjectPeer::CAREER_SUBJECT_SCHOOL_YEAR_ID, self::ID); $c->addJoin(self::CAREER_SCHOOL_YEAR_ID, CareerSchoolYearPeer::ID); $c->add(CareerSchoolYearPeer::SCHOOL_YEAR_ID, $examination->getSchoolYearId()); $c->add(CourseSubjectStudentExaminationPeer::EXAMINATION_NUMBER, $examination->getExaminationNumber()); $c->addJoin(CareerSubjectPeer::ID, self::CAREER_SUBJECT_ID); $c->add(CareerSubjectPeer::YEAR, $year); $c->setDistinct(); return self::doSelect($c, $con); }
<input type="submit" name="btnclrdata" value="Clear Data" class="style3" /> <input type="submit" name="btndeldata" value="Delete Record" class="style3" onclick="return emptyDel()"/> </td> </tr> <?php if (isset($_POST['btnget']) && isset($_POST['stdid']) && isset($_POST['subjid'])) { //get details in database $getstdid = $_POST['stdid']; $getsubjid = $_POST['subjid']; $get_details = "SELECT grade,att_percnt FROM result \n\t\t\t\t\t\tWHERE r_stdId='{$getstdid}' AND r_subjId='{$getsubjid}'"; $get_details_res = mysql_query($get_details); $getgrade = mysql_result($get_details_res, 0, 'grade') or die("<br /><font color='red'>\n\t\tError, Selected Subject Grade for the Student is NOT in the database</font><br />\n\t\t<a href='resultdata.php'><b> Go Back</b></a>"); $getatt = mysql_result($get_details_res, 0, 'att_percnt'); } elseif (isset($_POST['btndeldata']) && $_POST['stdid'] != "" && $_POST['subjid'] != "") { $delete = new Examination(); $delete->deleteResults(); } elseif (isset($_POST['btnclrdata'])) { //clears form data to get an empty form header("Location:resultdata.php"); } mysql_close(); ?> <tr><td><br /></td></tr> <tr> <td><b>Student ID:</b></td> <td><input type="text" name="stid" class="style3" maxlength="6" size="6" value="<?php //get student id if (isset($_POST['btnget']) && $_POST['stdid'] != "SELECT" && $_POST['subjid'] != "SELECT") {