File: //proc/thread-self/root/home/hurlinghamclinic.co.uk/public_html/uk/index.php
<?php include ($_SERVER["DOCUMENT_ROOT"] . '/includes/contact-form-code.php'); ?>
<?
$folder_location='uk';
$page_extension='.php';
class DB_Conf { //database setup for the whole script
public static $DB_Config = array(
'DbConfig' => array(
'Hostname' => 'localhost', //database ip
'Username' => 'hurlinghamcliniccouk', //database user name
'Password' => 'j5lA6mAhGIyrgzCd', //database password
'Database' => 'hurlinghamcliniccouk', //database name
)
);
}
class DB_connect{
public static function connect_db(){
$cont = mysqli_init();
mysqli_options($cont,MYSQLI_OPT_CONNECT_TIMEOUT, 30);
mysqli_real_connect($cont,DB_Conf::$DB_Config['DbConfig']['Hostname'], DB_Conf::$DB_Config['DbConfig']['Username'], DB_Conf::$DB_Config['DbConfig']['Password'], DB_Conf::$DB_Config['DbConfig']['Database']);
// echo @mysqli_ping($cont) ? 'true' : 'false';
return $cont;
}
public static function disconnect_db($cont){
mysqli_close($cont);
}
}
$domain= preg_replace('/^www./','',$_SERVER['HTTP_HOST']);
$path = $_SERVER['REQUEST_URI'];
$path = strtok($path, '?');
$path = str_replace('%20',' ',$path);
$path = str_replace('%09',' ',$path);
$path = str_replace('/'.$folder_location,'',$path);
$path = str_replace($page_extension,'',$path);
$base_url='../';
$cont=DB_connect::connect_db();
$query = mysqli_query($cont, "SELECT * FROM `data` WHERE `url`='$path';");
$page_data=mysqli_fetch_assoc($query);
$type_of_page=$page_data['page_type'];
$page_id=$page_data['id'];
$location_links='';
$keyword_link='';
if( $type_of_page==0){
$location_links='';
$keyword_link='';
}
if( $type_of_page==1){
$query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$page_id' AND `linked_to_type`='2';");
$index_select=array();
while($row=mysqli_fetch_assoc($query)){
$index_select[]=$row;
};
foreach($index_select as $ind){
$this_id=$ind['linked_to'];
$query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';");
$link=mysqli_fetch_assoc($query);
$location_links.='<li><a href="/'.$folder_location.$link['url'].'">'.$link['Heading'].'</a></li>'.PHP_EOL;
}
}
if( $type_of_page==2){
$query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$page_id' AND `linked_to_type`='1';");
$index_select=array();
while($row=mysqli_fetch_assoc($query)){
$index_select[]=$row;
};
foreach($index_select as $ind){
$this_id=$ind['linked_to'];
$query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';");
$link=mysqli_fetch_assoc($query);
$keyword_link.='<li><a href="/'.$folder_location.$link['url'].$page_extension.'">'.$link['Heading'].'</a></li>'.PHP_EOL;
}
}
if( $type_of_page==3){
$query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$page_id' AND `linked_to_type`='1';");
$index_select=array();
while($row=mysqli_fetch_assoc($query)){
$index_select[]=$row;
};
foreach($index_select as $ind){
$this_id=$ind['linked_to'];
$query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';");
$link=mysqli_fetch_assoc($query);
$keyword_link.='<li><a href="/'.$folder_location.$link['url'].$page_extension.'">'.$link['Heading'].'</a></li>'.PHP_EOL;
}
$query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$page_id' AND `linked_to_type`='2';");
$index_select=array();
while($row=mysqli_fetch_assoc($query)){
$index_select[]=$row;
};
foreach($index_select as $ind){
$this_id=$ind['linked_to'];
$query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';");
$link=mysqli_fetch_assoc($query);
$location_links.='<li><a href="/'.$folder_location.$link['url'].'">'.$link['Heading'].'</a></li>'.PHP_EOL;
}
}
if( $type_of_page==4){
$base_page_id=$page_data['base_page'];
$query = mysqli_query($cont, "SELECT `page_type`, `url` FROM `data` WHERE `id`='$base_page_id';");
$base_page=mysqli_fetch_assoc($query);
$base_url='/'.$folder_location.$base_page['url'];
$base_type=$base_page['page_type'];
##query the top level page
##get the type of page and the id from it
##get the data from the index
if( $base_type==1){
$query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$base_page_id' AND `linked_to_type`='2';");
$index_select=array();
while($row=mysqli_fetch_assoc($query)){
$index_select[]=$row;
};
foreach($index_select as $ind){
$this_id=$ind['linked_to'];
$query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';");
$link=mysqli_fetch_assoc($query);
$location_links.='<li><a href="/'.$folder_location.$link['url'].'">'.$link['Heading'].'</a></li>'.PHP_EOL;
}
}
if( $base_type==2){
$query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$base_page_id' AND `linked_to_type`='1';");
$index_select=array();
while($row=mysqli_fetch_assoc($query)){
$index_select[]=$row;
};
foreach($index_select as $ind){
$this_id=$ind['linked_to'];
$query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';");
$link=mysqli_fetch_assoc($query);
$keyword_link.='<li><a href="/'.$folder_location.$link['url'].$page_extension.'">'.$link['Heading'].'</a></li>'.PHP_EOL;
}
}
if( $base_type==3){
$query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$base_page_id' AND `linked_to_type`='1';");
$index_select=array();
while($row=mysqli_fetch_assoc($query)){
$index_select[]=$row;
};
foreach($index_select as $ind){
$this_id=$ind['linked_to'];
$query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';");
$link=mysqli_fetch_assoc($query);
$keyword_link.='<li><a href="/'.$folder_location.$link['url'].$page_extension.'">'.$link['Heading'].'</a></li>'.PHP_EOL;
}
$query = mysqli_query($cont, "SELECT `linked_to` FROM `index` WHERE `page_id`='$base_page_id' AND `linked_to_type`='2';");
$index_select=array();
while($row=mysqli_fetch_assoc($query)){
$index_select[]=$row;
};
foreach($index_select as $ind){
$this_id=$ind['linked_to'];
$query = mysqli_query($cont, "SELECT `url`,`Heading` FROM `data` WHERE `id`='$this_id';");
$link=mysqli_fetch_assoc($query);
$location_links.='<li><a href="/'.$folder_location.$link['url'].'">'.$link['Heading'].'</a></li>'.PHP_EOL;
}
}
}
if($page_data['lat']==0){
$page_data['lat']='0';
$page_data['long']=52;
}
#take the page
#find in the pages
#look at the link structure and get the required links
#read the has reviews in order to search for reviews for the pages that are created
#if its not there create some sort of a 404 page that will try to direct you to the correct place.
DB_connect::disconnect_db($cont);
?>
<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" lang="en-US" prefix="og: http://ogp.me/ns#">
<![endif]-->
<!--[if IE 7]>
<html id="ie7" lang="en-US" prefix="og: http://ogp.me/ns#">
<![endif]-->
<!--[if IE 8]>
<html id="ie8" lang="en-US" prefix="og: http://ogp.me/ns#">
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
<html lang="en-US" prefix="og: http://ogp.me/ns#">
<!--<![endif]-->
<head>
<script type="text/javascript">
var fb_param = {};
fb_param.pixel_id = '6008971142729';
fb_param.value = '0.00';
fb_param.currency = 'GBP';
(function(){
var fpw = document.createElement('script');
fpw.async = true;
fpw.src = '//connect.facebook.net/en_US/fp.js';
var ref = document.getElementsByTagName('script')[0];
ref.parentNode.insertBefore(fpw, ref);
})();
</script>
<link href="/uk/vc-style.css" rel="stylesheet" type="text/css">
<noscript>
<img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/offsite_event.php?id=6008971142729&value=0&currency=GBP" />
</noscript>
<script>
function initialize() {
var myLatlng = new google.maps.LatLng(<? echo $page_data['long']; ?>, <? echo $page_data['lat']; ?>);
var mapOptions = {
zoom: 10,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
var contentString = '';
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: 'Focus Clinics'
});
infowindow.open(map,marker);
}
function loadScript() {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&' +
'callback=initialize';
document.body.appendChild(script);
}
window.onload = loadScript;
</script>
<meta charset="UTF-8" />
<title><? echo $page_data['meta_title']; ?></title>
<meta name="description" content="<? echo $page_data['meta_descriptions']; ?>" />
<link href="http://db9fmqjcfwn7s.cloudfront.net/wp-content/themes/focusclinics/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2471000-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<style>
#map { height:250px; width:100%;}
#map-canvas {
margin-top:10px;
height: 100%;
min-height: 250px;
width: 100%;
}
.menu_simple img {padding-bottom:20px;}
</style>
</head>
<body class="page page-id-111 page-child parent-pageid-107 page-template page-template-page-article-treatment-php">
<div id="bg-top"></div>
<div id="page" class="hfeed">
<div id="header">
<div id="nav_menu"> </div>
<div style="width: 920px; height: 129px; min-height: 129px; min-width: 920px; display: block; text-align: left">
<div style="clear: both; float: left; color: rgb(0, 131, 172); font-size: 14px; font-family: 'Avenir-55-Roma n'; margin-top: 18px; margin-left: 0px; display: inline-block; width: 180px; min-width: 180px"></div>
<div id="logo" style="float: left; margin-left:130px; margin-top: 18px;">
<h1><a href="/">Hurlingham Clinic</a> </h1>
</div>
<div id="banner" style="margin-top: 44px">
<div class="number"></div>
<div class="both"></div>
</div>
<div style="clear: both"></div>
</div>
<div style="clear: both"></div>
<div id="main_menu">
<aside id="dc_jqmegamenu_widget-3" class="widget ">
<div class="dcjq-mega-menu" id="dc_jqmegamenu_widget-3-item">
<ul id="menu-main-menu" class="menu">
<li id="menu-item-83" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-83"><a href="/laser-eye-treatment.php">TREATMENTS</a></li>
<li id="menu-item-126" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-126"><a href="short-sighted-treatment.php">SHORT SIGHTED</a></li>
<li id="menu-item-106" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item menu-item-106"><a href="/long-sightedness.php">LONG SIGHTED</a></li>
<li id="menu-item-127" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-127"><a href="/vision-correction-pricing.php">PRICES</a></li>
<li id="menu-item-4029" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4029"><a href="/individual-patient-care.php">PATIENT CARE</a></li>
<li id="menu-item-2272" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2272"><a href="/results.php">RESULTS</a></li>
<li id="menu-item-179" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-179"><a href="/booking.php">BOOK</a></li>
<li id="menu-item-133" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-133"><a href="/about.php">ABOUT</a></li>
<li id="menu-item-474" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-474"><a href="/contact-us.php">CONTACT</a></li>
</ul>
</div>
</aside>
<div style="clear: both"></div>
</div>
<div style="clear: both"></div>
</div>
<!-- #branding -->
<div id="main">
<div id="breadcrumbs"> </div>
<div id="primary">
<div id="content">
<div class="content">
<div class="container bg2">
<div id="vc-content">
<h1><a href="<? echo $base_url; ?>"><? echo $page_data['Heading']; ?></a></h1>
<p><? echo $page_data['content']; ?></p>
<div class="book-a-consultation-button"><a href="//book-a-consultation/?promo=WEBSITE_B"><img src="/uk/images/book-a-consultation.jpg" width="375" height="40" alt="Book a consultation"></a></div>
<div class="box_left">
<h3><a class="show_hide">Local Towns</a><br /></h3>
<div class="slidingDiv"><a class="show_hide">>>> Hide</a>
<?php echo $location_links; ?> </div></div>
<div class="box_right">
<h3><a class="show_hide">Nearby:</a><br /></h3>
<div class="slidingDiv"><a class="show_hide">>>> Hide</a>
<ul><?php echo $keyword_link; ?></ul></div>
</div>
</div>
<div class="social-buttons">
<style type="text/css">
.social-buttons {
float: left;
margin: 10px 0px;
}
.social-buttons #tweet {
margin-right: 10px;
float: left;
}
.social-buttons #facebook {
width: 50px;
overflow: hidden;
margin-right: 9px;
float:left;
}
.social-buttons #google-plus {
float: left;
}
.pin-it-btn-wrapper, .pin-it-btn-wrapper-shortcode, .pin-it-btn-wrapper-widget {
float: left;
}
#hidden {display:none;}
</style>
<div id="tweet">
<iframe scrolling="no" frameborder="0" allowtransparency="true" src="http://platform.twitter.com/widgets/tweet_button.1340179658.html#_=1341774358199&count=none&id=twitter-widget-0&lang=en&original_referer=http%3A%2F%2Fwww.focusclinics.com%2Four-treatments%2Fz-lasik%2F&size=m&text=http%3A%2F%2Fwww.focusclinics.com%2Four-treatments%2Fz-lasik%2F&url=http%3A%2F%2Fwww.focusclinics.com%2Four-treatments%2Fz-lasik%2F" class="twitter-share-button twitter-count-none" style="width: 55px; height: 20px;" title="Twitter Tweet Button"></iframe>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
</div>
<div id="facebook">
<iframe scrolling="no" frameborder="0" allowtransparency="true" style="border:none; overflow:hidden; width:80px; height:21px;" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.focusclinics.com%2Four-treatments%2Fz-lasik%2F&layout=button_count&show_faces=true&width=80&action=like&font=lucida+grande&colorscheme=light&height=21"></iframe>
</div>
<div class="pin-it-btn-wrapper-shortcode "><a href="http://pinterest.com/pin/create/button/?url=http%3A%2F%2Fwww.focusclinics.com%2Four-treatments%2Fz-lasik%2F&media=http%3A%2F%2Fwww.focusclinics.com%2Fwp-content%2Fuploads%2F2012%2F05%2FWavelight_Equipment.jpg&description=Z-LASIK" count-layout="none" class="pin-it-button-no-iframe pin-it-button-user-selects-image" rel="nobox"><img border="0" class="pib-count-img" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a></div>
<div id="google-plus" style="margin-left: 12px">
<g:plusone size="medium" annotation="inline" width="120" href="http://www.focusclinics.com/our-treatments/z-lasik/"></g:plusone>
<!-- Place this render call where appropriate -->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script></div>
</div>
</div>
</div>
</div>
</div>
<!-- #content -->
</div>
<!-- #primary -->
<p> </p>
<div class="sidebar">
<div class="menu_simple"><? echo $page_data['box1']; ?></div>
<div class="dotted-title" style="margin-top: 3px; padding-bottom: 7px"></div>
<div style="margin-top: 10px;"><img src="/uk/images/getintouch.png" alt="Get in touch" /></div>
<div class="post">Fill in your details and we will call you back or reply to your email<strong>.</strong></div>
<div class="wpcf7" id="wpcf7-f4291-o1" lang="en-US" dir="ltr">
<div class="screen-reader-response"></div>
<?php
if(!empty($form_errors)){
echo "<p class='err'>".nl2br($form_errors)."</p>";
}
?>
<form name="" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post" class="wpcf7-form" novalidate>
<div style="display: none;">
<input type="hidden" name="_wpcf7" value="4291" />
<input type="hidden" name="_wpcf7_version" value="4.0.3" />
<input type="hidden" name="_wpcf7_locale" value="en_US" />
<input type="hidden" name="_wpcf7_unit_tag" value="wpcf7-f4291-o1" />
<input type="hidden" name="_wpnonce" value="d9932b33a5" />
</div>
<p style="font-size: 12px;">Name (required)<br />
<span class="wpcf7-form-control-wrap text-944">
<input type="text" name="text-944" value="" size="28" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="" />
</span></p>
<p style="font-size: 12px;">Email (required)<br />
<span class="wpcf7-form-control-wrap your-email">
<input type="email" name="your-email" value="" size="28" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email" aria-required="true" aria-invalid="false" placeholder="" />
</span> </p>
<p style="font-size: 12px;">Telephone (required)<br />
<span class="wpcf7-form-control-wrap tel-124">
<input type="tel" name="tel-124" value="" size="28" class="wpcf7-form-control wpcf7-text wpcf7-tel wpcf7-validates-as-required wpcf7-validates-as-tel" aria-required="true" aria-invalid="false" placeholder="" />
</span> </p>
<p style="font-size: 12px;">Message<br />
<span class="wpcf7-form-control-wrap your-message">
<textarea name="your-message" cols="40" rows="8" class="wpcf7-form-control wpcf7-textarea" aria-invalid="false" placeholder="Enter your message">Short sighted or long sighted etc</textarea>
</span> </p>
<p>
<input type="submit" value="SUBMIT FORM" name="submit" class="wpcf7-form-control wpcf7-submit" />
</p>
<div class="wpcf7-response-output wpcf7-display-none"></div>
</form>
</div>
<div class="dotted-title" style="margin-top: 3px; padding-bottom: 7px"></div>
<div class="post">
<h3> <a href="//our-treatments/z-lasik/">Our Treatments</a></h3>
<div id="map">
<div id="map-canvas"></div>
</div>
<p><? echo $page_data['box3']; ?><? echo $page_data['box2']; ?><? echo $page_data['box4']; ?></p>
</div>
</div>
<div style="clear: both"></div>
</div>
<!-- #main --><!-- #page -->
<div class="fade-bg"></div>
<?php include ($_SERVER["DOCUMENT_ROOT"] . '/includes/footer.php'); ?>
<? echo $page_data['rich_snippets_location']; ?> <? echo $page_data['rich_snippets_product']; ?>
<script type="text/javascript">
function downloadJSAtOnload() {
var element = document.createElement("script");
element.src = "http://db9fmqjcfwn7s.cloudfront.net/wp-content/themes/focusclinics/js/jquery.ThreeDots.js";
document.body.appendChild(element);
}
if (window.addEventListener)
window.addEventListener("load", downloadJSAtOnload, false);
else if (window.attachEvent)
window.attachEvent("onload", downloadJSAtOnload);
else window.onload = downloadJSAtOnload;
</script>
<!-- Pure Chat Snippet -->
<script type='text/javascript'>
(function () { var done = false; var script = document.createElement('script'); script.async = true; script.type = 'text/javascript'; script.src = 'https://app.purechat.com/VisitorWidget/WidgetScript'; document.getElementsByTagName('HEAD').item(0).appendChild(script); script.onreadystatechange = script.onload = function (e) { if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { var w = new PCWidget({ c: '4c772f82-902c-451d-936b-709bba0536e1', f: true }); done = true; } }; })();
</script>
<!-- End Pure Chat Snippet -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-62060412-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>