cvs: php-bugs-web / search.php /include layout.inc

From: Date: Tue, 16 Oct 2001 07:59:42 +0000
Subject: cvs: php-bugs-web / search.php /include layout.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-7014@lists.php.net to get a copy of this message
ssb Tue Oct 16 03:59:42 2001 EDT Modified files: /php-bugs-web search.php /php-bugs-web/include layout.inc Log: * add "assigned to" search field * cleaned up search form layout a bit * drop search bar in the search script Index: php-bugs-web/search.php diff -u php-bugs-web/search.php:1.6 php-bugs-web/search.php:1.7 --- php-bugs-web/search.php:1.6 Sat Oct 13 19:37:53 2001 +++ php-bugs-web/search.php Tue Oct 16 03:59:41 2001 @@ -6,7 +6,7 @@ exit; } -commonHeader("Search"); +commonHeader("Search", false); if (isset($cmd) && $cmd == "display") { @mysql_connect("localhost","nobody","") @@ -46,8 +46,11 @@ $where_clause .= " AND php_os like '%$php_os%'"; } - if (!isset($phpver)) $phpver = "4"; + if (empty($phpver)) $phpver = "4"; if ($phpver) $where_clause .= " AND SUBSTRING(php_version,1,1) = '$phpver'"; + if (!empty($assign)) { + $where_clause .= " AND assign = '$assign'"; + } /* not in the header, but someone can build a query manually with it. */ if(strlen($by) and $by!='Any') @@ -135,31 +138,44 @@ <form method="POST" action="<?php echo $PHP_SELF?>"> <input type="hidden" name="cmd" value="display" /> <tr> - <td><input type="submit" value="Display" /></td> + <td rowspan="5" valign="top"><input type="submit" value="Display" /></td> + <td align="right">bugs&nbsp;with&nbsp;status:</td> <td><select name="status"><?php show_state_options($status);?></select></td> - <td align="right">bugs of type: </td> - <td><select name="bug_type"><?php show_types($bug_type,1);?></select></td> - <td align="right">reported since:</td> + <td align="right">reported&nbsp;since:</td> <td><select name="bug_age"><?php show_byage_options($bug_age);?></select></td> </tr> <tr> - <td colspan=2 align=right>OS (substr search):</td> - <td colspan="4"><input type="text" name="php_os" value="<?echo htmlspecialchars($php_os);?>"> + <td align="right">of type:</td> + <td colspan="3"><select name="bug_type"><?php show_types($bug_type,1);?></select></td> + </tr> + <tr> + <td align="right">OS (substring):</td> + <td><input type="text" name="php_os" value="<?echo htmlspecialchars($php_os);?>" /></td> + <td align="right">assigned to:</td> + <td><input size="10" type="text" name="assign" value="<?echo htmlspecialchars($assign);?>" />&nbsp;<?php + if (!empty($user)) { + $u = stripslashes($user); + print "<input type=\"button\" value=\"set to $u\" onclick=\"form.assign.value='$u'\" />"; + } +?></td> </tr> <tr> <td align="right">with text:</td> - <td colspan="3"><input type="text" name="search_for" value="<?echo htmlspecialchars($search_for);?>"> in the report or email address</td> - <td colspan="2">max. <select name="limit"><?php show_limit_options($limit);?></select> entries / page.</td> + <td colspan="3"><input type="text" name="search_for" value="<?echo htmlspecialchars($search_for);?>" /> in the report or email address</td> + </tr> + <tr> + <td align="right">max:</td> + <td colspan="3"><select name="limit"><?php show_limit_options($limit);?></select> entries / page.</td> </tr> </form> <tr> - <td bgcolor="#000000" colspan="6"><?echo spacer(1,1);?></td> + <td bgcolor="#000000" colspan="5"><?echo spacer(1,1);?></td> </tr> <form method="GET" action="bug.php"> <tr> <td align="right"><input type="submit" value="Edit" /></td> <td align="right">bug number:</td> - <td colspan="4"><input type="text" name="id" value="<?echo $id?>"></td> + <td colspan="3"><input type="text" name="id" value="<?echo $id?>"></td> <input type="hidden" name="edit" value="<?php echo isset($MAGIC_COOKIE) ? 1 : 2;?>"> </tr> </form> @@ -170,7 +186,7 @@ function show_prev_next($begin,$rows,$total_rows,$link,$limit) { if($limit=='All') return; - echo "<tr bgcolor=\"#cccccc\"><td align=\"center\" colspan=\"9\">"; + echo "<tr bgcolor=\"#cccccc\"><td align=\"center\" colspan=\"7\">"; echo '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>'; if ($begin > 0) { echo "<td align=\"left\" width=\"33%\"><a href=\"$link&amp;begin=",max(0,$begin-$limit),"\">&laquo; Show Previous $limit Entries</a></td>"; Index: php-bugs-web/include/layout.inc diff -u php-bugs-web/include/layout.inc:1.3 php-bugs-web/include/layout.inc:1.4 --- php-bugs-web/include/layout.inc:1.3 Sun Sep 23 19:27:04 2001 +++ php-bugs-web/include/layout.inc Tue Oct 16 03:59:42 2001 @@ -155,7 +155,7 @@ # # -function commonHeader($title=false) { +function commonHeader($title = false, $showsearch = true) { global $SIDEBAR_DATA; ?><html> @@ -205,6 +205,7 @@ </td> </tr> +<?php if ($showsearch) { ?> <tr class="headersep"><td colspan="2"><?php spacer(1,1);?><br></td></tr> <tr class="headerbottom"> @@ -217,6 +218,7 @@ </font></td> </form> </tr> +<?php } ?> <tr class="headersep"><td colspan="2"><?php spacer(1,1);?><br></td></tr> </table>

« previous php.mirrors (#7014) next »