本文整理汇总了PHP中Publisher::GetAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Publisher::GetAll方法的具体用法?PHP Publisher::GetAll怎么用?PHP Publisher::GetAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Publisher
的用法示例。
在下文中一共展示了Publisher::GetAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Add
public function Add($params)
{
//print_r($_SESSION['user']);
if (user_admin()) {
$this->view->Show('book_add.tpl', array('books' => Book::Find($this->conn, $params['pubId'], $params['catId']), 'pubs' => array(-1 => '- Все -') + Publisher::GetAll($this->conn), 'pubId' => $params['pubId'], 'cats' => array(-1 => '- Все -') + Category::GetAll($this->conn), 'catId' => $params['catId']));
} else {
$this->view->Show('access_denied.tpl', array('mode' => 'Добавление книги'));
}
}
示例2: Index
public function Index($params)
{
$this->view->Show('books.tpl', array('books' => Book::Find($this->conn, $params['pubId'], $params['catId'], $params['authId']), 'pubs' => array(-1 => '- Все -') + Publisher::GetAll($this->conn), 'pubId' => $params['pubId'], 'cats' => array(-1 => '- Все -') + Category::GetAll($this->conn), 'catId' => $params['catId'], 'auth' => array(-1 => '- Все -') + Author::GetAll($this->conn), 'authId' => $params['authId']));
// $this->smarty->assign('books', Book::Find($this->conn, $params['pubId'], $params['catId']));
//
// $this->smarty->assign('pubs', array(-1 => '- Все -') + Publisher::GetAll($this->conn));
// $this->smarty->assign('pubId', $params['pubId']);
//
// $this->smarty->assign('cats', array(-1 => '- Все -') + Category::GetAll($this->conn));
// $this->smarty->assign('catId', $params['catId']);
//
// $this->smarty->display('books.tpl');
}