<?php include("../check.php"); ?>
<!DOCTYPE html>
<html>

<head>

    <?php include("common/head.php") ?>

</head>
<body class="fixed-navbar fixed-sidebar">

<?php include("common/header.php") ?>


<?php include("common/aside.php") ?>

<div id="wrapper">

<div class="small-header transition animated fadeIn">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li><a href="index.php">Dashboard</a></li>
                </ol>
            </div>
            <h2 class="font-light m-b-xs">Message :- 
           <?php 
 $token_id=rand(1000000000, 9999999999);
if(!isset($_SESSION['token_id']) || $_SESSION['token_id']=='') {  $_SESSION['token_id']=$token_id; }
 if ($_SERVER['REQUEST_METHOD'] == 'POST' && $access=='Yes')
  {
      
$token=trim($_POST['token']);
   if($token==$_SESSION['token_id'] && $_SESSION['token_id']!=='')
    { $_SESSION['token_id']=$token_id;
	            
    $add=htmlentities($_POST['add']);
$email=trim($_POST['email']);
$phone=trim($_POST['phone']);
$mobile=trim($_POST['mobile']);
$web=trim($_POST['web']);
$delhi=trim($_POST['delhi']);
$facebook=trim($_POST['facebook']);
$twitter=trim($_POST['twitter']);
$google=trim($_POST['google']);
$youtube=trim($_POST['youtube']);
$linked=trim($_POST['linked']);
$instagram=trim($_POST['instagram']);
    
    $updateData = $db_handle->runQuery("UPDATE `contact` SET `add` = '".$add."', `email` = '".$email."', `phone` = '".$phone."', `mobile` = '".$mobile."', `web` = '".$web."', `delhi` = '".$delhi."', `facebook` = '".$facebook."', `twitter` = '".$twitter."', `google` = '".$google."', `youtube` = '".$youtube."', `linked` = '".$linked."', `instagram` = '".$instagram."', `mobile` = '".$mobile."', `mobile` = '".$mobile."', `mobile` = '".$mobile."' WHERE `sr_no` = 1");
    echo '<em style="color:#0C0;">Saved successfully...</em>';
   }
  }
?>
            </h2>
        </div>
    </div>
</div>
<div class="content animate-panel">
<div>
    <div class="row">
        <div class="col-lg-12">
            <div class="hpanel">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                        <a class="closebox"><i class="fa fa-times"></i></a>
                    </div>
                    Contact Details
                </div>
                <div class="panel-body">
                <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST" enctype="multipart/form-data" onSubmit="return validform(this)" id="demo-form2" data-parsley-validate class="form-horizontal">
                <?php
	           $pageData = $getData->runQuery("SELECT * FROM `contact` where `sr_no`='1'");
			   ?>  
				<input type="hidden" name="token" id="token" value="<?php print $_SESSION['token_id']; ?>">
                <div class="form-group">
               		<label class="col-sm-2 control-label"><span style="color:#FF0000; font-size:16px;">Delhi Office</span></label>
                </div>
                <div class="form-group">
                	<label class="col-sm-1 control-label">Add</label>
                    <div class="col-sm-5"><input  type="text" name="add" id="add" onKeyPress="validInput(event)" onKeyUp="filterInput(this.id)" onBlur="filterInput(this.id)" onpaste="filterInput(this.id)" class="form-control" value="<?php print $pageData[0]['add']; ?>"></div>
                    <label class="col-sm-1 control-label">Email</label>
                    <div class="col-sm-5"><input type="text" name="email" class="form-control" value="<?php print $pageData[0]['email']; ?>"></div>
                </div>
               
                <div class="hr-line-dashed"></div>
                
                <div class="form-group">
                	<label class="col-sm-1 control-label">Phone</label>
                    <div class="col-sm-5"><input  type="text" name="phone" id="phone" onKeyPress="validInput(event)" onKeyUp="filterInput(this.id)" onBlur="filterInput(this.id)" onpaste="filterInput(this.id)" class="form-control" value="<?php print $pageData[0]['phone']; ?>"></div>
                    <label class="col-sm-1 control-label">Mobile</label>
                    <div class="col-sm-5"><input  type="text" name="mobile" id="mobile" onKeyPress="validInput(event)" onKeyUp="filterInput(this.id)" onBlur="filterInput(this.id)" onpaste="filterInput(this.id)" class="form-control" value="<?php print $pageData[0]['mobile']; ?>"></div>
                </div>
                
                <div class="hr-line-dashed"></div>
                
                <div class="form-group">
                	
                    <label class="col-sm-1 control-label">Time</label>
                    <div class="col-sm-5"><input  type="text" name="instagram" class="form-control" value="<?php print $pageData[0]['instagram']; ?>"></div>
                </div>
                
                
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                	<label class="col-sm-1 control-label">Map</label>
                    <div class="col-sm-11"><textarea   name="delhi" class="form-control input-lg m-b"><?php print $pageData[0]['delhi']; ?></textarea></div>
                </div>
                
                
                
                
                <div class="hr-line-dashed"></div>
                <div class="form-group">
               		<label class="col-sm-2 control-label"><span style="color:#FF0000; font-size:16px;">Social Link</span></label>
                   
                </div>
                <div class="form-group">
                	
                    <label class="col-sm-1 control-label">Facebook</label>
                    <div class="col-sm-5"><input type="text" name="facebook" class="form-control" value="<?php print $pageData[0]['facebook']; ?>"></div>
                    <label class="col-sm-1 control-label">Twitter</label>
                    <div class="col-sm-5"><input type="text" name="twitter" class="form-control" value="<?php print $pageData[0]['twitter']; ?>"></div>
                </div>
                <div class="hr-line-dashed"></div>

                <div class="form-group">
                	
                    <label class="col-sm-1 control-label">Google</label>
                    <div class="col-sm-5"><input type="text" name="google" class="form-control" value="<?php print $pageData[0]['google']; ?>"></div>
                    <label class="col-sm-1 control-label">Youtube</label>
                    <div class="col-sm-5"><input type="text" name="youtube" class="form-control" value="<?php print $pageData[0]['youtube']; ?>"></div>
                </div>
                
               
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                	
                    <label class="col-sm-1 control-label">Website</label>
                    <div class="col-sm-5"><input type="text" name="web" class="form-control" value="<?php print $pageData[0]['web']; ?>"></div>
                    
                </div>
                
               
                
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <div class="col-sm-8 col-sm-offset-2">
                        <button class="btn btn-primary" type="submit">Save Changes</button>
                    </div>
                </div>
                </form>
                </div>
            </div>
        </div>
        
    </div>


</div>

</div>

   
    <?php include("common/footer.php") ?>

</div>

<?php include("common/js.php") ?>

</body>

</html>