// prepare filter fields $ffst = Student::filterFields(); $fftst = Test::filterFields(); $ffs = array_merge($ffst, $fftst); // fields we don't need here: unset($ffs['gender']); unset($ffs['status']); // additional fields $tempStd = new Student(); $ffs['person_id'] = new FilterField($tempStd->person_id); //$ffs['first_name'] = new FilterField($tempStd->first_name); //$ffs['last_name'] = new FilterField( $tempStd->last_name); $ffs['roll_num'] = new FilterField($tempStd->roll_num); unset($tempStd); $filterOptions = new FilterOptions($ffs); $students = $filterOptions->getRecords('Student'); $testObjects = $filterOptions->getRecords('Test'); //pr($filterOptions); $testRecords = Student::testRecordsAll($students, $testObjects); ?> <?php echo $filterOptions->markup(); ?> <?php if ($testObjects && $students && $testRecords) { echo "<div id='stReptMainCntnr' class='row'>"; echo "<div class='col-lg-6 col-lg-offset-3 col-sm-12'>"; // make tests editable: $html->echoHiddenInputs(new Test());
if (isset($_POST['heads'])) { foreach ($_POST['heads'] as $key => $value) { $heads[] = $key; } $curPage->saveConfig('heads', $heads); } // data and variables $classname = $_GET['classname']; // data for filter options: $filterOptions = new FilterOptions($classname::filterFields()); //pr($filterOptions); // data for headsToDisplayMarkup.php $headsToDisplay = $classname::reportHeads(); // data for list_reportMarkup.php $curPage->saveConfig('pagination', true); $records = $filterOptions->getRecords($classname); $visibleHeads = $curPage->getConfig('heads'); if (empty($visibleHeads)) { $visibleHeads = $classname::visibleReportHeads(); } ?> <h2><?php echo $currentPageTitle; ?> </h2> <?php if ($classname == "Log_messag") { echo "<p><a href='" . $_SERVER['REQUEST_URI'] . "&clearLog=true' class='danger_link'>Clear Log</a></p>"; }
<?php require_once 'html_components/require_comps_start.php'; ?> <?php // handle post requests require_once "html_components/records_post_handler.php"; // data and variables $classname = 'Class_attendance_record'; $filterOptions = new FilterOptions(Class_attendance_record::filterFields()); $class = new Clas($filterOptions->filterFields['class_id']->val); $config = !empty($filterOptions->filterFields['section']->val) ? array('condition' => "section = '" . $filterOptions->filterFields['section']->val . "'") : array(); $students = $class->students($config); $classAttendanceRecs = $filterOptions->getRecords($classname); ?> <h2><?php echo $currentPageTitle; ?> </h2> <?php echo $filterOptions->markup(); ?> <?php if ($classAttendanceRecs && $students) { // prepare heads $heads = array('date', 'total_lectures'); $headArrays = array();
<?php require_once 'html_components/require_comps_start.php'; // data for filter options: $filterOptions = new FilterOptions(Student::filterFields()); $students = $filterOptions->getRecords('Student'); ?> <h2><?php echo $currentPageTitle; ?> </h2> <?php echo $filterOptions->markup(); ?> <?php // handle post request if (isset($_POST['apply'])) { //prpost(); if (!isset($_POST['student_ids'])) { $html->echoError("Please select students"); } elseif (!isset($_POST['months'])) { $html->echoError("Please select months"); } else { foreach ($_POST['student_ids'] as $stId) { $student = $students[$stId]; $class = $student->clas(); foreach ($_POST['months'] as $m) { // check if a voucher is already present for that month // if not present, add a new fee voucher
<?php require_once 'html_components/require_comps_start.php'; ?> <?php // handle post requests require_once "html_components/records_post_handler.php"; // data and variables $classname = 'Test'; $filterOptions = new FilterOptions($classname::filterFields()); $class = new Clas($filterOptions->filterFields['class_id']->val); $config = !empty($filterOptions->filterFields['section']->val) ? array('condition' => "section = '" . $filterOptions->filterFields['section']->val . "'") : array(); $students = $class->students($config); $testObjects = $filterOptions->getRecords($classname); $testRecords = Student::testRecordsAll($students, $testObjects); ?> <h2><?php echo $currentPageTitle; ?> </h2> <?php echo $filterOptions->markup(); ?> <?php if ($testObjects && $students && $testRecords) { // prepare heads $heads = array('subject_id', 'syllabus', 'date', 'max_marks');