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


PHP Api::add_request方法代码示例

本文整理汇总了PHP中Api::add_request方法的典型用法代码示例。如果您正苦于以下问题:PHP Api::add_request方法的具体用法?PHP Api::add_request怎么用?PHP Api::add_request使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Api的用法示例。


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

示例1: Api

<?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();
}
开发者ID:bonion,项目名称:Domoleaf,代码行数:8,代码来源:form_smartcmd_update_delay.php

示例2: Api

<?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();
}
开发者ID:bonion,项目名称:Domoleaf,代码行数:8,代码来源:form_remove_smartcmd_elem.php

示例3: Api

<?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();
        }
    }
}
开发者ID:bonion,项目名称:Domoleaf,代码行数:16,代码来源:form_handle_db.php

示例4: Api

<?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/>';
    }
开发者ID:bonion,项目名称:Domoleaf,代码行数:31,代码来源:popup_videoplayer.php

示例5: Api

<?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>';
    }
}
开发者ID:bonion,项目名称:Domoleaf,代码行数:12,代码来源:form_conf_daemon_list.php

示例6: Api

<?php

$request = new Api();
$request->add_request('confFloorList');
$result = $request->send_request();
$floorlist = $result->confFloorList;
开发者ID:AdrienCourtois,项目名称:Domoleaf,代码行数:6,代码来源:configuration-menu.php

示例7: Api

<?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 '
开发者ID:bonion,项目名称:Domoleaf,代码行数:31,代码来源:form_conf_monitor_knx.php

示例8: Api

<?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>';
}
开发者ID:bonion,项目名称:Domoleaf,代码行数:11,代码来源:popup_wifi.php

示例9: Api

<?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>
开发者ID:AdrienCourtois,项目名称:Domoleaf,代码行数:31,代码来源:form_conf_monitor_knx.php

示例10: Api

<?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>';
}
开发者ID:bonion,项目名称:Domoleaf,代码行数:23,代码来源:popup_smartcmd_device_option.php

示例11: Api

<?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>';
开发者ID:bonion,项目名称:Domoleaf,代码行数:14,代码来源:popup_delete_user.php

示例12: Api

<?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();
}
开发者ID:bonion,项目名称:Domoleaf,代码行数:11,代码来源:form_conf_daemon_rename.php

示例13: Api

<?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;
}
开发者ID:bonion,项目名称:Domoleaf,代码行数:11,代码来源:form_check_usb.php

示例14: Api

<?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>';
        }
    }
}
开发者ID:bonion,项目名称:Domoleaf,代码行数:20,代码来源:form_conf_protocol.php

示例15: redirect

<?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();
开发者ID:bonion,项目名称:Domoleaf,代码行数:9,代码来源:form_restore_backup_local.php


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