PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Donovan
Client


Joined: Oct 07, 2003
Posts: 675
Location: Ohio

PostPosted: Wed Jul 16, 2008 1:12 pm Reply with quote Back to top

Initial design of a new module I'm making for my kids swim team. I wanted a tabbed menu to list Roster, Records, Coaches and the like across the top.

I have used this tabmenu() before and wanted to replicate it here but so far am getting a blank page. I turned error reporting on but still see nothing.

Maybe someone can see what is wrong with this index.php


Code:
<?php

/************************************************************************
* Idle Hour Swim Team Module
* By: Steve Donovan
* http://www.idlehourswimteam.org
* Copyright © 2007 by Idle Hour Swim Club
* License: GNU/GPL
************************************************************************/

if (!defined('MODULE_FILE')) {
    die ("You can't access this file directly...");
}

//error_reporting (E_ALL|E_STRICT);
error_reporting(E_ALL);

define('INDEX_FILE', TRUE);
$index = 1;

//Required Files
@include_once("header.php");
$module_name = basename(dirname(__FILE__));
@get_lang($module_name);
global $module_name, $db, $prefix, $bgcolor1, $bgcolor2;

switch($op) {
      
      case "roster":
         swim_menu('Roster');      
         break;      

      case "team_records":
         swim_menu('Team Records');
         break;   

      case "pool_records":
         swim_menu('Pool Records');      
         break;

      case "swim_meets":
         swim_menu('Swim Meets');
         break;

      case "coaches":
         swim_menu('Coaches');
         break;   

      case "board_members":
         swim_menu('Board Members');
         break;

      default:
      swim_menu('Information');
      break;
         
}

function tabmenu(){
    global $prefix, $db, $bgcolor2, $bgcolor3;
echo "
 <style type=\"text/css\">
     a.tab {
        border-collapse: collapse;
        border-style: solid solid none solid;
        border-color: $bgcolor2;
        border-width: 1px 1px 0px 1px;
        background-color: $bgcolor2;
        padding: 2px 0.5em 1px 0.5em;
        margin-top: 4px;
        font-family: arial;
        text-decoration: none;
      }
          a.tab2 {
        border-collapse: collapse;
        border-style: solid solid solid solid;
        border-color: $bgcolor2;
        border-width: 1px 1px 1px 1px;
        background-color: $bgcolor2;
        padding: 2px 0.5em 1px 0.5em;
        margin-top: 4px;
        font-family: arial;
        text-decoration: none;
      }
      a.tab:hover {
        border-color: $bgcolor2;
        background-color: $bgcolor3;
      text-decoration: none;
       text-decoration: bold;
      }
      a.tab2:hover {
        border-color: $bgcolor2;
        background-color: $bgcolor3;
      text-decoration: none;
       text-decoration: bold;
      }
      .panel { border: solid 1px $bgcolor2; background-color: $bgcolor1; padding: 5px; height: 300px; overflow: none;
     text-decoration: none;}
    </style>";
   ?>
    <script language="JavaScript" type="text/javascript">
      var panels = new Array('panel1', 'panel2', 'panel3', 'panel4', 'panel5', 'panel6', 'panel7', 'panel8','panel9');
      var selectedTab = null;
      function showPanel(tab, name)
      {
        if (selectedTab)
        {
          selectedTab.style.backgroundColor = '<? echo"$bgcolor2";?>';
          selectedTab.style.paddingTop = '';
          selectedTab.style.paddingBottom = '2px';
        }
        selectedTab = tab;
        selectedTab.style.backgroundColor = '<? echo"$bgcolor3";?>';
        selectedTab.style.paddingTop = '4px';
        for(i = 0; i < panels.length; i++)
        {
          document.getElementById(panels[i]).style.display = (name == panels[i]) ? 'block':'none';
        }
        return false;
      }
    </script>
<?php
}

/**********************************
*  Swim Team Menu
***********************************/

