[PHP5] KuntaCMS - Social Improvements [OOP][MYSQLi]

Page 1 of 3 123 LastLast
Results 1 to 15 of 35
  1. #1
    Valued Member Ray Boccino is offline
    MemberRank
    May 2012 Join Date
    130Posts

    config [PHP5] KuntaCMS - Social Improvements [OOP][MYSQLi]



    KuntaCMS is the best CMS for a very social community. With its easy, fluid, slick design it's very easy to get where you want to go and do what you want to do.

    GENERAL FEATURES

    - Object Oriented Programming (Most of it)
    - Using MYSQLi API
    - Simple Backup System
    - Cron System
    - Secure Sessions
    - Custom TPL System with auto caching
    - Enhanced errors and exceptions
    - Language System
    - Automatic Update System
    - Simple Logs
    - Responsible design (thanks to Twitter Bootstrap)
    - Easy and fast installer
    - A lot of jQuery & Ajax use
    - SHA-512 for hashing
    - Custom Homes System made completely from scratch

    ... and more!

    PROGRESS

    75%

    IMAGES

    http://i.imgur.com/i2wtJER.png
    http://i.imgur.com/6YmCD5A.png
    http://i.imgur.com/thyAw9V.png
    http://i.imgur.com/2GxZCeB.png
    http://i.imgur.com/N1dV6rU.png
    http://i.imgur.com/AciYv5p.png
    http://i.imgur.com/iB2IRNw.png
    http://i.imgur.com/S1tUJTr.png
    http://i.imgur.com/pSgMwjG.png
    http://i.imgur.com/r1dA10H.png
    http://i.imgur.com/VYjp3K8.png
    http://i.imgur.com/lOpKyIO.png
    http://i.imgur.com/SGah5L0.png
    http://i.imgur.com/8cYbbXQ.png
    http://i.imgur.com/rHYTs16.png
    http://i.imgur.com/clntJhV.png

    SNIPPETS

    Code:
    <?php
    
    /**
    
        __ ____  ___  ___________     ___   ___ 
       / //_/ / / / |/ /_  __/ _ |   |_  | / _ \
      / ,< / /_/ /    / / / / __ |  / __/_/ // /
     /_/|_|\____/_/|_/ /_/ /_/ |_| /____(_)___/
     
     
     Professionaly made       Noob friendly
     Lightweight system       Not vulnerable
     Impressive speed         Multilanguage
     
     © 2013 - 2014            All Rights Reserved
      
                                              **/
    
     $Config = array();
    
     /** Database Configuration **/
     $Config['Database']['Host']         = 'localhost';              # Database host
     $Config['Database']['User']         = 'root';                   # Database user
     $Config['Database']['Pass']         = '';                       # Database password
     $Config['Database']['Name']         = 'db';                  # Database name
     
     /** Cronjob Configuration **/
     $Config['Cron']['Status']           = true;                     # True/False
     $Config['Cron']['Backup']['Status'] = true;                     # True/False
     $Config['Cron']['Backup']['Timer']  = 3600;                     # Time (seconds)
     
     /** Update Settings **/
     
     $Config['Update']['Status']         = true;                     # True/False
     $Config['Update']['Link']           = 'http://www.kuntacms.eu/?u='; # Update URL (Check www.kuntacms.eu)
     
     /** Server Configuration **/
     $Config['Emulator']['SSO']          = 'user_tickets';           # "user_tickets", "auth_ticket"
     
     /** Auth Configuration **/
     $Config['Auth']['HttpOnly']         = true;                     # True/False
     $Config['Auth']['Secure']           = false;                    # True/False
     
     /** Site Configuration **/
     $Config['Site']['Name']             = 'Habbine Hotel';          # Long name
     $Config['Site']['Shortname']        = 'Habbine';                # Short name
     $Config['Site']['Nickname']         = 'Habbiner@';              # Nickname
     $Config['Site']['Desc']             = 'The best way to play.';  # Description
     $Config['Site']['Link']             = 'http://localhost'; # Site URL
     $Config['Site']['Lang']             = 'ES';                     # "ES", "EN"
     $Config['Site']['Status']           = 'on';                     # "on", "off"
     $Config['Site']['Theme']            = 'Trinity';                # "Habbo", "Aurora", "Trinity", "Bootstrap"
     $Config['Site']['Cache']            = false;                     # True/False
     
     
    ?>
    

    PHP Code:
    <?php
      
    /**


        __ ____  ___  ___________     ___   ___ 
       / //_/ / / / |/ /_  __/ _ |   |_  | / _ \
      / ,< / /_/ /    / / / / __ |  / __/_/ // /
     /_/|_|\____/_/|_/ /_/ /_/ |_| /____(_)___/
     
     
     Professionaly made       Noob friendly
     Lightweight system       Not vulnerable
     Impressive speed         Multilanguage
     
     © 2013 - 2014            All Rights Reserved
      
                                              **/
      
      
    class Frontpage
      
    {
          
          protected 
    $Error;
          protected 
    $Tpl;
          
          Public Function 
    __construct($tpl)
          {
          
              
    /** Append to selected template **/ 
          
              
    $this->Tpl $tpl;
              
    $this->Tpl->Set("FRONTPAGE->ERROR"null);
             
          }
          
          Public Function 
    Login($_EMAIL$_PASSWORD$_NAKED)
          {
          global 
    $Auth;
          global 
    $db;
          
              if ( !
    $_EMAIL or !$_NAKED ) {
              
              
    self::SetError("Please enter your email and password to login.");
                  
              } else {
              
              if(
    $Auth->Login($_EMAIL$_PASSWORD$db) == false)
              {
              
              
    self::SetError("Incorrect details. <a class='forgot' href='#'>Forgot your password?</a>");
              
              } else {
              
              
    $Update = array();
              
    $Update['lastonline'] = time(); 
              
    $db->where('id'$User->Data('id'));
              
    $db->update('users'$Update);
              
              
    header("HTTP/1.0 302 Moved Temporarily");
              
    header("Location: ?p=Me");
              
    header("Cache-Control: private");
              
    header("Vary: User-Agent, Accept-Encoding");
              
              }
              
              
              }
          }
          
          Public Function 
    SetError($_MESSAGE)
          {
              
    $this->Error $_MESSAGE;
              
    $this->Tpl->Set("FRONTPAGE->ERROR"'<div id="login-errors">' $this->Error '</div>');
          }
          
      }
      
      
    ?>
    PHP Code:
    <?php

    /**




        __ ____  ___  ___________     ___   ___ 
       / //_/ / / / |/ /_  __/ _ |   |_  | / _ \
      / ,< / /_/ /    / / / / __ |  / __/_/ // /
     /_/|_|\____/_/|_/ /_/ /_/ |_| /____(_)___/
     
     
     Professionaly made       Noob friendly
     Lightweight system       Not vulnerable
     Impressive speed         Multilanguage
     
     © 2013 - 2014            All Rights Reserved
      
                                              **/

      
    Class User
      
    {
       
      Public 
    $Id;
      
      Public Function 
    __construct($_Id)
      {
        
    $this->Id $_Id;
      }
      
      Public Function 
    Data($_INFO)
      {
      
        Global 
    $db;
      
        
    $data $db->where('id'$this->Id)->get('users'1);
      
        return 
    $data['0'][$_INFO];
      
      }
      
      Public Function 
    getDataById($_ID$_INFO)
      {
      
        Global 
    $db;
      
        
    $data $db->where('id'$_ID)->get('users'1);
      
        return 
    $data['0'][$_INFO];
      
      }
      
      Public Function 
    getDataByName($_NAME$_INFO)
      {
      
        Global 
    $db;
      
        
    $data $db->where('username'$_NAME)->get('users'1);
      
        return 
    $data['0'][$_INFO];
      
      }
      
      Public Function 
    GetInfo($_ID$_INFO)
      {
      
      Global 
    $db;
      
      
    $data $db->where('user_id'$_ID)->get('user_info'1);
      
      return 
    $data['0'][$_INFO];
      
      }
      
      Public Function 
    isBanned($_VALUE)
      {
        Global 
    $db;
      
        
    $Param = array(time(), $_VALUE);
      
        
    $Data $db->rawQuery("SELECT * FROM bans WHERE expire > ? AND value = ?"$Param);
        
        return ( 
    count($Data) == ) ? false true;


      }
      
      
      
      }
      
    ?>
    Code:
    function AppendSticker(e, t, n) {
    
    
        console.log('[' + Page + '] Kunta: Sticker with id "' + t + '" has been appended.');
    
    
        if (Owner == true) {
            var r = "draggable"
        } else {
            var r = ""
        }
        $("#myspace").append('<img id="' + t + '" style="' + n + '" class="' + r + ' delete" src="' + e + '"">');
        $(".draggable").draggable({
            containment: "parent",
            refreshPositions: true
        })
        
    }
    
    function NewSticker(e, t) {
        var n = {
            image: e,
            owner: t
        };
        $.ajax({
            data: n,
            url: "/Application/Ajax/__ajaxProfile.php?a=AddWidget&p=" + Player + "",
            type: "post",
            success: function (t) {
                AppendSticker(e, t, "position:absolute")
            }
        })
    }
    
    $.getJSON("/Application/Ajax/__ajaxProfile.php?a=GetWidgets&p=" + Player + "", function (e) {
            for (i = 0; i < e.length; i++) {
                var t = e[i];
                AppendSticker(t["url"], t["id"], t["style"])
            }
        });
    
    $(".save").click(function () {
            cn = document.getElementById("myspace").childNodes;
            for (var e = 0; e < cn.length; e++) {
                if (cn[e].nodeType == 1) {
                    var n = {
                        id: cn[e].id,
                        left: cn[e].style.left,
                        top: cn[e].style.top
                    };
                    $.ajax({
                        data: n,
                        url: "/Application/Ajax/__ajaxProfile.php?a=SavePosition",
                        type: "post",
                        cache: true,
                        async: false,
                        success: function (e) {}
                    })
                }
            }
            t("Your page has been saved.")
        });
    Last edited by Ray Boccino; 25-08-13 at 12:54 PM. Reason: Another snippet


  2. #2
    Iron like a Lion in Zion! vLife is offline
    Super ModRank
    Apr 2009 Join Date
    The BahamasLocation
    3,788Posts

    Re: KuntaCMS - Social Improvements [OOP][MYSQLi]

    Thread approve, but understand this is not a place to come and look for donations for your work.

  3. #3
    Evil Italian Overlowrd Droppy is offline
    [Internal Coder]Rank
    Feb 2012 Join Date
    /home/droppyLocation
    2,078Posts

    Re: KuntaCMS - Social Improvements [OOP][MYSQLi]

    I really like it. Good idea. Hope it come out, btw, there's more Snippets? This one isn't too much, but I'm really impressed.
    @Edit
    Does it will come with any other language, or we will need to translate by ourselves? Not that would be a problem, but just to know better haha :)
    Last edited by Droppy; 14-08-13 at 10:02 PM. Reason: Ask more one thing

  4. #4
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,610Posts

    Re: KuntaCMS - Social Improvements [OOP][MYSQLi]

    Nice ripped topbar.

  5. #5
    Valued Member Ray Boccino is offline
    MemberRank
    May 2012 Join Date
    130Posts

    Re: KuntaCMS - Social Improvements [OOP][MYSQLi]

    Quote Originally Posted by Droppy View Post
    I really like it. Good idea. Hope it come out, btw, there's more Snippets? This one isn't too much, but I'm really impressed.
    @Edit
    Does it will come with any other language, or we will need to translate by ourselves? Not that would be a problem, but just to know better haha :)
    Yeah it does have a language system, but I'm kinda lazy to do all languages. I think I'll do English and Spanish. I will post more snippets soon.

  6. #6
    Banned Phoqe is offline
    BannedRank
    Dec 2012 Join Date
    SwedenLocation
    148Posts

    Re: KuntaCMS - Social Improvements [OOP][MYSQLi]

    Looks pretty nice, me likeh! :)

  7. #7
    Banned bugme is offline
    BannedRank
    Feb 2007 Join Date
    1,380Posts

    Re: KuntaCMS - Social Improvements [OOP][MYSQLi]

    This is looking very interesting but what are you going to do with this CMS Once it's done because it's looking very interesting.

    Good luck & The design is very sexy.

  8. #8
    ayyy lmao Lagan is offline
    MemberRank
    Jan 2011 Join Date
    294Posts

    Re: KuntaCMS - Social Improvements [OOP][MYSQLi]

    How did you make the text for the 'banner'? I'm talking about the text that looks a bit like twitter.

  9. #9
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,479Posts

    Re: KuntaCMS - Social Improvements [OOP][MYSQLi]

    Nice work on CuntCMS (sorry first thing that came to mind when I saw the name). However a config file isn't a code snippet.

  10. #10
    Valued Member Ray Boccino is offline
    MemberRank
    May 2012 Join Date
    130Posts

    Re: KuntaCMS - Social Improvements [OOP][MYSQLi]

    Quote Originally Posted by Quackster View Post
    Nice work on CuntCMS (sorry first thing that came to mind when I saw the name). However a config file isn't a code snippet.
    I mean it shows more or less the features the CMS has and I think its an interesting piece of code... and it is code (?)

  11. #11
    Occasional Visitor Cecer is offline
    MemberRank
    Aug 2006 Join Date
    EnglandLocation
    743Posts

    Re: KuntaCMS - Social Improvements [OOP][MYSQLi]

    I recommend using Bcrypt over SHA-2 as it is future proof and is much easier to work with in my opinion.

    Here are some useful and informative links:
    How do you use bcrypt for hashing passwords in PHP? - Stack Overflow
    Simple PHP 5.3+ Bcrypt class

  12. #12
    Valued Member Ray Boccino is offline
    MemberRank
    May 2012 Join Date
    130Posts

    Re: KuntaCMS - Social Improvements [OOP][MYSQLi]

    Quote Originally Posted by Cecer View Post
    I recommend using Bcrypt over SHA-2 as it is future proof and is much easier to work with in my opinion.

    Here are some useful and informative links:
    How do you use bcrypt for hashing passwords in PHP? - Stack Overflow
    Simple PHP 5.3+ Bcrypt class
    I do want to work with bcrypt in the future, but now that I have everything auth-related done I think its just not worth it. In my opinion SHA-2 is fine for now. Maybe next time, thanks for the advice though.

  13. #13
    Member Japaojp is offline
    MemberRank
    Nov 2011 Join Date
    BrazilLocation
    95Posts

    Re: KuntaCMS - Social Improvements [OOP][MYSQLi]

    I love that, verry nice project! Good joob

  14. #14
    Valued Member Ray Boccino is offline
    MemberRank
    May 2012 Join Date
    130Posts

    Re: KuntaCMS - Social Improvements [OOP][MYSQLi]

    Quote Originally Posted by Japaojp View Post
    I love that, verry nice project! Good joob
    Thanks for the support. I appreciate it!

  15. #15
    Developer iGalaxy is offline
    MemberRank
    Jul 2013 Join Date
    C:/xampp/htdocsLocation
    488Posts

    Re: [PHP5] KuntaCMS - Social Improvements [OOP][MYSQLi]

    bro u planning to release for free?



Page 1 of 3 123 LastLast

Advertisement