• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP is_privileged函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: is_privileged

<!DOCTYPE html>
<?php 
@session_start();
if (!isset($_SESSION['username'])) {
    echo '<script language="javascript">
		alert(\'Unable to view this page you have to login!\')
		</script>';
    echo "<meta http-equiv=\"refresh\" content=\"0;URL=../?error=Login_Required\">";
} else {
    $username = $_SESSION['username'];
    include "../db/db.php";
    include "../actions/user_priviledges.php";
    $developer = is_privileged($_SESSION['account_no'], 1);
    //$registrar= is_privileged($_SESSION['account_no'], 13);
    $eis_admin = is_privileged($_SESSION['account_no'], 3);
    $super_admin = is_privileged($_SESSION['account_no'], 2);
    if (!$developer && !$eis_admin) {
        header("Location: ../restrict.php");
    }
    ?>
<html lang="en"><!-- InstanceBegin template="/Templates/eis_admin_template.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>

  <meta charset="utf-8" />
  <!-- InstanceBeginEditable name="doctitle" -->
    <title>Pagasa National Highschool:: Base Admin</title>
  <!-- InstanceEndEditable -->
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="apple-mobile-web-app-capable" content="yes" />    
    
  
开发者ID:jackieramos,项目名称:pnhs,代码行数:29,代码来源:eis_admin_manage_employees.php


示例2: refreshParent

	window.onunload = refreshParent;
				function refreshParent() {
				window.opener.location.reload();
				}
	</script>
<?php 
include "../db/db.php";
include '../actions/user_priviledges.php';
@session_start();
if (!isset($_SESSION['username'])) {
    header("Location: ../restrict.php");
}
$developer = is_privileged($_SESSION['account_no'], 1);
$super_admin = is_privileged($_SESSION['account_no'], 2);
$supply_admin = is_privileged($_SESSION['account_no'], 9);
$supply_officer = is_privileged($_SESSION['account_no'], 16);
if (!$developer && !$super_admin && !$supply_admin && !$supply_officer) {
    header("Location: ../restrict.php");
}
?>

  <meta charset="utf-8" />
  <!-- InstanceBeginEditable name="doctitle" -->
    <title>Pagasa National Highschool:: Base Admin</title>
  <!-- InstanceEndEditable -->
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="apple-mobile-web-app-capable" content="yes" />    
    
  
  <link href="../css/bootstrap.css" rel="stylesheet" />
    
开发者ID:jackieramos,项目名称:pnhs,代码行数:30,代码来源:inv_mr_records.php


示例3: header

}
?>

<html lang="en"><!-- InstanceBegin template="/Templates/sched_template.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
  <?php 
@session_start();
include "../db/db.php";
include "../actions/user_privileges.php";
if (!isset($_SESSION['username'])) {
    header("Location: ../restrict.php");
}
$developer = is_privileged($_SESSION['account_no'], 1);
$super_admin = is_privileged($_SESSION['account_no'], 2);
$scheduling_admin = is_privileged($_SESSION['account_no'], 6);
$scheduling_officer = is_privileged($_SESSION['account_no'], 14);
if (!$developer && !$super_admin && !$scheduling_admin && !$scheduling_officer) {
    header("Location: restrict.php");
}
?>
  <meta charset="utf-8" />
  <!-- InstanceBeginEditable name="doctitle" -->
    <title>Pagasa National Highschool:: Base Admin</title>
  <!-- InstanceEndEditable -->
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="apple-mobile-web-app-capable" content="yes" />    
    
  
  <link href="../css/bootstrap.css" rel="stylesheet" />
    
  <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600" rel="stylesheet" />
开发者ID:jackieramos,项目名称:pnhs,代码行数:31,代码来源:section_add0.php


示例4: header

	<!DOCTYPE html>

<html lang="en"><!-- InstanceBegin template="/Templates/library_template.dwt.php" codeOutsideHTMLIsLocked="false" -->
  <head>
 <?php 
require "db.php";
@session_start();
if (!isset($_SESSION['username'])) {
    header("location: ../restrict.php");
    // IMPORTANT!!!!
}
include_once "../actions/user_priviledges.php";
$developer = is_privileged($_SESSION['account_no'], 1);
$super_admin = is_privileged($_SESSION['account_no'], 2);
$librarian = is_privileged($_SESSION['account_no'], 8);
?>
    <meta charset="utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
  <title>Pagasa National Highschool:: Base Admin</title>
  <!-- InstanceEndEditable -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />    
    
    <link href="../css/bootstrap.min.css" rel="stylesheet" />
    <link href="../css/bootstrap-responsive.min.css" rel="stylesheet" />
    
    <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600" rel="stylesheet" />
    <link href="../css/font-awesome.min.css" rel="stylesheet" />        
    
    
    <link href="../css/base-admin-2.css" rel="stylesheet" />
开发者ID:jackieramos,项目名称:pnhs,代码行数:31,代码来源:report_book_daily.php


示例5: header

$_SESSION['username'];
$username = $_SESSION['username'];
?>

<html lang="en"><!-- InstanceBegin template="/Templates/grading_template.dwt.php" codeOutsideHTMLIsLocked="false" -->
 <?php 
@session_start();
include "../db/db.php";
include "../actions/user_privileges.php";
if (!isset($_SESSION['username'])) {
    header("Location: ../restrict.php");
}
$developer = is_privileged($_SESSION['account_no'], 1);
$super_admin = is_privileged($_SESSION['account_no'], 2);
$adviser = is_privileged($_SESSION['account_no'], 10);
$teacher = is_privileged($_SESSION['account_no'], 12);
if (!$developer && !$super_admin && !$adviser && !$teacher) {
    header("Location: restrict.php");
}
?>
<head>

  <meta charset="utf-8" />
  <!-- InstanceBeginEditable name="doctitle" -->
    <title>Pagasa National Highschool:: Base Admin</title>
  <!-- InstanceEndEditable -->
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="apple-mobile-web-app-capable" content="yes" />    
    
  
  <link href="../css/bootstrap.css" rel="stylesheet" />
开发者ID:jackieramos,项目名称:pnhs,代码行数:31,代码来源:grading_class_viewclass.php


示例6: header

<!DOCTYPE html>
<?php 
@session_start();
?>

<html lang="en"><!-- InstanceBegin template="/Templates/ams_template.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<?php 
//
@session_start();
include "../db/db.php";
include "../actions/user_priviledges.php";
if (!isset($_SESSION['username'])) {
    header("Location: ../restrict.php");
}
if (!is_privileged($_SESSION['account_no'], 2)) {
    header("Location: ../restrict.php");
}
?>
  <meta charset="utf-8" />
  <!-- InstanceBeginEditable name="doctitle" -->
    <title>Pagasa National Highschool:: Base Admin</title>
  <!-- InstanceEndEditable -->
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="apple-mobile-web-app-capable" content="yes" />    
    
  
  <link href="../css/bootstrap.css" rel="stylesheet" />
    
  <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600" rel="stylesheet" />
  <link href="../css/font-awesome.min.css" rel="stylesheet" />        
开发者ID:jackieramos,项目名称:pnhs,代码行数:31,代码来源:ams_edit_dept.php


示例7: mx_counton

function mx_counton()
{
    // how many users connected ?
    global $mxdb;
    $users = $mxdb->counton();
    echo '<div class="quicknums">';
    echo '<h5>' . _('Some Numbers') . '</h5>';
    if (is_privileged()) {
        echo '<a href="' . mx_pageurl('whoswhere') . '" alt="' . mx_pagename('whoswhere') . '">';
        if (!$users['on']) {
            __('Nobody\'s online...');
        } else {
            if ($users['on'] == 1) {
                __('1 user online');
            } else {
                echo sprintf(_('%s users online'), $users['on']);
            }
        }
        echo '</a>';
        echo '<br/>';
        echo '<a href="' . mx_optionurl('fans', 'fandir') . '" alt="' . mx_optionname('fans', 'fandir') . '">';
        if (!$users['fans']) {
            __('No fan registered...');
        } else {
            if ($users['fans'] == 1) {
                __('1 fan registered');
            } else {
                echo sprintf(_('%s fans registered'), $users['fans']);
            }
        }
        echo '</a>';
        echo '<br/>';
        echo '<a href="' . mx_optionurl('artists', 'artsdir') . '" alt="' . mx_optionname('artists', 'artsdir') . '">';
        if (!$users['artists']) {
            __('No artist registered...');
        } else {
            if ($users['artists'] == 1) {
                __('1 artist registered');
            } else {
                echo sprintf(_('%s artists registered'), $users['artists']);
            }
        }
        echo '</a>';
        echo '<hr/>';
    }
    echo sprintf(_('%s visitors'), '<span id="mxvisits">' . $users['visitors'] . '</span>');
    echo '<br/>';
    //echo sprintf(_('%d connections'),$users['connections']);
    //echo '<br/>';
    echo sprintf(_('%s hits'), '<span id="mxhits">' . $users['hits'] . '</span>');
    echo '<br/>';
    echo '<script>cnttmr=setInterval(\'checkvisits()\',10000);</script>';
    echo '</div>';
}
开发者ID:nsystem1,项目名称:OS-MusXpand,代码行数:54,代码来源:mx_functions.php


示例8: session_start

<?php 
include "../db/db.php";
session_start();
if (!isset($_SESSION['username'])) {
    header("location: ../restrict.php");
}
?>
 
<?php 
include "../actions/user_priviledges.php";
$developer = is_privileged($_SESSION['account_no'], 1);
$super_admin = is_privileged($_SESSION['account_no'], 2);
$sis_admin = is_privileged($_SESSION['account_no'], 4);
$club_adviser = is_privileged($_SESSION['account_no'], 11);
$student = is_privileged($_SESSION['account_no'], 17);
if (!$developer || !$club_adviser) {
    header("Location: ../restrict.php");
}
?>
<html lang="en"><!-- InstanceBegin template="/Templates/sisclubadviser_template.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
  <meta charset="utf-8" />
  <!-- InstanceBeginEditable name="doctitle" -->
  <title>Pagasa National Highschool:: Base Admin</title>
  <!-- InstanceEndEditable -->
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="apple-mobile-web-app-capable" content="yes" />    
    
      <link href="./css/pages/reports.css" rel="stylesheet" />
  <link href="../../css/bootstrap.css" rel="stylesheet" />
开发者ID:jackieramos,项目名称:pnhs,代码行数:30,代码来源:ca-update-member.php


示例9: mx_showmenu

function mx_showmenu($menu, $menutype, $curpage = '', $curopt = '')
{
    global $mx_ctxmenu, $mx_fbmenu, $mxuser;
    define('MXMENUVERTUSER', 0);
    define('MXMENUHORIZTOP', 1);
    define('MXMENUHORIZBOT', 2);
    define('MXMENUHORIZICON', 3);
    define('MXMENUHORIZHELP', 4);
    define('MXMENUVERTMAIN', 5);
    define('MXMENUHORIZFB', 6);
    define('MXMENUVERTICON', 7);
    if ($menutype != 0 && $menutype != 4 && $menutype != 6 && $menu != $mx_ctxmenu && array_key_exists($curpage, $mx_ctxmenu) && ($mx_ctxmenu[$curpage][0] == 1 && is_logged() || $mx_ctxmenu[$curpage][0] == 1.5 && !is_confirmed() || $mx_ctxmenu[$curpage][0] == 2 && !is_logged() || $mx_ctxmenu[$curpage][0] == 2.4 && (!is_logged() || is_confirmed()) || $mx_ctxmenu[$curpage][0] == 2.5 && (!is_confirmed() || is_setup()) || $mx_ctxmenu[$curpage][0] >= 3 && !is_setup() || $mx_ctxmenu[$curpage][0] == 10 && !(is_setup() && is_artist()) || $mx_ctxmenu[$curpage][0] == 11 && !(is_setup() && is_artist() && is_pageadmin()) || $mx_ctxmenu[$curpage][0] == 20 && !is_privileged() || $mx_ctxmenu[$curpage][0] < 0 || $mx_ctxmenu[$curpage][0] == 127 && !is_admin() || $mx_ctxmenu[$curpage][0] == 126 && !is_pseudoadmin())) {
        return;
    }
    if ($menutype == 6 && ($mx_fbmenu[$curpage][0] == 1 && is_logged() || $mx_fbmenu[$curpage][0] == 1.5 && !is_confirmed() || $mx_fbmenu[$curpage][0] == 2 && !is_logged() || $mx_fbmenu[$curpage][0] == 2.4 && (!is_logged() || is_confirmed()) || $mx_fbmenu[$curpage][0] == 2.5 && (!is_confirmed() || is_setup()) || $mx_fbmenu[$curpage][0] >= 3 && !is_setup() || $mx_fbmenu[$curpage][0] == 10 && !(is_setup() && is_artist()) || $mx_fbmenu[$curpage][0] == 11 && !(is_setup() && is_artist() && is_pageadmin()) || $mx_fbmenu[$curpage][0] < 0 || $mx_fbmenu[$curpage][0] == 127 && !is_admin() || $mx_fbmenu[$curpage][0] == 126 && !is_pseudoadmin())) {
        //error_log(print_r($mx_fbmenu[$curpage][0],true));
        return;
    }
    switch ($menutype) {
        case MXMENUVERTUSER:
            // user vertical menu
            $style = 'usermenu menusep';
            break;
        case MXMENUHORIZTOP:
            // topbar horizontal menu
            $style = 'ctxmenu';
            break;
        case MXMENUHORIZBOT:
            // bottom screen menu
            $style = 'musxmenu';
            break;
        case MXMENUHORIZICON:
            // topbar icon menu
            $style = 'iconmenu';
            break;
        case MXMENUHORIZHELP:
            // help menu
            $style = 'helpmenu';
            break;
        case MXMENUVERTMAIN:
            // main vertical menu
            $style = 'mainmenu menusep';
            break;
        case MXMENUHORIZFB:
            // facebook menu
            $style = 'fbmenu';
            break;
        case MXMENUVERTICON:
            // big icons menu
            $style = 'bigmenu';
            break;
    }
    echo '<div class=\'' . $style . '\'>';
    echo '<ul>';
    if ($mxuser->id && ($menutype == MXMENUVERTUSER || $menutype == MXMENUVERTMAIN)) {
        echo '<li class="menutitle">' . ($menutype == MXMENUVERTMAIN ? '' : strtoupper(mx_pagename($curpage))) . '</li>';
    }
    foreach ($menu as $menuopt => $menutable) {
        /*if (abs($menutable[0])>1 && !is_confirmed()
        		&& $menuopt!='signoff'
        		//&& $menuopt!='messages'
        		&& $menuopt!='help'
        		//&& $menuopt!='friends'
        		&& $menuopt!='setup') continue;*/
        if (array_key_exists(2, $menutable) && !is_array($menutable[2]) && $menutable[2] != '#') {
            // redirection
            $page = $menutable[2];
            $option = $menutable[3] != '' ? $menutable[3] : '';
        } else {
            if (array_key_exists(2, $menutable) && $menutable[2] == '#') {
                // javascript (feedback)
                $page = '#';
                $option = '';
            } else {
                if ($menutype == 1 || $menutype == 0 || $menutype == 7) {
                    // top or user menu
                    $page = $curpage;
                    $option = $menuopt;
                } else {
                    if ($menutype == 4) {
                        // help menu
                        if ($mx_ctxmenu['help'][2][$curpage][3] == '') {
                            $page = 'help';
                            $option = $curpage;
                        } else {
                            $page = 'help';
                            $option = $mx_ctxmenu['help'][2][$curpage][3];
                        }
                    } else {
                        $page = $menuopt;
                        $option = '';
                    }
                }
            }
        }
        if (($menutype != 4 || $curpage != $menuopt) && (!$menutable[0] || $menutable[0] == 1 && !is_logged() || $menutable[0] == 1.5 && !is_logged() || $menutable[0] == 2 && is_logged() || $menutable[0] == 2.4 && is_logged() && !is_confirmed() || $menutable[0] == 2.5 && is_confirmed() && !is_setup() || $menutable[0] == 3 && is_setup() || $menutable[0] == 10 && is_setup() && is_artist() || $menutable[0] == 11 && is_setup() && is_artist() && is_pageadmin() || $menutable[0] == 20 && is_privileged() || $menutable[0] == 127 && is_admin() || $menutable[0] == 126 && is_pseudoadmin())) {
            if ($menutype == 3) {
                // icon menu
                $label = mx_icon($menuopt, $menutable[1], '20px');
                if ($menuopt == 'messages' && $mxuser->newmsgs > 0) {
//.........这里部分代码省略.........
开发者ID:nsystem1,项目名称:OS-MusXpand,代码行数:101,代码来源:mx_menus.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP is_privilegied函数代码示例发布时间:2022-05-15
下一篇:
PHP is_private_ip函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap