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


PHP gs_group_permissions_get函数代码示例

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


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

示例1: __

        echo "<br />" . $noresultsmsg . "<br />\n";
    }
    echo "</body>\n";
    echo "<softkey index=\"1\" label=\"" . __("Zurück") . "\" action=\"Softkey:Back\" />\n";
    echo "<softkey index=\"2\" label=\"\" action=\"\" />\n";
    echo "<softkey index=\"3\" label=\"" . __("Beenden") . "\" action=\"Softkey:Exit\" />\n";
    echo "<softkey index=\"4\" label=\"\" action=\"\" />\n";
    echo "</html>\n";
    _ob_send();
}
#################################### IMPORTED PHONEBOOK }
#################################### INTERNAL PHONEBOOK {
if ($type === "gs") {
    $mac = preg_replace("/[^\\dA-Z]/", "", strToUpper(trim(@$_REQUEST["m"])));
    $user_groups = gs_group_members_groups_get(array($user_id), "user");
    $permission_groups = gs_group_permissions_get($user_groups, "phonebook_user");
    $group_members = gs_group_members_get($permission_groups);
    ob_start();
    echo $phonebook_doctype . "\n";
    $pagetitle = __("Telefonbuch") . " - " . $typeToTitle[$type];
    $searchsql = "1";
    $noresultsmsg = __("Dieses Telefonbuch enthält keine Einträge.");
    if (strlen($querystring) > 0) {
        $pagetitle .= " ('" . $querystring . "')";
        $searchsql = "`u`.`lastname` LIKE '%" . $querystring . "%' OR `u`.`firstname` LIKE '%" . $querystring . "%'";
        $noresultsmsg = sprintf(__("Keine Treffer für \"%s\". Drücken Sie 'Zurück', um eine neue Suche auszuführen."), $querystring);
    }
    echo "<html>\n";
    echo "<head><title>" . htmlEnt($pagetitle) . "</title></head>\n";
    echo "<body><br />\n";
    $query = "SELECT `u`.`lastname` `ln`, `u`.`firstname` `fn`, `s`.`name` `ext` " . "FROM " . "  `users` `u` JOIN " . "  `ast_sipfriends` `s` ON (`s`.`_user_id`=`u`.`id`) " . "WHERE " . "  `u`.`id` IN (" . implode(",", $group_members) . ") AND (" . "  `u`.`id` != " . $user_id . " ) AND " . $searchsql . " " . "ORDER BY `u`.`lastname`, `u`.`firstname` " . "LIMIT " . $num_results;
开发者ID:hehol,项目名称:GemeinschaftPBX,代码行数:31,代码来源:pb.php

示例2: gui_get_grouped_peers

function gui_get_grouped_peers($user_id, $type)
{
    require_once GS_DIR . 'inc/group-fns.php';
    $user_groups = gs_group_members_groups_get(array($user_id), 'user');
    $permission_groups = gs_group_permissions_get($user_groups, $type);
    $group_members = gs_group_members_get($permission_groups);
    return $group_members;
}
开发者ID:rkania,项目名称:GS3,代码行数:8,代码来源:permissions.php

示例3: trim

}
$type = trim(@$_REQUEST["t"]);
if (!in_array($type, array("forward"), true)) {
    $type = false;
}
$user = trim(@$_REQUEST["u"]);
if (!preg_match("/^\\d+\$/", $user)) {
    _err("Not a valid SIP user.");
}
$db = gs_db_slave_connect();
$user_id = getUserID($user);
$mac = preg_replace("/[^\\dA-Z]/", "", strtoupper(trim(@$_REQUEST["m"])));
// check permissions
$user_groups = gs_group_members_groups_get(array($user_id), "user");
$members_fwd = gs_group_permissions_get($user_groups, "forward");
$members_rt = gs_group_permissions_get($user_groups, "ringtone_set");
if (count($members_fwd) <= 0) {
    $show_forward = false;
} else {
    $show_forward = true;
}
if (count($members_rt) <= 0) {
    $show_rt = false;
} else {
    $show_rt = true;
}
// setup i18n stuff
gs_setlang(gs_get_lang_user($db, $user, GS_LANG_FORMAT_GS));
gs_loadtextdomain("gemeinschaft-gui");
gs_settextdomain("gemeinschaft-gui");
$url_polycom_provdir = GS_PROV_SCHEME . "://" . GS_PROV_HOST . (GS_PROV_PORT ? ":" . GS_PROV_PORT : "") . GS_PROV_PATH . "polycom/";
开发者ID:hehol,项目名称:GemeinschaftPBX,代码行数:31,代码来源:configmenu.php

