Log in

View Full Version : ~ AUTHORIZED RELEASE ~ NIVADE V1.2, RAPIDSHARE PREMIUM LINK



MasterFM
08-12-2008, 11:58 PM
Download the files at:
http://rapidshare.com/files/171601898/Nivade.zip

Instant download :)

And you also need the SQL:
-- MySQL dump 10.9
--
-- Host: localhost Database: nivade_systemcore
-- ------------------------------------------------------
-- Server version 4.1.22-standard

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `album_titles`
--

DROP TABLE IF EXISTS `album_titles`;
CREATE TABLE `album_titles` (
`id` int(3) NOT NULL auto_increment,
`album_name` varchar(244) NOT NULL default '',
`album_author` varchar(244) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `album_titles`
--


--
-- Table structure for table `albums`
--

DROP TABLE IF EXISTS `albums`;
CREATE TABLE `albums` (
`id` int(3) NOT NULL auto_increment,
`album` varchar(244) NOT NULL default '',
`image_src` varchar(244) NOT NULL default '',
`image_name` varchar(244) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `albums`
--


--
-- Table structure for table `banned_emails`
--

DROP TABLE IF EXISTS `banned_emails`;
CREATE TABLE `banned_emails` (
`id` mediumint(3) NOT NULL auto_increment,
`email` varchar(244) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `banned_emails`
--


--
-- Table structure for table `blogs`
--

DROP TABLE IF EXISTS `blogs`;
CREATE TABLE `blogs` (
`id` int(3) NOT NULL auto_increment,
`blog_title` varchar(244) NOT NULL default '',
`blog_content` varchar(244) NOT NULL default '',
`blog_author` varchar(244) NOT NULL default '',
`blog_creation_date` varchar(244) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `blogs`
--

--
-- Table structure for table `comments`
--

DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments` (
`id` int(2) NOT NULL auto_increment,
`username` text NOT NULL,
`from` text NOT NULL,
`content` text NOT NULL,
`date` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=73 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `comments`
--


--
-- Table structure for table `contact_submissions`
--

DROP TABLE IF EXISTS `contact_submissions`;
CREATE TABLE `contact_submissions` (
`id` int(2) NOT NULL auto_increment,
`username_submitted_by` varchar(10) NOT NULL default '',
`reason` varchar(244) NOT NULL default '',
`message` varchar(244) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `contact_submissions`
--


--
-- Table structure for table `errors_msgs`
--

DROP TABLE IF EXISTS `errors_msgs`;
CREATE TABLE `errors_msgs` (
`id` int(2) NOT NULL auto_increment,
`message` varchar(200) NOT NULL default '',
`misc_message_title` varchar(200) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `errors_msgs`
--

--
-- Table structure for table `features`
--

DROP TABLE IF EXISTS `features`;
CREATE TABLE `features` (
`id` int(3) NOT NULL auto_increment,
`feature_name` varchar(244) NOT NULL default '',
`feature_description` varchar(244) NOT NULL default '',
`feature_date` varchar(244) NOT NULL default '',
`feature_features` varchar(244) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `features`
--


--
-- Table structure for table `friend_conversations`
--

DROP TABLE IF EXISTS `friend_conversations`;
CREATE TABLE `friend_conversations` (
`id` int(2) NOT NULL auto_increment,
`username_too` text NOT NULL,
`username_from` text NOT NULL,
`message` text NOT NULL,
`date` text NOT NULL,
`is_active_mail` varchar(244) NOT NULL default 'true',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `friend_conversations`
--

--
-- Table structure for table `friend_requests`
--

DROP TABLE IF EXISTS `friend_requests`;
CREATE TABLE `friend_requests` (
`id` int(2) NOT NULL auto_increment,
`username_from` text NOT NULL,
`username_too` text NOT NULL,
`fr_message` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `friend_requests`
--


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

DROP TABLE IF EXISTS `friends`;
CREATE TABLE `friends` (
`id` int(2) NOT NULL auto_increment,
`username` text NOT NULL,
`friendusername` text NOT NULL,
`top_friend_number` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=157 DEFAULT CHARSET=latin1;

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



--
-- Table structure for table `login_logs`
--

DROP TABLE IF EXISTS `login_logs`;
CREATE TABLE `login_logs` (
`id` int(3) NOT NULL auto_increment,
`username` varchar(244) NOT NULL default '',
`ip` varchar(244) NOT NULL default '',
`date` varchar(244) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=94 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `login_logs`
--


--
-- Table structure for table `misc_pages`
--

DROP TABLE IF EXISTS `misc_pages`;
CREATE TABLE `misc_pages` (
`id` int(2) NOT NULL auto_increment,
`page_content` text NOT NULL,
`page_name` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `misc_pages`
--


--
-- Table structure for table `reported_profiles`
--

DROP TABLE IF EXISTS `reported_profiles`;
CREATE TABLE `reported_profiles` (
`id` int(2) NOT NULL auto_increment,
`offense` varchar(244) NOT NULL default '',
`offended_user` varchar(244) NOT NULL default '',
`offensive_user` varchar(244) NOT NULL default '',
`status` varchar(244) NOT NULL default 'active',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `reported_profiles`
--


--
-- Table structure for table `reputation`
--

DROP TABLE IF EXISTS `reputation`;
CREATE TABLE `reputation` (
`id` int(2) NOT NULL auto_increment,
`username_from` varchar(50) NOT NULL default '',
`username_too` varchar(50) NOT NULL default '',
`misc_date` varchar(244) NOT NULL default '',
`misc_limit` varchar(244) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `reputation`
--

--
-- Table structure for table `site`
--

DROP TABLE IF EXISTS `site`;
CREATE TABLE `site` (
`maintenance` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `site`
--

--
-- Table structure for table `skins`
--

DROP TABLE IF EXISTS `skins`;
CREATE TABLE `skins` (
`id` int(2) NOT NULL auto_increment,
`backgroundcolor` text NOT NULL,
`background` text NOT NULL,
`fontsize` text NOT NULL,
`fontface` text NOT NULL,
`fontcolor` varchar(30) NOT NULL default '',
`moduletop` text NOT NULL,
`modulemid` text NOT NULL,
`modulebtm` text NOT NULL,
`skin_name` text NOT NULL,
`skin_author` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `skins`
--


--
-- Table structure for table `staff`
--

DROP TABLE IF EXISTS `staff`;
CREATE TABLE `staff` (
`importantness` int(2) NOT NULL auto_increment,
`staff_name` varchar(244) NOT NULL default '',
`position` varchar(244) NOT NULL default '',
`level` varchar(244) NOT NULL default '',
PRIMARY KEY (`importantness`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `staff`
--


--
-- Table structure for table `superadmin`
--

DROP TABLE IF EXISTS `superadmin`;
CREATE TABLE `superadmin` (
`private_key` varchar(244) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `superadmin`
--
--
-- Table structure for table `user_data`
--

DROP TABLE IF EXISTS `user_data`;
CREATE TABLE `user_data` (
`id` int(3) NOT NULL auto_increment,
`username` varchar(10) NOT NULL default '',
`password` varchar(254) NOT NULL default '',
`level` varchar(254) NOT NULL default 'normal_user',
`email` varchar(254) NOT NULL default '',
`gender` varchar(200) NOT NULL default '',
`hobbies` varchar(254) NOT NULL default '',
`intelligence` varchar(254) NOT NULL default '',
`location` varchar(254) NOT NULL default '',
`full_name` varchar(50) NOT NULL default '',
`reputation` varchar(254) NOT NULL default '0',
`avatar` varchar(254) NOT NULL default '/includes/images/no_avatar.png',
`banned` varchar(254) NOT NULL default '',
`music` varchar(254) NOT NULL default '',
`age` varchar(30) NOT NULL default '',
`profile_views` varchar(254) NOT NULL default '0',
`age_show` varchar(254) NOT NULL default 'yes',
`email_show` varchar(254) NOT NULL default 'yes',
`show_rep` varchar(254) NOT NULL default 'yes',
`skinId` varchar(254) NOT NULL default '1',
`youtube` varchar(254) NOT NULL default 'http://uk.youtube.com/watch?v=Xi6EStyGw14',
`date_of_birth` varchar(225) NOT NULL default '',
`emailverified` char(2) NOT NULL default '0',
`privacy` varchar(254) NOT NULL default 'private',
`personal_word` varchar(254) NOT NULL default '',
`about_user` varchar(254) NOT NULL default 'Hello, I am new too nivade!',
`registration_date` varchar(254) NOT NULL default '',
`special_user_notices` varchar(244) NOT NULL default '',
`ban_reason` varchar(240) NOT NULL default '',
`registered_ip` varchar(244) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=160 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user_data`
--



DROP TABLE IF EXISTS `user_warnings`;
CREATE TABLE `user_warnings` (
`id` int(2) NOT NULL auto_increment,
`reason` varchar(254) NOT NULL default '',
`for` varchar(254) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user_warnings`
--


--
-- Table structure for table `weekvoters`
--

DROP TABLE IF EXISTS `weekvoters`;
CREATE TABLE `weekvoters` (
`id` int(3) NOT NULL auto_increment,
`username` varchar(244) NOT NULL default '',
`votedfor` varchar(244) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `weekvoters`
--

LOCK TABLES `weekvoters` WRITE;
/*!40000 ALTER TABLE `weekvoters` DISABLE KEYS */;
/*!40000 ALTER TABLE `weekvoters` ENABLE KEYS */;
UNLOCK TABLES;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;




Enjoy :)
------------------------------------------------------------------------
NOTICE - NOTICE ; IF YOU DO NOT READ THIS THEN YOU ARE SCREWED.
------------------------------------------------------------------------
/// YOU MUST CHANGE THE LAYOUT WHEN DOWNLOADING. MUST. \\\

Credits too:
Matt Upton - Nivade ideas (In real life :P)
Josh (habtasia) - being ok with this;
Dom (MasterFM) - For uploading with his rapidshare premium.

Here's a few questions, included with answers;

Why use nivade source?
Yes, it's terribly coded but will help out. This has been released to help the noobies out.

IMPORTANT:
There is a backdoor planted, but can easily be removed. The files which the backdoor connect to are no longer available, so the backdoor isn't going to be in use, but you should remove just in case when calonuk.net expires someone renews to use backdoor or something silly..

The backdoor is located in:
nivade_team.php - You might also want to rename a few files. :P

Near the bottom of the code REMOVE the file get contents bits and the if statement.

ALSO; exploit:

search.php
remove the bit near the top where it says $_GET[ 'sqli' ], remove that if statement as it doesn't clean the search input.

Source
09-12-2008, 12:01 AM
I don't really want that design released (even though I only really did the header) as it could be used and created better for other purposes.

//Edited because of mis-understanding. But dom is still childish ^_^

Calon
09-12-2008, 12:04 AM
Don't be so pathetic, add me on msn now child.

[email protected] and we will discuss the legalities of what you have just done.
This is being sorted now, thanks for informing me, your graphics will be removed from the source and the source will be re-uploaded.

MasterFM
09-12-2008, 12:05 AM
Don't be so pathetic, add me on msn now child.
**** off. Don't call me a "child".
Enjoy guys!

Calon
09-12-2008, 12:17 AM
Quick update:
Images folder may be missing - make your own layout!

Please remove the current layout if you can, it was created by Source and it is amazing for something I have used, however if you need a better design ask Source for a quote.

Source
09-12-2008, 12:19 AM
It is anything but amazing the design, I am just annoyed at the fact I gave you a good design as a favour, you then didn't make decent content areas for it, then released it for free... just seems a bit weird, thats all.

Calon
09-12-2008, 12:23 AM
It is anything but amazing the design, I am just annoyed at the fact I gave you a good design as a favour, you then didn't make decent content areas for it, then released it for free... just seems a bit weird, thats all.
Lol, sorry I really am new to this and needed somewhere to start, the next project I work on will be a lot better, the design for one, also me putting a lot more work into it, and me not releasing the source.

IDontKnow
09-12-2008, 07:08 AM
Hey,

Josh ACTUALLY agreed to this? ;l

Decode
09-12-2008, 08:23 AM
**** off. Don't call me a "child".
Enjoy guys!
You are a child, you couldn't even work out how I found out your school and post code and school password.

habtasia
09-12-2008, 09:11 AM
Yes, I do ACTUALLY agree with this as Calon is coding a complete new system for Nivade so we will be using a system specially made for Nivade which no one else have's

IDontKnow
09-12-2008, 04:45 PM
Yes, I do ACTUALLY agree with this as Calon is coding a complete new system for Nivade so we will be using a system specially made for Nivade which no one else have's

That's a stupid idea to be honest. It would have been better to just secure and update the previous coding. But now because you have authorized release, it will take a time to get a new system together. Good things dont takes days/weeks, they take months.

MasterFM
09-12-2008, 04:58 PM
Good things dont takes days/weeks, they take months.
Not necesarrily,
if he works to his extent
it could be done in about 1/2 weeks

IDontKnow
09-12-2008, 05:00 PM
Not necesarrily,
if he works to his extent
it could be done in about 1/2 weeks

With school etc doesn't leave him much time!

MasterFM
09-12-2008, 05:12 PM
With school etc doesn't leave him much time!


Calon doesent seem to go to school lul

Calon
09-12-2008, 09:34 PM
Calon doesent seem to go to school lul
Lmao, it's hard to explain but I do. I'm just really ill right now, and have been off for almost 7 weeks with a terrible illness, it feels really surreal to be ill for this long.



That's a stupid idea to be honest. It would have been better to just secure and update the previous coding. But now because you have authorized release, it will take a time to get a new system together. Good things dont takes days/weeks, they take months.

I could easily re-code Nivade within a day or three, not a month. But just like Dom, I don't do things like that, I lack dedication and fall off task too easily. Good things don't take months, I have coded a few things which have taken me at the most an hour - they we're awesome.

Also - I offered to re-code as it is terribly coded, and should be re-coded. Take a peek for yourself, I made Nivade early this year.. and during that time I have learnt so much.

Blinger1
09-12-2008, 09:38 PM
what is Nivade ????

MasterFM
09-12-2008, 09:40 PM
what is Nivade ????

Is your head in your arse or somthing?

Calon
09-12-2008, 09:42 PM
what is Nivade ????
Social networking website, for anyone who is interested the script includes:

- Base system (login, register)
- Blogs (create your own, view your own, view others)
- Albums (create album, upload image [sort into album])
- Comments (post comment, view comment)
- Friends (add friends, remove friends)
- Basic admin CP (view reported profiles, unban user, contact submissions)

May I warn you that the script is messy, and contains a lot of incomplete features, such as "Control system features"

Blinger1
09-12-2008, 09:42 PM
Is your head in your arse or somthing?
Looks like it.

Thank you Calon. +Rep :D

Calon
09-12-2008, 09:43 PM
Looks like it. So what is it?
Read my post above, I am the creator of the script and website, so blame me :P

Turbocom
09-12-2008, 10:38 PM
how would you change the users?

Calon
09-12-2008, 11:07 PM
how would you change the users?
Set "level" in phpMyAdmin too "administrative_user"

MasterFM
10-12-2008, 10:31 PM
By the looks of it, most of you are leechers.
30+ downloads and not even "Thanks".
I might just remove the link.
I bet if i did remove the link you'd go "amg links dead" and miss this msg completly.

LOLROB
10-12-2008, 10:36 PM
By the looks of it, most of you are leechers.
30+ downloads and not even "Thanks".
I might just remove the link.
I bet if i did remove the link you'd go "amg links dead" and miss this msg completly.

Hahahahahah lol epic ;]]]]

i downloaded :) but on my prem account soz you dont get a point i make it upto you some how ;]

love you, really.

habtasia
10-12-2008, 11:17 PM
*Removed*

Edited by Hayd93 (Forum Super Moderator): Post removed on request of user.

MasterFM
10-12-2008, 11:32 PM
Can i just remind anyone who is going to use this:

On the bottom of every page, you must have credit to Calon and a link to
www.Nivade.com (http://www.Nivade.com)

If I catch someone using the system without the above, I will report to their host

lmao that made me laugh.

LOLROB
10-12-2008, 11:32 PM
Can i just remind anyone who is going to use this:

On the bottom of every page, you must have credit to Calon and a link to
www.Nivade.com

If I catch someone using the system without the above, I will report to their host

I Lol'd whos going to do that lololol :rolleyes:

Source
10-12-2008, 11:40 PM
No point to the crediting tbh, not sure if calon would want his name on that code ^_^

MasterFM
10-12-2008, 11:43 PM
No point to the crediting tbh, not sure if calon would want his name on that code ^_^

lol, also
not like you know every site on the internet is it josh?

Turbocom
11-12-2008, 04:48 AM
habtasia no one will do that. tbh

Blinger1
11-12-2008, 06:09 AM
i want to say thanks:D!!!!!!!!
although i dont understand the code much :$

Agnostic Bear
11-12-2008, 07:21 AM
Can i just remind anyone who is going to use this:

On the bottom of every page, you must have credit to Calon and a link to
www.Nivade.com (http://www.Nivade.com)

If I catch someone using the system without the above, I will report to their host

Hey man you're hard man please don't report me to my host I beg you, please.

Nobody attributes things these days and those with enough brains will remove everything that says calon / nivade and you wont be able to find out if it's the code or not.

IDontKnow
11-12-2008, 07:30 AM
Hey man you're hard man please don't report me to my host I beg you, please.

Nobody attributes things these days and those with enough brains will remove everything that says calon / nivade and you wont be able to find out if it's the code or not.

As I remember, the guy doesn't even know how to read PHP?

RYANNNNN
11-12-2008, 10:00 AM
*removed*

Edited by Hayd93 (Forum Super Moderator): Please do not be inappropriate and also dont spam

Calon
11-12-2008, 04:00 PM
Can i just remind anyone who is going to use this:

On the bottom of every page, you must have credit to Calon and a link to
www.Nivade.com (http://www.Nivade.com)

If I catch someone using the system without the above, I will report to their host
You don't create rules for the system that I created. You are getting a new system, therefore you shouldn't even dare post that. You are free to remove any copyright, as long as you don't claim it as you're own I'm more than happy for you too use it.

Colin-Roberts
12-12-2008, 11:47 PM
what do i change so all the links don't lead to nivade.co.uk//

Calon
12-12-2008, 11:51 PM
what do i change so all the links don't lead to nivade.co.uk//
You'll have to find and replace throughout every file, I never got to making everything a dynamicy URL, but not much should go there.

Colin-Roberts
13-12-2008, 12:03 AM
after changing both includes/core.php it still registers the user in your database not mine.

Calon
13-12-2008, 12:17 AM
after changing both includes/core.php it still registers the user in your database not mine.
Most likely you're on the nivade register page, you have to update links.

Colin-Roberts
13-12-2008, 01:09 AM
thought of that, was on my register page

Calon
13-12-2008, 01:54 PM
thought of that, was on my register page
Impossible, as it is connecting to localhost not the nivade IP for the db.

Colin-Roberts
13-12-2008, 05:07 PM
http://zetolic.com/social/ try and register, register apparently works but the login doesn't and theres nothing in phpmyadmin

Calon
13-12-2008, 05:47 PM
http://zetolic.com/social/ try and register, register apparently works but the login doesn't and theres nothing in phpmyadmin
Hmm, strange.

Jam-ez
13-12-2008, 11:14 PM
I've done a core, similar to yours, that has the line:


$check_ban_number = mysql_fetch_object( $check_ban );

But I get this error;


Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in \\nas-001\winspace002\10-didehvar.com\www\fivid\includes\core.php on line 23

Any ideas, is it worth contacting host or is it a bad php mistake?

Full File:
( do you like my fivid copy? ) ( and this is only for a personal project :) )
<?
session_start();

/*
_ _ _ _
| _ _| | |
| |_ _(_)_ _ (_) __| |
| _ _| | \ / /| |/ _ |
| | | |\ V / | | (_) |
|_| |_| \_(c)|_|\__,_|
core.
Code & graphics copyrighted (c).
Created by.

*/

mysql_connect( 'i loled, i posted these details' );
mysql_select_db( 'user_data' );

$username = $_SESSION['username'];

$check_ban = mysql_query( "SELECT * FROM `user_data` WHERE `username` = '$username'");
$check_ban_number = mysql_fetch_object( $check_ban );

if ( $check_ban_number->banned == 'true' );
{
echo("Sorry, you have been banned for: " . $check_ban_number->ban_reason);

session_destroy();
exit();
}

?>

Calon
13-12-2008, 11:20 PM
I've done a core, similar to yours, that has the line:


$check_ban_number = mysql_fetch_object( $check_ban );But I get this error;



Any ideas, is it worth contacting host or is it a bad php mistake?

Full File:
( do you like my fivid copy? ) ( and this is only for a personal project :) )
<?
session_start();

/*
_ _ _ _
| _ _| | |
| |_ _(_)_ _ (_) __| |
| _ _| | \ / /| |/ _ |
| | | |\ V / | | (_) |
|_| |_| \_(c)|_|\__,_|
core.
Code & graphics copyrighted (c).
Created by.

*/

mysql_connect( 'i loled, i posted these details' );
mysql_select_db( 'user_data' );

$username = $_SESSION['username'];

$check_ban = mysql_query( "SELECT * FROM `user_data` WHERE `username` = '$username'");
$check_ban_number = mysql_fetch_object( $check_ban );

if ( $check_ban_number->banned == 'true' );
{
echo("Sorry, you have been banned for: " . $check_ban_number->ban_reason);

session_destroy();
exit();
}

?>
Ensure that you have fields named "username", "ban_reason", "banned"

Jam-ez
14-12-2008, 09:30 AM
Ensure that you have fields named "username", "ban_reason", "banned"

I have, but perhaps it would be because there's no accounts at the moment.

Oh, and it's actually saying I'm banned as well (after that error).

Recursion
14-12-2008, 09:57 AM
Thanks, a nice bit of code to play around with :)

Jam-ez
14-12-2008, 11:17 AM
Ensure that you have fields named "username", "ban_reason", "banned"

Just added myself to the table, and still doesn't work. I do have all them fields...

Anyone have any ideas?

Edit: Found problem, I was connecting to table instead of database.
(DUH)

Edit2: Now it's saying I'm banned, when I'm not even logged in and the field isn't set to true..

Jam-ez
14-12-2008, 11:35 AM
Can't edit:

Is it because its doing this:

$username = $_SESSION['username'];

$check_ban = mysql_query( "SELECT * FROM `user_data` WHERE `username` = '$username'");

But the session username hasn't been set?

Calon
14-12-2008, 01:50 PM
Can't edit:

Is it because its doing this:

$username = $_SESSION['username'];

$check_ban = mysql_query( "SELECT * FROM `user_data` WHERE `username` = '$username'");But the session username hasn't been set?
If I remember correctly, I removed the ban code.

And the session hasn't been set, it's so $username can be called instead of $_SESSION[ 'username' ]

Jam-ez
14-12-2008, 02:52 PM
If I remember correctly, I removed the ban code.

And the session hasn't been set, it's so $username can be called instead of $_SESSION[ 'username' ]

I didn't want to tripple post, but I got it. I was still connecting to an old table, rather than the new table somewhere else in the script. Oh, and $_SESSION['username'] should have been $_SESSION['user'].

Calon
14-12-2008, 02:57 PM
I didn't want to tripple post, but I got it. I was still connecting to an old table, rather than the new table somewhere else in the script. Oh, and $_SESSION['username'] should have been $_SESSION['user'].
No, it should not be $_SESSION['user']. It doesn't matter what session names are called, and I called it username as it's a full username, not just 'user' which isn't shortened.

Jam-ez
14-12-2008, 04:43 PM
No, it should not be $_SESSION['user']. It doesn't matter what session names are called, and I called it username as it's a full username, not just 'user' which isn't shortened.

Thanks, I'll change them all to $_SESSION['username'] instead. :)

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