[pre-release] dev cms

Page 1 of 3 123 LastLast
Results 1 to 25 of 63
  1. #1
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    [pre-release] dev cms

    I had this lying around that I was working on at one point, this ain't a full release, there are things that need to be finished on, but maybe you guys want to finish it, or rip some of the pages to add to your own? Everything is my own coding, except the template system that was from UberCMS, although the structure system is a lot better.

    Attachments are below

    Some code:

    PHP Code:
    <?php 
    if (!defined('IN_PAGES'))
    {
        die (
    '<h1>Access denied</h1><p>You do not have the privileges to access this webpage.</p>');
    }

    class 
    html
    {
        public static function 
    meta ()
        {
            GLOBAL 
    $config;
            return (
    '<meta name="description" content="Check into the world\'s largest virtual hotel for FREE! Meet and make friends, play games, chat with others, create your avatar, design rooms and more..." />
            <meta name="keywords" content="'
    .strtolower($config['www']['name']).' hotel, virtual, world, social network, free, community, avatar, chat, online, teen, roleplaying, join, social, groups, forums, safe, play, games, online, friends, teens, rares, rare furni, collecting, create, collect, connect, furni, furniture, pets, room design, sharing, expression, badges, hangout, music, celebrity, celebrity visits, celebrities, mmo, mmorpg, massively multiplayer">');
        }
        
        public static function 
    header ()
        {
            GLOBAL 
    $config;
            
    $colour = array();
            
            if (isset(
    $_GET['p']))
            {
                if (
    $_GET['p'] == 'me')
                {
                    
    $colour[0] = ' white';
                }
                else if (
    $_GET['p'] == 'home')
                {
                    
    $colour[1] = ' class="white"';
                }
                else if (
    $_GET['p'] == 'account')
                {
                    
    $colour[2] = ' class="white"';
                }
                else if (
    $_GET['p'] == 'news')
                {
                    
    $colour[3] = ' class="white"';
                }
                else if (
    $_GET['p'] == 'staff')
                {
                    
    $colour[4] = ' class="white"';
                }
                else if (
    $_GET['p'] == 'shop')
                {
                    
    $colour[5] = ' class="white"';
                }
                else
                {
                    
    $colour NULL;
                }
            }
            
            return (
    '<div id="container-header">
                <div id="backdrop"></div>
                <div class="container">
                    <div id="container-navigation">
                        <a href="'
    .$config['www']['url'].'/?p=me" target="_self" id="logo"></a>
                        <ul class="navigation">
                            <li><a href="'
    .$config['www']['url'].'/?p=me" target="_self" class="first'.$colour[0].'">Predict</a></li>
                            <li><a href="'
    .$config['www']['url'].'/?p=home" target="_self"'.$colour[1].'>Home</a></li>
                            <li><a href="'
    .$config['www']['url'].'/?p=account" target="_self"'.$colour[2].'>Account</a></li>
                            <li><a href="'
    .$config['www']['url'].'/?p=news" target="_self"'.$colour[3].'>News</a></li>
                            <li><a href="'
    .$config['www']['url'].'/?p=staff" target="_self"'.$colour[4].'>Staff</a></li>
                            <li><a href="'
    .$config['www']['url'].'/?p=shop" target="_self"'.$colour[5].'>Shop</a></li>
                            <li><a href="'
    .$config['www']['url'].'/?p=logout" target="_self" class="last">Logout</a></li>
                        </ul>
                        <ul class="navigation">
                            <li><a href="'
    .$config['www']['url'].'/?p=client" target="_self" class="first green">Enter '.$config['www']['name'].' Hotel</a></li>
                            <li><a href="'
    .$config['www']['url'].'/?p=users" target="_self" class="last white">0 &nbsp; users online</a></li>
                        </ul>
                    </div>
                </div>
            </div>'
    );
        }
        
        public static function 
    advertisement ()
        {
            return (
    '<div id="container-column-03" class="container-column">
                    <div class="container-title orange">Advertisement</div>
                    <div class="container-body"></div>
                </div>'
    );
        }

        public static function 
    footer ()
        {
            GLOBAL 
    $config;
            return (
    '<div id="container-footer">
                    <a href="'
    .$config['www']['url'].'/" target="_self" class="link">Homepage</a> | 
                    <a href="'
    .$config['www']['url'].'/?p=paper&sub=1" target="_self" class="link">Terms of use</a> | 
                    <a href="'
    .$config['www']['url'].'/?p=paper&sub=2" target="_self" class="link">Privacy policy</a> | 
                    <a href="'
    .$config['www']['url'].'/?p=paper&sub=3" target="_self" class="link">'.$config['www']['name'].' way</a>
                </div>'
    );
        }
    }
    ?>
    PHP Code:
    <?php
    define 
    ('IN_PAGES'true);

    require_once (
    'private/application/bootstrap.php');

    $page NULL;

    if (isset(
    $_POST['p']) || isset($_GET['p']))
    {
        
    $initial NULL;
        
        if (
    $_POST['p'])
        {
            
    $initial $_POST['p'];
        }
        else if (
    $_GET['p'])
        {
            
    $initial $_GET['p'];
        }

        
    $page strtolower(trim(htmlentities($initial)));
    }

    if (isset(
    $_SESSION['username']) && isset($_SESSION['password']))
    {
        if (
    $usr->user_login($_SESSION['username'], $_SESSION['password']))
        {
            
    define ('LOGGED_IN'true);
        }
        else
        {
            
    define ('LOGGED_IN'false);
        }
    }
    else
    {
        
    define ('LOGGED_IN'false);
    }

    if (
    $page == NULL)
    {
        
    $initial NULL;
        
        if (
    LOGGED_IN)
        {
            
    $initial 'me';
        }
        else
        {
            
    $initial 'login';
        }

        
    header ('Location: '.$config['www']['url'].'/?p='.$initial);
        exit;
    }

    switch(
    $page)
    {
        case 
    'logout':
            unset (
    $_SESSION['username']);
            unset (
    $_SESSION['password']);
            
    header ('Location: '.$config['www']['url'].'/?p=login');
            exit;
        break;
        
        case 
    'ase';
            if (!
    LOGGED_IN// CHANGE
            
    {
                require_once (
    'private/application/theme/public/housekeeping/dash.php');
            }
            else
            {
                require_once (
    'private/application/theme/public/error.php');
            }
        break;
        
        default:
            if (
    file_exists('private/application/theme/public/'.$page.'.php'))
            {
                require_once (
    'private/application/theme/public/'.$page.'.php');
            }
            else
            {
                require_once (
    'private/application/theme/public/error.php');
            }
        break;
    }
    ?>
    PHP Code:
    <?php 
    if (!defined('IN_PAGES'))
    {
        die (
    '<h1>Access denied</h1><p>You do not have the privileges to access this webpage.</p>');
    }

    if(isset(
    $_SERVER['HTTP_CF_CONNECTING_IP']))
    {
        
    $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
    }

    // error_reporting(0);
    date_default_timezone_set('Europe/London');

    require_once (
    'private/application/config/config.php');

    require_once (
    'private/application/library/class.mysqli.php');
        
    $db = new db_mysqli($config['mysqli']['hostname'], $config['mysqli']['username'], $config['mysqli']['password'], $config['mysqli']['database']);

    require_once (
    'private/application/library/class.template.php');
        
    $tpl = new template();

    require_once (
    'private/application/library/class.user.php');
        
    $usr = new user();

    require_once (
    'private/application/library/class.html.php');

    session_start();
    ?>
    Attached Thumbnails Attached Thumbnails tit.png   tits.png   sexy_time.png  
    Attached Files Attached Files


  2. #2
    ignition sequence start Unphased is offline
    MemberRank
    Jul 2012 Join Date
    DeniedLocation
    1,860Posts

    Re: [pre-release] dev cms

    It looks nice. You should have started this in the development section. Although you're releasing it, it's not finished. Would have been a better idea to make a thread regarding the development of this CMS and then work on it until it's fully built.

  3. #3
    .io developer JPride is offline
    MemberRank
    Sep 2013 Join Date
    The Next LegendLocation
    481Posts

    Re: [pre-release] dev cms

    I am not so keen on it myself needs a little be more worked added to it. 5/10

  4. #4
    Account Upgraded | Title Enabled! J4y2 is offline
    MemberRank
    Feb 2012 Join Date
    South KoreaLocation
    317Posts

    Re: [pre-release] dev cms

    Too bad its not finished, Love the design
    Last edited by J4y2; 26-10-13 at 02:34 PM.

  5. #5
    Novice Exophyte is offline
    MemberRank
    Sep 2013 Join Date
    2Posts

    Re: [pre-release] dev cms

    Testing this out and I'm receiving "Please enter a username that does not already exist." I'm testing this out on a clean database with no users registered, so... What exactly is the problem?

    Besides that it looks good, good work.

  6. #6
    Account Upgraded | Title Enabled! Bow is offline
    MemberRank
    Jan 2012 Join Date
    407Posts

    Re: [pre-release] dev cms

    Looks nice. Reminds me of Louis (Lazarus)'s CMS' though.

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

    Re: [pre-release] dev cms

    Yes it uses some graphics from HabJoy / WabboCMS//

    Nice release Predict. Sucks you never finished it. Always loved you developments :)

    Cheers!

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

    Re: [pre-release] dev cms

    I liked it, but you should put more specifications though...

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

    Re: [pre-release] dev cms

    So, what makes this CMS better then the one you made before?

  10. #10
    Alpha Member Emily is offline
    MemberRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,408Posts

    Re: [pre-release] dev cms

    IDK why but I don't really like the PHP.

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

    Re: [pre-release] dev cms

    Quote Originally Posted by Tha View Post
    IDK why but I don't really like the PHP.
    How is that relevant at all?

    As for this CMS the presentation of the code could use some work, design is OKAY but not the best.

  12. #12
    Zephyr Studios PRIZM is offline
    MemberRank
    Feb 2012 Join Date
    DenmarkLocation
    2,291Posts

    Re: [pre-release] dev cms

    Nice release! You're definitely a tits lover

  13. #13
    I don't even know azaidi is offline
    MemberRank
    Apr 2010 Join Date
    the NetherlandsLocation
    2,065Posts

    Re: [pre-release] dev cms

    I don't like the header function. You're going to get e_notices because you're using keys in the array that aren't there if you're not on that page. Other than that I like the design

    if ($_POST['p']) -> Why not just if (isset($_POST['p']))? Wouldn't the first thing throw a notice if it isn't set? Same thing for the GET btw

  14. #14
    Alpha Member Emily is offline
    MemberRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,408Posts

    Re: [pre-release] dev cms

    Quote Originally Posted by ησвяαιη View Post
    How is that relevant at all?

    As for this CMS the presentation of the code could use some work, design is OKAY but not the best.
    Just saying. Nothing special besides just telling. But it's my opinion.

  15. #15
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: [pre-release] dev cms

    Thanks guys, if there anything that can be improved upon, don't hesitate to post patches/updates to improve the bases of things
    jaja

  16. #16
    Enthusiast Cody Allan is offline
    MemberRank
    Nov 2012 Join Date
    46Posts

    Re: [pre-release] dev cms

    lol so thats where my co-owner found that index page

  17. #17
    Enthusiast Didie Thiago is offline
    MemberRank
    Jun 2013 Join Date
    AustraliaLocation
    45Posts

    Re: [pre-release] dev cms

    no your index is wabbo index someone released it along with the register page :P

  18. #18
    Member TR10G33K is offline
    MemberRank
    Jan 2013 Join Date
    NetherlandsLocation
    71Posts

    Re: [pre-release] dev cms

    PHP Code:
      if (isset($_GET['p'])) 
            { 
                if (
    $_GET['p'] == 'me'
                { 
                    
    $colour[0] = ' white'
                } 
                else if (
    $_GET['p'] == 'home'
                { 
                    
    $colour[1] = ' class="white"'
                } 
                else if (
    $_GET['p'] == 'account'
                { 
                    
    $colour[2] = ' class="white"'
                } 
                else if (
    $_GET['p'] == 'news'
                { 
                    
    $colour[3] = ' class="white"'
                } 
                else if (
    $_GET['p'] == 'staff'
                { 
                    
    $colour[4] = ' class="white"'
                } 
                else if (
    $_GET['p'] == 'shop'
                { 
                    
    $colour[5] = ' class="white"'
                } 
                else 
                { 
                    
    $colour NULL
                } 
            } 
    Start using switch statements man...

  19. #19
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,483Posts

    Re: [pre-release] dev cms

    Quote Originally Posted by TR10G33K View Post
    PHP Code:
      if (isset($_GET['p'])) 
            { 
                if (
    $_GET['p'] == 'me'
                { 
                    
    $colour[0] = ' white'
                } 
                else if (
    $_GET['p'] == 'home'
                { 
                    
    $colour[1] = ' class="white"'
                } 
                else if (
    $_GET['p'] == 'account'
                { 
                    
    $colour[2] = ' class="white"'
                } 
                else if (
    $_GET['p'] == 'news'
                { 
                    
    $colour[3] = ' class="white"'
                } 
                else if (
    $_GET['p'] == 'staff'
                { 
                    
    $colour[4] = ' class="white"'
                } 
                else if (
    $_GET['p'] == 'shop'
                { 
                    
    $colour[5] = ' class="white"'
                } 
                else 
                { 
                    
    $colour NULL
                } 
            } 
    Start using switch statements man...
    They are if statements.

  20. #20
    Member TR10G33K is offline
    MemberRank
    Jan 2013 Join Date
    NetherlandsLocation
    71Posts

    Re: [pre-release] dev cms

    Quote Originally Posted by Quackster View Post
    They are if statements.
    You didn't read my comment, I said that he should start using Switch statements for the code i showed...

  21. #21
    Old Habbo Developer AresCJ is offline
    MemberRank
    Jan 2009 Join Date
    USALocation
    1,183Posts

    Re: [pre-release] dev cms

    Dan, I'm surprised you even came back! Hit me up.

  22. #22
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,483Posts

    Re: [pre-release] dev cms

    Quote Originally Posted by TR10G33K View Post
    You didn't read my comment, I said that he should start using Switch statements for the code i showed...
    My mistake, I read that as stop.

  23. #23
    I don't even know azaidi is offline
    MemberRank
    Apr 2010 Join Date
    the NetherlandsLocation
    2,065Posts

    Re: [pre-release] dev cms

    Quote Originally Posted by TR10G33K View Post
    PHP Code:
      if (isset($_GET['p'])) 
            { 
                if (
    $_GET['p'] == 'me'
                { 
                    
    $colour[0] = ' white'
                } 
                else if (
    $_GET['p'] == 'home'
                { 
                    
    $colour[1] = ' class="white"'
                } 
                else if (
    $_GET['p'] == 'account'
                { 
                    
    $colour[2] = ' class="white"'
                } 
                else if (
    $_GET['p'] == 'news'
                { 
                    
    $colour[3] = ' class="white"'
                } 
                else if (
    $_GET['p'] == 'staff'
                { 
                    
    $colour[4] = ' class="white"'
                } 
                else if (
    $_GET['p'] == 'shop'
                { 
                    
    $colour[5] = ' class="white"'
                } 
                else 
                { 
                    
    $colour NULL
                } 
            } 
    Start using switch statements man...
    Array or something dynamic would be better, I don't like having 20 ifs/switches for different pages

  24. #24
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: [pre-release] dev cms

    Quote Originally Posted by azaidi View Post
    Array or something dynamic would be better, I don't like having 20 ifs/switches for different pages
    To solve this method I would put the pages names into a table and fetch each field from a loop to make it dynamic and with doing so I would fetch each field with $_GET to see if the page is active or not with doing so will add a class. Something like that anyway

  25. #25
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: [pre-release] dev cms

    Quote Originally Posted by Predict View Post
    To solve this method I would put the pages names into a table and fetch each field from a loop to make it dynamic and with doing so I would fetch each field with $_GET to see if the page is active or not with doing so will add a class. Something like that anyway
    Here is for whoever wanted the header dynamic, there are some flaws making it dynamic, mainly a .CSS class and naming the first page appropriately, but anyway.

    PHP Code:
        public static function header ()
        {
            GLOBAL 
    $config$db;
            
    $query 'SELECT page_name FROM www_header ORDER BY ID LIMIT 10'// LIMIT IS 10 SO IT DONT RUIN STYLE
            
    $statement $db->prepare($query);
            if(
    $statement)
            {
                
    $statement->execute();
                
    $statement->bind_result($page_name);
                while(
    $statement->fetch())
                {
                    if (
    strtolower($page_name) == $_GET['p'])
                    {
                        
    $result .= '<li><a href="'.$config['www']['url'].'/?p='.strtolower($page_name).'" target="_self" class="white">'.$page_name.'</a></li>';
                    }
                    else
                    {
                        
    $result .= '<li><a href="'.$config['www']['url'].'/?p='.strtolower($page_name).'" target="_self">'.$page_name.'</a></li>';
                    }
                }
                
    $statement->close();
            }
            
            return (
    '<div id="container-header">
                <div id="backdrop"></div>
                <div class="container">
                    <div id="container-navigation">
                        <a href="'
    .$config['www']['url'].'/?p=me" target="_self" id="logo"></a>
                        <ul class="navigation">
                            '
    .$result.'
                            <li><a href="'
    .$config['www']['url'].'/?p=logout" target="_self" class="last">Logout</a></li>
                        </ul>
                        <ul class="navigation">
                            <li><a href="'
    .$config['www']['url'].'/?p=client" target="_self" class="first green">Enter '.$config['www']['name'].' Hotel</a></li>
                            <li><a href="'
    .$config['www']['url'].'/?p=users" target="_self" class="last white">0 &nbsp; users online</a></li>
                        </ul>
                    </div>
                </div>
            </div>'
    );
                
        } 
    Code:
    -- phpMyAdmin SQL Dump
    -- version 3.5.5
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Oct 30, 2013 at 12:59 PM
    -- Server version: 5.1.69
    -- PHP Version: 5.3.17
    
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    SET time_zone = "+00:00";
    
    
    /*!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 */;
    
    --
    -- Database: `barneyx1_x1`
    --
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `www_header`
    --
    
    CREATE TABLE IF NOT EXISTS `www_header` (
      `ID` int(11) NOT NULL AUTO_INCREMENT,
      `page_name` text NOT NULL,
      PRIMARY KEY (`ID`),
      UNIQUE KEY `ID_2` (`ID`),
      KEY `ID` (`ID`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
    
    --
    -- Dumping data for table `www_header`
    --
    
    INSERT INTO `www_header` (`ID`, `page_name`) VALUES
    (1, 'Me'),
    (2, 'Home'),
    (3, 'Account'),
    (4, 'News'),
    (5, 'Staff'),
    (6, 'Shop');
    
    /*!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 */;



Page 1 of 3 123 LastLast

Advertisement