<?php 
   ob_start();
   session_start();
   if($_SESSION['userid']=="")
   {header("location:index.php");exit();}
   include ("include/connection.php");
   ?>
<!DOCTYPE html>
<html>
   <head>
      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <title>Admin Panel | Risk Agreement</title>
      <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
      <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
      <link rel="stylesheet" href="css/font-awesome.min.css">
      <link rel="stylesheet" href="css/ionicons.min.css">
      <link rel="stylesheet" href="dist/css/AdminLTE.min.css">
      <link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">
      <link rel="stylesheet" href="plugins/iCheck/flat/blue.css">
      <link rel="stylesheet" href="plugins/morris/morris.css">
      <link rel="stylesheet" href="plugins/jvectormap/jquery-jvectormap-1.2.2.css">
      <link rel="stylesheet" href="plugins/datepicker/datepicker3.css">
      <link rel="stylesheet" href="plugins/daterangepicker/daterangepicker-bs3.css">
      <link rel="stylesheet" href="plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
      <link rel="stylesheet" href="plugins/datatables/dataTables.bootstrap.css">
      <link rel="stylesheet" href="plugins/select2/select2.min.css">
      <link rel="stylesheet" href="plugins/iCheck/all.css">
      <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
      <![endif]-->
      <link rel="stylesheet" href="css/style.css">
      <link rel="stylesheet" href="css/app.css" id="maincss">
      <style>
         #confirm h4{font-size: 1rem;}
         #confirm p{font-size: 13px; margin-top:20px;}
         #confirm .modal-content{border-radius:3px}
         #confirm .modal-dialog{padding:20px; margin-top:130px;}
      </style>
   </head>
   <body class="hold-transition skin-red sidebar-mini">
      <div class="wrapper">
         <?php include ("include/header.inc.php");?>
         <?php include ("include/navigation.inc.php");
            ?>
         <div class="content-wrapper">
            <!-- Main content -->
            <section class="content">
            <section class="content-header">
               <h1>Risk Agreement</h1>
               <ol class="breadcrumb">
                  <li><a href="desktop.php"><i class="fa fa-dashboard"></i>Home</a></li>
                  <li class="active">Risk Agreement</li>
               </ol>
            </section>
            <!-- Main content -->
            <section class="content">
               <div class="row">
                  <div class="col-xs-12 text-center">
                     <?php if(isset($_GET['msg'])=="updt"){ ?>
                     <span class="text-center red_txt">Update Successfully......</span><?php  } ?>
                  </div>
                  <div class="col-xs-12">
                     <div class="box">
                        <!-- /.box-header -->
                        <?php  
                           $sql="select* FROM `content` WHERE id='1'";
                           
                           $query=mysqli_query($con,$sql);
                           
                           $role=mysqli_fetch_array($query);
                           
                           if(isset($_POST['site_setting'])=='Submit'){
                          
                            $content=($_POST['content']);
                           
                            
                           
                           $sql= "UPDATE `content` SET `riskagreement` = '$content' WHERE `id`= '1'";
                           
                           $query=mysqli_query($con,$sql);
                           
                           if($query){
                           
                            
                           
                             echo '<script>
                                  alert("Setting Updating...");
                                  window.location.href="riskagreement.php";
                                  </script>' ;
                           
                            }
                           
                           
                           
                            } ?>
                        <form id="formID" name="formID" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>" enctype="multipart/form-data">
                           <div class="box-body">
                              <div class="clearfix"></div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <label>Risk Agreement</label>
                                    <input type="text"    rows="5" class="form-control" onkeypress="return isNumber(event)" name="content" id="content" required value="<?php echo $role['riskagreement'];?>">
                                 </div>
                              </div>
                             
                              <div class="clearfix"></div>
                              <div class="form-group">
                                 <div class="text-center">
                                    <input type="submit" class="btn btn-primary" value="Submit"  name="site_setting" >
                                 </div>
                              </div>
                           </div>
                           <div class="clearfix"></div>
                        </form>
                        <!-- /.box-body -->
                     </div>
                     <!-- /.box -->
                  </div>
                  <!-- /.col -->
               </div>
               <!-- /.row -->
            </section>
            <!-- /.content -->
         </div>
         <!-- /.content-wrapper -->
         <?php  include("include/footer.inc.php");?>
      </div>
     
   </body>
</html>