<!DOCTYPE html>

<html>

<head>

<title>Where doctors are</title>

<link rel="stylesheet" type="text/css" href="css/bootstrap.css">

  <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">

  <link rel="stylesheet" type="text/css" href="css/bootstrap-responsive.css">

  <link rel="stylesheet" type="text/css" href="css/prettify.css">

  <link rel="stylesheet" type="text/css" href="css/style.css">

  <link rel="stylesheet" type="text/css" href="css/tablecloth.css">

  <link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>

  <link href='http://fonts.googleapis.com/css?family=Arimo' rel='stylesheet' type='text/css'>

  

  <!--[if !IE]><!-->

	<style>

	

	/* 

	Max width before this PARTICULAR table gets nasty

	This query will take effect for any screen smaller than 760px

	and also iPads specifically.

	*/

	@media 

	only screen and (max-width: 760px),

	(min-device-width: 768px) and (max-device-width: 1024px)  {

	

		/* Force table to not be like tables anymore */

		table, thead, tbody, th, td, tr { 

			display: block; 

		}

		

		/* Hide table headers (but not display: none;, for accessibility) */

		thead tr { 

			position: absolute;

			top: -9999px;

			left: -9999px;

		}

		

		tr { border: 1px solid #ccc; }

		

		td { 

			/* Behave  like a "row" */

			border: none;

			border-bottom: 1px solid #eee; 

			position: relative;

			padding-left: 50%; 

		}

		

		td:before { 

			/* Now like a table header */

			position: absolute;

			/* Top/left values mimic padding */

			top: 6px;

			left: 6px;

			width: 45%; 

			padding-right: 10px; 

			white-space: nowrap;

		}

		

		/*

		Label the data

		*/

		td:nth-of-type(1):before { content: "Name"; }

		td:nth-of-type(2):before { content: "County"; }

		td:nth-of-type(3):before { content: "Type"; }

		td:nth-of-type(4):before { content: "Owner"; }

		td:nth-of-type(5):before { content: "Location"; }

		td:nth-of-type(6):before { content: "Nearest town"; }

	}

	

	/* Smartphones (portrait and landscape) ----------- */

	@media only screen

	and (min-device-width : 320px)

	and (max-device-width : 480px) {

		body { 

			padding: 0; 

			margin: 0; 

			width: 320px; }

		}

	

	/* iPads (portrait and landscape) ----------- */

	@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {

		body { 

			width: 495px; 

		}

	}

	

	</style>

	<!--<![endif]-->

  

</head>

<body>

<?php

include 'config.php';

$id=$_GET['id'];

//$id=1;

$result = mysqli_query($conDB,"select * from healthfacilities where id='".$id."'");

//$row = mysqli_fetch_array($result);

 $rowcount=mysqli_num_rows($result);

 if ($rowcount==0) {

  echo "Record does not exist";

}

else {

  $row = mysqli_fetch_array($result);

  $name=$row['facility_name'];

  $county=$row['county'];

  $district=$row['district'];

  $division=$row['division'];

  $type=$row['type'];

  $owner=$row['owner'];

  $location=$row['location'];

  $sublocation=$row['sub_location'];

  $description=$row['description_of_location'];

  $nearesttown=$row['nearest_town'];

  $beds=$row['beds'];

  $cots=$row['cots'];

  $landline=$row['official_landline'];

   $mobile=$row['official_mobile'];

    $email=$row['official_email'];

	$address=$row['official_address'];

	$town=$row['town'];

	$postcode=$row['post_code'];

	$incharge=$row['in_charge'];

	$jobtitle=$row['job_title_of_in_charge'];

	$open24hrs=$row['open_24_hours'];

	$openweekends=$row['open_weekends'];

	$operational=$row['operational_status'];

}

include 'closedb.php';

?>

<div id="detailsdiv">

<form class="form-horizontal">

<fieldset>



<!-- Form Name -->

<legend>Health facility details</legend>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="txtname">Facility name:</label>

  <div class="controls">

    <input id="txtname" name="txtname" placeholder="" class="input-large" type="text" readonly value="<?php echo $name; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="txtcounty">County:</label>

  <div class="controls">

    <input id="txtcounty" name="txtcounty" placeholder="" class="input-large" type="text" readonly value="<?php echo $county; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="txtdivision">Division:</label>

  <div class="controls">

    <input id="txtdivision" name="txtdivision" placeholder="" class="input-large" type="text" readonly value="<?php echo $division; ?>">

    

  </div>

</div>



<!-- Textarea -->

<div class="control-group">

  <label class="control-label" for="txttype">Type:</label>

  <div class="controls">                     

    <input id="txttype" name="txttype" placeholder="" class="input-large" type="text" readonly value="<?php echo $type; ?>">

  </div>

</div>







<!-- Textarea -->

<div class="control-group">

  <label class="control-label" for="txtowner">Owner:</label>

  <div class="controls">                     

   <input id="txtowner" name="txtowner" placeholder="" class="input-large" type="text" readonly value="<?php echo $owner; ?>">

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="txtlocation">Location</label>

  <div class="controls">

    <input id="txtlocation" name="txtlocation" placeholder="" class="input-large" type="text" readonly value="<?php echo $location; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="txtsublocation">Sub-location:</label>

  <div class="controls">

    <input id="txtsublocation" name="txtsublocation" placeholder="" class="input-large" type="text" readonly value="<?php echo $sublocation; ?>">

    

  </div>

</div>



<!-- Textarea -->

<div class="control-group">

  <label class="control-label" for="txtdescription">Description of location:</label>

  <div class="controls">                     

    <textarea id="txtdescription" name="txtdescription" readonly rows="3"><?php echo $description; ?></textarea>

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">Nearest town:</label>

  <div class="controls">

    <input id="txtnearesttown" name="txtnearesttown" placeholder="" class="input-large" type="text" readonly value="<?php echo $nearesttown; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">Beds:</label>

  <div class="controls">

    <input id="txtbeds" name="txtbeds" placeholder="" class="input-large" type="text" readonly value="<?php echo $beds; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">Cots:</label>

  <div class="controls">

    <input id="txtcots" name="txtcots" placeholder="" class="input-large" type="text" readonly value="<?php echo $cots; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">Official landline:</label>

  <div class="controls">

    <input id="txtcots" name="txtlandline" placeholder="" class="input-large" type="text" readonly value="<?php echo $landline; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">Official mobile:</label>

  <div class="controls">

    <input id="txtcots" name="txtmobile" placeholder="" class="input-large" type="text" readonly value="<?php echo $mobile; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">Official Email:</label>

  <div class="controls">

    <input id="txtcots" name="txtemail" placeholder="" class="input-large" type="text" readonly value="<?php echo $email; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">Official address:</label>

  <div class="controls">

    <input id="txtcots" name="txtaddress" placeholder="" class="input-large" type="text" readonly value="<?php echo $address; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">Town:</label>

  <div class="controls">

    <input id="txtcots" name="txttown" placeholder="" class="input-large" type="text" readonly value="<?php echo $town; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">Post code:</label>

  <div class="controls">

    <input id="txtcots" name="txtpostcode" placeholder="" class="input-large" type="text" readonly value="<?php echo $postcode; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">In charge:</label>

  <div class="controls">

    <input id="txtcots" name="txtincharge" placeholder="" class="input-large" type="text" readonly value="<?php echo $incharge; ?>">

    

  </div>

</div>





<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">Job title of in charge:</label>

  <div class="controls">

    <input id="txtcots" name="txtjobtitle" placeholder="" class="input-large" type="text" readonly value="<?php echo $jobtitle; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">Open 24 hours:</label>

  <div class="controls">

    <input id="txtcots" name="txt24hrs" placeholder="" class="input-large" type="text" readonly value="<?php echo $open24hrs; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">Open weekends:</label>

  <div class="controls">

    <input id="txtcots" name="txtweekends" placeholder="" class="input-large" type="text" readonly value="<?php echo $openweekends; ?>">

    

  </div>

</div>



<!-- Text input-->

<div class="control-group">

  <label class="control-label" for="">Operational:</label>

  <div class="controls">

    <input id="txtcots" name="txtoperational" placeholder="" class="input-large" type="text" readonly value="<?php echo $operational; ?>">

    

  </div>

</div>





</fieldset>

</form>

</div>

</body>

</html>