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


PHP JUDirectoryHelper::checkGroupPermission方法代码示例

本文整理汇总了PHP中JUDirectoryHelper::checkGroupPermission方法的典型用法代码示例。如果您正苦于以下问题:PHP JUDirectoryHelper::checkGroupPermission方法的具体用法?PHP JUDirectoryHelper::checkGroupPermission怎么用?PHP JUDirectoryHelper::checkGroupPermission使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JUDirectoryHelper的用法示例。


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

示例1: display

 public function display($tpl = null)
 {
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->canDo = JUDirectoryHelper::getActions('com_judirectory');
     $this->groupCanDoManage = JUDirectoryHelper::checkGroupPermission("comment.edit");
     $this->groupCanDoDelete = JUDirectoryHelper::checkGroupPermission("comments.delete");
     $this->rootComment = JUDirectoryFrontHelperComment::getRootComment();
     foreach ($this->items as &$item) {
         $this->ordering[$item->parent_id][] = $item->id;
     }
     $this->addToolBar();
     if (JUDirectoryHelper::isJoomla3x()) {
         $layout = JFactory::getApplication()->input->get('layout', '');
         if ($layout != 'modal') {
             $this->filterForm = $this->get('FilterForm');
             $this->activeFilters = $this->get('ActiveFilters');
         }
     }
     parent::display($tpl);
     $this->setDocument();
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:27,代码来源:view.html.php

示例2: getAssignedCategories

 protected function getAssignedCategories($criteriagroup_id)
 {
     $user = JFactory::getUser();
     $db = JFactory::getDbo();
     $query = "SELECT id, title FROM #__judirectory_categories WHERE criteriagroup_id={$criteriagroup_id} ORDER BY level, lft";
     $db->setQuery($query);
     $categories = $db->loadObjectList();
     $category_name_arr = array();
     $GroupCanDoCatManage = JUDirectoryHelper::checkGroupPermission("category.edit");
     foreach ($categories as $category) {
         if (($user->authorise('judir.category.edit', 'com_judirectory.category.' . $category->id) || $user->authorise('judir.category.edit.own', 'com_judirectory.category.' . $category->id) && $category->created_by == $user->id) && $GroupCanDoCatManage) {
             $link = "index.php?option=com_judirectory&task=category.edit&id=" . $category->id;
             $category_name_arr[] = "<a href=\"{$link}\" title=\"" . JText::_('COM_JUDIRECTORY_EDIT_THIS_CATEGORY') . "\">" . $category->title . "</a>";
         } else {
             $category_name_arr[] = $category->title;
         }
     }
     return implode(', ', $category_name_arr);
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:19,代码来源:criteriagroups.php

示例3: foreach

					</th>
				</tr>
				</thead>

				<tfoot>
				<tr>
					<td colspan="8"><?php 
    echo $this->pagination->getListFooter();
    ?>
</td>
				</tr>
				</tfoot>

				<tbody>
				<?php 
    $criteriagroupCandoManage = JUDirectoryHelper::checkGroupPermission("criteriagroup.edit");
    foreach ($this->items as $i => $item) {
        $canEdit = $user->authorise('core.edit', 'com_judirectory') && $this->groupCanDoManage;
        $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $userId || $item->checked_out == 0;
        $canEditOwn = $user->authorise('core.edit.own', 'com_judirectory') && $item->created_by == $userId && $this->groupCanDoManage;
        $canChange = $user->authorise('core.edit.state', 'com_judirectory') && $canCheckin && $this->groupCanDoManage;
        ?>
					<tr class="row<?php 
        echo $i % 2;
        ?>
">
						<td class="order nowrap center hidden-phone">
							<?php 
        $iconClass = '';
        if (!$canChange) {
            $iconClass = ' inactive';
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:31,代码来源:default.php

示例4: spl_autoload_register

JLoader::register('JUDirectoryFrontHelperPluginParams', JPATH_SITE . '/components/com_judirectory/helpers/pluginparams.php');
JLoader::register('JUDirectoryFrontHelperRating', JPATH_SITE . '/components/com_judirectory/helpers/rating.php');
JLoader::register('JUDirectoryFrontHelperSeo', JPATH_SITE . '/components/com_judirectory/helpers/seo.php');
JLoader::register('JUDirectoryFrontHelperString', JPATH_SITE . '/components/com_judirectory/helpers/string.php');
JLoader::register('JUDirectoryFrontHelperTemplate', JPATH_SITE . '/components/com_judirectory/helpers/template.php');
JLoader::register('JUDirectoryHelper', JPATH_ADMINISTRATOR . '/components/com_judirectory/helpers/judirectory.php');
JLoader::register('JUTimThumb', JPATH_ADMINISTRATOR . '/components/com_judirectory/timthumb/timthumb.php');
JLoader::register('Watermark', JPATH_ADMINISTRATOR . '/components/com_judirectory/helpers/watermark.class.php');
JLoader::register('JUDIRViewAdmin', JPATH_ADMINISTRATOR . '/components/com_judirectory/helpers/judirviewadmin.php');
JLoader::register('JUDirectorySearchHelper', JPATH_SITE . '/components/com_judirectory/helpers/search.php');
spl_autoload_register(array('JUDirectoryHelper', 'autoLoadFieldClass'));
jimport('joomla.application.component.controller');
$app = JFactory::getApplication();
$task = $app->input->get('task');
$view = $app->input->get('view');
$permission = JUDirectoryHelper::checkGroupPermission($task, $view);
if (!$permission) {
    return JError::raiseError(403, JText::_('JLIB_APPLICATION_ERROR_ACCESS_FORBIDDEN'));
}
if (!JFactory::getUser()->authorise('core.manage', 'com_judirectory')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
$document = JFactory::getDocument();
$isJoomla3x = JUDirectoryHelper::isJoomla3x();
if ($isJoomla3x) {
    $document->addStyleSheet(JUri::root(true) . '/administrator/components/com_judirectory/assets/css/styles.css');
} else {
    $document->addStyleSheet(JUri::root(true) . '/administrator/components/com_judirectory/assets/css/styles.j25.css');
    $document->addStyleSheet(JUri::root(true) . '/administrator/components/com_judirectory/assets/css/jicomoon.css');
}
JUDirectoryFrontHelper::loadjQuery();
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:31,代码来源:judirectory.php

示例5:

    ?>
/administrator/components/com_judirectory/assets/img/icon/rebuild-rating.png" />
							<span><?php 
    echo JText::_('COM_JUDIRECTORY_REBUILD_RATING');
    ?>
</span>
						</a>
					</div>
				</div>
			</div>
		<?php 
}
?>

		<?php 
if (JUDirectoryHelper::checkGroupPermission("tools.uploadmultiimages") && JUDIRPROVERSION) {
    ?>
			<div class="cpanel">
				<div class="icon-wrapper">
					<div class="icon">
						<a href="index.php?option=com_judirectory&view=tools&layout=batchimportimages">
							<img alt="<?php 
    echo JText::_('COM_JUDIRECTORY_BATCH_IMPORT_IMAGES');
    ?>
" src="<?php 
    echo JUri::root(true);
    ?>
/administrator/components/com_judirectory/assets/img/icon/import-image.png" />
							<span><?php 
    echo JText::_('COM_JUDIRECTORY_BATCH_IMPORT_IMAGES');
    ?>
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:31,代码来源:default.php

示例6:

    ?>
/administrator/components/com_judirectory/assets/img/icon/global-config.png" />
					<span><?php 
    echo JText::_('COM_JUDIRECTORY_DASHBOARD_GLOBALCONFIG');
    ?>
</span>
				</a>
			</div>
		</div>
	</div>
<?php 
}
?>

<?php 
if (JUDirectoryHelper::checkGroupPermission(null, "tools")) {
    ?>
	<div class="cpanel">
		<div class="icon-wrapper">
			<div class="icon">
				<a href="<?php 
    echo JRoute::_('index.php?option=com_judirectory&amp;view=tools');
    ?>
">
					<img alt="<?php 
    echo JText::_('COM_JUDIRECTORY_DASHBOARD_TOOLS');
    ?>
" src="<?php 
    echo JUri::root(true);
    ?>
/administrator/components/com_judirectory/assets/img/icon/tool.png" />
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:31,代码来源:default.j25.php

示例7:

    ?>
/administrator/components/com_judirectory/assets/img/icon/csv-import.png" />
							<span><?php 
    echo JText::_('COM_JUDIRECTORY_CSV_IMPORT');
    ?>
</span>
						</a>
					</div>
				</div>
			</div>
		<?php 
}
?>

		<?php 
if (JUDirectoryHelper::checkGroupPermission("csvprocess.export")) {
    ?>
			<div class="cpanel">
				<div class="icon-wrapper" style="width: auto">
					<div class="icon">
						<a href="index.php?option=com_judirectory&task=csvprocess.export">
							<img alt="<?php 
    echo JText::_('COM_JUDIRECTORY_CSV_EXPORT');
    ?>
" src="<?php 
    echo JUri::root(true);
    ?>
/administrator/components/com_judirectory/assets/img/icon/csv-export.png" />
							<span><?php 
    echo JText::_('COM_JUDIRECTORY_CSV_EXPORT');
    ?>
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:31,代码来源:default.php

示例8:

?>

<ul class="manager-actions nav nav-list" style="margin-bottom: 20px;">
	<?php 
$actions = JUDirectoryHelper::getActions('com_judirectory', 'category', $cat_id);
if ($actions->get("judir.listing.create")) {
    if ($this->listingGroupCanDoManage && $this->allowAddListing) {
        echo "<li><a class='add-listing' href='index.php?option=com_judirectory&task=listing.add&cat_id={$cat_id}'><i class='icon-file-add'></i>" . JText::_('COM_JUDIRECTORY_ADD_LISTING') . "</a></li>";
    }
}
if ($actions->get("judir.category.create")) {
    if ($this->catGroupCanDoManage) {
        echo "<li><a class='add-category' href='index.php?option=com_judirectory&task=category.add&parent_id={$cat_id}'><i class='icon-folder-plus'></i>" . JText::_('COM_JUDIRECTORY_ADD_CATEGORY') . "</a></li>";
    }
}
if (JUDirectoryHelper::checkGroupPermission(null, "pendinglistings") && JUDIRPROVERSION) {
    echo "<li><a class='approved' href='index.php?option=com_judirectory&view=pendinglistings'><i class='icon-clock'></i>" . JText::sprintf('COM_JUDIRECTORY_PENDING_LISTINGS_N', JUDirectoryHelper::getTotalPendingListings()) . "</a></li>";
}
?>
</ul>

<div class="category-tree">
	<?php 
echo JUDirectoryHelper::getCategoryDTree($cat_id);
?>
</div>

<div id="judir-search" style="margin-top: 15px;">
	<form name="search-form" id="search-form" action="index.php?option=com_judirectory" method="POST">
		<fieldset>
			<div class="input-append">
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:31,代码来源:default_left.php


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