aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/functions/functions.php42
-rw-r--r--phpBB/index.php2
-rw-r--r--phpBB/page_tail.php5
-rw-r--r--phpBB/templates/Default/overall_header.tpl2
4 files changed, 49 insertions, 2 deletions
diff --git a/phpBB/functions/functions.php b/phpBB/functions/functions.php
index 30356ff148..941ccd0e22 100644
--- a/phpBB/functions/functions.php
+++ b/phpBB/functions/functions.php
@@ -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);
+}
+
?>
diff --git a/phpBB/index.php b/phpBB/index.php
index 0ac1a4847a..86e191a328 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -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);
diff --git a/phpBB/page_tail.php b/phpBB/page_tail.php
index 1e9155cb9c..b9d2c60548 100644
--- a/phpBB/page_tail.php
+++ b/phpBB/page_tail.php
@@ -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.
diff --git a/phpBB/templates/Default/overall_header.tpl b/phpBB/templates/Default/overall_header.tpl
index 49447470f1..6df9d90685 100644
--- a/phpBB/templates/Default/overall_header.tpl
+++ b/phpBB/templates/Default/overall_header.tpl
@@ -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">