summaryrefslogtreecommitdiff
path: root/banner
diff options
context:
space:
mode:
authorChristian Schneider2006-12-12 13:38:57 +0000
committerChristian Schneider2006-12-12 13:38:57 +0000
commitfd9171e0df775da9c4a3ea22e8f95ec75d3b3897 (patch)
tree53e93e18851d1c780f73e5464b89b1aad87f598c /banner
parentee2fcb5bbc9b9db282a4668c50d87447b2114886 (diff)
downloaditools-fd9171e0df775da9c4a3ea22e8f95ec75d3b3897.tar.gz
itools-fd9171e0df775da9c4a3ea22e8f95ec75d3b3897.tar.bz2
itools-fd9171e0df775da9c4a3ea22e8f95ec75d3b3897.zip
Merged revisions 13944-15067 via svnmerge from
svn+ssh://rdc.rim.ch/rdc/svn/itools/devel-redesign ........ r13945 | weber | 2006-10-26 16:13:44 +0200 (Thu, 26 Oct 2006) | 2 lines omit null attributes, true means add name only. select() supports optgroups ........ r13946 | weber | 2006-10-26 16:22:42 +0200 (Thu, 26 Oct 2006) | 2 lines Removed cruft ........ r13989 | cschneid | 2006-10-27 18:32:11 +0200 (Fri, 27 Oct 2006) | 1 line Removed more cruft ........ r13991 | cschneid | 2006-10-28 19:36:35 +0200 (Sat, 28 Oct 2006) | 1 line Make adserver output xhtml compliant tags ........ r14093 | weber | 2006-11-06 17:13:23 +0100 (Mon, 06 Nov 2006) | 2 lines title tag can be omitted completely ........ r14096 | weber | 2006-11-06 18:00:43 +0100 (Mon, 06 Nov 2006) | 2 lines Q() doesn't encode newlines, tag() encodes newlines within attributes ........ r14135 | weber | 2006-11-09 02:30:03 +0100 (Thu, 09 Nov 2006) | 2 lines Migrate DB to texts.php on the fly (this functionality will be removed later), use only statictext, not DB ........ r14164 | mueller | 2006-11-09 19:23:40 +0100 (Thu, 09 Nov 2006) | 1 line disable empty options in select ........ r14194 | mueller | 2006-11-13 14:34:25 +0100 (Mon, 13 Nov 2006) | 1 line imply choose() in show() ........ r14212 | weber | 2006-11-13 18:14:33 +0100 (Mon, 13 Nov 2006) | 2 lines Debug output is left-aligned ........ r14231 | cschneid | 2006-11-14 17:09:32 +0100 (Tue, 14 Nov 2006) | 1 line Load js files before dom is ready and prevent loops on static= ........ r14288 | cschneid | 2006-11-15 13:16:54 +0100 (Wed, 15 Nov 2006) | 1 line More compact serialization of arrays ........ r14388 | weber | 2006-11-22 18:19:34 +0100 (Wed, 22 Nov 2006) | 2 lines Add optional IE PNG fix to it_html::img() ........ r14442 | mueller | 2006-11-27 23:22:23 +0100 (Mon, 27 Nov 2006) | 1 line correctly handle <option value=""> ........ r14444 | cschneid | 2006-11-28 12:35:43 +0100 (Tue, 28 Nov 2006) | 1 line Handle null separately to preserve 0 == '0' ........ r14450 | cschneid | 2006-11-28 15:36:45 +0100 (Tue, 28 Nov 2006) | 1 line Style commit (mainly done to test commit-email) ........ r14451 | cschneid | 2006-11-28 15:44:49 +0100 (Tue, 28 Nov 2006) | 1 line Test commit for commit-email ........ r14638 | cschneid | 2006-12-01 14:20:45 +0100 (Fri, 01 Dec 2006) | 1 line Suppress warning in case src file was removed by race ........ r14970 | weber | 2006-12-09 03:07:22 +0100 (Sat, 09 Dec 2006) | 2 lines Added the highly useful timerlog() method from searchlib to justify the supporting code in auto_append.php ;) ........ r14971 | weber | 2006-12-09 03:08:49 +0100 (Sat, 09 Dec 2006) | 2 lines Added set(), made dump_php's return value more convincing ........ r14993 | cschneid | 2006-12-11 14:05:29 +0100 (Mon, 11 Dec 2006) | 1 line Added itjs::send_headers() to send HTTP headers suitable for JSON data ........ r14997 | cschneid | 2006-12-11 14:28:52 +0100 (Mon, 11 Dec 2006) | 1 line Set JSON expiration date for IE ........ r15057 | weber | 2006-12-12 14:02:43 +0100 (Tue, 12 Dec 2006) | 2 lines documentation update ........
Diffstat (limited to 'banner')
-rw-r--r--banner/.cvsignore2
-rw-r--r--banner/Makefile48
-rw-r--r--banner/banner.class14
3 files changed, 9 insertions, 55 deletions
diff --git a/banner/.cvsignore b/banner/.cvsignore
deleted file mode 100644
index b8e8856..0000000
--- a/banner/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.slib
-*.lib
diff --git a/banner/Makefile b/banner/Makefile
deleted file mode 100644
index 8e607aa..0000000
--- a/banner/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-##
-## $Id$
-##
-## Makefile for itools/banner.lib
-##
-## $Log$
-## Revision 1.1 2000/02/25 18:49:46 weber
-## Hello, world!
-##
-##
-
-CPP= cpp
-QUIETMAKE= $(MAKE) -s
-PHPCOMPILE= /usr/local/bin/phpcompile
-
-MODULE= banner
-SUBDIRS=
-CLASSES= banner.class
-
-#
-# Library creation rules, do not change stuff below...
-#
-SLIB= $(MODULE).slib
-LIB= ../$(MODULE).lib
-
-all: $(LIB)
-
-$(LIB): $(SLIB)
- @if [ -x $(PHPCOMPILE) ]; then (echo Compiling $(SLIB) to $(LIB) ...) 1>&2; $(PHPCOMPILE) <$(SLIB) >$(LIB); else (echo $(PHPCOMPILE) not found, copying $(SLIB) to $(LIB) ...) 1>&2; cp $(SLIB) $(LIB); fi
-
-$(SLIB): $(CLASSES) DUMMY
- @(echo Creating $(SLIB) from $(SUBDIRS) $(CLASSES) ...) 1>&2
- @echo "<?php" >$(SLIB)
- @(for dir in DUMMY $(SUBDIRS); do (test -d $$dir && cd $$dir && $(QUIETMAKE) cat); done; for class in DUMMY $(CLASSES); do test -f $$class && cat $$class; done) | $(CPP) -P -undef | perl -ne 's/^\s+//g; print unless /^\s*$$/' | grep -v "^<?php" | grep -v "^?>" >>$(SLIB)
- @echo "?>" >>$(SLIB)
-
-$(SUBDIRS)::
- @(cd $@; $(QUIETMAKE))
-
-DUMMY:
-
-cat: $(SLIB)
- @cat $(SLIB)
-
-clean:
- @(echo Cleaning $(SLIB) $(LIB) ...) 1>&2
- @rm -f $(SLIB) $(LIB)
- @for dir in DUMMY $(SUBDIRS); do (test -d $$dir && cd $$dir && $(QUIETMAKE) $@) || :; done
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'];