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/edit-question.php

<?php 

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

require_once("function-file.php");

require_once("function-menu.php");

cookiecheck();

$topic_id=$_GET['topic_id'];

$queid=$_GET['queid'];

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

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

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

{

	$question=$_POST['question'];

	$conn->exec("update question SET check_status='1',approve='1',text='$question' where que_id='$queid' ");

	header("location:answer.php?topic_id=".$topic_id."&queid=".$queid."#answer");

}

?>

<!DOCTYPE html>

<html>

  <head>

    <meta charset="utf-8">

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

    <title><?php echo $result['topic_name'];?></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>iframe{width: 100% !Important;}</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"><?php echo $result['topic_name'];?></h3>

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

                <a  href="javascript:history.back()" class="btn btn-info btn-sm" ><i class="fa fa-angle-double-left"></i> Back</a>

              </div>

            </div>

            <div class="box-body">

              <div class="form-group">

              		<div class="col-sm-5 img-thumbnail col-xs-12"><?php echo $result['topic_desc'];?></div>

                    <div class="col-sm-6 img-thumbnail col-sm-offset-1 col-xs-12"><?php echo $result['video_url'];?></div>

              </div>

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

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

          <div class="box box-primary">

          	<div class="box-body">

            <form action="#" method="post">

              <div class="row form-group" id="answer">      

                    <div class="col-sm-12">

              <!-- The time line -->

              <ul class="timeline">

                <!-- timeline time label -->

                <?php $db=$conn->prepare("select * from question a inner join student_reg b on a.stu_id=b.stu_id where que_id='$queid'");

				$db->execute();$rows=$db->fetch();?>

                <!-- timeline item -->

                <li>

                  <i class="fa fa-envelope bg-blue"></i>

                  <div class="timeline-item">

                    <span class="time "><?php echo date('d M. Y',strtotime($rows['datetime']));?> - <i class="fa fa-clock-o"></i>  <?php echo date('h:i A',strtotime($rows['datetime']));?></span>

                    <h3 class="timeline-header"><?php echo $rows['stu_name'];?></h3>

                    <div class="timeline-body">

                      <textarea name="question" class="form-control" required><?php echo $rows['text'];?></textarea>

                    </div>

                  </div>

                </li>

                <!-- END timeline item -->
               

              </ul>

              </div>

            </div>

            


                    <div class="row form-group"><div class="col-sm-12" align="center"><button type="submit" name="save" class="btn btn-success">Update Question</button></div></div>

            </div>

            </form>

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

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

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

      <?php footer();?>

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

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

   

  </body>

</html>


Zerion Mini Shell 1.0