| [ PHPXref.com ] | [ Generated: Sun Jul 20 19:57:02 2008 ] | [ PHP Timeclock 1.02 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 3 $row_count = 0; 4 $page_count = 0; 5 6 while ($row=mysql_fetch_array($result)) { 7 8 $display_stamp = "".$row["timestamp"].""; 9 $time = date($timefmt, $display_stamp); 10 $date = date($datefmt, $display_stamp); 11 12 if ($row_count == 0) { 13 14 if ($page_count == 0) { 15 16 // display sortable column headings for main page // 17 18 echo " <table class=misc_items width=100% border=0 cellpadding=2 cellspacing=0>\n"; 19 20 if (!isset($_GET['printer_friendly'])) { 21 echo " <tr><td align=right colspan=7><a style='font-size:11px;color:#853d27;' 22 href='timeclock.php?printer_friendly=true'>printer friendly page</a></td></tr>\n"; 23 } 24 25 echo " <tr class=notprint>\n"; 26 echo " <td nowrap width=20% align=left style='padding-left:10px;padding-right:10px;'> 27 <a style='font-size:11px;color:#27408b;' 28 href='$current_page?sortcolumn=empfullname&sortdirection=$sortnewdirection'>Name</a></td>\n"; 29 echo " <td nowrap width=7% align=left style='padding-left:10px;'><a style='font-size:11px;color:#27408b;' 30 href='$current_page?sortcolumn=inout&sortdirection=$sortnewdirection'>In/Out</a></td>\n"; 31 echo " <td nowrap width=5% align=right style='padding-right:10px;'><a style='font-size:11px;color:#27408b;' 32 href='$current_page?sortcolumn=tstamp&sortdirection=$sortnewdirection'>Time</a></td>\n"; 33 echo " <td nowrap width=5% align=right style='padding-left:10px;'><a style='font-size:11px;color:#27408b;' 34 href='$current_page?sortcolumn=tstamp&sortdirection=$sortnewdirection'>Date</a></td>\n"; 35 36 if ($display_office_name == "yes") { 37 echo " <td nowrap width=10% align=left style='padding-left:10px;'><a style='font-size:11px;color:#27408b;' 38 href='$current_page?sortcolumn=office&sortdirection=$sortnewdirection'>Office</a></td>\n"; 39 } 40 41 if ($display_group_name == "yes") { 42 echo " <td nowrap width=10% align=left style='padding-left:10px;'><a style='font-size:11px;color:#27408b;' 43 href='$current_page?sortcolumn=groups&sortdirection=$sortnewdirection'>Group</a></td>\n"; 44 } 45 46 echo " <td style='padding-left:10px;'><a style='font-size:11px;color:#27408b;' 47 href='$current_page?sortcolumn=notes&sortdirection=$sortnewdirection'><u>Notes</u></a></td>\n"; 48 echo " </tr>\n"; 49 50 } else { 51 52 // display report name and page number of printed report above the column headings of each printed page // 53 54 $temp_page_count = $page_count + 1; 55 } 56 57 echo " <tr class=notdisplay>\n"; 58 echo " <td nowrap width=20% align=left style='padding-left:10px;padding-right:10px;font-size:11px;color:#27408b; 59 text-decoration:underline;'>Name</td>\n"; 60 echo " <td nowrap width=7% align=left style='padding-left:10px;font-size:11px;color:#27408b; 61 text-decoration:underline;'>In/Out</td>\n"; 62 echo " <td nowrap width=5% align=right style='padding-right:10px;font-size:11px;color:#27408b; 63 text-decoration:underline;'>Time</td>\n"; 64 echo " <td nowrap width=5% align=right style='padding-left:10px;font-size:11px;color:#27408b; 65 text-decoration:underline;'>Date</td>\n"; 66 67 if ($display_office_name == "yes") { 68 echo " <td nowrap width=10% align=left style='padding-left:10px;font-size:11px;color:#27408b; 69 text-decoration:underline;'>Office</td>\n"; 70 } 71 72 if ($display_group_name == "yes") { 73 echo " <td nowrap width=10% align=left style='padding-left:10px;font-size:11px;color:#27408b; 74 text-decoration:underline;'>Group</td>\n"; 75 } 76 77 echo " <td style='padding-left:10px;'><a style='font-size:11px;color:#27408b;text-decoration:underline;'>Notes</td>\n"; 78 echo " </tr>\n"; 79 } 80 81 // begin alternating row colors // 82 83 $row_color = ($row_count % 2) ? $color1 : $color2; 84 85 // display the query results // 86 87 $display_stamp = $display_stamp + @$tzo; 88 $time = date($timefmt, $display_stamp); 89 $date = date($datefmt, $display_stamp); 90 91 if ($show_display_name == "yes") { 92 echo stripslashes(" <tr class=display_row><td nowrap width=20% bgcolor='$row_color' style='padding-left:10px; 93 padding-right:10px;'>".$row["displayname"]."</td>\n"); 94 } elseif ($show_display_name == "no") { 95 echo stripslashes(" <tr class=display_row><td nowrap width=20% bgcolor='$row_color' style='padding-left:10px; 96 padding-right:10px;'>".$row["empfullname"]."</td>\n"); 97 } 98 99 echo " <td nowrap align=left width=7% style='background-color:$row_color;color:".$row["color"]."; 100 padding-left:10px;'>".$row["inout"]."</td>\n"; 101 echo " <td nowrap align=right width=5% bgcolor='$row_color' style='padding-right:10px;'>".$time."</td>\n"; 102 echo " <td nowrap align=right width=5% bgcolor='$row_color' style='padding-left:10px;'>".$date."</td>\n"; 103 104 if ($display_office_name == "yes") { 105 echo " <td nowrap align=left width=10% bgcolor='$row_color' style='padding-left:10px;'>".$row["office"]."</td>\n"; 106 } 107 108 if ($display_group_name == "yes") { 109 echo " <td nowrap align=left width=10% bgcolor='$row_color' style='padding-left:10px;'>".$row["groups"]."</td>\n"; 110 } 111 112 echo stripslashes(" <td bgcolor='$row_color' style='padding-left:10px;'>".$row["notes"]."</td>\n"); 113 echo " </tr>\n"; 114 115 $row_count++; 116 117 // output 40 rows per printed page // 118 119 if ($row_count == 40) { 120 echo " <tr style=\"page-break-before:always;\"></tr>\n"; 121 $row_count = 0; 122 $page_count++; 123 } 124 125 } 126 127 echo " </table>\n"; 128 129 if (!isset($_GET['printer_friendly'])) { 130 echo " </td></tr>\n"; 131 } 132 133 mysql_free_result($result); 134 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |