Project Juliet - Source Code [PHP, MySQL]
Introduction (from the development thread)
Project Juliet began about 30minutes ago. For the last 3 - 5 months I have been learning PHP so I can be as good as some of you. I have read some posts and a few of you said that doing stuff like this is a great way to advance PHP knowledge. I have been on my iPod reading a massive book about PHP, no way near finished it yet, and been on many websites all so that I can improve.
Project Juliet is not designed for live hotel use. THIS IS NOT FINISHED, IT IS ONLY A PREVIEW OF WHAT I HAVE DONE SO FAR.
Download: http://jokohost.com/nobrain/PrjJuliet-[UNFINISHED].rar
Sorry if the documents in 'Docs' and 'tpl' offend you, I was just in a silly mood. :lol:
Feel free to comment on what I can improve and shit.
All the best,
nobrain
Re: Project Juliet - Source Code [PHP, MySQL]
Looks neat, your doing way better than amirz and thats a good sign :)
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
v00rp
Looks neat, your doing way better than amirz and thats a good sign :)
Lol, thanks man.
Remember: Do NOT use it for a live hotel, hehe.
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
ησвяαιη
Lol, thanks man.
Remember: Do NOT use it for a live hotel, hehe.
:-) its good for local testing of emulators D:
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
v00rp
:-) its good for local testing of emulators D:
How is it good for testing Emulators? It doesn't even have a client...
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
ησвяαιη
How is it good for testing Emulators? It doesn't even have a client...
> ADDED OWN CLIENT
>>profit
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
v00rp
> ADDED OWN CLIENT
>>profit
Lmfao, your a weirdo. Remember to read the documents :)
Re: Project Juliet - Source Code [PHP, MySQL]
His PHP is a lot better than mine but does he have different themes in 1 cms?
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
AmirZ
His PHP is a lot better than mine but does he have different themes in 1 cms?
Hell no, I haven't even made 1 theme yet as I am focusing on the main files before the theme.
Re: Project Juliet - Source Code [PHP, MySQL]
Promising... You should release an update everytime something big is coded so then we can push you on improving it... Nice work man.
Re: Project Juliet - Source Code [PHP, MySQL]
Nice release, will look through the source to see what you've done
For a project like this, I recommend you use GitHub for good workflow control and stuff
Posted via Mobile Device
Re: Project Juliet - Source Code [PHP, MySQL]
I like the support for CloudFlare, rest looks good aswell :)
Re: Project Juliet - Source Code [PHP, MySQL]
Looks 'alright'. Good-luck Ash.
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
PowahAlert
Looks 'alright'. Good-luck Ash.
I'm still not happy with the way I've coded some parts which will be looked into.
Quote:
Originally Posted by
Shredinator
I like the support for CloudFlare, rest looks good aswell :)
Yeah, credits goes to Kryptos for that as I took it from Rev :P
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
ησвяαιη
I'm still not happy with the way I've coded some parts which will be looked into.
Yeah, credits goes to Kryptos for that as I took it from Rev :P
Here's my new Core.
:)
PHP Code:
<?php
/*---------------------------------------------*
* MACRO CMS REVISION 2 - CODE NAMED: ANSI *
*----------------------------------------------*
* AUTHOR: LIVAR SHEKHANI (POWAHALERT) *
*----------------------------------------------*
* COMPATIBLE FOR PHOENIX EMULATOR (OTAKU) *
*----------------------------------------------*/
class Core
{
function Hash($input)
{
$salt = "FDFSDGDD[OF0386WH'#]SPHGYR";
return sha1($input . $salt);
}
function Filter($input)
{
return mysql_real_escape_string($input);
}
function Trunk()
{
return "MacroCMS Revision 2 - CODE NAMED: ANSI";
}
function UI($username, $row)
{
$query = @mysql_result(mysql_query("SELECT $row FROM users WHERE username = '$username' LIMIT 1"), 0);
return $query;
}
function UO()
{
$query = @mysql_result(mysql_query("SELECT users_online FROM server_status LIMIT 1"), 0);
echo $query;
}
function CheckLogin()
{
if(isset($_SESSION['M_USER']))
{
return true;
}
else
{
return false;
}
}
function Login()
{
$username = $this->Filter($_POST['username']);
$password = $this->Hash($_POST['password']);
$correct = $this->UI($username, 'password');
if(empty($username))
{
echo "Enter a username";
exit;
}
if($password == $correct)
{
// User's Password is correct!
$_SESSION['M_USER'] = $username;
$_SESSION['M_PASS'] = $password;
Header("Location: me.php");
}
elseif(mysql_num_rows(mysql_query("SELECT * FROM users WHERE username='$username'")) == 0)
{
echo "That user does not exist!";
exit;
}
elseif($password != $correct)
{
echo "Password is incorrect!";
exit;
}
}
}
?>