本文整理匯總了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');
}