PDA

View Full Version : [Help] OurHabbo Edit User



IMole
04-08-2007, 06:33 PM
When ever I try editing a user on OurHabbo on Admin Panel I get this error:



Your profile has been updated!Error during the execution of the MySQL query : Unknown column 'mission' in 'field list'

I don't know why, that's when I've clicked edit. Does any one know why, it doesn't actually edit the user at all and I can't change peoples ranks and if I change it on Managers Panel it just says



Your profile has been updated!


But actually, nothings been changed.

I hope someone can help, this is what the users.php file says:



<html>
<head>
<title>Home</title>
<style type="text/css">
a {
font-size: 10px;
color: #000000;
}
a:link {
text-decoration: none;
color: #000000;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: underline;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
body,td,th,p {
font-family: Verdana;
font-size: 10px;
color: #000000;
}
.12 { color: red; }
.11 { color: navy; }
.10 { color: ; }
.9 { color: darkorchid; }
.8 { color: darkorchid; }
.7 { color: darkorchid; }
.6 { color: darkorchid; }
.5 { color: green; }
.4 { color: green; }
.3 { color: green; }
.2 { color: green; }
.1 { color: black; }
input {
font-family: Tahoma, Arial;
font-size: 8pt;
font-weight: bold;
width: 200;
color: #000000;
background-color: #FFFFFF;
border: 1px solid #000000;
}
select {
background-color: #ffffff;
font-family: Arial, Helvetica, sans-serif;
font-size: 8pt;
color: #000000;
width: 200;
border: 1px solid #000000;
}
textarea {
background-color: #ffffff;
font-family: Arial, Helvetica, sans-serif;
font-size: 8pt;
color: #000000;
width: 200;
border: 1px solid #000000;
}

</style>
</head>
<body bgcolor="#ffffff">
<p><u><b>Edit Users</b></u></p>
<p>This page allows you to Edit Users<br>
Click <a href="index.php">here</a> to go back</p>
</body>
</html>
<?
ob_start();
include("config.php");
if($logged[username] && $logged[level] == 12)
{
//checks to see if the user is logged in, and if their user level
//is 5 (this is administrator)
if($_GET[user])
{
//checks to see if there is a ?user=username variable in the url.
if (!$_POST[update])
{
// the form hasn't been submitted. We continue...
$user = mysql_query("SELECT * from users where username = '$_GET[user]'");
$user = mysql_fetch_array($user);
//these lines get the user's information and put it in an array.
//we will display the information in the html form
echo("
<div align=\"left\"><p>You are editing the user: <span class=\"$user[level]\"><b>$user[username]</b></span></p><form method=\"POST\">
<table width=\"100%\" align=\"left\">
<tr>
<td align=\"right\" width=\"25%\">
User Level<br><b>Top option is what is currently set.</b>
</td>
<td align=\"left\">
<select name=\"level\" id=\"level\" tabindex=\"2\" size=\"1\" style=\"width: 200; height: 23\">
<option>$user[level]</option>
<option value=\"0\">Banned</option>
<option value=\"1\">User</option>
<option value=\"2\">Webdesigner</option>
<option value=\"3\">Graphics Designer</option>
<option value=\"4\">News Reporter</option>
<option value=\"5\">Radio DJ</option>
<option value=\"6\">Forum Trainee Hobba</option>
<option value=\"7\">Forum Moderator</option>
<option value=\"9\">(Asst) Manager</option>
<option value=\"10\">Player Support</option>
<option value=\"11\">Super Moderator</option>
<option value=\"12\">Administrator</option>
</select> </td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Can use Chatrooms<br><b>Top option is what is currently set.</b>
</td>
<td align=\"left\">
<select name=\"chat\" id=\"chat\" tabindex=\"3\" size=\"1\" style=\"width: 200; height: 23\">
<option>$user[chat]</option>
<option value=\"Yes\">Yes</option>
<option value=\"No\">No</option>
</select> </td>
</tr>
<tr>

<td align=\"right\" width=\"25%\">
<b><font color='red'>*STAFF ONLY*</b></font> Mission
</td>
<td align=\"left\">
<input type=\"text\" size=\"25\" maxlength=\"25\" name=\"mission\" value=\"$user[mission]\"></td>

</tr>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Location
</td>
<td align=\"left\">
<input type=\"text\" size=\"25\" maxlength=\"25\" name=\"locate\" value=\"$user[location]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Homepage</td>
<td align=\"left\">
<input size=\"25\" name=\"homepage\" value=\"$user[homepage]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Email Address</td>
<td align=\"left\">
<input size=\"25\" name=\"email\" value=\"$user[email]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Picture</td>
<td align=\"left\">
<input size=\"25\" name=\"picture\" value=\"$user[picture]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
HabboName
</td>
<td align=\"left\">
<input type=\"text\" size=\"25\" maxlength=\"25\" name=\"habboname\" value=\"$user[habboname]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Favourite Hotel
</td>
<td align=\"left\">
<select name=\"hotels\" id=\"hotels\" size=\"1\">
<option>$user[hotels]</option>
<option value=\"UK Hotel\">UK Hotel</option>
<option value=\"USA Hotel\">USA Hotel</option>
<option value=\"CA Hotel\">CA Hotel</option>
<option value=\"AU Hotel\">AU Hotel</option>
<option value=\"Other Hotel\">Other Hotel</option>
</select>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Favourite Food</td>
<td align=\"left\">
<input size=\"25\" name=\"fav_food\" value=\"$user[fav_food]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Best Habbo</td>
<td align=\"left\">
<input size=\"25\" name=\"best_habbo\" value=\"$user[best_habbo]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Occupation</td>
<td align=\"left\">
<input size=\"25\" name=\"occupation\" value=\"$user[occupation]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Gender</td>
<td align=\"left\">
<select name=\"gener\" id=\"gender\" size=\"1\">
<option>$user[gender]</option>
<option value=\"Male\">Male</option>
<option value=\"Female\">Female</option>
<option value=\"Prefer not to disclose\">Prefer not to disclose</option>
</select>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Favourite Colour</td>
<td align=\"left\">
<input size=\"25\" name=\"fav_color\" value=\"$user[fav_color]\"></td>
</tr>
<tr>
<td align=\"center\">
</td>
<td align=\"left\">
<input type=\"submit\" name=\"update\" value=\"Update\"></td>
</tr>
</table>
</form>
</center>");
}
else
{
$email = htmlspecialchars($_POST[email]);
$aim = htmlspecialchars($_POST[aim]);
$msn = htmlspecialchars($_POST[msn]);
$picture = htmlspecialchars($_POST[picture]);
$locate = htmlspecialchars($_POST[locate]);
$level = htmlspecialchars($_POST[level]);
$habboname = htmlspecialchars($_POST[habboname]);
$hotels = htmlspecialchars($_POST[hotels]);
$homepage = htmlspecialchars($_POST[homepage]);
$chat = htmlspecialchars($_POST[chat]);
$fav_food = htmlspecialchars($_POST[fav_food]);
$best_habbo = htmlspecialchars($_POST[best_habbo]);
$occupation = htmlspecialchars($_POST[occupation]);
$gender = htmlspecialchars($_POST[gender]);
$fav_color = htmlspecialchars($_POST[fav_color]);
$mission = htmlspecialchars($_POST[mission]);
// the above lines get rid of all html.
echo ("Your profile has been updated!");
$update = mysql_query("Update users set email = '$email',
msn = '$msn', aim = '$aim', picture = '$picture', location = '$locate', habboname = '$habboname', homepage = '$homepage', hotels = '$hotels', fav_food = '$fav_food', best_habbo = '$best_habbo', occupation = '$occupation', gender = '$gender', fav_color = '$fav_color', level = '$level', chat = '$chat', mission = '$mission' where username = '$_GET[user]'") or die ('Error during the execution of the MySQL query : ' . mysql_error());
$date = date("j F G : i");
mysql_query("INSERT INTO `logs` (`id` , `description`, `user`, `date` ) VALUES (NULL , 'Updated the user $_GET[user]', '$logged[username]', '$date')"); //Inserts into the D.B
// updates the information in the database.
}
}
else
{
$getusers = mysql_query("Select * from users order by username asc");
while($users = mysql_fetch_array($getusers))
$date = date("j F G : i");
mysql_query("INSERT INTO `logs` (`id` , `description`, `user`, `date` ) VALUES (NULL , 'Viewed Edit Users Page', '$logged[username]', '$date')"); //Inserts into the D.B
{
//makes a list of all the users
echo("<a href=\"users.php?user=$users[username]\">$users[username]</a><br />");
//displays the user's names
}
}
}
else
{
//the user's level is not 5! They cannot view this page
echo("Sorry, but you are not allowed to view this page!");
}
?>

Lilian
04-08-2007, 06:38 PM
You've not added the SQL for mission.

IMole
04-08-2007, 06:42 PM
:S I just added what the file gave which was this:



-- phpMyAdmin SQL Dump
-- version 2.9.0.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 22, 2006 at 09:26 PM
-- Server version: 4.1.21
-- PHP Version: 4.4.2
--
-- Database: `ourhabbo_tester`
--

-- --------------------------------------------------------

--
-- Table structure for table `alert`
--

CREATE TABLE `alert` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(250) NOT NULL default '',
`alert` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `alert`
--


-- --------------------------------------------------------

--
-- Table structure for table `appeals`
--

CREATE TABLE `appeals` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(100) NOT NULL default '',
`appeal` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `appeals`
--


-- --------------------------------------------------------

--
-- Table structure for table `badgelist`
--

CREATE TABLE `badgelist` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(150) NOT NULL default '',
`url` varchar(200) NOT NULL default '',
`desc` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `badgelist`
--


-- --------------------------------------------------------

--
-- Table structure for table `badges`
--

CREATE TABLE `badges` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`url` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `badges`
--


-- --------------------------------------------------------

--
-- Table structure for table `ban`
--

CREATE TABLE `ban` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(30) NOT NULL default '',
`time` varchar(250) NOT NULL default '',
`reason` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `ban`
--


-- --------------------------------------------------------

--
-- Table structure for table `bank`
--

CREATE TABLE `bank` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(150) NOT NULL default '',
`points` varchar(150) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `bank`
--


-- --------------------------------------------------------

--
-- Table structure for table `banned`
--

CREATE TABLE `banned` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(30) NOT NULL default '',
`time` varchar(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `banned`
--


-- --------------------------------------------------------

--
-- Table structure for table `cats`
--

CREATE TABLE `cats` (
`id` tinyint(4) NOT NULL auto_increment,
`name` varchar(30) NOT NULL default '',
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `cats`
--


-- --------------------------------------------------------

--
-- Table structure for table `cfh`
--

CREATE TABLE `cfh` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(250) NOT NULL default '',
`category` varchar(255) NOT NULL default '',
`message` varchar(255) NOT NULL default '',
`alert` varchar(255) NOT NULL default '',
`pickup` varchar(30) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `cfh`
--


-- --------------------------------------------------------

--
-- Table structure for table `cfhlogs`
--

CREATE TABLE `cfhlogs` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(255) NOT NULL default '',
`category` varchar(255) NOT NULL default '',
`message` varchar(255) NOT NULL default '',
`alert` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `cfhlogs`
--


-- --------------------------------------------------------

--
-- Table structure for table `chatrooms`
--

CREATE TABLE `chatrooms` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(200) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `chatrooms`
--


-- --------------------------------------------------------

--
-- Table structure for table `competition`
--

CREATE TABLE `competition` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(100) NOT NULL default '',
`answer` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `competition`
--


-- --------------------------------------------------------

--
-- Table structure for table `friends`
--

CREATE TABLE `friends` (
`id` int(11) NOT NULL auto_increment,
`to_user` varchar(20) NOT NULL default '',
`from_user` varchar(255) NOT NULL default '',
`confirmed` varchar(255) NOT NULL default 'False',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `friends`
--


-- --------------------------------------------------------

--
-- Table structure for table `furni`
--

CREATE TABLE `furni` (
`id` int(11) NOT NULL auto_increment,
`value` varchar(100) NOT NULL default '0',
`cat` varchar(150) NOT NULL default '',
`name` varchar(150) NOT NULL default '',
`image` varchar(150) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `furni`
--


-- --------------------------------------------------------

--
-- Table structure for table `furni_cat`
--

CREATE TABLE `furni_cat` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(150) NOT NULL default '',
`level` varchar(10) NOT NULL default '1',
`order` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `furni_cat`
--


-- --------------------------------------------------------

--
-- Table structure for table `helptool`
--

CREATE TABLE `helptool` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(30) NOT NULL default '',
`catagory` varchar(255) NOT NULL default '',
`email` varchar(40) NOT NULL default '',
`problem` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `helptool`
--


-- --------------------------------------------------------

--
-- Table structure for table `links`
--

CREATE TABLE `links` (
`id` int(10) NOT NULL auto_increment,
`title` varchar(225) NOT NULL default '',
`url` varchar(225) NOT NULL default '',
`description` text NOT NULL,
`picture` varchar(250) default 'http://www.habbolink.com/images/habbolink.gif',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `links`
--


-- --------------------------------------------------------

--
-- Table structure for table `logins`
--

CREATE TABLE `logins` (
`id` int(40) NOT NULL auto_increment,
`username` varchar(100) NOT NULL default '',
`description` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `logins`
--


-- --------------------------------------------------------

--
-- Table structure for table `logs`
--

CREATE TABLE `logs` (
`id` int(40) NOT NULL auto_increment,
`description` varchar(255) NOT NULL default '',
`user` varchar(100) NOT NULL default '',
`date` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `logs`
--


-- --------------------------------------------------------

--
-- Table structure for table `lottery`
--

CREATE TABLE `lottery` (
`id` int(11) NOT NULL auto_increment,
`owner` varchar(30) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `lottery`
--


-- --------------------------------------------------------

--
-- Table structure for table `lottery_winners`
--

CREATE TABLE `lottery_winners` (
`id` int(11) NOT NULL auto_increment,
`winner` varchar(30) NOT NULL default '',
`amount` varchar(15) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `lottery_winners`
--


-- --------------------------------------------------------

--
-- Table structure for table `management`
--

CREATE TABLE `management` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(100) NOT NULL default '',
`rank` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `management`
--


-- --------------------------------------------------------

--
-- Table structure for table `modlogins`
--

CREATE TABLE `modlogins` (
`id` int(40) NOT NULL auto_increment,
`description` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `modlogins`
--


-- --------------------------------------------------------

--
-- Table structure for table `news`
--

CREATE TABLE `news` (
`id` int(11) NOT NULL auto_increment,
`date` varchar(100) NOT NULL default '',
`title` text NOT NULL,
`author` varchar(100) NOT NULL default '',
`content` text NOT NULL,
`image` varchar(200) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `news`
--

INSERT INTO `news` VALUES (1, '22nd November 2006', 'thank you for purchasing OHUsersystem v5', 'OHUsersystem', 'Thank you for purchasing the system. If you do require any support, please read the documentation file. This script will only work with a valid license key, and on the website specified on the license. If you wish to update your license, contact us and provide proof of purchase and we will simple edit your license. Thanks, OHUsersystem.', 'http://www.ourhabbo.net/site/images/404_G.gif');

-- --------------------------------------------------------

--
-- Table structure for table `pmessages`
--

CREATE TABLE `pmessages` (
`title` varchar(255) NOT NULL default 'Untitled Message',
`message` text NOT NULL,
`touser` varchar(255) NOT NULL default '',
`from` varchar(255) NOT NULL default '',
`unread` varchar(255) NOT NULL default 'unread',
`date` date NOT NULL default '0000-00-00',
`id` int(15) NOT NULL auto_increment,
`reply` varchar(15) NOT NULL default 'no',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `pmessages`
--


-- --------------------------------------------------------

--
-- Table structure for table `rares`
--

CREATE TABLE `rares` (
`id` smallint(6) NOT NULL auto_increment,
`title` varchar(30) NOT NULL default '',
`category` tinyint(6) NOT NULL default '0',
`image` varchar(100) NOT NULL default '',
`date` varchar(20) NOT NULL default '',
`name` varchar(255) default '',
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `rares`
--


-- --------------------------------------------------------

--
-- Table structure for table `reward_rares`
--

CREATE TABLE `reward_rares` (
`id` int(11) NOT NULL auto_increment,
`code` varchar(30) NOT NULL default '',
`itemimage` text NOT NULL,
`itemname` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `reward_rares`
--


-- --------------------------------------------------------

--
-- Table structure for table `rewards`
--

CREATE TABLE `rewards` (
`id` int(11) NOT NULL auto_increment,
`code` varchar(30) NOT NULL default '',
`reward` varchar(30) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `rewards`
--


-- --------------------------------------------------------

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(100) NOT NULL default '',
`desc` text NOT NULL,
`status` varchar(100) NOT NULL default '',
`user` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` VALUES (1, 'staff_announce', '', 'Offline', '');
INSERT INTO `settings` VALUES (2, 'mod_announce', '', 'Offline', '');

-- --------------------------------------------------------

--
-- Table structure for table `shout`
--

CREATE TABLE `shout` (
`id` int(99) NOT NULL auto_increment,
`name` text NOT NULL,
`face` text NOT NULL,
`shout` text NOT NULL,
`level` text NOT NULL,
`cat` varchar(100) NOT NULL default '',
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `shout`
--


-- --------------------------------------------------------

--
-- Table structure for table `staff_news`
--

CREATE TABLE `staff_news` (
`id` int(11) NOT NULL auto_increment,
`date` varchar(100) NOT NULL default '',
`title` text NOT NULL,
`author` varchar(100) NOT NULL default '',
`content` text NOT NULL,
`image` varchar(200) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `staff_news`
--


-- --------------------------------------------------------

--
-- Table structure for table `timetable`
--

CREATE TABLE `timetable` (
`day` text NOT NULL,
`1` text NOT NULL,
`2` text NOT NULL,
`3` text NOT NULL,
`4` text NOT NULL,
`5` text NOT NULL,
`6` text NOT NULL,
`7` text NOT NULL,
`8` text NOT NULL,
`9` text NOT NULL,
`10` text NOT NULL,
`11` text NOT NULL,
`12` text NOT NULL,
`13` text NOT NULL,
`14` text NOT NULL,
`15` text NOT NULL,
`16` text NOT NULL,
`17` text NOT NULL,
`18` text NOT NULL,
`19` text NOT NULL,
`20` text NOT NULL,
`21` text NOT NULL,
`22` text NOT NULL,
`23` text NOT NULL,
`24` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `timetable`
--

INSERT INTO `timetable` VALUES ('Monday', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO `timetable` VALUES ('Tuesday', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO `timetable` VALUES ('Wednesday', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO `timetable` VALUES ('Thursday', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO `timetable` VALUES ('Friday', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO `timetable` VALUES ('Saturday', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO `timetable` VALUES ('Sunday', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');

-- --------------------------------------------------------

--
-- Table structure for table `ubadges`
--

CREATE TABLE `ubadges` (
`id` int(11) NOT NULL auto_increment,
`uname` varchar(30) NOT NULL default '',
`bname` varchar(255) NOT NULL default '',
`burl` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `ubadges`
--


-- --------------------------------------------------------

--
-- Table structure for table `userimages`
--

CREATE TABLE `userimages` (
`imgurl` text NOT NULL,
`author` varchar(30) NOT NULL default '',
`id` int(10) NOT NULL auto_increment,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `userimages`
--


-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(30) NOT NULL default '',
`password` varchar(255) NOT NULL default '',
`email` varchar(40) NOT NULL default 'Not Specified',
`joindate` varchar(111) NOT NULL default 'Not Specified',
`ip` varchar(100) NOT NULL default 'N/A',
`msn` varchar(250) NOT NULL default 'Not Specified',
`aim` varchar(250) NOT NULL default 'Not Specified',
`homepage` varchar(250) NOT NULL default 'Not Specified',
`picture` varchar(250) NOT NULL default 'http://www.ourhabbouk.co.uk/images/official.gif',
`face` varchar(250) NOT NULL default 'http://www.ourhabbouk.co.uk/usersystem/images/face1.gif',
`location` varchar(36) NOT NULL default 'Not Specified',
`habboname` varchar(36) NOT NULL default 'Not Specified',
`hotels` varchar(36) NOT NULL default 'Not Specified',
`level` int(1) default '1',
`page` varchar(255) NOT NULL default '',
`rules` text NOT NULL,
`pageviews` int(15) default '1',
`alert` varchar(255) NOT NULL default '',
`points` int(10) NOT NULL default '50',
`chat` varchar(4) NOT NULL default 'Yes',
`create` varchar(225) NOT NULL default 'no',
`deposit` int(11) NOT NULL default '0',
`pin` int(15) NOT NULL default '0',
`passwordcopy` varchar(100) NOT NULL default '',
`fav_food` varchar(150) NOT NULL default 'Not Specified',
`best_habbo` varchar(100) NOT NULL default 'Not Specified',
`occupation` varchar(100) NOT NULL default 'Not Specified',
`gender` varchar(100) NOT NULL default 'Not Specified',
`fav_color` varchar(100) NOT NULL default 'Not Specified',
`online` varchar(12) default NULL,
`referals` varchar(100) NOT NULL default '0',
`referer` varchar(100) NOT NULL default '',
`banned` varchar(250) default '',
`display_badge` varchar(200) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=701 ;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1, 'Admin', '21232f297a57a5a743894a0e4a801fc3', '', 'Not Specified', '', '', '', '', '', '', '', '', '', 12, '', '', 0, '', 0, 'Yes', 'no', 0, 0, '', '', '', '', '', '', '', '', '', '', '');

-- --------------------------------------------------------

--
-- Table structure for table `uses_furni`
--

CREATE TABLE `uses_furni` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(255) NOT NULL default '',
`itemname` varchar(255) NOT NULL default '',
`itemimage` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `uses_furni`
--

IMole
04-08-2007, 07:02 PM
Can't edit for some reason sorry

But can someone fix that SQL please so it does have missions? I know around about how to add it but I wouldn't know where to put it or what var to use.

Flisker
04-08-2007, 07:12 PM
why dont people make there own?

www.php.net helpful site xD

Also Techtuts has a good one to build on

IMole
04-08-2007, 07:13 PM
urg I was hoping for you to atleast help me understand how to add the missions onto it. I tried Techtuts but the tutorials aren't that clear and there's only one tutorial on there with part 1 and part 2 both about 30 pages long.

I like this user system any way, it just won't edit users and I'm getting fed up of the account "Admin"

Luke
04-08-2007, 07:28 PM
erm

ourhabbo is the techtuts one u fool.

Build your own or wait for a release on here, ourhabbo is a load of *insert swear here*. And to be honest, no-one can be bothered with it.

IMole
04-08-2007, 07:37 PM
For Gods sake people, either post something useful or don't post at all!

Lilian
04-08-2007, 08:33 PM
CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(30) NOT NULL default '',
`password` varchar(255) NOT NULL default '',
`email` varchar(40) NOT NULL default 'Not Specified',
`joindate` varchar(111) NOT NULL default 'Not Specified',
`ip` varchar(100) NOT NULL default 'N/A',
`msn` varchar(250) NOT NULL default 'Not Specified',
`aim` varchar(250) NOT NULL default 'Not Specified',
`homepage` varchar(250) NOT NULL default 'Not Specified',
`picture` varchar(250) NOT NULL default 'http://www.ourhabbouk.co.uk/images/official.gif',
`face` varchar(250) NOT NULL default 'http://www.ourhabbouk.co.uk/usersystem/images/face1.gif',
`location` varchar(36) NOT NULL default 'Not Specified',
`habboname` varchar(36) NOT NULL default 'Not Specified',
`hotels` varchar(36) NOT NULL default 'Not Specified',
`level` int(1) default '1',
`page` varchar(255) NOT NULL default '',
`rules` text NOT NULL,
`pageviews` int(15) default '1',
`alert` varchar(255) NOT NULL default '',
`points` int(10) NOT NULL default '50',
`chat` varchar(4) NOT NULL default 'Yes',
`create` varchar(225) NOT NULL default 'no',
`deposit` int(11) NOT NULL default '0',
`pin` int(15) NOT NULL default '0',
`passwordcopy` varchar(100) NOT NULL default '',
`fav_food` varchar(150) NOT NULL default 'Not Specified',
`best_habbo` varchar(100) NOT NULL default 'Not Specified',
`occupation` varchar(100) NOT NULL default 'Not Specified',
`gender` varchar(100) NOT NULL default 'Not Specified',
`fav_color` varchar(100) NOT NULL default 'Not Specified',
`online` varchar(12) default NULL,
`referals` varchar(100) NOT NULL default '0',
`referer` varchar(100) NOT NULL default '',
`banned` varchar(250) default '',
`display_badge` varchar(200) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=701 ;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1, 'Admin', '21232f297a57a5a743894a0e4a801fc3', '', 'Not Specified', '', '', '', '', '', '', '', '', '', 12, '', '', 0, '', 0, 'Yes', 'no', 0, 0, '', '', '', '', '', '', '', '', '', '', '');Theres no "Mission" column in that SQL so you need to add it.

Go into your database and add

ALTER TABLE `users` ADD mission varchar(30) NOT NULL default ''

IMole
04-08-2007, 09:29 PM
thank you so much for the help ;]

Scania
04-08-2007, 10:17 PM
For Gods sake people, either post something useful or don't post at all!

Your the new person, dont tell people to shut up, We'll post how we like on this forum, thats how it goes.

Lilian
04-08-2007, 10:40 PM
Your the new person, dont tell people to shut up, We'll post how we like on this forum, thats how it goes.

So what if their new? That doesn't give you the right to treat new people in that way. You should welcome new people. Thats just horrible and arrogant.

PappaLou
05-08-2007, 12:24 AM
Also IMole, you'll need to delete the following in your edit user page;


$email = htmlspecialchars($_POST[email]);
$aim = htmlspecialchars($_POST[aim]);
$msn = htmlspecialchars($_POST[msn]);
$picture = htmlspecialchars($_POST[picture]);
$locate = htmlspecialchars($_POST[locate]);
$level = htmlspecialchars($_POST[level]);
$habboname = htmlspecialchars($_POST[habboname]);
$hotels = htmlspecialchars($_POST[hotels]);
$homepage = htmlspecialchars($_POST[homepage]);
$chat = htmlspecialchars($_POST[chat]);
$fav_food = htmlspecialchars($_POST[fav_food]);
$best_habbo = htmlspecialchars($_POST);
$occupation = htmlspecialchars($_POST[occupation]);
$gender = htmlspecialchars($_POST[gender]);
$fav_color = htmlspecialchars($_POST[fav_color]);
[B]$mission = htmlspecialchars($_POST[mission]);
// the above lines get rid of all html.
echo ("Your profile has been updated!");
$update = mysql_query("Update users set email = '$email',
msn = '$msn', aim = '$aim', picture = '$picture', location = '$locate', habboname = '$habboname', homepage = '$homepage', hotels = '$hotels', fav_food = '$fav_food', best_habbo = '$best_habbo', occupation = '$occupation', gender = '$gender', fav_color = '$fav_color', level = '$level', chat = '$chat', mission = '$mission' where username = '$_GET[user]'") or die ('Error during the execution of the MySQL query : ' . mysql_error());

You need to delete the two things that are in bold (the second one can be found if you scroll to the right), so the page does not try to enter the data into the DB.

Lilian
05-08-2007, 10:36 AM
No she does not need to remove that because she has added the sql text for it. Read my posts.

IMole
05-08-2007, 08:21 PM
He* Lol but anyway thanks for sticking up for me lily, I am not "New" I've been on this forum for ages but on different names, I've been on many other forums to know when people are posting a little of rubbish or not. I do not like to be flamed this a post for help not a post for people saying that system is crap.

At first I deleted the missions it worked but then I re-added once lily told me how to add missions on SQL.

PS. +Rep to those who helped, -rep for those who didn't.

EDIT: Actually, you can't post how you like, you have to follow forum rules noob and one last thing, I never told you to shut up, I was just telling you not to post if it wasn't anything to do with post aka spamming.

Blob
06-08-2007, 09:12 AM
Your rep power is 0.

Anyway, stop posting new threads, theres already loads of them. Post them in 1 thread, its annoying.

IMole
06-08-2007, 12:15 PM
Well sorry if when I search for the thread it comes out with 100 pages and I get about through 20 and get bored of looking.

Blob
06-08-2007, 12:31 PM
Well sorry if when I search for the thread it comes out with 100 pages and I get about through 20 and get bored of looking.

And we get bored at looking at your threads. Post them in one.

IMole
06-08-2007, 09:00 PM
Post them in one when I find different problems to post at different times? Ok then....

MOD Close thread please problem sorted and this'll probably turn into an arguement.

L!nK
06-08-2007, 09:05 PM
Your the new person, dont tell people to shut up, We'll post how we like on this forum, thats how it goes.


Lmao your rude, now mine turn to be rude to you

Shutup Metro who cares if the guy is new doesn't mean you have to treat them as **** because there new.

from now on do you want me to treat you as **** as well you *****.

Flisker
07-08-2007, 07:53 AM
IMole thanks for the grey rep from giving you tips so i gave you what you wanted to give me -rep.

L!nK
07-08-2007, 12:00 PM
Flisker, he was meant to give +rep but he gave grey because he hasn't got no rep power.

Flisker
14-08-2007, 12:41 PM
[Help] OurHabbo Edit User 05-08-2007 09:24 PM IMole Next time reply to posts with something useful.

you can decide yourself what its meant to be..

Want to hide these adverts? Register an account for free!