Ignore:
Timestamp:
07/21/11 11:24:15 (13 years ago)
Author:
Daniela Dorner
Message:
added plenty of new features to view and edit the configuration database
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/db_po/edit_po.php

    r11353 r11505  
    66    echo (file_get_contents("index-header.html"));
    77
     8    //call get_progs() at startup
     9    printf("<script type=\"text/javascript\" >\n");
     10    printf("window.onload = function () { get_progs(\"\",\"10\",\"edit\"); }\n");
     11    printf("</script>\n");
     12
    813    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 
     14    printf("With this page, you can <u>edit</u> the DB <b>%s</b>.\n", $db);
     15    printf("For view, please go <a href='view_po.php'>here</a>.<br><br>\n");
    2216    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 
     17    printf("<tr>\n");
     18    printf("<td valign='top' id='progfield'></td>\n");
     19    printf("<td valign='top' id='keyfield'></td>\n");
     20    printf("<td valign='top' id='valuefield1'></td>\n");
     21    printf("</tr>\n</tbody></table>\n");
    4022
    4123    echo (file_get_contents("index-footer.html"));
Note: See TracChangeset for help on using the changeset viewer.