Version: , by BigJohnson
Developer Last Online: Jun 2004
Version: Unknown
Rating:
Released: 06-19-2002
Last Update: Never
Installs: 0
No support by the author.
Database error in vBulletin Control Panel 2.2.5:
Invalid SQL: INSERT INTO user (userid,usergroupid,username,password,email,stylei d,parentemail,coppauser,homepage,icq,aim,yahoo,sig nature,adminemail,receivebulletin,receivebulletin_ type,showemail,invisible,usertitle,customtitle,joi ndate,cookieuser,daysprune,lastvisit,lastactivity, lastpost,posts,storep,timezoneoffset,emailnotifica tion,receivepm,emailonpm,ipaddress,pmpopup,options ,birthday) VALUES (NULL,'9','Guest','adb831a7fdd83dd1e2a309ce7591dff 8','.com','1','None@none.com','0','http://.com','None','None','None','I am a Guest','0','0','0','0','Geust','1',1024525836,'0', '-1',1024525836,1024525836,1024525836,'0','0','0','0 ','0','0','','0','0','1986/10/13')
mysql error: Column count doesn't match value count at row 1
mysql error number: 1136
Date: Wednesday 19th of June 2002 06:30:36 PM
Script: /messageboard/admin/user.php
Referer: /messageboard/admin/user.php?action=add
I tried making a new user in the Admin section and this is what i got when i filled the info and i click send. What is wrong?
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I need this feature back fast because I always create peoples accounts through the admin cp and after a couple of hacks i think this happened. I dont no which hacks it could be because install like 50 so i cannot go back tracking through to see what is wrong. If you need my user.php file i will send it to you please help. Thanks so much. I need it badly. Thanks so much again.
You will be violating the licence agreement if you distribute user.php or any vB file. My suggestion is to reupload the original user.php file and see if that fixes the problem. If it does, then at least you'll know where the problem is.
It's also possible that your host upgrade PHP to 4.2.0/4.2.1 which also causes a problem similar to this. If that's the case, the only fix is to either upgrade to 2.2.6 or apply the tached files in freddie's post here:
This did not work. I cant upload the original USER.php file because i have installed so many hacks and i no that file has been edited. There has to be something else i can do to fix this. The mySQL error up top doesn't explain anything to you guys like what happened or what went wrong? and my php version is 4.1.0 and was never upgraded. Someone Please help me out.
I cant just add the new file because i need the upgrades i did for it. I will post pictures of the scripts instead in my PHP programer if that would work instead of actually posting the txt of the code if that is illegal. I really need all the stuff installed. I will do anything. I will take pictures of my database so you can see. What ever you need. PLease help me out.
You are missing a value in the second line between 'I am a Guest' and 'Geust'. You have five values in the first line between signature and title and only 4 values in the line below.
I see now. That makes. Sense. I am going to post some pics to see if this helps because i still don't know how to fix the problem. I would really like to send someone the user.php file for someone to look at. Is it breaking the rules even if the other person has a license and I do and you all know we have a license? Can i take pictures of the php script and post them here? Is that still considered against the license because I really need this fixed bad. This is the main part of the admin section to edit peoples stuff. Please help. I am going to post pics of my admin section where you add a user here are the pics. I don't know if this helps at all but i am trying to tell you all the info you want
Now here are some pictures of my database. If you need specific lines from the user.php file just ask. Thanks so much. You guys are all great for helping out.
HEre is some code i think that might help. This is a part of the code in the user.php
Please help me out.
PHP Code:
// ###################### Start add #######################
if ($action=="add") {
echo "Add New User";
doformheader("user","insert");
maketableheader("User Profile");
makechoosercode("User Group","usergroupid","usergroup",2);
makeinputcode("User Name","ausername");
makeinputcode("Password","apassword");
makeinputcode("Email Address","email");
makeinputcode("User Title","usertitle");
makeyesnocode("Use Custom Title<br><font size='1'>(This forces the title that you put in the field above to be used)</font>","customtitle",0);
makestylecode("Style set","userstyleid",$user[styleid]);
makeinputcode("Home Page","homepage","http://www.");
makeinputcode("Birthday<br>(Format yyyy-mm-dd)","birthday");
// Country Hack CP Addon by Stasik (modded by AJ)
echo "<tr class='".getrowbg()."'><td>Country Flag</td><td nowrap>";
eval("\$countrytext.= \"".gettemplate("modifyprofile_country")."\";");
echo "$countrytext</td></tr>";
// Country Hack CP Addon End
maketextareacode("Signature","signature","",8,45);
makeinputcode("ICQ Number","icq");
makeinputcode("AIM Handle","aim");
makeinputcode("Yahoo Messenger Handle","yahoo");
makeyesnocode("COPPA user","coppauser",0);
makeinputcode("Parent Email Address","parentemail");
maketableheader("Options");
makeyesnocode("Receive mailings from admins","adminemail",1);
makeyesnocode("Receive Community Bulletin Email","receivebulletin",1);
makeyesnocode("Receive Community Bulletin Email Type (Yes = HTML, No = Text)","receivebulletin_type",1);
makeyesnocode("Show email address","showemail",1);
makeyesnocode("Invisible on 'Online users' list","invisible",0);
makeyesnocode("Receive PMs","receivepm",1);
makeyesnocode("Email on PM","emailonpm",0);
makeyesnocode("PM Popup","pmpopup",0);
makeyesnocode("Show Signatures","showsignatures",1);
makeyesnocode("Show Avatars","showavatars",1);
makeyesnocode("Show Images","showimages",1);
makeyesnocode("Show VBcode","showvbcode",1);
makeyesnocode("Use email notification by default","emailnotification",1);
makeyesnocode("Remember Username and password","cookieuser",1);
makeyesnocode("Browse boards with cookies","nosessionhash",1);
makeinputcode("Join Date<br>(Format yyyy-mm-dd, leave blank for today)","joindate");
makeinputcode("Default view age<br>'Select threads from last x days'<br>Recommended values: 1, 2, 5, 10, 20, 30, 45, 60, 75, 100, 365, 1000 (ie all). -1 gives default forum selection","daysprune","-1");
makeinputcode("Last Visit<br>(Format yyyy-mm-dd hh:mm:ss, leave blank for today)","lastvisit");
makeinputcode("Last Activity<br>(Format yyyy-mm-dd hh:mm:ss, leave blank for today)","lastactivity");
makeinputcode("Last Post<br>(Format yyyy-mm-dd hh:mm:ss, leave blank for today)","lastpost");
makeinputcode("Number of Posts","posts","0");
makeinputcode("Number of Points","storep","0");
makeinputcode("Time Zone Offset (hours)","timezoneoffset","0");
makeinputcode("IP Address","aipaddress",$ipaddress);
maketableheader("Custom Profile Fields");
$profilefields=$DB_site->query("SELECT profilefieldid,title FROM profilefield");
while ($profilefield=$DB_site->fetch_array($profilefields)) {
makeinputcode($profilefield[title],"field".$profilefield[profilefieldid]);
}
doformfooter("Save");
}
// ###################### Start insert #######################
if ($HTTP_POST_VARS['action']=="insert") {
if (!isset($ausername) or $ausername == '') {
echo "<p>You did not give this user an username</p>";
exit;
}
if ($exists=$DB_site->query_first("SELECT userid FROM user WHERE username='".addslashes(htmlspecialchars($ausername))."'")) {
echo "There is already an ".makelinkcode('user',"user.php?do=edit&userid=$exists[userid]",1)." named <b>".htmlspecialchars($ausername)."</b>";
exit;
}
if (!isset($apassword) or $apassword == '') {
echo "You did not give this user a password";
exit;
}
if ($joindate=="") {
$joindate=time();
} else {
$joindate="UNIX_TIMESTAMP('".addslashes($joindate)."')";
}
if ($lastvisit=="") {
$lastvisit=time();
} else {
$lastvisit="UNIX_TIMESTAMP('".addslashes($lastvisit)."')";
}
if ($lastactivity=="") {
$lastactivity=time();
} else {
$lastactivity="UNIX_TIMESTAMP('".addslashes($lastactivity)."')";
}
if ($lastpost=="") {
$lastpost=time();
} else {
$lastpost="UNIX_TIMESTAMP('".addslashes($lastpost)."')";
}
if ($biography=="Location:\r\nOccupation:\r\nInterests:\r\n") {
$biography="";
}
/* remove because it did not like 0000 as year-J $temp = explode("-", $birthday);
if ((!checkdate($temp[1],$temp[2],$temp[0]))||(!ereg("^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$",$birthday)))
$birthday = 0; */
$DB_site->query("INSERT INTO user (userid,usergroupid,username,password,email,styleid,parentemail,coppauser,homepage,icq,aim,yahoo,signature,adminemail,receivebulletin,receivebulletin_type,showemail,invisible,usertitle,customtitle,joindate,cookieuser,daysprune,lastvisit,lastactivity,lastpost,posts,storep,timezoneoffset,emailnotification,receivepm,emailonpm,ipaddress,pmpopup,options,birthday) VALUES (NULL,'$usergroupid','".addslashes(htmlspecialchars($ausername))."','".addslashes(md5($apassword))."','".addslashes(htmlspecialchars($email))."','$userstyleid','".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(htmlspecialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslashes(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".addslashes($signature)."','$adminemail','$receivebulletin','$showemail','$invisible','".addslashes($usertitle)."','$customtitle',$joindate,'$cookieuser','$daysprune',$lastvisit,$lastactivity,$lastpost,'$posts','$storep','$timezoneoffset','$emailnotification','$receivepm','$emailonpm','".addslashes($aipaddress)."','$pmpopup','$options','$birthday')");
$userid=$DB_site->insert_id();
$userfields="";
$userfieldsnames="(userid";
$profilefields=$DB_site->query("SELECT maxlength,profilefieldid,title
FROM profilefield
ORDER BY displayorder");
while ($profilefield=$DB_site->fetch_array($profilefields)) {
$varname="field$profilefield[profilefieldid]";
$userfieldsnames.=",field$profilefield[profilefieldid]";
$userfields.=",'".addslashes(htmlspecialchars($$varname))."'";
}
$userfieldsnames.=')';
$DB_site->query("INSERT INTO userfield $userfieldsnames VALUES ($userid$userfields)");