Project Juliet - Source Code [PHP, MySQL]

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 44
  1. #16
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    @PowahAlert

    CODE LIKES TO BE INDENTED! It makes it happy ;3

    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;
           }
        }     
    }

    ?>

  2. #17
    Apprentice NoEffex is offline
    MemberRank
    Jan 2012 Join Date
    6Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    This will one day be great...

  3. #18
    IT-Developer djboetz is offline
    MemberRank
    Aug 2010 Join Date
    SwedenLocation
    210Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    I'm so tired of this. Everyone on RaGEZONE only release not finished and shit Emulators. Can you please be the first that release a stable Emulator with everyhthing fixed?

  4. #19
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    Quote Originally Posted by djboetz View Post
    I'm so tired of this. Everyone on RaGEZONE only release not finished and shit Emulators. Can you please be the first that release a stable Emulator with everyhthing fixed?
    We can also release nothing...

  5. #20
    Valued Member AmirZ is offline
    MemberRank
    Jan 2012 Join Date
    128Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    Quote Originally Posted by djboetz View Post
    I'm so tired of this. Everyone on RaGEZONE only release not finished and shit Emulators. Can you please be the first that release a stable Emulator with everyhthing fixed?
    WTF, this is a PHP website!!! :wacko:

  6. #21
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    If you guys would like to checkout what is going to happen with Project Juliet please visit the Development thread.

    http://forum.ragezone.com/f331/proje...ml#post6788756

  7. #22
    Account Upgraded | Title Enabled! CyberVibe is offline
    MemberRank
    Jan 2012 Join Date
    C:\inetpub\Location
    215Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    Quote Originally Posted by AmirZ View Post
    WTF, this is a PHP website!!! :wacko:
    Where you got that idea from? RaGEZONE supports everything, css html php java javascript. Its not only a PHP website. lol

  8. #23
    Account Upgraded | Title Enabled! CyberVibe is offline
    MemberRank
    Jan 2012 Join Date
    C:\inetpub\Location
    215Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    Quote Originally Posted by ησвяαιη View Post
    Not trying to rage at you but, ARE YOU FUCKING DUMB? He was clearly referring to my CMS, which is coded in PHP.
    Oh my bad =)

    Also long time no see Ash :P
    Its Queue by the way

  9. #24
    Account Upgraded | Title Enabled! Ma Ma is offline
    MemberRank
    Jan 2011 Join Date
    home.phpLocation
    580Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    You can improve even im not amazing but i see somethings you can change

  10. #25
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    Post on my development thread since none of you are checking.

    Decided to take a little break and review my code, possibly even recode it as I not happy. I will take in a few ideas you guys have told me, thanks for all your ideas/support to help me with my PHP. :)

    Development will continue in a few days(3 maximum), possibly earlier.
    ------------------------

    Build 2 is going to be good.

    MySQLi/MySQL connection system began :P
    PHP Code:
        public function __construct($dbhostname$dbusername$dbpassword$dbname$contype) {
            if (
    $contype == "mysqli") {
                
    $this->connection mysqli_connect($dbhostname$dbusername$dbpassword);
                
    $this->database mysqli_select_db($dbname);
            }
            else {
                
    $this->connection mysql_connect($dbhostname$dbusername$dbpassword);
                
    $this->database mysql_select_db($dbname);
            }
        } 

  11. #26
    The one and only! Hejula is offline
    MemberRank
    Nov 2008 Join Date
    4,128Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    Why not forced MySQLi? What about when you use bind_param you have to do an if statement to change all the MySQLi to something else, not worth. Might aswell just only support MySQLi - it is better anyway.

  12. #27
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    Quote Originally Posted by Hejula View Post
    Why not forced MySQLi? What about when you use bind_param you have to do an if statement to change all the MySQLi to something else, not worth. Might aswell just only support MySQLi - it is better anyway.
    I was thinking the same? LOL

    Thanks for the information matey, forced MySQLi it is. :P

  13. #28
    prjRev.com Kryptos is offline
    MemberRank
    Feb 2010 Join Date
    Planet EarthLocation
    579Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    Quote Originally Posted by ησвяαιη View Post
    Post on my development thread since none of you are checking.



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

    Build 2 is going to be good.

    MySQLi/MySQL connection system began :P
    PHP Code:
        public function __construct($dbhostname$dbusername$dbpassword$dbname$contype) {
            if (
    $contype == "mysqli") {
                
    $this->connection mysqli_connect($dbhostname$dbusername$dbpassword);
                
    $this->database mysqli_select_db($dbname);
            }
            else {
                
    $this->connection mysql_connect($dbhostname$dbusername$dbpassword);
                
    $this->database mysql_select_db($dbname);
            }
        } 
    1.- Bad way of making 'multiple support'.
    2.- MySQLi should 'be used as OOP'

    Just saying.

  14. #29
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    Quote Originally Posted by Kryptos View Post
    1.- Bad way of making 'multiple support'.
    2.- MySQLi should 'be used as OOP'

    Just saying.
    I'm just experimenting at the moment, and I don't know OOP. Check the development thread for a change of the code.

  15. #30
    prjRev.com Kryptos is offline
    MemberRank
    Feb 2010 Join Date
    Planet EarthLocation
    579Posts

    Re: Project Juliet - Source Code [PHP, MySQL]

    Quote Originally Posted by ησвяαιη View Post
    I'm just experimenting at the moment, and I don't know OOP. Check the development thread for a change of the code.
    You don't know OOP? 0_o

    Then why is that snippet in a construct?



Page 2 of 3 FirstFirst 123 LastLast

Advertisement