cvs: pearweb /public_html/bugs index.php /public_html/bugs/include layout.inc

From: Date: Sun, 14 Sep 2003 11:58:48 +0000
Subject: cvs: pearweb /public_html/bugs index.php /public_html/bugs/include layout.inc
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-12718@lists.php.net to get a copy of this message
mj Sun Sep 14 07:58:48 2003 EDT Added files: /pearweb/public_html/bugs index.php Modified files: /pearweb/public_html/bugs/include layout.inc Log: * Adding index page * Cleaning up layout.inc

Index: pearweb/public_html/bugs/include/layout.inc diff -u pearweb/public_html/bugs/include/layout.inc:1.1 pearweb/public_html/bugs/include/layout.inc:1.2 --- pearweb/public_html/bugs/include/layout.inc:1.1 Mon Sep 8 14:25:28 2003 +++ pearweb/public_html/bugs/include/layout.inc Sun Sep 14 07:58:48 2003 @@ -1,76 +1,4 @@ <?php -# 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; -} - - -# 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) { - global $HTTP_SERVER_VARS; - if (!$dir) { - $dir = '/gifs'; - } - if (is_string($dir) && $dir{0} != "/") { - $dir = "/$dir"; - } - $path = $HTTP_SERVER_VARS['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; -} - - - -# 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 # @@ -87,59 +15,6 @@ return $return; } - - -# delim() -# print a pipe delimiter -# - -function delim($color=false) { - if (!$color) { - return '&nbsp;|&nbsp;'; - } - return sprintf('<font color="%s">&nbsp;|&nbsp;</font>', $color ); -} - - - -# 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, @@ -150,121 +25,6 @@ function print_email($email, $linktext=false) { echo make_email($email, $linktext); } - -# commonheader() -# -# - -function commonHeader($title = false, $showsearch = true) { - global $SIDEBAR_DATA; - -?><html> -<head> - <title>PHP Bugs<?php if ($title) { echo ': '.$title; } ?></title> - <link rel="stylesheet" href="style.css" /> - <script type="text/javascript" src="util.js"></script> -</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-bug.gif', 'PHP Bugs', false, 'vspace="2" hspace="2"') ); ?></td> - <td>&nbsp;</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('http://www.php.net/support.php', 'support', false, 'class="menuWhite"'); - echo delim(); - print_link('http://www.php.net/docs.php', 'documentation', false, 'class="menuWhite"'); - echo delim(); - print_link('report.php', 'report a bug', false, 'class="menuWhite"'); - echo delim(); - print_link('search.php', 'advanced search', false, 'class="menuWhite"'); - echo delim(); - print_link('search-howto.php', 'search howto', false, 'class="menuWhite"'); - echo delim(); - print_link('bugstats.php', 'statistics', false, 'class="menuWhite"'); - ?> - <?php spacer(2,2); ?><br> - </td> - </tr> - -<?php if ($showsearch) { ?> - <tr class="headersep"><td colspan="2"><?php spacer(1,1);?><br></td></tr> - - <tr class="headerbottom"> - <form method="get" action="search.php"> - <input type="hidden" name="cmd" value="display" /> - <td align="right" valign="top" colspan="2" nowrap><font color="#ffffff"> - <small>go to bug id or search bugs for</small> - <input class="small" type="text" name="search_for" value="" size="30" /> - <?php echo make_submit('small_submit_white.gif', 'search', 'bottom');?>&nbsp;<br> - </font></td> - </form> - </tr> -<?php } ?> - - <tr class="headersep"><td colspan="2"><?php spacer(1,1);?><br></td></tr> -</table> -<div id="content"> -<?php -} - - - - -# commonfooter() -# -# - -function commonFooter() { - global $HTTP_SERVER_VARS; -?> -</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='.$HTTP_SERVER_VARS['SCRIPT_NAME'], 'show source', false, 'class="menuWhite"'); - ?>&nbsp;<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 &copy; 2001-2003 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 clean_note($text) { $text = htmlspecialchars($text); Index: pearweb/public_html/bugs/index.php +++ pearweb/public_html/bugs/index.php <?php /* +----------------------------------------------------------------------+ | PEAR Web site version 1.0 | +----------------------------------------------------------------------+ | Copyright (c) 2003 The PEAR Group | +----------------------------------------------------------------------+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available at through the world-wide-web at | | http://www.php.net/license/2_02.txt. | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Martin Jansen <mj@php.net> | +----------------------------------------------------------------------+ $Id: index.php,v 1.1 2003/09/14 11:58:48 mj Exp $ */ response_header("Bugs"); ?> <h1>Bugs</h1> <ul> <li><?php print_link("search.php", "Search for existing bugs"); ?></li> <li><?php print_link("report.php", "Report a new bug"); ?></li> </ul> <?php response_footer(); ?>
« previous php.pear.cvs (#12718) next »