Skip to content

Commit

Permalink
Merge pull request #6 from paintballrefjosh/4.0.0-bug-fixes
Browse files Browse the repository at this point in the history
4.0.0 bug fixes
  • Loading branch information
paintballrefjosh authored Jan 22, 2017
2 parents a95eb8e + 89d9282 commit eae077a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inc/account/account.register.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function Register()
// @$Enter is the main input arrays into the SDL
$Enter = $Account->register(
array(
'username' => $_POST['r_login'],
'username' => strtoupper($_POST['r_login']),
'sha_pass_hash' => $Account->sha_password($_POST['r_login'],$_POST['r_pass']),
'sha_pass_hash2' => $Account->sha_password($_POST['r_login'],$_POST['r_cpass']),
'email' => $_POST['r_email'],
Expand Down
6 changes: 4 additions & 2 deletions inc/admin/template_files/admin.news.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
if(isset($_POST['subject']))
{
addNews($_POST['subject'],$_POST['message'],$user['username']);
addNews($_POST['subject'],$_POST['message'],$user['id']);
}
?>
<div class="content-header">
Expand Down Expand Up @@ -63,7 +63,6 @@
{
if(isset($_GET['id']))
{
$content = $DB->selectRow("SELECT * FROM `mw_news` WHERE `id`='".$_GET['id']."'");
if(isset($_POST['delete']))
{
delNews($_POST['id']);
Expand All @@ -72,6 +71,9 @@
{
editNews($_POST['id'],$_POST['editmessage']);
}

$content = $DB->selectRow("SELECT * FROM `mw_news` WHERE `id`='".$_GET['id']."'");

?>
<div class="content-header">
<h4><a href="?p=admin">Main Menu</a> / <a href="?p=admin&sub=news">News</a> / Edit News</h4>
Expand Down
5 changes: 4 additions & 1 deletion templates/blizzlike/frontpage/frontpage.index.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
{
$hl='alt';
}

$posted_by = $DB->selectRow("SELECT username FROM account WHERE id = '".$topic['posted_by']."'");

?>
<script type="text/javascript">
var postId<?php echo $postnum; ?>="<?php echo $topic['id'];?>";
Expand All @@ -67,7 +70,7 @@
<h1>
<a href="javascript:dummyFunction();"><?php echo $topic['title'];?></a>
</h1>
<span class="user">Posted by: <b><?php echo $topic['posted_by'];?></b>|</span>&nbsp;<span class="posted-date">
<span class="user">Posted by: <b><?php echo ucwords(strtolower($posted_by['username']));?></b>|</span>&nbsp;<span class="posted-date">
<?php echo date('d-m-Y',$topic['post_time']);?>
</span>
</li>
Expand Down

0 comments on commit eae077a

Please sign in to comment.