| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Account Suspended Join Date: May 2005
Posts: 34
![]() | 200 np for urgent help!!!! (php) Ok i have just put together http://directhomesales.co.uk/ however the header is kind of annoying coming up on each page. So i would like some php that would have this affect: if webpage = index show 'music header' else if webpage = anything other than index show 'normal header' Yes 200 np for the person who writes the working script just write under show flash code here. You can use view source to see how header.php cureently is, and if you scroll down u can see the current flash code. ????: NamePros.com http://www.namepros.com/programming/92298-200-np-for-urgent-help-php.html Thankyou And i cant just change it for each page cos the template works from one header file |
| |
| | THREAD STARTER #7 (permalink) |
| Account Suspended Join Date: May 2005
Posts: 34
![]() | i have mate look ill paste the header code: <html> <head> <title><?=$aset[SiteTitle]?></title> <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:tahoma, verdana, helvetica, arial; font-size:11; color:black; font-weight:bold; text-decoration:none} a.BlackLink:hover {text-decoration: underline} .BlackLinkB {font-family:tahoma, verdana, helvetica, arial; font-size:13; color:black; font-weight:bold; text-decoration:none} a.BlackLinkB:hover {text-decoration: underline} .BlueLink {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:blue; font-weight:bold; text-decoration:underline} a.BlueLink:hover {text-decoration: underline} .RedLink {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:red; font-weight:bold; text-decoration:none} a.RedLink:hover {text-decoration: underline} a.CatLinks {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:white; font-weight:bold; text-decoration:none} a.CatLinks:hover {text-decoration:underline} a.SubCatLinks {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:#878888; font-weight:normal; text-decoration:none} a.SubCatLinks:hover {text-decoration:underline} a.SubCatLinksB {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:#000000; font-weight:normal; text-decoration:none} a.SubCatLinksB:hover {text-decoration:underline} .TitleLinks {font-family:tahoma, verdana, helvetica, arial; font-size:12; color:black; font-weight:bold; text-decoration:none} ????: NamePros.com http://www.namepros.com/showthread.php?t=92298 a.TitleLinks:hover {text-decoration:underline} .ItemText {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; font-weight:regular; text-decoration:none} body {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; font-weight:regular; text-align:left} td {font-family:tahoma, verdana, helvetica, arial; font-size:11; font-weight:regular; text-decoration:none} .sm {font-family:tahoma, verdana, helvetica, arial; font-size:11} input, select, textarea {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; border-width:1; border-color:black} </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.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; ????: NamePros.com http://www.namepros.com/showthread.php?t=92298 } 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.SelectCategory.value=="") { alert('Select the category in which your offer will appear!'); document.PostForm.SelectCategory.focus(); return false; } if(document.PostForm.address.value=="") { alert('Enter the property address, please!'); document.PostForm.address.focus(); return false; } if(document.PostForm.city.value=="") { alert('Enter the property city, please!'); document.PostForm.city.focus(); return false; } if(document.PostForm.state.value=="") { alert('Enter the property state, please!'); document.PostForm.state.focus(); return false; } if(document.PostForm.country.value=="") { alert('Enter the property country, please!'); document.PostForm.country.focus(); return false; } if(document.PostForm.ShortDesc.value=="") { alert('Enter the property short description, please!'); document.PostForm.ShortDesc.focus(); return false; } if(document.PostForm.DetailedDesc.value=="") { alert('Enter the property detailed description, please!'); document.PostForm.DetailedDesc.focus(); return false; } if(document.PostForm.Price.value=="") { alert('Enter the property price, please!'); document.PostForm.Price.focus(); return false; } if(document.PostForm.PropertyType.value=="") { alert('Select the property type, please!'); document.PostForm.PropertyType.focus(); return false; } if(document.PostForm.rooms.value=="") { alert('Enter the number of bedrooms, please!'); document.PostForm.rooms.focus(); return false; } if(document.PostForm.bathrooms.value=="") { alert('Enter the number of bathrooms, please!'); document.PostForm.bathrooms.focus(); return false; } } </script> </head> <?php $index = "true"; ?> <body bgcolor="#F2F2F2" topmargin=0> <table width="750" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td background="images/tbg.gif"><table width="772" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="202"><table width="202" height="28" border="0" cellpadding="4" cellspacing="0"> </table></td> </tr> </table></td> </tr> <tr> <td><table width="786" border="0" cellspacing="0" cellpadding="0"> <tr> <? if(isset($index)) { <object classid="clsid 27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="780" height="240"><param name="movie" value="js10_1.swf"> <param name="quality" value="high"> <param name="LOOP" value="false"> <param name="menu" value="false"> <embed src="js10_1.swf" width="780" height="240" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false"></embed></object> } else { <object classid="clsid 27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="780" height="240"><param name="movie" value="js10_2.swf"> <param name="quality" value="high"> <param name="LOOP" value="false"> <param name="menu" value="false"> <embed src="js10_2.swf" width="780" height="240" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false"></embed></object> } ?> </td> </tr> </table></td> </tr> <tr> <td valign="top" background="images/bg.gif"><table width="750" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="210"><img src="images/spacer1.gif" width="210" height="16"></td> <td width="520"><img src="images/spacer2.gif" width="561" height="16"></td> </tr> <tr> <td valign="top"><div align="center"> <table width="100" border="0" cellspacing="0" cellpadding="6"> <tr> <td> <?=$Account?> <BR> <?=$Categories?></td> </tr> </table> </div></td> <td valign="top"><div align="center"> <table width="460" border="0" cellpadding="6" cellspacing="0"> <tr> <td width="479"><div align="center"><img src="images/bottom.gif" width="477" height="96"> </div></td> </tr> <tr> <td> <div align="center"> |
| |
| | #8 (permalink) |
| Senior Member Join Date: May 2005 Location: Ontario Canada
Posts: 3,088
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | k i think u had to put <? if(isset($index)) { // show music header, ie echo code } else { //show normal header } ?> this in the header file and this in the INDEX FILE <?php $index = "true"; ?> |
| |
| | THREAD STARTER #9 (permalink) |
| Account Suspended Join Date: May 2005
Posts: 34
![]() | anywhere in the index file and should i delete it from the header file if you can put it in thatl be great heres the index file <? require_once("conn.php"); require_once("includes.php"); require_once("mainsearch.php"); require_once("templates/HeaderTemplate.php"); // ADVANCED SEARCH //require_once("advanced.php"); //require_once("templates/AdvancedSearchTemplate.php"); ????: NamePros.com http://www.namepros.com/showthread.php?t=92298 echo "<br>"; // newest properties $q1 = "select * from re2_listings, re2_agents, re2_priority where re2_listings.AgentID = re2_agents.AgentID and re2_agents.PriorityLevel = re2_priority.PriorityLevel and re2_agents.AccountStatus = 'active' order by DateAdded 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=510 border=1 bordercolor=black frame=hsides rules=rows cellspacing=0>\n"; while($a1 = mysql_fetch_array($r1)) { $ListingTable .= "<tr onMouseOver=\"this.style.background='#E2E2E2'; this.style.cursor='hand'\" onMouseOut=\"this.style.background='white'\" onClick=\"window.open('info.php?id=$a1[ListingID]', '_top')\">\n\t"; if($a1[PriorityLevel] > '1') { $sub = "<span class=RedLink><sup>$a1[PriorityLevel]</sup></span>"; } else { $sub = ""; } $ListingTable .= "\n\t<td width=15>"; if(!empty($a1[image])) { $ListingTable .= "<img src=\"myimages/camera.jpg\" width=15 height=15>"; } $ListingTable .= "</td>\n\t"; $ListingTable .= "<td width=305>$a1[city], $a1[state], $a1[address] $sub</td>\n\t"; $ListingTable .= "<td width=80>$a1[rooms] br, $a1[bathrooms] ba"; $MyPrice = number_format($a1[Price], 2, ".", ","); $ListingTable .= "</td>\n\t<td align=center width=100><b>$$MyPrice</td>\n"; $ListingTable .= "</tr>\n"; } $ListingTable .= "</table>"; } /////////////////////////////////////////////////////////// ///////////// top 10 /////////////////////////////////////////////////////////// $q1 = "select * from re2_listings, re2_agents, re2_priority where re2_listings.AgentID = re2_agents.AgentID and re2_agents.PriorityLevel = re2_priority.PriorityLevel and re2_agents.AccountStatus = 'active' order by visits desc limit 0,9 "; $r1 = mysql_query($q1) or die(mysql_error()); $lrows = mysql_num_rows($r1); if($lrows > '0') { $TopTable .= "<table align=center width=510 border=1 bordercolor=black frame=hsides rules=rows cellspacing=0>\n"; while($a1 = mysql_fetch_array($r1)) { $TopTable .= "<tr onMouseOver=\"this.style.background='#E2E2E2'; this.style.cursor='hand'\" onMouseOut=\"this.style.background='white'\" onClick=\"window.open('info.php?id=$a1[ListingID]', '_top')\">\n\t"; if($a1[PriorityLevel] > '1') { $sub = "<span class=RedLink><sup>$a1[PriorityName]</sup></span>"; } else { $sub = ""; } $TopTable .= "\n\t<td width=15>"; if(!empty($a1[image])) { $TopTable .= "<img src=\"myimages/camera.jpg\" width=15 height=15>"; } $TopTable .= "</td>\n\t"; $TopTable .= "<td width=305>$a1[city], $a1[state], $a1[address] $sub</td>\n\t"; $TopTable .= "<td width=80>$a1[rooms] br, $a1[bathrooms] ba"; $MyPrice = number_format($a1[Price], 2, ".", ","); $TopTable .= "</td>\n\t<td align=center width=100><b>$$MyPrice</td>\n"; $TopTable .= "</tr>\n"; } $TopTable .= "</table>"; } require_once("templates/IndexTemplate.php"); ????: NamePros.com http://www.namepros.com/showthread.php?t=92298 echo "<br>"; require_once("templates/FooterTemplate.php"); ?> |
| |
| | #10 (permalink) |
| Senior Member Join Date: May 2005 Location: Ontario Canada
Posts: 3,088
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Code: <?
require_once("conn.php");
require_once("includes.php");
require_once("mainsearch.php");
require_once("templates/HeaderTemplate.php");
$index = "true";
// ADVANCED SEARCH
//require_once("advanced.php");
//require_once("templates/AdvancedSearchTemplate.php");
echo "<br>";
// newest properties
$q1 = "select * from re2_listings, re2_agents, re2_priority where re2_listings.AgentID = re2_agents.AgentID and re2_agents.PriorityLevel = re2_priority.PriorityLevel and re2_agents.AccountStatus = 'active' order by DateAdded 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=510 border=1 bordercolor=black frame=hsides rules=rows cellspacing=0>\n";
while($a1 = mysql_fetch_array($r1))
{
$ListingTable .= "<tr onMouseOver=\"this.style.background='#E2E2E2'; this.style.cursor='hand'\" onMouseOut=\"this.style.background='white'\" onClick=\"window.open('info.php?id=$a1[ListingID]', '_top')\">\n\t";
if($a1[PriorityLevel] > '1')
{
$sub = "<span class=RedLink><sup>$a1[PriorityLevel]</sup></span>";
}
else
{
$sub = "";
}
$ListingTable .= "\n\t<td width=15>";
if(!empty($a1[image]))
{
$ListingTable .= "<img src=\"myimages/camera.jpg\" width=15 height=15>";
}
$ListingTable .= "</td>\n\t";
$ListingTable .= "<td width=305>$a1[city], $a1[state], $a1[address] $sub</td>\n\t";
$ListingTable .= "<td width=80>$a1[rooms] br, $a1[bathrooms] ba";
$MyPrice = number_format($a1[Price], 2, ".", ",");
$ListingTable .= "</td>\n\t<td align=center width=100><b>$$MyPrice</td>\n";
$ListingTable .= "</tr>\n";
}
$ListingTable .= "</table>";
}
///////////////////////////////////////////////////////////
///////////// top 10
///////////////////////////////////////////////////////////
$q1 = "select * from re2_listings, re2_agents, re2_priority where re2_listings.AgentID = re2_agents.AgentID and re2_agents.PriorityLevel = re2_priority.PriorityLevel and re2_agents.AccountStatus = 'active' order by visits desc limit 0,9 ";
$r1 = mysql_query($q1) or die(mysql_error());
$lrows = mysql_num_rows($r1);
if($lrows > '0')
{
$TopTable .= "<table align=center width=510 border=1 bordercolor=black frame=hsides rules=rows cellspacing=0>\n";
while($a1 = mysql_fetch_array($r1))
{
$TopTable .= "<tr onMouseOver=\"this.style.background='#E2E2E2'; this.style.cursor='hand'\" onMouseOut=\"this.style.background='white'\" onClick=\"window.open('info.php?id=$a1[ListingID]', '_top')\">\n\t";
if($a1[PriorityLevel] > '1')
{
$sub = "<span class=RedLink><sup>$a1[PriorityName]</sup></span>";
}
else
{
$sub = "";
}
$TopTable .= "\n\t<td width=15>";
if(!empty($a1[image]))
{
$TopTable .= "<img src=\"myimages/camera.jpg\" width=15 height=15>";
}
$TopTable .= "</td>\n\t";
$TopTable .= "<td width=305>$a1[city], $a1[state], $a1[address] $sub</td>\n\t";
$TopTable .= "<td width=80>$a1[rooms] br, $a1[bathrooms] ba";
$MyPrice = number_format($a1[Price], 2, ".", ",");
$TopTable .= "</td>\n\t<td align=center width=100><b>$$MyPrice</td>\n";
$TopTable .= "</tr>\n";
}
$TopTable .= "</table>";
}
require_once("templates/IndexTemplate.php");
echo "<br>";
require_once("templates/FooterTemplate.php");
?> ????: NamePros.com http://www.namepros.com/showthread.php?t=92298 Code: <?
if($index == TRUE) {
// show music header, ie echo code
}
else {
//show normal header
}
?> ????: NamePros.com http://www.namepros.com/showthread.php?t=92298 wid the FLASH code that u were going to add So instead of // show music header, ie echo code type // the CODe of the object that you want it to show if the statement is true and instead of // Show normal header type // the normal header code that you want Notice: i am not a php pro coder...just a newbie another way of doing this is remove the INCLUDE HEADER statement from the rest of the files of ur website so only leave the header statement in the index file...for the template so it will only show it for the index file ![]() i hope u understood |
| |
| | THREAD STARTER #11 (permalink) |
| Account Suspended Join Date: May 2005
Posts: 34
![]() | lol didnt work i did exactly what u sed and it didnt work il post index and header please check: <html> <head> <title><?=$aset[SiteTitle]?></title> <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:tahoma, verdana, helvetica, arial; font-size:11; color:black; font-weight:bold; text-decoration:none} a.BlackLink:hover {text-decoration: underline} .BlackLinkB {font-family:tahoma, verdana, helvetica, arial; font-size:13; color:black; font-weight:bold; text-decoration:none} a.BlackLinkB:hover {text-decoration: underline} .BlueLink {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:blue; font-weight:bold; text-decoration:underline} a.BlueLink:hover {text-decoration: underline} ????: NamePros.com http://www.namepros.com/showthread.php?t=92298 .RedLink {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:red; font-weight:bold; text-decoration:none} a.RedLink:hover {text-decoration: underline} a.CatLinks {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:white; font-weight:bold; text-decoration:none} a.CatLinks:hover {text-decoration:underline} a.SubCatLinks {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:#878888; font-weight:normal; text-decoration:none} a.SubCatLinks:hover {text-decoration:underline} a.SubCatLinksB {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:#000000; font-weight:normal; text-decoration:none} ????: NamePros.com http://www.namepros.com/showthread.php?t=92298 a.SubCatLinksB:hover {text-decoration:underline} .TitleLinks {font-family:tahoma, verdana, helvetica, arial; font-size:12; color:black; font-weight:bold; text-decoration:none} a.TitleLinks:hover {text-decoration:underline} .ItemText {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; font-weight:regular; text-decoration:none} body {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; font-weight:regular; text-align:left} td {font-family:tahoma, verdana, helvetica, arial; font-size:11; font-weight:regular; text-decoration:none} .sm {font-family:tahoma, verdana, helvetica, arial; font-size:11} input, select, textarea {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; border-width:1; border-color:black} </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.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.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.SelectCategory.value=="") { alert('Select the category in which your offer will appear!'); document.PostForm.SelectCategory.focus(); return false; } if(document.PostForm.address.value=="") { alert('Enter the property address, please!'); document.PostForm.address.focus(); return false; } if(document.PostForm.city.value=="") { alert('Enter the property city, please!'); document.PostForm.city.focus(); return false; } if(document.PostForm.state.value=="") { alert('Enter the property state, please!'); document.PostForm.state.focus(); return false; } if(document.PostForm.country.value=="") { alert('Enter the property country, please!'); document.PostForm.country.focus(); return false; } if(document.PostForm.ShortDesc.value=="") { alert('Enter the property short description, please!'); document.PostForm.ShortDesc.focus(); return false; } if(document.PostForm.DetailedDesc.value=="") { alert('Enter the property detailed description, please!'); document.PostForm.DetailedDesc.focus(); return false; } if(document.PostForm.Price.value=="") { alert('Enter the property price, please!'); document.PostForm.Price.focus(); return false; } if(document.PostForm.PropertyType.value=="") { alert('Select the property type, please!'); document.PostForm.PropertyType.focus(); return false; } if(document.PostForm.rooms.value=="") { alert('Enter the number of bedrooms, please!'); document.PostForm.rooms.focus(); return false; } if(document.PostForm.bathrooms.value=="") { alert('Enter the number of bathrooms, please!'); document.PostForm.bathrooms.focus(); return false; } } </script> </head> <body bgcolor="#F2F2F2" topmargin=0> <table width="750" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td background="images/tbg.gif"><table width="772" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="202"><table width="202" height="28" border="0" cellpadding="4" cellspacing="0"> </table></td> </tr> </table></td> </tr> <tr> <td><table width="786" border="0" cellspacing="0" cellpadding="0"> <tr> <? if($index == TRUE) { <object classid="clsid 27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="780" height="240"><param name="movie" value="js10_1.swf"> <param name="quality" value="high"> <param name="LOOP" value="false"> <param name="menu" value="false"> <embed src="js10_1.swf" width="780" height="240" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false"></embed></object> } else { <object classid="clsid 27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="780" height="240"><param name="movie" value="js10_2.swf"> <param name="quality" value="high"> <param name="LOOP" value="false"> <param name="menu" value="false"> <embed src="js10_2.swf" width="780" height="240" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false"></embed></object> } ?> </td> </tr> </table></td> </tr> <tr> <td valign="top" background="images/bg.gif"><table width="750" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="210"><img src="images/spacer1.gif" width="210" height="16"></td> <td width="520"><img src="images/spacer2.gif" width="561" height="16"></td> </tr> <tr> <td valign="top"><div align="center"> <table width="100" border="0" cellspacing="0" cellpadding="6"> <tr> <td> <?=$Account?> <BR> <?=$Categories?></td> </tr> </table> </div></td> <td valign="top"><div align="center"> <table width="460" border="0" cellpadding="6" cellspacing="0"> <tr> <td width="479"><div align="center"><img src="images/bottom.gif" width="477" height="96"> </div></td> </tr> <tr> <td> <div align="center"> And the index <? require_once("conn.php"); require_once("includes.php"); require_once("mainsearch.php"); require_once("templates/HeaderTemplate.php"); $index = "true"; // ADVANCED SEARCH //require_once("advanced.php"); //require_once("templates/AdvancedSearchTemplate.php"); echo "<br>"; // newest properties $q1 = "select * from re2_listings, re2_agents, re2_priority where re2_listings.AgentID = re2_agents.AgentID and re2_agents.PriorityLevel = re2_priority.PriorityLevel and re2_agents.AccountStatus = 'active' order by DateAdded 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=510 border=1 bordercolor=black frame=hsides rules=rows cellspacing=0>\n"; while($a1 = mysql_fetch_array($r1)) { $ListingTable .= "<tr onMouseOver=\"this.style.background='#E2E2E2'; this.style.cursor='hand'\" onMouseOut=\"this.style.background='white'\" onClick=\"window.open('info.php?id=$a1[ListingID]', '_top')\">\n\t"; if($a1[PriorityLevel] > '1') { $sub = "<span class=RedLink><sup>$a1[PriorityLevel]</sup></span>"; } else { $sub = ""; } $ListingTable .= "\n\t<td width=15>"; if(!empty($a1[image])) { $ListingTable .= "<img src=\"myimages/camera.jpg\" width=15 height=15>"; } $ListingTable .= "</td>\n\t"; $ListingTable .= "<td width=305>$a1[city], $a1[state], $a1[address] $sub</td>\n\t"; $ListingTable .= "<td width=80>$a1[rooms] br, $a1[bathrooms] ba"; $MyPrice = number_format($a1[Price], 2, ".", ","); $ListingTable .= "</td>\n\t<td align=center width=100><b>$$MyPrice</td>\n"; $ListingTable .= "</tr>\n"; } $ListingTable .= "</table>"; } /////////////////////////////////////////////////////////// ///////////// top 10 /////////////////////////////////////////////////////////// $q1 = "select * from re2_listings, re2_agents, re2_priority where re2_listings.AgentID = re2_agents.AgentID and re2_agents.PriorityLevel = re2_priority.PriorityLevel and re2_agents.AccountStatus = 'active' order by visits desc limit 0,9 "; $r1 = mysql_query($q1) or die(mysql_error()); $lrows = mysql_num_rows($r1); if($lrows > '0') { $TopTable .= "<table align=center width=510 border=1 bordercolor=black frame=hsides rules=rows cellspacing=0>\n"; while($a1 = mysql_fetch_array($r1)) { $TopTable .= "<tr onMouseOver=\"this.style.background='#E2E2E2'; this.style.cursor='hand'\" onMouseOut=\"this.style.background='white'\" onClick=\"window.open('info.php?id=$a1[ListingID]', '_top')\">\n\t"; if($a1[PriorityLevel] > '1') { $sub = "<span class=RedLink><sup>$a1[PriorityName]</sup></span>"; } else { $sub = ""; } $TopTable .= "\n\t<td width=15>"; if(!empty($a1[image])) { $TopTable .= "<img src=\"myimages/camera.jpg\" width=15 height=15>"; } $TopTable .= "</td>\n\t"; $TopTable .= "<td width=305>$a1[city], $a1[state], $a1[address] $sub</td>\n\t"; $TopTable .= "<td width=80>$a1[rooms] br, $a1[bathrooms] ba"; $MyPrice = number_format($a1[Price], 2, ".", ","); $TopTable .= "</td>\n\t<td align=center width=100><b>$$MyPrice</td>\n"; $TopTable .= "</tr>\n"; } $TopTable .= "</table>"; } require_once("templates/IndexTemplate.php"); echo "<br>"; require_once("templates/FooterTemplate.php"); ?> |
| |
| | #12 (permalink) |
| Senior Member Join Date: May 2005 Location: Ontario Canada
Posts: 3,088
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | did u try the other way? removin the INCLUDE statement from the rest of the pages and try removing everything from the header file and only add <? if($index == TRUE) { // show music header, ie echo code } else { //show normal header } ?> And replace the // show music header, ie echo code wid the FLASH code and all the <c> tags etc and the normal header wid just blank... or <br>
__________________ |
| |
| | THREAD STARTER #13 (permalink) |
| Account Suspended Join Date: May 2005
Posts: 34
![]() | oh so i have to put in the // i jst read ur post again ok there is no error at directhomesales.co.uk now but the header just doesnt show ill pust the header is it right to put // behind every line of the flash code? <html> <head> <title><?=$aset[SiteTitle]?></title> <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:tahoma, verdana, helvetica, arial; font-size:11; color:black; font-weight:bold; text-decoration:none} a.BlackLink:hover {text-decoration: underline} .BlackLinkB {font-family:tahoma, verdana, helvetica, arial; font-size:13; color:black; font-weight:bold; text-decoration:none} a.BlackLinkB:hover {text-decoration: underline} .BlueLink {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:blue; font-weight:bold; text-decoration:underline} a.BlueLink:hover {text-decoration: underline} .RedLink {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:red; font-weight:bold; text-decoration:none} a.RedLink:hover {text-decoration: underline} a.CatLinks {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:white; font-weight:bold; text-decoration:none} a.CatLinks:hover {text-decoration:underline} a.SubCatLinks {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:#878888; font-weight:normal; text-decoration:none} a.SubCatLinks:hover {text-decoration:underline} a.SubCatLinksB {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:#000000; font-weight:normal; text-decoration:none} a.SubCatLinksB:hover {text-decoration:underline} .TitleLinks {font-family:tahoma, verdana, helvetica, arial; font-size:12; color:black; font-weight:bold; text-decoration:none} a.TitleLinks:hover {text-decoration:underline} .ItemText {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; font-weight:regular; text-decoration:none} body {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; font-weight:regular; text-align:left} td {font-family:tahoma, verdana, helvetica, arial; font-size:11; font-weight:regular; text-decoration:none} .sm {font-family:tahoma, verdana, helvetica, arial; font-size:11} input, select, textarea {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; border-width:1; border-color:black} </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.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.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.SelectCategory.value=="") { alert('Select the category in which your offer will appear!'); document.PostForm.SelectCategory.focus(); return false; } if(document.PostForm.address.value=="") { alert('Enter the property address, please!'); document.PostForm.address.focus(); return false; } if(document.PostForm.city.value=="") { alert('Enter the property city, please!'); document.PostForm.city.focus(); return false; } if(document.PostForm.state.value=="") { alert('Enter the property state, please!'); document.PostForm.state.focus(); return false; } if(document.PostForm.country.value=="") { alert('Enter the property country, please!'); document.PostForm.country.focus(); return false; } if(document.PostForm.ShortDesc.value=="") { alert('Enter the property short description, please!'); document.PostForm.ShortDesc.focus(); return false; } if(document.PostForm.DetailedDesc.value=="") { alert('Enter the property detailed description, please!'); document.PostForm.DetailedDesc.focus(); return false; } if(document.PostForm.Price.value=="") { alert('Enter the property price, please!'); document.PostForm.Price.focus(); return false; } if(document.PostForm.PropertyType.value=="") { alert('Select the property type, please!'); document.PostForm.PropertyType.focus(); return false; } if(document.PostForm.rooms.value=="") { alert('Enter the number of bedrooms, please!'); document.PostForm.rooms.focus(); return false; } if(document.PostForm.bathrooms.value=="") { alert('Enter the number of bathrooms, please!'); document.PostForm.bathrooms.focus(); return false; } } </script> </head> <body bgcolor="#F2F2F2" topmargin=0> <table width="750" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td background="images/tbg.gif"><table width="772" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="202"><table width="202" height="28" border="0" cellpadding="4" cellspacing="0"> </table></td> ????: NamePros.com http://www.namepros.com/showthread.php?t=92298 </tr> </table></td> </tr> <tr> <td><table width="786" border="0" cellspacing="0" cellpadding="0"> <tr> <? if($index == TRUE) { // <object classid="clsid 27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="780" height="240">// <param name="movie" value="js10_1.swf"> // <param name="quality" value="high"> // <param name="LOOP" value="false"> // <param name="menu" value="false"> // <embed src="js10_1.swf" width="780" height="240" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false"></embed></object> } else { // <object classid="clsid 27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="780" height="240">????: NamePros.com http://www.namepros.com/showthread.php?t=92298 // <param name="movie" value="js10_2.swf"> // <param name="quality" value="high"> // <param name="LOOP" value="false"> // <param name="menu" value="false"> // <embed src="js10_2.swf" width="780" height="240" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false"></embed></object> } ?> </td> </tr> </table></td> </tr> <tr> <td valign="top" background="images/bg.gif"><table width="750" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="210"><img src="images/spacer1.gif" width="210" height="16"></td> <td width="520"><img src="images/spacer2.gif" width="561" height="16"></td> </tr> <tr> <td valign="top"><div align="center"> <table width="100" border="0" cellspacing="0" cellpadding="6"> <tr> <td> <?=$Account?> <BR> <?=$Categories?></td> </tr> </table> </div></td> <td valign="top"><div align="center"> <table width="460" border="0" cellpadding="6" cellspacing="0"> <tr> <td width="479"><div align="center"><img src="images/bottom.gif" width="477" height="96"> </div></td> </tr> <tr> <td> <div align="center"> |
| |
| | #14 (permalink) |
| Senior Member Join Date: May 2005 Location: Ontario Canada
Posts: 3,088
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | okay the // is used for comments and comments wont show in the site so remove tht n then try it and did u add tht in the index file? <?php $index = "true"; ?> i am not sure where u had to put tht but it is basically assigning something in the index file..
__________________ |
| |
| | THREAD STARTER #17 (permalink) |
| Account Suspended Join Date: May 2005
Posts: 34
![]() | didnt know whether you want 322 or 332 so here is both: 332: <object classid="clsid 27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="780" height="240">322: 322 is blank |
| |
| | #18 (permalink) |
| Senior Member Join Date: May 2005 Location: Ontario Canada
Posts: 3,088
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | hm i dont knw if i m wrong height="240"> shouldnt this be height="240"/> or something like dat i m not sure abt this ...the error can any pro help us out here i m not a pro...
__________________ |
| |
| | #21 (permalink) |
| NamePros Member Join Date: Nov 2003 Location: Ontario, Canada
Posts: 127
![]() ![]() | The reason you are getting a parse error on 332, is because you either have to close the php tag, or output the HTML as a string through an echo ie: PHP Code: PHP Code: |
| |
| | #22 (permalink) |
| NamePros Member Join Date: Apr 2005 Location: Boston, MA
Posts: 26
![]() | This piece of code will automatically determine if the filename has index.php in it. If it does, it will display the music header. If not, it will display the default header. PHP Code: |
| |
| | THREAD STARTER #23 (permalink) |
| Account Suspended Join Date: May 2005
Posts: 34
![]() | Hi mate im a bit simple could you write that out with the flash code as the // Display Music Header And adjust the php bits accordingly cos it doesnt work. Thanks ok thanks for everyones help i finally worked iut out meself just made 2 header files one with each banner then related to the music one only in the index. What a headscratcher for a non php person. Thanks This is one long thread lol |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tutorial: Getting started with PHP (The Basics) | deadserious | Webmaster Tutorials | 60 | 11-17-2007 12:35 PM |
| Googlism - What does google think of you? | deadserious | The Break Room | 55 | 12-15-2005 10:09 AM |