summaryrefslogtreecommitdiff
path: root/banner/banner.class
diff options
context:
space:
mode:
Diffstat (limited to 'banner/banner.class')
-rw-r--r--banner/banner.class14
1 files changed, 9 insertions, 5 deletions
diff --git a/banner/banner.class b/banner/banner.class
index 7c6d32a..37ae213 100644
--- a/banner/banner.class
+++ b/banner/banner.class
@@ -129,8 +129,9 @@ function choose()
ED($this->banners);
}
- srand((double)microtime()*1000000);
+ srand((double)microtime()*1000000);
$this->rand = rand();
+ $this->chosen = true;
}
/**
@@ -141,6 +142,9 @@ function choose()
*/
function show($nocount = false, $noecho = false)
{
+ if (!$this->chosen)
+ $this->choose();
+
if (!is_array($this->banners))
return; // none found or choose() not called yet
@@ -190,7 +194,7 @@ function showcombined($position = "banner", $nocount = false)
function render($banner, $count, $number, $nocount = false)
{
if ($number > 0)
- echo "<br><br>";
+ echo "<br /><br />";
$this->render_banner($banner, $nocount);
}
@@ -267,13 +271,13 @@ function render_banner($banner, $nocount = false)
$linkend = "</a>";
}
- echo "$linkstart<img src=\"$viewurl\" alt=\"" . $banner['alttext'] . "\" width=" . $banner['width'] . " height=" . $banner['height'] . " border=0>$linkend";
+ echo "$linkstart<img src=\"$viewurl\" alt=\"" . $banner['alttext'] . "\" width=\"" . $banner['width'] . "\" height=\"" . $banner['height'] . "\" border=\"0\" />$linkend";
if (strlen($banner['extraline']) > 0)
- echo "<br>$linkstart" . $banner['extraline'] . $linkend;
+ echo "<br />$linkstart" . $banner['extraline'] . $linkend;
if (strlen($banner['extraline']) == 0 && $this->p['addextraline'])
- echo "<br>&nbsp;";
+ echo "<br />&nbsp;";
break;
case 1:
echo $banner['data'];