"; include('header.php'); echo "
ʶԵԡÒÃà¢éÒÃкº ¹Ñ¡àÃÕ¹ ».$rm ÃÃ.͹غÒÅÈÃÕÊÐà¡É »Õ¡ÒÃÈÖ¡ÉÒ $_year
"; while ($db=mysql_fetch_array($result)) { $sql1="select *,count(*) as inday from $_log,$_std where log_std=std_id and std_room='$rm' and log_std='$db[std_id]' and ($inip) group by date(log_date)"; $result1=mysql_query($sql1); $db1=mysql_fetch_array($result1); if ($db1[inday]==0) { $db1[inday]='-'; } $sql2="select *,count(*) as intime from $_log,$_std where log_std=std_id and std_room='$rm' and log_std='$db[std_id]' and ($inip) group by log_std"; $result2=mysql_query($sql2); $db2=mysql_fetch_array($result2); if ($db2[intime]==0) { $db2[intime]='-'; } $sql3="select *,count(*) as outday from $_log,$_std where log_std=std_id and std_room='$rm' and log_std='$db[std_id]' and ($inip2) group by date(log_date)"; $result3=mysql_query($sql3); $db3=mysql_fetch_array($result3); if ($db3[outday]==0) { $db3[outday]='-'; } $sql4="select *,count(*) as outtime from $_log,$_std where log_std=std_id and std_room='$rm' and log_std='$db[std_id]' and ($inip2) group by log_std"; $result4=mysql_query($sql4); $db4=mysql_fetch_array($result4); if ($db4[outtime]==0) { $db4[outtime]='-'; } $ioday=$db1[inday]+$db3[outday]; $iotime=$db2[intime]+$db4[outtime]; if ($ioday==0) { $ioday='-'; } if ($iotime==0) { $iotime='-'; } if ($iotime==0) { $cl='red'; } else { $cl=''; } echo ""; $tinday+=$db1[inday]; $tintime+=$db2[intime]; $toutday+=$db3[outday]; $touttime+=$db4[outtime]; $tioday+=$ioday; $tiotime+=$iotime; } echo "
àÅ¢·Õè ª×èÍ - Ê¡ØÅ ã¹àÇÅÒàÃÕ¹ ¹Í¡àÇÅÒ(·ÕèºéÒ¹) ÃÇÁ
Çѹ ¤ÃÑé§ Çѹ ¤ÃÑé§ Çѹ ¤ÃÑé§
$db[std_no] $db[std_pre]$db[std_name1] $db[std_name2] $db3[outday] $db4[outtime] $db1[inday] $db2[intime] $ioday $iotime
ÃÇÁ $tinday $tintime $toutday $touttime $tioday $tiotime
"; include('footer.php'); ?>