/[libdata]/branches/paul/admin/masterinfotype_drill.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

Annotation of /branches/paul/admin/masterinfotype_drill.phtml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 67 - (hide annotations)
Thu Mar 18 19:24:54 2004 UTC (20 years, 2 months ago) by dpavlin
File size: 3274 byte(s)
updated to libdata 2.00

1 dpavlin 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>Master Information Type Drilldown</title>\n");
16     printf("<link rel=\"stylesheet\" href=\"%s\" type=\"text/css\">\n", $GLOBAL_ADMIN_CSS);
17     printf("</HEAD>\n");
18    
19    
20 dpavlin 67 // Default access settings
21     $sess_time_human = "";
22     $sess_staff_account = "";
23     $sess_staff_id = 0;
24     $sess_access_level = 0;
25     $sess_access = "";
26     $sess_last_name = "";
27     $sess_first_name = "";
28    
29    
30 dpavlin 1 // Page header
31     require_once ($GLOBAL_ADMIN_HEADER);
32    
33    
34     // Collect access information
35     if(isset($libsession)) {
36    
37     // Fetch session information
38     $sessionClass = new sessionClass("", $libsession, "", "");
39     $accessClass = new accessClass($sessionClass);
40    
41     // Load user session variables
42     $sess_time_human = $sessionClass->time_human;
43     $sess_staff_account = $sessionClass->staff_account;
44     $sess_access_level = $accessClass->access_level;
45     $sess_access = $accessClass->access;
46     $sess_last_name = $accessClass->last_name;
47     $sess_first_name = $accessClass->first_name;
48    
49     }
50    
51     // If the cookie is set and access level is appropriate
52     if(isset($libsession) && $sess_access_level >= 20) {
53    
54     // Fetch the information type descr. field
55 dpavlin 67 $masterinfotype = lookupField("masterinfotype", "masterinfotype_id", $masterinfotype_id, "masterinfotype");
56 dpavlin 1
57     printf("<center>\n");
58     printf("<h3>Master Information Type '%s' (#%d) contains the the following specific Information Types:</h3>", $masterinfotype, $masterinfotype_id);
59    
60    
61     // RQS Usage Drilldowns
62     printf("<table width = \"75%%\" border=\"1\"><tr>\n");
63     printf("<td width=\"80%%\" class=\"cellPlain\">Information Type</td>\n");
64     printf("<td width=\"20%%\" class=\"cellPlain\">Drilldown</td>\n");
65     printf("</tr>\n");
66    
67     // Build the query
68     $sql = "SELECT DISTINCT
69     i.infotype,
70     i.infotype_id
71    
72     FROM
73     infotype i
74    
75     WHERE i.masterinfotype_id = "
76     . $masterinfotype_id
77     . " ORDER BY i.infotype";
78    
79 dpavlin 67 $rs = mysql_tryquery($sql);
80 dpavlin 1
81     // Initialize counter
82     $rowcount = 0;
83    
84     // Cycle through the result set
85 dpavlin 67 while ( $row = mysql_fetch_array ($rs, MYSQL_ASSOC)) {
86 dpavlin 1 $infotype_id = Trim($row["infotype_id"]);
87     $infotype = Trim($row["infotype"]);
88    
89     // New row
90     if ($rowcount % 2 == 0) $color = " class=\"backLight\" ";
91     else $color ="";
92    
93     printf("<tr>\n");
94     printf("<td %s>%s</td>\n", $color, $infotype);
95     printf("<td %s><a href=\"infotype_drill.phtml?infotype_id=%d\">Drilldown</a></td>\n", $color, $infotype_id);
96     printf("</tr>\n");
97    
98     // Increment counter
99     $rowcount++;
100    
101     }
102    
103     // Summary of RQS page uses
104     printf("<tr><td align=\"right\" class=\"backLight\">Total mapped Information Types:</td>\n");
105     if (mysql_num_rows($rs) == 0) printf("<td class=\"backLight\">(None)</td>\n");
106     else printf("<td class=\"backLight\">%d</td>\n", mysql_num_rows($rs));
107     printf("</tr>\n");
108    
109     // Close table
110     printf("</table><br><br>\n");
111    
112     // Link to return to admin console
113     adminReturn($sess_access_level);
114    
115     } // logged in
116    
117     // No access page
118     else require_once ($GLOBAL_NO_ACCESS);
119    
120    
121     // Page footer
122     require_once ($GLOBAL_ADMIN_FOOTER);
123     ?>
124    
125     </body>
126     </html>
127    

  ViewVC Help
Powered by ViewVC 1.1.26