| [ PHPXref.com ] | [ Generated: Sun Jul 20 20:12:55 2008 ] | [ Scout Tracker 0.13 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 3 if ($script_name = basename($HTTP_SERVER_VARS["SCRIPT_NAME"]) == "req_missing.php" ) { 4 print "<meta http-equiv=\"refresh\" content=\"0; URL=../index.php\">"; 5 exit; 6 } 7 8 print "<center><h2>Missing Required Merit Badges</center></h2>"; 9 10 if ( $print != 'Y') { 11 print "<center><table><tr><td><b>Patrols:</b></td>\n"; 12 print "<td><a href='./index.php?mb_missing=Y&show_print=Y&print_ins=req_missing=Y'>ALL</a></td>"; 13 14 $sql = mysql_query("select patrol_name from tbl_patrols order by record_key;"); 15 while ($row = mysql_fetch_assoc($sql)) { 16 extract($row); 17 print "<td><a href='./index.php?mb_missing=Y&show_print=Y&print_ins=req_missing=Y&View_Patrol=$patrol_name'>$patrol_name</a></td>\n"; 18 } 19 mysql_free_result($sql); 20 print "</tr></table>\n"; 21 22 if ($View_Patrol != "") { 23 $where = " and a.patrol = '$View_Patrol'"; 24 } 25 } 26 27 $sql = mysql_query("select a.first_name,a.last_name, d.badge_name, d.badge_number, a.birthdate 28 from tbl_scout as a 29 inner join tbl_scout_mb_cmplt as b on a.record_key=b.scout_key 30 right join tbl_merit_badge as d on b.mb_key=d.record_key 31 where b.date is null && d.required = 'Y' $where 32 group by d.badge_name,b.record_key, a.birthdate, a.last_name,a.first_name;"); 33 print "<center><h3>Scouts that are missing Required Merit Badges</h3></center>"; 34 while ($row = mysql_fetch_assoc($sql)) { 35 extract($row); 36 if ($badge_name != $badge_name_hold ) { 37 print "\n<p><b>$badge_name</b>: "; 38 print "$first_name $last_name"; 39 } else { 40 print ", $first_name $last_name"; 41 } 42 $badge_name_hold = $badge_name; 43 } 44 mysql_free_result($sql); 45 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |