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


PHP Room::load方法代码示例

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


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

示例1: radioRelay_plugin_setting_page


//.........这里部分代码省略.........
				    
				    
				    <label for="roomRadioRelay">Pièce de la maison</label>
				    <select id="roomRadioRelay">
				    	<?php 
        foreach ($rooms as $room) {
            ?>
				    	<option <?php 
            if ($selected->room == $room->getId()) {
                echo "selected";
            }
            ?>
 value="<?php 
            echo $room->getId();
            ?>
"><?php 
            echo $room->getName();
            ?>
</option>
				    	<?php 
        }
        ?>
				    </select>
				   <label for="pinRadioRelay">Mode impulsion (micro secondes)</label>
				   <input type="number" value="<?php 
        echo $selected->pulse;
        ?>
" id="pulseRadioRelay" placeholder="0" />
				   <small>laisser à zéro pour désactiver le mode impulsion</small>
				</div>

	  			<div class="clear"></div>
			    <br/><button onclick="plugin_radiorelay_save(this)" class="btn">Enregistrer</button>
		  	</fieldset>
			<br/>


			<fieldset>
				<legend>Consulter les relais radios existants</legend>
				<table class="table table-striped table-bordered table-hover">
				    <thead>
					    <tr>
					    	<th>Nom</th>
						    <th>Description</th>
						    <th>Code</th>
						    
						    <th>Pièce</th>
						    <th colspan="2">Impulsion</th>
						    
					    </tr>
				    </thead>
			    
			    	<?php 
        foreach ($radioRelays as $radioRelay) {
            $room = $roomManager->load(array('id' => $radioRelay->room));
            ?>
					<tr>
				    	<td><?php 
            echo $radioRelay->name;
            ?>
</td>
					    <td><?php 
            echo $radioRelay->description;
            ?>
</td>
					    <td><?php 
            echo $radioRelay->radiocode;
            ?>
</td>
					    
					    <td><?php 
            echo $room->getName();
            ?>
</td>
					    <td><?php 
            echo $radioRelay->pulse;
            ?>
</td>
					    <td>
					    	<a class="btn" href="setting.php?section=radioRelay&id=<?php 
            echo $radioRelay->id;
            ?>
"><i class="fa fa-pencil"></i></a>
					    	<div class="btn" onclick="plugin_radiorelay_delete(<?php 
            echo $radioRelay->id;
            ?>
,this);"><i class="fa fa-times"></i></div>
					    </td>
					    </td>
			    	</tr>
			    <?php 
        }
        ?>
			    </table>
			</fieldset>
		</div>

<?php 
    }
}
开发者ID:kofeve,项目名称:yana-server,代码行数:101,代码来源:radioRelay.plugin.php

示例2: radioRelay_plugin_setting_page


//.........这里部分代码省略.........
                    echo "selected";
                }
                ?>
 value="<?php 
                echo $room->getId();
                ?>
"><?php 
                echo $room->getName();
                ?>
</option>
									<?php 
            }
            ?>
								</select>
							<label for="pulseRadioRelay">Mode impulsion (laisser à zéro pour désactiver le mode impulsion ou definir un temps d'impulsion en milli-seconde)</label>
							<input type="text" name="pulseRadioRelay" value="<?php 
            if (isset($selected)) {
                echo $selected->getPulse();
            } else {
                echo "0";
            }
            ?>
" id="pulseWireRelay" placeholder="0" />
			    
							</div>

							<div class="clear"></div>
							<br/><button type="submit" class="btn"><?php 
            echo $button;
            ?>
</button>
						</fieldset>
						<br/>
					</form>

					<table class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th>Nom</th>
								<th>Description</th>
								<th>Code radio</th>
								<th>Pièce</th>
								<th>Impulsion</th>
								<th></th>
							</tr>
						</thead>

						<?php 
            foreach ($radioRelays as $radioRelay) {
                $room = $roomManager->load(array('id' => $radioRelay->getRoom()));
                ?>
							<tr>
								<td><?php 
                echo $radioRelay->getName();
                ?>
</td>
								<td><?php 
                echo $radioRelay->getDescription();
                ?>
</td>
								<td><?php 
                echo $radioRelay->getRadioCode();
                ?>
</td>
								<td><?php 
                echo $room->getName();
                ?>
</td>
								<td><?php 
                echo $radioRelay->getPulse();
                ?>
</td>
								<td><a class="btn" href="action.php?action=radioRelay_delete_radioRelay&id=<?php 
                echo $radioRelay->getId();
                ?>
"><i class="fa fa-times"></i></a>
									<a class="btn" href="setting.php?section=radioRelay&id=<?php 
                echo $radioRelay->getId();
                ?>
"><i class="fa fa-pencil"></i></a></td>
								</tr>
								<?php 
            }
            ?>
							</table>
						</div>

						<?php 
        } else {
            ?>

						<div id="main" class="wrapper clearfix">
							<article>
								<h3>Vous devez être connecté</h3>
							</article>
						</div>
						<?php 
        }
    }
}
开发者ID:thib3113,项目名称:yana-server,代码行数:101,代码来源:relay.plugin.disabled.php

