| [ 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 if ($script_name = basename($HTTP_SERVER_VARS["SCRIPT_NAME"]) != "index.php" ) { 3 print "<meta http-equiv=\"refresh\" content=\"0; URL=../index.php\">"; 4 exit; 5 } 6 7 if ($patrol_name != "" ) { 8 if ($delete == "Y") { 9 mysql_query("delete from tbl_patrols where record_key='$patrol_key';"); 10 print "<b>DELETED $patrol_name</b>"; 11 } else if ($add == "Y") { 12 mysql_query("insert into tbl_patrols (patrol_name) values ('$patrol_name');"); 13 print "<b>ADDED $patrol_name</b>"; 14 } else { 15 mysql_query("update tbl_patrols set patrol_name='$patrol_name' where record_key='$patrol_key';"); 16 print "<b>UPDATED $patrol_name</b>"; 17 } 18 } 19 20 print "<center><h2>List of current Patrols</center></h2>"; 21 22 print "<table><tr><td><b>Patrol</b></td><td><b>Delete</b></td></tr>"; 23 24 $sql = mysql_query("select * from tbl_patrols order by record_key;"); 25 26 while ($row = mysql_fetch_assoc($sql)) { 27 extract($row); 28 print "<tr><form method=POST action=./index.php><input type=hidden name=modify_patrols value=Y /><input type=hidden name=patrol_key value=$record_key /> 29 <td><input type=text name=patrol_name value='$patrol_name' /></td> 30 <td><input name=delete type=checkbox value=Y /></td> 31 <td><input type=submit value=Update /></td></form> 32 </tr>"; 33 } 34 35 mysql_free_result($sql); 36 37 print "<tr><form method=POST action=./index.php><input type=hidden name=add value=Y /><input type=hidden name=modify_patrols value=Y /> 38 <td><input type=text name=patrol_name value='' /></td> 39 <td> </td><td><input type=submit value=Add /></td></form> 40 </tr>"; 41 print "</table>"; 42 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |