Jump to content

Archived

This topic is now archived and is closed to further replies.

minbak

Need someone to guide me

Recommended Posts

I have been looking at the code for the past two days but couldn't figure out how to make it right.

[url=http://www.motortradermalaysia.com]www.motortradermalaysia.com[/url]

First, I would like to make the footer appear at the very bottom of the page and not in the middle of the page.

Second, I want to add in 'forum' and 'about us' link within the grey navigation box.

My index code:
[code]
<?
require_once("conn.php");
require_once("includes.php");
require_once("templates/HeaderTemplate.php");


// ADVANCED SEARCH

require_once("advanced.php");
require_once("templates/AdvancedSearchTemplate.php");

echo "<br><br>";

// TOP 10

$q1 = "select * from cars_listings, cars_agents, cars_priority, cars_vehicle where cars_listings.AgentID = cars_agents.AgentID and cars_agents.PriorityLevel = cars_priority.PriorityLevel and cars_agents.AccountStatus = 'active' and cars_listings.VehicleMake = cars_vehicle.VehicleID order by visits desc limit 0,9 ";

$r1 = mysql_query($q1) or die(mysql_error());
$lrows = mysql_num_rows($r1);

if($lrows > '0')
{
$ListingTable .= "<table align=center width=590 cellspacing=0>\n";
$ListingTable .= "<tr>\n<td width=75>&nbsp;</td>\n\t";

$ListingTable .= "<td width=200 align=center><a class=BlackLink href=\"search.php?c=$_GET[c]&AgentID=$_GET[AgentID]&search_city=$_GET[search_city]&search_state=$_GET[search_state]&search_country=$_GET[search_country]&min=$_GET[min]&max=$_GET[max]&year1=$_GET[year1]&year2=$_GET[year2]&before=$_GET[before]&vehicle=1\">vehicle</a></td>\n\t";

$ListingTable .= "<td width=125 align=center><a class=BlackLink href=\"search.php?c=$_GET[c]&AgentID=$_GET[AgentID]&search_city=$_GET[search_city]&search_state=$_GET[search_state]&search_country=$_GET[search_country]&min=$_GET[min]&max=$_GET[max]&year1=$_GET[year1]&year2=$_GET[year2]&before=$_GET[before]&r=1\">mileage</a></td>\n\t";

$ListingTable .= "<td align=center width=100><a class=BlackLink href=\"search.php?c=$_GET[c]&AgentID=$_GET[AgentID]&search_city=$_GET[search_city]&search_state=$_GET[search_state]&search_country=$_GET[search_country]&min=$_GET[min]&max=$_GET[max]&year1=$_GET[year1]&year2=$_GET[year2]&before=$_GET[before]&p=1\">price</a></td>\n";

$ListingTable .= "</tr>\n</table>\n\n";

$ListingTable .= "<table align=center width=590 border=1 bordercolor=#336699 rules=rows cellspacing=0>\n";

while($a1 = mysql_fetch_array($r1))
{
$ListingTable .= "<tr style=\"border-width:1; border-color:blue\" onMouseOver=\"this.style.background='#FFFFCC'; this.style.cursor='hand'\" onMouseOut=\"this.style.background='white'\" onClick=\"window.open('info.php?id=$a1[ListingID]', '_top')\">\n\t";
$ListingTable .= "<td height=60>";

$ListingTable .= "<table align=center width=\"100%\">\n";

$ListingTable .= "<caption align=center>";

if($a1[PriorityLevel] > '1')
{
$ListingTable .= "<span class=RedLink>$a1[PriorityName] listing</span></caption>\n";
}

$ListingTable .= "<tr>\n\t<td width=75>";

if(!empty($a1[image]))
{
$images = explode("|", $a1[image]);
$MyImage = $images[0];

$ListingTable .= "<img src=\"cars_images/$MyImage\" width=75 height=60 border=1>";
}
else
{
$ListingTable .= "<img src=\"no_image.gif\" border=1>";
}

$ListingTable .= "</td>\n\t";

$MyMiles = number_format($a1[mileage], 0, "", "'");

$ListingTable .= "<td width=225 valign=top><b>$a1[VehicleName] $a1[VehicleModel]</b><br>Offer ID: $a1[ListingID]</td>\n\t";
$ListingTable .= "<td width=100 valign=top align=center>$MyMiles miles<br>$a1[VehicleYear] year</td>\n\t";

$MyPrice = number_format($a1[Price], 2, ".", "'");

$ListingTable .= "<td align=center width=100 valign=top><b>RM$MyPrice</td>\n";

$ListingTable .= "</tr>\n";

$ShortDesc = substr($a1[DetailedDesc], 0, 200);

$ListingTable .= "<tr>\n\t<td colspan=4>$ShortDesc</td>\n</tr>\n";

$ListingTable .= "</table>\n\n</td>\n</tr>\n\n";

}

$ListingTable .= "</table>";


}
require_once("templates/SearchTemplate.php");

echo "<br>";
?>
<?

require_once("templates/FooterTemplate.php");
?>
[/code]


Share this post


Link to post
Share on other sites
Code for header template

[code]
<html>
<head>
<title><?=$aset[SiteTitle]?></title><meta dcb license OBJ04PS7Q >
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="DESCRIPTION" CONTENT="<?=$aset[SiteDescription]?>">
<META NAME="KEYWORDS" CONTENT="<?=$aset[SiteKeywords]?>">

<style>
.BlackLink {font-family:verdana; font-size:11; color:black; font-weight:bold; text-decoration:none}
a.BlackLink:hover {text-decoration: underline}

.BlueLink {font-family:verdana; font-size:11; color:blue; font-weight:bold; text-decoration:underline}
a.BlueLink:hover {text-decoration: underline}

.RedLink {font-family:verdana; font-size:11; color:red; font-weight:bold; text-decoration:none}
a.RedLink:hover {text-decoration: underline}

a.CatLinks {font-family:verdana; font-size:11; color:black; font-weight:bold; text-decoration:none}
a.CatLinks:hover {text-decoration:underline}

a.SubCatLinks {font-family:verdana; font-size:11; color:blue; font-weight:bold; text-decoration:none}
a.SubCatLinks:hover {text-decoration:underline}

a.TitleLinks {font-family:verdana; font-size:12; color:black; font-weight:bold; text-decoration:none}
a.TitleLinks:hover {text-decoration:underline}

.ItemText {font-family:verdana; font-size:11; color:black; font-weight:regular; text-decoration:none}

body {background-color:white; font-family:verdana; font-size:11; color:black; font-weight:regular; text-align:left}

td {font-family:verdana; font-size:11; font-weight:regular; text-decoration:none}

.sm {font-family:verdana; font-size:11}

input, select, textarea {font-family:verdana; font-size:11; color:black; border-width:1; border-color:black}
.style2 {font-family: "Courier New", Courier, mono}
    .style3 {font-family: Geneva, Arial, Helvetica, sans-serif}
    .style4 {font-weight: bold}
.style5 {
font-family: Geneva, Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 14px;
}
    .style6 {font-size: 9px}
    .style7 {font-size: 10px}
    .style8 {font-size: 14px}
    .style9 {color: #00CC00}
.style10 {font-family: Geneva, Arial, Helvetica, sans-serif; font-weight: bold; font-size: 14px; color: #00CC00; }
    </style>

<script language="JavaScript">

function CheckSearch() {

if(document.f1.what.value=="")
{
window.alert('Enter the search criteria, please!');
document.f1.what.focus();
return false;
}

}

function CheckFriend() {

if(document.sfriend.f1.value=="")
{
window.alert('Enter your email address!');
document.sfriend.f1.focus();
return false;
}

if(document.sfriend.f2.value=="")
{
window.alert('Enter your friend email address!');
document.sfriend.f2.focus();
return false;
}

}

function CheckLogin() {

if(document.lform.us.value=="")
{
window.alert('Enter your username, please!');
document.lform.us.focus();
return false;
}

if(document.lform.ps.value=="")
{
window.alert('Enter your password, please!');
document.lform.ps.focus();
return false;
}

}

function CheckForgot() {

if(document.ForgotForm.u2.value=="")
{
window.alert('Enter your username, please!');
document.ForgotForm.u2.focus();
return false;
}
}

function CheckRegister() {

if(document.RegForm.NewUsername.value=="")
{
window.alert('Enter your username, please!');
document.RegForm.NewUsername.focus();
return false;
}

if(document.RegForm.p1.value=="")
{
window.alert('Enter your password, please!');
document.RegForm.p1.focus();
return false;
}

if(document.RegForm.p2.value=="")
{
window.alert('Confirm your password, please!');
document.RegForm.p2.focus();
return false;
}

if(document.RegForm.p1.value != "" && document.RegForm.p2.value != "" && document.RegForm.p1.value != document.RegForm.p2.value)
{
window.alert('Enter and confirm your password again!');
document.RegForm.p1.value="";
document.RegForm.p2.value="";
document.RegForm.p1.focus();
return false;
}

if(document.RegForm.FirstName.value=="")
{
window.alert('Enter your First Name, please!');
document.RegForm.FirstName.focus();
return false;
}

if(document.RegForm.LastName.value=="")
{
window.alert('Enter your Last Name, please!');
document.RegForm.LastName.focus();
return false;
}

if(document.RegForm.address.value=="")
{
alert('Enter your address, please!');
document.RegForm.address.focus();
return false;
}

if(document.RegForm.city.value=="")
{
alert('Enter your city, please!');
document.RegForm.city.focus();
return false;
}

if(document.RegForm.state.value=="")
{
alert('Enter your state, please!');
document.RegForm.state.focus();
return false;
}

if(document.RegForm.country.value=="")
{
alert('Select your country, please!');
document.RegForm.country.focus();
return false;
}

if(document.RegForm.phone.value=="")
{
window.alert('Enter your Phone, please!');
document.RegForm.phone.focus();
return false;
}

if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.RegForm.email.value))
{
return true;
}

alert("Invalid E-mail Address! Please re-enter.");
document.RegForm.email.focus();
return false;


}

function CheckProfile() {

if(document.RegForm.p1.value=="")
{
window.alert('Enter your password, please!');
document.RegForm.p1.focus();
return false;
}

if(document.RegForm.p2.value=="")
{
window.alert('Confirm your password, please!');
document.RegForm.p2.focus();
return false;
}

if(document.RegForm.p1.value != "" && document.RegForm.p2.value != "" && document.RegForm.p1.value != document.RegForm.p2.value)
{
window.alert('Enter and confirm your password again!');
document.RegForm.p1.value="";
document.RegForm.p2.value="";
document.RegForm.p1.focus();
return false;
}

if(document.RegForm.FirstName.value=="")
{
window.alert('Enter your First Name, please!');
document.RegForm.FirstName.focus();
return false;
}

if(document.RegForm.LastName.value=="")
{
window.alert('Enter your Last Name, please!');
document.RegForm.LastName.focus();
return false;
}

if(document.RegForm.address.value=="")
{
alert('Enter your address, please!');
document.RegForm.address.focus();
return false;
}

if(document.RegForm.city.value=="")
{
alert('Enter your city, please!');
document.RegForm.city.focus();
return false;
}

if(document.RegForm.state.value=="")
{
alert('Enter your state, please!');
document.RegForm.state.focus();
return false;
}

if(document.RegForm.country.value=="")
{
alert('Select your country, please!');
document.RegForm.country.focus();
return false;
}

if(document.RegForm.phone.value=="")
{
window.alert('Enter your Phone, please!');
document.RegForm.phone.focus();
return false;
}

if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.RegForm.email.value))
{
return true;
}

alert("Invalid E-mail Address! Please re-enter.");
document.RegForm.email.focus();
return false;

}

function CheckOffer() {

if(document.PostForm.CategoryID.value=="")
{
alert('Select the category in which your offer will appear!');
document.PostForm.CategoryID.focus();
return false;
}

if(document.PostForm.year.value=="")
{
alert('Select the vehicle year, please!');
document.PostForm.year.focus();
return false;
}

if(document.PostForm.SelectMake.value=="")
{
alert('Select the vehicle make, please!');
document.PostForm.SelectMake.focus();
return false;
}

if(document.PostForm.VehicleModel.value=="")
{
alert('Enter the vehicle model, please!');
document.PostForm.VehicleModel.focus();
return false;
}

if(document.PostForm.VehicleColor.value=="")
{
alert('Enter the vehicle color, please!');
document.PostForm.VehicleColor.focus();
return false;
}

if(document.PostForm.mileage.value=="")
{
alert('Enter the vehicle mileage, please!');
document.PostForm.mileage.focus();
return false;
}

if(document.PostForm.DetailedDesc.value=="")
{
alert('Describe your vehicle in details, please!');
document.PostForm.DetailedDesc.focus();
return false;
}

if(document.PostForm.Price.value=="")
{
alert('Enter the price, please!');
document.PostForm.Price.focus();
return false;
}

}

</script>
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('images/img_on_03.gif','images/img_on_04.gif','images/img_on_05.gif','images/img_on_06.gif','images/img_on_07.gif')">
<table width="770" border="0" cellspacing="0" cellpadding="0" align="center" background="images/index_22.gif" bordercolor="#000000">
  <tr>
    <td background="images/index_22.gif" align="left" valign="top">
      <table width=770 border=0 cellpadding=0 cellspacing=0 align="center">
        <tr>
          <td colspan=4 rowspan=2 background="images/index_01.gif" valign="bottom" align="left">
            <table width="100%" border="0" cellspacing="0" cellpadding="6">
              <tr>
                <td><font face="Arial, Helvetica, sans-serif" size="4"><b><font color="#FFFFFF">Motortradermalaysia.com - Your ultimate guide
      to buy and sell your motor in Malaysia </font></b></font></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
            </table>
          </td>
          <td colspan=7> <img src="images/index_02.gif" width=347 height=51 alt=""></td>
          <td> <img src="images/spacer.gif" width=1 height=51 alt=""></td>
        </tr>
        <tr>
          <td> <a href="http://www.Motortradermalaysia.com" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image32','','images/img_on_03.gif',1)"><img name="Image32" border="0" src="images/index_03.gif" width="66" height="46"></a></td>
          <td> <a href="http://www.Motortradermalaysia.com/register.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image33','','images/img_on_04.gif',1)"><img name="Image33" border="0" src="images/index_04.gif" width="70" height="46"></a></td>
          <td colspan=2> <a href="http://www.Motortradermalaysia.com/login.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image34','','images/img_on_05.gif',1)"><img name="Image34" border="0" src="images/index_05.gif" width="66" height="46"></a></td>
          <td> <a href="http://www.Motortradermalaysia.com/advanced.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image35','','images/img_on_06.gif',1)"><img name="Image35" border="0" src="images/index_06.gif" width="68" height="46"></a></td>
          <td colspan=2> <a href="mailto:kstan1122@yahoo.com" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image36','','images/img_on_07.gif',1)"><img name="Image36" border="0" src="images/index_07.gif" width="77" height="46"></a></td>
          <td> <img src="images/spacer.gif" width=1 height=46 alt=""></td>
        </tr>
        <tr>
          <td colspan=11 background="images/flash.gif"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0"
  id="Movie1" width="770" height="105">
              <param name="movie" value="Movie1.swf">
              <param name="quality" value="high">
              <param name="bgcolor" value="#FFFFFF">
              <embed name="Movie1" src="Movie1.swf" quality="high" bgcolor="#FFFFFF"
    width="770" height="105"
    type="application/x-shockwave-flash"
    pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
              </embed>
            </object></td>
          <td> <img src="images/spacer.gif" width=1 height=105 alt=""></td>
        </tr>
        <tr>
          <td> <img src="images/spacer.gif" width=166 height=1 alt=""></td>
          <td> <img src="images/spacer.gif" width=9 height=1 alt=""></td>
          <td> <img src="images/spacer.gif" width=178 height=1 alt=""></td>
          <td> <img src="images/spacer.gif" width=70 height=1 alt=""></td>
          <td> <img src="images/spacer.gif" width=66 height=1 alt=""></td>
          <td> <img src="images/spacer.gif" width=70 height=1 alt=""></td>
          <td> <img src="images/spacer.gif" width=12 height=1 alt=""></td>
          <td> <img src="images/spacer.gif" width=54 height=1 alt=""></td>
          <td> <img src="images/spacer.gif" width=68 height=1 alt=""></td>
          <td> <img src="images/spacer.gif" width=55 height=1 alt=""></td>
          <td> <img src="images/spacer.gif" width=22 height=1 alt=""></td>
          <td></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<span class="style1">
<table width=770 border=0 cellpadding=0 cellspacing=0 align="center">
<p><span class="style2"><span class="style3"><span class="style4"><span class="style6"><span class="style7"><span class="style8"><span class="style9"><a href="../mainpage.php">Read about Our Story so far......</a></span></span></span></span></span></span></span><span class="style10"></span></span></p>
<p class="style5"><span class="style9"><a href="/forum">or Join our <em>Talk-Talk</em> forum</a></span>  </p>
<div align="center"></div>
  <tr>
    <td rowspan=6 background="images/index_22.gif" align="left" valign="top">
     
    <p><img src="images/index_10.gif" width=166 alt=""></p>
  <!-- main web site content goes here -->
<?=$Categories?>

<br>

<?=$RandomProperty?>

<br>
<center>
<?
include_once("ShowBanner.php");
?>
</center>
</td>


  <td valign=top style="padding-top:5" width=600>  <div align="center">
    <?
include_once("ShowBanner.php");
?>
  </div>
[/code]

Share this post


Link to post
Share on other sites
Please edit you posts and surround your code blocks with [nobbc][code][/code][/nobbc] tags. This will make you code much easier to read.

Ken

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.