/** * Function is responsible for locating the template to use * and showing it to the user */ function do_template() { //called last as default Router::connect('/:controller/:action/*'); $template = ''; $route = Router::parse(); if (is('five-contents') && ($template = get_real_template())) { } elseif (have_controller() && ($template = get_general_template())) { } // if we can't figure anything out, then return the 404 if (!($template = apply_filters('template_include', $template))) { $template = get_home_template(); } if (!headers_sent() && config('theme.gzip')) { ob_start("ob_gzhandler"); } //_520($template);_520(); // we want to get the template first and then echo it. // this allows redirects from any point within our program // this allows us to gzip the output as well echo get_show_view($template); }
/** * @Author Jonathon byrd * @link http://www.5twentystudios.com * @Package Five Twenty CMS * @SubPackage PublicMarketSpace * @Since 1.0.0 * @copyright Copyright (C) 2011 5Twenty Studios * */ defined('ABSPATH') or die("Cannot access pages directly."); global $cl; require_once ABSPATH . 'inc' . DS . 'func_product_root.php'; // START META AND TITLE INFO FOR PAGE $meta_desc = '<meta name="description" content="' . SITE_DESC . ' - '; $meta_keywords = '<meta name="keywords" content="' . SITE_KEYWORDS . ' - '; $title = '<title>'; $cl = new contentLogic(); $main = new main(); // SETUP TEMPLATE $template = ABSPATH . 'inc/tpl/shell.inc'; $output = new main_output($template); // CONTINUE META \\ $title .= ' - ' . SITE_TITLE . '</title>'; $meta_keywords .= '" />' . "\n"; $meta_desc .= '" />' . "\n"; $meta = $meta_desc . $meta_keywords . $title; // STRIP THE TAGS $output->replace_tags(array('header' => get_show_view('header'), 'footer' => get_show_view('footer'), 'shell_content' => $main->get_output())); // OUTPUT TO SCREEN $output->output_values();
if (BRequest::get('post', false)) { $user = FiveTable::getInstance('user'); $parts = explode(' ', BRequest::getVar('name', '')); $user->firstName = $parts[0]; if (isset($parts[1])) { unset($parts[0]); $user->lastName = implode(' ', $parts); } $user->email = BRequest::getVar('email', false); if (!$user->check()) { set_error($user->getErrors()); } elseif (!BRequest::getVar('agree', false)) { set_error('Make sure to agree to the Terms of Use.'); } else { $password = createRandomPassword(); $user->password = pw_encode($password); // this function also does a store procedure $secToken = $user->setRegistrationToken(); $user->store(); // send verification email $to = 'New User <' . $user->email . '>'; $args = array('subject' => EMAIL_REGISTER_SUBJECT, 'username' => $user->email, 'password' => $password, 'site_name' => SITE_NAME, 'site_title' => SITE_TITLE, 'verifyURL' => url("user/account?verify={$secToken}")); $returnOutput = get_show_view('email-register', $args); // CALL SEND EMAIL send_email($to, EMAIL_REGISTER_SUBJECT, $returnOutput, EMAIL_REGISTER_FROM); //success set_session($user->id, $user->username, $user->email, $user->zip); redirect(Router::url(array('controller' => 'user', 'action' => 'profile'))); } } require $view;
function pms_footer() { return get_show_view('footer'); }
/** * Function is responsible for calling in the main page content. * * @return unknown */ function five_main_content() { require_once dirname(__FILE__) . DS . "main.php"; return get_show_view('content-homepage'); }