1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-14 04:42:04 +02:00

*** empty log message ***

git-svn-id: file:///svn/phpbb/trunk@35 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
James Atkinson 2001-02-23 21:50:53 +00:00
parent 52544a7385
commit f8f5458de8
4 changed files with 49 additions and 2 deletions

View File

@ -73,4 +73,46 @@ function get_newest_user($db)
return($return_data);
}
}
function make_jumpbox($db, $phpEx)
{
$boxstring = "
<FORM ACTION=\"viewforum.$phpEx\" METHOD=\"GET\">
<SELECT NAME=\"forum_id\"><OPTION VALUE=\"-1\">Select Forum</OPTION>
";
$sql = "SELECT cat_id, cat_title FROM ".CATEGORIES_TABLE." ORDER BY cat_order";
$result = $db->sql_query($sql);
if($total_cats = $db->sql_numrows($result))
{
for($x = 0; $x < $total_cats; $x++)
{
$boxstring .= "<OPTION VALUE=\"-1\">&nbsp;</OPTION>\n";
$boxstring .= "<OPTION VALUE=\"-1\">".stripslashes($cat_rows[$x]["cat_title"])."</OPTION>\n";
$boxstring .= "<OPTION VALUE=\"-1\">----------------</OPTION>\n";
$cat_rows = $db->sql_fetchrowset($result);
$f_sql = "SELECT forum_name, forum_id FROM ".FORUMS_TABLE."
WHERE cat_id = ". $cat_rows[$x]["cat_id"] . " ORDER BY forum_id";
if($f_result = $db->sql_query($f_sql))
{
if($total_forums = $db->sql_numrows($f_result)) {
$f_rows = $db->sql_fetchrowset($f_result);
for($y = 0; $y < $total_forums; $y++)
{
$name = stripslashes($f_rows[$y]["forum_name"]);
$boxstring .= "<OPTION VALUE=\"".$f_rows[$y]["forum_id"]."\">$name</OPTION>\n";
}
}
}
}
}
else
{
$boxstring .= "<option value=\"-1\">No Forums to Jump to</option>\n";
}
$boxstring .= "</SELECT>\n<br><INPUT TYPE=\"SUBMIT\" VALUE=\"Jump\"></FORM>";
return($boxstring);
}
?>

View File

@ -24,11 +24,11 @@
include('extension.inc');
include('config.'.$phpEx);
include('template.inc');
include('functions/error.'.$phpEx);
include('functions/sessions.'.$phpEx);
include('functions/auth.'.$phpEx);
include('functions/functions.'.$phpEx);
include('db.'.$phpEx);
include('functions/error.'.$phpEx);
$total_users = get_user_count($db, $users_table);
$total_posts = get_total_posts($db, $forums_table);

View File

@ -28,6 +28,11 @@ switch($pagetype)
case 'index':
$template->pparse("output", "footer");
break;
case 'viewforum':
$jump_box = make_jumpbox($db, $phpEx);
$template->set_var(array("JUMPBOX" => $jump_box));
$template->pparse("output", "footer");
break;
}
// Show the overall footer.

View File

@ -50,7 +50,7 @@ A:Hover {
<tr>
<td bgcolor="#CCCCCC"><table width="100%" cellspacing="1" cellpadding="3" border="0">
<tr class="tablebody"><form method="POST" action="login.{PHPEX}">
<td align="left" valign="top"><img src="images/title.jpg" height="55" width="450"></td>
<td align="left" valign="top"><a href="index.php"><img src="images/title.jpg" height="55" width="450" border="0"></a></td>
<td align="right">Username : <input type="text" name="username"><br>Password : <input type="password" name="password"><br><input type="submit" value="Login"></td>
</tr></form>
<tr class="tablebody">