hello
i m getting error in vip members coding.i used this code bu it does not shows in user profile like millionaire,lover,prince,princess etc but it is successfully updated when i make any user as vip from ownercp.bu do not shows in user profile.help me please to fix it
thank you
ownercp
core
ownerproc.php
i m getting error in vip members coding.i used this code bu it does not shows in user profile like millionaire,lover,prince,princess etc but it is successfully updated when i make any user as vip from ownercp.bu do not shows in user profile.help me please to fix it
thank you
ownercp
PHP Code:
////////////////////////////////////////////
else if($action=="chubi")
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$who = $_GET["who"];
$unick = getnick_uid($who);
$avat = getavatar($who);
$email = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$who."'"));
$bdy = mysql_fetch_array(mysql_query("SELECT birthday FROM ibwf_users WHERE id='".$who."'"));
$uloc = mysql_fetch_array(mysql_query("SELECT location FROM ibwf_users WHERE id='".$who."'"));
$usig = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$who."'"));
$sx = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$who."'"));
$perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$who."'"));
$specialid = mysql_fetch_array(mysql_query("SELECT specialid FROM ibwf_users WHERE id='".$who."'"));
if($unick=="admin"){
echo "<p align=\"center\">";
echo "<strong>YOU ARE EDITING A CRITICAL STAFF MEMBERS PROFILE. <br/>";
echo "PLEASE BE AWARE IF THIS USER IS RE-MOVED FROM OWNER STATUS YOUR SITE WILL BE AUTOMATICLY DISABLED INSTANTLY</strong>";
echo "</p>";
}
echo "<p align=\"center\">";
echo "<form action=\"ownrproc.php?action=uprof&sid=$sid&who=$who\" method=\"post\">";
echo "Nickname: <input name=\"unick\" value=\"$unick\" maxlength=\"15\"/><br/>";
echo "Profile Pic: <input name=\"savat\" value=\"$avat\" maxlength=\"100\"/><br/>";
echo "E-Mail: <input name=\"semail\" value=\"$email[0]\" maxlength=\"100\"/><br/>";
echo "Birthday<small>(YYYY-MM-DD)</small>: <input name=\"ubday\" value=\"$bdy[0]\" maxlength=\"50\"/><br/>";
echo "Location: <input name=\"uloc\" value=\"$uloc[0]\" maxlength=\"50\"/><br/>";
echo "Info: <input name=\"usig\" value=\"$usig[0]\" maxlength=\"100\"/><br/>";
echo "Sex: <select name=\"usex\" value=\"$sx[0]\">";
echo "<option value=\"M\">Male</option>";
if($sx[0]=="F"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"F\"$selected>Female</option>";
echo "</select><br/>";
echo "Privileges: <select name=\"perm\" value=\"$perm[0]\">";
echo "<option value=\"0\">Normal</option>";
if($perm[0]=="1"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"1\"$selected>Moderator</option>";
if($perm[0]=="2"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"2\"$selected>Admin</option>";
if($perm[0]=="3"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"3\"$selected>Head Admin</option>";
if($perm[0]=="4"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"4\"$selected>Owner</option>";
echo "</select><br/>";
echo "VIP: <select name=\"specialid\" value=\"$specialid[0]\">";
echo "<option value=\"0\">Normal</option>";
if($perm[0]=="5"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"5\">Special User</option>";
if($perm[0]=="6"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"6\">Coder</option>";
if($perm[0]=="7"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"7\">Security Member</option>";
if($perm[0]=="8"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"8\">Powerful Member</option>";
if($perm[0]=="9"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"9\">Quiz Masterz</option>";
if($perm[0]=="10"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"10\">Millionaires</option>";
if($perm[0]=="11"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"11\">Prince</option>";
if($perm[0]=="12"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"12\">Princess</option>";
if($perm[0]=="13"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"13\">Lover</option>";
echo "</select><br/>";
echo "<input type=\"Submit\" Name=\"Submit\" Value=\"Update\"></form>";
echo "<br/><br/>";
echo "<form action=\"ownrproc.php?action=upwd&sid=$sid&who=$who\" method=\"post\">";
echo "Password: <input name=\"npwd\" style=\"-wap-input-format: '*x'\" maxlength=\"15\"/><br/>";
echo "<input type=\"Submit\" Name=\"Submit\" Value=\"Change\"></form>";
echo "</p>";
echo "<p align=\"center\">";
echo "<b>8 </b><a accesskey=\"8\" href=\"ownercp.php?action=chuinfo&sid=$sid\">Users Info</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
core
PHP Code:
/////////////////////////////////////////get status
function getstatus($uid)
{
$info= mysql_fetch_array(mysql_query("SELECT perm, specialid, plusses FROM ibwf_users WHERE id='".$uid."'"));
if(isbanned($uid))
{
return "Banned!";
}
if($info[0]=='4')
{
return "<b>OWNER</b>";
}else if($info[0]=='3')
{
return "<b>HEAD-ADMIN</b>";
}else if($info[0]=='2')
{
return "<b>ADMIN</b>";
}else if($info[0]=='1')
{
return "<b>MODERATOR</b>";
}
else if($info[2]=='5')
{
return "<b><big>Special User!</big></b>";
}
else if($info[2]=='6')
{
return "<b><big>Coder!</big></b>";
}
else if($info[2]=='7')
{
return "<b><big>Security Member!</big></b>";
}
else if($info[2]=='8')
{
return "<b><big>Powerful Member!</big></b>";
}
else if($info[2]=='9')
{
return "<b><big>Quiz Masterz!</big></b>";
}
else if($info[2]=='10')
{
return "<b><big>Millionaires!</big></b>";
}
else if($info[2]=='11')
{
return "<b><big>Prince!</big></b>";
}
else if($info[2]=='12')
{
return "<b><big>Princess!</big></b>";
}
else if($info[2]=='13')
{
return "<b><big>Lover!</big></b>";
}
else{
if($info[1]<10)
{
return "Member";
}else if($info[1]<25)
{
return "Member";
}else if($info[1]<50)
{
return "Member";
}else if($info[1]<75)
{
return "Member";
}else if($info[1]<250)
{
return "Member";
}else if($info[1]<500)
{
return "Member";
}else if($info[1]<750)
{
return "Member";
}else if($info[1]<1000)
{
return "Member";
}else if($info[1]<1500)
{
return "Member";
}else if($info[1]<2000)
{
return "Member";
}else if($info[1]<2500)
{
return "Member";
}else if($info[1]<3000)
{
return "Member";
}else if($info[1]<4000)
{
return "Member";
}else if($info[1]<5000)
{
return "Member";
}else if($info[1]<10000)
{
return "Member";
}else
{
return "Member";
}
}
}
ownerproc.php
PHP Code:
//////////////////////////edit profile//////////////////////////
else if($action=="uprof")
{
$who = $_GET["who"];
$unick = $_POST["unick"];
$perm = $_POST["perm"];
$savat = $_POST["savat"];
$semail = $_POST["semail"];
$ubday = $_POST["ubday"];
$uloc = $_POST["uloc"];
$usig = $_POST["usig"];
$usex = $_POST["usex"];
$specialid = $_POST["specialid"];
$user = getnick_uid($who);
echo "<head>";
echo "<title>Admin Tools</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$onk = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$who."'"));
$exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name='".$unick."'"));
if($onk[0]!=$unick)
{
if($exs[0]>0)
{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>New nickname already exist, choose another one<br/>";
}else
{
$res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', sex='".$usex."', name='".$unick."',specialid='".$specialid."', perm='".$perm."' WHERE id='".$who."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>$unick's profile was updated successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Error updating $unick's profile<br/>";
}
}
}else
{
$res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', sex='".$usex."', name='".$unick."',specialid='".$specialid."', perm='".$perm."' WHERE id='".$who."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>$unick's profile was updated successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Error updating $unick's profile<br/>";
}
}
echo "<br/><b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=chuinfo&sid=$sid\">Users Info</a><br/>";
echo "<br/><b>9 </b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
Comment