/** * Construct and initilize */ public function __construct() { $this->config = MDL_Config::getInstance(); $this->acl = MDL_ACL::getInstance(); $this->locator = MDL_Locator::getInstance(); $this->view = MDL_View::getInstance(); $this->view->setTheme($this->config->getVar('theme')); $this->path_option = BFL_PathOption::getInstance(); }
function getOrder() { $path_option = BFL_PathOption::getInstance(); $order = $path_option->getVar('order'); if ($order == false) { $order = 'asc'; } return $order; }
public function dispatch() { $this->actCustomRouter(); $this->formatPath(); $path_option = BFL_PathOption::getInstance(); $class_name = $this->controller_prefix . '_' . $path_option->getPathSection(0); $action_name = $this->action_prefix . '_' . $path_option->getPathSection(1); if (BFL_Loader::controllerExist($class_name)) { $ctl = new $class_name(); if (method_exists($ctl, $action_name)) { $ctl->{$action_name}(); } else { if (method_exists($ctl, 'SAC_otherAction')) { $ctl->SAC_otherAction(); } else { $this->notFound(); } } } else { $this->notFound(); } }
<?php $this->title = '用户列表'; $this->display('header.php'); $path_option = BFL_PathOption::getInstance(); ?> <table border="1"> <tr> <td>ID</td> <td>用户名</td> <td>用户昵称</td> <td><a href="<?php echo $path_option->getURL(array('by' => 'ac', 'order' => getOrderOp())); ?> ">通过数量</a></td> <td>通过率</td> </tr> <?php foreach ($this->list->getList() as $user) { ?> <?php $user_id = $user->getID(); ?> <?php $user_name = $user->getName(); ?> <?php $user_nickname = $user->getNickname(); ?> <tr>
private static function list_navigation_make_url($page, $display) { $target_url = BFL_PathOption::getInstance()->getURL(array('page' => $page)); return "<span><a href=\"{$target_url}\" title=\"{$page}\">{$display}</a></span>"; }