当前位置: 首页>>代码示例>>PHP>>正文


PHP checkUserAccess函数代码示例

本文整理汇总了PHP中checkUserAccess函数的典型用法代码示例。如果您正苦于以下问题:PHP checkUserAccess函数的具体用法?PHP checkUserAccess怎么用?PHP checkUserAccess使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了checkUserAccess函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: defined

/**
* @copyright	Copyright (C) 2008-2009 CMSJunkie. All rights reserved.
* 
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
// No direct access
defined('_JEXEC') or die('Restricted access');
if (!checkUserAccess(JFactory::getUser()->id, "hotel_ratings")) {
    $msg = "You are not authorized to access this resource";
    $this->setRedirect('index.php?option=' . getBookingExtName(), $msg);
}
class JHotelReservationViewManageRatingQuestions extends JViewLegacy
{
    function display($tpl = null)
    {
        $this->items = $this->get('ReviewQuestions');
        $this->item = $this->get('ReviewQuestion');
        if (JRequest::getVar('layout') == "edit") {
            $this->editToolbar();
        } else {
            $this->addToolbar();
        }
        parent::display($tpl);
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:31,代码来源:view.html.php

示例2: display

 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     $lang = JFactory::getLanguage();
     $this->rooms = $this->get('Items');
     $this->state = $this->get('State');
     $this->roomTypes = $this->get('RoomTypesOptions');
     //set hotels
     $hotels = $this->get('Hotels');
     $this->hotels = checkHotels(JFactory::getUser()->id, $hotels);
     JHotelReservationHelper::addSubmenu('reports');
     if (PROFESSIONAL_VERSION == 1) {
         $this->types = array("simple" => "Simple Report", "advanced" => "Advanced Report");
     } else {
         $this->types = array("simple" => "Simple Report");
     }
     if (checkUserAccess(JFactory::getUser()->id, "special_offers_report") && PROFESSIONAL_VERSION == 1) {
         $this->types["offers"] = "Offers Report";
     }
     switch ($this->state->get('filter.type')) {
         case "simple":
             $this->availabilityReport = $this->get('AvailabilityReport');
             break;
         case "advanced":
             $this->availabilityReport = $this->get('DetailedAvailabilityReport');
             break;
         case "offers":
             $this->offerReport = $this->get('OfferReport');
             break;
         default:
             $this->availabilityReport = $this->get('AvailabilityReport');
             break;
     }
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     parent::display($tpl);
     $this->addToolbar();
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:42,代码来源:view.html.php

示例3: checkForm

 function checkForm()
 {
     $returnStr = "";
     $active = checkUserAccess();
     if ($active) {
         $returnStr .= $this->disableForm();
     } else {
         $returnStr = $this->enableForm();
     }
     return $returnStr;
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:11,代码来源:display.php

示例4: quickiconButton

    //echo $description;
    ?>
 &nbsp;</p>
				</a>
			</li>
			<?php 
}
?>

<?php 
echo "<div class='user-options-container'><ul>";
?>
	<?php 
if (checkUserAccess(JFactory::getUser()->id, "reservations_reports")) {
    echo quickiconButton("index.php?option=" . getBookingExtName() . "&view=reports", 'reservationsreports_48_48_icon.gif', JText::_('LNG_RESERVATIONS_CALENDAR_SIMPLE', true), JText::_('LNG_RESERVATIONS_CALENDAR_SIMPLE', true), JText::_('LNG_RESERVATIONS_REPORTS_DESC', true));
}
?>
	<?php 
if (checkUserAccess(JFactory::getUser()->id, "reservations_reports") && PROFESSIONAL_VERSION == 1) {
    echo quickiconButton("index.php?option=" . getBookingExtName() . "&task=reservationsreports.incomeReport", 'managecurrencies_48_48_icon.gif', JText::_('LNG_RESERVATIONS_INCOME_REPORT', true), JText::_('LNG_RESERVATIONS_INCOME_REPORT', true), JText::_('LNG_RESERVATIONS_REPORTS_DESC', true));
}
?>
	<?php 
if (checkUserAccess(JFactory::getUser()->id, "reservations_reports") && PROFESSIONAL_VERSION == 1) {
    echo quickiconButton("index.php?option=" . getBookingExtName() . "&task=reservationsreports.countryReservationReport", 'manageroomfeatures_48_48_icon.gif', JText::_('LNG_RESERVATIONS_BY_COUNTRY_REPORT', true), JText::_('LNG_RESERVATIONS_BY_COUNTRY_REPORT', true), JText::_('LNG_RESERVATIONS_REPORTS_DESC', true));
}
echo "</ul></div>";
?>


开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:28,代码来源:default.php

示例5: getBookingExtName

        ?>
							</TD>
							<TD align=center>
								<?php 
        echo $offer->offer_datas == '0000-00-00' ? "&nbsp;" : JHotelUtil::getDateGeneralFormat($offer->offer_datas);
        ?>
								<?php 
        echo JText::_('LNG_TO', true);
        ?>
	
								<?php 
        echo $offer->offer_datae == '0000-00-00' ? "&nbsp;" : JHotelUtil::getDateGeneralFormat($offer->offer_datae);
        ?>
							</TD>
								<?php 
        if (checkUserAccess(JFactory::getUser()->id, "manage_featured_hotels")) {
            ?>
									<td align=center><img border=1
										src="<?php 
            echo JURI::base() . "components/" . getBookingExtName() . "/assets/img/" . ($offer->top == false ? "unchecked.gif" : "checked.gif");
            ?>
"
										onclick="document.location.href = '<?php 
            echo JRoute::_('index.php?option=' . getBookingExtName() . '&task=offers.changeTopState&offer_id=' . $offer->offer_id . '&hotel_id=' . $offer->hotel_id);
            ?>
 '" />
									</td>
									<td align=center><img border=1
										src="<?php 
            echo JURI::base() . "components/" . getBookingExtName() . "/assets/img/" . ($offer->featured == false ? "unchecked.gif" : "checked.gif");
            ?>
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:31,代码来源:default.php

示例6: getBookingExtName

							onclick="	
													document.location.href = '<?php 
            echo JRoute::_('index.php?option=' . getBookingExtName() . '&task=hotels.state&hotel_id=' . $hotel->hotel_id);
            ?>
 '
												" />
						</td>
						<?php 
        }
        ?>
						<TD align="center" nowrap="nowrap">
						<?php 
        if (checkUserAccess(JFactory::getUser()->id, "manage_featured_hotels")) {
            ?>
							<?php 
            if (checkUserAccess(JFactory::getUser()->id, "availability_section")) {
                ?>
								<a	href='<?php 
                echo JRoute::_('index.php?option=' . getBookingExtName() . '&view=availability&hotel_id=' . $hotel->hotel_id);
                ?>
'
									title="<?php 
                echo JText::_('LNG_AVAILABILITY');
                ?>
"
								> 
									<b><?php 
                echo JText::_('LNG_AVAILABILITY');
                ?>
</b>
								</a>
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:31,代码来源:default.php

示例7: getBookingExtName

<?php 
/**
* @copyright	Copyright (C) 2008-2009 CMSJunkie. All rights reserved.
* 
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
if (!checkUserAccess(JFactory::getUser()->id, "special_offers_report")) {
    $msg = "You are not authorized to access this resource";
    $this->setRedirect('index.php?option=' . getBookingExtName(), $msg);
}
?>
	<div id="editcell">
		<fieldset class="adminform">
			<legend><?php 
echo JText::_('LNG_RESERVATIONS_OFFERS_ACCESS_DETAILS', true);
?>
</legend>
			<div style='text-align:left'>
				<?php 
foreach ($this->offerReport as $k => $details) {
    if (strcmp($k, 'media_refers') == 0) {
        continue;
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:30,代码来源:report-offers.php

示例8:

				}
				
				if(jQuery('#number_of_rooms').validationEngine('validate')){
					$$('dt.tabs')[2].fireEvent('click');
					jQuery('#number_of_rooms').focus();
					return false; 
					
				}
				if(jQuery('#children_category').validationEngine('validate')){
					$$('dt.tabs')[2].fireEvent('click');
					jQuery('#children_category').focus();
					return false; 
				}

				<?php 
if (checkUserAccess(JFactory::getUser()->id, "hotel_extra_info")) {
    ?>
					$$('dt.tabs')[4].fireEvent('click');
					
					if(jQuery('#commission').validationEngine('validate')){
						$$('dt.tabs')[4].fireEvent('click');
						jQuery('#commission').focus();					
						return false; 
					}
				<?php 
}
?>
				$$('dt.tabs')[0].fireEvent('click');
				jQuery('#hotel_name').focus();
				submitform( pressbutton );
				return;
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:31,代码来源:default.php

示例9: addSubmenu

 /**
  * Configure the Linkbar.
  *
  * @param   string	The name of the active view.
  */
 public static function addSubmenu($vName)
 {
     if (checkUserAccess(JFactory::getUser()->id, "application_settings")) {
         JSubMenuHelper::addEntry(JText::_('LNG_SUBMENU_SETTINGS', true), 'index.php?option=com_jhotelreservation&view=applicationsettings', $vName == 'applicationsettings');
     }
     if (checkUserAccess(JFactory::getUser()->id, "manage_hotels")) {
         JSubMenuHelper::addEntry(JText::_('LNG_SUBMENU_HOTELS', true), 'index.php?option=com_jhotelreservation&view=hotels', $vName == 'hotels');
     }
     if (checkUserAccess(JFactory::getUser()->id, "manage_rooms")) {
         JSubMenuHelper::addEntry(JText::_('LNG_SUBMENU_ROOMS', true), 'index.php?option=com_jhotelreservation&view=rooms', $vName == 'rooms');
     }
     if (checkUserAccess(JFactory::getUser()->id, "availability_section")) {
         JSubMenuHelper::addEntry(JText::_('LNG_SUBMENU_AVAILABILITY', true), 'index.php?option=com_jhotelreservation&view=availability', $vName == 'availability');
     }
     if (checkUserAccess(JFactory::getUser()->id, "payment_processors") && STARTER_VERSION == 0) {
         JSubMenuHelper::addEntry(JText::_('LNG_PAYMENT_PROCESSORS', true), 'index.php?option=com_jhotelreservation&view=paymentprocessors', $vName == 'paymentprocessors');
     }
     if (checkUserAccess(JFactory::getUser()->id, "manage_offers") && PROFESSIONAL_VERSION == 1) {
         JSubMenuHelper::addEntry(JText::_('LNG_SUBMENU_OFFERS', true), 'index.php?option=com_jhotelreservation&view=offers', $vName == 'offers');
     }
     if (checkUserAccess(JFactory::getUser()->id, "manage_extra_options") && PROFESSIONAL_VERSION == 1) {
         JSubMenuHelper::addEntry(JText::_('LNG_SUBMENU_EXTAS', true), 'index.php?option=com_jhotelreservation&view=extraoptions', $vName == 'extraoptions');
     }
     /*if (checkUserAccess(JFactory::getUser()->id,"manage_excursions") && PROFESSIONAL_VERSION==1){
     			JSubMenuHelper::addEntry(
     				JText::_('LNG_COURSE_EXCURSION_PANEL',true),
     				'index.php?option=com_jhotelreservation&view=excursions',
     				$vName == 'excursions'
     			);
     		}*/
     if (checkUserAccess(JFactory::getUser()->id, "manage_room_discounts") && PROFESSIONAL_VERSION == 1) {
         JSubMenuHelper::addEntry(JText::_('LNG_SUBMENU_ROOM_DISCOUNTS', true), 'index.php?option=com_jhotelreservation&controller=manageroomdiscounts&view=manageroomdiscounts', $vName == 'roomdiscounts');
     }
     if (checkUserAccess(JFactory::getUser()->id, "manage_email_templates")) {
         JSubMenuHelper::addEntry(JText::_('LNG_SUBMENU_EMAILS_TEMPLATES', true), 'index.php?option=com_jhotelreservation&controller=manageemails&view=manageemails', $vName == 'emailtemplates');
     }
     if (checkUserAccess(JFactory::getUser()->id, "hotel_ratings") && PROFESSIONAL_VERSION == 1) {
         JSubMenuHelper::addEntry(JText::_('LNG_SUBMENU_HOTEL_REVIEWS', true), 'index.php?option=com_jhotelreservation&task=managehotelratings.menuhotelratings', $vName == 'reviews');
     }
     if (checkUserAccess(JFactory::getUser()->id, "manage_hotel_users") && PORTAL_VERSION == 1) {
         JSubMenuHelper::addEntry(JText::_('LNG_SUBMENU_HOTEL_USER_ACCESS', true), 'index.php?option=com_jhotelreservation&view=usersmanagement', $vName == 'useraccess');
     }
     if (checkUserAccess(JFactory::getUser()->id, "manage_reservations")) {
         JSubMenuHelper::addEntry(JText::_('LNG_SUBMENU_MANAGE_RESERVATION', true), 'index.php?option=com_jhotelreservation&view=reservations', $vName == 'reservations');
     }
     if (checkUserAccess(JFactory::getUser()->id, "reservations_reports") && STARTER_VERSION != 1) {
         JSubMenuHelper::addEntry(JText::_('LNG_SUBMENU_RESERVATION_REPORTS', true), 'index.php?option=com_jhotelreservation&view=reservationsreports', $vName == 'reports');
     }
     if (checkUserAccess(JFactory::getUser()->id, "manage_invoices") && PORTAL_VERSION == 1) {
         JSubMenuHelper::addEntry(JText::_('LNG_SUBMENU_INVOICES', true), 'index.php?option=com_jhotelreservation&controller=manageinvoices&view=manageinvoices', $vName == 'invoices');
     }
     if (checkUserAccess(JFactory::getUser()->id, "updates_hotelreservation")) {
         JSubMenuHelper::addEntry(JText::_('LNG_UPDATE', true), 'index.php?option=com_jhotelreservation&view=updates', $vName == 'updates');
     }
     /*
     		if (checkUserAccess(JFactory::getUser()->id,"payment_processors") && STARTER_VERSION!=1){
     			JSubMenuHelper::addEntry(
     					JText::_('LNG_SUBMENU_PAYMENT_PROCESSORS',true),
     					'index.php?option=com_jhotelreservation&view=paymentprocessors&controler=paymentprocessors',
     					$vName == 'paymentprocessors'
     			);
     		}
     		
     		if (checkUserAccess(JFactory::getUser()->id,"updates_hotelreservation")){
     			JSubMenuHelper::addEntry(
     			JText::_('LNG_SUBMENU_UPDATES',true), 'index.php?option=com_jhotelreservation&view=updates',
     			$vName == 'reports'
     			);
     		}*/
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:75,代码来源:helper.php

示例10: isset

?>
				</TD>
			</TR>
			<TR>
				<TD nowrap class="key"><?php 
echo JText::_('LNG_HOTEL_PAYMENT_OPTIONS', true);
?>
:</TD>
				<TD nowrap align=left>
					<div id="paymentOption-holder" class="option-holder">
						<?php 
echo $this->paymentoptions->displayPaymentOptions($this->item->paymentOptions, $this->item->selectedPaymentOptions);
?>
					</div>
				<?php 
if (checkUserAccess(JFactory::getUser()->id, "manage_options")) {
    ?>
			
					<div class="manage-option-holder">
						<a href="javascript:" onclick="showManagePaymentOptions()"><?php 
    echo isset($this->item->hotel_id) ? JText::_('LNG_MANAGE_PAYMENT_OPTIONS', true) : "";
    ?>
</a>
					</div>		
				<?php 
}
?>
			
				</TD>
			</TR>
			<TR>
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:31,代码来源:informations.php

示例11: quickiconButton

?>
						
			   	 		 
					
			<?php 
if (checkUserAccess(JFactory::getUser()->id, "add_reservations")) {
    echo quickiconButton("index.php?option=" . getBookingExtName() . "&view=reservation&sourceId=0&layout=edit", 'addreservation.png', JText::_('LNG_ADD_RESERVATIONS'));
}
?>
			<?php 
if (checkUserAccess(JFactory::getUser()->id, "manage_reservations")) {
    echo quickiconButton("index.php?option=" . getBookingExtName() . "&view=reservations", 'reservations.png', JText::_('LNG_MANAGE_RESERVATIONS', true), JText::_('LNG_MANAGE_RESERVATIONS_DESC', true));
}
?>
			<?php 
if (checkUserAccess(JFactory::getUser()->id, "updates_hotelreservation")) {
    echo quickiconButton("index.php?option=" . getBookingExtName() . "&view=updates", 'downloads.png', JText::_('LNG_UPDATE', true), JText::_('LNG_UPDATE_DESC', true));
}
?>
			<?php 
echo quickiconButton("index.php?option=" . getBookingExtName() . "&about&view=about", 'about.png', JText::_('LNG_ABOUT', true), JText::_('LNG_ABOUT_DESC', true));
?>
	  				
		<?php 
echo "</ul></div>";
?>
	  				
		<div id="chartPanel"> 
			<div id="chartdiv">
				<div style='text-align:center;padding-top:150px;width:100%'><img src='<?php 
echo JURI::base() . "/components/" . getBookingExtName();
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:31,代码来源:default.php

示例12: header

        header("Location: convoy.php?id=" . $convoyID);
        exit;
    }
    var_dump($_POST);
    die;
}
$locationsArray = [];
foreach (scandir("locations") as $file) {
    $locations = json_decode(file_get_contents("locations/" . $file), true);
    foreach ((array) $locations as $loc) {
        $locationsArray[] = "" . $loc['city'];
    }
    sort($locationsArray);
}
$servers = json_decode(file_get_contents("https://api.ets2mp.com/servers/"), true);
if (!checkUserAccess($ipRestricted)) {
    echo '<section class="container"><h1>Convoy Creation</h1><p class="alert-red">You do not have permission to create a convoy.</p></section>';
    require "assets/footer.php";
    die;
}
?>
<section class="container">
    <h1>Convoy Creation</h1>
    <p style="text-align:center;">Fill in the form below to create a convoy for <?php 
