200 np for urgent help!! (Php)

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

fusionweb

Account Closed
Impact
0
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.

Thankyou

And i cant just change it for each page cos the template works from one header file
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains — AI StorefrontUnstoppable Domains — AI Storefront
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:
<?
if($index == TRUE) {
  echo "<object classid=\"clsid27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"780\" height=\"240\">";
  echo "<param name=\"movie\" value=\"js10_1.swf\">";
  echo "<param name=\"quality\" value=\"high\">";
echo "<param name=\"LOOP\" value=\"false\">";
echo "<param name=\"menu\" value=\"false\">";
echo "<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 {
echo "<object classid=\"clsid27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"780\" height=\"240\">";
echo "<param name=\"movie\" value=\"js10_2.swf\">";
echo "<param name=\"quality\" value=\"high\">";
echo "<param name=\"LOOP\" value=\"false\">";
echo "<param name=\"menu\" value=\"false\">";
echo "<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>";
}
?>

or

PHP:
<?
if($index == TRUE) {
?>
<object classid="clsid27CDB6E-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="clsid27CDB6E-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>
<?
}
?>

hope this helps.
 
0
•••
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:
<?php
	if (stripos(__FILE__, 'index.php')) {
		// Display Music Header
?>

<object classid="clsid27CDB6E-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>

<?php
	} else {
		// Display Default Header
?>

<object classid="clsid27CDB6E-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>

<?php
	}
?>
 
0
•••
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
 
0
•••
Olitt — high-converting AI websites, only from $1/moOlitt — high-converting AI websites, only from $1/mo

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com
Catchy
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back