bluedollar
Programmer
I have a number of tables which display as shown below:
---------------------------------------------------
: header :
: :
---------------------------------------------------
: : :
: : :
: : main :
: : :
: menu : :
: : :
: : :
---------------------------------------------------
: footer :
---------------------------------------------------
The layout shown above works fine, however the pages that are displayed in my main are displayed as follows:
----------------------------------------------
: ----------------------------------------- :
: : unwanted gap : :
: ----------------------------------------- :
: : page i want to display : :
: : : :
: : : :
: ----------------------------------------- :
----------------------------------------------
I can not work out how to lose the gap at the top, have messed about with the html for ages without any positive results. The html for the main is shown below:
function mainstart() {
echo'<td><table border="1"><tr><td>';
}
Then the code for the top part of a page that is displayed in main is shown below:
function info1() {
echo'<html>';
echo'<head>';
echo'<title></title>';
echo'<link rel="stylesheet" href="mystyle.php">';
echo'</head>';
echo'<body>';
echo'<table border="1" width="100%" align="center">';
$SQL = "select active_id from active";
include_once("Cconnection.php"
;
$this->obconnect = new connect_class();
$this->obconnect->connection();
$this->obconnect->dbconnect();
$this->id = $this->obconnect->selectcol($SQL,"active_id"
;
}
function title() {
$SQL = "select title from conference where conf_id = '$this->id'";
$title = $this->obconnect->selectcol($SQL,"title"
;
echo'<tr><th class="1">'.$title.'</th></tr>';
}
===========================================================
The full code listing for the template is shown below:
<?php
class template_class {
function header() {
echo'<table width="100%" border="0" cellspacing="0">';
echo'<tr><td></td></tr>';
echo'<tr><td></td><td><img src="\\graphics/untitled-4.png" border="1"></td><td></td></tr>';
echo'<tr><td><br></td></tr>';
echo'</table>';
}
function menu() {
//session_start();
echo'<table cellspacing="0">';
echo'<tr valign="top"><td width="150">';
#personal table
if (isset ($_SESSION['email'])) {
echo'<table width="120" bgcolor="#CACCCD" border="0">';
include_once("Cconnection.php"
;
$obconnect = new connect_class();
$obconnect->connection();
$obconnect->dbconnect();
$email_ = $_SESSION['email'];
$type_ = $_SESSION['type'];
$type_ .= 's';
$SQL = "select first_name from $type_ where email = '$email_'";
$result1 = $obconnect->selectcol($SQL,"first_name"
;
$SQL = "select last_name from $type_ where email = '$email_'";
$result2 = $obconnect->selectcol($SQL,"last_name"
;
echo'<tr><th class="4">'.$result1.' '.$result2.'</th></tr>';
echo'<tr><td class="2">';
if ($type_=="Attendees"
{ echo'<A class="1" HREF="../editattendee.php">'; }
else if ($type_=="Reviewers"
{ echo'<A class="1" HREF="../editauthor.php">'; }
else if ($type_=="Authors"
{ echo'<A class="1" HREF="../editreviewer.php">'; }
echo'edit profile</a></td></tr>';
if (($_SESSION['social'] !=""
or ($_SESSION['proc'] != ""
or ($_SESSION['acc'] != ""
or ($_SESSION['accep'] != ""
) {
echo'<tr><td class="2"><A class="1" HREF="../checkout.php">checkout</a></td></tr>';
}
echo'<tr><td class="2"><A class="1" HREF="../logout.php">logout</a></td></tr>';
echo'</table>';
}
else if ((isset($_SESSION['social'])) or (isset($_SESSION['proc'])) or (isset($_SESSION['accom'])) or (isset($_SESSION['accep']))) {
echo'<table width="120" bgcolor="#CACCCD" border="0">';
echo'<tr><td class="2"><A class="1" HREF="../checkout.php">checkout</a></td></tr>';
echo'</table>';
}
echo'<P>';
//echo'<table border="0" bordercolor="#000000"><tr><td>';
//echo'<table BORDER=1 CELLSPACING=0 CELLPADDING=2 BORDERCOLOR=000000><TR><td>';
echo'<table bgcolor="#CACCCD" width="120" BORDER=1 CELLSPACING=0 CELLPADDING=2 BORDERCOLOR=000000>';
echo'<tr><th class="4">Site Navigation</th></tr>';
if ($_SESSION['email']==""
{
echo'<tr><td class="2"><A class="1" HREF="../login.php">login</A></td></tr>';
}
$SQL = "select active_id from active";
include_once("Cconnection.php"
;
$obconnect = new connect_class();
$obconnect->connection();
$obconnect->dbconnect();
$active_conf = $obconnect->selectcol($SQL,"active_id"
;
#conference link
$SQL = "select info from conference where conf_id = '$active_conf'";
$info = $obconnect->selectcol($SQL,"info"
;
if ($info==1) {
echo'<tr><td class="2"><A class="1" HREF="../showinfo.php">Information</A></td></tr>';
}
#timetable link
$SQL = "select timetable from conference where conf_id = '$active_conf'";
$timetable = $obconnect->selectcol($SQL,"timetable"
;
if ($timetable==1) {
echo'<tr><td class="2"><A class="1" HREF="../showtimetable.php">Timetable</A></td></tr>';
}
#accomodation link
$SQL = "select accomodation from conference where conf_id = '$active_conf'";
$accomodation = $obconnect->selectcol($SQL,"accomodation"
;
if ($accomodation==1) {
echo'<tr><td class="2"><A class="1" HREF="../showaccomodation.php">Accomodation</A></td></tr>';
}
#social link
$SQL = "select social from conference where conf_id = '$active_conf'";
$social = $obconnect->selectcol($SQL,"social"
;
if ($social==1) {
echo'<tr><td class="2"><A class="1" HREF="../showsocial.php">Social Event</A></td></tr>';
}
#procedures link
$SQL = "select proc from conference where conf_id = '$active_conf'";
$proc = $obconnect->selectcol($SQL,"proc"
;
if ($proc==1) {
echo'<tr><td class="2"><A class="1" HREF="../showprocedures.php">Procedures</A></td></tr>';
}
//$obconnect->closelink();
#registration link
$SQL = "select registration_date from conference where conf_id = '$active_conf'";
$result = $obconnect->selectcol($SQL,"registration_date"
;
$reg_date = explode("-",$result);
$reg_datet = mktime(24,0,0,$reg_date[1],$reg_date[2],$reg_date[0]);
if (($_SESSION['email']==""
&& ($reg_datet >= time())) {
#visitor registration
echo'<tr><td><br><table /*bgcolor="#999999"*/ align="center" border="0">';
echo '<form name="type" action="registerscript.php" METHOD=POST>';
echo'<tr><td>Register as: </td></tr>';
echo'<tr><td class="2"><SELECT name="type"><OPTION>Attendee<OPTION>Author<OPTION>Reviewer</SELECT></td></tr>';
echo'<tr><td class="2"><input type=submit name="register" value="Register"></td></tr>';
echo'</form></table></td></tr>';
}
echo'</table>';
//echo'</td></tr></table>';
echo'</td>';
}
function mainstart() {
echo'<td><table border="1"><tr><td>';
}
function mainend() {
echo'</td></tr></table></td></tr></table>';
}
function footer() {
echo'<table width="100%" cellspacing="0">';
echo'<tr><td><br><hr><pre>© 2003 Dan Polhill </pre></td></tr>';
echo'</table>';
}
}
?>
========================================================
Any help would be greatly appreciated
Thanks
Dan
---------------------------------------------------
: header :
: :
---------------------------------------------------
: : :
: : :
: : main :
: : :
: menu : :
: : :
: : :
---------------------------------------------------
: footer :
---------------------------------------------------
The layout shown above works fine, however the pages that are displayed in my main are displayed as follows:
----------------------------------------------
: ----------------------------------------- :
: : unwanted gap : :
: ----------------------------------------- :
: : page i want to display : :
: : : :
: : : :
: ----------------------------------------- :
----------------------------------------------
I can not work out how to lose the gap at the top, have messed about with the html for ages without any positive results. The html for the main is shown below:
function mainstart() {
echo'<td><table border="1"><tr><td>';
}
Then the code for the top part of a page that is displayed in main is shown below:
function info1() {
echo'<html>';
echo'<head>';
echo'<title></title>';
echo'<link rel="stylesheet" href="mystyle.php">';
echo'</head>';
echo'<body>';
echo'<table border="1" width="100%" align="center">';
$SQL = "select active_id from active";
include_once("Cconnection.php"
$this->obconnect = new connect_class();
$this->obconnect->connection();
$this->obconnect->dbconnect();
$this->id = $this->obconnect->selectcol($SQL,"active_id"
}
function title() {
$SQL = "select title from conference where conf_id = '$this->id'";
$title = $this->obconnect->selectcol($SQL,"title"
echo'<tr><th class="1">'.$title.'</th></tr>';
}
===========================================================
The full code listing for the template is shown below:
<?php
class template_class {
function header() {
echo'<table width="100%" border="0" cellspacing="0">';
echo'<tr><td></td></tr>';
echo'<tr><td></td><td><img src="\\graphics/untitled-4.png" border="1"></td><td></td></tr>';
echo'<tr><td><br></td></tr>';
echo'</table>';
}
function menu() {
//session_start();
echo'<table cellspacing="0">';
echo'<tr valign="top"><td width="150">';
#personal table
if (isset ($_SESSION['email'])) {
echo'<table width="120" bgcolor="#CACCCD" border="0">';
include_once("Cconnection.php"
$obconnect = new connect_class();
$obconnect->connection();
$obconnect->dbconnect();
$email_ = $_SESSION['email'];
$type_ = $_SESSION['type'];
$type_ .= 's';
$SQL = "select first_name from $type_ where email = '$email_'";
$result1 = $obconnect->selectcol($SQL,"first_name"
$SQL = "select last_name from $type_ where email = '$email_'";
$result2 = $obconnect->selectcol($SQL,"last_name"
echo'<tr><th class="4">'.$result1.' '.$result2.'</th></tr>';
echo'<tr><td class="2">';
if ($type_=="Attendees"
else if ($type_=="Reviewers"
else if ($type_=="Authors"
echo'edit profile</a></td></tr>';
if (($_SESSION['social'] !=""
echo'<tr><td class="2"><A class="1" HREF="../checkout.php">checkout</a></td></tr>';
}
echo'<tr><td class="2"><A class="1" HREF="../logout.php">logout</a></td></tr>';
echo'</table>';
}
else if ((isset($_SESSION['social'])) or (isset($_SESSION['proc'])) or (isset($_SESSION['accom'])) or (isset($_SESSION['accep']))) {
echo'<table width="120" bgcolor="#CACCCD" border="0">';
echo'<tr><td class="2"><A class="1" HREF="../checkout.php">checkout</a></td></tr>';
echo'</table>';
}
echo'<P>';
//echo'<table border="0" bordercolor="#000000"><tr><td>';
//echo'<table BORDER=1 CELLSPACING=0 CELLPADDING=2 BORDERCOLOR=000000><TR><td>';
echo'<table bgcolor="#CACCCD" width="120" BORDER=1 CELLSPACING=0 CELLPADDING=2 BORDERCOLOR=000000>';
echo'<tr><th class="4">Site Navigation</th></tr>';
if ($_SESSION['email']==""
echo'<tr><td class="2"><A class="1" HREF="../login.php">login</A></td></tr>';
}
$SQL = "select active_id from active";
include_once("Cconnection.php"
$obconnect = new connect_class();
$obconnect->connection();
$obconnect->dbconnect();
$active_conf = $obconnect->selectcol($SQL,"active_id"
#conference link
$SQL = "select info from conference where conf_id = '$active_conf'";
$info = $obconnect->selectcol($SQL,"info"
if ($info==1) {
echo'<tr><td class="2"><A class="1" HREF="../showinfo.php">Information</A></td></tr>';
}
#timetable link
$SQL = "select timetable from conference where conf_id = '$active_conf'";
$timetable = $obconnect->selectcol($SQL,"timetable"
if ($timetable==1) {
echo'<tr><td class="2"><A class="1" HREF="../showtimetable.php">Timetable</A></td></tr>';
}
#accomodation link
$SQL = "select accomodation from conference where conf_id = '$active_conf'";
$accomodation = $obconnect->selectcol($SQL,"accomodation"
if ($accomodation==1) {
echo'<tr><td class="2"><A class="1" HREF="../showaccomodation.php">Accomodation</A></td></tr>';
}
#social link
$SQL = "select social from conference where conf_id = '$active_conf'";
$social = $obconnect->selectcol($SQL,"social"
if ($social==1) {
echo'<tr><td class="2"><A class="1" HREF="../showsocial.php">Social Event</A></td></tr>';
}
#procedures link
$SQL = "select proc from conference where conf_id = '$active_conf'";
$proc = $obconnect->selectcol($SQL,"proc"
if ($proc==1) {
echo'<tr><td class="2"><A class="1" HREF="../showprocedures.php">Procedures</A></td></tr>';
}
//$obconnect->closelink();
#registration link
$SQL = "select registration_date from conference where conf_id = '$active_conf'";
$result = $obconnect->selectcol($SQL,"registration_date"
$reg_date = explode("-",$result);
$reg_datet = mktime(24,0,0,$reg_date[1],$reg_date[2],$reg_date[0]);
if (($_SESSION['email']==""
#visitor registration
echo'<tr><td><br><table /*bgcolor="#999999"*/ align="center" border="0">';
echo '<form name="type" action="registerscript.php" METHOD=POST>';
echo'<tr><td>Register as: </td></tr>';
echo'<tr><td class="2"><SELECT name="type"><OPTION>Attendee<OPTION>Author<OPTION>Reviewer</SELECT></td></tr>';
echo'<tr><td class="2"><input type=submit name="register" value="Register"></td></tr>';
echo'</form></table></td></tr>';
}
echo'</table>';
//echo'</td></tr></table>';
echo'</td>';
}
function mainstart() {
echo'<td><table border="1"><tr><td>';
}
function mainend() {
echo'</td></tr></table></td></tr></table>';
}
function footer() {
echo'<table width="100%" cellspacing="0">';
echo'<tr><td><br><hr><pre>© 2003 Dan Polhill </pre></td></tr>';
echo'</table>';
}
}
?>
========================================================
Any help would be greatly appreciated
Thanks
Dan