本文整理汇总了PHP中zp_loggedin函数的典型用法代码示例。如果您正苦于以下问题:PHP zp_loggedin函数的具体用法?PHP zp_loggedin怎么用?PHP zp_loggedin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zp_loggedin函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: printLoginZone
/**
* Prints out the links for login/out, register formular if asked
*/
function printLoginZone()
{
if (!zp_loggedin() && (function_exists('printUserLogin_out') || function_exists('printUserLogin_out') || function_exists('printRegistrationForm'))) {
$multi = 0;
echo '<div id="loginout" class=" push_5 grid_10">';
if (zp_loggedin() && function_exists('printUserLogin_out')) {
printUserLogin_out('', '', false);
$multi++;
}
if (!zp_loggedin() && function_exists('printUserLogin_out')) {
if ($multi) {
echo ' - ';
}
printCustomPageURL(gettext('Login'), 'login', '', '');
$multi++;
}
if (!zp_loggedin() && function_exists('printRegistrationForm')) {
if ($multi) {
echo ' - ';
}
printCustomPageURL(gettext('Register for this site'), 'register', '', '');
}
echo '</div>';
}
}
示例2: printThemeFooter
function printThemeFooter()
{
echo '<ul class="menu footer">';
if (function_exists('printRegistrationForm') or function_exists('printUserLogin_out')) {
if (zp_loggedin() and function_exists('printUserLogin_out')) {
echo '<li>';
printUserLogin_out();
echo '</li>';
} else {
echo '<li><a href="' . getCustomPageURL('login') . '">';
if (function_exists('printRegistrationForm')) {
echo gettext('Register');
}
if (function_exists('printRegistrationForm') and function_exists('printUserLogin_out')) {
echo ' / ';
}
if (function_exists('printUserLogin_out')) {
echo gettext('Login');
}
echo '</a></li>';
}
}
if (function_exists('printContactForm')) {
echo '<li><a href="' . getCustomPageURL('contact') . '">' . gettext('Contact') . '</a></li>';
}
echo '</ul>';
}
示例3: admin_tabs
static function admin_tabs($tabs)
{
global $_zp_current_admin_obj;
if (zp_loggedin(ADMIN_RIGHTS) && $_zp_current_admin_obj->getID()) {
if (isset($tabs['users']['subtabs'])) {
$subtabs = $tabs['users']['subtabs'];
} else {
$subtabs = array(gettext('users') => 'admin-users.php?page=users&tab=users');
}
$subtabs[gettext("access")] = PLUGIN_FOLDER . '/accessThreshold/admin_tab.php?page=users&tab=access';
ksort($subtabs, SORT_LOCALE_STRING);
$tabs['users'] = array('text' => gettext("admin"), 'link' => WEBPATH . "/" . ZENFOLDER . '/admin-users.php?page=users&tab=users', 'subtabs' => $subtabs, 'default' => 'users');
}
return $tabs;
if (zp_loggedin(ADMIN_RIGHTS)) {
if (!isset($tabs['development'])) {
$tabs['development'] = array('text' => gettext("development"), 'subtabs' => NULL);
}
$tabs['development']['subtabs'][gettext("accessThreshold")] = PLUGIN_FOLDER . '/accessThreshold/admin_tab.php?page=development&tab=accessThreshold';
$named = array_flip($tabs['development']['subtabs']);
natcasesort($named);
$tabs['development']['subtabs'] = $named = array_flip($named);
$link = array_shift($named);
if (strpos($link, '/') !== 0) {
// zp_core relative
$tabs['development']['link'] = WEBPATH . '/' . ZENFOLDER . '/' . $link;
} else {
$tabs['development']['link'] = WEBPATH . $link;
}
}
return $tabs;
}
示例4: purgeOptions_admin_tabs
function purgeOptions_admin_tabs($tabs)
{
if (zp_loggedin(OPTIONS_RIGHTS)) {
$tabs['options']['subtabs'][gettext("purge")] = "/" . PURGEOPTIONS_FOLDER . 'purgeOptions_tab.php?page=options&tab=purge';
}
return $tabs;
}
示例5: customDisplayRights
static function customDisplayRights()
{
global $_zp_admin_tab;
if (!zp_loggedin(ADMIN_RIGHTS) && $_zp_admin_tab == 'users') {
?>
<script type="text/javascript">
// <!-- <![CDATA[
$(document).ready(function() {
$('select[name="showgroup"]').parent("th").remove(); // the "Show" dropdownn menu
$('.box-rights').remove(); // Rights. (the part with all the checkboxes).
$('.box-albums-unpadded').remove(); // Albums, Pages, and Categories.
$('.notebox').remove(); // All Noteboxes
$('label[for="admin_language_0"], ul.flags').remove(); // Languages
$('td:contains("<?php
echo gettext("Quota");
?>
")').parent("tr.userextrainfo").remove(); // Display of assigned quota (if the "quota_manager" plugin is enabled).
$('tr.userextrainfo td:contains("<?php
echo gettext("User group membership");
?>
")').next().andSelf().remove(); // "User group membership" information (if the user_groups plugin is enabled).
$('tr.userextrainfo td:contains("<?php
echo gettext("Street");
?>
")').parent("tr.userextrainfo").remove(); // Address information.
});
// ]]> -->
</script>
<?php
}
}
示例6: handleOptionSave
function handleOptionSave($themename, $themealbum)
{
if (zp_loggedin(CODEBLOCK_RIGHTS)) {
processCodeblockSave(0, $this);
}
return false;
}
示例7: head
static function head()
{
if (!zp_loggedin(TAGS_RIGHTS)) {
if (getOption('tagFromSearch_tagOnly')) {
setOption('search_fields', 'tags', false);
}
}
}
示例8: toolbox_gallery_extensions
function toolbox_gallery_extensions()
{
if (zp_loggedin(ADMIN_RIGHTS | COMMENT_RIGHTS)) {
echo "<li>";
printLink(WEBPATH . "/" . ZENFOLDER . '/admin-comments.php', gettext("Comments"), NULL, NULL, NULL);
echo "</li>\n";
}
}
示例9: tabs
static function tabs($tabs)
{
if (zp_loggedin(ADMIN_RIGHTS)) {
$oldtabs = $tabs;
$tabs = array();
foreach ($oldtabs as $tab => $data) {
if ($tab == 'logs') {
$tabs['clone'] = array('text' => gettext("clone"), 'link' => WEBPATH . "/" . ZENFOLDER . '/' . PLUGIN_FOLDER . '/cloneZenphoto/cloneTab.php', 'rights' => ADMIN_RIGHTS, 'subtabs' => NULL);
}
$tabs[$tab] = $data;
}
}
return $tabs;
}
示例10: jQueryUploadHandler_admin_tabs
function jQueryUploadHandler_admin_tabs($tabs)
{
if (zp_loggedin(UPLOAD_RIGHTS)) {
$me = sprintf(gettext('images (%s)'), 'jQuery');
$mylink = 'admin-upload.php?page=upload&tab=jQuery&type=' . gettext('images');
if (is_null($tabs['upload'])) {
$tabs['upload'] = array('text' => gettext("upload"), 'link' => WEBPATH . "/" . ZENFOLDER . '/admin-upload.php', 'subtabs' => NULL);
}
$tabs['upload']['subtabs'][$me] = $mylink;
if (zp_getcookie('uploadtype') == 'jQuery') {
$tabs['upload']['link'] = WEBPATH . "/" . ZENFOLDER . '/' . $mylink;
}
}
return $tabs;
}
示例11: filterMessage
/**
* The function for processing a message to see if it might be SPAM
* returns:
* 0 if the message is SPAM
* 1 if the message might be SPAM (it will be marked for moderation)
* 2 if the message is not SPAM
*
* @param string $author Author field from the posting
* @param string $email Email field from the posting
* @param string $website Website field from the posting
* @param string $body The text of the comment
* @param string $receiver The object on which the post was made
* @param string $ip the IP address of the comment poster
*
* @return int
*/
function filterMessage($author, $email, $website, $body, $receiver, $ip)
{
if (zp_loggedin($receiver->manage_rights) || $receiver->isMyItem($receiver->manage_some_rights)) {
// trust "managers"
return 2;
}
$strategy = getOption('Action');
switch ($strategy) {
case 'reject':
return 0;
case 'moderate':
return 1;
}
return 2;
}
示例12: elFinder_admin_tabs
function elFinder_admin_tabs($tabs)
{
if (zp_loggedin(FILES_RIGHTS)) {
$me = sprintf(gettext('files (%s)'), 'elFinder');
$mylink = PLUGIN_FOLDER . '/' . 'elFinder/filemanager.php?page=upload&tab=elFinder&type=' . gettext('files');
if (is_null($tabs['upload'])) {
$tabs['upload'] = array('text' => gettext("upload"), 'link' => WEBPATH . "/" . ZENFOLDER . '/admin-upload.php', 'subtabs' => NULL);
}
$tabs['upload']['subtabs'][$me] = $mylink;
if (zp_getcookie('uploadtype') == 'elFinder') {
$tabs['upload']['link'] = WEBPATH . "/" . ZENFOLDER . '/' . $mylink;
}
}
return $tabs;
}
示例13: printThemeMenu
function printThemeMenu()
{
echo '<ul id="main">';
if (getMainSiteName() != '') {
echo '<li class="title">' . gettext('Main site') . '</li>';
echo '<ul>';
echo '<li><a href="' . getMainSiteURL() . '" title="' . getMainSiteName() . '">' . getMainSiteName() . '</a></li>';
echo '</ul>';
}
if (function_exists('printAlbumMenu')) {
echo '<li class="title">' . gettext('Gallery') . '</li>';
$temp = getGalleryTitle();
printAlbumMenu('list', false, '', 'menu-active', 'submenu', 'menu-active', $temp, true);
} else {
echo '<li class="title">' . gettext('Gallery') . '</li>';
echo '<ul>';
echo '<li><a href="' . getGalleryIndexURL() . '" title="' . getGalleryTitle() . '">' . getGalleryTitle() . '</a></li>';
echo '</ul>';
}
if (function_exists('printNewsIndexURL')) {
echo '<li class="title">' . gettext('News blog') . '</li>';
printAllNewsCategories("All news", FALSE, "", "menu-active");
}
if (function_exists("printPageMenu")) {
echo '<li class="title">' . gettext('Pages') . '</li>';
printPageMenu("list", "", "menu-active", "submenu", "menu-active");
}
echo '<li class="title">' . gettext('Stay informed') . '</li>';
echo '<ul>';
echo '<li><a href="' . getCustomPageURL('archive') . '">' . gettext('Archives') . '</a></li>';
echo '</ul>';
echo '</ul>';
echo '<div id="login">';
echo '<div class="title">' . gettext('Connection') . '</div>';
if (function_exists('printUserLogin_out') and !zp_loggedin()) {
printUserLogin_out();
}
echo '</div>';
if (function_exists("printLanguageSelector")) {
echo '<div id="languages">';
echo '<div class="title">' . gettext('Languages') . '</div>';
printLanguageSelector();
echo '<div class="clear_left"></div>';
echo '</div>';
}
}
示例14: zp_footer
function zp_footer()
{
?>
<div id="credit"><?php
if (zp_loggedin()) {
printUserLogin_out($before = '', $after = '| ', $showLoginForm = NULL, $logouttext = NULL, $show_user = NULL);
} else {
printLinkHTML(WEBPATH . '/' . ZENFOLDER . '/admin.php', 'Admin | ');
}
printZenphotoLink();
?>
<?php
printVersion();
?>
</a> | Using "Side Of Chili Theme" by: <a href="http://www.chilifrei.net" title="How Do You Like Your Chili?">ChiliFrei64</a></div>
<?php
}
示例15: admin_approval_publish_object
function admin_approval_publish_object($object)
{
$msg = '';
if (!zp_loggedin($object->manage_rights)) {
// not allowed to change the published status
if (isset($object->data['show'])) {
$show = $object->data['show'];
} else {
$show = 0;
}
$newshow = $object->getShow();
$object->setShow($show);
if ($newshow != $show) {
$msg = gettext('You do not have rights to change the <em>publish</em> state.');
}
}
return $msg;
}