Reply to Re: banner rotation script

Your name:

Reply:


Posted by Nospam on 07/28/06 16:22

"Geoff Berrow" <blthecat@ckdog.co.uk> wrote in message
news:5qqic2l6mt6dnueja3477lj3ufdllojunc@4ax.com...
> Message-ID: <Pjbyg.50811$eQ.10168@newsfe7-win.ntli.net> from Nospam
> contained the following:
>
> >> >$bannerCode[$bannerCounter] = "<a href=\"http://www.site.com/site1\"
> >> >target=\"_top\"><iframe
> >>
>
>>src=\"http://www.site.com/e/cm?t=site1&o=2&p=6&l=bn1&mode=site1&browse=403
7
> >1
> >> >8&=1&fc1=&lt1=&lc1=&bg1=&f=ifr\" marginwidth=\"0\" marginheight=\"0\"
> >> >width=\"120\" height=\"150\" border=\"0\" frameborder=\"0\"
> >> >style=\"border:none\;\" scrolling=\"no\"> </iframe></a>\";
> >> >$bannerCounter++;
> >>
> >> Missing quote mark at end.
> >>
> >it is now saying $BannerAd undefined
>
> Actually the quote is not missing, you have escaped it when you should
> not have.
>
> I don't get any errors with the following (the document.write seems
> pointless but I'll let you sort that out)
>
> <?
> $bannerCounter =1;
>
> $bannerCode[$bannerCounter] = "<a href=\"http://www.example.com/site1\"
> target=\"_top\"><iframe src=\"http://www.example.com/site1\"
> marginwidth=\"0\" marginheight=\"0\" width=\"120\" height=\"150\"
> border=\"0\"
> frameborder=\"0\" style=\"border:none;\" scrolling=\"no\">
> </iframe></a>";
> $bannerCounter++;
>
> $bannerCode[$bannerCounter] = "<a href=\"http://www.example.com/site2\"
> target=\"_top\"><img src=\"http://www.example.com/site2\" width=\"120\"
> height=\"600\" alt=\"null\" border=\"0\"/></a> ";
> $bannerCounter++;
>
> $bannerCode[$bannerCounter] = "<a href=\"http://www.example.com/site3\"
> target=\"_top\"><img src=\"www.example.com/site3\" width=\"468\"
> height=\"60\" alt=\"site 3\" border=\"0\"/></a>";
> $bannerCounter++;
>
> $bannerCode[$bannerCounter] = "<a href=\"<a
> href=\"http://www.example.com/site4\" target=\"_top\"><img
> src=\"http://www.example.com/site4\" width=\"600\" height=\"500\"
> alt=\"null\" border=\"0\"/></a>";
> $bannerCounter++;
>
>
>
>
>
> $bannerAdTotals = $bannerCounter - 1;
> if($bannerAdTotals>1)
> {
> mt_srand((double)microtime() * 1234567);
> $bannerPicked = mt_rand(1, $bannerAdTotals);
> }
> else
> {
> $bannerPicked = 1;
> }
> $bannerAd = $bannerCode[$bannerPicked];
>
> $bannerAd = str_replace('"', '\'', $bannerAd);
> print("document.write(\"$bannerAd\")");
>
> ?>

have removed the document write code (and everything in that segment) and it
compiles without any errors, however the code for the html:
<?
include_once("adverts.php");
echo "<div align='center'>$bannerAd</div>";
?> </p>

doesn't show anything

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация