public function execute(CircuitController $c) { $userid = $c->getRequest()->get('userid'); $location = $this->import('Default.Gim')->get($userid); echo $location; exit; }
public function execute(CircuitController $c) { $r = $c->getRequest(); $message = "<p>You can't do stuff if we don't know who you are. Go log in!</p>"; $message .= "<p>If you're new here, <a href=\"" . $this->generateURL('Registration.Main') . '">Join Now</a>.</p>'; $r->set('error.title', 'Not Logged In'); $r->set('redirect.message', $message); $this->forward('Default.MessageDie'); }
public function execute(CircuitController $c) { $r = $c->getRequest(); $allblogs = $c->getModel('Landing.Land'); $newblog = $allblogs->getnewBlog(); $r->set('newblog', $newblog); //获取群组最新5片博文 $groups = $allblogs->getGroupList(); $r->set('group_l', $groups); }
public function execute(CircuitController $c) { $r = $c->getRequest(); $observer = $c->getObserver(); $forward_view = $observer->get('forward.view'); if (isset($forward_view) && trim($forward_view) != '') { $this->forward($forward_view); // forwarded to views for seconday login 5.7 CSR 2 } // Get the message data. Try the request container first, // only using the observer for backwards compatibility if ($r->isEmpty('redirect.message')) { //$observer = $c->getObserver(); $err_url = $observer->get('redirect.path'); $redir_wait = $observer->get('redirect.delay'); $err_code = $observer->get('error.code'); $err_msg = $observer->get('error.message'); $err_title = $observer->get('error.title'); $err_line = $observer->get('error.line'); $err_file = $observer->get('error.file'); $err_debug = $observer->get('error.debug'); } else { $err_url = $r->get('redirect.url'); $redir_wait = $r->get('redirect.delay'); $err_code = $r->get('redirect.code'); $err_msg = $r->get('redirect.message'); $err_title = $r->get('error.title'); $err_line = $r->get('error.line'); $err_file = $r->get('error.file'); $err_debug = $r->get('error.debug'); } // If a redirect URL is passed in, create a meta redirect if (!empty($err_url)) { if (!urlIsLocal($err_url)) { $err_url = 'http://' . MAIN_SERVER . '/404-not-found'; $observer->set('redirect_path', $err_url); $observer->set('redirect_url', $err_url); $this->forward('Default.404'); } if ($redir_wait === NULL) { $redir_wait = 3; } LM::setMeta('<meta http-equiv="refresh" content="' . $redir_wait . ';url=' . $err_url . '"/>'); } // Create a link to go ahead manually instead of waiting for the redirect if (!empty($err_url)) { $err_msg .= '<p>如果' . $redir_wait . '秒内没有跳转,请<a href="' . $err_url . '">点击这里</a>.</p>'; } else { if ($_SERVER['HTTP_REFERER'] == '') { $err_msg .= "<a onclick='history.back(-1)' style='cursor:pointer'>点击返回</a>"; } } message_die($err_code, $err_msg, $err_title, $err_line, $err_file, $err_debug); exit; }
public function execute(CircuitController $c) { $userid = $c->getRequest()->get('userid'); $location = $this->import('Default.Location')->get($userid); // Force no cache for location header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: post-check=0, pre-check=0', false); header('Pragma: no-cache'); header('location: ' . $location); // bye bye! exit; }
function execute(CircuitController $c) { $r = $c->getRequest(); $newblog = $r->get('newblog'); $this->set('newblog', $newblog); $group_l = $r->get('group_l'); $this->set('group_l', $group_l); // LM::setPageTitle('盖亚星空首页'); //LM::addCSS_IE('/src/css/screen_ie6.css',6); //LM::addScript("/src/js/newlanding/ie6png.js"); LM::renderHeader(); $this->addZoneContent('Landing.bloglist'); $this->addZoneContent('Landing.niuren'); LM::renderFooter(); }
public function execute(CircuitController $c) { $r = $c->getRequest(); $observer = $c->getObserver(); // Get the message data. Try the request container first, // only using the observer for backwards compatibility if ($r->isEmpty('error.message')) { $message = $observer->get('error.message'); $title = $observer->get('error.title'); $line = $observer->get('error.line'); $file = $observer->get('error.file'); $debug = $observer->get('error.debug'); } else { $message = $r->get('error.message'); $title = $r->get('error.title'); $line = $r->get('error.line'); $file = $r->get('error.file'); $debug = $r->get('error.debug'); } if (strlen($title) < 1) { $title = 'ERROR'; } if (strlen($message) < 1) { $message = 'An error occured'; } $debug_str = ''; if (!SC::isEmpty('board_config.enable_debug')) { $location_format = "\nFILE: %s\nLINE: %s\n"; $debug_str = strlen($line) > 0 && strlen($file) > 0 ? sprintf($location_format, $file, $line) : ''; if (!empty($debug) && !is_scalar($debug)) { ob_start(); var_dump($debug); $debug = ob_get_contents(); ob_end_clean(); } $debug_str .= "\n\nDEBUG\n{$debug}\n"; } $format = "<pre>%s\n%s\n\n%s\n</pre>\n\n"; $output = sprintf($format, $title, $message, $debug_str); DBFactory::closeAll(); die($output); exit; }
public function execute(CircuitController $c) { //get the observer... $observer = $c->getObserver(); //get the URL... $url = !$c->getRequest()->isEmpty('redirect') ? $c->getRequest()->get('redirect') : $observer->get('redirect.path'); //if it isn't local or it's empty, throw it out NOW... if (!urlIsLocal($url)) { $this->forward('default.404'); } //handle our redirect if this is a JSON call... if ($c->getRequest()->get('ajax')) { $output = array('type' => 'redirect', 'url' => $url); $this->set('data', $output); $this->render('default.jsonresponse'); } else { redirect($url); } // bye bye! exit; }
function execute(CircuitController $c) { $userid = $c->getRequest()->get('userid'); $c->getModel('Default.Location')->load($userid); return VIEW_SUCCESS; }
// | Author 72squared (john@gaiaonline.com) | // | | // | Copyright (c) Gaia Online 2005 | // | | // | For the full copyright and license information, please view the LICENSE | // | file that was distributed with this source code. | // +---------------------------------------------------------------------------+ /** * To use this file, simply run the following symlink command: * * ln -s ~/code/private/circuit-apps/clearinghouse/public/index.php ~/code/public_html/order/index.php */ // find web root directory $path = substr(__FILE__, 0, strpos(__FILE__, 'private/') + 8); // include script setup. require_once $path . 'common.php'; // include the circuit framework require_once DIR_CLASSES . 'circuit.inc.php'; // intialize the controller $controller = new CircuitController(); // set the path $controller->setAppDIR(DIR_CIRCUIT_APPS); // if URL metered for this person send them away if (!metered_release($_SERVER['REQUEST_URI'])) { $controller->dispatch('Default.MeteredRelease'); exit; } // execute the request. $controller->dispatch('Default.Router'); // all done! exit. exit;