本文整理汇总了PHP中Wiki::permissionExist方法的典型用法代码示例。如果您正苦于以下问题:PHP Wiki::permissionExist方法的具体用法?PHP Wiki::permissionExist怎么用?PHP Wiki::permissionExist使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wiki
的用法示例。
在下文中一共展示了Wiki::permissionExist方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayMenu
/**
* displayMenu - public
*/
function displayMenu()
{
print '
<table class="ServiceMenu">
<tr>
<td>';
switch (DEFAULT_LANGUAGE) {
case 'fr_FR':
$attatch_page = "DéposerUnFichier";
$preferences_page = "PréférencesUtilisateurs";
break;
case 'en_US':
default:
$attatch_page = 'UpLoad';
$preferences_page = 'UserPreferences';
break;
}
$attatch_menu = $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'menuattch');
$preferences_menu = $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'menuprefs');
$help_menu = $GLOBALS['Language']->getText('global', 'help');
print '
<ul class="ServiceMenu">
<li><a href="' . $this->wikiLink . '&view=browsePages">' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'menupages') . '</a> | </li>';
if (UserManager::instance()->getCurrentUser()->isLoggedIn()) {
print '<li><a href="javascript:help_window(\'' . $this->wikiLink . '&pagename=' . $attatch_page . '&pv=1\')">' . $attatch_menu . '</a> | </li>';
print '<li><a href="' . $this->wikiLink . '&pagename=' . $preferences_page . '">' . $preferences_menu . '</a> | </li>';
}
if (user_ismember($this->gid, 'W2')) {
print '<li><a href="' . $this->wikiAdminLink . '">' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'menuadmin') . '</a> | </li>';
}
print '<li>' . help_button('WikiService.html', false, $help_menu) . '</li>
</ul>';
print '
</td>
<td align="right" valign="top">';
if (user_ismember($this->gid, 'W2')) {
$wiki = new Wiki($this->gid);
$permInfo = "";
if ('wiki' == $this->view) {
// User is browsing a wiki page
$wp = new WikiPage($this->gid, $_REQUEST['pagename']);
$permLink = $this->wikiAdminLink . '&view=pagePerms&id=' . $wp->getId();
if ($wp->permissionExist()) {
$permInfo = '<a href="' . $permLink . '"> ' . '<img src="' . util_get_image_theme("ic/lock.png") . '" border="0" alt="' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'lock_alt') . '" title="' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'lock_title_spec') . '"/></a>';
}
}
if ($wiki->permissionExist()) {
$permInfo .= '<a href="/wiki/admin/index.php?group_id=' . $this->gid . '&view=wikiPerms"> ' . '<img src="' . util_get_image_theme("ic/lock.png") . '" border="0" alt="' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'lock_alt') . '" title="' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'lock_title_set') . '"/>' . '</a>';
}
if ($permInfo) {
print $permInfo;
}
}
//Display printer_version link only in wiki pages
if (isset($_REQUEST['pagename'])) {
print '
(<a href="' . $_SERVER['REQUEST_URI'] . '&pv=1" title="' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'lighter_display') . '">
<img src="' . util_get_image_theme("msg.png") . '" border="0"> ' . $GLOBALS['Language']->getText('global', 'printer_version') . '</A> )
</li>';
}
print '
</td>
</tr>
</table>';
}