cvs: phpweb /include layout.inc

From: Date: Thu, 09 May 2002 19:51:17 +0000
Subject: cvs: phpweb /include layout.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-10096@lists.php.net to get a copy of this message
sander Thu May 9 15:51:17 2002 EDT Modified files: /phpweb/include layout.inc Log: Minor HTML fixes and some steps to XHTML compatibility Index: phpweb/include/layout.inc diff -u phpweb/include/layout.inc:1.82 phpweb/include/layout.inc:1.83 --- phpweb/include/layout.inc:1.82 Thu May 2 15:50:04 2002 +++ phpweb/include/layout.inc Thu May 9 15:51:17 2002 @@ -1,12 +1,12 @@ <?php -/* $Id: layout.inc,v 1.82 2002/05/02 19:50:04 jimw Exp $ */ +/* $Id: layout.inc,v 1.83 2002/05/09 19:51:17 sander Exp $ */ # 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>', + printf('<img src="/gifs/spacer.gif" width="%d" height="%d" border="0" alt="" %s%s />', $width, $height, ($align ? 'align="'.$align.'" ' : ''), @@ -21,7 +21,7 @@ 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 ); + $str = substr($str,0,-1) . sprintf(' height="%s" width="%s" />', $height, $width ); return $str; } @@ -35,7 +35,7 @@ $dir = '/gifs'; } if ($size = @getimagesize($HTTP_SERVER_VARS['DOCUMENT_ROOT'].$dir.'/'.$file)) { - $image = sprintf('<img src="%s/%s" border="%d" %s ALT="%s" %s%s>', + $image = sprintf('<img src="%s/%s" border="%d" %s ALT="%s" %s%s />', $dir, $file, $border, @@ -45,7 +45,7 @@ ($extras ? ' '.$extras : '') ); } else { - $image = sprintf('<img src="%s/%s" border="%d" ALT="%s" %s%s>', + $image = sprintf('<img src="%s/%s" border="%d" ALT="%s" %s%s />', $dir, $file, $border, @@ -76,7 +76,7 @@ if ($return != "<img>") { $return = '<input type="image"'.substr($return,4); } else { - $return = '<input type="submit">'; + $return = '<input type="submit" />'; } return $return; } @@ -98,9 +98,9 @@ function hdelim($color="#000000") { if (!$color) { - return '<hr noshade size="1">'; + return '<hr noshade size="1" />'; } - return sprintf('<hr noshade size="1" color="%s">', $color ); + return sprintf('<hr noshade size="1" color="%s" />', $color ); } # make_link() @@ -184,15 +184,15 @@ <html> <head> <title>PHP<?php if ($title) echo ": $title";?></title> - <link rel="stylesheet" href="/style.css"> -<link rel="shortcut icon" href="/favicon.ico" /> + <link rel="stylesheet" href="/style.css" /> + <link rel="shortcut icon" href="/favicon.ico" /> </head> <body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#ffffff" text="#000000" link="#000099" alink="#0000ff" vlink="#000099"> <table border="0" cellspacing="0" cellpadding="0" height="48" width="100%"> <tr bgcolor="#9999cc"> - <td align="middle" rowspan="2" width="120"><a href="/"><?php print_image('php_logo.gif', 'PHP'); ?></a></td> + <td align="center" rowspan="2" width="120"><a href="/"><?php print_image('php_logo.gif', 'PHP'); ?></a></td> <td>&nbsp;</td> </tr> <tr bgcolor="#9999cc"> @@ -216,8 +216,8 @@ </tr> <tr bgcolor="#333366"><td colspan="2"><?php spacer(1,1);?></td></tr> <tr bgcolor="#666699"> - <form method="post" action="/search.php"> <td align="right" valign="top" colspan="2"><font color="#ffffff"> + <form method="post" action="/search.php"> <small>search for</small> <input class="small" type="text" name="pattern" value="" size="30" /> <small>in the</small> @@ -231,9 +231,9 @@ <option value="phpdoc">documentation mailing list </select> <?php echo make_submit('small_submit_white.gif', 'search', 'bottom'); ?>&nbsp; +</form> </font> </td> - </form> </tr> <tr bgcolor="#333366"><td colspan="2"><?php spacer(1,1);?></td></tr> </table> @@ -302,7 +302,7 @@ } //--> </script> - <input type="hidden" name="FROM" value="<?php echo htmlspecialchars($PHP_SELF)?>"> + <input type="hidden" name="FROM" value="<?php echo htmlspecialchars($PHP_SELF)?>" /> <?php print_link('/source.php?url='.$SCRIPT_NAME, 'show source', false, 'class="small"'); echo delim();

« previous php.mirrors (#10096) next »