本文整理汇总了PHP中PageManager::editPage方法的典型用法代码示例。如果您正苦于以下问题:PHP PageManager::editPage方法的具体用法?PHP PageManager::editPage怎么用?PHP PageManager::editPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageManager
的用法示例。
在下文中一共展示了PageManager::editPage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editPage
function editPage()
{
global $mainframe, $option;
$db =& JFactory::getDBO();
$user =& JFactory::getUser();
$cid = JRequest::getVar('cid', array(0), '', 'array');
$option = JRequest::getCmd('option');
$uid = (int) @$cid[0];
$row =& JTable::getInstance('flippingpage', 'Table');
$row->load($uid);
$query = 'SELECT id FROM #__flippingbook_books';
$db->setQuery($query);
if (count($db->loadObjectList()) < 1) {
$msg = JText::_('CREATE A BOOK FIRST');
$link = 'index.php?option=com_flippingbook&task=book_manager';
$mainframe->redirect($link, $msg);
return;
}
$query = 'SELECT id, title FROM #__flippingbook_books ORDER BY title';
$db->setQuery($query);
$book_rows = $db->loadObjectList();
$book_filter[] = JHTML::_('select.option', -1, '- ' . JText::_('Select Book') . ' -');
foreach ($book_rows as $book_row) {
$book_option[] = JHTML::_('select.option', $book_row->id, $book_row->title);
}
$lists['books'] = JHTML::_('select.genericlist', $book_option, 'book_id', 'class="inputbox" size="1"', 'value', 'text', $row->book_id);
$lists['files'] = $this->getFilesSelectBox('file', $row->file, 0, 'jpg|jpeg|swf|JPG|JPEG|SWF', '');
$lists['zoomed_image'] = $this->getFilesSelectBox('zoom_url', $row->zoom_url, 1, 'jpg|jpeg|swf|JPG|JPEG|SWF', 'onchange="update_fields_state();"');
require_once JPATH_COMPONENT . DS . 'views' . DS . 'page_manager.php';
PageManager::editPage($row, $lists);
}