Esempio n. 1
0
function restart_device($device)
{
    $ua = get_device_useragent($device);
    switch ($ua) {
        case "aastra":
            sip_notify("aastra-check-cfg", $device);
            break;
        case "grandstream":
            sip_notify("grandstream-check-cfg", $device);
            break;
        case "snom":
            sip_notify("reboot-snom", $device);
            break;
        case "cisco":
            sip_notify("cisco-check-cfg", $device);
            break;
        case "polycom":
            sip_notify("polycom-check-cfg", $device);
            break;
        default:
            break;
    }
}
Esempio n. 2
0
										<div class="row">
											<div class="form-group">
												<div class="col-md-3">
													<label class="control-label" for="xtnlist"><?php 
echo _("Device List");
?>
</label>
													<i class="fa fa-question-circle fpbx-help-icon" data-for="xtnlist"></i>
												</div>
												<div class="col-md-9">
													<div class="input-group">
														<select class="form-control" id="xtnlist" multiple="multiple" name="restartlist[]">
															<?php 
$selected = isset($selected) ? $selected : array();
foreach ($device_list as $device) {
    if ($ua = get_device_useragent($device[0])) {
        echo '<option value="' . $device[0] . '" ';
        if (array_search($device[0], $selected) !== false) {
            echo ' selected="selected" ';
        }
        echo '>' . $device[0] . ' - ' . $device[1] . ' - ' . ucfirst($ua) . ' Device</option>';
    }
}
?>
														</select>
														<span class="input-group-addon" id="deviceaddon">
															<input type="button" name="Button" value="<?php 
echo _('SELECT ALL');
?>
" onclick="selectAll('xtnlist',true)" />
														</span>