示例3: ipcam_plugin_setting_page


//.........这里部分代码省略.........
				    <label for="ipCamera">IP</label>
				    <input type="text" value="<?php 
        echo $selected->ip;
        ?>
" id="ipCamera" placeholder="192.168.11.27:87" />
				    
					<label for="loginCamera">Login</label>
				    <input type="text" value="<?php 
        echo $selected->login;
        ?>
" id="loginCamera" placeholder="" />
				    
				    <label for="passwordCamera">Password</label>
				    <input type="text" value="<?php 
        echo $selected->password;
        ?>
" id="passwordCamera" placeholder="" />
				    
				    <label for="locationCamera">Pièce de la maison</label>
				    <select id="locationCamera">
				    	<?php 
        foreach ($rooms as $room) {
            ?>
				    	<option <?php 
            if ($selected->location == $room->getId()) {
                echo "selected";
            }
            ?>
 value="<?php 
            echo $room->getId();
            ?>
"><?php 
            echo $room->getName();
            ?>
</option>
				    	<?php 
        }
        ?>
				    </select>
				   
				</div>

	  			<div class="clear"></div>
			    <br/><button onclick="plugin_ipcam_save(this)" class="btn">Enregistrer</button>
		  	</fieldset>
			<br/>


			<fieldset>
				<legend>Consulter les sondes existants</legend>
				<table class="table table-striped table-bordered table-hover">
				    <thead>
					    <tr>
					    	<th>Nom</th>
						    <th>IP</th>
						    <th>Pièce</th>
						    <th colspan="2"></th>
						    
					    </tr>
				    </thead>
			    
			    	<?php 
        foreach ($cameras as $camera) {
            $room = $roomManager->load(array('id' => $camera->location));
            ?>
					<tr>
				    	<td><?php 
            echo $camera->label;
            ?>
</td>
					    <td><?php 
            echo $camera->ip;
            ?>
</td>
					    <td><?php 
            echo $room->getName();
            ?>
</td>
					    <td>
					    	<a class="btn" href="setting.php?section=ipcam&id=<?php 
            echo $camera->id;
            ?>
"><i class="fa fa-pencil"></i></a>
					    	<div class="btn" onclick="plugin_ipcam_delete(<?php 
            echo $camera->id;
            ?>
,this);"><i class="fa fa-times"></i></div>
					    </td>
					    </td>
			    	</tr>
			    <?php 
        }
        ?>
			    </table>
			</fieldset>
		</div>

<?php 
    }
}
开发者ID:rikimaruneo,项目名称:yana-server,代码行数:101,代码来源:ipcam.plugin.php

示例4: kodi_plugin_setting_page


//.........这里部分代码省略.........
                    ?>
</option>
			    	<?php 
                }
                ?>
			    </select>   
                <label for="confidence">Confidence</label>
                <select name="confidence" id="confidence">
                                <?php 
                for ($confidence = 1; $confidence <= 9; $confidence++) {
                    ?>
                                
                                    <option value=0.<?php 
                    echo $confidence;
                    ?>
 <?php 
                    echo '0.' . $confidence == $kodiCmd->getConfidence() ? "selected" : "";
                    ?>
>0.<?php 
                    echo $confidence;
                    ?>
</option>
                                <?php 
                }
                ?>
                </select>                          
			</div>

  			<div class="clear"></div>
		    <br/><button type="submit" class="btn">Modifier</button>
	  	</fieldset>
		<br/>
	</form>
	
		<?php 
            }
            if (isset($_['section']) && $_['section'] == 'kodiCmd' && (@$_['block'] == 'cmd' || @$_['block'] == '')) {
                ?>

		<table class="table table-striped table-bordered table-hover">
	    <thead>
	    <tr>
	    	<th>Nom</th>
		    <th>Description</th>
		    <th>Code json de la commande</th>
            <th>Confidence</th>
		    <th>Pièce</th>
			<th>Actions</th>
	    </tr>
	    </thead>
	    
	    <?php 
                foreach ($kodiCmds as $kodiCmd) {
                    $room = $roomManager->load(array('id' => $kodiCmd->getRoom()));
                    ?>
	    <tr>
	    	<td><?php 
                    echo $kodiCmd->getName();
                    ?>
</td>
		    <td><?php 
                    echo $kodiCmd->getDescription();
                    ?>
</td>
		    <td><?php 
                    echo $kodiCmd->getJson();
                    ?>
</td>  
            <td><?php 
                    echo $kodiCmd->getConfidence();
                    ?>
</td>
		    <td><?php 
                    echo $room->getName();
                    ?>
</td>                    
            <td>
				<a class="btn" href="setting.php?section=kodiCmd&amp;block=edit&id=<?php 
                    echo $kodiCmd->getId();
                    ?>
"><i class="fa fa-pencil-square-o fa-lg"></i></a>
										
				<a class="btn" href="action.php?action=kodiCmd_delete_kodiCmd&id=<?php 
                    echo $kodiCmd->getId();
                    ?>
"><i class="fa fa-trash-o fa-lg"></i></a></td>
	    </tr>
	    <?php 
                }
                ?>
	    </table>
		</div>

<?php 
            }
        } else {
            header('location:index.php?connexion=ko');
        }
    }
}
开发者ID:eflye,项目名称:yana-plugins,代码行数:101,代码来源:kodi.plugin.php