echo $vtcName;
?>
</p>
    <form action="create.php" method="POST">
        <table class="createForm">
			<tr>
                <td>Display Username</td>
开发者ID:GlitchedMan,项目名称:convoy-management,代码行数:31,代码来源:create.php

示例13: Copyright

<?php

/*------------------------------------------------------------------------
# JHotelReservation
# author CMSJunkie
# copyright Copyright (C) 2013 cmsjunkie.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.cmsjunkie.com
# Technical Support:  Forum - http://www.cmsjunkie.com/forum/hotel_reservation/?p=1
# Technical Support:  Forum Multiple - http://www.cmsjunkie.com/forum/joomla-multiple-hotel-reservation/?p=1
-------------------------------------------------------------------------*/
defined('_JEXEC') or die('Restricted access');
if (!checkUserAccess(JFactory::getUser()->id, "application_settings")) {
    $msg = "You are not authorized to access this resource";
    $this->setRedirect('index.php?option=' . getBookingExtName(), $msg);
}
JHTML::_('script', 'administrator/components/' . getBookingExtName() . '/assets/js/jquery.upload.js');
class JHotelReservationViewApplicationSettings extends JViewLegacy
{
    function display($tpl = null)
    {
        $item = $this->get('Data');
        $this->item = $item;
        $elements = new stdClass();
        //hotel important informations
        $elements->show_price_per_person = JHTML::_('select.booleanlist', "show_price_per_person", '', $item->show_price_per_person);
        $elements->charge_only_reservation_cost = JHTML::_('select.booleanlist', "charge_only_reservation_cost", '', $item->charge_only_reservation_cost);
        $elements->send_invoice_to_email = JHTML::_('select.booleanlist', "send_invoice_to_email", '', $item->send_invoice_to_email);
        $this->elements = $elements;
        $this->languages = $this->get('Languages');
        $this->addToolbar();
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:31,代码来源:view.html.php


注:本文中的checkUserAccess函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。