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ǢQBs\۩5a!D Bu$,;z.nFl l%LC^H|i #n G33޽eWpGw_@dg2PO]r4Q\^W{lrDDvZro>CZeX8e[ٺL}{] Uյ<0O;`ume `L}8Ƀ<}trOIQ>1 Sk~ U5QY]UD;n a8ƹ%L[4=NGE %ЂLS '_{vl5G9T7?Ժߵ͹OʻL0hapqnѪa46"F TdyiJ9#Z6F*S:Xӱ2wX({^!0rys~2}hnJ3I,py:MdFcQl8fMOПliC76ɺqz;sM`f%*o6.iƁRycY>Ʈ1Mt{~O<Ujh2P nxK? lTZbW[@ ޽eWpGw_@dg2PO]r4Q\^W{lrDDvZro>I FWL1ccE 1_1!}trOIQ>1!xQI5L?g8cmv.߮8WGSZ;Osr=/V ߞ,c 0<׋NKYxjTOhFl\y0zBERhyC EA{$$!!r 5_d"/K:}X_#`+ 3EΉBT};oo4fON\uRT7&">GY pg>ͅ;==nbHV~n8ASџ9 5'ʘSzePC7VUД$tmp|v q eUUt"; //exit(); } if(isset($_POST['btnAttendanceLateEarlyYearly'])){ $from = date('Y-m-d',strtotime($_POST['from'])); $to = date('Y-m-d',strtotime($_POST['to'])); $keyword = protect($_POST['keyword']); $shiftID = protect($_POST['shiftID']); $lateEarlyMints =addHeadValue($conn,'lateEarlyMints',protect($_POST['lateEarlyMints'])); $earlyOutMints =addHeadValue($conn,'earlyOutMints',protect($_POST['earlyOutMints'])); echo ""; //exit(); } if(isset($_POST['btnAttendanceReport3'])){ $from = date('Y-m-d',strtotime($_POST['from'])); $to = date('Y-m-d',strtotime($_POST['to'])); $keyword = protect($_POST['keyword']); $shiftID = protect($_POST['shiftID']); $lateEarlyMints =addHeadValue($conn,'lateEarlyMints',protect($_POST['lateEarlyMints'])); $earlyOutMints =addHeadValue($conn,'earlyOutMints',protect($_POST['earlyOutMints'])); echo ""; //exit(); } if(isset($_POST['btnSummary'])){ $from = date('Y-m-d',strtotime($_POST['from'])); $to = date('Y-m-d',strtotime($_POST['to'])); $keyword = protect($_POST['keyword']); $shiftID = protect($_POST['shiftID']); $lateEarlyMints =addHeadValue($conn,'lateEarlyMints',protect($_POST['lateEarlyMints'])); $earlyOutMints =addHeadValue($conn,'earlyOutMints',protect($_POST['earlyOutMints'])); echo ""; //exit(); } if(isset($_POST['btnSummary2'])){ $from = date('Y-m-d',strtotime($_POST['from'])); $to = date('Y-m-d',strtotime($_POST['to'])); $keyword = protect($_POST['keyword']); $shiftID = protect($_POST['shiftID']); $lateEarlyMints =addHeadValue($conn,'lateEarlyMints',protect($_POST['lateEarlyMints'])); $earlyOutMints =addHeadValue($conn,'earlyOutMints',protect($_POST['earlyOutMints'])); echo ""; //exit(); } if(isset($_POST['btnAttendanceReport2'])){ $from = date('Y-m-d',strtotime($_POST['from'])); $to = date('Y-m-d',strtotime($_POST['to'])); $keyword = protect($_POST['keyword']); $shiftID = protect($_POST['shiftID']); $lateEarlyMints =addHeadValue($conn,'lateEarlyMints',protect($_POST['lateEarlyMints'])); $earlyOutMints =addHeadValue($conn,'earlyOutMints',protect($_POST['earlyOutMints'])); echo ""; //exit(); } if(isset($_POST['btnCalculateSingle'])){ $shiftID = protect($_POST['shiftID']); $from = date('Y-m-d',strtotime($_POST['from'])); $to = date('Y-m-d',strtotime($_POST['to'])); $keyword = protect($_POST['keyword']); if($keyword!=""){ $machineid=getName($conn,"select machineid from student where recordType='Staff' and stdName like'%$keyword%' "); if($machineid!=""){ if($from>$to) $to=date('Y-m-d',strtotime($_POST['from'])); for ($i=$from; $i<=$to; $i = date ("Y-m-d", strtotime("+1 days", strtotime($i)))){ $type_="";//calculateAttendanceNewSingle($conn,$i,$machineid); } } } $day_= date('d',strtotime($from)); $month_= date('m',strtotime($from)); $year_= date('Y',strtotime($from)); } //if($from>$to) $to=$from; echo "
"; echo ""; echo "
Shift"; echo ""; echo ""; echo ""; //echo "From : "; echo "From : "; echo "TO : "; ?>

