<?php
ob_start();
//session_start();
//if(isset($_SESSION['loggedin']))
//{
	include('connection.php');
//	$logid=$_SESSION['loggedin'];
//	$res=mysqli_query($con,"select * from admin where id='$logid'");
//	$row=mysqli_fetch_assoc($res);

	$gid=$_REQUEST['bid'];
	$memm=mysqli_query($con,"select * from about where id='$gid'");
	$brow=mysqli_fetch_assoc($memm);
	if(isset($_POST['save']))
{
$photo=$_POST["photo"];
$des=$_POST["des"];
date_default_timezone_set("Asia/Calcutta");
$date=date('Y-m-d H:i:s');
$sql="update about set photo='$photo',des='$des',updated_at='$date' where id='$gid'";
$result=mysqli_query($con,$sql);
	if(mysqli_affected_rows($con)==1)
	{
		header("location:about.php");
	}
	else{
	header("location:about.php");
	}
}
	
?>

  <!-- Navbar -->
<?php include('header.php');?>
  <!-- /.navbar -->

  <!-- Main Sidebar Container -->
<?php include('sidebar.php');?>

  <!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
         
          
        </div>
      </div><!-- /.container-fluid -->
    </section>

    <!-- Main content -->
	 <section class="content">
      <div class="row">
        <div class="col-md-6">
          <div class="card card-primary">
             <div class="card-header" style="background-color:rgb(27 125 151);color:white">
                <h3 class="card-title"><b>Update Earl Meyers (Broker/Owner)</b></h3>
              </div>
            <!-- /.card-header -->
			<form method="post" method="post" enctype="multipart/form-data">
            <div class="card-body">
                    <label for="exampleInputPassword1">DRE#</label>
                    <input type="text" name="photo" class="form-control" id="exampleInputPassword1" value="<?php echo $brow['photo'];?>">
                  </div>
		   <div class="card-body">
			 <label for="exampleInputPassword1">About Earl Meyers (Broker/Owner)</label>
              <textarea id="summernote" name="des">
              <?php echo $brow['des'];?>
              </textarea>
            </div>
			
				    <div class="card-footer" style="text-align:right">
                  <button type="submit" name="save" class="btn btn-info">Update</button>
                </div>
           </form>
          </div>
        </div>
        <!-- /.col-->
      </div>
      <!-- ./row -->
     
      <!-- ./row -->
    </section>
	
	
   
    <!-- /.content -->
  </div>
 <script src="plugins/jquery/jquery.min.js"></script>
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="plugins/summernote/summernote-bs4.min.js"></script>
	
	<script src="plugins/summernote/summernote-bs4.min.js"></script>
	
	<script src="plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->

	<script>
  $(function () {
    // Summernote
    $('#summernote').summernote()

    // CodeMirror
    CodeMirror.fromTextArea(document.getElementById("codeMirrorDemo"), {
      mode: "htmlmixed",
      theme: "monokai"
    });
  })
</script>
 <?php include('footer.php');?>