function swim_menu($panel) {
    global $prefix, $db, $bgcolor2, $bgcolor3;
   tabmenu();
    include("header.php");   
    OpenTable();
    echo "<center><strong>Idle Hour Swim Team</strong></center><br>";
   echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel1');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\">Information</a>";
    echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel2');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Team Roster</a>";
    echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel3');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Team Records</a>";
   echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel4');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Pool Records</a>";
   echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel5');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Swim Meets</a>";
    echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel6');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Coaches</a>";
    echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel7');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Board Members</a>";
   echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel8');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Join the Team</a>";   
   
   if ($panel=="Information"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
   echo "<div class=\"panel\" id=\"panel1\" $panstyle>";
   information();
   echo "</div>";
   if ($panel=="Roster"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
   echo "<div class=\"panel\" id=\"panel2\" $panstyle>";   
   roster();
   echo "</div>";
   if ($panel=="Team Records"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
   echo "<div class=\"panel\" id=\"panel3\" $panstyle>";   
   team_records();
   echo "</div>";
   if ($panel=="Pool Records"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
   echo "<div class=\"panel\" id=\"panel4\" $panstyle>";   
   pool_records();
   echo "</div>";
   if ($panel=="Swim Meets"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
   echo "<div class=\"panel\" id=\"panel5\" $panstyle>";   
   swim_meets();
   echo "</div>";
   if ($panel=="Coaches"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
   echo "<div class=\"panel\" id=\"panel6\" $panstyle>";   
   coaches();
   echo "</div>";
   if ($panel=="Board Members"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
   echo "<div class=\"panel\" id=\"panel7\" $panstyle>";   
   board_members();
   echo "</div>";
   CloseTable();
   echo "<br>";   
   echo "<br>";   
    include("footer.php");
}

/**********************************
*  Information
***********************************/

function information() {
    global $prefix, $db, $bgcolor2, $bgcolor3;
   tabmenu();
   echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
   echo"<tr>"
   ."<td>Information Under Construction</td>"
   ."</tr>"
   ."</table>";

  include("footer.php");   
}


/**********************************
*  Team Roster
***********************************/

function roster() {
   global $prefix, $db, $bgcolor2, $bgcolor3;
   tabmenu();   
   echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
   echo"<tr>"
   ."<td>Roster Under Construction</td>"
   ."</tr>"
   ."</table>";

 include("footer.php");
}

/**********************************
*  Team Records
***********************************/

function team_records() {
   global $prefix, $db, $bgcolor2, $bgcolor3;
   tabmenu();
   echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
   echo"<tr>"
   ."<td>Team Records Under Construction</td>"
   ."</tr>"
   ."</table>";
  include("footer.php");   
}
   
/**********************************
*  Pool Records
***********************************/

function pool_records() {
    global $prefix, $db, $bgcolor2, $bgcolor3;
   tabmenu();
   echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
   echo"<tr>"
   ."<td>Pool Records Under Construction</td>"
   ."</tr>"
   ."</table>";
  include("footer.php");   
}

/**********************************
*  Swim Meets
***********************************/

function swim_meets() {
    global $prefix, $db, $bgcolor2, $bgcolor3;
   tabmenu();
   echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
   echo"<tr>"
   ."<td>Swim Meets Under Construction</td>"
   ."</tr>"
   ."</table>";
  include("footer.php");   
}

/**********************************
*  Coaches
***********************************/

function coaches() {
    global $prefix, $db, $bgcolor2, $bgcolor3;
   tabmenu();
   echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
   echo"<tr>"
   ."<td>Coaches Under Construction</td>"
   ."</tr>"
   ."</table>";
  include("footer.php");   
}

/**********************************
*  Board Members
***********************************/

function board_members() {
    global $prefix, $db, $bgcolor2, $bgcolor3;
   tabmenu();
   echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
   echo"<tr>"
   ."<td>Board Members Under Construction</td>"
   ."</tr>"
   ."</table>";
  include("footer.php");   
}

?>
View user's profile Send private message Visit poster's website ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14925
Location: Kansas

PostPosted: Mon Jul 21, 2008 6:42 am Reply with quote Back to top

Remove all @ signs from the beginning of those statements. They suppress the error messages and make debugging impossible.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Donovan
Client


Joined: Oct 07, 2003
Posts: 675
Location: Ohio

PostPosted: Mon Jul 21, 2008 2:54 pm Reply with quote Back to top

Changed here but still nothing displayed.

Code:
if (!defined('MODULE_FILE')) {
    die ("You can't access this file directly...");
}
require_once('mainfile.php');
//error_reporting (E_ALL|E_STRICT);
error_reporting(E_ALL);

define('INDEX_FILE', TRUE);
$index = 1;

//Required Files
include_once("header.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
global $module_name, $db, $prefix, $bgcolor1, $bgcolor2;
View user's profile Send private message Visit poster's website ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14925
Location: Kansas

PostPosted: Mon Jul 21, 2008 4:06 pm Reply with quote Back to top

Have you checked your server error log?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Donovan
Client


Joined: Oct 07, 2003
Posts: 675
Location: Ohio

PostPosted: Mon Jul 21, 2008 5:09 pm Reply with quote Back to top

The only thing in my error logs are I'm missing an image in my theme.

public_html/themes/images/PH2BLUE/pixel.gif

I just now fixed the path.
View user's profile Send private message Visit poster's website ICQ Number
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum