本文整理汇总了PHP中JHotelUtil::isJoomla3方法的典型用法代码示例。如果您正苦于以下问题:PHP JHotelUtil::isJoomla3方法的具体用法?PHP JHotelUtil::isJoomla3怎么用?PHP JHotelUtil::isJoomla3使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JHotelUtil
的用法示例。
在下文中一共展示了JHotelUtil::isJoomla3方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
defined('_JEXEC') or die('Restricted access');
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');
require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/logger.php';
require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'defines.php';
require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'utils.php';
require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'userAccess.php';
require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/helper.php';
//JHtmlBehavior::framework();
if (JHotelUtil::isJoomla3()) {
JHtml::_('jquery.framework', true, true);
//load jQuery before other js
} else {
if (!defined('J_JQUERY_LOADED')) {
JHotelUtil::includeFile('script', 'jquery.min.js', 'administrator/components/com_jhotelreservation/assets/js/');
define('J_JQUERY_LOADED', 1);
}
}
JHTML::_('script', 'administrator/components/' . getBookingExtName() . '/assets/js/utils.js');
JHTML::_('stylesheet', 'administrator/components/' . getBookingExtName() . '/assets/css/style.css');
JHTML::_('stylesheet', 'administrator/components/' . getBookingExtName() . '/assets/css/general.css');
JHTML::_('stylesheet', 'administrator/components/' . getBookingExtName() . '/assets/css/joomlatabs.css');
//JHTML::_('script', 'administrator/components/'.getBookingExtName().'/assets/jquery-ui.min.js');
//JHTML::_('script', 'administrator/components/'.getBookingExtName().'/assets/tooltip.js');
//JHTML::_('stylesheet', 'administrator/components/'.getBookingExtName().'/assets/tooltip.css');
示例2: getJoomlaSession
private static function getJoomlaSession()
{
$session = JFactory::getSession();
if (JHotelUtil::isJoomla3()) {
$isActive = $session->isActive();
} else {
$isActive = $session->getState() == "active" ? true : false;
}
if (!$isActive) {
$app = JFactory::getApplication();
$app->enqueueMessage("Your session has expired", 'warning');
$msg = "Your session has expired";
$app->redirect('index.php?option=' . getBookingExtName() . '&task=hotels.searchHotels', $msg);
$app->enqueueMessage("Your session has expired", 'warning');
} else {
return $session;
}
}