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


PHP Acl::is_proadmin方法代码示例

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


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

示例1: get_user_icon

function get_user_icon($login, $pro)
{
    ${$pixmaps} = '../pixmaps/user-green.png';
    $db = new ossim_db();
    $conn = $db->connect();
    $user = Session::get_list($conn, "WHERE login='{$login}'");
    if ($pro) {
        // Pro-version
        if ($login == ACL_DEFAULT_OSSIM_ADMIN || $user[0]->get_is_admin()) {
            $pixmaps = '../pixmaps/user-gadmin.png';
        } elseif (Acl::is_proadmin($conn, $user[0]->get_login())) {
            $pixmaps = '../pixmaps/user-business.png';
        }
    } else {
        // Open Source
        if ($login == ACL_DEFAULT_OSSIM_ADMIN || $user[0]->get_is_admin()) {
            $pixmaps = "../pixmaps/user-gadmin.png";
        }
    }
    $db->close();
    return $pixmaps;
}
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:22,代码来源:opened_sessions.php

示例2: get_user_icon

function get_user_icon($login, $pro)
{
    require_once 'ossim_db.inc';
    $db = new ossim_db();
    $dbconn = $db->connect();
    $user = Session::get_list($dbconn, "WHERE login='{$login}'");
    if ($pro) {
        // Pro-version
        if ($login == ACL_DEFAULT_OSSIM_ADMIN || $user[0]->get_is_admin()) {
            return "../pixmaps/user-gadmin.png";
        } elseif (Acl::is_proadmin($dbconn, $user[0]->get_login())) {
            return "../pixmaps/user-business.png";
        } else {
            return "../pixmaps/user-green.png";
        }
    } else {
        // Opensource
        if ($login == ACL_DEFAULT_OSSIM_ADMIN || $user[0]->get_is_admin()) {
            return "../pixmaps/user-gadmin.png";
        } else {
            return "../pixmaps/user-green.png";
        }
    }
}
开发者ID:jhbsz,项目名称:ossimTest,代码行数:24,代码来源:opened_sessions.php

示例3: foreach

		});
	
	</script>
	
</head>

<body id='body_scroll' style="background-color:#fafafa">

<div id='container'>
	<table width="95%" class='transparent'  align='center'>

	<?php 
foreach ($notes as $note) {
    if (Session::is_admin($conn, $note->get_user()) || $note->get_user() == AV_DEFAULT_ADMIN) {
        $icon = '/ossim/pixmaps/user-business.png';
    } elseif (Session::is_pro() && Acl::is_proadmin($conn, $note->get_user())) {
        $icon = '/ossim/pixmaps/user-gadmin.png';
    } else {
        $icon = '/ossim/pixmaps/user-green.png';
    }
    ?>
	
		<tr>
			<td class="nobborder" width='25%' height="100px">

				<div class='note_info'>
					<table class="noborder" align="center">
    					<tr>
    					  <td><img align="absmiddle" alt="Entity admin" src="<?php 
    echo $icon;
    ?>
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:view_notes.php

示例4: foreach

    }
} else {
    $total = 0;
}
$xml .= "<rows>\n";
$xml .= "<page>{$page}</page>\n";
$xml .= "<total>{$total}</total>\n";
foreach ($user_list as $user) {
    $login = $user->get_login();
    if ($login == AV_DEFAULT_ADMIN && $myself != AV_DEFAULT_ADMIN) {
        continue;
    }
    $icon = '';
    if ($user->get_is_admin() || $login == AV_DEFAULT_ADMIN) {
        $icon = ' <img src="../pixmaps/user-business.png" align="absmiddle" alt="' . _('Admin') . '"/>';
    } elseif (Session::is_pro() && Acl::is_proadmin($conn, $login)) {
        $icon = ' <img src="../pixmaps/user-gadmin.png" align="absmiddle" alt="' . _('Entity admin') . '"/>';
    }
    $name = "&nbsp;<a style='font-weight:bold;' href=\"./user_form.php?login=" . $login . "\">" . $user->get_name() . "</a>&nbsp;";
    $email = $user->get_email();
    if (Session::is_pro()) {
        $entities = $user->get_ctx();
        $companies = array();
        foreach ($entities as $entity_id) {
            $parents = Acl::get_entity_parents($conn, $entity_id);
            $parents = array_reverse($parents);
            $parents[] = $entity_id;
            $ent_name = array();
            foreach ($parents as $eid) {
                $ent_name[] = Acl::get_entity_name($conn, $eid);
            }
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:getusers.php

示例5: count

		<td id='subscribe_section' nowrap='nowrap' colspan='4'>
				
				<select name="login">
				<?php 
$current_user = Session::get_session_user();
$number_users = count($users);
if (Session::am_i_admin()) {
    $filtered_users = $users;
} else {
    foreach ($users as $u) {
        $login = $u->get_login();
        if ($login == $current_user) {
            $filtered_users[] = $u;
        } else {
            if (!Session::is_admin($conn, $login)) {
                if ($pro && !Acl::am_i_proadmin() && !Acl::is_proadmin($conn, $login) > 0) {
                    $filtered_users[] = $u;
                } elseif ($pro && Acl::am_i_proadmin()) {
                    $filtered_users[] = $u;
                }
            }
        }
    }
}
if ($number_users == 0) {
    ?>
					<option value="">- <?php 
    echo _("No users found");
    ?>
 -</option>
					<?php 
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:incident.php


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