cvs: phpweb / searchbar.css searchbar.php

From: Date: Sat, 16 Aug 2003 09:34:15 +0000
Subject: cvs: phpweb / searchbar.css searchbar.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-20399@lists.php.net to get a copy of this message
goba Sat Aug 16 05:34:15 2003 EDT Added files: /phpweb searchbar.css Modified files: /phpweb searchbar.php Log: Searchbar remake: - separate CSS to a different file, let browsers cache it - drastically reduce HTML output size with dropping tables, while the interface is now much more similar to the PHP site - follow XHTML standard - only the target attribute is not standardized, we need to look into options replacing that with something identically working but standard Index: phpweb/searchbar.php diff -u phpweb/searchbar.php:1.14 phpweb/searchbar.php:1.15 --- phpweb/searchbar.php:1.14 Thu May 15 19:22:13 2003 +++ phpweb/searchbar.php Sat Aug 16 05:34:15 2003 @@ -1,79 +1,54 @@ <?php -/* $Id: searchbar.php,v 1.14 2003/05/15 23:22:13 jacques Exp $ */ +// $Id: searchbar.php,v 1.15 2003/08/16 09:34:15 goba Exp $ +$_SERVER['BASE_PAGE'] = 'searchbar.php'; +include_once $_SERVER['DOCUMENT_ROOT'] . "/include/prepend.inc"; -include_once "./include/prepend.inc"; - -// Gecko would like to see the target to be _content, while IE would +// Gecko would like to see the target to be _content, while IE/Opera would // like to see the target to be _main. Other browsers are not expected // to visit this page, or support for them will be added in the future. if (preg_match("!Gecko!", $_SERVER['HTTP_USER_AGENT'])) { - $target = "_content"; + $target = ' target="_content"'; } else { - $target = "_main"; + $target = ' target="_main"'; } -?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> +if (isset($EXPL_LANG)) { + $lang_input = " <input type=\"hidden\" name=\"lang\" value=\"{$EXPL_LANG}\" />\n"; +} else { $lang_input = ""; } + +echo <<<SEARCHBAR_END +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> - <title>PHP.net Search Sidebar</title> + <title>PHP: Search Sidebar</title> <link rel="shortcut icon" href="/favicon.ico" /> - <style> - select, input, button, body, p, td { - font-family: Verdana, Arial, Helvetica, Sans Serif; - font-size: 75%; - } - .title { - font-size: 25px; - color: black; - font-weight: bold; - } - .indented { - margin: 5px 5px 5px 5px; - } - </style> + <style type="text/css">@import url("/searchbar.css");</style> + <base href="{$_SERVER['BASE_HREF']}" /> </head> -<body topmargin="0" leftmargin="0" - bgcolor="#ffffff" text="#000000" link="#000099" alink="#0000ff" - vlink="#000099" onload="document.sform.pattern.focus();"> -<table border="0" cellspacing="2" cellpadding="0"> - <tr> - <td width="69"><a href="/" target="<?php echo $target ?>"><img src="/images/logos/php-logo.gif" width="69" height="36" border="0" alt="PHP" hspace="3" vspace="3" /></a></td> - <td class="title" align="left">Search</td> - </tr> - <tr bgcolor="#333366"><td colspan="2"><?php spacer(); ?></td></tr> - <tr> - <td colspan="2"> - <div class="indented"> - <form method="post" action="/search.php" target="<?php echo $target ?>" name="sform"> -<?php - if (isset($EXPL_LANG)) { - echo ' <input type="hidden" name="lang" value="'. $EXPL_LANG . '" />'; - } -?> - Search for<br /> - <input type="text" name="pattern" value="" style="width: 95%"/><br /> - in the<br /> - <select name="show" style="width: 95%"> - <option value="quickref" selected>function list +<body onload="document.sform.pattern.focus();"> +<h1> + <a href="/"{$target}>php</a> search +</h1> +<form method="post" action="/search.php"{$target} name="sform"> + <p class="input">$lang_input + Search for<br /> + <input type="text" name="pattern" value="" /><br /> + in the<br /> + <select name="show"> + <option value="quickref" selected="selected">function list <option value="wholesite">whole site - <option value="manual">online documentation [en] - <option value="bugdb">bug database - <option value="maillist">general mailing list - <option value="devlist">developer mailing list - <option value="phpdoc">documentation mailing list - </select><br /> - <input type="submit" value="Search"> - </form> - </div> - </td> - </tr> - <tr bgcolor="#333366"><td colspan="2"><?php spacer(); ?></td></tr> - <tr> - <td colspan="2"> - <div class="indented"> - <a href="/copyright.php" target="<?php echo $target ?>">Copyright &copy; 2002, 2003 The PHP Group</a><br />All rights reserved. - </div> - </td> - </tr> -</table> + <option value="manual" >online documentation [en] + <option value="bugdb" >bug database + <option value="maillist" >general mailing list + <option value="devlist" >developer mailing list + <option value="phpdoc" >documentation mailing list + </select><br /> + <input type="submit" value="Search" /> + </p> +</form> +<p class="copyright"> + <a href="/copyright.php"{$target}>Copyright &copy; 2002, 2003 The PHP Group</a><br />All rights reserved. +</p> </body> </html> +SEARCHBAR_END; Index: phpweb/searchbar.css +++ phpweb/searchbar.css body { margin: 0px; padding: 0px; background-color: white; color: black; } select, input, body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 80%; } input, select { width: 95%; margin: 2px; } p.input { margin: 5px; } p.copyright { font-size: 70%; padding: 5px; background-color: #cccccc; color: inherit; border-top: 1px solid #333366; } h1 { font-size: 25px; color: black; background-color: #9999cc; font-weight: bold; padding: 5px; margin: 0px; border-bottom: 1px solid #333366; } h1 a { font-style: italic; text-decoration: none; color: black; background-color: transparent; } a, a:visited { color: #000099 background-color: transparent; } a:active { color: #0000ff; background-color: transparent; }

« previous php.mirrors (#20399) next »