• User Attivo

    VIP utenti

    Ciao a tutti, quando vado a dare nel profilo una qualifica superore a un utente, mi si aggiorna correttamente, ma da errore nel profilo vip, e il suo status nel profilo rimane utente semplice
    ownercp.php
    [PHP]////////////////////////////////////////////

    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 * 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 "*: <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>";

    }[/PHP]
    ownerproc.php
    [PHP]//////////////////////////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."', *='".$usex."', name='".$unick."',specialid='".$specialid."', perm='".$perm."' WHERE id='".$who."'");
    if($res)
    {
    echo "<img src="../images/ok.gif" alt="o"/>$unick profilo aggiornato con successo<br/>";
    }else{
    echo "<img src="../images/notok.gif" alt="x"/>Errore profilo di $unick<br/>";
    }
    }
    }else
    {
    $res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', *='".$usex."', name='".$unick."',specialid='".$specialid."', perm='".$perm."' WHERE id='".$who."'");
    if($res)
    {
    echo "<img src="../images/ok.gif" alt="o"/>$unick profilo vip aggiornato con successo<br/>";
    }else{
    echo "<img src="../images/notok.gif" alt="x"/>errore profilo vip $unick<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>";
    }[/PHP]
    cosa c'è di sbagliato in questa query?
    [PHP]$res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', *='".$usex."', name='".$unick."',specialid='".$specialid."', perm='".$perm."' WHERE id='".$who."'");[/PHP]
    credo che sia qua il problema :mmm: