[pre-release] dev cms

Page 5 of 5 FirstFirst 12345
Results 61 to 63 of 63
  1. #61
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: [pre-release] dev cms

    I've been pretty busy for the past week, but here's the new template class that'll I'll be using from now on. Basically I didn't like the fact that the template class (original) was using two classes and that there were functions inside the class that weren't needed etc.

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

    class 
    template
    {
        private 
    $template NULL;
        private 
    $input = array ();
        private 
    $output;

        public function 
    template ($string)
        {
            
    $this->template $string;
        }
        
        public function 
    template_page ()
        {
            
    extract ($this->input);
            
            
    $input = ('resources/resources_private/private_template/template_private/'.$this->template.'.tpl');
            
            if (
    file_exists($input))
            {
                
    ob_start ();
                include (
    $input);
                
    $output ob_get_contents ();
                
    ob_end_clean ();
                
                return 
    $this->template_filter_input ($output);
            }
            else
            {
                exit (
    '<h1>Access denied</h1><p>Template ('.$this->template.') does not have the privileges to access this webpage.</p>');
            }
        }
        
        private function 
    template_filter_input ($string)
        {
            foreach (
    $this->input as $input => $output)
            {
                if (
    is_object($output))
                {
                    continue;
                }
                
                
    $string str_ireplace ('%'.$input.'%'$output$string);
            }
            
            return 
    $string;
        }
        
        public function 
    template_input ($input$output)
        {
            
    $this->input[$input] = is_object ($output) ? $output->fetch () : $output;
        }
        
        public function 
    template_output ()
        {
            
    $this->output .= $this->template_page ();
            echo 
    $this->template_filter_input ($this->output);
        }
    }
    ?>

  2. #62
    Enthusiast xSeebaa is offline
    MemberRank
    Mar 2013 Join Date
    30Posts

    Re: [pre-release] dev cms

    Database for this cms?

  3. #63
    Valued Member Xversion is offline
    MemberRank
    Mar 2012 Join Date
    LocalhostLocation
    144Posts

    Re: [pre-release] dev cms

    Notice: Undefined index: p in C:\xampp2\htdocs\xabbo2\index.php on line 12

    Notice: Undefined variable: result in C:\xampp2\htdocs\xabbo2\private\application\library\class.html.php on line 44

    Notice: Undefined variable: result in C:\xampp2\htdocs\xabbo2\private\application\library\class.html.php on line 392

    Notice: Undefined variable: errors in C:\xampp2\htdocs\xabbo2\private\application\theme\public\login.php on line 89
    I get those errors, and can we please have the database file? prefer if its compatible with Butterstorm



Page 5 of 5 FirstFirst 12345

Advertisement