I have started new script on community similar to prodigits but i need some help
i think it is very little error but i missed it so please help
if($way(staff($u)){
if($way[ghost]==0){
echo "<br /> <a href="$allow?a=$a&ref=$ref&ghost=on">H ide me</a>|";
}else{
echo "<br /><a href="$allow?a=$a&ref=$ref&ghost=off"> Show Me</a>|";
}
}
=================================
my function for ghost mode for staff is
function ghost($act){
global $u;
if($act=="on"){
$value = 1;
}else{
$value = 0;
}
$info = mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='".$u."'"));
if(staff($u)){
$res = mysql_query("UPDATE users SET
hidden='".$value."'
WHERE id='".$u."'");
if($res){
if($act=="on"){
mysql_query("DELETE FROM online WHERE user='".$u."'");
}
$ret = "<span class="spansuccess">You are Invisible now</span><br />";
}else{
$ret = errorSQL();
}
}else{
$ret = "<span class="spanfailed">Don't have a permission to continue.</span><br />";
}
return $ret;
}
the error which i am getting is Hide me option showing on page but as one staff opted for hide that show me is not shoing for them
is there any error? or should i use else if there?
i think it is very little error but i missed it so please help
if($way(staff($u)){
if($way[ghost]==0){
echo "<br /> <a href="$allow?a=$a&ref=$ref&ghost=on">H ide me</a>|";
}else{
echo "<br /><a href="$allow?a=$a&ref=$ref&ghost=off"> Show Me</a>|";
}
}
=================================
my function for ghost mode for staff is
function ghost($act){
global $u;
if($act=="on"){
$value = 1;
}else{
$value = 0;
}
$info = mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='".$u."'"));
if(staff($u)){
$res = mysql_query("UPDATE users SET
hidden='".$value."'
WHERE id='".$u."'");
if($res){
if($act=="on"){
mysql_query("DELETE FROM online WHERE user='".$u."'");
}
$ret = "<span class="spansuccess">You are Invisible now</span><br />";
}else{
$ret = errorSQL();
}
}else{
$ret = "<span class="spanfailed">Don't have a permission to continue.</span><br />";
}
return $ret;
}
the error which i am getting is Hide me option showing on page but as one staff opted for hide that show me is not shoing for them
is there any error? or should i use else if there?
Comment