示例4: gs_log

        return -1;
    }
    return $user_id;
}
//---------------------------------------------------------------------------
if (!gs_get_conf("GS_POLYCOM_PROV_ENABLED")) {
    gs_log(GS_LOG_DEBUG, "Polycom provisioning not enabled");
    _err("Not enabled.");
}
$db = gs_db_slave_connect();
$mac = preg_replace("/[^\\dA-Z]/", "", strtoupper(trim(@$_REQUEST["m"])));
$user = trim(@$_REQUEST["u"]);
$user_id = getUserID($user);
// Check permissions
$user_groups = gs_group_members_groups_get(array($user_id), "user");
$members = gs_group_permissions_get($user_groups, "dnd_set");
// exit if access is not granted
if (count($members) <= 0) {
    exit(1);
}
// setup i18n stuff
gs_setlang(gs_get_lang_user($db, $user, GS_LANG_FORMAT_GS));
gs_loadtextdomain("gemeinschaft-gui");
gs_settextdomain("gemeinschaft-gui");
$user_id_check = $db->executeGetOne("SELECT `user_id` FROM `phones` WHERE `mac_addr`='" . $db->escape($mac) . "'");
if ($user_id != $user_id_check) {
    _err("Not authorized");
}
$remote_addr = @$_SERVER["REMOTE_ADDR"];
$remote_addr_check = $db->executeGetOne("SELECT `current_ip` FROM `users` WHERE `id`='" . $user_id . "'");
if ($remote_addr != $remote_addr_check) {
开发者ID:hehol,项目名称:GemeinschaftPBX,代码行数:31,代码来源:dnd.php

示例5: str_replace

echo '<h2>';
if (@$MODULES[$SECTION]['icon']) {
    echo '<img alt=" " src="', GS_URL_PATH, str_replace('%s', '32', $MODULES[$SECTION]['icon']), '" /> ';
}
if (count($MODULES[$SECTION]['sub']) > 1) {
    echo $MODULES[$SECTION]['title'], ' - ';
}
echo $MODULES[$SECTION]['sub'][$MODULE]['title'];
echo '</h2>', "\n";
$action = @$_REQUEST['action'];
$user_id = @$_SESSION['sudo_user']['info']['id'];
if (!$user_id) {
    exit;
}
$user_groups = gs_group_members_groups_get(array($user_id), 'user');
$queue_ids = gs_group_members_get(gs_group_permissions_get($user_groups, 'monitor_queues', 'queue'));
if ($action == 'save') {
    $colors = array();
    for ($status = 0; $status <= 255; ++$status) {
        if (array_key_exists('ec' . $status, $_REQUEST)) {
            $colors[$status] = trim($_REQUEST['ec' . $status]);
        }
    }
    $queues = array();
    foreach ($queue_ids as $queue_id) {
        $queue = array();
        if (array_key_exists('qa' . $queue_id, $_REQUEST) && $_REQUEST['qa' . $queue_id] == "on") {
            $queue['active'] = 1;
        } else {
            $queue['active'] = 0;
        }
开发者ID:rkania,项目名称:GS3,代码行数:31,代码来源:monitor_queuemon.php

示例6: defined

* of the License, or (at your option) any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
\*******************************************************************/
defined('GS_VALID') or die('No direct access.');
$user_id = (int) @$_SESSION['sudo_user']['info']['id'];
$user_groups = gs_group_members_groups_get(array($user_id), 'user');
$permission_groups = gs_group_permissions_get($user_groups, 'phonebook_imported_edit');
$group_members = gs_group_members_get($permission_groups);
if (in_array($user_id, $group_members)) {
    $is_admin = true;
} else {
    $is_admin = false;
}
echo '<h2>';
if (@$MODULES[$SECTION]['icon']) {
    echo '<img alt=" " src="', GS_URL_PATH, str_replace('%s', '32', $MODULES[$SECTION]['icon']), '" /> ';
}
if (count($MODULES[$SECTION]['sub']) > 1) {
    echo $MODULES[$SECTION]['title'], ' - ';
}
echo $MODULES[$SECTION]['sub'][$MODULE]['title'];
echo '</h2>', "\n";
开发者ID:hehol,项目名称:GemeinschaftPBX,代码行数:31,代码来源:pb_imported.php

示例7: snom_textscreen

    if ($user_id < 1) {
        snom_textscreen(__('Fehler'), __('Benutzer unbekannt'));
    }
    return $user_id;
}
if (!gs_get_conf('GS_SNOM_PROV_ENABLED')) {
    gs_log(GS_LOG_DEBUG, "Snom provisioning not enabled");
    snom_textscreen(__('Fehler'), __('Nicht aktiviert'));
}
$db = gs_db_slave_connect();
$user = trim(@$_REQUEST['u']);
$user_id = getUserID($user);
## Check permissions
#
$user_groups = gs_group_members_groups_get(array($user_id), 'user');
$members = gs_group_permissions_get($user_groups, 'forward');
if (count($members) <= 0) {
    _err('Forbidden');
}
// setup i18n stuff
gs_setlang(gs_get_lang_user($db, $user, GS_LANG_FORMAT_GS));
gs_loadtextdomain("gemeinschaft-gui");
gs_settextdomain("gemeinschaft-gui");
$type = trim(@$_REQUEST['t']);
if (!in_array($type, array('internal', 'external', 'std', 'var', 'timeout'), true)) {
    $type = false;
}
$tmp = array(15 => array('k' => 'internal', 'v' => gs_get_conf('GS_CLIR_INTERNAL', __("von intern"))), 25 => array('k' => 'external', 'v' => gs_get_conf('GS_CLIR_EXTERNAL', __("von extern"))));
kSort($tmp);
foreach ($tmp as $arr) {
    $typeToTitle[$arr['k']] = $arr['v'];
开发者ID:hehol,项目名称:GemeinschaftPBX,代码行数:31,代码来源:callforward.php

示例8: str_replace

include_once GS_DIR . 'inc/gs-fns/gs_user_callerids_get.php';
include_once GS_DIR . 'inc/group-fns.php';
echo '<h2>';
if (@$MODULES[$SECTION]['icon']) {
    echo '<img alt=" " src="', GS_URL_PATH, str_replace('%s', '32', $MODULES[$SECTION]['icon']), '" /> ';
}
if (count($MODULES[$SECTION]['sub']) > 1) {
    echo $MODULES[$SECTION]['title'], ' - ';
}
echo $MODULES[$SECTION]['sub'][$MODULE]['title'];
echo '</h2>', "\n";
$user_groups = gs_group_members_groups_get(array($_SESSION['real_user']['info']['id']), 'user');
$members_clip = gs_group_permissions_get($user_groups, 'clip_set');
$members_clir = gs_group_permissions_get($user_groups, 'clir_set');
$members_cw = gs_group_permissions_get($user_groups, 'callwaiting_set');
$members_adm = gs_group_permissions_get($user_groups, 'sudo_user');
$disabled = array('clip' => '', 'clir' => '', 'cw' => '');
if (count($members_adm) <= 0) {
    if (count($members_clip) <= 0) {
        $disabled['clip'] = ' disabled';
    }
    if (count($members_clir) <= 0) {
        $disabled['clir'] = ' disabled';
    }
    if (count($members_cw) <= 0) {
        $disabled['cw'] = ' disabled';
    }
}
if (@$_REQUEST['action'] == 'save') {
    $clir_internal = @$_REQUEST['clir-internal'] == 'yes' ? 'yes' : 'no';
    $clir_external = @$_REQUEST['clir-external'] == 'yes' ? 'yes' : 'no';
开发者ID:hehol,项目名称:GemeinschaftPBX,代码行数:31,代码来源:features_features.php

示例9: gs_group_members_groups_get

$action = @$_REQUEST['action'];
if ($action == 'report') {
    $group = @$_REQUEST['group'];
    $month_d = (int) @$_REQUEST['month'];
} else {
    $action = '';
    $group = '';
    //$month_d  = -1;  # previous month
    $month_d = 0;
    # current month
}
if (!$group) {
    $group = @$_SESSION['sudo_user']['name'];
}
$user_groups = gs_group_members_groups_get(array(@$_SESSION['sudo_user']['info']['id']), 'user');
$select_groups = gs_group_permissions_get($user_groups, 'call_stats', 'user');
$group_info = gs_group_info_get($select_groups);
if (array_search($group, $select_groups) === false) {
    $exts_sql = '';
} else {
    $users = gs_group_members_get(array($group));
    $exts_sql = userids_to_exts($users);
}
?>




<form method="get" action="<?php 
echo GS_URL_PATH;
?>
开发者ID:rkania,项目名称:GS3,代码行数:31,代码来源:stats_groupc.php

示例10: __

	<td style="width:140px;"><code>*4</code></td>
	<td style="width:420px;">
		<?php 
    echo __('Einrichten eines Weckrufes');
    ?>
	</td>
</tr>
</tbody>
</table>
<?php 
}
?>


<?php 
if (count(gs_group_permissions_get($user_groups, 'login_queues')) > 0) {
    ?>
<table cellspacing="1" class="phonebook">
<thead>
<tr>
	<th colspan="2"><?php 
    echo __('Warteschlangen');
    ?>
</th>
</tr>
</thead>
<tbody>
<tr>
	<td style="width:140px;"><code>*5 <i><?php 
    echo __('Durchwahl');
    ?>
开发者ID:rkania,项目名称:GS3,代码行数:31,代码来源:help_numbers.php

示例11: gs_clir_activate

if (@$_REQUEST['action'] == 'save') {
    $clir_internal = @$_REQUEST['clir-internal'] == 'yes' ? 'yes' : 'no';
    $clir_external = @$_REQUEST['clir-external'] == 'yes' ? 'yes' : 'no';
    gs_clir_activate($_SESSION['sudo_user']['name'], 'internal', $clir_internal);
    gs_clir_activate($_SESSION['sudo_user']['name'], 'external', $clir_external);
    $cw = !!@$_REQUEST['callwaiting'];
    # setting this reboots phone, so check if it has really changed
    $cw_old = gs_callwaiting_get($_SESSION['sudo_user']['name']);
    if (!isGsError($cw_old)) {
        if ($cw != $cw_old) {
            gs_callwaiting_activate($_SESSION['sudo_user']['name'], $cw);
        }
    }
}
$user_groups = gs_group_members_groups_get(array(@$_SESSION['sudo_user']['info']['id']), 'user');
$queues_allowed = gs_group_members_get(gs_group_permissions_get($user_groups, 'login_queues', 'queue'));
$user = gs_user_get($_SESSION['sudo_user']['name']);
$queue_ids = @$_REQUEST['queue_id'];
if (@$_REQUEST['action'] == 'loginqueue' && !empty($queue_ids)) {
    $ami = new AMI();
    $ami->ami_login('gscc', 'gspass', '127.0.0.1', 5038);
    $agent = $DB->executeGetOne('SELECT `name` FROM `ast_sipfriends` WHERE `_user_id`=' . $user['id']);
    // Ich vertraue  gs_group_members_get
    // in dem array sind NUR int()
    $queue_ids = array_intersect($queue_ids, $queues_allowed);
    $rs = $DB->execute('SELECT `_id`, `name` FROM `ast_queues`  WHERE `_host_id`=' . $user['host_id'] . ' 
		AND `_id` IN (' . implode(",", $queue_ids) . ') 
		AND `_id` NOT IN 
		(SELECT `_queue_id` FROM `ast_queue_members` WHERE `_user_id`=' . $user['id'] . ')');
    while ($queue_map = $rs->fetchRow()) {
        $penalty = $DB->executeGetOne('SELECT `penalty` FROM `penalties` WHERE `_user_id`=' . $user['id'] . ' AND `_queue_id`=' . $queue_map['_id']);
开发者ID:rkania,项目名称:GS3,代码行数:31,代码来源:features_features.php

示例12: __

?>
	</td>
</tr>
<tr>
	<td><code>*98*</code></td>
	<td>
		<?php 
echo __('Abwesenheitsansage f&uuml;r Anrufe von extern aufzeichnen');
?>
	</td>
</tr>
</tbody>
</table>

<?php 
if (count(gs_group_permissions_get($user_groups, 'private_call')) > 0) {
    ?>
<table cellspacing="1" class="phonebook">
<thead>
<tr>
	<th colspan="2"><?php 
    echo __('Privatgespr&auml;che');
    ?>
</th>
</tr>
</thead>
<tbody>
<tr>
	<td style="width:140px;"><code>*7* <i><?php 
    echo __('Nummer');
    ?>
开发者ID:hehol,项目名称:GemeinschaftPBX,代码行数:31,代码来源:help_numbers.php

示例13: gs_log

}
//---------------------------------------------------------------------------
if (!gs_get_conf('GS_POLYCOM_PROV_ENABLED')) {
    gs_log(GS_LOG_DEBUG, 'Polycom provisioning not enabled');
    _err('Not enabled.');
}
$type = trim(@$_REQUEST['t']);
if (!in_array($type, array('internal', 'external', 'std', 'var', 'timeout'), true)) {
    $type = false;
}
$db = gs_db_slave_connect();
$user = trim(@$_REQUEST["u"]);
$user_id = getUserID($user);
// Check permissions
$user_groups = gs_group_members_groups_get(array($user_id), "user");
$members = gs_group_permissions_get($user_groups, "forward");
if (count($members) <= 0) {
    _err("Forbidden");
}
// setup i18n stuff
gs_setlang(gs_get_lang_user($db, $user, GS_LANG_FORMAT_GS));
gs_loadtextdomain("gemeinschaft-gui");
gs_settextdomain("gemeinschaft-gui");
$tmp = array(15 => array("k" => "internal", "v" => gs_get_conf("GS_CLIR_INTERNAL", __("von intern"))), 25 => array("k" => "external", "v" => gs_get_conf("GS_CLIR_EXTERNAL", __("von extern"))));
ksort($tmp);
foreach ($tmp as $arr) {
    $typeToTitle[$arr["k"]] = $arr["v"];
}
$url_polycom_provdir = GS_PROV_SCHEME . '://' . GS_PROV_HOST . (GS_PROV_PORT ? ':' . GS_PROV_PORT : '') . GS_PROV_PATH . 'polycom/';
$url_polycom_callforward = $url_polycom_provdir . "callforward.php";
$url_polycom_menu = $url_polycom_provdir . "configmenu.php";
开发者ID:hehol,项目名称:GemeinschaftPBX,代码行数:31,代码来源:callforward.php

示例14: array

                echo '<br /><p align="center"><a href="setup/">Setup</a></p>', "\n";
                echo '</body>', "\n";
                echo '</html>';
                exit;
            }
        }
    }
}
include_once GS_DIR . 'inc/gettext.php';
require_once GS_DIR . 'htdocs/gui/inc/session.php';
# defines $DB
require_once GS_HTDOCS_DIR . 'inc/modules.php';
if (!@$_SESSION['login_ok']) {
    $display_modules = array();
} else {
    $display_modules = gs_group_members_get(gs_group_permissions_get(gs_group_members_groups_get(array(@$_SESSION['sudo_user']['info']['id']), 'user'), 'display_module_gui', 'module_gui'));
}
# get section & module
#
if (array_key_exists('s', $_REQUEST)) {
    $SECTION = $_REQUEST['s'];
    if ($SECTION != '') {
        $MODULE = array_key_exists('m', $_REQUEST) ? $_REQUEST['m'] : '';
    } else {
        $SECTION = 'home';
        $MODULE = '';
    }
} else {
    $SECTION = 'home';
    $MODULE = '';
}
开发者ID:philipp-kempgen,项目名称:amooma-gemeinschaft-pbx,代码行数:31,代码来源:index.php

示例15: str_replace

echo '<h2>';
if (@$MODULES[$SECTION]['icon']) {
    echo '<img alt=" " src="', GS_URL_PATH, str_replace('%s', '32', $MODULES[$SECTION]['icon']), '" /> ';
}
if (count($MODULES[$SECTION]['sub']) > 1) {
    echo $MODULES[$SECTION]['title'], ' - ';
}
echo $MODULES[$SECTION]['sub'][$MODULE]['title'];
echo '</h2>', "\n";
$action = @$_REQUEST['action'];
$user_id = @$_SESSION['sudo_user']['info']['id'];
if (!$user_id) {
    exit;
}
$user_groups = gs_group_members_groups_get(array($user_id), 'user');
$monitor_group_ids = gs_group_permissions_get($user_groups, 'monitor_peers', 'user');
if ($action == 'save') {
    $colors = array();
    for ($status = 0; $status <= 255; ++$status) {
        if (array_key_exists('ec' . $status, $_REQUEST)) {
            $colors[$status] = trim($_REQUEST['ec' . $status]);
        }
    }
    $groups = array();
    foreach ($monitor_group_ids as $group_id) {
        $group = array();
        if (array_key_exists('qa' . $group_id, $_REQUEST) && $_REQUEST['qa' . $group_id] == "on") {
            $group['active'] = 1;
        } else {
            $group['active'] = 0;
        }
开发者ID:hehol,项目名称:GemeinschaftPBX,代码行数:31,代码来源:monitor_peermon.php


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