source: trunk/www/db_po/edit_po.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.3 KB
Line 
1<?php
2{
3 ini_set("display_errors", "On");
4 ini_set("mysql.trace_mode", "On");
5
6 echo (file_get_contents("index-header.html"));
7
8 include("db.php");
9 $db_id = mysql_pconnect($host, $user, $pw);
10 if ($db_id==FALSE)
11 {
12 printf("mysql_connect returned the following error: %s\n", mysql_error());
13 die("");
14 }
15 mysql_select_db($db);
16 echo "Hi, this is a test interface for the DB <b>" . $db . "</b>.<br><br>";
17
18 $query0="SELECT fProgram from ProgramOption GROUP BY fProgram";
19
20 $result0=mysql_query($query0, $db_id);
21
22 printf("<table border='0'><tbody>\n");
23 printf("<tr>\n<td>Please select a program:</td>\n");
24 printf("<td>\n<select name='prog' size='1' onchange=\"get_keys(this.value)\"class='Width'>\n");
25 printf("<option value='empty'> ---select program--- </option>\n");
26 printf("<option value='all'> all programs </option>\n");
27 while ($row0 = mysql_fetch_row($result0))
28 printf("<option value='%s'>%s </option>\n", $row0[0], $row0[0]);
29 printf("</select>\n</td>\n</tr>\n");
30 mysql_free_result($result0);
31
32 echo "<tr id='keyfield'></tr>";
33 echo "<tr id='valuefield'></tr>";
34 printf("</tbody></table>\n");
35
36 mysql_close($db_id);
37
38
39
40
41 echo (file_get_contents("index-footer.html"));
42
43 ini_set("display_errors", "Off");
44 ini_set("mysql.trace_mode", "Off");
45}
46?>
Note: See TracBrowser for help on using the repository browser.