本文整理汇总了PHP中JView类的典型用法代码示例。如果您正苦于以下问题:PHP JView类的具体用法?PHP JView怎么用?PHP JView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
global $mainframe;
// Check if registration is allowed
$usersConfig =& JComponentHelper::getParams('com_users');
if (!$usersConfig->get('allowUserRegistration')) {
JError::raiseError(403, JText::_('Access Forbidden'));
return;
}
$pathway =& $mainframe->getPathway();
$document =& JFactory::getDocument();
$params =& $mainframe->getParams();
// Page Title
$menus =& JSite::getMenu();
$menu = $menus->getActive();
// because the application sets a default page title, we need to get it
// right from the menu item itself
if (is_object($menu)) {
$menu_params = new JParameter($menu->params);
if (!$menu_params->get('page_title')) {
$params->set('page_title', JText::_('Registration'));
}
} else {
$params->set('page_title', JText::_('Registration'));
}
$document->setTitle($params->get('page_title'));
$pathway->addItem(JText::_('New'));
// Load the form validation behavior
JHTML::_('behavior.formvalidation');
$user =& JFactory::getUser();
$this->assignRef('user', $user);
$this->assignRef('params', $params);
parent::display($tpl);
}
示例2: display
function display($tpl = null)
{
global $mainframe, $option;
$cid = JRequest::getVar('cid_user');
if (!is_array($cid)) {
$mainframe->redirect('index.php?option=' . $option);
return;
}
$user_id = $cid[0];
$model = $this->getModel('user');
$model->load($user_id);
$this->_setToolBar();
$say = JText::sprintf('USER_RESOURCES_TITLE', $model->user->username);
$root_node = JText::_('RESOURCES_TREE_ROOT_NODE');
$nowdate = JFactory::getDate();
$str_now = JHTML::_('date', $nowdate->toMySQL(), '%Y-%m-%d %H:%M:%S');
$this->assign('nowdate', $str_now);
$this->assign('say', $say);
$this->assign('root_node', $root_node);
$this->assignRef('uid', $user_id);
$this->assignRef('option', $option);
//hide the menu
JRequest::setVar('hidemainmenu', 1);
parent::display();
}
示例3: display
function display($tpl = null)
{
JToolBarHelper::title(JText::_('COM_REDSOCIALSTREAM_CONFIGURE'), 'configure.png');
JToolBarHelper::apply();
JToolBarHelper::cancel('cancel', 'COM_REDSOCIALSTREAM_CLOSE');
//DEVNOTE: set document title
$document = JFactory::getDocument();
$document->setTitle(JText::_('COM_REDSOCIALSTREAM_REDSOCIALSTREAMS'));
$mainframe = JFactory::getApplication();
$context = "config";
$model = $this->getModel('configure');
$db = JFactory::getDbo();
$q = "SELECT * FROM #__redsocialstream_settings";
$db->setQuery($q);
$this->settingsrows = $db->loadObjectList();
$typelist = $this->get('type_list_sorted');
$pagination = $this->get('Pagination');
//DEVNOTE:give me ordering from request
$filter_order = $mainframe->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'ordering');
$filter_order_Dir = $mainframe->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', '');
$this->assignRef('lists', $lists);
$this->assignRef("typelist", $typelist);
$this->assignRef('pagination', $pagination);
parent::display($tpl);
}
示例4: display
/**
* Display the view
*/
function display()
{
JHtml::stylesheet('izi.css', 'media/com_dbconnect/css/');
$document =& JFactory::getDocument();
$document->setTitle(JText::_('TASK_DETAILS'));
parent::display();
}
示例5: display
/**
* Display the view
*
* @return mixed False on error, null otherwise.
*/
function display($tpl = null)
{
// Initialise variables.
$user =& JFactory::getUser();
$app =& JFactory::getApplication();
$state = $this->get('State');
$items = $this->get('Items');
$pagination = $this->get('Pagination');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseWarning(500, implode("\n", $errors));
return false;
}
$params =& $state->params;
// PREPARE THE DATA
// Compute the newsfeed slug and prepare description (runs content plugins).
foreach ($items as $i => &$item) {
$item->slug = $item->route ? $item->id . ':' . $item->route : $item->id;
$item->description = JHtml::_('content.prepare', $item->description);
}
$this->assignRef('params', $params);
$this->assignRef('items', $items);
$this->assignRef('pagination', $pagination);
$this->assignRef('user', $user);
$this->_prepareDocument();
parent::display($tpl);
}
示例6: entryClicked
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise a JError object.
*/
function display($tpl = 'default')
{
FabrikHelperHTML::framework();
$app = JFactory::getApplication();
$params = $app->getParams('com_fabrik');
$document = JFactory::getDocument();
$usersConfig = JComponentHelper::getParams('com_fabrik');
$model = $this->getModel();
$model->setId(JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0))));
$this->row = $model->getVisualization();
$params = $model->getParams();
$this->assign('params', $params);
$pluginParams = $model->getPluginParams();
$tpl = $pluginParams->get('fb_gm_layout', $tpl);
$tmplpath = JPATH_ROOT . '/plugins/fabrik_visualization/kaltura/views/kaltura/tmpl/' . $tpl;
$js = <<<EOT
\t\t<script type="text/javascript" >
function entryClicked ( entry_id )
{
\twindow.location = "./player.php?entry_id=" + entry_id;
}
</script>
EOT;
$this->assignRef('data', $this->get('Data'));
FabrikHelperHTML::addScriptDeclaration($js);
FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/kaltura/views/kaltura/tmpl/' . $tpl . '/template.css');
$template = null;
$this->assign('containerId', $this->get('ContainerId'));
$this->assign('showFilters', JRequest::getInt('showfilters', $params->get('show_filters')) === 1 ? 1 : 0);
$this->assignRef('filters', $this->get('Filters'));
$this->_setPath('template', $tmplpath);
echo parent::display($template);
}
示例7: display
function display($tpl = null)
{
global $option, $mainframe;
$model =& $this->getModel();
$menu =& JMenu::getInstance('site');
$item = $menu->getActive();
$params =& $menu->getParams($item->id);
//get controller
$controller = new VnffhotelController();
$cityid = $params->get('cityid', '1');
$cityid = JRequest::getVar('cityid', $cityid);
//if($cityid==1)
$hotels = $model->getHotelsByCity($cityid);
$pagination = $model->getPagination();
for ($i = 0; $i < count($hotels); $i++) {
$hotels[$i]->images = $model->getHotelImages($hotels[$i]->hotel_ID, 'm');
if (count($hotels[$i]->images) == 0) {
$image->image_Name = "noimage.png";
$hotels[$i]->images[0] = $image;
}
$hotels[$i]->shortDes = $controller->cutDes($hotels[$i]->Overview, 30);
$hotels[$i]->linkToHotel = $controller->linkToHotel($hotels[$i]->hotel_ID);
}
//get controller
$mainframe->setPageTitle(JTEXT::_("HOTELS IN") . " " . $hotels[0]->city_Name);
//echo $hotels[0]->images[0]->image_Name;
//echo $hotels[0]->city_ID."hehehejhe";
$this->assignRef('hotels', $hotels);
$this->assignRef('pagination', $pagination);
$this->assignRef('controller', $controller);
//echo $this->cutDes("thang nay khung qua di thoi");
parent::display($tpl);
}
示例8: display
public function display($tpl = null)
{
JToolBarHelper::title(JText::_('COM_REDSHOP_GIFTCARD_MANAGEMENT'), 'redshop_giftcard_48');
$uri = JFactory::getURI();
jimport('joomla.html.pane');
$pane = JPane::getInstance('sliders');
$this->pane = $pane;
$this->setLayout('default');
$lists = array();
$detail = $this->get('data');
$isNew = $detail->giftcard_id < 1;
$text = $isNew ? JText::_('COM_REDSHOP_NEW') : JText::_('COM_REDSHOP_EDIT');
JToolBarHelper::title(JText::_('COM_REDSHOP_GIFTCARDS') . ': <small><small>[ ' . $text . ' ]</small></small>', 'redshop_giftcard_48');
JToolBarHelper::apply();
JToolBarHelper::save();
if ($isNew) {
JToolBarHelper::cancel();
} else {
JToolBarHelper::cancel('cancel', JText::_('JTOOLBAR_CLOSE'));
}
$lists['customer_amount'] = JHTML::_('select.booleanlist', 'customer_amount', 'class="inputbox" ', $detail->customer_amount);
$lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $detail->published);
if (ECONOMIC_INTEGRATION == 1) {
$redhelper = new redhelper();
$accountgroup = $redhelper->getEconomicAccountGroup();
$op = array();
$op[] = JHTML::_('select.option', '0', JText::_('COM_REDSHOP_SELECT'));
$accountgroup = array_merge($op, $accountgroup);
$lists["accountgroup_id"] = JHTML::_('select.genericlist', $accountgroup, 'accountgroup_id', 'class="inputbox" size="1" ', 'value', 'text', $detail->accountgroup_id);
}
$this->lists = $lists;
$this->detail = $detail;
$this->request_url = $uri->toString();
parent::display($tpl);
}
示例9: display
public function display($tpl = null)
{
// if redirecting to another page, we need to simply send some javascript
// to : a / close the popup, b / redirect the parent page to where we
// want to go
if (!empty($this->redirectTo)) {
$js = 'window.addEvent( \'domready\', function () {
setTimeout( \'shRedirectTo()\', 2000);
});
function shRedirectTo() {
parent.window.location="' . $this->redirectTo . '";
window.parent.SqueezeBox.close();
}
';
$document =& JFactory::getDocument();
$document->addScriptDeclaration($js);
// insert needed css files
$this->_addCss();
} else {
// get action
$this->task = empty($this->task) ? 'delete' : $this->task;
// build the toolbar
$toolBar = $this->_makeToolbar();
$this->assignRef('toolbar', $toolBar);
// add confirmation phrase to toolbar
$this->assign('toolbarTitle', '<div class="headerconfirm" >' . JText::_('COM_SH404SEF_CONFIRM_TITLE') . '</div>');
// insert needed css files
$this->_addCss();
// link to custom javascript
JHtml::script('edit.js', Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/');
}
// now display normally
parent::display($tpl);
}
示例10: display
function display($tpl = null)
{
$app = JFactory::getApplication();
$document =& JFactory::getDocument();
$this->_addScripts();
if ($this->published) {
jimport('joomla.utilities.date');
//$this->config = & $this->get('ShareConfig', 'Config');
$this->assign('setstate', JobBoardHelper::renderJobBoard());
if ($this->config->use_location) {
$job_location = $this->data->country_name != 'COM_JOBBOARD_DB_ANYWHERE_CNAME' ? ', ' . $this->data->city : ', ' . JText::_('WORK_FROM_ANYWHERE');
} else {
$job_location = '';
}
$ref_num = $this->data->ref_num != '' ? ' (' . JText::_('COM_JOBBOARD_ENT_REF') . ': ' . $this->data->ref_num . ')' : '';
$document->setTitle(JText::_('EMAIL_JOB') . ': ' . $this->data->job_title . $job_location . $ref_num);
} else {
$document->setTitle(JText::_('COM_JOBBOARD_JOB_DISABLED'));
}
$this->itemid = JRequest::getInt('Itemid');
$this->user_entry_point = 'com_users';
if (version_compare(JVERSION, '2.5.0', 'ge') || version_compare(JVERSION, '1.7.0', 'ge') || version_compare(JVERSION, '1.6.0', 'ge')) {
$this->user_entry_point = 'com_users';
} elseif (version_compare(JVERSION, '1.5.0', 'ge')) {
$this->user_entry_point = 'com_user';
}
$retries = $app->getUserState('com_jobboard.member.retry', 0, 'int');
$this->retries = $retries;
parent::display($tpl);
}
示例11: display
public function display($tpl = null) {
global $mainframe;
$document = & JFactory::getDocument();
$document->addScript('components/com_gglms/js/jquery-ui-1.8.2.custom.min.js');
$document->addStyleSheet(JURI::root(true) . '/components/com_gglms/css/provagratuita.css');
$user = JFactory::getUser();
$userid = $user->get('id');
if (!$userid) {
$tpl = "loggati";
} else {
$model = & $this->getModel();
$pg = $model->check_Coupon();
if (!empty($pg)) {
$this->assignRef('data_scadenza', $pg['data_scadenza_f']);
$this->assignRef('ora_scadenza', $pg['ora_scadenza_f']);
if (strtotime($pg['data_scadenza']) < strtotime(date("Y-m-d H:i:s")))
$tpl = "scaduta";
else
$tpl = "incorso";
} else
$tpl = "attivala";
}
parent::display($tpl);
}
示例12: display
/**
* redFORM view display method
* @return void
**/
function display($tpl = null)
{
/* Get the pagination */
$pagination = $this->get('Pagination');
/* Get the values list */
$values = $this->get('Values');
/* Check if there are any forms */
$fields = $this->get('TotalFields');
/* Get the forms */
$forms = (array) $this->get('FormsOptions');
array_unshift($forms, JHTML::_('select.option', 0, JText::_('COM_REDFORM_All')));
/* Create the dropdown list */
$lists['form_id'] = JHTML::_('select.genericlist', $forms, 'form_id', '', 'value', 'text', JRequest::getVar('form_id', 0));
/* Set variabels */
$this->assignRef('pagination', $pagination);
$this->assignRef('values', $values);
$this->assignRef('fields', $fields);
$this->assignRef('lists', $lists);
// set the menu
RedformHelper::setMenu();
/* Get the toolbar */
JToolBarHelper::title(JText::_('COM_REDFORM_Values'), 'redform_values');
if ($fields > 0) {
JToolBarHelper::publishList();
JToolBarHelper::unpublishList();
JToolBarHelper::spacer();
JToolBarHelper::deleteList();
JToolBarHelper::editListX();
JToolBarHelper::addNew();
}
/* Display the page */
parent::display($tpl);
}
示例13: display
function display($tpl = null)
{
// require_once( JPATH_COMPONENT.DS.'models'.DS.'yt_url.php' );
// $ytModel = new RateModelYt_Url();
$user =& JFactory::getUser();
if ($user->get('guest')) {
global $mainframe;
$mainframe->redirect('index.php?option=com_user&view=login', JText::_('LOGIN_DESCRIPTION'));
}
$model =& $this->getModel();
$db =& JFactory::getOracleDBO();
$merkezId = JRequest::getVar('merkezId');
if ($merkezId != null) {
$yetCombo = $model->getYeterlilikler($db, $merkezId);
$this->assignRef('yetCombo', $yetCombo);
$yetId = JRequest::getVar('yeterlilik_konusu');
// if($yetId != null){
// $sekilCombo = $model->getSinavSekilleri($db,$merkezId,$yetId);
//
//// echo '*<pre>';
//// print_r($sekilCombo);
//// echo '</pre>*';
// $this->assignRef('sekilCombo' , $sekilCombo);
// }
}
$turCombo = $model->getSinavTurleri($db);
$yerCombo = $model->getMerkezler($db, $merkezId);
$this->assignRef('yerCombo', $yerCombo);
$this->assignRef('turCombo', $turCombo);
parent::display($tpl);
}
示例14: display
function display($tpl = null)
{
$params =& JComponentHelper::getParams('com_joomailermailchimpintegration');
$paramsPrefix = version_compare(JVERSION, '1.6.0', 'ge') ? 'params.' : '';
$MCapi = $params->get($paramsPrefix . 'MCapi');
$MCauth = new MCauth();
if (!$MCapi || !$MCauth->MCauth()) {
JToolBarHelper::title(JText::_('JM_NEWSLETTER') . ' : ' . JText::_('JM_UPDATE'), 'MC_logo_48.png');
$user =& JFactory::getUser();
if (version_compare(JVERSION, '1.6.0', 'ge') && $user->authorise('core.admin', 'com_joomailermailchimpintegration') || !version_compare(JVERSION, '1.6.0', 'ge')) {
JToolBarHelper::preferences('com_joomailermailchimpintegration', '350');
JToolBarHelper::spacer();
}
} else {
JToolBarHelper::title(JText::_('JM_NEWSLETTER') . ' : ' . JText::_('JM_UPDATE'), 'MC_logo_48.png');
$task = JRequest::getCmd('task');
$force = $task == 'force';
// Load the model
$model =& $this->getModel();
$updates =& $model->getUpdates($force);
$this->assignRef('updates', $updates);
}
parent::display($tpl);
require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'footer.php';
}
示例15: display
function display($tpl = null)
{
wfimport('admin.models.updates');
$mainframe = JFactory::getApplication();
$model = $this->getModel();
$installer = WFInstaller::getInstance();
$version = $model->getVersion();
// Check Groups DB
if (!$installer->profiles) {
$link = JHTML::link('index.php?option=com_jce&task=repair&table=profiles', WFText::_('WF_DB_CREATE_RESTORE'));
$mainframe->enqueueMessage(WFText::_('WF_DB_PROFILES_ERROR') . ' - ' . $link, 'error');
}
$component = WFExtensionHelper::getComponent();
// get params definitions
$params = new WFParameter($component->params, '', 'preferences');
$canUpdate = WFModelUpdates::canUpdate();
$options = array('feed' => (int) $params->get('feed', 0), 'updates' => (int) $params->get('updates', $canUpdate ? 1 : 0), 'labels' => array('feed' => WFText::_('WF_CPANEL_FEED_LOAD'), 'updates' => WFText::_('WF_UPDATES'), 'updates_available' => WFText::_('WF_UPDATES_AVAILABLE')));
$this->document->addScript('components/com_jce/media/js/cpanel.js?version=' . $model->getVersion());
$this->document->addScriptDeclaration('jQuery(document).ready(function($){$.jce.CPanel.init(' . json_encode($options) . ')});');
WFToolbarHelper::preferences();
WFToolbarHelper::updates($canUpdate);
WFToolbarHelper::help('cpanel.about');
$this->assignRef('icons', $icons);
$this->assignRef('model', $model);
$this->assignRef('installer', $installer);
$this->assignRef('params', $params);
$this->assignRef('version', $version);
parent::display($tpl);
}