[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[seul-edu] [OT] PHP Help



I'm having some problems getting the files attached to work correctly.

When I reference (ie, view on the web) the "template-db.php" file directly,
the links under "General Information" show up.

When I go to the index-db.php file, there isn't anything underneath General
Information.

Suggestions, help, etc are more than welcome.

Michael Viron
<!-- BEGIN header -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
 <meta name="description" content="Web Spinners Online">
 <meta name="keywords" content="Web, Design, Spinners, Homepage, Creation">
 <LINK rel="stylesheet" type="text/css" href="/css/css-layout.css">
 <TITLE>{TITLE}</TITLE>
</HEAD>

<BODY>
<div id="Layer1" style="position:absolute; left:206px; top:13px; z-index:1"> 
  <div align="center"> 
    <table width="100%" border="0">
      <tr>
        <th bgcolor="lightblue"><font face="Arial, Helvetica, sans-serif" size="4">{HEADER}</font> 
        </th>
      </tr>
      <tr>
        <td><!-- END header --> {CONTENT} <!-- BEGIN footer --> </td>
      </tr>
      <tr>
        <td>
          <hr>
          <center>
            <span class="copyright"> Copyright &copy; 1997 - 2000 by <a href="mailto:wsdo@uwf.edu" class="menu">Web 
            Spinners &lt;wsdo@uwf.edu&gt;</a>, <br>
            University of West Florida, 11000 University Parkway, Pensacola, FL 
            32514 </span> 
          </center>
</td>
      </tr>
    </table>
  </div>
</div>
<div class="logo">
<IMG Src="/img/logo-wso.gif" ALT="[WSO Logo]" longdesc="/desc/logodesc.txt">
<a href="/desc/logodesc.txt" title="Logo Description">[D]</a>
</div>
<!-- General Information Links -->

<p class="menuheader">General Information</p>
<?
  mysql_connect("localhost", "nobody", "nobody");
  $query = "SELECT * FROM Category_Links 
            WHERE Category_Name='GeneralInfo'";            ;
  $result = mysql_db_query("webdb", $query); 
  if ($result) {
   while ($r = mysql_fetch_array($result)) {
    
     // ID Number, Automatically Increments
     $ID            = $r["ID"];
     // Link, URL to each page
     $Link          = $r["Link"];
     // Link Name, Text used for link
     $Link_Name     = $r["Link_Name"];
     // Place it falls under, General Information, Divisions, External, etc
     $Category_Name = $r["Category_Name"];
     // Accesskey for ADA Level 2/3 compliance
     $Access_Key = $r["Access_Key"];
     // Language of document being linked to
     $Language = $r["Language"];
     // Title of Link
     $Title = $r["Title"];
     // Style Sheet Class to Apply
     $Class = $r["Class"];
     echo "<p class=\"menuitem\">";
     echo "<A accesskey=\"$Access_Key\" 
              HREF=\"$Link\" 
              hreflang=\"$Language\" 
              title=\"$Title\" 
              class=\"$Class\">$Link_Name</A>";
     echo "</p>";
   } // close while
 } // close if
?>
<!-- Links to Divisional Web Sites -->
<p class="menuheader">Divisions</p>
<p class="menuitem"><a href="/wsdd/" class="menu">WS Design &amp; Dev.</a></p>
<p class="menuitem"><A HREF="/linux/" class=menu>Linux Tech Support</A></p>
<p class="menuitem"><A HREF="/spprojects/" class=menu>Special Projects</A></p>
<p class="menuitem"><A HREF="/wsts/" class=menu>WS Tech Support</A></p>

<!-- Links to Sites Available to Members Only -->
<p class="menuheader">Members Only</p>
<p class="menuitem"><a href="http://wsexec.webspinners.uwf.org/" class="menu">Exec. Committee Info</a></p>
<p class="menuitem"><A HREF="http://devel.webspinners.uwf.org/" class=menu>WS Dev Site</A></p>

<!-- Links to Internal Project Web Sites -->
<p class="menuheader">Projects</p>
<p class="menuitem"><A HREF="/discus/messages/board-topics.html" class=menu>Discus</a></p>
<p class="menuitem"><A HREF="/mailman/listinfo/" class=menu>E-Mail Lists</a></p>
<p class="menuitem"><A HREF="/~geo/" class=menu>General Ed. Online</A></p>
<p class="menuitem"><a href="http://projects.webspinners.uwf.org" class="menu">Project Sites</a></p>
<p class="menuitem"><a href="http://webcon.webspinners.uwf.org" class="menu">Web Seminar Series</a></p>

<!-- Links to External Sites -->
<p class="menuheader">External Sites</p>
<p class="menuitem">
  <a href="https://nautical.uwf.edu/compass/" class="menu">COMPASS</a>
</p>
<p class="menuitem">
  <a href="http://nautical.uwf.edu/" class="menu">Nautical (Intranet)</a>
</p>
<p class="menuitem">
  <a href="http://uwf.edu/ucommons/" class="menu">UCSA Home</a>
</p>
<p class="menuitem">
  <a href="http://www.uwf.edu/" class="menu">UWF Home</a>
</p>
<center>
</center>
</BODY>
</HTML>
<!-- END footer -->
<?php
include("template.inc");
$root='/home/httpd/devel/includes/';
$t = new Template(".", "keep");
/* Do Not Change the Line Below-- it controls which web template file
   is used for the entire site
*/
$t->set_root($root);
$t->set_file('page', "template-db.php");
/* The line below sets the title of the page, change this as appropriate
   for each page
*/

$t->set_var('TITLE', "Welcome to Web Spinners Online");
/* The Line below sets the header for each page, change as appropriate for
each page
*/
$t->set_var('HEADER', "Welcome to Web Spinners Online<br>At the University of West Florida");
/* Do not change anything after this point, as this section controls
the ouputing of the header in the correct place on the template. */
$t->set_block('page', 'header');
// The 'header' block has been extracted from the 'page' template and
// saved as a template variable also named 'header'.
$t->pparse('out', 'header');
// header has been output.
?>
<p class="normal">
Welcome to Web Spinners Online (WSO), the online presence of Web Spinners
at the University of West Florida. WSO features many sections and resources 
devoted to expanding the HTML resources available at the University of 
West Florida. <a href="about.php">[More]</a>
</p>
<p class="header">Web Site Technical Support</p>
<p class="normal">
The Web Site Technical Support Section features all of Web Spinners 
current information concerning Web Site Development, and will soon contain 
information on an HTML listserv.
</p>
<p class="header">Advanced HTML Development</p>
<p class="normal">
The Advanced HTML Section of Web Spinners Online features information
concerning DHTML, CSS, CGI, Java, and advanced features of HTML (such as
tables, forms, etc.) and will include a reference to the most recent 
version of HTML.
</p>
<p class="header">Web Site Programming</p>
<p class="normal">
Web Site Programming contains Server Statistics, and online forms to get 
help, become a member, or to initiate a project request. It is also the 
jumping point for Web Spinners Discussion Online, which will be used as 
a tool to promote HTML discussions online and for internal Web Spinners
discussions.
</p>
<p class="header">Special Projects</p>
<p class="normal">
Special Projects contains information on Web Spinners office hours, a 
listing of current projects, and a listing of goals for the current year.
</p>
<p class="header">Linux Tech Support</p>
<p class="normal">
The Linux Tech Support Section contains links to linux sites. The section 
is meant primarily for support of the Web Spinners Online server, as
well as several developmental workstations
</p>
<p class="header">Archives</p>
<p class="normal">
The Archives Section contains information on Web Spinners and other
resources primarily intended for use by members.
</p>
<?
$t->set_block('page', 'footer');
$t->pparse('out', 'footer');
// footer has been output
?>