Small SQL Banned User Tab Help

Status
Not open for further replies.

WanknessHD

Hardcore Habboer
Jun 13, 2011
48
5
So I wanna make it so when a user is banned they can sign in but they see a "ban appeals" tab so they can submit a ban appeal and what not.

PHP:
<?php
                    if(isset($_SESSION['user']['id']))
                    if(mysql_result(mysql_query("SELECT value FROM bans WHERE value = '" . $_SESSION['user']['id'] . "'"), 0) <= 1)                    {
                    echo '<li id="tab-register-now"><a href="{url}/ase/login">Ban Apeals</a><span></span></li>';
                    }
                    ?>

With this I got it to work, but it shows it for everyone, Im trying to make it user specific when the person is banned. I was thinking that checktheban could come to use but I would have no clue how to implement that into this. eventually I was planning to when theyre banned remove the enter hotel button and I will add a code to the client preventing them from entering the client.

Im not very educated in php/sql so I am unable to figure it out myself, thanks in advanced if someone can help.
 

RyanzRetros

Developer of ChakCMS
Jan 14, 2015
978
182
I would edit the banned page and add a button on there. That way it stops users from being able to access the site and then just don't include a ban check script on the ban appeal pages

Example HTML:
HTML:
<p class='appeal-text'>If you feel you have been banned unreasonably, please click the button below to appeal your ban.</p>

<a href='/banned/appeal' style='color:inherit; text-decoration:none;'><div class='appeal-button'>Appeal Ban</div>
</a>

Example CSS:
Code:
.appeal-text{
  font-size: 16px;
  font-color: #e1e1e1;
  padding: 10px 20px;
  /* Position this - I do not know what your site looks like */
}

.appeal-button{
  background-color: #007500;
  font-size: 18px;
  height: 60px;
  width: 180px;
  border: 2px solid #009E00;
  /* Again, you can position this - PM me if you need help with this. */
}
.appeal-button:hover{
  background-color: #009E00;
}
 

RyanzRetros

Developer of ChakCMS
Jan 14, 2015
978
182
Alright that makes a load of sense, the only problem is I dont have a banned page, and my checktheban is not working.. hmm I can try to find one.
Many CMS' released, find a ban page from there and just copy the CSS files if needed.

Checktheban.php can also be taken from another CMS, otherwise hit me up and I will help with that.
 

RyanzRetros

Developer of ChakCMS
Jan 14, 2015
978
182
Alright, Im stupid @RyanRetros I do have a banned page, but my checktheban is not working, I have never dealt with a banned page in my life.
That's fine, try replacing the checktheban with a different one, otherwise post the code and we'll try to find the error.

And for a suggestion of ban page if you wish to change yours: (Dunno if the images on Imgur still work, will have to test :p)
 

WanknessHD

Hardcore Habboer
Jun 13, 2011
48
5
So I fixed it, when I go to sign in it takes me to ban page, but my ban page has a redirect error on it for some reason.
 
Changed banned pages and now it working fine, will just have to edit it and make it looks nice.
 
Status
Not open for further replies.

Users who are viewing this thread

Top