Mini Shell

Direktori : /proc/self/root/proc/self/root/proc/thread-self/root/home/rizant5/www/admin/
Upload File :
Current File : //proc/self/root/proc/self/root/proc/thread-self/root/home/rizant5/www/admin/blog-read.php

<?php 

require_once("../config.php");

require_once("function-file.php");

require_once("function-menu.php");

cookiecheck();

$blog_id=$_GET['blog_id'];

$commentid=$_GET['commentid'];

$datas=$conn->prepare("select * from blogs where blog_id='$blog_id'");

$datas->execute();$result=$datas->fetch();

$db=$conn->prepare("select * from blog_comment where commentid='$commentid'");

$db->execute();$results=$db->fetch();

if(isset($_POST['save'])){

	$reply=htmlspecialchars($_POST['reply'],ENT_QUOTES);//$_POST['reply'];

	$conn->exec("insert into blog_answer (comment_id,reply,replydate) values ('$commentid','$reply',now())");

	$conn->exec("update blog_comment set status='1' where commentid='$commentid'");

	header("location:blog-comment.php");

}

?>

<!DOCTYPE html>

<html>

  <head>

    <meta charset="utf-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>Blog</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();?>

    <style>.box-comment{border: 1px solid #ccc; padding: 10px;}</style>

  </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">Blog</h3>

              <div class="box-tools pull-right">

                <a href="blogs.php" 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-12"><label>Blog Title: </label>&nbsp;<?php echo $result['blog_title']; ?></div>

              </div>

               <div class="form-group">

              		<div class="col-sm-6"><label>Blog Description:</label>

                    <?php echo $result['blog_desc']; ?></div>

                    <div class="col-sm-6"><img src="img/blogs/<?php echo $result['blog_img'];?>" id="output"  class="img-responsive img-thumbnail"/></div>

              </div>

              <hr />

              <h4>Comment</h4>

              <div class="box-comment">

               <div class="form-group">

               		<div class="col-sm-12"><label>Name: </label> <?php echo $results['name'];?></div>

                    <div class="col-sm-12"><label>Email: </label> <?php echo $results['email'];?></div>

               </div>

                <div class="form-group">

               		<div class="col-sm-12"><label>Comment: </label></div>

                    <div class="col-sm-12"><?php echo $results['message'];?></div>

               </div>

             </div>  

             <br>

              <div class="form-group">

                    <div class="col-sm-12"><textarea name="reply" class="form-control" rows="4" placeholder="Reply..."></textarea></div>

              </div> 

              <div class="form-group">     

                    <div class="col-sm-12"><button type="submit" name="save" class="btn btn-primary">Submit</button></div>

               </div>

            </div><!-- /.box-body -->

            </form>

          </div><!-- /.box -->

        </section><!-- /.content -->

      </div></div><!-- /.content-wrapper -->

      <?php footer();?>

    </div><!-- ./wrapper -->

   <?php jsfile();ratenum();?>

 <script>

  var loadFile = function(event) {

    var output = document.getElementById('output');

    output.src = URL.createObjectURL(event.target.files[0]);

  };

</script>

   </body>

</html>


Zerion Mini Shell 1.0