• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

prjBorden 0.0.1a - PHP, MySQLi, Template Sys [70%, BASE TO FINISH]

swagggggg
Loyal Member
Joined
Oct 28, 2008
Messages
1,557
Reaction score
368
Hello there, Livar again with another CMS. :rolleyes:

I've been out of the section for quite a while (4/5 years?? idk), and I decided to pop in a week ago and see what's up. I remember that I had learnt PHP through Habbo, and I had this little project lying around on my PC.

I decided to add onto it, added some design and I've literally got no motivation to finish it - but whoever want's a small project, go ahead and take it on!


Features:
  • PHP
  • MySQLI
  • Template System
  • Habbo Design
  • Login/Register
  • Client
  • Articles (sort of lol)


SQL Queries to run:
Code:
ALTER table users ADD column seckey VARCHAR(999);

CREATE TABLE IF NOT EXISTS `cms_news` (
  `id` int(11) NOT NULL,
  `title` text NOT NULL,
  `image` text NOT NULL,
  `shortstory` text NOT NULL,
  `longstory` text NOT NULL,
  `author` text NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO `cms_news` (`id`, `title`, `image`, `shortstory`, `longstory`, `author`) VALUES
(1, 'Welcome to prjBorden', 'attention_topstory.png', 'Introduction to using prjBorden', 'Welcome to <b>prjBorden</b><br>\r\n<br><br>\r\ndetails here\r\n\r\n<br>', 'Livar, prjBorden Developer');

ALTER TABLE `cms_news`
  ADD PRIMARY KEY (`id`);
ALTER TABLE `cms_news`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
/*!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 */;


Screenshots:
Livar - prjBorden 0.0.1a - PHP, MySQLi, Template Sys [70%, BASE TO FINISH] - RaGEZONE Forums

Livar - prjBorden 0.0.1a - PHP, MySQLi, Template Sys [70%, BASE TO FINISH] - RaGEZONE Forums

Livar - prjBorden 0.0.1a - PHP, MySQLi, Template Sys [70%, BASE TO FINISH] - RaGEZONE Forums

Livar - prjBorden 0.0.1a - PHP, MySQLi, Template Sys [70%, BASE TO FINISH] - RaGEZONE Forums



Download Link:


Credits go to:
- Habbo Hotel,
- Joopie,
- Jonteh,
- Kryptos
- Myself,
- and most importantly PHP.NET.


Any criticism is welcome!!!!

thanks, livar xoxo



NOTICE: I would highly recommend you to finish this off fully, and secure variables before even thinking about using it on a public hotel, regardless of size of community.
 
Developer
Developer
Joined
Dec 11, 2010
Messages
2,955
Reaction score
2,688
Why are you mixing pascal case and camel case? Just pick one convention and stick with it.

Also good job on filtering the data when someone logs in or registers :rolleyes:

UxVNGp6 - prjBorden 0.0.1a - PHP, MySQLi, Template Sys [70%, BASE TO FINISH] - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
swagggggg
Loyal Member
Joined
Oct 28, 2008
Messages
1,557
Reaction score
368
Why are you mixing pascal case and camel case? Just pick one convention and stick with it.

Also good job on filtering the data when someone logs in or registers :rolleyes:

UxVNGp6 - prjBorden 0.0.1a - PHP, MySQLi, Template Sys [70%, BASE TO FINISH] - RaGEZONE Forums

Not really an issue regarding the cases, and on the filtering part - read the note in the main post.


 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Dec 24, 2011
Messages
125
Reaction score
39
ugg, you have prepared statements and dont use it the right way.

your code:
PHP:
            function getUserVariable($username, $variable)
            {
                global $db;
                $result = $db->prepare("SELECT `$variable` FROM `users` WHERE username = '$username'")->execute()->result();
                
                return $result;
            }

you can better do this

PHP:
            function getUserVariable($username, $variable)
            {
                global $db;
                $result = $db->prepare("SELECT ? FROM `users` WHERE username = ? LIMIT 1")->bind_param($variable, $username)->execute()->result();
                
                return $result;
            }
 
LETS REACH 666 POSTS?!!!!
Joined
Apr 24, 2013
Messages
573
Reaction score
53
Why are you mixing pascal case and camel case? Just pick one convention and stick with it.

Also good job on filtering the data when someone logs in or registers :rolleyes:

UxVNGp6 - prjBorden 0.0.1a - PHP, MySQLi, Template Sys [70%, BASE TO FINISH] - RaGEZONE Forums
Wow this sure needs some improvedments ... xD
 

Attachments

You must be registered for see attachments list
swagggggg
Loyal Member
Joined
Oct 28, 2008
Messages
1,557
Reaction score
368
1337 programmers in this Habbo Hotel section will always give you poop for your own opinion.

I like you a lot.

Edit, can u all stop acting like this is finished, I clearly stated it isn't and it needs to be improved I.e. Filtering variables blabla,

you wouldn't even need to adjust the queries I'm using


 
Junior Spellweaver
Joined
Dec 24, 2011
Messages
125
Reaction score
39
I like you a lot.

Edit, can u all stop acting like this is finished, I clearly stated it isn't and it needs to be improved I.e. Filtering variables blabla,

you wouldn't even need to adjust the queries I'm using

Oh bloody hell,

1. Why your release something that isnt finished?
2. You mad because people are giving feedback on your code style? try to not take it negativ but positive.
it means you have to look at your codes and Improve It.
 
swagggggg
Loyal Member
Joined
Oct 28, 2008
Messages
1,557
Reaction score
368
What What in the bud

I wasn't taking anything negatively lol? I stated that it wasn't ready and it would be finished ready to use if someone bothered with it for an hour or two.

I know it's not anything amazing and there's ways to improve, but it's simple and efficient yet not procedural kind of.

It's good, just not joopie style lol lets be honest.

Edit, I just need critics From others so I know what to improve, so far you've suggested nothing.


 
Ask me about Daoism
Loyal Member
Joined
Nov 6, 2010
Messages
1,560
Reaction score
393
I wasn't taking anything negatively lol? I stated that it wasn't ready and it would be finished ready to use if someone bothered with it for an hour or two.

I know it's not anything amazing and there's ways to improve, but it's simple and efficient yet not procedural kind of.

It's good, just not joopie style lol lets be honest.

Edit, I just need critics From others so I know what to improve, so far you've suggested nothing.

To be fair, he suggested an important way to improve the queries. You don't NEED to, but his method certainly makes more sense.

It makes more sense because this is how they should work in actual applications. Sure you can pull up some scattered-brain argument I made when I was militantly against the use of prepared statements (because I didn't understand them haha), but ultimately it's a matter of trying to make PHP better. I only know because I actually managed to teach myself non-scripting languages. Your queries work, indeed, but code readability is going to be a problem when we start working on team projects in our future lives as 1337 devs in the real world.

I mean if you're here for the love of Habbo then go ahead, leave it as-is and take feature suggestions like "add radio" or "add staff apps", but if you're looking for constructive criticism, my only guess is that you're here to improve yourself. I only invoke our future lives because, hell, we've been doing this for a while and we're still here; our intentions must be to take on the real programming world. And it's certainly not because Habbo is FUN, anymore. Do we really want some bearded, hipster "modern app" dev who puts his bare feet up on his office table while he debugs his made-for-idiots mobile app giving us poop? duck no, that guy asks for soy milk in his Starbucks coffee.
 
Unknown Place
Joined
Mar 7, 2013
Messages
580
Reaction score
87
Optimizing sql is always good mainly when you have too many users, you wouldn't want your database to get stuck processing non necessary stuff. ;P
 
"(still lacks brains)"
Loyal Member
Joined
Sep 2, 2011
Messages
2,371
Reaction score
1,361
Why is everyone giving him poop? He clearly stated that it was not finished and he recommends that no one uses it for live Hotel usage. He clearly stated that a lot of work needed to be done. Instead of constantly bitching at him and saying "this needs some improvements" clearly define what he needs to work on and get off your high horses. Grow up for a change.

1. Why your release something that isnt finished?

Then we would have no files for the Flash version if no one released unfinished work.
 
Last edited:
Back
Top