本文整理汇总了PHP中JUDownloadHelper::checkGroupPermission方法的典型用法代码示例。如果您正苦于以下问题:PHP JUDownloadHelper::checkGroupPermission方法的具体用法?PHP JUDownloadHelper::checkGroupPermission怎么用?PHP JUDownloadHelper::checkGroupPermission使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JUDownloadHelper
的用法示例。
在下文中一共展示了JUDownloadHelper::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 = JUDownloadHelper::getActions('com_judownload');
$this->groupCanDoManage = JUDownloadHelper::checkGroupPermission("comment.edit");
$this->groupCanDoDelete = JUDownloadHelper::checkGroupPermission("comments.delete");
$this->rootComment = JUDownloadFrontHelperComment::getRootComment();
foreach ($this->items as &$item) {
$this->ordering[$item->parent_id][] = $item->id;
}
$this->addToolBar();
if (JUDownloadHelper::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();
}
示例2: getAssignedCategories
protected function getAssignedCategories($criteriagroup_id)
{
$user = JFactory::getUser();
$db = JFactory::getDbo();
$query = "SELECT id, title FROM #__judownload_categories WHERE criteriagroup_id={$criteriagroup_id} ORDER BY level, lft";
$db->setQuery($query);
$categories = $db->loadObjectList();
$category_name_arr = array();
$GroupCanDoCatManage = JUDownloadHelper::checkGroupPermission("category.edit");
foreach ($categories as $category) {
if (($user->authorise('judl.category.edit', 'com_judownload.category.' . $category->id) || $user->authorise('judl.category.edit.own', 'com_judownload.category.' . $category->id) && $category->created_by == $user->id) && $GroupCanDoCatManage) {
$link = "index.php?option=com_judownload&task=category.edit&id=" . $category->id;
$category_name_arr[] = "<a href=\"{$link}\" title=\"" . JText::_('COM_JUDOWNLOAD_EDIT_THIS_CATEGORY') . "\">" . $category->title . "</a>";
} else {
$category_name_arr[] = $category->title;
}
}
return implode(', ', $category_name_arr);
}
示例3:
?>
/administrator/components/com_judownload/assets/img/icon/global-config.png" />
<span><?php
echo JText::_('COM_JUDOWNLOAD_DASHBOARD_GLOBALCONFIG');
?>
</span>
</a>
</div>
</div>
</div>
<?php
}
?>
<?php
if (JUDownloadHelper::checkGroupPermission(null, "tools")) {
?>
<div class="cpanel">
<div class="icon-wrapper">
<div class="icon">
<a href="<?php
echo JRoute::_('index.php?option=com_judownload&view=tools');
?>
">
<img alt="<?php
echo JText::_('COM_JUDOWNLOAD_DASHBOARD_TOOLS');
?>
" src="<?php
echo JUri::root(true);
?>
/administrator/components/com_judownload/assets/img/icon/tool.png" />
示例4:
?>
/administrator/components/com_judownload/assets/img/icon/import-file.png" />
<span><?php
echo JText::_('COM_JUDOWNLOAD_BATCH_IMPORT_FILES');
?>
</span>
</a>
</div>
</div>
</div>
<?php
}
?>
<?php
if (JUDownloadHelper::checkGroupPermission("tools.uploadmultiimages") && JUDLPROVERSION) {
?>
<div class="cpanel">
<div class="icon-wrapper">
<div class="icon">
<a href="index.php?option=com_judownload&view=tools&layout=batchimportimages">
<img alt="<?php
echo JText::_('COM_JUDOWNLOAD_BATCH_IMPORT_IMAGES');
?>
" src="<?php
echo JUri::root(true);
?>
/administrator/components/com_judownload/assets/img/icon/import-image.png" />
<span><?php
echo JText::_('COM_JUDOWNLOAD_BATCH_IMPORT_IMAGES');
?>
示例5:
?>
<ul class="manager-actions nav nav-list" style="margin-bottom: 20px;">
<?php
$actions = JUDownloadHelper::getActions('com_judownload', 'category', $cat_id);
if ($actions->get("judl.document.create")) {
if ($this->docGroupCanDoManage && $this->allowAddDoc) {
echo "<li><a class='add-document' href='index.php?option=com_judownload&task=document.add&cat_id={$cat_id}'><i class='icon-file-add'></i>" . JText::_('COM_JUDOWNLOAD_ADD_DOCUMENT') . "</a></li>";
}
}
if ($actions->get("judl.category.create")) {
if ($this->catGroupCanDoManage) {
echo "<li><a class='add-category' href='index.php?option=com_judownload&task=category.add&parent_id={$cat_id}'><i class='icon-folder-plus'></i>" . JText::_('COM_JUDOWNLOAD_ADD_CATEGORY') . "</a></li>";
}
}
if (JUDownloadHelper::checkGroupPermission(null, "pendingdocuments") && JUDLPROVERSION) {
echo "<li><a class='approved' href='index.php?option=com_judownload&view=pendingdocuments'><i class='icon-clock'></i>" . JText::sprintf('COM_JUDOWNLOAD_PENDING_DOCUMENTS_N', JUDownloadHelper::getTotalPendingDocuments()) . "</a></li>";
}
?>
</ul>
<div class="category-tree">
<?php
echo JUDownloadHelper::getCategoryDTree($cat_id);
?>
</div>
<div id="judl-search" style="margin-top: 15px;">
<form name="search-form" id="search-form" action="index.php?option=com_judownload" method="POST">
<fieldset>
<div class="input-append">
示例6: spl_autoload_register
JLoader::register('JUDownloadFrontHelperPluginParams', JPATH_SITE . '/components/com_judownload/helpers/pluginparams.php');
JLoader::register('JUDownloadFrontHelperRating', JPATH_SITE . '/components/com_judownload/helpers/rating.php');
JLoader::register('JUDownloadFrontHelperSeo', JPATH_SITE . '/components/com_judownload/helpers/seo.php');
JLoader::register('JUDownloadFrontHelperString', JPATH_SITE . '/components/com_judownload/helpers/string.php');
JLoader::register('JUDownloadFrontHelperTemplate', JPATH_SITE . '/components/com_judownload/helpers/template.php');
JLoader::register('JUDownloadHelper', JPATH_ADMINISTRATOR . '/components/com_judownload/helpers/judownload.php');
JLoader::register('JUTimThumb', JPATH_ADMINISTRATOR . '/components/com_judownload/timthumb/timthumb.php');
JLoader::register('Watermark', JPATH_ADMINISTRATOR . '/components/com_judownload/helpers/watermark.class.php');
JLoader::register('JUDLViewAdmin', JPATH_ADMINISTRATOR . '/components/com_judownload/helpers/judlviewadmin.php');
JLoader::register('JUDownloadSearchHelper', JPATH_SITE . '/components/com_judownload/helpers/search.php');
spl_autoload_register(array('JUDownloadHelper', 'autoLoadFieldClass'));
jimport('joomla.application.component.controller');
$app = JFactory::getApplication();
$task = $app->input->get('task');
$view = $app->input->get('view');
$permission = JUDownloadHelper::checkGroupPermission($task, $view);
if (!$permission) {
return JError::raiseError(403, JText::_('JLIB_APPLICATION_ERROR_ACCESS_FORBIDDEN'));
}
if (!JFactory::getUser()->authorise('core.manage', 'com_judownload')) {
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
$document = JFactory::getDocument();
$isJoomla3x = JUDownloadHelper::isJoomla3x();
if ($isJoomla3x) {
$document->addStyleSheet(JUri::root(true) . '/administrator/components/com_judownload/assets/css/styles.css');
} else {
$document->addStyleSheet(JUri::root(true) . '/administrator/components/com_judownload/assets/css/styles.j25.css');
$document->addStyleSheet(JUri::root(true) . '/administrator/components/com_judownload/assets/css/jicomoon.css');
}
JUDownloadFrontHelper::loadjQuery();
示例7:
</tr>
</thead>
<tfoot>
<tr>
<td colspan="8"><?php
echo $this->pagination->getListFooter();
?>
</td>
</tr>
</tfoot>
<tbody>
<?php
$ordering = $listOrder == 'ordering';
$criteriagroupCandoManage = JUDownloadHelper::checkGroupPermission("criteriagroup.edit");
foreach ($this->items as $i => $item) {
$canEdit = $user->authorise('core.edit', 'com_judownload') && $this->groupCanDoManage;
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $userId || $item->checked_out == 0;
$canEditOwn = $user->authorise('core.edit.own', 'com_judownload') && $item->created_by == $userId && $this->groupCanDoManage;
$canChange = $user->authorise('core.edit.state', 'com_judownload') && $canCheckin && $this->groupCanDoManage;
?>
<tr class="row<?php
echo $i % 2;
?>
">
<td class="center hidden-phone">
<?php
echo JHtml::_('grid.id', $i, $item->id);
?>
</td>
示例8:
?>
/administrator/components/com_judownload/assets/img/icon/csv-import.png" />
<span><?php
echo JText::_('COM_JUDOWNLOAD_CSV_IMPORT');
?>
</span>
</a>
</div>
</div>
</div>
<?php
}
?>
<?php
if (JUDownloadHelper::checkGroupPermission("csvprocess.export")) {
?>
<div class="cpanel">
<div class="icon-wrapper" style="width: auto">
<div class="icon">
<a href="index.php?option=com_judownload&view=csvprocess&layout=export">
<img alt="<?php
echo JText::_('COM_JUDOWNLOAD_CSV_EXPORT');
?>
" src="<?php
echo JUri::root(true);
?>
/administrator/components/com_judownload/assets/img/icon/csv-export.png" />
<span><?php
echo JText::_('COM_JUDOWNLOAD_CSV_EXPORT');
?>