function getElement($uid) { $sql = "SELECT year FROM student WHERE uid = {$uid}"; $res = mysql_query($sql); $year = mysql_fetch_assoc($res)["year"]; $semester = returnSemester(date("Y-m-d", time()), $year); $sql = "UPDATE student SET semester = {$semester} WHERE uid = {$uid}"; mysql_query($sql); $sql = "SELECT * FROM student WHERE uid = {$uid}"; $res = mysql_query($sql); $arr = @mysql_fetch_assoc($res); $back[0] = array('url' => $arr["photo"], 'name' => $arr["name"], 'stuid' => $arr["stu_id"], 'college' => $arr["department"], 'major' => $arr["major"], 'nation' => $arr["nation"], 'gender' => $arr["sex"], 'birthday' => $arr["birth"], 'bloodType' => $arr["blood_type"], 'placeOfOrigin' => $arr["hometown"], 'religion' => $arr["religion"], 'nationality' => $arr["country"], 'year' => $arr["year"]); $num = 0; $year = $arr["year"]; $sql = "SELECT semester FROM score WHERE uid = {$uid} ORDER BY semester DESC"; $res = mysql_query($sql); $semester = @mysql_fetch_assoc($res)["semester"]; $str = getSemester($year, $semester); $sql = "SELECT semester,class_score,sci_score,social_score,sum_score FROM score WHERE uid = {$uid} ORDER BY semester"; $res = mysql_query($sql); while ($arr = @mysql_fetch_assoc($res)) { $back[1][$num] = array("term" => $str[$num], "grade" => $arr["class_score"], "tech" => $arr["sci_score"], "prac" => $arr["social_score"], "total" => $arr["sum_score"]); $num++; } return $back; }
</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']; ?> " target="_blank" title="View and manage complete student profile" class="label label-success" href="<?php echo $base; ?> universityStudentProfileWindowViewer.php?sl=<?php echo base64_encode($row['sl']);
$employeeNetId = $_POST['employeeNetId']; } elseif (isset($_POST['employeeReviewedNetID'])) { $employeeNetId = $_POST['employeeReviewedNetID']; } else { $employeeNetId = $netID; } try { $employeeQuery = $db->prepare("SELECT * FROM employee WHERE `netID` = :netId LIMIT 1"); $employeeQuery->execute(array(':netId' => $employeeNetId)); } catch (PDOException $e) { exit("error in query"); } $employeeReviewed = $employeeQuery->fetch(PDO::FETCH_ASSOC); //textual representation of the semester name $semesterName = getSemesterName(date("Y-m-d")); $curPeriod = getSemester(date("Y-m-d")); try { $semestersQuery = $db->prepare("SELECT * FROM scheduleSemesters WHERE semester = :period AND `area` = :area"); $semestersQuery->execute(array(':period' => $curPeriod, ':area' => $area)); } catch (PDOException $e) { exit("error in query"); } $period = $semestersQuery->fetch(PDO::FETCH_ASSOC); $start = $period['startDate']; $end = $period['endDate']; ?> <link rel="stylesheet" type="text/css" href="ticketStyle.css" /> <link rel="stylesheet" type="text/css" href="ticketReviewStats.css" /> <style type="text/css"> .tableCenter {
function calculatePreviousPeriodPercentAllTeams($area, $startDate) { global $db; $timelyTally = 0; $teamedTally = 0; //textual representation of the semester name $curPeriod = getSemester($startDate); try { $semestersQuery = $db->prepare("SELECT * FROM scheduleSemesters WHERE semester= :period AND `area`=:area"); $semestersQuery->execute(array(':period' => $curPeriod, ':area' => $area)); } catch (PDOException $e) { exit("error in query"); } $period = $semestersQuery->fetch(PDO::FETCH_ASSOC); $start = $period['startDate']; $end = $period['endDate']; try { $logQuery = $db->prepare("SELECT * FROM teamingLog WHERE startDate >= :start AND endDate <= :end AND `area` = :area"); $logQuery->execute(array(':start' => $start, ':end' => $end, ':area' => $area)); } catch (PDOException $e) { exit("error in query"); } $divBy = 0; while ($cur = $logQuery->fetch(PDO::FETCH_ASSOC)) { $divBy++; if ($cur['teamed'] == 1) { $teamedTally++; } if ($cur['timely'] == 1) { $timelyTally++; } } if ($divBy == 0) { return "- : -"; } $teamedTally = round($teamedTally / $divBy * 100, 1); $timleyTally = round($timelyTally / $divBy * 100, 1); $return = $teamedTally . " : " . $timleyTally; return $return; }
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> <?php if ($fee != "N/A") { ?> <br/><br/> <?php
$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); $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');
$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('S' . $Line, getFeeCategory($r['fee_category_id'])); if ($r['status'] == 1) {
$employeeQuery->execute(array(':employee' => $worker['employee'])); } catch (PDOException $e) { exit("error in query"); } $employeeInfoResults = $employeeQuery->fetch(PDO::FETCH_ASSOC); $employeePhone = $employeeInfoResults['phone']; $employeeLevel = $employeeInfoResults['certificationLevel']; $formattedEmpPhone = $employeePhone; //formmattedPhone($employeePhone); // Get employee's shift $check_datetime = time() + $hourMod * 60 * 60; $check_employee = $worker['employee']; $check_weekday = date('N', $check_datetime); $check_date = date('Y-m-d', $check_datetime); $check_time = date('H:i', $check_datetime); $check_semester = getSemester($check_date); try { $weeklyQuery = $db->prepare("SELECT scheduleWeekly.endTime FROM scheduleWeekly WHERE employee=:employee AND scheduleWeekly.startTime <= :time AND (scheduleWeekly.endTime >= :time1 OR scheduleWeekly.endTime='00:00:00') AND scheduleWeekly.startDate = :start AND scheduleWeekly.deleted=0 LIMIT 1"); $weeklyQuery->execute(array(':employee' => $check_employee, ':time' => $check_time, ':time1' => $check_time, ':start' => $check_date)); $defaultQuery = $db->prepare("SELECT scheduleDefault.endTime FROM scheduleDefault LEFT JOIN scheduleSemesters ON scheduleDefault.period=scheduleSemesters.id WHERE employee=:employee AND scheduleSemesters.semester=:semester AND scheduleDefault.startTime <= :time AND (scheduleDefault.endTime >= :time1 OR scheduleDefault.endTime='00:00:00') AND scheduleDefault.startDate = :day AND scheduleDefault.deleted=0 LIMIT 1"); $defaultQuery->execute(array(':employee' => $check_employee, ':semester' => $check_semester, ':time' => $check_time, ':time1' => $check_time, ':day' => $check_weekday)); } catch (PDOException $e) { exit("error in query<br><br>" . $e->getMessage()); } $employeeShift = array(); // First check for shifts added to the weekly schedule // If no results are found, use the default schedule if (!($employeeShift = $weeklyQuery->fetch(PDO::FETCH_ASSOC))) { $employeeShift = $defaultQuery->fetch(PDO::FETCH_ASSOC); } $employeeShift = $employeeShift['endTime'];
function createWeekPostEntries($date) { $semester = getSemester($date); if ($semester == "") { createPostEntry(getSaturday($date)); } else { $startDate = getSaturday(getSemesterStartDate($semester)); $endDate = getSaturday(getSemesterEndDate($semester)); $firstWeek = date("W", strtotime($startDate)); $lastWeek = date("W", strtotime($endDate)); if ($firstWeek > $lastWeek) { for ($h = 0; $h <= 53 - $firstWeek; $h++) { $currentWeek = date("Y-m-d", strtotime($startDate . " + " . $h . " weeks")); createPostEntry($currentWeek); } $firstWeek = 0; } for ($i = 0; $i <= $lastWeek - $firstWeek; $i++) { $currentWeek = date("Y-m-d", strtotime($startDate . " + " . $i . " weeks")); createPostEntry($currentWeek); } } }
<th style=" color:green"><strong>Fees Category</strong></th> <th style=" color:green"><strong>Where to reside?</strong></th> <th style=" color:green"><strong>Amount Paid:</strong></th> <th style=" color:green"><strong>Fee Recept No.:</strong></th> </tr> </thead> <tbody class="no-border-x no-border-y"> <tr> <td style="width:10%;"><?php echo $year_of_admission; ?> </td> <td><?php echo getSemester($fee_paid_upto_semester_code); ?> </td> <td><?php echo getFeeCategory($fee_category); ?> </td> <td><?php if ($reside == 1) { echo "HOSTEL"; } else { echo "OUTSIDE"; } ?> </td>