<?php
// INCLUDE HEADER IN PAGE
include('other_header.php');
// GET CURRENT DATE AND TIME
$date = date('Y-m-d H:i:s');
if($_POST['save1']) {
	$adminhash = $_POST['adminhash'];
	$paymentshash = $_POST['paymentshash'];
	$supporthash = $_POST['supporthash'];
	$_SESSION['hash'] = $adminhash;
	mysql_query("UPDATE Web_Premium_Login SET admin='$adminhash',payments='$paymentshash',support='$supporthash' WHERE id='1'");
	?>
	<div style="margin-top: -80px;" class="alert alert-success" role="alert">
		<strong>Well done!</strong> Hash successfully updated
	</div>
	<?php
}
?>
  <div class="container">
    <div class="text-center">
      <h1><?php echo $title; ?>
      	<small>/Active is: Admin Account
			</small>
		</h1>
 	 </div>
 	 </br>
 	 <?php
 	 	$query = "SELECT * FROM Web_Premium_Login LIMIT 1";
		$result = mysql_query($query) or die('Error, query failed');
		while($row = mysql_fetch_array($result))
				{
					$adminhashtag = $row['admin'];
					$paymentshashtag = $row['payments'];
					$supporthashtag = $row['support'];
				}
	?>
		<div class="row">
      <div class="col-md-8 col-md-offset-2">
        <div class="well">
			<div class="row">
				<center>
				<form name="csrf_form" id="campaignform" action="" method="POST">
					<div data-original-title="Enter your long URL" data-toggle="tooltip" data-placement="top" title="555" class="input-group">
							<span class="input-group-btn">
								<input value="Save" class="btn btn-default" style="width: 150px;" name="save1" type="submit">
							</span>
					</div>
					<div data-original-title="Enter your long URL" data-toggle="tooltip" data-placement="top" title="555" class="input-group">
							<center>
							<div class="form-group has-success">
								<div class="input-group">
               				<span class="input-group-addon">Admin Secret HashTag:</span>
               				<input name="adminhash" value="<?php echo $adminhashtag;?>" class="form-control" type="text">
       					  	</div>
							</div>
							<div class="form-group has-success">
								<div class="input-group">
               				<span class="input-group-addon">Payments Secret HashTag:</span>
               				<input name="paymentshash" value="<?php echo $paymentshashtag;?>" class="form-control" type="text">
       					  	</div>
							</div>
							<div class="form-group has-success">
								<div class="input-group">
               				<span class="input-group-addon">Support Secret HashTag:</span>
               				<input name="supporthash" value="<?php echo $supporthashtag;?>" class="form-control" type="text">
       					  	</div>
							</div>
							</center>
					</div>
					<input type="hidden" name="csrf_token" value="<?php echo $token; ?>">
				</form>
				</br>
				</center>
			</div>
        </div>
      </div>
    </div>
</div>

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