/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/widgets/HTMLRedirectPage.inc
ViewVC logotype

Contents of /nfo/php/libs/com.newsblob.phphtmllib/widgets/HTMLRedirectPage.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Thu May 6 16:27:41 2004 UTC (20 years, 2 months ago) by jonen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
 updated all to v2.4.1 - Apr 01, 2004

1 <?php
2 /**
3 * This file contains the HTMLRedirectPage class
4 *
5 * $Id: HTMLRedirectPage.inc,v 1.6 2003/07/30 18:47:33 hemna Exp $
6 *
7 * @author Walter A. Boring IV <waboring@buildabetterweb.com>
8 * @package phpHtmlLib
9 */
10
11
12 /**
13 * This builds an entire HTML Page
14 * with the sole purpose of doing a redirect to another url.
15 *
16 * @author Walter A. Boring IV <waboring@buildabetterweb.com>
17 * @package phpHtmlLib
18 */
19 class HTMLRedirectPage extends HTMLPageClass {
20
21 /**
22 * The constructor
23 *
24 * @param string - the title of the page
25 * @param string - the url to redirect to
26 * @param boolean - do we show the fallback message?
27 * @param boolean - do we want to destroy a frameset
28 * with the redirect?
29 * @param boolean - do we want to use a Javascript
30 * window.location call?
31 */
32 function HTMLRedirectPage($title, $url, $showMessage=false,
33 $destroy_frameset=FALSE,
34 $usejs=TRUE) {
35 $this->HTMLPageClass($title);
36 $this->set_refresh($url);
37
38 if ($usejs) {
39 if ($destroy_frameset) {
40 $this->add_head_js("top.location = '".$url."';");
41 } else {
42 $this->add_head_js("window.location = '".$url."';");
43 }
44 }
45
46 if ($showMessage) {
47 //add helper link
48 $p = html_p("If you are not automatically redirected, ",
49 "please click ",
50 html_a($url, "here"));
51 $p->set_collapse();
52 $this->add( $p );
53 }
54 }
55 }
56 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed