Example #1
0
    echo get_required_field_wrap($requiredfields, 'admissionterm', 'end');
}
?>

                    </td>
                  </tr>
                  
                  <tr>
                    <td nowrap="nowrap" class="label"> Class of Admission :<?php 
echo $indicator;
?>
 </td>
                    <td class="field" nowrap>
                      <?php 
if (!empty($isview) || !empty($i)) {
    echo "<span class='viewtext'>" . get_class_title($this, $studentdetails['admissionclass']) . "</span><input name='admissionclass' type='hidden' value='" . $studentdetails['admissionclass'] . "' />";
} else {
    echo get_required_field_wrap($requiredfields, 'admissionclass');
    ?>

                      <select name="admissionclass" id="admissionclass"  class="selectfield"> <?php 
    echo get_select_options($classes, 'id', 'class', !empty($studentdetails['admissionclass']) ? $studentdetails['admissionclass'] : '', 'Y', 'Select Class');
    ?>

                    </select>
                      <?php 
    echo get_required_field_wrap($requiredfields, 'admissionclass', 'end');
}
?>

                    </td>
Example #2
0
 echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>\r\r\n          \t<tr>\r\r\n\t\t\t<td class='listheader' width='1%'>&nbsp;</td>\r\r\n           \t<td class='listheader' nowrap>Scale &nbsp;<a class='fancybox fancybox.ajax' href='" . base_url() . "grading/load_grading_form')' title='Click to add a grading scale'><img src='" . base_url() . "images/add_item.png' border='0'/></a></td>\r\r\n\t\t\t<td class='listheader' nowrap='nowrap'>Description</td>\r\r\n\t\t\t<td class='listheader' nowrap>Classes</td>\r\r\n\t\t\t<td class='listheader' nowrap>Date Added</td>\r\r\n\t\t\t</tr>";
 $counter = 0;
 foreach ($page_list as $row) {
     #Get applicable classes
     $class_str = '';
     $classids = explode('|', $row['classes']);
     $classids = remove_empty_indices($classids);
     #Show in drop down if more than 1 class
     if (is_array($classids)) {
         if (count($classids) > 1) {
             foreach ($classids as $key => $classid) {
                 $class_str .= '<option>' . get_class_title($this, $classid) . '</option>';
             }
             $class_str = '<select class="selectfield">' . $class_str . '</select>';
         } elseif (count($classids) > 0) {
             $class_str = get_class_title($this, end($classids));
         }
     } else {
         $class_str = "N/A";
     }
     #Show one row at a time
     echo "<tr id='tr_" . $row['id'] . "' class='listrow' style='" . get_row_color($counter, 2) . "'>\r\r\n\t\t<td class='leftListCell rightListCell' valign='middle' nowrap>";
     #if(check_user_access($this,'delete_deal')){
     echo "<a href='javascript:void(0)' onclick=\"asynchDelete('" . base_url() . "grading/delete_grading_scheme/i/" . encryptValue($row['id']) . "', 'Are you sure you want to remove this grading scale? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.', 'tr_" . $row['id'] . "');\" title=\"Click to remove " . $row['gradingname'] . " from the school exam schedule.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>";
     #}
     #if(check_user_access($this,'update_deals')){
     echo " &nbsp;&nbsp; <a class='fancybox fancybox.ajax' href='" . base_url() . "grading/load_grading_form/i/" . encryptValue($row['id']) . "' title=\"Click to edit " . $row['gradingname'] . " details.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>";
     #}
     echo "</td>\t\t\r\r\n\t\t\t\t<td valign='middle'>" . $row['gradingname'] . "</td>\t\t\r\r\n\t\t\t\t<td valign='middle'>" . $row['description'] . "</td>\t\t\t\t\r\r\n\t\t\t\t<td valign='middle' nowrap>" . $class_str . "</td>\r\r\n\t\t\t\t<td  class='rightListCell' valign='top'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\t\t\r\r\n\t\t\t</tr>";
     $counter++;
 }
