]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(); if((!empty($_GET['action']))&&($_GET['action']=='delete')){ $que_id=$_GET['que_id']; $conn->exec("delete from question where que_id='$que_id'"); header("location:questions.php"); } if((!empty($_GET['action']))&&($_GET['action']=='approve')){ $que_id=$_GET['que_id']; $conn->exec("Update question set approve='1' where que_id='$que_id'"); header("location:questions.php"); } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Questions</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;}.timeline>li>.timeline-item{margin-left:0px;margin-right:0;}</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 box-primary"> <div class="box-header with-border"> <h3 class="box-title">Questions</h3> </div> </div><!-- /.box --> <ul class="timeline"> <?php /*$db=$conn->prepare("select * from question a inner join student_reg b on a.stu_id=b.stu_id where a.check_status='0' order by datetime DESC");*/ $db=$conn->prepare("select * from question a inner join student_reg b on a.stu_id=b.stu_id order by datetime DESC"); $db->execute();$results=$db->fetchall(); foreach($results as $rows){?> <!-- 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"> <?php echo $rows['text'];?> </div> <div class="timeline-footer"> <?php if($rows['approve']=='0'){?><a href='questions.php?action=approve&que_id=<?php echo $rows['que_id'];?>' onclick="return confirm('Are you sure you want to Approve?')" class="btn btn-warning btn-xs">Approve?</a><?php }else{echo"<label class='label bg-green'><i class='fa fa-check'></i> Approved</label>";}?> <a href='questions.php?action=delete&que_id=<?php echo $rows['que_id'];?>' onclick="return confirm('Are you sure you want to delete?')" class="btn btn-danger btn-xs">Delete</a> <a href="answer.php?topic_id=<?php echo $rows['topic_id'];?>&queid=<?php echo $rows['que_id'];?>#answer" class="btn btn-primary btn-xs">Read more & Answer</a> </div> </div> </li> <?php }?> </ul> </section><!-- /.content --> </div></div><!-- /.content-wrapper --> <?php footer();?> </div><!-- ./wrapper --> <?php jsfile();ratenum();?> </body> </html>