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


PHP Room::getRoomTemplateItems方法代码示例

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


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

示例1: dirname

if (!isset($_SESSION)) {
    session_start();
}
define('__ROOT__', dirname(dirname(__FILE__)));
define('__BASENAME__', basename(__ROOT__));
require_once __ROOT__ . '/modules/Room.class.php';
require_once __ROOT__ . '/modules/Dynamo.class.php';
$id = !isset($_POST['id']) ? "" : $_POST['id'];
$roomObj = new Room();
$property_obj = new Dynamo("properties");
$estimates_obj = new Dynamo("estimates");
$room_templates_obj = new Dynamo("room_templates");
$estimate_rooms_obj = new Dynamo("estimate_rooms");
$estimate_room_items_obj = new Dynamo("estimate_room_items");
$data = $roomObj->getRoomTemplateItems($id, false);
$array_room_templates = $room_templates_obj->getOne();
$maxIdEstimateRooms = $estimate_rooms_obj->getMaxId();
ob_start();
if (trim($_REQUEST['estimatesId']) == '' && trim($_REQUEST['propertyId']) != '') {
    $_REQUEST['estimatesId'] = $estimates_obj->getMaxId();
    $query = "INSERT INTO estimates (`id`,`property_id`,`date_created`,`reported_by`,`is_submitted`,`is_saved`,`is_closed`) \n\tVALUES(" . $_REQUEST['estimatesId'] . "," . $_REQUEST['propertyId'] . ",NOW()," . $_SESSION['user_id'] . ",0,1,0)";
    $estimates_obj->customExecuteQuery($query);
    $query = "UPDATE properties SET in_estimates = 1 WHERE id = " . $_REQUEST['propertyId'];
    $property_obj->customExecuteQuery($query);
}
if (count($data) > 0) {
    $query = "INSERT INTO estimate_rooms VALUES({$maxIdEstimateRooms}," . $_REQUEST['estimatesId'] . ",{$id},'" . htmlentities(html_entity_decode($_REQUEST['roomName']), ENT_QUOTES) . "',NOW()," . $_SESSION['user_id'] . ")";
    $room_templates_obj->customExecuteQuery($query);
    $result['roomId'] = $maxIdEstimateRooms;
    $query = "INSERT INTO estimate_room_items (`id`,`estimate_id`,`room_id`,`room_template_item_id`,`name`,`date_created`) VALUES";
开发者ID:erickigotho,项目名称:Paxis,代码行数:30,代码来源:get_room_template_items_estimates.php

示例2: dirname

<?php

if (!isset($_SESSION)) {
    session_start();
}
define('__ROOT__', dirname(dirname(__FILE__)));
define('__BASENAME__', basename(__ROOT__));
require_once __ROOT__ . '/modules/Room.class.php';
require_once __ROOT__ . '/modules/Dynamo.class.php';
$id = !isset($_POST['id']) ? "" : $_POST['id'];
$roomObj = new Room();
$roomObj->getRoomTemplateItems($id, true);
开发者ID:erickigotho,项目名称:Paxis,代码行数:12,代码来源:get_community_template_items.php

示例3:

		
		<div class="control-group room-group room-name-group">
			<label for="roomName" class="control-label">Room Name</label>
			<div class="controls">
				<input type="text" name="roomName" id="roomName" class="form-control span5" placeholder="Room Name" value="<?php 
echo $roomInfo['name'];
?>
" data-validation="required" data-validation-error-msg="Room name is a required field."  />
			</div>
		</div>

		<div class="room-items-wrapper">
			<?php 
$totalItemTextboxes = 6;
$itemTextboxesCtr = 0;
$listItems = $roomObj->getRoomTemplateItems($roomTemplateId, false);
foreach ($listItems as $item) {
    ?>
	
				<div class="control-group room-group" id="room-group<?php 
    echo $itemTextboxesCtr;
    ?>
">
					<label for="item<?php 
    echo $itemTextboxesCtr;
    ?>
" class="control-label">&nbsp;</label>
					<div class="controls">
						<input type="text" name="item<?php 
    echo $itemTextboxesCtr;
    ?>
开发者ID:erickigotho,项目名称:Paxis,代码行数:30,代码来源:edit_room_template.php


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