Example #3
0
 foreach ($page_list as $row) {
     #Get applicable classes
     $class_str = '';
     $classids = explode('|', $row['classes']);
     $classids = remove_empty_indices($classids);
     #Get the term details
     $term = get_term_name_year($this, $row['term']);
     #Show in drop down if more than 1 class
     if (is_array($classids)) {
         if (count($classids) > 1) {
             foreach ($classids as $key => $classid) {
                 $class_str .= '<option>' . get_class_title($this, $classid) . '</option>';
             }
             $class_str = '<select class="selectfield">' . $class_str . '</select>';
         } elseif (count($classids) > 0) {
             $class_str = get_class_title($this, $classids[1]);
         }
     } else {
         $class_str = "N/A";
     }
     #Show one row at a time
     echo "<tr id='tr_" . $row['id'] . "' class='listrow' style='" . get_row_color($counter, 2) . "'>\r\r\n\t\t<td class='leftListCell rightListCell' valign='middle' nowrap>";
     #if(check_user_access($this,'delete_deal')){
     echo "<a href='javascript:void(0)' onclick=\"asynchDelete('" . base_url() . "exams/delete_exam/i/" . encryptValue($row['id']) . "', 'Are you sure you want to remove this exam? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.', 'tr_" . $row['id'] . "');\" title=\"Click to remove " . $row['exam'] . " from the school exam schedule.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>";
     #}
     #if(check_user_access($this,'update_deals')){
     echo " &nbsp;&nbsp; <a class='fancybox fancybox.ajax' href='" . base_url() . "exams/load_exam_form/i/" . encryptValue($row['id']) . "' title=\"Click to edit " . $row['exam'] . " details.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>";
     #}
     echo "</td>\t\t\r\r\n\t\t\t\t<td valign='middle'>" . $row['exam'] . "</td>\t\t\r\r\n\t\t\t\t<td valign='middle'>" . $row['contribution'] . "</td>\t\t\t\t\r\r\n\t\t\t\t<td valign='middle' nowrap>" . $term['term'] . " [" . $term['year'] . "]</td>\r\r\n\t\t\t\t<td valign='middle'>" . $class_str . "</td>\r\r\n\t\t\t\t<td valign='middle' class='rightListCell'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\t\t\r\r\n\t\t\t</tr>";
     $counter++;
 }
function current_class($obj, $studentid)
{
    $query = $obj->Query_reader->get_query_by_code('search_register', array('limittext' => '', 'searchstring' => ' student =' . $studentid));
    $result = $obj->db->query($query);
    $termid_str = '';
    foreach ($result->result_array() as $val) {
        if ($termid_str != '') {
            $termid_str .= ',' . $val['term'];
        } else {
            $termid_str .= $val['term'];
        }
    }
    #Get the latest term registered for by the student
    if (!empty($termid_str)) {
        $termdetails = $obj->Query_reader->get_row_as_array('search_terms_list', array('limittext' => '', 'searchstring' => ' AND id IN (' . $termid_str . ')'));
    }
    #Now get the correct details from the register
    if (!empty($termdetails)) {
        $get_class_info = $obj->Query_reader->get_row_as_array('search_register', array('limittext' => '', 'searchstring' => ' student = "' . $studentid . '" AND term = "' . $termdetails['id'] . '"'));
    }
    #Get the class title
    $current_class['class'] = !empty($get_class_info) ? get_class_title($obj, $get_class_info['class']) : '';
    $current_class['classid'] = !empty($get_class_info) ? $get_class_info['class'] : '';
    $current_class['term'] = !empty($termdetails) ? $termdetails['term'] : '';
    $current_class['year'] = !empty($termdetails) ? $termdetails['year'] : '';
    return $current_class;
}
Example #5
0
            <div id="searchresults">
            <?php 
