mirror of
https://git.code.sf.net/p/quake/website
synced 2024-11-27 14:32:31 +00:00
make continuing a news search a little easier by preserving old search parms
This commit is contained in:
parent
44584e9b91
commit
0d581938a4
3 changed files with 26 additions and 9 deletions
19
lib/news.php
19
lib/news.php
|
@ -54,7 +54,7 @@
|
|||
'</TR>';
|
||||
}
|
||||
|
||||
function monthForm ()
|
||||
function monthForm ($month, $year)
|
||||
{
|
||||
?><FORM name="bymonth" method="get" action="/old_news.php"><?
|
||||
tableBoxHeader ('black', tableHeadColor);
|
||||
|
@ -70,7 +70,7 @@
|
|||
<SELECT name="month">
|
||||
<?
|
||||
for ( $i = 1 ; $i < 13 ; $i++ ) {
|
||||
printf ("<OPTION>%02d</OPTION>", $i);
|
||||
printf ("<OPTION%s>%02d</OPTION>", $i == $month ? " selected" : "", $i);
|
||||
}
|
||||
?>
|
||||
</SELECT>
|
||||
|
@ -80,8 +80,13 @@
|
|||
</TD>
|
||||
<TD align="center">
|
||||
<SELECT name="year">
|
||||
<OPTION>2000</OPTION>
|
||||
<OPTION selected>2001</OPTION>
|
||||
<?
|
||||
if ($year == "")
|
||||
$year = 2001;
|
||||
for ( $i = 2000 ; $i <= 2001 ; $i++ ) {
|
||||
printf ("<OPTION%s>%04d</OPTION>", $i == $year ? " selected" : "", $i);
|
||||
}
|
||||
?>
|
||||
</SELECT>
|
||||
</TD>
|
||||
</TR>
|
||||
|
@ -98,7 +103,7 @@
|
|||
<?
|
||||
}
|
||||
|
||||
function keywordForm ()
|
||||
function keywordForm ($string)
|
||||
{
|
||||
?><FORM name="bystring" method="get" action="/old_news.php"><?
|
||||
tableBoxHeader ('black', tableHeadColor);
|
||||
|
@ -111,7 +116,9 @@
|
|||
<STRONG>String:</STRONG>
|
||||
</TD>
|
||||
<TD align="center">
|
||||
<INPUT name="string" type="text" size="25">
|
||||
<?
|
||||
printf ("<INPUT name=\"string\" type=\"text\" size=\"25\" value=\"%s\">", $string);
|
||||
?>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR vAlign="middle">
|
||||
|
|
4
news.php
4
news.php
|
@ -10,12 +10,12 @@
|
|||
<TABLE width="50%" cellSpacing="2" cellPadding="0" border="0">
|
||||
<TR vAlign="top">
|
||||
<TD align="center">
|
||||
<? monthForm (); ?>
|
||||
<? monthForm ("", ""); ?>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR vAlign="top">
|
||||
<TD align="center">
|
||||
<? keywordForm (); ?>
|
||||
<? keywordForm (""); ?>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
|
12
old_news.php
12
old_news.php
|
@ -2,11 +2,21 @@
|
|||
$pageName = 'News Archives';
|
||||
$focused = "none"; // Dock icon name to get a border
|
||||
require "parts/preamble.php"; // Load most of document
|
||||
need ("news");
|
||||
?>
|
||||
<TABLE width="100%" cellSpacing="2" cellPadding="0" border="0">
|
||||
<TR vAlign="top">
|
||||
<TD align="center" width="50%"><?
|
||||
monthForm ($month, $year);
|
||||
?></TD>
|
||||
<TD align="center" width="50%"><?
|
||||
keywordForm ($string);
|
||||
?></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<TABLE width="100%" cellSpacing="0" cellPadding="0" border="0">
|
||||
<TR vAlign="top">
|
||||
<TD align="center"><?
|
||||
need ("news");
|
||||
tableBoxHeader (featureBgColor, featureHeadColor);
|
||||
tableTitle ($pageName, 1, featureHeadColor);
|
||||
if ($month || $year) {
|
||||
|
|
Loading…
Reference in a new issue