$fee = "N/A";
                } else {
                    $fee = $type_fee;
                }
                break;
            default:
                $fee = "0";
        }
        ?>
 
                      <tr>
           <td style="font-size: 11px;"><?php 
        echo $i;
        ?>
. <?php 
        echo getDepartmentCenterCourse($dccode, $bt);
        ?>
</td>
     
      <td style=""><span class="label label-default"><?php 
        echo getSemester($semcode);
        ?>
</span></td>
       <td><span class="label label-default"><?php 
        echo getSession($sess);
        ?>
</span></td>
       <td><span class="label label-default"><?php 
        echo getFeeCat($feecat);
        ?>
</span>
Beispiel #2
0
<span title="This information is currently not available" class="label label-danger">N/A</span>
<?php 
        }
        ?>
    </td>
<td style="color:#3b5999" align="center"><?php 
        echo $row['student_name'];
        ?>
</td>
 
  
  
  
  <td style="color:#3b5999" align="center"><?php 
        echo getDepartmentCenterCourse($row['dept_center_course_code'], $bt);
        ?>
  
 </td>
 <td style="color:#3b5999" align="center"><?php 
        echo getSemester($row['semester_code']);
        ?>
</td>
 <td style="color:#3b5999" align="center"><?php 
        echo $row['year_of_admission'];
        ?>
