]nbmbmbnmbnmbnmnbnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
bnmbnmbnmnbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbn
/
home
/
rizant5
/
public_html
/
admin
/
Upload FileeE
HOME
<?php require_once("../config.php"); require_once("function-file.php"); require_once("function-menu.php"); cookiecheck(); $subid=$_GET['subid']; $chapter_id=$_GET['chapter_id']; if(isset($_POST['save'])){ $chapter_name=$_POST['chapter_name']; $chapter_desc=$_POST['chapter_desc']; $conn->exec("UPDATE chapters SET chapter_name='$chapter_name',chapter_desc='$chapter_desc' where chapter_id='$chapter_id'"); header("location:chapters.php?subid=$subid"); } $datas=$conn->prepare("select * from chapters where chapter_id='$chapter_id'"); $datas->execute();$result=$datas->fetch(); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Edit Chapter</title> <!-- Tell the browser to be responsive to screen width --> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <?php cssfile();?> </head> <body class="hold-transition skin-blue layout-top-nav"> <!-- Site wrapper --> <div class="wrapper"> <?php headermenu();?> <!-- =============================================== --> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <!-- Main content --> <section class="content"> <!-- Default box --> <div class="box"> <div class="box-header with-border"> <h3 class="box-title">Edit Chapter</h3> <div class="box-tools pull-right"> <a href="chapters.php?subid=<?php echo $subid;?>" class="btn btn-info btn-sm" ><i class="fa fa-angle-double-left"></i> Back</a> </div> </div> <div class="box-body"> <form action="#" method="post" role="form" class="form-horizontal"> <div class="form-group"> <div class="col-sm-6"><label>Chapter Name <span class="required">*</span></label><input name="chapter_name" class="form-control" placeholder="Enter Chapter Name" required value="<?php echo $result['chapter_name'];?>"></div> </div> <div class="form-group"> <div class="col-sm-12"><label>Chapter Description</label> <textarea name="chapter_desc" id="editor1" class="form-control editor1" rows="4"><?php echo $result['chapter_desc'];?></textarea></div> </div> <div class="form-group"> <div class="col-sm-12" align="right"> <button type="reset" class="btn btn-default" rows="4">Reset</button> <button type="submit" name="save" class="btn btn-success" >Save</button></div> </div> </div><!-- /.box-body --> </div><!-- /.box --> </section><!-- /.content --> </div></div><!-- /.content-wrapper --> <?php footer();?> </div><!-- ./wrapper --> <?php jsfile();ratenum();?> <!--<script src="https://cdn.ckeditor.com/4.4.3/standard/ckeditor.js"></script> //<script> //$(function () { // Replace the <textarea id="editor1"> with a CKEditor // instance, using default configuration. CKEDITOR.replace('editor1'); //bootstrap WYSIHTML5 - text editor $(".textarea").wysihtml5(); }); //</script>--> <script src="//cdn.ckeditor.com/4.5.8/full/ckeditor.js"></script> <script> $(function() { $('.editor1').each(function(){ CKEDITOR.replace( $(this).attr('id') ); }); }); </script> </body> </html>