<?php 
session_start();
include_once 'config.php';
include_once 'auth.php';
$user_id = $_SESSION['Admin']['id'];
$MainPage="Master";
$Page = "Letter-Master";
?>
<!DOCTYPE html>
<html lang="en" class="default-style">
<head>
<title><?php echo $Proj_Title; ?> - Letter-Master</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="description" content="">
<meta name="author" content="" />

<?php include_once 'header_script.php'; ?>
<script src="ckeditor/ckeditor.js"></script>
</head>
<body>
<style type="text/css">
  .password-tog-info {
  display: inline-block;
cursor: pointer;
font-size: 12px;
font-weight: 600;
position: absolute;
right: 50px;
top: 30px;
text-transform: uppercase;
z-index: 2;
}


</style>
<div class="layout-wrapper layout-1 layout-without-sidenav">
        <div class="layout-inner">
         
         <?php include 'sidenavi.php'; ?>

<?php 
$query = "SELECT * FROM tbl_letter_content WHERE id = '1'";
$row7 = getRecord($query);
if(isset($_POST['submit'])){
   $Details = addslashes(trim($_REQUEST['Details']));
   $query2 = "UPDATE tbl_letter_content SET Details='$Details' WHERE id = '1'";
  $conn->query($query2);
       echo "<script>alert('Details Updated Successfully!');window.location.href='ref-letter-master.php';</script>";
}
?>       

<div class="layout-container">
<div class="layout-content">

<div class="container-fluid flex-grow-1 container-p-y">
<h4 class="font-weight-bold py-3 mb-0">Referral Letter Master
<!-- <span style="float: right;">
<a href="create-optical-receipt.php" class="btn btn-secondary btn-round"><i class="ion ion-md-add mr-2"></i> Create New Receipt</a></span><br> -->
</h4>
<div class="card mb-4">
<div class="card-body">
<div id="alert_message"></div>
<form id="validation-form" method="post" autocomplete="off" enctype="multipart/form-data">
<div class="form-row">

  <div class="col-sm-12">
    <div class="form-group">
      <label class="floating-label" for="Name">Details <span class="text-danger">*</span></label>
        <textarea class="form-control" name="Details" id="editor1" placeholder="" required=""><?php echo $row7['Details'];?></textarea>
    </div>
  </div>



</div>
<!-- <button id="growl-default" class="btn btn-default">Default</button> -->
<button type="submit" name="submit" class="btn btn-primary btn-finish" id="submit">Save</button>
</form>
</div>
</div>






</div>


<?php include_once 'footer.php'; ?>
</div>

</div>

</div>

<div class="layout-overlay layout-sidenav-toggle"></div>
</div>


<?php include_once 'footer_script.php'; ?>
 <script>
        CKEDITOR.replace( 'editor1');
</script>
</body>
</html>