示例5: door_plugin_setting_page

function door_plugin_setting_page()
{
    global $_, $myUser;
    if (isset($_['section']) && $_['section'] == 'door') {
        if ($myUser != false) {
            $doorManager = new Door();
            $doors = $doorManager->populate();
            $roomManager = new Room();
            $rooms = $roomManager->populate();
            ?>

		<div class="span9 userBloc">


		<h1>Porte</h1>
		<p>Gestion des portes</p>  

		<form action="action.php?action=door_add_door" method="POST">
		<fieldset>
		    <legend>Ajout d'un porte</legend>

		    <div class="left">
			    <label for="nameDoor">Nom</label>
			    <input type="text" id="nameDoor" onkeyup="$('#vocalCommand').html($(this).val());" name="nameDoor" placeholder="Lumiere Canapé…"/>
			    <small>Commande vocale associée : "YANA, ouvre <span id="vocalCommand"></span>"</small>
			    <label for="descriptionDoor">Description</label>
			    <input type="text" name="descriptionDoor" id="descriptionDoor" placeholder="Porte de l'entrée…" />
			    <label for="pinDoorRelay">Pin GPIO verouillage (relais)</label>
			    <input type="text" name="pinDoorRelay" id="pinDoorRelayRelay" placeholder="0,1,2…" />
			    <label for="pinDoorRelay">Pin GPIO etat (capteur hall)</label>
			    <input type="text" name="pinDoorCaptor" id="pinDoorCaptor" placeholder="0,1,2…" />
			    <label for="roomDoor">Pièce</label>
			    <select name="roomDoor" id="roomDoor">
			    	<?php 
            foreach ($rooms as $room) {
                ?>
			    	<option value="<?php 
                echo $room->getId();
                ?>
"><?php 
                echo $room->getName();
                ?>
</option>
			    	<?php 
            }
            ?>
			    </select>
			</div>

  			<div class="clear"></div>
		    <br/><button type="submit" class="btn">Ajouter</button>
	  	</fieldset>
		<br/>
	</form>

		<table class="table table-striped table-bordered table-hover">
	    <thead>
	    <tr>
	    	<th>Nom</th>
		    <th>Description</th>
		    <th>Pin GPIO verouillage</th>
		    <th>Pin GPIO etat</th>
		    <th>Pièce</th>
	    </tr>
	    </thead>
	    
	    <?php 
            foreach ($doors as $door) {
                $room = $roomManager->load(array('id' => $door->getRoom()));
                ?>
	    <tr>
	    	<td><?php 
                echo $door->getName();
                ?>
</td>
		    <td><?php 
                echo $door->getDescription();
                ?>
</td>
		    <td><?php 
                echo $door->getPinRelay();
                ?>
</td>
		    <td><?php 
                echo $door->getPinCaptor();
                ?>
</td>
		    <td><?php 
                echo $room->getName();
                ?>
</td>
		    <td><a class="btn" href="action.php?action=door_delete_door&id=<?php 
                echo $door->getId();
                ?>
"><i class="icon-remove"></i></a></td>
	    </tr>
	    <?php 
            }
            ?>
	    </table>
//.........这里部分代码省略.........
开发者ID:kofeve,项目名称:yana-server,代码行数:101,代码来源:door.plugin.disabled.php

示例6: propise_plugin_setting_page

function propise_plugin_setting_page()
{
    global $_, $myUser, $conf;
    if (isset($_['section']) && $_['section'] == 'propise') {
        require_once 'Data.class.php';
        require_once 'Sensor.class.php';
        if (!$myUser) {
            throw new Exception('Vous devez être connecté pour effectuer cette action');
        }
        $sensorManager = new Sensor();
        $sensors = $sensorManager->populate();
        $roomManager = new Room();
        $rooms = $roomManager->populate();
        $selected = new Sensor();
        //Si on est en mode modification
        if (isset($_['id'])) {
            $selected = $sensorManager->getById($_['id']);
        }
        ?>

		<div class="span9 userBloc">

			<h1>Propise</h1>
			<p>Gestion des multi-sondes</p>  

			<fieldset>
			    <legend>Ajouter/Modifier une sonde</legend>

			    <div class="left">

				    <label for="labelSensor">Nom</label>
				    <input type="hidden" id="id" value="<?php 
        echo $selected->id;
        ?>
">
				    <input type="text" id="labelSensor" value="<?php 
        echo $selected->label;
        ?>
" placeholder="Sonde du salon"/>
			
				    <label for="uidSensor">UID</label>
				    <input type="text" value="<?php 
        echo $selected->uid;
        ?>
" id="uidSensor" placeholder="sonde-1,sonde-2..." />
				    

				    <label for="locationSensor">Pièce de la maison</label>
				    <select id="locationSensor">
				    	<?php 
        foreach ($rooms as $room) {
            ?>
				    	<option <?php 
            if ($selected->location == $room->getId()) {
                echo "selected";
            }
            ?>
 value="<?php 
            echo $room->getId();
            ?>
"><?php 
            echo $room->getName();
            ?>
</option>
				    	<?php 
        }
        ?>
				    </select>
				   
				</div>

	  			<div class="clear"></div>
			    <br/><button onclick="plugin_propise_save(this)" class="btn">Enregistrer</button>
		  	</fieldset>
			<br/>


			<fieldset>
				<legend>Consulter les sondes existants</legend>
				<table class="table table-striped table-bordered table-hover">
				    <thead>
					    <tr>
					    	<th>Nom</th>
						    <th>UID</th>
						    <th>Pièce</th>
						    <th colspan="2"></th>
						    
					    </tr>
				    </thead>
			    
			    	<?php 
        foreach ($sensors as $sensor) {
            $room = $roomManager->load(array('id' => $sensor->location));
            ?>
					<tr>
				    	<td><?php 
            echo $sensor->label;
            ?>
</td>
					    <td><?php 
//.........这里部分代码省略.........
开发者ID:rikimaruneo,项目名称:yana-server,代码行数:101,代码来源:propise.plugin.php

示例7: sensor_plugin_setting_page


//.........这里部分代码省略.........
                        $selected_room = $_['room'];
                    } else {
                        $selected_room = null;
                    }
                }
                ?>

								<option <?php 
                if ($selected_room == $room->getId()) {
                    echo "selected";
                }
                ?>
 value="<?php 
                echo $room->getId();
                ?>
"><?php 
                echo $room->getName();
                ?>
</option>
								<?php 
            }
            ?>
							</select>
						</div>

						<div class="clear"></div>
						<br/><button type="submit" class="btn"><?php 
            echo $button;
            ?>
</button>
					</fieldset>
					<br/>
				</form>

				<table class="table table-striped table-bordered table-hover">
					<thead>
						<tr>
							<th>Type</th>
							<th>Nom</th>
							<th>Description</th>
							<th>Code radio</th>
							<th>Pi&egrave;ce</th>
							<th></th>
						</tr>
					</thead>

					<?php 
            foreach ($sensors as $sensor) {
                $room = $roomManager->load(array('id' => $sensor->getRoom()));
                $typeSensor = $typeManager->load(array('id' => $sensor->getType()));
                ?>
						<tr>
							<td><?php 
                echo $typeSensor->getName();
                ?>
</td>
							<td><?php 
                echo $sensor->getName();
                ?>
</td>
							<td><?php 
                echo $sensor->getDescription();
                ?>
</td>
							<td><?php 
                echo $sensor->getRadioCode();
                ?>
</td>
							<td><?php 
                echo $room->getName();
                ?>
</td>
							<td><a class="btn" href="action.php?action=sensor_delete_sensor&id=<?php 
                echo $sensor->getId();
                ?>
"><i class="icon-remove"></i></a>
								<a class="btn" href="setting.php?section=sensor&id=<?php 
                echo $sensor->getId();
                ?>
"><i class="icon-edit"></i></a></td>
							</tr>
							<?php 
            }
            ?>
						</table>
					</div>

					<?php 
        } else {
            ?>

					<div id="main" class="wrapper clearfix">
						<article>
							<h3>Vous devez être connecté</h3>
						</article>
					</div>
					<?php 
        }
    }
}
开发者ID:sachaw0lf,项目名称:yana-sensor-plugin,代码行数:101,代码来源:sensor.plugin.disabled.php


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