| 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 | //call get_progs() at startup
|
|---|
| 9 | printf("<script type=\"text/javascript\" >\n");
|
|---|
| 10 | printf("window.onload = function () { get_progs(\"\",\"edit\"); }\n");
|
|---|
| 11 | printf("</script>\n");
|
|---|
| 12 |
|
|---|
| 13 | include ("include.php");
|
|---|
| 14 | if (!isset($_SERVER['PHP_AUTH_USER']))
|
|---|
| 15 | {
|
|---|
| 16 | header('WWW-Authenticate: Basic realm="Edit FACT Configuration Database"');
|
|---|
| 17 | header('HTTP/1.0 401 Unauthorized');
|
|---|
| 18 | return;
|
|---|
| 19 | }
|
|---|
| 20 | else
|
|---|
| 21 | {
|
|---|
| 22 | //echo "The password is not yet evaluated, but the username is inserted into the DB.<br>";
|
|---|
| 23 | if (!CheckUsernameAndPassword($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'], GetLDAPOptions()))
|
|---|
| 24 | return;
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | include("db.php");
|
|---|
| 28 | printf("With this page, you can <u>edit</u> the DB <b>%s</b>.\n", $db);
|
|---|
| 29 | printf("For view, please go <a href='view_po.php'>here</a>.<br><br>\n");
|
|---|
| 30 | printf("<table border='0'><tbody>\n");
|
|---|
| 31 | printf("<tr>\n");
|
|---|
| 32 | //printf("<td valign='top' id='progfield'></td>\n");
|
|---|
| 33 | //printf("<td valign='top' id='keyfield'></td>\n");
|
|---|
| 34 | printf("<td valign='top'>\n");
|
|---|
| 35 | printf("<div id='progfield'></div><br>\n");
|
|---|
| 36 | printf("<div id='keyfield'></div>\n");
|
|---|
| 37 | printf("</td>\n");
|
|---|
| 38 | //field for table with values
|
|---|
| 39 | printf("<td valign='top' id='valuefield1'></td>\n");
|
|---|
| 40 | printf("</tr>\n</tbody></table>\n");
|
|---|
| 41 |
|
|---|
| 42 | echo (file_get_contents("index-footer.html"));
|
|---|
| 43 |
|
|---|
| 44 | ini_set("display_errors", "Off");
|
|---|
| 45 | ini_set("mysql.trace_mode", "Off");
|
|---|
| 46 | }
|
|---|
| 47 | ?>
|
|---|