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'
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
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&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" ? 0 : 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&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, $largeimg, 0, 0, 0, 0, 128, $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&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&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>
--
-- 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
Comment