cvs: php-hosts-web / host-add.php index.php source.php style.css /gifs arrow.gif arrow0.gif arrow1.gif arrow2.gif b-add-c.gif b-add-p.gif
b-clients-c.gif b-clients-p.gif b-search-c.gif b-search-p.gif b-stats-c.gif b-stats-p.gif b-top-c.gif b-top-p.gif cap-bl.gif cap-left.gif
cap-right.gif cap-right2.gif cap-ul.gif corner-bl.gif corner-ul.gif logo-easydns.gif php3logo.gif /include layout.inc style.css
| From: | jim winstead | Date: | Sun, 21 Apr 2002 02:34:02 +0000 |
| Subject: | cvs: php-hosts-web / host-add.php index.php source.php style.css /gifs arrow.gif arrow0.gif arrow1.gif arrow2.gif b-add-c.gif b-add-p.gif b-clients-c.gif b-clients-p.gif b-search-c.gif b-search-p.gif b-stats-c.gif b-stats-p.gif b-top-c.gif b-top-p.gif cap-bl.gif cap-left.gif cap-right.gif cap-right2.gif cap-ul.gif corner-bl.gif corner-ul.gif logo-easydns.gif php3logo.gif /include layout.inc style.css |
||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-9710@lists.php.net to get a copy of this message | ||
jimw Sat Apr 20 22:34:02 2002 EDT
Added files:
/php-hosts-web style.css source.php
Removed files:
/php-hosts-web/include style.css
/php-hosts-web/gifs arrow.gif arrow0.gif arrow1.gif arrow2.gif
b-add-c.gif b-add-p.gif b-clients-c.gif
b-clients-p.gif b-search-c.gif b-search-p.gif
b-stats-c.gif b-stats-p.gif b-top-c.gif
b-top-p.gif cap-bl.gif cap-left.gif
cap-right.gif cap-right2.gif cap-ul.gif
corner-bl.gif corner-ul.gif logo-easydns.gif
php3logo.gif
Modified files:
/php-hosts-web index.php host-add.php
/php-hosts-web/include layout.inc
Log:
start conversion to a basic php.net look
Index: php-hosts-web/index.php diff -u php-hosts-web/index.php:1.1.1.1 php-hosts-web/index.php:1.2 --- php-hosts-web/index.php:1.1.1.1 Thu Feb 7 11:38:32 2002 +++ php-hosts-web/index.php Sat Apr 20 22:34:01 2002 @@ -4,36 +4,36 @@ ?> <h3>What is PHP?</h3> -<P> +<p> PHP is a server-side, cross-platform, HTML embedded scripting language. If you are completely new to PHP and want to get some idea of how it works, -have a look at the <a href="http://www.php.net">PHP homepage</a>. -</P> -<P> +have a look at the <a href="http://www.php.net/">PHP homepage</a>. +</p> +<p> This powerful scripting language is gaining support from hosting companies world-wide. In an effort to help people find a hosting company that suits their needs, we've developed this directory. -</P> -<P> -<A HREF="/search.php">Search the directory</A> now for hosting companies +</p> +<p> +<a href="search.php">Search the directory</a> now for hosting companies that have PHP and the other tools and services you need. -</P> +</p> <h3>What's New Here?</h3> -<P> -<B>User Comments:</B> Are you pleased or disappointed with one of the companies listed -in the directory? Add your own comments on the <A HREF="/msgboard/">Message Board</A>, +<p> +<b>User Comments:</b> Are you pleased or disappointed with one of the companies listed +in the directory? Add your own comments on the <a href="msgboard/">Message Board</a>, and help other users make a better-informed decision. -</P> +</p> <h3>Want to list your company?</h3> -<P> -<A HREF="/host-add.php">Add your company</A> to the directory. It's free. +<p> +<a href="host-add.php">Add your company</a> to the directory. It's free. </P> <h3>Need to update your listing?</h3> -<P> -Go to the <A HREF="/clients/">clients' section</A>. -</P> +<p> +Go to the <a href="clients/">clients' section</a>. +</p> <? commonFooter(); ?> Index: php-hosts-web/host-add.php diff -u php-hosts-web/host-add.php:1.1.1.1 php-hosts-web/host-add.php:1.2 --- php-hosts-web/host-add.php:1.1.1.1 Thu Feb 7 11:38:32 2002 +++ php-hosts-web/host-add.php Sat Apr 20 22:34:01 2002 @@ -76,7 +76,7 @@ ?> -Enter the following information (* deontes a required field): +Enter the following information (* denotes a required field): <FORM METHOD="post" ACTION="host-add.php"> <INPUT TYPE="hidden" NAME="MODE" value="ADD"> Index: php-hosts-web/include/layout.inc diff -u php-hosts-web/include/layout.inc:1.1.1.1 php-hosts-web/include/layout.inc:1.2 --- php-hosts-web/include/layout.inc:1.1.1.1 Thu Feb 7 11:38:38 2002 +++ php-hosts-web/include/layout.inc Sat Apr 20 22:34:01 2002 @@ -1,294 +1,248 @@ -<?php // -*- C++ -*- -header("Vary: User-Agent"); +<?php -/* Check that browser! */ +# spacer() +# print a IMG tag for a sized spacer GIF +# + +function spacer($width=1, $height=1, $align=false, $extras=false) { + printf('<img src="/gifs/spacer.gif" width="%d" height="%d" border="0" alt="" %s%s>', + $width, + $height, + ($align ? 'align="'.$align.'" ' : ''), + ($extras ? $extras : '') + ); +} + + + +# resize_image() +# tag the output of make_image() and resize it manually +# + +function resize_image($img, $width=1, $height=1) { + $str = preg_replace('/width=\"([0-9]+?)\"/i', '', $img ); + $str = preg_replace('/height=\"([0-9]+?)\"/i', '', $str ); + $str = substr($str,0,-1) . sprintf(' height="%s" width="%s">', $height, $width ); + return $str; +} -$IE4 = $IE3 = $NS4 = $NS3 = $X11 = $HAVE_STYLE = $HTDIG = false; -if (ereg("MSIE ([0-9]+)",$HTTP_USER_AGENT,$version)): - $ver=(int)$version[1]; - if ($ver>=4): - $IE4=true; - $HAVE_STYLE = true; - elseif($ver==3): - $IE3=true; - endif; -elseif (ereg("Mozilla/([0-9]+)",$HTTP_USER_AGENT,$version)): - $ver=(int)$version[1]; - if ($ver>=4): - $NS4=true; - $HAVE_STYLE=true; - elseif($ver==3): - $NS3=true; - endif; -endif; -if (ereg("X11",$HTTP_USER_AGENT)): - $X11 = true; -endif; -if (ereg("htdig",$HTTP_USER_AGENT)): - $HTDIG = true; -endif; - -/* Base variables */ - -$FONTFACE = "tahoma, verdana, arial, helvetica, sans-serif"; -$FONTFACEATTR = " FACE=\"$FONTFACE\""; - -$COLOR["purple"] = "#5B69A6"; -$COLOR["ltpurple"] = "#AFB6D3"; -$COLOR["green"] = "#92C000"; -$COLOR["grey"] = "#C0C0C0"; -$COLOR["ltgrey1"] = "#E0E0E0"; -$COLOR["ltgrey2"] = "#F0F0F0"; - - -/* Base functions */ - -function preloadImages() { -?> - b_sear0 = new Image(); - b_sear0.src = "/gifs/b-search-p.gif"; - b_sear1 = new Image(); - b_sear1.src = "/gifs/b-search-c.gif"; - - b_add0 = new Image(); - b_add0.src = "/gifs/b-add-p.gif"; - b_add1 = new Image(); - b_add1.src = "/gifs/b-add-c.gif"; - - b_clie0 = new Image(); - b_clie0.src = "/gifs/b-clients-p.gif"; - b_clie1 = new Image(); - b_clie1.src = "/gifs/b-clients-c.gif"; - - b_top0 = new Image(); - b_top0.src = "/gifs/b-top-p.gif"; - b_top1 = new Image(); - b_top1.src = "/gifs/b-top-c.gif"; - -<? -} - - -function spc($width, $height) { - echo "<IMG SRC='/gifs/spacer.gif' WIDTH=$width HEIGHT=$height BORDER=0 ALT=' '>"; -} - -function makeSideButton($url,$button,$kick,$gif,$width,$height,$vspace,$hspace,$alt,$br) { - if ($url): - echo "<A HREF=\"$url\" onMouseover=\"change('$button',1);"; - if ($kick): - echo " popUp('$kick',true);\" \n >"; - else: - echo "\" \n onMouseout=\"change('$button',0);\">"; - endif; - endif; - echo "<IMG SRC=\"/gifs/b-$gif-p.gif\" \n ALT=\"$alt\" \n WIDTH=$width HEIGHT=$height BORDER=0 \n NAME=\"$button\" \n HSPACE=$hspace VSPACE=$vspace>"; - if ($url): - echo "</A>"; - endif; - echo $br; -} - -function commonHead($title) { - global $NS4, $NS3, $IE3, $IE4, $X11, $FONTFACEATTR, $HTDIG; - global $PHP_SELF, $HTTP_REFERER, $FONTFACE, $HAVE_STYLE; - global $DISABLE_KICKOUTS, $DOCUMENT_ROOT; - -if ($HAVE_STYLE) { - echo "<STYLE TYPE=\"text/css\">\n"; - include("style.css"); - echo "</STYLE>\n"; -} -?> -</HEAD> - -<SCRIPT LANGUAGE="JavaScript"> -<!-- -var loaded = 0; -var lastbutton='top'; - -function LoadImgs () { - if (document.images) { -<? preloadImages(); ?> - loaded = 1; + +# make_image() +# return an IMG tag for a given file (relative to the images dir) +# + +function make_image($file, $alt=false, $align=false, $extras=false, $dir=false, $border=0) { + if (!$dir) { + $dir = 'gifs'; + } + $path = $_SERVER['DOCUMENT_ROOT']."/$dir/$file"; + if ($size = @getimagesize($path)) { + $image = sprintf('<img src="%s/%s" border="%d" %s alt="%s" %s%s>', + $dir, + $file, + $border, + $size[3], + ($alt ? $alt : ''), + ($align ? ' align="'.$align.'"' : ''), + ($extras ? ' '.$extras : '') + ); + } else { + $image = sprintf('<img src="%s/%s" border="%d" alt="%s" %s%s>', + $dir, + $file, + $border, + ($alt ? $alt : ''), + ($align ? ' ALIGN="'.$align.'"' : ''), + ($extras ? ' '.$extras : '') + ); } + return $image; } -function change(Name,No) { - if (document.images && (loaded == 1) && (document[Name])) { - document[Name].src = eval("b_" + Name + No + ".src"); + + +# print_image() +# print an IMG tag for a given file +# + +function print_image($file, $alt=false, $align=false, $extras=false, $dir=false, $border=0) { + print make_image($file, $alt, $align, $extras, $dir); +} + + + +# make_submit() +# - make a submit button image +# +function make_submit($file, $alt=false, $align=false, $extras=false, $dir=false, $border=0) { + if (!$dir) { + $dir = '/gifs'; + } + $return = make_image($file, $alt, $align, $extras, $dir, $border); + if ($return != "<img>") { + $return = '<input type="image"'.substr($return,4); + } else { + $return = '<input type="submit">'; } + return $return; } -<? -if ($IE4) { - echo "LoadImgs();\n"; -} -?> - -//---> -</SCRIPT> - -<? + +# delim() +# print a pipe delimiter +# + +function delim($color=false) { + if (!$color) { + return ' | '; + } + return sprintf('<font color="%s"> | </font>', $color ); } -function commonBody($title) { - global $NS4, $NS3, $IE3, $IE4, $X11, $FONTFACEATTR, $HTDIG; - global $PHP_SELF, $HTTP_REFERER, $FONTFACE; - global $NUM_HOSTS; - global $DISABLE_KICKOUTS, $DOCUMENT_ROOT; -?> -<BODY MARGINHEIGHT=3 MARGINWIDTH=3 TOPMARGIN=3 LEFTMARGIN=3 BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#5B69A6" VLINK="#5B69A6" ALINK="#00FF00" -<? if ($NS4 || $NS3): - echo " OnLoad=\"LoadImgs();\""; -endif; ?> -><A NAME="top"> -<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="100%"> - <TR valign=top> - <TD ALIGN=left width=150 BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="150"> - <TR VALIGN=top> - <TD ALIGN=left> - <IMG SRC="/gifs/cap-ul.gif" WIDTH=9 HEIGHT=9 BORDER=0><BR> - <?spc(10,70);?><A HREF="/index.php"><IMG SRC="/gifs/logo.gif" ALT="Home Page" WIDTH=130 HEIGHT=70 BORDER=0></A><BR> - <?spc(1,7);?><BR> - </TD> - </TR> - <TR VALIGN=top> - <TD ALIGN=left> -<? if ($FONTFACEATTR) { echo "<FONT $FONTFACEATTR>"; } ?> -<? - echo "<CENTER>\n"; - echo "<SMALL>Currently listing</SMALL><BR>\n"; - echo "<BIG STYLE=\"yellow\">".$NUM_HOSTS."</BIG><BR>\n"; - echo "<SMALL>hosting companies.</SMALL><BR></CENTER>\n"; - makeSideButton("/search.php","sear","","search",129,30,0,10,"Search for a hosting company","<BR>\n"); - makeSideButton("/host-add.php","add","","add",129,30,0,10,"Add your company to the directory","<BR>\n"); - makeSideButton("/clients/","clie","","clients",129,30,0,10,"Enter the client's section","<BR>\n"); -?> - </TD> - </TR> - </TABLE> - </TD> - <TD align=left width="100%"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="100%"> - <TR VALIGN=middle BGCOLOR="#5B69A6"> - <TD ALIGN=left> - <? - spc(5,1); - echo "<FONT${FONTFACEATTR} SIZE=4><B>$title</B></FONT><BR>\n"; + +# hdelim() +# print a horizontal delimiter (just a wide line); +# + +function hdelim($color="#000000") { + if (!$color) { + return '<hr noshade size="1">'; + } + return sprintf('<hr noshade size="1" color="%s">', $color ); +} + + + +# make_link() +# return a hyperlink to something, within the site +# + +function make_link ($url, $linktext=false, $target=false, $extras=false) { + return sprintf("<a href=\"%s\"%s%s>%s</a>", + $url, + ($target ? ' target="'.$target.'"' : ''), + ($extras ? ' '.$extras : ''), + ($linktext ? $linktext : $url) + ); +} + + + +# print_link() +# echo a hyperlink to something, within the site +# + +function print_link($url, $linktext=false, $target=false, $extras=false) { + echo make_link($url, $linktext, $target, $extras); +} + + + +function make_email($email, $linktext=false) { + return sprintf("<a href=\"mailto:%s\">%s</a>", + $email, + ($linktext ? $linktext : $email) + ); +} + +function print_email($email, $linktext=false) { + echo make_email($email, $linktext); +} + +function commonHeader($title = false, $showsearch = true) { + global $SIDEBAR_DATA; + +?><html> +<head> + <title><?php echo $title ? $title : 'PHP Hosting Companies' ?></title> + <link rel="stylesheet" href="style.css" /> +</head> + +<body + topmargin="0" leftmargin="0" + marginheight="0" marginwidth="0" + bgcolor="#ffffff" + text="#000000" + link="#000033" + alink="#0099ff" + vlink="#000033" +><a name="TOP"></a> +<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%"> + <tr class="headertop"> + <td align="left" rowspan="2"><?php print_link('/', make_image('logo.gif', 'PHP', false, 'vspace="2" hspace="2"') ); ?></td> + <td> </td> + </tr> + + <tr class="headertop"> + <td align="right" valign="bottom" nowrap> + <?php + print_link('http://www.php.net/', 'php.net', false, 'class="menuWhite"'); + echo delim(); + print_link('/search.php', 'search', false, 'class="menuWhite"'); + echo delim(); + print_link('/add-host.php', 'add your company', false, 'class="menuWhite"'); + echo delim(); + print_link('/clients/', 'login', false, 'class="menuWhite"'); ?> - </TD> - <TD ALIGN=right><IMG SRC="/gifs/cap-right.gif" WIDTH=24 HEIGHT=48 BORDER=0><BR></TD> - </TR> - </TABLE> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="100%"> - <TR VALIGN=top BGCOLOR="#FFFFFF"> - <TD ALIGN=left WIDTH="12"> - <IMG SRC="/gifs/corner-ul.gif" WIDTH=12 HEIGHT=12 BORDER=0><BR> - </TD> - <TD ALIGN=left WIDTH="100%"> - <? if ($FONTFACEATTR): ?> - <FONT<? echo $FONTFACEATTR;?>> - <? endif; ?> - <BR CLEAR=ALL> - <!-- start body --> -<? -} - -function commonHeader($title) { -?> -<HTML> -<HEAD> -<TITLE>PHP Hosting Companies: <? echo $title;?></TITLE> -<? commonHead($title); ?> -</HEAD> - -<? commonBody($title); ?> -<? -} - - -function commonFooter() { - global $NS4, $NS3, $IE3, $IE4, $X11, $HAVE_STYLE, $FONTFACEATTR, $HTTP_USER_AGENT, $HTDIG; - global $DISABLE_KICKOUTS, $DOCUMENT_ROOT; -?> - - <!-- end body --> - </TD> - </TR> - </TABLE> - </TD> - </TR> - <TR valign=bottom BGCOLOR="#5B69A6"> - <TD ALIGN=left width="150"> -<? spc(150,1);?><BR> -</TD> - <TD ALIGN=left width="100%" BGCOLOR="#FFFFFF"> - <IMG SRC="/gifs/corner-bl.gif" WIDTH=12 HEIGHT=12 BORDER=0><BR> - </TD> - </TR> - <TR valign=top> - <TD ALIGN=left width="150" BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="150"> - <TR VALIGN=bottom> - <TD ALIGN=left> -<? spc(129,33);?><BR> -<? makeSideButton("#top","top","","top",129,30,0,10,"Top of this page","<BR>\n"); ?> - <IMG SRC="/gifs/cap-bl.gif" WIDTH=9 HEIGHT=9 BORDER=0><BR> - </TD> - </TR> - </TABLE> - </TD> - <TD align=left width="100%"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="100%"> - <TR VALIGN=middle> - <TD ALIGN=center BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0> - <TR VALIGN=middle> - <TD align=right> - <FONT FACE="tahoma, verdana, arial, helvetica, sans-serif" SIZE=1> - <I>Site<BR>Hosting:</I><BR> - </TD> - <TD> - <IMG SRC="/gifs/spacer.gif" WIDTH=5 HEIGHT=1 BORDER=0><BR> - </TD> - <TD> - <A HREF="http://www.easydns.com/"><IMG SRC="/gifs/logo-easydns.gif" WIDTH=190 HEIGHT=48 BORDER=0 vspace=12></A><BR> - </TD> - </TR> - </TABLE> - </TD> - <TD ALIGN=right BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0> - <TR VALIGN=middle> - <TD align=right> -<? if ($FONTFACEATTR) { echo "<FONT $FONTFACEATTR>"; } ?><SMALL> -Note: Neither easyDNS, PHP3, nor their developers necessarily<BR> -endorse nor warranty any of the companies listed herein.<BR> -</SMALL></TD> - <TD> - <IMG SRC="/gifs/cap-right2.gif" WIDTH=24 HEIGHT=72 BORDER=0></TD> - </TR> - </TABLE> - </TD> - </TR> - </TABLE> - </TD> - </TR> -</TABLE> - -</BODY> -</HTML> -<? + <?php spacer(2,2); ?><br> + </td> + </tr> + + <tr class="headersep"><td colspan="2"><?php spacer(1,1);?><br></td></tr> + + <tr class="headerbottom"> + <td colspan="2"><p id="disclaimer">The PHP Group does not endorse nor warranty any of the companies listed herein.</p></td> + </tr> + + <tr class="headersep"><td colspan="2"><?php spacer(1,1);?><br></td></tr> +</table> +<div id="content"> +<?php } + +# commonfooter() +# +# + +function commonFooter() {?> +</div> +<table border="0" cellspacing="0" cellpadding="0" width="100%"> + <tr class="headersep"><td><?php spacer(1,1);?><br></td></tr> + <tr class="headerbottom"> + <td align="right" valign="bottom"><? + print_link('/source.php?url='.$_SERVER['SCRIPT_NAME'], 'show source', false, 'class="menuWhite"'); + ?> <br> + </td> + </tr> + <tr class="headersep"><td><?php spacer(1,1); ?><br></td></tr> +</table> + +<table border="0" cellspacing="0" cellpadding="6" width="100%"> + <tr valign="top" bgcolor="#cccccc"> + <td><small> + <?php print_link('http://www.php.net/', make_image('php-logo.gif', 'PHP', 'left') ); ?> + <?php print_link('http://www.php.net/copyright.php', 'Copyright © 2001, 2002 The PHP Group'); ?><BR> + All rights reserved.<BR> + </small> + </td> + <td align="right"><small> + Last updated: <?php echo strftime("%c %Z", getlastmod()); ?><BR> + </small><br> + </td> + </tr> +</table> + +</body> +</html> +<?php + +} function staffToolbar() { - include ("staff-toolbar.php"); + include ("staff-toolbar.php3"); } - ?> Index: php-hosts-web/style.css +++ php-hosts-web/style.css body, ul, td, th { font-family: arial,helvetica,sans-serif; font-size: 95%; } div#content { margin: 4px; } p { font-family: arial,helvetica,sans-serif; } em { font-weight: bold; font-style: italic; } headertop { background: #5b69a6; } headersep { background: #000033; } headerbottom { background: #9999cc; } error { color: #cc0000; } code, pre { font-family: "andale mono", "monotype.com", "courier new", monospace; font-size: 90%; } pre.note { margin-left: 20px; } h1 { font-family: arial,helvetica,sans-serif; font-size: 140%; font-weight: bold; color: #000066; } h2 { font-family: arial,helvetica,sans-serif; font-size: 125%; font-weight: bold; color: #000066; } h3 { font-family: arial,helvetica,sans-serif; font-size: 110%; font-weight: bold; color: #000066; } h4 { font-family: arial,helvetica,sans-serif; font-size: 100%; font-weight: bold; color: #000066; } small { font-family: arial,helvetica,sans-serif; font-size: 75%; } a.small { font-family: arial,helvetica,sans-serif; font-size: 75%; text-decoration: none; } A.menuWhite { font-family: arial,helvetica,sans-serif; font-size: 75%; color: #ffffff; } A.menuBlack { font-family: arial,helvetica,sans-serif; font-size: 75%; color: #000000; } input { font-family: arial,helvetica,sans-serif; } textarea { font-family: "andale mono", "monotype.com", "courier new", monospace; } input.small, select.small { font-family: arial,helvetica,sans-serif; font-size: 75%; } textarea.small { font-family: "andale mono", "monotype.com", "courier new", monospace; font-size: 75%; } div.errors { border: 1px dashed #660000; background: #fee; color: #660000; margin: 4px; padding: 6px; } div.explain { border: 1px dashed #000066; color: #000066; margin: 4px; padding: 6px; } div.thanks { border: 1px dashed #006600; color: #006600; margin: 4px; padding: 6px; } p#disclaimer { font-size: x-small; color: #eeeeee; text-align: center; } Index: php-hosts-web/source.php +++ php-hosts-web/source.php <?php require_once 'prepend.inc'; commonHeader('Show Source'); if (!isset($url)) { echo "No page URL specified."; commonFooter(); exit; } ?> Source of: <? echo $url; ?><BR> <? echo hdelim(); $legal_dirs = array( "/manual" => 1, "/include" => 1, "/stats" => 1); $dir = dirname($url); if ($dir && $legal_dirs[$dir]) { $page_name = $DOCUMENT_ROOT . $url; } else { $page_name = basename($url); } echo("<!-- $page_name -->\n"); if (file_exists($page_name) && !is_dir($page_name)) { show_source($page_name); } else if (is_dir($page_name)) { echo "<P>No file specified. Can't show source for a directory.</P>\n"; } echo hdelim(); ?> <P> The syntax highlighted source is automatically generated by PHP from the plaintext script.<br> If you're interested in what's behind the <B>commonHeader()</B> and <B>commonFooter()</B> functions, you can always take a look at the source of the <? print_link("/source.php?url=/include/layout.inc", "layout.inc"); ?> files. And, of course, if you want to see the source of this page, have a look <? print_link("/source.php?url=/source.php", "here"); ?>. </P> <? commonFooter(); ?>
Index: php-hosts-web/index.php diff -u php-hosts-web/index.php:1.1.1.1 php-hosts-web/index.php:1.2 --- php-hosts-web/index.php:1.1.1.1 Thu Feb 7 11:38:32 2002 +++ php-hosts-web/index.php Sat Apr 20 22:34:01 2002 @@ -4,36 +4,36 @@ ?> <h3>What is PHP?</h3> -<P> +<p> PHP is a server-side, cross-platform, HTML embedded scripting language. If you are completely new to PHP and want to get some idea of how it works, -have a look at the <a href="http://www.php.net">PHP homepage</a>. -</P> -<P> +have a look at the <a href="http://www.php.net/">PHP homepage</a>. +</p> +<p> This powerful scripting language is gaining support from hosting companies world-wide. In an effort to help people find a hosting company that suits their needs, we've developed this directory. -</P> -<P> -<A HREF="/search.php">Search the directory</A> now for hosting companies +</p> +<p> +<a href="search.php">Search the directory</a> now for hosting companies that have PHP and the other tools and services you need. -</P> +</p> <h3>What's New Here?</h3> -<P> -<B>User Comments:</B> Are you pleased or disappointed with one of the companies listed -in the directory? Add your own comments on the <A HREF="/msgboard/">Message Board</A>, +<p> +<b>User Comments:</b> Are you pleased or disappointed with one of the companies listed +in the directory? Add your own comments on the <a href="msgboard/">Message Board</a>, and help other users make a better-informed decision. -</P> +</p> <h3>Want to list your company?</h3> -<P> -<A HREF="/host-add.php">Add your company</A> to the directory. It's free. +<p> +<a href="host-add.php">Add your company</a> to the directory. It's free. </P> <h3>Need to update your listing?</h3> -<P> -Go to the <A HREF="/clients/">clients' section</A>. -</P> +<p> +Go to the <a href="clients/">clients' section</a>. +</p> <? commonFooter(); ?> Index: php-hosts-web/host-add.php diff -u php-hosts-web/host-add.php:1.1.1.1 php-hosts-web/host-add.php:1.2 --- php-hosts-web/host-add.php:1.1.1.1 Thu Feb 7 11:38:32 2002 +++ php-hosts-web/host-add.php Sat Apr 20 22:34:01 2002 @@ -76,7 +76,7 @@ ?> -Enter the following information (* deontes a required field): +Enter the following information (* denotes a required field): <FORM METHOD="post" ACTION="host-add.php"> <INPUT TYPE="hidden" NAME="MODE" value="ADD"> Index: php-hosts-web/include/layout.inc diff -u php-hosts-web/include/layout.inc:1.1.1.1 php-hosts-web/include/layout.inc:1.2 --- php-hosts-web/include/layout.inc:1.1.1.1 Thu Feb 7 11:38:38 2002 +++ php-hosts-web/include/layout.inc Sat Apr 20 22:34:01 2002 @@ -1,294 +1,248 @@ -<?php // -*- C++ -*- -header("Vary: User-Agent"); +<?php -/* Check that browser! */ +# spacer() +# print a IMG tag for a sized spacer GIF +# + +function spacer($width=1, $height=1, $align=false, $extras=false) { + printf('<img src="/gifs/spacer.gif" width="%d" height="%d" border="0" alt="" %s%s>', + $width, + $height, + ($align ? 'align="'.$align.'" ' : ''), + ($extras ? $extras : '') + ); +} + + + +# resize_image() +# tag the output of make_image() and resize it manually +# + +function resize_image($img, $width=1, $height=1) { + $str = preg_replace('/width=\"([0-9]+?)\"/i', '', $img ); + $str = preg_replace('/height=\"([0-9]+?)\"/i', '', $str ); + $str = substr($str,0,-1) . sprintf(' height="%s" width="%s">', $height, $width ); + return $str; +} -$IE4 = $IE3 = $NS4 = $NS3 = $X11 = $HAVE_STYLE = $HTDIG = false; -if (ereg("MSIE ([0-9]+)",$HTTP_USER_AGENT,$version)): - $ver=(int)$version[1]; - if ($ver>=4): - $IE4=true; - $HAVE_STYLE = true; - elseif($ver==3): - $IE3=true; - endif; -elseif (ereg("Mozilla/([0-9]+)",$HTTP_USER_AGENT,$version)): - $ver=(int)$version[1]; - if ($ver>=4): - $NS4=true; - $HAVE_STYLE=true; - elseif($ver==3): - $NS3=true; - endif; -endif; -if (ereg("X11",$HTTP_USER_AGENT)): - $X11 = true; -endif; -if (ereg("htdig",$HTTP_USER_AGENT)): - $HTDIG = true; -endif; - -/* Base variables */ - -$FONTFACE = "tahoma, verdana, arial, helvetica, sans-serif"; -$FONTFACEATTR = " FACE=\"$FONTFACE\""; - -$COLOR["purple"] = "#5B69A6"; -$COLOR["ltpurple"] = "#AFB6D3"; -$COLOR["green"] = "#92C000"; -$COLOR["grey"] = "#C0C0C0"; -$COLOR["ltgrey1"] = "#E0E0E0"; -$COLOR["ltgrey2"] = "#F0F0F0"; - - -/* Base functions */ - -function preloadImages() { -?> - b_sear0 = new Image(); - b_sear0.src = "/gifs/b-search-p.gif"; - b_sear1 = new Image(); - b_sear1.src = "/gifs/b-search-c.gif"; - - b_add0 = new Image(); - b_add0.src = "/gifs/b-add-p.gif"; - b_add1 = new Image(); - b_add1.src = "/gifs/b-add-c.gif"; - - b_clie0 = new Image(); - b_clie0.src = "/gifs/b-clients-p.gif"; - b_clie1 = new Image(); - b_clie1.src = "/gifs/b-clients-c.gif"; - - b_top0 = new Image(); - b_top0.src = "/gifs/b-top-p.gif"; - b_top1 = new Image(); - b_top1.src = "/gifs/b-top-c.gif"; - -<? -} - - -function spc($width, $height) { - echo "<IMG SRC='/gifs/spacer.gif' WIDTH=$width HEIGHT=$height BORDER=0 ALT=' '>"; -} - -function makeSideButton($url,$button,$kick,$gif,$width,$height,$vspace,$hspace,$alt,$br) { - if ($url): - echo "<A HREF=\"$url\" onMouseover=\"change('$button',1);"; - if ($kick): - echo " popUp('$kick',true);\" \n >"; - else: - echo "\" \n onMouseout=\"change('$button',0);\">"; - endif; - endif; - echo "<IMG SRC=\"/gifs/b-$gif-p.gif\" \n ALT=\"$alt\" \n WIDTH=$width HEIGHT=$height BORDER=0 \n NAME=\"$button\" \n HSPACE=$hspace VSPACE=$vspace>"; - if ($url): - echo "</A>"; - endif; - echo $br; -} - -function commonHead($title) { - global $NS4, $NS3, $IE3, $IE4, $X11, $FONTFACEATTR, $HTDIG; - global $PHP_SELF, $HTTP_REFERER, $FONTFACE, $HAVE_STYLE; - global $DISABLE_KICKOUTS, $DOCUMENT_ROOT; - -if ($HAVE_STYLE) { - echo "<STYLE TYPE=\"text/css\">\n"; - include("style.css"); - echo "</STYLE>\n"; -} -?> -</HEAD> - -<SCRIPT LANGUAGE="JavaScript"> -<!-- -var loaded = 0; -var lastbutton='top'; - -function LoadImgs () { - if (document.images) { -<? preloadImages(); ?> - loaded = 1; + +# make_image() +# return an IMG tag for a given file (relative to the images dir) +# + +function make_image($file, $alt=false, $align=false, $extras=false, $dir=false, $border=0) { + if (!$dir) { + $dir = 'gifs'; + } + $path = $_SERVER['DOCUMENT_ROOT']."/$dir/$file"; + if ($size = @getimagesize($path)) { + $image = sprintf('<img src="%s/%s" border="%d" %s alt="%s" %s%s>', + $dir, + $file, + $border, + $size[3], + ($alt ? $alt : ''), + ($align ? ' align="'.$align.'"' : ''), + ($extras ? ' '.$extras : '') + ); + } else { + $image = sprintf('<img src="%s/%s" border="%d" alt="%s" %s%s>', + $dir, + $file, + $border, + ($alt ? $alt : ''), + ($align ? ' ALIGN="'.$align.'"' : ''), + ($extras ? ' '.$extras : '') + ); } + return $image; } -function change(Name,No) { - if (document.images && (loaded == 1) && (document[Name])) { - document[Name].src = eval("b_" + Name + No + ".src"); + + +# print_image() +# print an IMG tag for a given file +# + +function print_image($file, $alt=false, $align=false, $extras=false, $dir=false, $border=0) { + print make_image($file, $alt, $align, $extras, $dir); +} + + + +# make_submit() +# - make a submit button image +# +function make_submit($file, $alt=false, $align=false, $extras=false, $dir=false, $border=0) { + if (!$dir) { + $dir = '/gifs'; + } + $return = make_image($file, $alt, $align, $extras, $dir, $border); + if ($return != "<img>") { + $return = '<input type="image"'.substr($return,4); + } else { + $return = '<input type="submit">'; } + return $return; } -<? -if ($IE4) { - echo "LoadImgs();\n"; -} -?> - -//---> -</SCRIPT> - -<? + +# delim() +# print a pipe delimiter +# + +function delim($color=false) { + if (!$color) { + return ' | '; + } + return sprintf('<font color="%s"> | </font>', $color ); } -function commonBody($title) { - global $NS4, $NS3, $IE3, $IE4, $X11, $FONTFACEATTR, $HTDIG; - global $PHP_SELF, $HTTP_REFERER, $FONTFACE; - global $NUM_HOSTS; - global $DISABLE_KICKOUTS, $DOCUMENT_ROOT; -?> -<BODY MARGINHEIGHT=3 MARGINWIDTH=3 TOPMARGIN=3 LEFTMARGIN=3 BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#5B69A6" VLINK="#5B69A6" ALINK="#00FF00" -<? if ($NS4 || $NS3): - echo " OnLoad=\"LoadImgs();\""; -endif; ?> -><A NAME="top"> -<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="100%"> - <TR valign=top> - <TD ALIGN=left width=150 BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="150"> - <TR VALIGN=top> - <TD ALIGN=left> - <IMG SRC="/gifs/cap-ul.gif" WIDTH=9 HEIGHT=9 BORDER=0><BR> - <?spc(10,70);?><A HREF="/index.php"><IMG SRC="/gifs/logo.gif" ALT="Home Page" WIDTH=130 HEIGHT=70 BORDER=0></A><BR> - <?spc(1,7);?><BR> - </TD> - </TR> - <TR VALIGN=top> - <TD ALIGN=left> -<? if ($FONTFACEATTR) { echo "<FONT $FONTFACEATTR>"; } ?> -<? - echo "<CENTER>\n"; - echo "<SMALL>Currently listing</SMALL><BR>\n"; - echo "<BIG STYLE=\"yellow\">".$NUM_HOSTS."</BIG><BR>\n"; - echo "<SMALL>hosting companies.</SMALL><BR></CENTER>\n"; - makeSideButton("/search.php","sear","","search",129,30,0,10,"Search for a hosting company","<BR>\n"); - makeSideButton("/host-add.php","add","","add",129,30,0,10,"Add your company to the directory","<BR>\n"); - makeSideButton("/clients/","clie","","clients",129,30,0,10,"Enter the client's section","<BR>\n"); -?> - </TD> - </TR> - </TABLE> - </TD> - <TD align=left width="100%"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="100%"> - <TR VALIGN=middle BGCOLOR="#5B69A6"> - <TD ALIGN=left> - <? - spc(5,1); - echo "<FONT${FONTFACEATTR} SIZE=4><B>$title</B></FONT><BR>\n"; + +# hdelim() +# print a horizontal delimiter (just a wide line); +# + +function hdelim($color="#000000") { + if (!$color) { + return '<hr noshade size="1">'; + } + return sprintf('<hr noshade size="1" color="%s">', $color ); +} + + + +# make_link() +# return a hyperlink to something, within the site +# + +function make_link ($url, $linktext=false, $target=false, $extras=false) { + return sprintf("<a href=\"%s\"%s%s>%s</a>", + $url, + ($target ? ' target="'.$target.'"' : ''), + ($extras ? ' '.$extras : ''), + ($linktext ? $linktext : $url) + ); +} + + + +# print_link() +# echo a hyperlink to something, within the site +# + +function print_link($url, $linktext=false, $target=false, $extras=false) { + echo make_link($url, $linktext, $target, $extras); +} + + + +function make_email($email, $linktext=false) { + return sprintf("<a href=\"mailto:%s\">%s</a>", + $email, + ($linktext ? $linktext : $email) + ); +} + +function print_email($email, $linktext=false) { + echo make_email($email, $linktext); +} + +function commonHeader($title = false, $showsearch = true) { + global $SIDEBAR_DATA; + +?><html> +<head> + <title><?php echo $title ? $title : 'PHP Hosting Companies' ?></title> + <link rel="stylesheet" href="style.css" /> +</head> + +<body + topmargin="0" leftmargin="0" + marginheight="0" marginwidth="0" + bgcolor="#ffffff" + text="#000000" + link="#000033" + alink="#0099ff" + vlink="#000033" +><a name="TOP"></a> +<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%"> + <tr class="headertop"> + <td align="left" rowspan="2"><?php print_link('/', make_image('logo.gif', 'PHP', false, 'vspace="2" hspace="2"') ); ?></td> + <td> </td> + </tr> + + <tr class="headertop"> + <td align="right" valign="bottom" nowrap> + <?php + print_link('http://www.php.net/', 'php.net', false, 'class="menuWhite"'); + echo delim(); + print_link('/search.php', 'search', false, 'class="menuWhite"'); + echo delim(); + print_link('/add-host.php', 'add your company', false, 'class="menuWhite"'); + echo delim(); + print_link('/clients/', 'login', false, 'class="menuWhite"'); ?> - </TD> - <TD ALIGN=right><IMG SRC="/gifs/cap-right.gif" WIDTH=24 HEIGHT=48 BORDER=0><BR></TD> - </TR> - </TABLE> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="100%"> - <TR VALIGN=top BGCOLOR="#FFFFFF"> - <TD ALIGN=left WIDTH="12"> - <IMG SRC="/gifs/corner-ul.gif" WIDTH=12 HEIGHT=12 BORDER=0><BR> - </TD> - <TD ALIGN=left WIDTH="100%"> - <? if ($FONTFACEATTR): ?> - <FONT<? echo $FONTFACEATTR;?>> - <? endif; ?> - <BR CLEAR=ALL> - <!-- start body --> -<? -} - -function commonHeader($title) { -?> -<HTML> -<HEAD> -<TITLE>PHP Hosting Companies: <? echo $title;?></TITLE> -<? commonHead($title); ?> -</HEAD> - -<? commonBody($title); ?> -<? -} - - -function commonFooter() { - global $NS4, $NS3, $IE3, $IE4, $X11, $HAVE_STYLE, $FONTFACEATTR, $HTTP_USER_AGENT, $HTDIG; - global $DISABLE_KICKOUTS, $DOCUMENT_ROOT; -?> - - <!-- end body --> - </TD> - </TR> - </TABLE> - </TD> - </TR> - <TR valign=bottom BGCOLOR="#5B69A6"> - <TD ALIGN=left width="150"> -<? spc(150,1);?><BR> -</TD> - <TD ALIGN=left width="100%" BGCOLOR="#FFFFFF"> - <IMG SRC="/gifs/corner-bl.gif" WIDTH=12 HEIGHT=12 BORDER=0><BR> - </TD> - </TR> - <TR valign=top> - <TD ALIGN=left width="150" BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="150"> - <TR VALIGN=bottom> - <TD ALIGN=left> -<? spc(129,33);?><BR> -<? makeSideButton("#top","top","","top",129,30,0,10,"Top of this page","<BR>\n"); ?> - <IMG SRC="/gifs/cap-bl.gif" WIDTH=9 HEIGHT=9 BORDER=0><BR> - </TD> - </TR> - </TABLE> - </TD> - <TD align=left width="100%"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="100%"> - <TR VALIGN=middle> - <TD ALIGN=center BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0> - <TR VALIGN=middle> - <TD align=right> - <FONT FACE="tahoma, verdana, arial, helvetica, sans-serif" SIZE=1> - <I>Site<BR>Hosting:</I><BR> - </TD> - <TD> - <IMG SRC="/gifs/spacer.gif" WIDTH=5 HEIGHT=1 BORDER=0><BR> - </TD> - <TD> - <A HREF="http://www.easydns.com/"><IMG SRC="/gifs/logo-easydns.gif" WIDTH=190 HEIGHT=48 BORDER=0 vspace=12></A><BR> - </TD> - </TR> - </TABLE> - </TD> - <TD ALIGN=right BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0> - <TR VALIGN=middle> - <TD align=right> -<? if ($FONTFACEATTR) { echo "<FONT $FONTFACEATTR>"; } ?><SMALL> -Note: Neither easyDNS, PHP3, nor their developers necessarily<BR> -endorse nor warranty any of the companies listed herein.<BR> -</SMALL></TD> - <TD> - <IMG SRC="/gifs/cap-right2.gif" WIDTH=24 HEIGHT=72 BORDER=0></TD> - </TR> - </TABLE> - </TD> - </TR> - </TABLE> - </TD> - </TR> -</TABLE> - -</BODY> -</HTML> -<? + <?php spacer(2,2); ?><br> + </td> + </tr> + + <tr class="headersep"><td colspan="2"><?php spacer(1,1);?><br></td></tr> + + <tr class="headerbottom"> + <td colspan="2"><p id="disclaimer">The PHP Group does not endorse nor warranty any of the companies listed herein.</p></td> + </tr> + + <tr class="headersep"><td colspan="2"><?php spacer(1,1);?><br></td></tr> +</table> +<div id="content"> +<?php } + +# commonfooter() +# +# + +function commonFooter() {?> +</div> +<table border="0" cellspacing="0" cellpadding="0" width="100%"> + <tr class="headersep"><td><?php spacer(1,1);?><br></td></tr> + <tr class="headerbottom"> + <td align="right" valign="bottom"><? + print_link('/source.php?url='.$_SERVER['SCRIPT_NAME'], 'show source', false, 'class="menuWhite"'); + ?> <br> + </td> + </tr> + <tr class="headersep"><td><?php spacer(1,1); ?><br></td></tr> +</table> + +<table border="0" cellspacing="0" cellpadding="6" width="100%"> + <tr valign="top" bgcolor="#cccccc"> + <td><small> + <?php print_link('http://www.php.net/', make_image('php-logo.gif', 'PHP', 'left') ); ?> + <?php print_link('http://www.php.net/copyright.php', 'Copyright © 2001, 2002 The PHP Group'); ?><BR> + All rights reserved.<BR> + </small> + </td> + <td align="right"><small> + Last updated: <?php echo strftime("%c %Z", getlastmod()); ?><BR> + </small><br> + </td> + </tr> +</table> + +</body> +</html> +<?php + +} function staffToolbar() { - include ("staff-toolbar.php"); + include ("staff-toolbar.php3"); } - ?> Index: php-hosts-web/style.css +++ php-hosts-web/style.css body, ul, td, th { font-family: arial,helvetica,sans-serif; font-size: 95%; } div#content { margin: 4px; } p { font-family: arial,helvetica,sans-serif; } em { font-weight: bold; font-style: italic; } headertop { background: #5b69a6; } headersep { background: #000033; } headerbottom { background: #9999cc; } error { color: #cc0000; } code, pre { font-family: "andale mono", "monotype.com", "courier new", monospace; font-size: 90%; } pre.note { margin-left: 20px; } h1 { font-family: arial,helvetica,sans-serif; font-size: 140%; font-weight: bold; color: #000066; } h2 { font-family: arial,helvetica,sans-serif; font-size: 125%; font-weight: bold; color: #000066; } h3 { font-family: arial,helvetica,sans-serif; font-size: 110%; font-weight: bold; color: #000066; } h4 { font-family: arial,helvetica,sans-serif; font-size: 100%; font-weight: bold; color: #000066; } small { font-family: arial,helvetica,sans-serif; font-size: 75%; } a.small { font-family: arial,helvetica,sans-serif; font-size: 75%; text-decoration: none; } A.menuWhite { font-family: arial,helvetica,sans-serif; font-size: 75%; color: #ffffff; } A.menuBlack { font-family: arial,helvetica,sans-serif; font-size: 75%; color: #000000; } input { font-family: arial,helvetica,sans-serif; } textarea { font-family: "andale mono", "monotype.com", "courier new", monospace; } input.small, select.small { font-family: arial,helvetica,sans-serif; font-size: 75%; } textarea.small { font-family: "andale mono", "monotype.com", "courier new", monospace; font-size: 75%; } div.errors { border: 1px dashed #660000; background: #fee; color: #660000; margin: 4px; padding: 6px; } div.explain { border: 1px dashed #000066; color: #000066; margin: 4px; padding: 6px; } div.thanks { border: 1px dashed #006600; color: #006600; margin: 4px; padding: 6px; } p#disclaimer { font-size: x-small; color: #eeeeee; text-align: center; } Index: php-hosts-web/source.php +++ php-hosts-web/source.php <?php require_once 'prepend.inc'; commonHeader('Show Source'); if (!isset($url)) { echo "No page URL specified."; commonFooter(); exit; } ?> Source of: <? echo $url; ?><BR> <? echo hdelim(); $legal_dirs = array( "/manual" => 1, "/include" => 1, "/stats" => 1); $dir = dirname($url); if ($dir && $legal_dirs[$dir]) { $page_name = $DOCUMENT_ROOT . $url; } else { $page_name = basename($url); } echo("<!-- $page_name -->\n"); if (file_exists($page_name) && !is_dir($page_name)) { show_source($page_name); } else if (is_dir($page_name)) { echo "<P>No file specified. Can't show source for a directory.</P>\n"; } echo hdelim(); ?> <P> The syntax highlighted source is automatically generated by PHP from the plaintext script.<br> If you're interested in what's behind the <B>commonHeader()</B> and <B>commonFooter()</B> functions, you can always take a look at the source of the <? print_link("/source.php?url=/include/layout.inc", "layout.inc"); ?> files. And, of course, if you want to see the source of this page, have a look <? print_link("/source.php?url=/source.php", "here"); ?>. </P> <? commonFooter(); ?>