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udq_=~_%LTpnd%Vζ^MȨAH ` .6ՐfMXsk+hռ"* .6"zj8tG{SkQ y*F}r]('gdfq V9]-Y͜䗍n7QD=զz y ^>L琪 _X>Î9x-z~l#6#1S  iF<ܤVK(.;xBt"?_``G9"+G&EG {ӌz&{ Rs~ Ҋ{B ItcflA`t]]dzEPd}C3-S㹧so}r.l[}U J.Iᝆc9%~39S[t.7: _ⱐaLeI%1ky47T#dFф(#^-<7r.Mj!nz!r,H VUک陭 I>_:֪ȠP~ w2ۨ2A5T'< /do%Igau:cK|Y'hyHfj 0 ɉKgvalue='$to' name='to'>"; echo "Show Types"; $query="select distinct symbol from empAttendance where symbol not in ('10','13','11','event') order by symbol"; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { $symbols= odbc_result( $cur, 1 ); echo "$symbols"; } echo "summary Fields"; $query="select distinct symbol from empAttendance where symbol not in ('10','13','11','event') order by symbol"; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { $symbols= odbc_result( $cur, 1 ); echo "$symbols"; } echo "GroupStudents "; echo "
Staff "; echo " Designation "; echo ""; echo ""; if($summary==""){ $query="select distinct symbol from empAttendance where (date_ BETWEEN '$from' AND '$to') order by symbol"; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { if($summary=="") $summary="'".odbc_result( $cur, 1 )."'"; else $summary.=",'".odbc_result( $cur, 1 )."'"; //$leaves[$cnt++]= odbc_result( $cur, 1 ); } } $leaves = array(); if ($symbols2=="") $query="select distinct symbol from empAttendance where (date_ BETWEEN '$from' AND '$to') order by symbol"; else $query="select distinct symbol from empAttendance where (date_ BETWEEN '$from' AND '$to') and symbol in(".$symbols2.") order by symbol"; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { $leaves[$cnt++]= odbc_result( $cur, 1 ); } $arrlength = $cnt-1; count($leaves); // for Student only if ($stdName!=""){ if ($keyword!="") echo $query="select distinct a.machineid,e.stdName,e.stdID from empAttendance a, student e where s.stdID in('$keyword') and e.stdID>0 and a.machineid=e.machineid and (a.date_ BETWEEN '$from' AND '$to') order by e.stdName"; else $query="select distinct a.machineid,e.stdName,e.stdID from empAttendance a, student e where e.stdName like '%$stdName%' and e.stdID>0 and a.machineid=e.machineid and (a.date_ BETWEEN '$from' AND '$to') order by e.stdName"; }else{ $query="select distinct a.machineid,e.stdName,e.stdID from empAttendance a, student e where e.stdID>0 and a.machineid=e.machineid and (a.date_ BETWEEN '$from' AND '$to') order by a.machineid"; } $empName=$stdName; $color=""; $x =0; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { if ($cnt==1){ echo "
Student Attendance
SerialBiometricName"; //for ($i=$from; $i<=$to; $i = date ("Y-m-d", strtotime("+1 days", strtotime($i)))){ for ($i=$from; $i<=$to; $i = date ("Y-m-d", strtotime("+1 days", strtotime($i)))){ $symbol=date('d', strtotime($i)); echo "$symbol"; } echo ""; for($x = 1; $x <= $arrlength; $x++) { echo "".$leaves[$x]; //echo "
"; } echo "
Total"; } $empID= odbc_result( $cur, 'stdID' ); $machineid= odbc_result( $cur, 'machineid' ); //$date_= date('d-m-Y', strtotime(odbc_result( $cur, 2 ))); $stdName= odbc_result( $cur, 2 ); $d_name= odbc_result( $cur, 3 ); echo "
". $cnt++ . "$machineid$stdName" ; for ($i=$from; $i<=$to; $i = date ("Y-m-d", strtotime("+1 days", strtotime($i)))){ $symbol= ""; $cur1= odbc_exec($conn, "select symbol,case symbol when 'A' then 'red' when 'P' then 'Green' when 'CL' then 'Purple' when 't' then 'blue' else 'Black' end from empAttendance where date_='$i' and machineid='$machineid'"); while( odbc_fetch_row( $cur1 ) ) { $symbol= odbc_result( $cur1, 1 ); $color= odbc_result( $cur1, 2 ); } echo "$symbol"; } echo ""; for($x = 1; $x <= $arrlength; $x++) { $leave=getName($conn,"select count(*) from empAttendance where machineid='$machineid' and symbol='".$leaves[$x]."' and (date_ BETWEEN '$from' AND '$to')" ); if($leave=="0") $leave=""; echo "$leave"; } $leave=getName($conn,"select count(*) from empAttendance where machineid='$machineid' and symbol in(".$summary.") and (date_ BETWEEN '$from' AND '$to')" ); if($leave=="0") $leave=""; echo "$leave"; } echo "
"; //Staff Attendance if ($empName!="") $query="select distinct a.machineid,e.stdName,e.empID from empAttendance a, student e where e.stdName like '%$empName%' and e.empID>0 and a.machineid=e.machineid and (a.date_ BETWEEN '$from' AND '$to') order by e.stdName"; else $query="select distinct a.machineid,e.stdName,e.empID from empAttendance a, student e where e.empID>0 and a.machineid=e.machineid and (a.date_ BETWEEN '$from' AND '$to') order by a.machineid"; $color=""; $x =0; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { if ($cnt==1){ echo "
Staff Attendance
SerialBiometricName"; //for ($i=$from; $i<=$to; $i = date ("Y-m-d", strtotime("+1 days", strtotime($i)))){ for ($i=$from; $i<=$to; $i = date ("Y-m-d", strtotime("+1 days", strtotime($i)))){ $symbol=date('d', strtotime($i)); echo "$symbol"; } echo ""; for($x = 1; $x <= $arrlength; $x++) { echo "".$leaves[$x]; //echo "
"; } echo "
Total"; } $empID= odbc_result( $cur, 'empID' ); $machineid= odbc_result( $cur, 'machineid' ); //$date_= date('d-m-Y', strtotime(odbc_result( $cur, 2 ))); $stdName= odbc_result( $cur, 2 ); $d_name= odbc_result( $cur, 3 ); echo "
". $cnt++ . "$machineid$stdName" ; for ($i=$from; $i<=$to; $i = date ("Y-m-d", strtotime("+1 days", strtotime($i)))){ $symbol= ""; $cur1= odbc_exec($conn, "select symbol,case symbol when 'A' then 'red' when 'P' then 'Green' when 'CL' then 'Purple' when 't' then 'blue' else 'Black' end from empAttendance where date_='$i' and machineid='$machineid'"); while( odbc_fetch_row( $cur1 ) ) { $symbol= odbc_result( $cur1, 1 ); $color= odbc_result( $cur1, 2 ); } echo "$symbol"; } echo ""; for($x = 1; $x <= $arrlength; $x++) { //$leave=getName($conn,"select count(*) from empAttendance where machineid='$empID' and symbol2='".$leaves[$x]."' and (date_ BETWEEN '$from' AND '$to')" ); $leave=getName($conn,"select count(*) from empAttendance where machineid='$machineid' and symbol='".$leaves[$x]."' and (date_ BETWEEN '$from' AND '$to')" ); if($leave=="0") $leave=""; echo "$leave"; } $leave=getName($conn,"select count(*) from empAttendance where machineid='$machineid' and symbol in(".$summary.") and (date_ BETWEEN '$from' AND '$to')" ); if($leave=="0") $leave=""; echo "$leave"; } echo "
"; odbc_close($conn); ?>