</td>
 <td align="center">
    <a id="viewer_<?php 
        echo $row['sl'];
        ?>
    $F->setCellValue('L' . $Line, $r['sex']);
    $F->setCellValue('M' . $Line, $r['community']);
    $F->setCellValue('N' . $Line, $r['region']);
    $F->setCellValue('O' . $Line, getFeeCategory($r['fee_category']));
    $F->setCellValue('P' . $Line, $r['mb_no']);
    $F->setCellValue('Q' . $Line, $r['email_id']);
    $F->setCellValue('R' . $Line, getSemester($r['fee_paid_upto_semester_code']));
    $F->setCellValue('S' . $Line, $reside);
    $F->setCellValue('T' . $Line, $r['student_id']);
    $F->setCellValue('U' . $Line, $r['password']);
    $F->setCellValue('V' . $Line, getCreator($r['created_by_id']));
    $Line = $Line + 1;
}
header('Content-Type: application/vnd.ms-excel');
$resolve = getDepartmentCenter($deptidcenterid, 'dept');
$resolvecourse = getDepartmentCenterCourse($courseid, 'dept');
$filename = 'DU Student Data- ' . $resolve . "-" . $resolvecourse . "-" . time() . ".xls";
header("Content-Disposition: attachment;filename=" . $filename);
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
//$objWriter->save(str_replace('.php', '.xls', __FILE__));
$objWriter->save('php://output');
exit;
function getDepartmentCenter($dccode, $btype)
{
    if ($btype == 'center') {
        $q14 = mysql_query("select * from center where center_code={$dccode}");
        $c_name = mysql_fetch_array($q14);
        return $c_name['center_name'];
    } else {
        //dept
    $F->setCellValue('L' . $Line, $r['sex']);
    $F->setCellValue('M' . $Line, $r['community']);
    $F->setCellValue('N' . $Line, $r['region']);
    $F->setCellValue('O' . $Line, getFeeCategory($r['fee_category']));
    $F->setCellValue('P' . $Line, $r['mb_no']);
    $F->setCellValue('Q' . $Line, $r['email_id']);
    $F->setCellValue('R' . $Line, getSemester($r['fee_paid_upto_semester_code']));
    $F->setCellValue('S' . $Line, $reside);
    $F->setCellValue('T' . $Line, $r['student_id']);
    $F->setCellValue('U' . $Line, $r['password']);
    $F->setCellValue('V' . $Line, getCreator($r['created_by_id']));
    $Line = $Line + 1;
}
header('Content-Type: application/vnd.ms-excel');
$resolve = getDepartmentCenter($deptidcenterid, 'center');
$resolvecourse = getDepartmentCenterCourse($courseid, 'center');
$filename = 'DU Student Data- ' . $resolve . "-" . $resolvecourse . "-" . time() . ".xls";
header("Content-Disposition: attachment;filename=" . $filename);
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
//$objWriter->save(str_replace('.php', '.xls', __FILE__));
$objWriter->save('php://output');
exit;
function getDepartmentCenter($dccode, $btype)
{
    if ($btype == 'center') {
        $q14 = mysql_query("select * from center where center_code={$dccode}");
        $c_name = mysql_fetch_array($q14);
        return $c_name['center_name'];
    } else {
        //dept
$F->setCellValue('M1', 'INTERNET FEE');
$F->setCellValue('N1', 'LABORATORY FEE');
$F->setCellValue('O1', 'STUDENT SAFETY INSURANCE');
$F->setCellValue('P1', 'SPORTS FEE');
$F->setCellValue('Q1', 'HOSTEL FEE');
$F->setCellValue('R1', 'GRAND TOTAL');
$F->setCellValue('S1', 'FEE CATEGORY');
$F->setCellValue('T1', 'FEE STATUS');
$F->setCellValue('U1', 'CREATOR');
$sql = "SELECT * from  fee_structure ORDER BY fee_id desc";
$rs = mysql_query($sql);
while ($r = mysql_fetch_array($rs)) {
    $bt = $r['type'];
    $F->setCellValue('A' . $Line, $r['fee_id']);
    $F->setCellValue('B' . $Line, getDepartmentCenter($r['center_dept_code'], $bt));
    $F->setCellValue('C' . $Line, getDepartmentCenterCourse($r['course_code'], $bt));
    $F->setCellValue('D' . $Line, getSession($r['session']));
    $F->setCellValue('E' . $Line, getSemester($r['sem_year']));
    $F->setCellValue('F' . $Line, $r['admission_fee']);
    $F->setCellValue('G' . $Line, $r['course_fee_year_sem']);
    $F->setCellValue('H' . $Line, $r['course_fee_parameter']);
    $F->setCellValue('I' . $Line, $r['library_fee']);
    $F->setCellValue('J' . $Line, $r['union_magazine']);
    $F->setCellValue('K' . $Line, $r['saf_fee']);
    $F->setCellValue('L' . $Line, $r['development_fee']);
    $F->setCellValue('M' . $Line, $r['interent_fee']);
    $F->setCellValue('N' . $Line, $r['laboratory_fee']);
    $F->setCellValue('O' . $Line, $r['student_safety']);
    $F->setCellValue('P' . $Line, $r['sports_fee']);
    $F->setCellValue('Q' . $Line, $r['hostel_fee']);
    $F->setCellValue('R' . $Line, $r['total_fee']);
$F->setCellValue('T1', 'LOGIN-ID');
$F->setCellValue('U1', 'PASSWORD(OTP)');
$F->setCellValue('V1', 'CREATOR');
$sql = "SELECT * from student_details where dept_center_code={$deptidcenterid}";
$rs = mysql_query($sql);
while ($r = mysql_fetch_array($rs)) {
    $hostel = $r['reside'];
    if ($hostel == 1) {
        $reside = "HOSTEL";
    } else {
        $reside = "OUTSIDE";
    }
    $F->setCellValue('A' . $Line, $r['student_id']);
    $F->setCellValue('B' . $Line, $r['student_name']);
    $F->setCellValue('C' . $Line, getDepartmentCenter($r['dept_center_code'], 'dept'));
    $F->setCellValue('D' . $Line, getDepartmentCenterCourse($r['dept_center_course_code'], 'dept'));
    $F->setCellValue('E' . $Line, getSemester($r['semester_code']));
    $F->setCellValue('F' . $Line, $r['year_of_admission']);
    $F->setCellValue('G' . $Line, $r['registration_no']);
    $F->setCellValue('H' . $Line, $r['roll_no']);
    $F->setCellValue('I' . $Line, $r['fathers_name']);
    $F->setCellValue('J' . $Line, $r['mothers_name']);
    $F->setCellValue('K' . $Line, $r['dob']);
    $F->setCellValue('L' . $Line, $r['sex']);
    $F->setCellValue('M' . $Line, $r['community']);
    $F->setCellValue('N' . $Line, $r['region']);
    $F->setCellValue('O' . $Line, getFeeCategory($r['fee_category']));
    $F->setCellValue('P' . $Line, $r['mb_no']);
    $F->setCellValue('Q' . $Line, $r['email_id']);
    $F->setCellValue('R' . $Line, getSemester($r['fee_paid_upto_semester_code']));
    $F->setCellValue('S' . $Line, $reside);
                    <th style="width:50%; color:green"><strong>Department</strong><strong></th>
                    <th style="  color:green"><strong>Course</strong></th>
                    <th style="  color:green"><strong>Semester</strong></th>
                    
                    <th style=" color:green"><strong>Roll#</strong></th>
                    <th style=" color:green"><strong>Regn#</strong></th>
                  </tr>
                </thead>
                <tbody class="no-border-x no-border-y">
                  <tr>
                    <td style="width:30%;"><?php 
echo getDepartmentCenter($dept_center_code, $belongs_to_center_dept);
?>
</td>
                    <td><?php 
echo getDepartmentCenterCourse($dept_center_course_code, $belongs_to_center_dept);
?>
</td>
                    <td><?php 
echo getSemester($semester_code);
?>
</td>
                    <td><?php 
if ($roll_no != 'Not Available') {
    ?>
      <span class="label label-success"><?php 
    echo $roll_no;
    ?>
</span>
<?php 
} else {