本文整理汇总了PHP中sendVarToJS函数的典型用法代码示例。如果您正苦于以下问题:PHP sendVarToJS函数的具体用法?PHP sendVarToJS怎么用?PHP sendVarToJS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sendVarToJS函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Exception
<?php
if (!isConnect('admin')) {
throw new Exception('{{401 - Accès non autorisé}}');
}
$cmd = cmd::byId(init('cmd_id'));
if (!is_object($cmd)) {
throw new Exception('Commande non trouvé : ' . init('cmd_id'));
}
sendVarToJS('cmdInfo', jeedom::toHumanReadable(utils::o2a($cmd)));
$cmd_widgetDashboard = cmd::availableWidget('dashboard');
$cmd_widgetMobile = cmd::availableWidget('mobile');
?>
<div style="display: none;" id="md_displayCmdConfigure"></div>
<a class="btn btn-success btn-sm pull-right" id="bt_cmdConfigureSave"><i class="fa fa-check-circle"></i> {{Enregistrer}}</a>
<a class="btn btn-default pull-right btn-sm" id="bt_cmdConfigureSaveOn"><i class="fa fa-plus-circle"></i> {{Appliquer à}}</a>
<div role="tabpanel">
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#information" aria-controls="home" role="tab" data-toggle="tab"><i class="fa fa-info-circle"></i> {{Informations}}</a></li>
<li role="presentation"><a href="#configuration" aria-controls="profile" role="tab" data-toggle="tab"><i class="fa fa-wrench"></i> {{Configuration avancée}}</a></li>
<li role="presentation"><a href="#display" aria-controls="messages" role="tab" data-toggle="tab"><i class="fa fa-desktop"></i> {{Affichage avancé}}</a></li>
</ul>
<div class="tab-content" id="div_displayCmdConfigure">
<div role="tabpanel" class="tab-pane active" id="information">
<br/>
示例2: include_file
include_file('3rdparty', 'codemirror/mode/htmlmixed/htmlmixed', 'js');
include_file('3rdparty', 'codemirror/mode/xml/xml', 'js');
include_file('3rdparty', 'codemirror/mode/javascript/javascript', 'js');
include_file('3rdparty', 'codemirror/mode/css/css', 'js');
include_file('3rdparty', 'jquery.fileupload/jquery.ui.widget', 'js');
include_file('3rdparty', 'jquery.fileupload/jquery.iframe-transport', 'js');
include_file('3rdparty', 'jquery.fileupload/jquery.fileupload', 'js');
include_file('3rdparty', 'jquery.lazyload/jquery.lazyload', 'js');
include_file('3rdparty', 'jquery.packery/jquery.packery', 'js');
?>
<!--script src="3rdparty/snap.svg/snap.svg-min.js"></script-->
<?php
$mobileWidget = widget::listWidget('mobile');
$dashboardWidget = widget::listWidget('dashboard');
$pathfile = dirname(__FILE__);
sendVarToJS('pathFile', $pathfile);
?>
<style>
.divIconSel{
height: 80px;
border: 1px solid #fff;
box-sizing: border-box;
cursor: pointer;
}
.iconSel{
line-height: 1.4;
font-size: 1.5em;
}
.iconSelected{
background-color: #563d7c;
color: white;
示例3: Exception
<?php
if (!isConnect('admin')) {
throw new Exception('{{401 - Accès non autorisé}}');
}
sendVarToJS('eqType', 'trains');
$eqLogics = eqLogic::byType('trains');
?>
<div class="row row-overflow">
<div class="col-lg-2 col-md-3 col-sm-4">
<div class="bs-sidebar">
<ul id="ul_eqLogic" class="nav nav-list bs-sidenav">
<a class="btn btn-default eqLogicAction" style="width : 100%;margin-top : 5px;margin-bottom: 5px;" data-action="add"><i class="fa fa-plus-circle"></i> {{Ajouter une liste}}</a>
<li class="filter" style="margin-bottom: 5px;"><input class="filter form-control input-sm" placeholder="{{Rechercher}}" style="width: 100%"/></li>
<?php
foreach ($eqLogics as $eqLogic) {
echo '<li class="cursor li_eqLogic" data-eqLogic_id="' . $eqLogic->getId() . '"><a>' . $eqLogic->getHumanName() . '</a></li>';
}
?>
</ul>
</div>
</div>
<div class="col-lg-10 col-md-9 col-sm-8 eqLogicThumbnailDisplay" style="border-left: solid 1px #EEE; padding-left: 25px;">
<legend>{{Mes listes}}</legend>
<?php
if (count($eqLogics) == 0) {
echo "<br/><br/><br/><center><span style='color:#767676;font-size:1.2em;font-weight: bold;'>{{Vous n'avez pas encore de liste, cliquez sur Ajouter une liste pour commencer}}</span></center>";
} else {
?>
<div class="eqLogicThumbnailContainer">
示例4: init
if (init('logicalId') != '' && init('type') != '') {
$market = market::byLogicalIdAndType(init('logicalId'), init('type'));
}
if (!isset($market)) {
throw new Exception('404 not found');
}
include_file('3rdparty', 'bootstrap.rating/bootstrap.rating', 'js');
include_file('3rdparty', 'slick/slick.min', 'js');
include_file('3rdparty', 'slick/slick', 'css');
include_file('3rdparty', 'slick/slick-theme', 'css');
include_file('3rdparty', 'fancybox/jquery.fancybox', 'js');
include_file('3rdparty', 'fancybox/jquery.fancybox', 'css');
$market_array = utils::o2a($market);
$market_array['rating'] = $market->getRating();
$update = update::byLogicalId($market->getLogicalId());
sendVarToJS('market_display_info', $market_array);
?>
<div class='row' style='background-color: #e7e7e7; padding-top: 10px; padding-bottom: 10px;position: relative; top: -10px;'>
<div class='col-sm-3'>
<center>
<?php
$default_image = 'core/img/no_image.gif';
switch ($market->getType()) {
case 'widget':
$default_image = 'core/img/no-image-widget.png';
break;
case 'plugin':
$default_image = 'core/img/no-image-plugin.png';
break;
示例5: Exception
<?php
if (!isConnect('admin')) {
throw new Exception('Error 401 Unauthorized');
}
sendVarToJS('eqType', 'bluetooth');
$secure = 0;
$options = array();
$port = config::byKey('port', 'bluetooth');
echo '<div class="row row-overflow">
<div class="col-lg-12 eqLogic" style="border-left: solid 1px #EEE; padding-left: 25px;">
<div class="row">
<div class="col-lg-12">
<legend>{{équipements Bluetooth à proximité}}</legend>
</div>
</div>
<button onclick="printDiscoverBT()">{{Rafraichir}}</button><br><br>
<table id="table_discover_bt" class="table table-bordered table-condensed">
<thead>
<tr>
<th>{{MAC}}</th>
<th>{{Nom}}</th>
<th>{{Type}}</th>
<th>{{Services}}</th>
<th>{{Action}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
示例6: sendVarToJS
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{{Changement}}</label>
<div class="col-sm-9">
<textarea class="form-control" id="ta_marketSendChange" placeholder="{{Changement}}" style="height: 150px;"></textarea>
</div>
</div>
<a class="btn btn-success pull-right" id="bt_marketSendValideChange"><i class="fa fa-check"></i> {{Valider}}</a>
<a class="btn btn-default pull-right" id="bt_marketSendCancelChange"><i class="fa fa-times"></i> {{Annuler}}</a>
</form>
</div>
<?php
if (is_object($market)) {
sendVarToJS('market_display_info', utils::o2a($market));
}
?>
<script>
$("#md_marketSendChangeChange").dialog({
autoOpen: false,
modal: true,
height: 400,
width:700,
position: {my: 'center', at: 'center', of: window},
open: function () {
$("body").css({overflow: 'hidden'});
},
beforeClose: function (event, ui) {
$("body").css({overflow: 'inherit'});
}
示例7: Exception
<?php
if (!isConnect('admin')) {
throw new Exception('{{401 - Accès non autorisé}}');
}
$plugin = plugin::byId('denonavr');
sendVarToJS('eqType', $plugin->getId());
$eqLogics = eqLogic::byType($plugin->getId());
?>
<div class="row row-overflow">
<div class="col-lg-2 col-md-3 col-sm-4">
<div class="bs-sidebar">
<ul id="ul_eqLogic" class="nav nav-list bs-sidenav">
<a class="btn btn-default eqLogicAction" style="width : 100%;margin-top : 5px;margin-bottom: 5px;" data-action="add"><i class="fa fa-plus-circle"></i> {{Ajouter un template}}</a>
<li class="filter" style="margin-bottom: 5px;"><input class="filter form-control input-sm" placeholder="{{Rechercher}}" style="width: 100%"/></li>
<?php
foreach ($eqLogics as $eqLogic) {
echo '<li class="cursor li_eqLogic" data-eqLogic_id="' . $eqLogic->getId() . '"><a>' . $eqLogic->getHumanName(true) . '</a></li>';
}
?>
</ul>
</div>
</div>
<div class="col-lg-10 col-md-9 col-sm-8 eqLogicThumbnailDisplay" style="border-left: solid 1px #EEE; padding-left: 25px;">
<legend>{{Mes Denons}}
</legend>
<div class="eqLogicThumbnailContainer">
<div class="cursor eqLogicAction" data-action="add" style="background-color : #ffffff; height : 200px;margin-bottom : 10px;padding : 5px;border-radius: 2px;width : 160px;margin-left : 10px;" >
示例8: Exception
<?php
if (!isConnect('admin')) {
throw new Exception('{{401 - Accès non autorisé}}');
}
$eqLogic = eqLogic::byId(init('eqLogic_id'));
if (!is_object($eqLogic)) {
throw new Exception('EqLogic non trouvé : ' . init('eqLogic_id'));
}
sendVarToJS('eqLogicInfo', utils::o2a($eqLogic));
?>
<div style="display: none;" id="md_displayEqLogicConfigure"></div>
<a class="btn btn-danger pull-right btn-sm" id="bt_eqLogicConfigureRemove"><i class="fa fa-times"></i> {{Supprimer}}</a>
<a class="btn btn-success pull-right btn-sm" id="bt_eqLogicConfigureSave"><i class="fa fa-check-circle"></i> {{Enregistrer}}</a>
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#information" aria-controls="home" role="tab" data-toggle="tab">{{Informations}}</a></li>
<li role="presentation"><a href="#display" aria-controls="messages" role="tab" data-toggle="tab">{{Affichage avancé}}</a></li>
</ul>
<div class="tab-content" id="div_displayEqLogicConfigure">
<div role="tabpanel" class="tab-pane active" id="information">
<br/>
<div class="row">
<div class="col-sm-4" >
<form class="form-horizontal">
<fieldset>
<div class="form-group">
<label class="col-sm-4 control-label">{{ID}}</label>
<div class="col-sm-4">
示例9: Exception
<?php
if (!hasRight('userview', true)) {
throw new Exception('{{401 - Accès non autorisé}}');
}
sendVarToJS('ldapEnable', config::byKey('ldap::enable'));
?>
<div id="div_administration">
<!--********************Onglet utilisateur********************************-->
<div class="tab-pane" id="user">
<legend>{{Liste des utilisateurs :}}</legend>
<?php
if (config::byKey('ldap::enable') != '1') {
?>
<a class="btn btn-success pull-right" id="bt_addUser"><i class="fa fa-plus-circle"></i> {{Ajouter un utilisateur}}</a>
<a class="btn btn-default pull-right tooltips" id="bt_addTemporariUser" title="{{A utiliser pour laisser l'accès temporaire pour de l'assistance par exemple}}"><i class="fa fa-plus-circle"></i> {{Ajouter un utilisateur temporaire}}</a>
<br/><br/>
<?php
}
?>
<table class="table table-condensed table-bordered" id="table_user">
<thead><th>{{Nom d'utilisateur}}</th><th>{{Actions}}</th><th>{{Actif}}</th><th>{{Droits}}</th><th>{{Clef API}}</th><th>{{Date de dernière connexion}}</th><th>{{Accès direct}}</th></thead>
<tbody></tbody>
</table>
<div class="form-actions" style="height: 20px;">
<a class="btn btn-success" id="bt_saveUser"><i class="fa fa-check-circle"></i> {{Sauvegarder}}</a>
</div>
</div>
</div>
示例10: Exception
<?php
if (!isConnect('admin')) {
throw new Exception('{{401 - Accès non autorisé}}');
}
$object = object::byId(init('object_id'));
if (!is_object($object)) {
throw new Exception('Objet non trouvé : ' . init('object_id'));
}
sendVarToJS('objectInfo', utils::o2a($object));
?>
<div id='div_displayObjectConfigure'>
<legend>{{Informations}}</legend>
<div class="row">
<form class="form-horizontal">
<fieldset>
<div class="form-group">
<label class="col-lg-2 col-md-3 col-sm-4 col-xs-6 control-label">{{ID}}</label>
<div class="col-sm-4">
<span class="objectAttr label label-primary" data-l1key="id"></span>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 col-md-3 col-sm-4 col-xs-6 control-label">{{Nom}}</label>
<div class="col-sm-4">
<span class="objectAttr label label-primary" data-l1key="name"></span>
</div>
</div>
<div class="form-group">
示例11: Exception
*
* You should have received a copy of the GNU General Public License
* along with Jeedom. If not, see <http://www.gnu.org/licenses/>.
*/
if (!isConnect('admin')) {
throw new Exception('401 Unauthorized');
}
if (init('id') == '') {
throw new Exception('EqLogic ID ne peut etre vide');
}
$eqLogic = eqLogic::byId(init('id'));
if (!is_object($eqLogic)) {
throw new Exception('EqLogic non trouvé');
}
$device = zwave::devicesParameters($eqLogic->getConfiguration('device'));
sendVarToJS('configureDeviceId', init('id'));
if (is_array($device) && count($device) != 0 && $eqLogic->getConfiguration('device') != '') {
?>
<div id='div_configureDeviceAlert' style="display: none;"></div>
<form class="form-horizontal">
<fieldset>
<legend>Informations <a class="btn btn-success btn-xs pull-right" style="color : white;" id="bt_configureDeviceSend"><i class="fa fa-check"></i> Appliquer</a></legend>
<div class="form-group">
<label class="col-lg-3 control-label">Nom de l'équipement</label>
<div class="col-lg-8">
<span class="tooltips label label-default"><?php
echo $device['name'];
?>
</span>
</div>
示例12: Exception
<?php
if (!isConnect('admin')) {
throw new Exception('Error 401 Unauthorized');
}
sendVarToJS('eqType', 'weather');
sendVarToJS('dontRemoveCmd', '1');
?>
<div class="row">
<div class="col-lg-2">
<div class="bs-sidebar affix">
<ul id="ul_eqLogic" class="nav nav-list bs-sidenav fixnav">
<li class="nav-header">Liste des equipements méteo
<i class="fa fa-plus-circle pull-right cursor eqLogicAction" data-action="add" style="font-size: 1.5em;margin-bottom: 5px;"></i>
</li>
<li class="filter" style="margin-bottom: 5px;"><input class="filter form-control input-sm" placeholder="Rechercher" style="width: 100%"/></li>
<?php
foreach (eqLogic::byType('weather') as $eqLogic) {
echo '<li class="cursor li_eqLogic" data-eqLogic_id="' . $eqLogic->getId() . '"><a>' . $eqLogic->getHumanName() . '</a></li>';
}
?>
</ul>
</div>
</div>
<div class="col-lg-10 eqLogic" style="border-left: solid 1px #EEE; padding-left: 25px;display: none;">
<form class="form-horizontal">
<fieldset>
<legend>Général</legend>
<div class="form-group">
<label class="col-lg-2 control-label">Nom de l'équipement météo</label>
示例13: Exception
<?php
if (!isConnect('admin')) {
throw new Exception('{{401 - Accès non autorisé}}');
}
sendVarToJS('eqType', 'clink');
$eqLogics = eqLogic::byType('clink');
?>
<div class="row row-overflow">
<div class="col-lg-2 col-md-3 col-sm-4">
<div class="bs-sidebar">
<ul id="ul_eqLogic" class="nav nav-list bs-sidenav">
<a class="btn btn-default eqLogicAction" style="width : 100%;margin-top : 5px;margin-bottom: 5px;" data-action="add"><i class="fa fa-plus-circle"></i> {{Ajouter un clink}}</a>
<li class="filter" style="margin-bottom: 5px;"><input class="filter form-control input-sm" placeholder="{{Rechercher}}" style="width: 100%"/></li>
<?php
foreach ($eqLogics as $eqLogic) {
$opacity = $eqLogic->getIsEnable() ? '' : jeedom::getConfiguration('eqLogic:style:noactive');
echo '<li class="cursor li_eqLogic" data-eqLogic_id="' . $eqLogic->getId() . '" style="' . $opacity . '"><a>' . $eqLogic->getHumanName() . '</a></li>';
}
?>
</ul>
</div>
</div>
<div class="col-lg-10 col-md-9 col-sm-8 eqLogicThumbnailDisplay" style="border-left: solid 1px #EEE; padding-left: 25px;">
<legend>{{Mes clinks}}
</legend>
<div class="eqLogicThumbnailContainer">
<div class="cursor eqLogicAction" data-action="add" style="text-align: center; background-color : #ffffff; height : 200px;margin-bottom : 10px;padding : 5px;border-radius: 2px;width : 160px;margin-left : 10px;" >
示例14: Exception
<?php
if (!isConnect('admin')) {
throw new Exception('{{401 - Accès non autorisé}}');
}
$planHeader = planHeader::byId(init('planHeader_id'));
if (!is_object($planHeader)) {
throw new Exception('Impossible de trouver le plan');
}
sendVarToJS('id', $planHeader->getId());
?>
<div id="div_alertPlanHeaderConfigure"></div>
<a class='btn btn-success btn-xs pull-right cursor' style="color: white;" id='bt_saveConfigurePlanHeader'><i class="fa fa-check"></i> Sauvegarder</a>
<a class='btn btn-danger btn-xs pull-right cursor' style="color: white;" id='bt_removeConfigurePlanHeader'><i class="fa fa-times"></i> Supprimer</a>
<form class="form-horizontal">
<fieldset id="fd_planHeaderConfigure">
<legend><i class="fa fa-cog"></i> {{Général}}</legend>
<input type="text" class="planHeaderAttr form-control" data-l1key="id" style="display: none;"/>
<div class="form-group">
<label class="col-lg-4 control-label">{{Nom}}</label>
<div class="col-lg-2">
<input class="planHeaderAttr form-control" data-l1key="name" />
</div>
</div>
<div class="form-group">
<label class="col-lg-4 control-label">{{Icône}}</label>
<div class="col-lg-2">
<div class="planHeaderAttr" data-l1key="configuration" data-l2key="icon" ></div>
</div>
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-4">
<a class="btn btn-default btn-sm" id="bt_chooseIcon"><i class="fa fa-flag"></i> {{Choisir}}</a>
示例15: Exception
* You should have received a copy of the GNU General Public License
* along with Jeedom. If not, see <http://www.gnu.org/licenses/>.
*/
if (!isConnect('admin')) {
throw new Exception('{{401 - Accès non autorisé}}');
}
if (init('id') == '') {
throw new Exception('{{EqLogic ID ne peut être vide}}');
}
$eqLogic = eqLogic::byId(init('id'));
if (!is_object($eqLogic)) {
throw new Exception('{{EqLogic non trouvé}}');
}
$device = zwave::devicesParameters($eqLogic->getConfiguration('device'));
sendVarToJS('configureDeviceId', init('id'));
sendVarToJS('configureDeviceLogicalId', $eqLogic->getLogicalId());
$sameDevices = $eqLogic->getSameDevice();
$info = $eqLogic->getInfo();
?>
<div id='div_configureDeviceAlert' style="display: none;"></div>
<ul class="nav nav-tabs" role="tablist">
<li class="active"><a href="#tab_general" role="tab" data-toggle="tab">{{Général}}</a></li>
<li><a href="#tab_group" role="tab" data-toggle="tab">{{Groupe}}</a></li>
<?php
if (file_exists(dirname(__FILE__) . '/../../core/config/devices/' . $eqLogic->getConfiguration('device') . '.php')) {
echo '<li><a href="#tab_spe" role="tab" data-toggle="tab">{{Spécifique}}</a></li>';
}
?>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_general"><br/>