Example #1
0
<?php

#$page_list = array();
if (!empty($page_list)) {
    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>Exam &nbsp;<a class='fancybox fancybox.ajax' href='" . base_url() . "exams/load_exam_form')' title='Click to add an exam'><img src='" . base_url() . "images/add_item.png' border='0'/></a></td>\r\r\n\t\t\t<td class='listheader' nowrap>% Contribution</td>\r\r\n           \t<td class='listheader' nowrap>Term</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);
        #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>";
        #}
Example #2
0
                    </select>
                      <?php 
}
?>

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

                      <select name="admissionterm" id="admissionterm"  class="selectfield"> <?php 
    echo get_select_options($terms, 'id', 'term', !empty($studentdetails['admissionterm']) ? $studentdetails['admissionterm'] : '', 'Y', 'Select Term');
    ?>

                    </select>
                      <?php 
    echo get_required_field_wrap($requiredfields, 'admissionterm', 'end');
}
?>
Example #3
0
            <td valign="top">
            
            <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>";
            }