Permalink
Browse files

fix some bugs from replacing global calls with statics

  • Loading branch information...
1 parent 9c3ab95 commit cff008c0047beaa22ef0d88ec6fafff99f87262a @rwchhs rwchhs committed Aug 9, 2014
Showing with 16 additions and 13 deletions.
  1. +2 −2 admin_iplog.php
  2. +2 −2 admin_members.php
  3. +2 −1 index.php
  4. +1 −1 newpost.php
  5. +2 −2 profile.php
  6. +2 −2 showmembers.php
  7. +5 −3 viewforum.php
View
@@ -55,7 +55,7 @@
$p = MiscFunctions::createPageNumbers($_GET['page'], $num_pages, $_SERVER['QUERY_STRING']);
-echo pagination($p,$_GET['page'],$num_pages);
+echo MiscFunctions::pagination($p,$_GET['page'],$num_pages);
echo "<div style='clear:both;'></div>
@@ -116,7 +116,7 @@
</tr>";
}
MiscFunctions::echoTableFooter(SKIN_DIR);
-echo pagination($p,$_GET['page'],$num_pages);
+echo MiscFunctions::pagination($p,$_GET['page'],$num_pages);
require_once("./includes/footer.php");
?>
View
@@ -561,7 +561,7 @@
$num_pages = ceil(($c + 1) / $_CONFIG["topics_per_page"]);
$p = MiscFunctions::createPageNumbers($_GET["page"], $num_pages, $_SERVER['QUERY_STRING']);
- echo pagination($p,$_GET['page'],$num_pages);
+ echo MiscFunctions::pagination($p,$_GET['page'],$num_pages);
echo "<div id='tabstyle_2'>
<ul>
@@ -650,7 +650,7 @@
<td class='area_1' style='text-align:center;font-weight:bold;padding:12px;line-height:20px;' colspan='10'>An <i>italized</i> e-mail states that this member has chosen to have his/her email address non-viewable to all but admins.</td>
</tr>";
MiscFunctions::echoTableFooter(SKIN_DIR);
- echo pagination($p,$_GET['page'],$num_pages);
+ echo MiscFunctions::pagination($p,$_GET['page'],$num_pages);
}
require_once("./includes/footer.php");
?>
View
@@ -192,7 +192,8 @@
echo "
</ul>
</div>
- <div style='clear:bMiscFunctions::echoTableHeading(hoTableHeading("Community Information", $_CONFIG);
+ <div style='clear:both;'></div>";
+MiscFunctions::echoTableHeading("Community Information", $_CONFIG);
echo "
<tr>
<th>Users online in the last 15 minutes: $whos_t</th>
View
@@ -278,7 +278,7 @@
echo "
<form action='newpost.php?id=".$_GET["id"]."&t=".$_GET["t"]."&quote=".$_GET["quote"]."&t_id=".$_GET["t_id"]."&page=".$_GET["page"]."' method='POST' name='newentry' enctype='multipart/form-data' onSubmit='return validate_$check();'>
<input type='hidden' name='a' value='1'>";
- MiscFunctions::MiscFunctions::echoTableHeading(str_replace($_CONFIG["where_sep"], $_CONFIG["table_sep"], $where), $_CONFIG);
+ MiscFunctions::echoTableHeading(str_replace($_CONFIG["where_sep"], $_CONFIG["table_sep"], $where), $_CONFIG);
echo "
<tr>
<td class='area_1' style='padding:8px;'><strong>User Name:</strong></td>
View
@@ -177,7 +177,7 @@
$customs[] = array($custom[0]['value'],$rec[0]["custom_profile$i"]);
}
- echoTableHeading("Viewing profile for ".$rec[0]["user_name"]."", $_CONFIG);
+ MiscFunctions::echoTableHeading("Viewing profile for ".$rec[0]["user_name"]."", $_CONFIG);
echo "
<tr>
<td colspan='2' id='topcontent'>
@@ -392,7 +392,7 @@
MiscFunctions::echoTableFooter(SKIN_DIR);
$custom_avatar = (($rec[0]['posts'] >= $_REGIST['newuseravatars'] || $_COOKIE['power_env'] > 1) && $_REGIST['custom_avatars']);
- echoTableHeading("Avatar Options", $_CONFIG);
+ MiscFunctions::echoTableHeading("Avatar Options", $_CONFIG);
echo "
<tr>
<th style='text-align:center;'>Current avatar</th>
View
@@ -20,7 +20,7 @@
$num_pages = ceil(($c + 1) / $_CONFIG["topics_per_page"]);
$p = MiscFunctions::createPageNumbers($_GET["page"], $num_pages, $_SERVER['QUERY_STRING']);
- echo pagination($p,$_GET['page'],$num_pages);
+ echo MiscFunctions::pagination($p,$_GET['page'],$num_pages);
MiscFunctions::echoTableHeading(str_replace($_CONFIG["where_sep"], $_CONFIG["table_sep"], $where), $_CONFIG);
echo "
@@ -71,7 +71,7 @@
}
}
MiscFunctions::echoTableFooter(SKIN_DIR);
- echo pagination($p,$_GET['page'],$num_pages);
+ echo MiscFunctions::pagination($p,$_GET['page'],$num_pages);
} else {
echo "<div class='alert'><div class='alert_text'>
<strong>Access Denied!</strong></div><div style='padding:4px;'>you are not authorized to be here.</div></div>";
View
@@ -8,7 +8,7 @@
if (!isset($_GET["id"]) || !is_numeric($_GET["id"])) MiscFunctions::exitPage(str_replace('__TITLE__', "Invalid Forum", str_replace('__MSG__', ALERT_GENERIC_MSG, ALERT_MSG)), true);
$fRec = $tdb->get("forums", $_GET["id"]);
-if(emMiscFunctions::exitPage([0])) exitPage(str_replace('__TITLE__', "Forum Does Not Exist", str_replace('__MSG__', ALERT_GENERIC_MSG, ALERT_MSG)), true);
+if(empty($fRec[0])) MiscFunctions::exitPage(str_replace('__TITLE__', "Forum Does Not Exist", str_replace('__MSG__', ALERT_GENERIC_MSG, ALERT_MSG)), true);
$access = false;
if($tdb->is_logged_in() == false)
@@ -24,9 +24,11 @@
{
$access = true;
}
-MiscFunctions::exitPage(cess == false)
+}
+
+if($access == false)
{
- exitPage(str_replace('__TITLE__', "Permission Denied", str_replace('__MSG__', "You do not have enough Power to view this forum.<br>".ALERT_GENERIC_MSG, ALERT_MSG)), true);
+ MiscFunctions::exitPage(str_replace('__TITLE__', "Permission Denied", str_replace('__MSG__', "You do not have enough Power to view this forum.<br>".ALERT_GENERIC_MSG, ALERT_MSG)), true);
}
$posts_tdb = new Posts(DB_DIR."/", "posts.tdb");

0 comments on commit cff008c

Please sign in to comment.