/[libdata]/trunk/admin/select_row.phtml
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/admin/select_row.phtml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations)
Fri Dec 5 18:34:18 2003 UTC (20 years, 4 months ago) by dpavlin
File size: 3364 byte(s)
Initial revision

1 <?php
2 // Load globals
3 require_once ("global_vars.php");
4
5 // Includes
6 require_once ($GLOBAL_ADMIN_INC."sessionClass.php");
7 require_once ($GLOBAL_ADMIN_INC."accessClass.php");
8 require_once ($GLOBAL_ADMIN_INC."db_connect.php");
9 require_once ($GLOBAL_ADMIN_INC."app_controls.php");
10
11
12 // HTML header
13 printf("<HTML>\n");
14 printf("<HEAD>\n");
15 printf("<title>Select a Row</title>\n");
16 printf("<link rel=\"stylesheet\" href=\"%s\" type=\"text/css\">\n", $GLOBAL_ADMIN_CSS);
17 printf("</HEAD>\n");
18
19
20 // Page header
21 require_once ($GLOBAL_ADMIN_HEADER);
22
23
24 // Collect access information
25 if (isset($libsession)) {
26
27 // Fetch session information
28 $sessionClass = new sessionClass("", $libsession, "", "");
29 $accessClass = new accessClass($sessionClass);
30
31 // Load user session variables
32 $sess_time_human = $sessionClass->time_human;
33 $sess_staff_account = $sessionClass->staff_account;
34 $sess_access_level = $accessClass->access_level;
35 $sess_access = $accessClass->access;
36 $sess_last_name = $accessClass->last_name;
37 $sess_first_name = $accessClass->first_name;
38 }
39
40
41 // If the cookie is set and access level is appropriate
42 if(isset($libsession) && $sess_access_level >= 20) {
43
44
45 // Draw page heading
46 printf("<center><h3>Select %s</h3>\n", $display);
47
48 printf("<form method = \"POST\" action = \"operation.phtml\" >\n");
49 printf("<input type = \"Hidden\" name = \"validated\" value = \"%d\" >\n", $validated);
50
51 printf("<BR>\n");
52 printf("<input type = \"Hidden\" name = \"key_field\" value = \"%s\" >\n", $key_field);
53 printf("<input type = \"Hidden\" name = \"key_value\" value = \"%s\" >\n", $key_value);
54 printf("<input type = \"Hidden\" name = \"table\" value = \"%s\" >\n", $table);
55 printf("<input type = \"Hidden\" name = \"display\" value = \"%s\" >\n", $display);
56 printf("<input type = \"Hidden\" name = \"display_field\" value = \"%s\" >\n", $display_field);
57 printf("<input type = \"Hidden\" name = \"size\" value = \"%s\" >\n", $size);
58
59 printf("<input type = \"Submit\" name = \"operation\" value = \"New\" > ");
60 printf("<input type = \"Submit\" name = \"operation\" value = \"Edit\"> ");
61 printf("<input type = \"Submit\" name = \"operation\" value = \"Delete\" >");
62 printf("<br><br>\n");
63
64 // Draw a radio-button pick table
65 $limit = textSearchmySQL($limit);
66 selectKey($con, $display, $display_field, $key_field, $limit, $table);
67
68 // The buttons
69 printf("<BR>\n");
70 printf("<input type = \"Hidden\" name = \"key_field\" value = \"%s\" >\n", $key_field);
71 printf("<input type = \"Hidden\" name = \"key_value\" value = \"%s\" >\n", $key_value);
72 printf("<input type = \"Hidden\" name = \"table\" value = \"%s\" >\n", $table);
73 printf("<input type = \"Hidden\" name = \"display\" value = \"%s\" >\n", $display);
74 printf("<input type = \"Hidden\" name = \"display_field\" value = \"%s\" >\n", $display_field);
75 printf("<input type = \"Hidden\" name = \"size\" value = \"%s\" >\n", $size);
76
77 printf("<input type = \"Submit\" name = \"operation\" value = \"New\" > ");
78 printf("<input type = \"Submit\" name = \"operation\" value = \"Edit\"> ");
79 printf("<input type = \"Submit\" name = \"operation\" value = \"Delete\" >");
80 printf("</form>");
81
82 // Link to return to admin console
83 adminReturn($sess_access_level);
84
85 } // logged in
86
87 // No access page
88 else require_once ($GLOBAL_NO_ACCESS);
89
90 // Page footer
91 require_once ($GLOBAL_ADMIN_FOOTER);
92 ?>
93
94 </body>
95 </html>

  ViewVC Help
Powered by ViewVC 1.1.26