<?php
$section = 'Facility';
$title = 'Facility Timing';
@$page = 'timing';
include('header.php');
require_once('include_classes.inc');
$tabOBJ = new  Med_functions();  
$v_company_code=1;
$v_table ='mc_facility_timing'; 
$v_apps_code='MCH';
$v_is_actice=1;


?>

<div id="body">
<div class="wrap">

<h2><?=$title?></h2>

<ul id="subnav">
<li id="subnav-weekly"     <?php if(!isset($page)) {?> class="here" <?php } ?> ><a href="facility.php">Facility</a></li>
	<li id="subnav-special"    <?php if($page=='information') {?> class="here" <?php } ?> ><a href="facility_information.php" >Facility Information</a></li> 
	<li id="subnav-promotions" <?php if($page=='timing') {?> class="here" <?php } ?> ><a href="facility_timing.php">Facility Timing</a></li> 
</ul>

<div style="padding:15px;"  align="center">
<fieldset  style="width: 79em; text-align:left;" >
	<table class="style sort" border="1">
		<thead>
			<tr>
				<th>MON</th>
				<th>TUE</th>
				<th>WED</th>
				<th>THU</th>
				<th>FRI</th>
				<th>SAT</th>
				<th>SUN</th>
				
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>10:00am-12:00am</td>
				<td>1:00pm-4:00pm</td>
				<td>1:00pm-4:00pm</td>
				<td>6:00pm-9:00pm</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				
			</tr>
			<tr>
				<td>10:00am-12:00am</td>
				<td>1:00pm-4:00pm</td>
				<td>1:00pm-4:00pm</td>
				<td>6:00pm-9:00pm</td>
				<td>6:00pm-9:00pm</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				
			</tr>
			<tr>
				<td>10:00am-12:00am</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>6:00pm-9:00pm</td>
				<td>1:00pm-4:00pm</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				
			</tr>
		</tbody>
	</table>
</fieldset>
</div>	


<form method="post" id="frmPricesignsPreview">
<div style="padding:15px;"  align="center">
<fieldset  style="width: 79em; text-align:left;" >
	
          <?php 
		
               
          $result = $tabOBJ->getTableColumn($v_company_code,$v_table,$v_apps_code,$v_is_actice);
         
		 while($obj= $result->fetch_object()){	
          //foreach($table as $row){
          ?> 
         	<div class="row"> 
         		<?php if($obj->attribute_type=='hidden'){ ?>
            		<label style="display:none;"><?php echo  $obj->column_text; ?></label>
            	<?php }else {?>
            		<label><?php echo  $obj->column_text; ?></label>
            	<?php }?>  
				<?php if($obj->is_multi_value ==1){ ?>
					<?php 
						$v_call_obj=$obj->object_to_call;
						$code_result= $tabOBJ->getCodeValue($v_company_code,$v_call_obj);
						//$code_result= $tabOBJ->getCodeValue($v_call_obj);
						
					 ?>
					<select name="<?php echo $obj->column_name; ?>">
					<?php  while($row = $code_result->fetch_row()){ ?>
					<option value="<?php echo $row[0]; ?>"><?php echo $row[1]; ?></option>
					
					<?php } ?>
					</select>
				<?php }else{ ?>         
            		<input <?php if($obj->attribute_type=='hidden'){ ?> type="hidden" <?php }?> name="<?php echo $obj->column_name; ?>" id="<?php echo $obj->column_name; ?>" class="<?php echo $obj->css_class; ?>" value="" maxlength="<?php echo $obj->data_length; ?>" />
            
            	<?php } ?> 
          	
         </div>
         <?php }
         	$result->close();
          ?>
          
    <div class="buttonrow add">
		<button type="button" class="add"> <img  src="public/img/add.png"  style="= width:32px; height:32px;"/></button>
		<button type="button" class="save"><img  src="public/img/save.png" style="= width:32px; height:32px;"/> </button>
	</div>
</fieldset> 
</div> 

</form>


<div class="buttonrow add">
	<button type="button" class="remove">Remove</button>
	<button type="button" class="add">Add </button>
</div>
</form>

</div><!--/wrap-->
</div><!--/body-->

<?php include('footer.php'); ?>