<?php

include 'header.php';
if (!empty($_GET['smartcmd_id']) && !empty($_GET['exec_id'])) {
    $request = new Api();
    $request->add_request('smartcmdUpdateDelay', array($_GET['smartcmd_id'], $_GET['exec_id'], $_GET['delay']));
    $result = $request->send_request();
}
<?php

include 'header.php';
if (!empty($_GET['id_smartcmd']) && !empty($_GET['id_exec'])) {
    $request = new Api();
    $request->add_request('removeSmartcmdElem', array($_GET['id_smartcmd'], $_GET['id_exec']));
    $result = $request->send_request();
}
示例#3
0
<?php

include 'header.php';
if (!empty($_GET['filename']) && !empty($_GET['status'])) {
    if ($_GET['status'] == 1) {
        $request = new Api();
        $request->add_request('confDbRestore');
        $result = $request->send_request();
    } else {
        if ($_GET['status'] == 2) {
            $request = new Api();
            $request->add_request('confDbRemove');
            $result = $request->send_request();
        }
    }
}
示例#4
0
<?php

include 'header.php';
if (!empty($_GET['iddevice'])) {
    $request = new Api();
    $request->send_request();
    $request->add_request('mcVisible');
    $result = $request->send_request();
    $listAllVisible = $result->mcVisible;
    $deviceallowed = $listAllVisible->ListDevice;
    $device = $deviceallowed->{$_GET['iddevice']};
    $device_id = $device->room_device_id;
    echo '<div class="col-xs-4 center tv-area">';
    if (!empty($device->device_opt->{445}) || !empty($device->device_opt->{446}) || !empty($device->device_opt->{447})) {
        echo '<button class="btn btn-info" onclick="launchGeneric(' . $device_id . ', 445)">1</button>';
        echo '<button class="btn btn-info" onclick="launchGeneric(' . $device_id . ', 446)">2</button>';
        echo '<button class="btn btn-info" onclick="launchGeneric(' . $device_id . ', 447)">3</button>';
        echo '<br/>';
    }
    if (!empty($device->device_opt->{448}) || !empty($device->device_opt->{449}) || !empty($device->device_opt->{450})) {
        echo '<button class="btn btn-info" onclick="launchGeneric(' . $device_id . ', 448)">4</button>';
        echo '<button class="btn btn-info" onclick="launchGeneric(' . $device_id . ', 449)">5</button>';
        echo '<button class="btn btn-info" onclick="launchGeneric(' . $device_id . ', 450)">6</button>';
        echo '<br/>';
    }
    if (!empty($device->device_opt->{451}) || !empty($device->device_opt->{452}) || !empty($device->device_opt->{453})) {
        echo '<button class="btn btn-info" onclick="launchGeneric(' . $device_id . ', 451)">7</button>';
        echo '<button class="btn btn-info" onclick="launchGeneric(' . $device_id . ', 452)">8</button>';
        echo '<button class="btn btn-info" onclick="launchGeneric(' . $device_id . ', 453)">9</button>';
        echo '<br/>';
    }
示例#5
0
<?php

include 'header.php';
$request = new Api();
$request->add_request('confDaemonList');
$result = $request->send_request();
$listdaemon = $result->confDaemonList;
foreach ($listdaemon as $elem) {
    if (!empty($elem->protocol->{1})) {
        echo '<option value="' . $elem->daemon_id . '">' . $elem->name . '</option>';
    }
}
<?php

$request = new Api();
$request->add_request('confFloorList');
$result = $request->send_request();
$floorlist = $result->confFloorList;
示例#7
0
<?php

include 'header.php';
$request = new Api();
$request->add_request('monitorKnx');
$request->add_request('confDaemonList');
$request->add_request('profileTime');
$result = $request->send_request();
$listknx = $result->monitorKnx;
$listDaemon = $result->confDaemonList;
$time = $result->profileTime;
if (!isset($_GET['id'])) {
    exit;
}
if (!empty($listknx)) {
    $listtype = array(_('R'), _('A'), _('Ws'), _('Wl'));
    echo '
	<table class="table table-bordered table-striped table-condensed">
		<thead>
			<tr>
				<th class="center">' . _('Box') . '</th>
				<th class="center">' . _('Source') . '</th>
				<th class="center">' . _('Destination') . '</th>
				<th class="center">' . _('Value') . '</th>
				<th class="center">' . _('Date') . '</th>
			</tr>
		</thead>
		<tbody>';
    foreach ($listknx as $elem) {
        if ($_GET['id'] == -1 or $elem->daemon_id == $_GET['id']) {
            echo '
示例#8
0
<?php

include 'header.php';
if (!empty($_GET['daemon_id'])) {
    $request = new Api();
    $request->add_request('confWifi', array($_GET['daemon_id']));
    $result = $request->send_request();
    $wifi = $result->confWifi;
    echo '<form id="form_wifi" class="cmxform">' . '<div id="wifiError" hidden>' . _('The SSID is not valid') . '</div>' . '<div class="control-group">' . '<label class="control-label" for="wifiMode">' . _('Mode') . '</label>' . '<select class="selectpicker form-control" id="wifiMode" onchange="CheckWifiMode()" value="' . $wifi->mode . '">' . '<option value="0">' . _('Disabled') . '</option>' . '<option value="1">' . _('Client') . '</option>' . '<option value="2">' . _('Access Point') . '</option>' . '</select>' . '</div>' . '<div id="div-ssid" class="control-group">' . '<label class="control-label" for="ssid">' . _('SSID') . '</label>' . '<input id="ssid" required name="ssid" title="" type="text" placeholder="' . _('SSID') . '" value="' . $wifi->ssid . '" class="form-control">' . '</div>' . '<div id="div-wifiPassword" class="control-group">' . '<label id="LabelWifiPassword" class="control-label" for="wifiPassword">' . _('Password') . '</label>' . '<input id="wifiPassword" name="wifiPassword" title="" type="password" placeholder="' . _('Password') . '" value="' . $wifi->password . '" class="form-control">' . '</div>' . '<div id="div-wifiSecurity" class="control-group">' . '<label class="control-label" for="wifiSecurity">' . _('Security') . '</label>' . '<select class="selectpicker form-control" id="wifiSecurity" value="' . $wifi->security . '">' . '<option id="wifiOptionWEP" value="1">' . _('WEP') . '</option>' . '<option id="wifiOptionWPA" value="2">' . _('WPA') . '</option>' . '<option id="wifiOptionWPA2" value="3">' . _('WPA2') . '</option>' . '</select>' . '</div>' . '</form>' . '<input hidden id="inputDaemonId" value="' . $_GET['daemon_id'] . '"/>' . '<div class="clearfix"></div>' . '<div class="center">' . '<br/>' . '<button type="submit" class="btn btn-greenleaf" onclick="submitFormWifi(event)">' . _('Save') . '</button>' . '</div>';
    echo '<script type="text/javascript">' . '$(".selectpicker").selectpicker();' . '$(".selectpicker").selectpicker(\'refresh\');' . '$("#wifiMode").selectpicker(\'val\', ' . $wifi->mode . ');' . '$("#wifiSecurity").selectpicker(\'val\', ' . $wifi->security . ');' . 'CheckWifiMode();' . '$(document).ready(function(){' . 'validate_ssid();' . '});' . 'function CheckWifiMode(){' . 'if ($("#wifiMode").val() == 0){' . '$("#div-ssid").hide();' . '$("#div-wifiPassword").hide();' . '$("#div-wifiSecurity").hide();' . '}' . 'else if ($("#wifiMode").val() == 1){' . '$("#div-ssid").show();' . '$("#div-wifiPassword").show();' . '$("#div-wifiSecurity").show();' . '$("#wifiSecurity").html("<option id=\\"wifiOptionWEP\\" value=\\"1\\">' . _('WEP') . '</option><option value=\\"2\\">' . _('WPA') . '</option><option value=\\"3\\">' . _('WPA2') . '</option>");' . '$("#wifiSecurity").selectpicker(\'refresh\');' . '$("#wifiSecurity").selectpicker(\'val\', ' . $wifi->security . ');' . '}' . 'else if ($("#wifiMode").val() == 2){' . '$("#div-ssid").show();' . '$("#div-wifiPassword").show();' . '$("#div-wifiSecurity").show();' . 'if ($("#wifiSecurity").val() == 1){' . '$("#wifiSecurity").selectpicker(\'val\', 3);' . '}' . '$("#wifiOptionWEP").remove();' . '$("#wifiSecurity").selectpicker(\'refresh\');' . '}' . '}' . '</script>';
}
<?php

include 'header.php';
$request = new Api();
$request->add_request('monitorKnx');
$request->add_request('confDaemonList');
$result = $request->send_request();
$listknx = $result->monitorKnx;
$listDaemon = $result->confDaemonList;
if (!isset($_GET['id'])) {
    exit;
}
if (!empty($listknx)) {
    $listtype = array(_('Read'), _('Answer'), _('Write (short)'), _('Write (long)'));
    echo '
	<table class="table table-bordered table-striped table-condensed">
		<thead>
			<tr>
				<th>' . _('Daemon') . '</th>
				<th class="center">' . _('Type') . '</th>
				<th class="center">' . _('Source') . '</th>
				<th class="center">' . _('Destination') . '</th>
				<th class="center">' . _('Value') . '</th>
				<th class="center">' . _('Date') . '</th>
			</tr>
		</thead>
		<tbody>';
    foreach ($listknx as $elem) {
        if ($_GET['id'] == -1 or $elem->daemon_id == $_GET['id']) {
            echo '
				<tr>
<?php

include 'header.php';
if (!empty($_GET['id_smartcmd']) && !empty($_GET['id_option']) && !empty($_GET['room_id_device']) && !empty($_GET['id_exec']) && !empty($_GET['modif'])) {
    $request = new Api();
    $request->add_request('mcDeviceInfo', array($_GET['room_id_device']));
    $result = $request->send_request();
    $device_info = $result->mcDeviceInfo;
    if (empty($device_info) or empty($device_info->device_opt->{$_GET['id_option']})) {
        echo '<div class="alert alert-danger center" role="alert">' . _('Option not available') . '</div>' . '<script type="text/javascript">' . '$("#popupTitle").html("' . _('Option not available') . '");' . '</script>';
        return;
    }
    $device_name = $device_info->name;
    $option_name = $device_info->device_opt->{$_GET['id_option']}->name;
    if ($_GET['id_option'] == 392) {
        $option_name = _('RGB');
    } else {
        if ($_GET['id_option'] == 410) {
            $option_name = _('RGBW');
        }
    }
    echo '<div id="popup_smartcmd_content" class="center"></div>' . '<script type="text/javascript">' . '$("#popupTitle").html("' . $device_name . ' : ' . $option_name . '");' . 'setTimeout(function(){ popupSmartcmdContent(); }, 150);' . 'function popupSmartcmdContent() {' . '$.ajax({' . 'type: "GET",' . 'url: "/templates/default/form/form_smartcmd_device_option.php",' . 'data: "room_id_device="+' . $_GET['room_id_device'] . '' . '+"&id_option="+' . $_GET['id_option'] . '' . '+"&id_smartcmd="+' . $_GET['id_smartcmd'] . '' . '+"&id_exec="+' . $_GET['id_exec'] . '' . '+"&modif="+' . $_GET['modif'] . ',' . 'success: function(result) {' . '$("#popup_smartcmd_content").html(result);' . '}' . '});' . '}' . '</script>';
}
示例#11
0
<?php

include 'header.php';
$request = new Api();
$request->add_request('profileList');
$result = $request->send_request();
$listuser = $result->profileList;
echo '
	<div class="center">';
printf(_('Do you want to delete %s?'), '<strong>' . $listuser->{$_GET['iduser']}->lastname . ' ' . $listuser->{$_GET['iduser']}->firstname . '</strong>');
echo '</div>
	<div class="controls center">
		<button id="eventSave" onclick="DeleteUser(' . $_GET['iduser'] . ')" class="btn btn-success">' . _('Yes') . ' <span class="glyphicon glyphicon-ok"></span></button> <button onclick="popup_close()" class="btn btn-danger">' . _('No') . ' <span class="glyphicon glyphicon-remove"></span></button>
</div>';
示例#12
0
<?php

include 'header.php';
if (!empty($_GET['id']) && !empty($_GET['name']) && !empty($_GET['serial'])) {
    $request = new Api();
    $request->add_request('confDaemonRename', array($_GET['id'], $_GET['name'], $_GET['serial'], $_GET['skey']));
    if (!empty($_GET['proto'])) {
        $request->add_request('confDaemonProtocol', array($_GET['id'], explode('_', $_GET['proto']), $_GET['interface_knx'], $_GET['interface_knx_arg'], $_GET['daemon_knx'], $_GET['interface_EnOcean'], $_GET['interface_EnOcean_arg']));
    }
    $result = $request->send_request();
}
示例#13
0
<?php

include 'header.php';
$request = new Api();
$request->add_request('confDbCheckUsb');
$result = $request->send_request();
if (!empty($result) && !empty($result->confDbCheckUsb)) {
    echo $result->confDbCheckUsb;
} else {
    echo 0;
}
示例#14
0
<?php

include 'header.php';
$request = new Api();
$request->add_request('confProtocolAll');
$request->add_request('confDeviceAll');
$request->add_request('confDeviceProtocol', array($_GET['iddevice']));
$result = $request->send_request();
$alldevice = $result->confDeviceAll;
$allproto = $result->confProtocolAll;
$protodevice = $result->confDeviceProtocol;
foreach ($allproto as $elem) {
    if (in_array($elem->protocol_id, $protodevice)) {
        if ($elem->protocol_id == $alldevice->{$_GET['iddevice']}->protocol_id) {
            echo '<option value="' . $elem->protocol_id . '" selected>' . $elem->name . '</option>';
        } else {
            echo '<option value="' . $elem->protocol_id . '">' . $elem->name . '</option>';
        }
    }
}
<?php

include 'header.php';
if (empty($_GET['filename']) or !($_GET['filename'] > 0)) {
    redirect();
}
$request = new Api();
$request->add_request('confDbRestoreLocal', array($_GET['filename']));
$result = $request->send_request();
示例#16
0
<?php

include 'header.php';
if (!empty($_GET['iddevice']) && !empty($_GET['value'])) {
    $request = new Api();
    $request->add_request('mcRGB', array($_GET['iddevice'], $_GET['value']));
    $result = $request->send_request();
}
示例#17
0
<?php

include 'header.php';
$request = new Api();
$result = $request->send_request();
if (!empty($_GET['iddevice'])) {
    $request = new Api();
    $request->add_request('confRoomDeviceAll', array($_GET['iddevice']));
    $result = $request->send_request();
    $listdevice = $result->confRoomDeviceAll;
    echo '<div class="center">';
    printf(_('Do you want to delete %s?'), '<strong>' . $listdevice->{$_GET['iddevice']}->name . '</strong>');
    echo '</div><div class="center">
		<button onclick="RemoveDevice(' . $_GET['iddevice'] . ')" class="btn btn-greenleaf">' . _('Yes') . ' <span class="glyphicon glyphicon-ok"></span></button> <button onclick="popup_close()" class="btn btn-danger">' . _('No') . ' <span class="glyphicon glyphicon-remove"></span></button>
	</div>';
}
示例#18
0
<?php

include 'header.php';
if (!empty($_GET['smartcmd_id'])) {
    $request = new Api();
    $request->add_request('mcSmartcmd', array($_GET['smartcmd_id']));
    $result = $request->send_request();
}
示例#19
0
<?php

$request = new Api();
$request->add_request('confDaemonList');
$request->add_request('confMenuProtocol');
$result = $request->send_request();
echo '<title>' . _('Monitor KNX') . '</title>';
$listdae = $result->confDaemonList;
$menuProtocol = $result->confMenuProtocol;
示例#20
0
<?php

include 'header.php';
if (!empty($_GET['roomid']) && !empty($_GET['floorid'])) {
    $request = new Api();
    $request->add_request('confRoomRemove', array($_GET['roomid'], $_GET['floorid']));
    $result = $request->send_request();
}
<?php

include 'header.php';
$request = new Api();
$request->add_request('passwordRename', array($_GET['old'], $_GET['password'], $_GET['id']));
$result = $request->send_request();
echo $result->passwordRename;
示例#22
0
<?php

include 'header.php';
if (!empty($_GET['username']) && !empty($_GET['password']) && !empty($_GET['lastname']) && !empty($_GET['firstname'])) {
    $request = new Api();
    $request->add_request('profileNew', array($_GET['username'], $_GET['password']));
    $result = $request->send_request();
    $new = $result->profileNew;
    if (!empty($new)) {
        $request = new Api();
        $request->add_request('profileRename', array($_GET['lastname'], $_GET['firstname'], '', '', '', '', $new));
        $request->send_request();
        echo $new;
    } else {
        echo '0';
    }
} else {
    echo '0';
}
示例#23
0
<?php

include 'header.php';
$request = new Api();
$request->add_request('profileRename', array($_GET['lastname'], $_GET['firstname'], $_GET['gender'], $_GET['email'], $_GET['phone'], $_GET['language'], $_GET['timeZone'], $_GET['id']));
if (!empty($_GET['level'])) {
    $request->add_request('profileLevel', array($_GET['id'], $_GET['level']));
}
if (!empty($_GET['username'])) {
    $request->add_request('profileUsername', array($_GET['id'], $_GET['username']));
}
$result = $request->send_request();
示例#24
0
<?php

$request = new Api();
$request->add_request('confApplicationAll');
$request->add_request('confDaemonList');
$request->add_request('confFloorList');
$result = $request->send_request();
$Applist = $result->confApplicationAll;
$devfloorlist = $result->confFloorList;
$daemonlist = $result->confDaemonList;
示例#25
0
<?php

include 'header.php';
$request = new Api();
$request->add_request('profilePassword', array($_GET['old'], $_GET['password'], $_GET['id']));
$result = $request->send_request();
echo $result->profilePassword;
示例#26
0
<?php

include 'header.php';
if (!empty($_GET['id'])) {
    $request = new Api();
    $request->add_request('confFloorRename', array($_GET['id'], $_GET['namefloor']));
    $result = $request->send_request();
} else {
    $request = new Api();
    $request->add_request('confFloorNew', array($_GET['namefloor'], $_GET['nameroom']));
    $result = $request->send_request();
}
示例#27
0
<?php

include 'header.php';
include '../function/show_time_select_schedule.php';
if (!empty($_GET['schedule_id'])) {
    $id_schedule = $_GET['schedule_id'];
    $request = new Api();
    $request->add_request('getSchedule', array($id_schedule));
    $result = $request->send_request();
    $schedule_infos = $result->getSchedule;
    $months = $schedule_infos->months;
    $months = str_split(sprintf("%'.012s\n", decbin($months)));
    $weekdays = $schedule_infos->weekdays;
    $weekdays = str_split(sprintf("%'.07s\n", decbin($weekdays)));
    $sunday = array_shift($weekdays);
    array_pop($weekdays);
    array_push($weekdays, $sunday);
    $days = $schedule_infos->days;
    $days = str_split(sprintf("%'.031s\n", decbin($days)));
    $hours = $schedule_infos->hours;
    $hours = str_split(sprintf("%'.024s\n", decbin($hours)));
    $mins = $schedule_infos->mins;
    $mins = str_split($mins);
    echo showtimeSelect($months, $weekdays, $days, $hours, $mins, $id_schedule);
} else {
    $request = new Api();
    $result = $request->send_request();
    echo '';
}
<?php

include 'header.php';
$request = new Api();
$request->add_request('monitorbluetooth');
$result = $request->send_request();
$listbluetooth = $result->monitorbluetooth;
if (!empty($listbluetooth)) {
    echo '
	<table class="table table-bordered table-strbluetoothed table-condensed">
		<thead>
			<tr>
				<th class="center">' . _('Hostname') . '</th>
				<th class="center">' . _('bluetooth address') . '</th>
				<th class="center">' . _('Mac address') . '</th>
			</tr>
		</thead>
		<tbody>';
    foreach ($listbluetooth as $elem) {
        echo '	<tr>
						<td>' . $listbluetooth->hostname . '</td>
						<td>' . $listbluetooth->bluetooth_addr . '</td>
						<td>' . $listbluetooth->mac_addr . '</td>
					</tr>';
    }
    echo '
		</tbody>
	</table>';
} else {
    echo '
	<div id="warningspan" class="alert alert-warning center col-xs-6 col-xs-offset-3 col-lg-10 col-lg-offset-1" role="alert">
示例#29
0
<?php

include 'header.php';
if (empty($_POST['highCostval'])) {
    $_POST['highCostval'] = '';
}
if (empty($_POST['lowCostval'])) {
    $_POST['lowCostval'] = '';
}
if (empty($_POST['lowField1val'])) {
    $_POST['lowField1val'] = '';
}
if (empty($_POST['lowField2val'])) {
    $_POST['lowField2val'] = '';
}
if (empty($_POST['currencyval'])) {
    $_POST['currencyval'] = '';
}
$request = new Api();
$request->add_request('confPriceElec', array($_POST['highCostval'], $_POST['lowCostval'], $_POST['lowField1val'], $_POST['lowField2val'], $_POST['currencyval']));
$result = $request->send_request();
示例#30
0
<?php

echo '<title>' . _('Profile') . '</title>';
$request = new Api();
$request->add_request('profileInfo', array(''));
$request->add_request('confUserInstallation');
$request->add_request('language');
$request->add_request('design');
$result = $request->send_request();
$profilInfo = $result->profileInfo;
$language = $result->language;