<?php
$section = 'Facility';
$title = 'Facility Info';
@$page = $_GET['id'];
include('header.php');
require_once('include_classes.inc');
$tabOBJ = new  Med_functions();
$v_comp_code=1;
$v_table ='MC_FACILITY';
$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=='company') {?> class="here" <?php } ?> ><a href="facility_company.php" >Facility Company</a></li>
	<li id="subnav-promotions" <?php if($page=='timing') {?> class="here" <?php } ?> ><a href="facility_timing.php">Facility Timing</a></li>

</ul>

<form method="post" id="frmAppsTable">
<div style="padding:15px;"  align="center">
<fieldset  style="width: 60em;">
          <input type="hidden"  id="" class="" name="vapps_table_id" value=""></input>
          <div class="row">
          	<label>Company:</label>
          	<select>
          		<option value="">Select Table...</option>
          		<?php $result = $tabOBJ->getCompany();
          		while ($row = $result->fetch_row()){
          		?>
          		<option value="<?php echo strtoupper($row[0]); ?>" ><?php echo strtoupper($row[1]); ?> </option>
          		<?php } ?>
          	</select>
          	<?php $result->close();?>
          </div>
          <div class="row">
	          <label>Table Name:</label>
	          <select name="vtable_name" id="vtable_name" class=""  onchange="getTableNameAndColumn();">
	          	<?php $result=$tabOBJ->getSetupTables();
	          		while ($row = $result->fetch_row()){
	          	?>
	          		<option value="<?php echo strtoupper($row[0]); ?>" ><?php echo strtoupper($row[0]); ?> </option>
	          	<?php } ?>
	          </select>
	          <?php $result->close();?>
          </div>
          <div class="row">
	          <label>Apps Code:</label>
	          <select name="vapps_code" id="" class="">
	          	<option value="MCH">MCH</option>
	          	<option value="EC">EC</option>
	          </select>
          </div>
          <div class="row">
	          <label>Language:</label>
	          <select name="vlanguage_id" id="" class="">
	          	<option value="1">English</option>
	          	<option value="2">Arabic</option>
	          	<option value="3">Frinch</option>
	          </select>
          </div>
          <div class="row">
	          <label>Is Active:</label>
	          <select>
	          	<option value="1">YES</option>
	          	<option value="2">NO</option>
	          </select>
          </div>
         <div class="buttonrow">
<!--	<button type="button" class="add">Add New Record</button> -->
</div>
</fieldset>
</div>


</form>

<form method="post" id="frmTableDesc">
<div id="" style="padding:15px;" align="center">

	<fieldset  style="width: 60em; " >
	<div class="row" align="center"><h1>Table: <span id="table_name"></span></h1></div>
		<input type="hidden" nmae="vapps_table_desc_id" id="" class="" value="" ></input>
		<input type="hidden" name="vapps_table_id" id="" class="" value=""></input>
		<table>
			<tr>
				<td>
					<div class="row" id="div_column_name">
						<label>Column Name:</label>
						<select name="vcolumn_name" id="vcolumn_name" class="" onchange="toProperCaseStr();" style="width: 220px;">
							<option value="">Select Column...</option>
							
						</select>
					</div>
				</td>
				<td>
					<div class="row">
						<label>Column Text:</label>
						<input type="text" name="vcolumn_text" id="vcolumn_text" class="" value="" style="width: 220px;">
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<div class="row">
						<label>Column Hint:</label>
						<input type="text" name="vcolumn_hint" id="vcolumn_hint" class="" value="" style="width: 220px;"></input>
					</div>
				</td>
				<td>
					<div class="row"> 
						<label>Display Seq:</label>
						<input type="text" name="vdisplay_seq" id="" class="" value="" maxlength="2" style="width: 40px;"></input>
					</div>
					
				</td>
			</tr>
			<tr>
				<td>
					<div class="row">
						<label>Attribute Type:</label>
						<select>
							<option value="button">Button</option>
							<option value="checkbox">Checkbox</option>
							<option value="file">File</option>
							<option value="hidden">Hidden</option>
							<option value="image">Image</option>
							<option value="password">Password</option>
							<option value="radio">Radio</option>
							<option value="reset">Reset</option>
							<option value="submit">Submit</option>
							<option value="text" selected="selected">Text</option>
							<option value="list">List</option>
							<option value="multiple">List Box</option>
							
						</select>
					</div>
				</td>
				<td>
					<div class="row">
						<label>Column is Required?:</label>
						<select>
							<option value="0">No</option>
							<optionvalue="1">Yes</option>
						</select>
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<div class="row">
						<label>Field Data Type:</label>
						<input type="text" name="vdata_type" id="vdata_type" class="" value=""></input>
					</div>
					
				</td>
				<td>
					<div class="row">
						<label>Field Length</label>
						<input type="text" name="vdata_length" id="vdata_length" class="" value=""  style="width: 40px;"></input>
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<div class="row">
						<label>Column Attribute Mask</label>
						<input type="text" name="vattribute_mask" id="" class="" value=""></input>
					</div>
				</td>
				<td>
					<div class="row">
						<label>Column is Multi Value?:</label>
						<select>
							<option value="0">No</option>
							<option value="1">Yes</option>
						</select>
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<div class="row">
						<label>Column Object to call</label>
						<input type="text" name="vobject_to_call" id="" class="" value=""></input>
					</div>
				</td>
				<td>
				<div class="row">
						<label>Column is Hidden?:</label>
						<select name="vis_hidden" id="" class="">
							<option value="" >No</option>
							<option value="hidden">Yes</option>
						</select>
					</div>
				</td>
			</tr>
			<tr><td>
					<div class="row">
						<label>Column is Active?:</label>
						<select>
							<option value="1">Yes</option>
							<option value="0">No</option>
						</select>
					</div>
				</td>
				<td>
					<div class="row">
					</div>
				</td>
			</tr>
		</table>
	</fieldset>
</div>

</form>

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

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


					
					
					
					
					
					
					
					
					
					