help error update profile

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    help error update profile

    Hi all, in my lavalair can't change my profile, says error in genproc .phpbut if I edit the user profile from the Panel owner does change: (I don't understand where I am wrong: (here are the code and the DB table 'user'
    PHP Code:
    echo "<head>";
    echo 
    "<title>$sitename</title>";
    echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo 
    "</head>";
    echo 
    "<body>";
    echo 
    "<p align=\"center\">";
    //$uid = getuid_sid($sid);
    $res mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', one='".$one."', two='".$two."', three='".$three."', four='".$four."', five='".$five."', six='".$six."', sex='".$usex."' WHERE id='".$uid."'");
    if(
    $res)
    {
    echo 
    "<img src=\"../images/ok.gif\" alt=\"o\"/>Tuo profilo aggiornato con successo
    "
    ;
    }else{
    echo 
    "<img src=\"../images/notok.gif\" alt=\"x\"/>Errore aggiornamento del tuo profilo
    "
    ;
    }
    echo 
    "
    <a href=\"index.php?action=main&amp;sid=
    $sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    echo 
    "</p></body>";
    }




    //////////////////////////////////////////Update profile

    else if($action=="shsml")

    {

        
    addonline(getuid_sid($sid),"sta Aggiornando gli Smilies","");

        
    $act $_GET["act"];

        
    $acts = ($act=="dis" 1);

          echo 
    "<head>";

          echo 
    "<title>$sitename</title>";

          echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

          echo 
    "</head>";

          echo 
    "<body>";

      echo 
    "<p align=\"center\">";

      
    //$uid = getuid_sid($sid);

      
    $res mysql_query("UPDATE ibwf_users SET hvia='".$acts."' WHERE id='".$uid."'");

      if(
    $res)

      {

        echo 
    "<img src=\"../images/ok.gif\" alt=\"o\"/>Smiles Visibili aggiornati con successo<br/>";

      }else{

        echo 
    "<img src=\"../images/notok.gif\" alt=\"x\"/>Errore aggiornamento del tuo profilo<br/>";

      }

      echo 
    "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";

      echo 
    "</p></body>";

    }


    ////////////////Upload avatar////////////////////////


    else if($action=="upavat"){

    addonline(getuid_sid($sid),"Uploading avatar image","");

    $size $_FILES['attach']['size']/1024;

    $origname $_FILES['attach']['name'];

    $res false;

    $ext explode("."strrev($origname));

    switch(
    strtolower($ext[0])){

            case 
    "gpj":

        
    $res true;

        break;

        case 
    "gepj":

        
    $res true;

        break;

    }

    $tm time();

    $uploaddir "./avatars";

    if(
    $size>512){

        echo 
    "File is larger than 512KB";

        

    }

    else if (
    $res!=true){

                                        

        echo 
    "Tipo file non supportato usa solo JPG/JPEG.";

    }



    else{

        
    $name getuid_sid($sid);

        
    $uploadfile $name.".".$ext;

        
    $uppath=$uploaddir."/".$uploadfile;

        
    move_uploaded_file($_FILES['attach']['tmp_name'], $uppath);

        
    $filewa=$uppath;

        list(
    $width$height$type$attr) = getimagesize($filewa);

        
    $newname=$uploaddir."/".$name."u.jpg";

        
    $newheight = ($height*128)/$width;

        
    $newimg=imagecreatetruecolor(128$newheight);

        
    $largeimg=imagecreatefromjpeg($filewa);

        
    imagecopyresampled($newimg$largeimg0000128$newheight$width$height);

        
    imagejpeg($newimg$newname);

        
    imagedestroy($newimg);

        
    imagedestroy($largeimg);

        
    $file1=$name."u.jpg";

        
    unlink($filewa);

            
    $res1 mysql_query("UPDATE ibwf_users SET avatar='./avatars/$file1' WHERE id='".$name."'");

    }

    if(
    $res1){

        echo 
    "il tuo file $origname e' stato caricato con successo nel tuo profilo!";

    }

    else {

        echo 
    "File couldn't be processed! Check error messages and report to a moderator or admin if applicable.";

    }

      echo 
    "<br/><br/><b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo 
    "</p></body>";

    }
    //////////////////////////////////////////Change Password



    else if($action=="upwd")

    {

      
    addonline(getuid_sid($sid),"sta cambiando la sua Password","");

      
    $opwd $_POST["opwd"];

      
    $npwd $_POST["npwd"];

      
    $cpwd $_POST["cpwd"];

      
    $pwd mysql_fetch_array(mysql_query("SELECT pass FROM ibwf_users WHERE id='".$uid."'"));

      
    $epwd md5($opwd);

      echo 
    "<head>";

      echo 
    "<title>$sitename</title>";

      echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

      echo 
    "</head>";

      echo 
    "<body>";

      echo 
    "<p align=\"center\">";

      
    //$uid = getuid_sid($sid);

      
    if($npwd!=$cpwd)

      {

      echo 
    "<img src=\"../images/notok.gif\" alt=\"x\"/>Conferma la tua password e password non corrisponde <br/>";

      }else if(
    $epwd!=$pwd[0]){

      echo 
    "<img src=\"../images/notok.gif\" alt=\"x\"/>La tua vecchia password non รจ corretta <br/>";

      }else if((
    strlen($npwd)<3) || (strlen($npwd)>30)){

      echo 
    "<img src=\"../images/notok.gif\" alt=\"x\"/>La tua password deve essere tra 3 e 30 caratteri<br/>";

      }else{

        
    $pwd md5($npwd);

        
    $res mysql_query("UPDATE ibwf_users SET pass='".$pwd."' WHERE id='".$uid."'");

        if(
    $res)

      {

        echo 
    "<img src=\"../images/ok.gif\" alt=\"o\"/>La tua password aggiornata con successo<br/>";

      }else{

        echo 
    "<img src=\"../images/notok.gif\" alt=\"x\"/>Errore aggiornamento password<br/>";

      }

      }

      echo 
    "<br/><b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";

      echo 
    "</p></body>";

    }

    else{

          echo 
    "<head>";

          echo 
    "<title>$sitename</title>";

          echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

          echo 
    "</head>";

          echo 
    "<body>";

      echo 
    "<p align=\"center\">";


      echo 
    "</p></body>";

    }

    ?>

    </html> 
    this my table:
    --
    -- Struttura della tabella `ibwf_users`
    --

    CREATE TABLE IF NOT EXISTS `ibwf_users` (
    `id` int(100) NOT NULL auto_increment,
    `name` varchar(30) NOT NULL default '',
    `pass` varchar(60) NOT NULL default '',
    `pass2` varchar(50) NOT NULL default '',
    `birthday` varchar(50) NOT NULL default '',
    `sex` char(1) NOT NULL default '',
    `location` varchar(100) NOT NULL default '',
    `perm` varchar(10) NOT NULL default '0',
    `posts` int(100) NOT NULL default '0',
    `totin` int(100) NOT NULL default '0',
    `totout` int(100) NOT NULL default '0',
    `plusses` int(100) NOT NULL default '700',
    `signature` varchar(100) NOT NULL default '',
    `avatar` varchar(100) NOT NULL default '',
    `email` varchar(50) NOT NULL default '',
    `browserm` varchar(50) NOT NULL default '',
    `ipadd` varchar(30) NOT NULL default '',
    `lastact` int(100) NOT NULL default '0',
    `regdate` int(100) NOT NULL default '0',
    `chmsgs` int(100) NOT NULL default '0',
    `chmood` int(100) NOT NULL default '0',
    `shield` char(1) NOT NULL default '0',
    `gplus` int(100) NOT NULL default '700',
    `budmsg` varchar(100) NOT NULL default '',
    `lastpnreas` varchar(100) NOT NULL default '',
    `lastplreas` varchar(100) NOT NULL default '',
    `shouts` int(100) NOT NULL default '0',
    `pollid` int(100) NOT NULL default '0',
    `rbcid` varchar(255) NOT NULL default '',
    `hvia` char(1) NOT NULL default '1',
    `lastvst` int(100) NOT NULL default '0',
    `battlep` int(100) NOT NULL default '700',
    `popmsg` char(1) NOT NULL default '1',
    `automsgs` char(1) NOT NULL default '1',
    `validated` char(1) NOT NULL default '0',
    `theme` varchar(100) NOT NULL default 'white_medium.css',
    `hidden` char(1) NOT NULL default '0',
    `quiz_score` varchar(20) NOT NULL default '0',
    `quiz_easy` char(3) NOT NULL default 'no',
    `quiz_medium` char(3) NOT NULL default 'no',
    `quiz_hard` char(3) NOT NULL default 'no',
    `total_score` varchar(10) NOT NULL default '0',
    `one` int(3) NOT NULL default '0',
    `two` int(3) NOT NULL default '0',
    `three` int(3) NOT NULL default '0',
    `four` int(3) NOT NULL default '0',
    `five` int(3) NOT NULL default '0',
    `six` int(3) NOT NULL default '0',
    `invites` int(100) NOT NULL default '0',
    `otime` int(100) NOT NULL default '0',
    `mtime` int(100) NOT NULL default '0',
    PRIMARY KEY (`id`),
    UNIQUE KEY `name` (`name`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=33 ;

    --
    -- Dump dei dati per la tabella `ibwf_users`
    --
    some one can fix this please? thanx

    #2
    what line is the error .
    Wapchat4u


    Topsites4u

    Comment


      #3
      There isn t error line, but when i update my profile a message sayd: error update profile

      Comment


        #4
        ah i see. make sure u got the stuff in the query that your trying to update .
        ie
        Code:
        [COLOR=#000000][COLOR=#0000BB]$res [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"UPDATE ibwf_users SET avatar='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$savat[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"', email='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$semail[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"', birthday='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$ubday[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"', location='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$uloc[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"', signature='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$usig[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"', one='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$one[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"', two='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$two[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"', three='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$three[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"', four='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$four[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"', five='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$five[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"', six='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$six[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"', sex='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$usex[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"' WHERE id='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$uid[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"'"[/COLOR][COLOR=#007700]);
         [/COLOR][/COLOR]
        if all of those are in the page of the update of profile for users then it should be ok .but sounds lke your trying to update something thats not in that line of code.
        Wapchat4u


        Topsites4u

        Comment


          #5
          put this at the top of the page:
          PHP Code:
          error_reporting  (E_ALL);
          ini_set ('display_errors'true); 
          so you can see an error message .... dont forget to remove it when the problem is fixed.

          Comment


            #6
            solved thanks a lot to those who helped me, thanks very much nclemale36 and thanks very much something l error was being repaired so in uprof

            PHP Code:
            //////////////////////////////////////////Update profile
            else if($action=="uprof")
            {
                
            addonline(getuid_sid($sid),"Sta nei settaggi","");
                
            $savat $_POST["savat"];
                
            $semail $_POST["semail"];
                
            $ubday $_POST["ubday"];
                
            $uloc $_POST["uloc"];
                
            $usig $_POST["usig"];
                
            $usex $_POST["usex"];
                  echo 
            "<head>";
                  echo 
            "<title>$sitename</title>";
                  echo 
            "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                  echo 
            "</head>";
                  echo 
            "<body>";
              echo 
            "<p align=\"center\">";
              
            //$uid = getuid_sid($sid);
              
            $res mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', sex='".$usex."' WHERE id='".$uid."'");
              if(
            $res)
              {
                echo 
            "<img src=\"../images/ok.gif\" alt=\"o\"/>Your profile was updated successfully<br/>";
              }else{
                echo 
            "<img src=\"../images/notok.gif\" alt=\"x\"/>Error updating your profile<br/>";
              }
              echo 
            "<br/><b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
              echo 
            "</p></body>";

            thanx

            Comment

            Working...
            X