source: trunk/www/db_po/get_keys.php@ 11444

Last change on this file since 11444 was 11353, checked in by Daniela Dorner, 13 years ago
added script to display and edit entries of the configuration database (ProgramOptions) and scripts which are called by this script
  • Property svn:executable set to *
File size: 1.2 KB
Line 
1<?php
2{
3 ini_set("display_errors", "On");
4 ini_set("mysql.trace_mode", "On");
5
6 if (empty($_GET["fProgram"]))
7 {
8 echo "Please select a program.<br>";
9 return;
10 }
11
12 include("db.php");
13 $db_id = mysql_pconnect($host, $user, $pw);
14 if ($db_id==FALSE)
15 {
16 printf("mysql_connect returned the following error: %s\n", mysql_error());
17 die("");
18 }
19 mysql_select_db($db);
20
21 $query0="SELECT fKey from ProgramOption ";
22 if ($_GET["fProgram"]!="all")
23 $query0.="WHERE fProgram='".$_GET["fProgram"]."' ";
24 $query0.="GROUP BY fKey";
25
26 $result0=mysql_query($query0, $db_id);
27
28 printf("<td>Please select a key:</td>\n");
29 printf("<td><select name='key' size='1' onchange=\"get_values('%s',this.value)\"class='Width'>\n", $_GET["fProgram"]);
30 printf("<option value='empty'> ---select key--- </option>\n");
31 printf("<option value='newkey'> add new key </option>\n");
32 while ($row0 = mysql_fetch_row($result0))
33 printf("<option value='%s'>%s </option>\n", $row0[0], $row0[0]);
34 printf("</select>\n</td>\n");
35 mysql_free_result($result0);
36
37 mysql_close($db_id);
38
39 ini_set("display_errors", "Off");
40 ini_set("mysql.trace_mode", "Off");
41}
42?>
Note: See TracBrowser for help on using the repository browser.