Forums / WEB Development
TL;DR · summary of 23 replies
Removing all globals which are used more than three times should be done in core.php. Adding mysql_real_escape_string() to user inputs to prevent SQL injection. Updating session handling from URL parameters to $_SESSION for better security and preventing session hijacking. Checking if users are allowed to create sessions on login page, not every page.
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
Sort replies:
Oldest
Top voted
Newest
stefan998 wrote:
Does anyone knows how to protect admin from banning
Take away there admin rights? - banning is the least of your worries that an admin can do in wapdesire script - A Simple html form modification and your admin can make them selfs owners lol
stefan998 wrote:
Does anyone knows how to protect admin from banning
use this code in admnproc inside $action==ipban
$uid = getuid_sid($sid);
$perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
$trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));
if($trgtperm>$perm){
echo "<b><img src="../images/notok.gif" alt="x"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
echo "<br/>U Cannot Ip-ban $user<br/>";
echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "</p>";
}else
{
your other codes goes here
}
WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!
WA
thunderwap wrote:
use this code in admnproc inside $action==ipban
$uid = getuid_sid($sid);
$perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
$trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));
if($trgtperm>$perm){
echo "<b><img src="../images/notok.gif" alt="x"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
echo "<br/>U Cannot Ip-ban $user<br/>";
echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "</p>";
}else
{
your other codes goes here
}
let me fix your code
$uid = getuid_sid($sid);
$perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
$trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));
if($trgtperm[0]>$perm[0]){
echo "<b><img src="../images/notok.gif" alt="x"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
echo "<br/>U Cannot Ip-ban $user<br/>";
echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "</p>";
}else
{
your other codes goes here
}
remember that you are calling an array not a string 🙂
MA
Its been long i coded a mobile site, whats the best mobile script now can some one please help me