/** * [index 产品列表] * uri domain/nidtype/nid/page * @param string $nidtype [description] * @param integer $page [description] * @param string $nid [description] * @return [type] [description] */ public function index($nidtype = 'article', $nid = '') { if (isPost()) { extract($_POST); } if (isGet()) { extract($_GET); } /* ----------------------------------------------------- * Talbe Field * ----------------------------------------------------- */ $param['data'] = array('nidtype' => $nidtype, 'nid' => $nid); /* ----------------------------------------------------- * Page Param * ----------------------------------------------------- */ $param['page'] = isset($page) ? $page : 1; $param['page_size'] = 1; //当前页数 $param['show_page'] = 5; //页面banner能显示页数 $datalist = $this->cinode->select($param); $this->cismarty->assign("datalist", $datalist['data']); $this->cismarty->assign("pages", $datalist['pagebanner']); //传入菜单按钮active状态 $this->cismarty->assign("active", array(__CLASS__, __FUNCTION__)); $title = t("article_list"); $this->cismarty->assign("title", $title); $this->cismarty->display("nodearticle/nodearticle_index.html"); }
public function index($nidtype = 'news', $nid = '') { if (isPost()) { extract($_POST); } if (isGet()) { extract($_GET); } /* ----------------------------------------------------- * Talbe Field * ----------------------------------------------------- */ $param['data'] = array('nidtype' => $nidtype, 'nid' => $nid); /* ----------------------------------------------------- * Page Param * ----------------------------------------------------- */ $param['page'] = isset($page) ? $page : 1; $param['page_size'] = 3; //每页显示条数 $param['show_page'] = 5; //页面banner能显示页数 $param['uri'] = 'news?page='; $datalist = $this->cinode->select($param); $this->put("list", $datalist['data']); debug($datalist['data'], DEBUGPATH, 'news datalist'); $this->put("pagerbar", $datalist['pagebanner']); $this->render('news_list.html'); }
function get(&$value, $name) { if (isGet($name)) { $value = $_GET[$name]; return TRUE; } else { return FALSE; } }
public function index() { if (isPost()) { extract($_POST); } if (isGet()) { extract($_GET); } print_r($this->cirbac->index()); }
public function index($nidtype = 'taxonomy', $nid = '') { if (isPost()) { extract($_POST); } if (isGet()) { extract($_GET); } $datalist['data'] = $this->citaxonomy->leaf(0); $this->put("list", $datalist['data']); $this->render('taxo_list.html'); }
function do_login() { if (isGet()) { $this->render(); } else { if (isPost()) { $user = modelFind('User', 'email', param('email')); if ($user->isPassword(param('password'))) { $this->session->set_userdata('user', $user->id); $this->returnTo(url_to($user)); } else { $this->flash('Login failed - please try again'); redirect(url_to($user, 'login')); } } } }
/** * @author Luffy <*****@*****.**> * @Desc:后台用户列表显示 * @Time:2015年8月8日 23:22:08 */ public function index($page = 1) { if (isPost()) { extract($_POST); } if (isGet()) { extract($_GET); } //传入菜单按钮active状态 $this->cismarty->assign("active", array(__CLASS__, __FUNCTION__)); $title = t("user_list"); $this->cismarty->assign("title", $title); $param['page'] = intval($page); $param['page_size'] = 2; //每个分页显示的记录行数 $param['show_page'] = 5; //banner显示条数 $userlist = $this->ciuser->user_get_user($param); $this->cismarty->assign("userlist", $userlist['data']); $this->cismarty->assign("pages", $userlist['pagebanner']); $this->cismarty->display("user_index.html"); //$this->cismarty->display("admin/default/theme_index.html"); }
/** * [index 产品列表] * uri domain/nidtype/nid/page * @param string $nidtype [description] * @param integer $page [description] * @param string $nid [description] * @return [type] [description] */ public function index($nidtype = '', $nid = '') { if (isPost()) { extract($_POST); } if (isGet()) { extract($_GET); } /* ----------------------------------------------------- * Talbe Field * ----------------------------------------------------- */ $param['data'] = array('nidtype' => $nidtype, 'nid' => $nid); /* ----------------------------------------------------- * Page Param * ----------------------------------------------------- */ $param['page'] = isset($page) ? $page : 1; $param['page_size'] = 1; //当前页数 $param['show_page'] = 5; //页面banner能显示页数 print_r($this->cinode->select($param)); }
public function nodegetone($data = array()) { /* ---------------------------------------- [example] $data['nid'] = 1; $data['nodetype'] =1; * ---------------------------------------- */ if (empty($data)) { if (isPost()) { extract($_POST); } if (isGet()) { extract($_GET); } } return $this->getOne($data); }
function delete() { if (isPost()) { extract($_POST); } if (isGet()) { extract($_GET); } /** 模拟数据 */ $_POST['data'] = array(array('nidtype' => 'message_voicetesdfsd'), array('nidtype' => 'message_voicetest')); extract($_POST); cprint($this->cinode->node_type_delete($data)); }
/** * @expectedException \PHPUnit_Framework_AssertionFailedError */ public function testIsGetCanFail() { assertThat(new Request('POST', '/'), isGet()); }