$h_end = (int) @$_REQUEST['hend']; } else { $action = ''; $group = @$_SESSION['sudo_user']['name']; //$month_d = -1; # previous month $day_d = 0; # current month $h_start = 7; $h_end = 18; } 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); $queue_groups = gs_group_members_get(gs_group_permissions_get($user_groups, 'call_stats', 'queue')); if (array_search($group, $select_groups) === FALSE) { $exts_sql = ''; } else { $users = gs_group_members_get(array($group)); $exts_sql = userids_to_exts($users); } if (array_search($queue_id, $queue_groups) === FALSE) { $queue_id = 0; } ?>
echo '<br />', "\n"; echo '<table cellspacing="1">', "\n"; echo '<thead>', "\n"; echo '<tr>', "\n"; echo '<th style="min-width:21em;" colspan="5">', __('Warteschlangengruppen'), '</th>', "\n"; echo '</tr>', "\n"; echo '<tr>', "\n"; echo '<th style="min-width:12em;">', __('Gruppe'), '</th>', "\n"; echo '<th style="min-width:12em;width:18em;">', __('Titel'), '</th>', "\n"; echo '<th style="min-width:5em;">', __('Typ'), '</th>', "\n"; echo '<th style="min-width:3em;">', __('Mitglieder'), '</th>', "\n"; echo '<th style="min-width:1em;"></th>', "\n"; echo '</tr>', "\n"; echo '</thead>', "\n"; echo '<tbody>', "\n"; $groups_my_info = gs_group_info_get($groups_my, 'queue'); $i = 0; if (count($groups_my_info) - count($groups) - 1) { echo '<tr class="', $i % 2 === 0 ? 'odd' : 'even', '">', "\n"; echo '<form method="post" action="' . GS_URL_PATH . '">'; echo gs_form_hidden($SECTION, $MODULE); echo '<input type="hidden" name="action" value="insert-group" />', "\n"; echo '<input type="hidden" name="qid" value="' . rawUrlEncode($queue_id) . '" />', "\n"; echo '<input type="hidden" name="page" value="' . rawUrlEncode($page) . '" />', "\n"; echo '<td class="l nobr" colspan="2">'; echo '<select name="group">', "\n"; foreach ($groups as $group) { if (!in_array($group['id'], $groups_my) && !gs_group_connections_get($group['id'])) { echo '<option value="', $group['id'], '">', $group['name'], ' -- ', $group['title'], '</option>', "\n"; } }
?> </th> <th style="width:30px;"><?php echo __('Typ'); ?> </th> <th style="width:50px;"><?php echo __('Mitglieder'); ?> </th> <th style="width:24px;"></th> </tr> </thead> <tbody> <?php $groups_my_info = gs_group_info_get($groups_my, 'user'); $i = 0; if (count($groups_my_info) - count($groups) - 1) { echo '<tr class="', $i % 2 === 0 ? 'odd' : 'even', '">', "\n"; echo '<form method="post" action="' . GS_URL_PATH . '">'; echo gs_form_hidden($SECTION, $MODULE); echo '<input type="hidden" name="action" value="insert-group" />', "\n"; echo '<input type="hidden" name="page" value="' . $page . '" />', "\n"; echo '<input type="hidden" name="sort" value="', $sort, '" />', "\n"; echo '<input type="hidden" name="sortorder" value="', $sortorder, '" />', "\n"; echo '<input type="hidden" name="number" value="' . rawUrlEncode($number) . '" />', "\n"; echo '<input type="hidden" name="name" value="' . rawUrlEncode($name) . '" />', "\n"; echo '<input type="hidden" name="edit" value="' . rawUrlEncode($edit_user) . '" />', "\n"; echo '<td class="l nobr" colspan="2">'; echo '<select name="group">', "\n"; foreach ($groups as $group) {
VALUES (' . $user_id . ', 2,' . $key . ',\'' . $value . '\')'; $rs = $DB->execute($sql_query); } } if ($groups) { foreach ($groups as $group_id => $group) { $sql_query = 'REPLACE `monitor_groups` (`user_id`, `group_id`, `' . implode('`,`', array_keys($group)) . '`) VALUES (' . $user_id . ',' . $group_id . ',' . implode(',', $group) . ')'; $rs = $DB->execute($sql_query); } } $action = "edit"; } $groups = array(); $groups_array = gs_group_info_get($monitor_group_ids); foreach ($groups_array as $group) { group_defaults($group); $group['memberids'] = gs_group_members_get(array($group['id'])); $groups[$group['id']] = $group; } unset($groups_array); $sql_query = 'SELECT `m`.`group_id` `id`, `m`.`active`, `m`.`display_columns`, `m`.`display_width`, `m`.`display_height`, `m`.`display_extension`, `m`.`display_name`, `m`.`display_forw`,
foreach ($groups as $key => $group) { $sort_key[$key] = $group['name']; } array_multisort($sort_key, SORT_ASC, SORT_STRING, $groups); if (isGsError($groups)) { echo '<tr><td colspan="5">', $groups->getMsg(), '</td></tr>'; } else { $i = 1; foreach ($groups as $group) { if ($i > $per_page * ($page + 1) || $i < $per_page * $page + 1) { $i++; continue; } $groups_same_type = gs_group_info_get(false, $group['type']); $group_includes_ids = gs_group_includes_get(array($group['id']), true, true); $group_includes = gs_group_info_get(array_diff($group_includes_ids, array($group['id']))); echo '<tr class="', $i % 2 === 0 ? 'odd' : 'even', '">', "\n"; echo '<td class="l nobr">'; echo $group['name'], '</td>', "\n"; echo '<td>', $group['title'], '</td>', "\n"; echo '<td class="r">', count(gs_group_members_get(array($group['id']))), ' / ', $num_sections + $num_modules, '</td>', "\n"; echo '<td class="r">', "\n"; echo '<a href="', gs_url($SECTION, $MODULE, null, 'action=edit&id=' . $group['id'] . '&page=' . $page), '"><img alt="', __('Bearbeiten'), '" title="', __('Bearbeiten'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/edit.png" /></a>'; echo '</td>', "\n"; echo '</tr>', "\n"; $i++; } } ?> </tbody> </table>
$rsR = $DB->execute('SELECT `pattern` `pat`, `d_mo`, `d_tu`, `d_we`, `d_th`, `d_fr`, `d_sa`, `d_su`, SUBSTR(`h_from`,1,5) `hf`, SUBSTR(`h_to`,1,5) `ht`, `gw_grp_id_1` `gg1`, `gw_grp_id_2` `gg2`, `gw_grp_id_3` `gg3`, `lcrprfx`, `user_grp_id` FROM `routes` USE INDEX(`ord`) WHERE `active`=1 ORDER BY `ord`'); $i = 0; while ($route = $rsR->fetchRow()) { if (!@preg_match('/' . $route['pat'] . '/', $dial)) { continue; } if ($route['user_grp_id']) { $group_info = gs_group_info_get(array($route['user_grp_id'])); $group_name = @$group_info[0]['title']; } else { $group_name = '(' . __("keine") . ')'; } echo '<tr class="', $i % 2 ? 'even' : 'odd', '">', "\n"; /* echo '<td>', "\n"; $wd_out = array(); foreach ($wdays as $col => $v) if (@$route['d_'.$col]) $wd_out[] = $v; echo htmlEnt(implode(', ', $wd_out)); echo '</td>', "\n"; */ echo '<td class="pre">'; foreach ($wdays as $col => $v) {
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 htmlEnt(__('Ausgehende Routen und Least-Cost-Routing')); echo '</h2>', "\n"; $action = @$_REQUEST['action']; $id = (int) @$_REQUEST['id']; if ($id < 1) { $id = 0; } $gw_grp_idxs = array(1, 2, 3); $groups = array_merge(gs_group_info_get(false, 'user'), gs_group_info_get(false, 'host')); if (isGsError($groups)) { $groups = false; } if (!is_array($groups)) { $groups = array(); } if ($action === 'move-up' || $action === 'move-down') { if ($id > 0) { gs_db_start_trans($DB); $rs = $DB->execute('SELECT `id` FROM `routes` ORDER BY `ord`'); $ord = 4; while ($r = $rs->fetchRow()) { if ($r['id'] != $id) { $DB->execute('UPDATE `routes` SET `ord`=' . $ord . ' WHERE `id`=' . (int) $r['id']); } else {
?> <tr> <?php if ($is_admin == true && $edit_entry < 1) { ?> <td> <input type="text" name="slname" value="" size="15" maxlength="40" style="width:125px;" /><input type="text" name="sfname" value="" size="15" maxlength="40" style="width:115px;" /> </td> <td> <input type="text" name="snumber" value="" size="15" maxlength="25" style="width:150px;" /> </td> <td> <select name="sgroup"> <?php $groups = gs_group_info_get(); foreach ($groups as $group) { if (in_array(1, $user_groups) || in_array($group['id'], $user_groups)) { echo '<option value=' . $group['id'] . '>' . $group['name'] . '</option>' . "\n"; } } ?> </select> </td> <td> <button type="submit" title="<?php echo __('Eintrag speichern'); ?> " class="plain"> <img alt="<?php echo __('Speichern');