#$page_list = array();
if (!empty($page_list)) {
    echo "<table class='datatable' width='100%' border='0' cellspacing='0' cellpadding='5'>\r\r\n          \t<tr>\r\r\n\t\t\t<td class='listheader' width='1%'>&nbsp;</td>\r\r\n           \t<td class='listheader' nowrap>Student &nbsp;<a class='fancybox fancybox.ajax' href='" . base_url() . "students/load_student_form' title='Click to add a student'><img src='" . base_url() . "images/add_item.png' border='0'/></a></td>\r\r\n\t\t\t<td class='listheader' nowrap>Sponsor</td>\r\r\n\t\t\t<td class='listheader' nowrap>Student No</td>\r\r\n           \t<td class='listheader' nowrap>Age</td>" . ($view_leave ? "<td class='listheader' nowrap>Current Class</td>" . "<td class='listheader' nowrap>Leaves taken</td></tr>" : "<td class='listheader' nowrap>Admission Class</td>\r\r\n\t\t\t<td class='listheader' nowrap>Current Class</td>\r\r\n\t\t\t<td class='listheader' nowrap>Date Added</td>\r\r\n\t\t\t</tr>");
    $counter = 0;
    $current_student = 0;
    #check if user has delete rights
    $delete_students = check_user_access($this, 'delete_students');
    foreach ($page_list as $row) {
        #Show one row at a time
        #Get the admission term title and year
        if (!$view_leave) {
            $admitterminfo = get_term_name_year($this, $row['admissionterm']);
            #Get the admission class
            $admitclass = get_class_title($this, $row['admissionclass']);
        }
        #Get the current class details
        $current_class = current_class($this, $row['id']);
        echo "<tr class='listrow " . ($counter % 2 ? '' : 'grey_list_row') . "' id='student-list-row-" . $row['id'] . "'>\r\r\n\t\t<td class='leftListCell rightListCell' valign='top' nowrap>";
        if ($view_leave) {
            echo " &nbsp;&nbsp; <a href='" . base_url() . "students/load_leave_form/s/" . encryptValue($row['id']) . "' title=\"Click to assign " . $row['firstname'] . " leave.\">Assign leave</a>";
        } else {
            #if(check_user_access($this,'delete_deal')){
            echo "<input class=\"list_checkbox\" type=\"checkbox\" name=\"selected_student[]\" id=\"selected_student_" . $row['id'] . "\" />";
            #}
            if ($delete_students) {
                echo "&nbsp;&nbsp;<a href='javascript:void(0)' onclick=\"asynchDelete('" . base_url() . "students/delete_student/i/" . encryptValue($row['id']) . "', 'Are you sure you want to delete this student? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.','student-list-row-" . $row['id'] . "');\" title=\"Click to remove this student.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>";
            }
            #if(check_user_access($this,'update_deals')){
            //echo " &nbsp;&nbsp; <a onclick=\"updateFieldLayer('".base_url()."students/student_profile/i/".encryptValue($row['id'])."','','','contentdiv','');\" href='javascript:void(0)' title=\"Click to edit ".$row['firstname']."'s details.\"><img src='".base_url()."images/edit.png' border='0'/></a>";
Example #6
0
 function get_subjects_by_class()
 {
     access_control($this);
     # Get the passed details into the url data array if any
     $urldata = $this->uri->uri_to_assoc(3, array('m', 'i', 'sc'));
     # Pick all assigned data
     $data = assign_to_data($urldata);
     $data['class'] = get_class_title($this, $data['sc']);
     $data['class'] = $data['class'] == '' ? '[UNDEFINED CLASS]' : $data['class'];
     #Get the paginated list of the students
     $data['page_list'] = $this->db->query($this->Query_reader->get_query_by_code('search_subjects', array('limittext' => '', 'isactive' => 'Y', 'searchstring' => ' AND classes like "%|' . $data['sc'] . '|%" AND school = ' . $this->myschool['id'])))->result_array();
     $data['area'] = 'class_subjects';
     $this->load->view('incl/addons', $data);
 }