/[libdata]/branches/paul_xx/page.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

Diff of /branches/paul_xx/page.phtml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/page.phtml revision 19 by dpavlin, Tue Jan 27 20:49:23 2004 UTC branches/paul_xx/page.phtml revision 69 by dpavlin, Thu Mar 18 20:01:09 2004 UTC
# Line 19  if ($page_id > 0 ) { Line 19  if ($page_id > 0 ) {
19    
20          // If stats are enabled, add a hit to the page load statistics          // If stats are enabled, add a hit to the page load statistics
21          if ($libstats == 1) {          if ($libstats == 1) {
22                  pageLoadStats($con, $page_id);                  pageLoadStats($page_id);
23          }          }
24    
25    
# Line 31  if ($page_id > 0 ) { Line 31  if ($page_id > 0 ) {
31    
32          // printf("sql was: %s<BR>", $sql);          // printf("sql was: %s<BR>", $sql);
33    
34          $rs = mysql_query($sql, $con);          $rs = xx_tryquery($sql);
35          $row = mysql_fetch_array ($rs);          $row = xx_fetch_array ($rs, xx_ASSOC);
36                    
37          // Fetch data          // Fetch data
38          $pagetype_id = $row["pagetype_id"];          $pagetype_id = $row["pagetype_id"];
# Line 98  if ($page_id > 0 ) { Line 98  if ($page_id > 0 ) {
98          **********************************************/          **********************************************/
99                    
100          if ($pagetype_id == 3) {          if ($pagetype_id == 3) {
101                  displayCourseHeader($con, $page_id, $pagetitle_style);                  displayCourseHeader($page_id, $pagetitle_style);
102                  displayCoursePers($con, $page_id);                  displayCoursePers($page_id);
103    
104                  // Display HR                            // Display HR          
105                  printf("<hr><br>\n");                  printf("<hr><br>\n");
# Line 130  if ($page_id > 0 ) { Line 130  if ($page_id > 0 ) {
130          ** Display Table of Contents **          ** Display Table of Contents **
131          ******************************/          ******************************/
132          if ($display_toc == 1) {          if ($display_toc == 1) {
133                  displayTOC($con, $page_id, $wrap_toc);                  displayTOC($page_id, $wrap_toc);
134          }          }
135    
136    
# Line 149  if ($page_id > 0 ) { Line 149  if ($page_id > 0 ) {
149    
150          $sql = "SELECT * FROM element e          $sql = "SELECT * FROM element e
151                  LEFT JOIN resource r using (resource_id)                  LEFT JOIN resource r using (resource_id)
152                    LEFT JOIN vendor d on r.vendor_id = d.vendor_id        
153                  LEFT JOIN service v on e.service_id = v.service_id                  LEFT JOIN service v on e.service_id = v.service_id
154                  LEFT JOIN location l on e.location_id = l.location_id                  LEFT JOIN location l on e.location_id = l.location_id
155                  LEFT JOIN staff s on e.staff_id = s.staff_id                  LEFT JOIN staff s on e.staff_id = s.staff_id
# Line 156  if ($page_id > 0 ) { Line 157  if ($page_id > 0 ) {
157                  WHERE page_id = " . $page_id                  WHERE page_id = " . $page_id
158                  . " ORDER BY e.element_order";                  . " ORDER BY e.element_order";
159    
160          $rs = mysql_query($sql, $con);          $rs = xx_tryquery($sql);
161    
162          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs, xx_ASSOC)) {
163    
164                  // General element information                  // General element information
165                  $element_id = $row["element_id"];                  $element_id = $row["element_id"];
# Line 178  if ($page_id > 0 ) { Line 179  if ($page_id > 0 ) {
179                  $title = $row["title"];                  $title = $row["title"];
180                  $call_no = $row["call_no"];                  $call_no = $row["call_no"];
181                                    
182                    $guide_url = $row["guide_url"];
183                    $resource_message = $row["resource_message"];
184                    $resource_status = $row["resource_status"];
185                    $vendor_message = $row["vendor_message"];
186                    $vendor_status = $row["vendor_status"];        
187                    
188                  // If a location                  // If a location
189                  $location_id = $row["location_id"];                  $location_id = $row["location_id"];
190                  $location = $row["location"];                  $location = $row["location"];
# Line 349  if ($page_id > 0 ) { Line 356  if ($page_id > 0 ) {
356                  // If a span class is being used, close it now                  // If a span class is being used, close it now
357                  if ($element_size > 0) printf ("</span>\n");                              if ($element_size > 0) printf ("</span>\n");            
358    
   
359                  // Display URL if toggled and available                  // Display URL if toggled and available
360                  if (strlen($item_url) > 0 && $display_urls == 1) printf("<BR>%s<BR>\n", $item_url);                  if (strlen($item_url) > 0 && $display_urls == 1) printf("<BR>%s<BR>\n", $item_url);
361    
362                                    // Handle down/alert messages
363                    if ($vendor_status > 0 || $resource_status > 0) {
364    
365                            printf("<br><img src =\"images/chain.jpg\" alt=\"Resource Temporarily Unavailable\">\n");
366                            printf("<span class=\"error\">\n");
367                            if (strlen($vendor_message) > 1) printf("%s\n", $vendor_message);
368                            else if (strlen($resource_message) > 1) printf("%s\n", $resource_message);
369                            printf("</span>\n");
370                    }
371    
372                  // Display description                  // Display description
373                  if (strlen($item_descr) > 0) printf("<BR>%s\n", $item_descr);                  if (strlen($item_descr) > 0) printf("<BR>%s\n", $item_descr);
374                                                                    
# Line 391  if ($page_id > 0 ) { Line 406  if ($page_id > 0 ) {
406    
407          // Display page coordinator          // Display page coordinator
408          if ($staff_coordinator > 0) {          if ($staff_coordinator > 0) {
409                  $display_page_coord = lookupStaff($con, $staff_coordinator);                  $display_page_coord = lookupStaff($staff_coordinator);
410                  $staff_email = lookupField($con, "staff", "staff_id", $staff_coordinator, "staff_email");                  $staff_email = lookupField("staff", "staff_id", $staff_coordinator, "staff_email");
411                    
412                  if (strlen($display_page_coord) > 0 && strlen($staff_email) > 0) {                  if (strlen($display_page_coord) > 0 && strlen($staff_email) > 0) {
413                          printf("<span class=\"S5\">\n");                          printf("<span class=\"S5\">\n");

Legend:
Removed from v.19  
changed lines
  Added in v.69

  ViewVC Help
Powered by ViewVC 1.1.26