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@#[` *Rr$ۄߞ= tu%e9r_#]ߒߐڴ E9Ip]he-N6^Ϲ׈Rt Ɂ$%YR VtAڒu봁r-'doIj.*-.!m 7Mc-zv2&CРCP5R:C8JCQ\'Pg2a=J+%6RZMIaMssj;Sa?XɞKڄ0sB7 еAG>r:K!O)f)[L_jb@;r7/d\I5pg,2"uWAvЛbj󞴣> xjq0ih^O;[)(*Qu_հX6 5* {2cd>lbyIs J-U]nhfN/g@pSDEfr*MyD]URk<Ӻһ9AAq(ȳEk(fwD@k+||Lx˹ H 6U_VekwNtĩR;p50V]be z*1!NsE:2Hjf i=i0vp |m)um͎A ^"4^/ Nf_6P2q4 !iXgluMYHU(;0ΘRp s#MTo{5m4Y?]倨7ҍ}8nS_K9߇gLa,x$"}&SH6-8;(. c>S4#>3O{Sž?n`13Q+L#pgZ%Ad&{"bROKvu")-zӘɎ \1iKhtW "oTkp*hwW'o+u4/>+-?WٯvG䆴 OzI mGOŧ]ʨq< XQ3PAd$QRnͳ:/\xVn 5ߜxW0 p,Uj8Q:~6/*:aB""Jǩ# B~x* LQ.GpCrv[@^\|n}DA)-M" [NJ`G X4YE9"9R1W7x PȈ u.HTPgXQwX˚DAt(,>ؼ>yOsL l8XLiGK[ǃQ!V;ElSCDo 0Fn]!}CJlWϓk+qN1˓x˩hɤXd56FxP~f8i2NRƙo7~VYFJIָIkH›Ӥ}8'{A@vnA-n`꼕`yx. @˝ DJf Ȣ%8^4%^_"P7'o#N eZ "; echo "Gender:"; echo "

Staff "; echo " Designation "; //echo ""; echo ""; echo ""; echo " "; echo " "; 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 = 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 ($qry!="") $query="select distinct a.machineid,e.stdName,e.stdID from empAttendance a, student e where e.stdID in($qry) 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 a.entryTime is not null and e.stdID>0 and a.machineid=e.machineid and (a.date_ BETWEEN '$from' AND '$to') order by e.stdName"; $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); ?>