예제 #1
0
<?php

if (!defined('FREEPBX_IS_AUTH')) {
    die('No direct script access allowed');
}
//	License for all code of this FreePBX module can be found in the license file inside the module directory
//	Copyright 2015 Sangoma Technologies.
//
$fmlist = findmefollow_list();
$fmlist = is_array($fmlist) ? $fmlist : array();
$fmrows = '';
foreach ($fmlist as $fm) {
    $thisg = findmefollow_get($fm, 1);
    $fmrows .= '<tr>';
    $fmrows .= '<td><a href="?display=findmefollow&view=form&extdisplay=GRP-' . urlencode($fm) . '"><i class="fa fa-edit"></i>&nbsp;' . $fm . '</a></td>';
    $fmrows .= '<td>';
    $fmrows .= '<span class="radioset">';
    $fmrows .= '<input type="radio" name="fmtoggle' . $fm . '" id="fmtoggle' . $fm . 'yes" data-for="' . $fm . '" ' . ($thisg['ddial'] == 'CHECKED' ? '' : 'CHECKED') . '>';
    $fmrows .= '<label for="fmtoggle' . $fm . 'yes">' . _("Yes") . '</label>';
    $fmrows .= '<input type="radio" name="fmtoggle' . $fm . '" id="fmtoggle' . $fm . 'no" data-for="' . $fm . '" ' . ($thisg['ddial'] == 'CHECKED' ? 'CHECKED' : '') . ' value="CHECKED">';
    $fmrows .= '<label for="fmtoggle' . $fm . 'no">' . _("No") . '</label>';
    $fmrows .= '</span>';
}
?>

<table data-show-columns="true" data-toggle="table" data-pagination="true" data-search="true" class="table table-striped">
<thead>
	<tr>
		<th data-sortable="true"><?php 
echo _("Followme Extension");
?>
예제 #2
0
        if ($action == 'edtGRP') {
            findmefollow_del($account);
            findmefollow_add($account, $strategy, $grptime, implode("-", $grplist), $goto, $grppre, $annmsg_id, $dring, $needsconf, $remotealert_id, $toolate_id, $ringing, $pre_ring, $ddial, $changecid, $fixedcid);
            needreload();
            redirect_standard('extdisplay');
        }
    }
}
?>
</div>

<div class="rnav"><ul>
<?php 
//get unique ring groups
$gresults = findmefollow_allusers();
$set_users = findmefollow_list();
if (isset($gresults)) {
    foreach ($gresults as $gresult) {
        $defined = is_array($set_users) ? in_array($gresult[0], $set_users) ? "(edit)" : "(add)" : "add";
        echo "<li><a class=\"" . ($extdisplay == 'GRP-' . $gresult[0] ? 'current' : '') . "\" href=\"config.php?display=" . urlencode($dispnum) . "&extdisplay=" . urlencode("GRP-" . $gresult[0]) . "\">" . _("{$gresult['1']}") . " <{$gresult[0]}> {$defined}  </a></li>";
    }
}
?>
</ul></div>

<div class="content">
<?php 
if ($extdisplay == "") {
    echo '<br><h2>' . _("Follow Me") . '</h2><br><h3>' . _('Choose a user/extension:') . '</h3><br><br><br><br><br><br><br>';
} elseif ($action == 'delGRP') {
    echo '<br><h3>' . _("Follow Me") . ' ' . $account . ' ' . _("deleted") . '!</h3><br><br><br><br><br><br><br><br>';
예제 #3
0
function findmefollow_configpageload()
{
    global $currentcomponent;
    $viewing_itemid = isset($_REQUEST['extdisplay']) ? $_REQUEST['extdisplay'] : null;
    $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;
    if ($viewing_itemid != '' && $action != 'del') {
        $set_findmefollow = findmefollow_list();
        $grpURL = $_SERVER['PHP_SELF'] . '?' . 'display=findmefollow&extdisplay=GRP-' . $viewing_itemid;
        if (is_array($set_findmefollow)) {
            if (in_array($viewing_itemid, $set_findmefollow)) {
                $grpTEXT = _("Edit Follow Me Settings");
                $icon = "images/user_go.png";
            } else {
                $grpTEXT = _("Add Follow Me Settings");
                $icon = "images/user_add.png";
            }
        } else {
            $grpTEXT = _("Add Follow Me Settings");
            $icon = "images/user_add.png";
        }
        $label = '<span><img width="16" height="16" border="0" title="' . $grpTEXT . '" alt="" src="' . $icon . '"/>&nbsp;' . $grpTEXT . '</span>';
        $currentcomponent->addguielem('_top', new gui_link('findmefollowlink', $label, $grpURL));
    }
}
예제 #4
0
 function listAll()
 {
     $list = findmefollow_list();
     return !empty($list) ? $list : array();
 }