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jcLdp:%~zHdKekE1_ߗ< 7tANIܸ~ #~`"y%#k6a #a/R:/7}u6I}es B,4&!%8TSR6-:I_Є :V=V?h3(\#N~]*vOVBB2('Ru<$,#(l:0>uvm؂š3nd^:NݣW'⏀*10ogBE[׬qu\BB96_C[UtyH(®?i( *g?Ybյjn"R6V5xϙ}w(7 Uh?v%/%vH}74ǴJaqheDF4]]o Sъ%0Ujh28wV0γi~=#dPiIYoi\k'_YXba]錐>܇ nVOcDJs6AĽQ)C'̤U+u"ŽQy# 61RK;B۸V-usD.'hUBl5c})ejXڟX[3ox(%fJ!Ű{BVPpǦX'!AaF@i 9?} ohwKAH+V3M4q_{ޠj;=GX&sg܇ nVOcDJױn5~QU<MfA5î+CD})ejXڟX‰rVrP6|fr's38G~ 0f]jҮ7>J1ޓ~6xVS_V|pdcs9dӨ9tJX|sm9FFct uXQEjpWyb8-Kv]yXn Jdc I<~^n Xn JdcD;3e' c`O&(1@&%iuo=zNHQ Wy~yv&]oC_ǝ;e bL~ agP$C yDo_Y,Y)r/ZA =P:ܹCWbĦ}c|ӳ[y.D 7/CoO](*I$earlyOutMints&from=$from&to=$to&keyword=$keyword&shiftID=$shiftID','_Blank')"; //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['btnAttendanceReport3All'])){ $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 ""; } 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 */ ?>