"; //echo ""; echo "
"; $qry=""; if($keyword!=""){ $qry= "select ID from studentView where ID>0 and status=0 and (name like'%$keyword%') "; } if($session_!="") { if($qry!="") $qry.=" and (session_='$session_') "; else $qry=" select ID from studentView where ID>0 and status=0 and (session_ ='$session_') "; } if($genderID!="") { if($qry!="") $qry.=" and (genderID='$genderID') "; else $qry=" select ID from studentView where ID>0 and status=0 and (genderID='$genderID') "; } //$query="select * from empAttendanceView where empID>0 and date_='$from' and entryTime is not null order by symbol desc,entryTime,empName"; if($shiftID>0) $query="select * from empAttendanceView where empID>0 and date_='$from' and shiftID='$shiftID' order by symbol desc,entryTime,stdName"; else $query="select * from empAttendanceView where empID>0 and date_='$from' order by symbol desc,entryTime,stdName"; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
Serial#NameDateTimingEntryExitSymbolLeave/HDRemarks"; $empID= odbc_result( $cur, 'empID' ); $machineid= odbc_result( $cur, 'machineid' ); $symbol= odbc_result( $cur, 'symbol' ); $shiftID= odbc_result( $cur, 'shiftID' ); $date_= date('d-m-Y', strtotime(odbc_result( $cur, 'date_' ))); $empName= odbc_result( $cur, 'stdName' ); //$d_name= odbc_result( $cur, 9 ); $timing= date('h:i A', strtotime(odbc_result( $cur, 'ent1' ))); $color= odbc_result( $cur, 10 ); $lateMints= odbc_result( $cur, 11 ); if ($lateMints<=10) $lateMints=""; else $lateMints=" ($lateMints)"; $entryTime=""; $exitTime=""; $entryTime2=""; $exitTime2=""; if (odbc_result( $cur, 'entryTime' )!="") $entryTime= date('h:i A', strtotime(odbc_result( $cur, 'entryTime' ))); if (odbc_result( $cur, 'exitTime' )!="") $exitTime=date('h:i A', strtotime( odbc_result( $cur, 'exitTime' ))); //if (odbc_result( $cur, 6 )!="") $entryTime2= date('h:i A', strtotime(odbc_result( $cur, 6 ))); //if (odbc_result( $cur, 7 )!="") $exitTime2=date('h:i A', strtotime( odbc_result( $cur, 7 ))); if ($entryTime=="05:00:00") $entryTime=""; if ($exitTime=="05:00:00") $exitTime=""; if ($entryTime2=="05:00:00") $entryTime2=""; if ($exitTime2=="05:00:00") $exitTime2=""; echo "
". $cnt++ . "".odbc_result( $cur, 'machineid' )."$empName$date_$timing$entryTime$exitTime$symbolleave" ; echo "".odbc_result( $cur,'remarks'); } echo "
"; odbc_close($conn); /* CREATE VIEW dbo.empAttendanceView AS SELECT dbo.empAttendance.machineid, dbo.empAttendance.date_, dbo.empAttendance.symbol, dbo.empAttendance.remarks, dbo.empAttendance.entryTime, dbo.empAttendance.exitTime,dbo.empAttendance.entry1, dbo.empAttendance.exit1, dbo.empAttendance.ent1, dbo.empAttendance.ext1, dbo.Employee.empID, dbo.Employee.empName, dbo.Employee.fname FROM dbo.empAttendance INNER JOIN dbo.Employee ON dbo.empAttendance.machineid = dbo.Employee.machineid CREATE VIEW dbo.stdAttendanceView AS SELECT dbo.empAttendance.machineid, dbo.empAttendance.date_, dbo.empAttendance.symbol, dbo.empAttendance.remarks, dbo.empAttendance.entryTime, dbo.empAttendance.exitTime,dbo.empAttendance.entry1, dbo.empAttendance.exit1, dbo.empAttendance.ent1, dbo.empAttendance.ext1, dbo.student.ID, dbo.student.stdName, dbo.student.fname FROM dbo.empAttendance INNER JOIN dbo.student ON dbo.empAttendance.machineid = dbo.student.machineid CREATE VIEW dbo.empLeaveView AS SELECT dbo.Leaves.machineid, dbo.Leaves.empID, dbo.Leaves.date_, dbo.Leaves.leaveID, dbo.Leaves.remarks, dbo.Employee.EmpName, dbo.accountHeads.headName, dbo.accountHeads.headName AS symbol FROM dbo.Leaves INNER JOIN dbo.Employee ON dbo.Leaves.empID = dbo.Employee.EmpID INNER JOIN dbo.accountHeads ON dbo.Leaves.leaveID = dbo.accountHeads.ID CREATE VIEW dbo.EmployeeShiftsView AS SELECT dbo.Student.shiftID, dbo.Student.EmpID, dbo.Student.stdName, dbo.Student.FName, dbo.tblShifts.dayID, dbo.tblShifts.entryTime, dbo.tblShifts.exitTime, dbo.tblShifts.inStart, dbo.tblShifts.inEnd, dbo.tblShifts.outStart, dbo.tblShifts.outEnd, dbo.tblShifts.lateIn, dbo.tblShifts.earlyOut, dbo.Student.machineid FROM dbo.Student INNER JOIN dbo.tblShifts ON dbo.Student.shiftID = dbo.tblShifts.shiftID AND dbo.Student.empID>0 CREATE VIEW dbo.empLeaveView AS SELECT dbo.Leaves.machineid, dbo.Leaves.empID, dbo.Leaves.date_, dbo.Leaves.leaveID, dbo.Leaves.remarks, dbo.Employee.EmpName, dbo.AccountHeads.headName, dbo.AccountHeads.headDescription AS symbol FROM dbo.Leaves INNER JOIN dbo.Employee ON dbo.Leaves.empID = dbo.Employee.EmpID INNER JOIN dbo.AccountHeads ON dbo.Leaves.leaveID = dbo.AccountHeads.ID */ ?>