PK

ADDRLIN : /home/questend/public_html/domains/rwa40.com/
FLL :
Current File : /home/questend/public_html/domains/rwa40.com/discussion-forum-detail.php

<?php
   ob_start();
   //error_reporting(E_ALL ^ E_NOTICE);
   @session_start();
   ini_set('allow_url_include',1);    
   date_default_timezone_set("Asia/Kolkata");
   set_time_limit(600);
   ini_set('max_execution_time',600);
   include 'admin/includes/settings/constant.php';
   require_once 'admin/includes/settings/PDODB.php';
   include 'admin/includes/modules/functions.php';
   
   $function = new FUNCTIONS();
   $DiscussionForumsdata = $function->getDiscussionForums($id=$_GET['id'],$isactive=1,$orderBy='DESC');
   $commentdata = $function->getComments($c_id=NULL,$discussion_forum_id=$_GET['id'],$isactive=NULL);
   //print_r($commentdata[1]['owner_name']); 
   //exit;
   if(isset($_POST['commentBnt'])){
      //print_r($_POST); exit;

      $comment = !empty($_POST['comment'])?trim($_POST['comment']):"";
      $ent_comment = htmlentities($comment, ENT_QUOTES);

      $discussion_forum_id = !empty($_POST['discussion_forum_id'])?trim($_POST['discussion_forum_id']):"";
      $uid = !empty($_POST['uid'])?trim($_POST['uid']):"";

      $error_msg = "";
      $pdodb = PDODB::getInstance();
      //echo "cmdm"; exit;
      $sql = "INSERT INTO `tb_comment`  SET uid='".$uid."', discussion_forum_id='".$discussion_forum_id."',comment='".$ent_comment."'";
      //print_r($sql); exit;
      $result = $pdodb->query($sql);
      //print_r($result); exit;
      PDODB::closeInstance();
      if($result) { 
          $error_msg = "Comment Successfully Added.";
        ?>
        <script type="text/javascript">
          window.location = window.location
        </script>
        <?php 
          $error_msg = "Comment Successfully Added.";
          //header("Location: index.php");
      }
   }

?>
<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
      <meta name="description" content="">
      <meta name="author" content="">
      <title>RWA Sectore 40 Noida | Discussion forum</title>
      <!-- Bootstrap core CSS -->
      <link href="vendor/bootstrap/css/bootstrap.css" rel="stylesheet">
      <!-- Custom styles for this template -->
      <link href="css/noida40.css" rel="stylesheet">
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
      <link href="css/bootstrap-dropdownhover.css" rel="stylesheet">
      <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
      <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">

      <style>
          .comment-section {
            margin-top: 20px;
          }           
          .date {
              font-size: 11px;             
          }

          .comment-text {
              font-size: 12px;              
          }

          .fs-12 {
              font-size: 12px
          }

          .shadow-none {
              box-shadow: none
          }

          .name {
              color: #007bff
          }

          .cursor:hover {
              color: blue
          }

          .cursor {
              cursor: pointer
          }

          .textarea {
              resize: none
          }

          .fa-facebook {
              color: #3b5999
          }

          .fa-twitter {
              color: #55acee
          }

          .fa-linkedin {
              color: #0077B5
          }

          .fa-instagram {
              color: #e4405f
          }

          .fa-dribbble {
              color: #ea4c89
          }

          .fa-pinterest {
              color: #bd081c
          }

          .fa {
              cursor: pointer
          }
      </style>
   </head>
   <body>
      <?php include_once 'header.php'; ?>      
      <!-- Page Content -->
      <div class="container-fluid padding-0">
         <div class="container mt-5">            
            <!-- <h2 class="text-center mt-5 pb-5"><span>Finacial</span> Results</h2> -->
            <div class="row">
              <div class="col-lg-8 post-list">
                <section class="post-area">
                   <div class="single-post-item" style="border-bottom: 1px solid #d4ccc9; padding-bottom: 20px;">
                      <figure>
                         <img class="post-img img-fluid" src="admin/uploads/discussionForums/<?=$DiscussionForumsdata[0]['file'];?>" alt="">
                      </figure>
                      <h3 style="font-size: 24px; padding-bottom: 10px;">
                        <?=html_entity_decode($DiscussionForumsdata[0]['title']);?>                        
                      </h3>
                      <div style="border-bottom: 1px solid #d4ccc9;">
                         <div class="text-uppercase">
                            By <?=$DiscussionForumsdata[0]['author_name'];?>
                         </div>
                         <div>
                            <i class="fa fa-calendar"></i>
                               <?=date('l, jS F, Y', strtotime($DiscussionForumsdata[0]['isdated']));?>
                         </div>
                      </div>
                      <p><?=html_entity_decode($DiscussionForumsdata[0]['full_description']);?> </p>                           
                   </div>                     
                </section>

                <?php for($i=0;$i<count($commentdata);$i++){ ?>
                  <div class="d-flex flex-column comment-section" id="myGroup">
                    <div class="bg-light p-2">
                        <div class="d-flex flex-row user-info">
                          <img class="rounded-circle" src="images/user-icon.jpg" width="40" height="40">
                            <div class="d-flex flex-column justify-content-start ml-2"><span class="d-block font-weight-bold name"><?=$commentdata[$i]['owner_name'];?></span><span class="date text-black-50">Shared publicly - <?=$commentdata[$i]['isdated'];?></span></div>
                        </div>
                        <div class="mt-2">
                            <p class="comment-text">
                              <?=html_entity_decode($commentdata[$i]['comment']);?>                              
                            </p>
                        </div>
                    </div>
                    <!-- <div class="bg-light p-2">
                        <div class="d-flex flex-row fs-12">
                            <div class="like p-2 cursor"><i class="fa fa-thumbs-o-up"></i><span class="ml-1">Like</span></div>
                            <div class="like p-2 cursor action-collapse" data-toggle="collapse" aria-expanded="true" aria-controls="collapse-1" href="#collapse-1"><i class="fa fa-commenting-o"></i><span class="ml-1">Comment</span></div>
                            <div class="like p-2 cursor action-collapse" data-toggle="collapse" aria-expanded="true" aria-controls="collapse-2" href="#collapse-2"><i class="fa fa-share"></i><span class="ml-1">Share</span></div>
                        </div>
                    </div> -->
                    <div id="collapse-1" class="bg-light p-2 collapse" data-parent="#myGroup">
                        <div class="d-flex flex-row align-items-start"><img class="rounded-circle" src="images/user-icon.jpg" width="40"><textarea class="form-control ml-1 shadow-none textarea"></textarea></div>
                        <div class="mt-2 text-right"><button class="btn btn-primary btn-sm shadow-none" type="button">Post comment</button><button class="btn btn-outline-primary btn-sm ml-1 shadow-none" type="button">Cancel</button></div>
                    </div>
                    <div id="collapse-2" class="bg-light p-2 collapse" data-parent="#myGroup">
                        <div class="d-flex flex-row align-items-start">
                          <i class="fa fa-facebook border p-3 rounded mr-1"></i>
                          <i class="fa fa-twitter border p-3 rounded mr-1"></i>
                          <i class="fa fa-linkedin border p-3 rounded mr-1"></i>
                          <i class="fa fa-instagram border p-3 rounded mr-1"></i>
                          <i class="fa fa-dribbble border p-3 rounded mr-1"></i>
                          <i class="fa fa-pinterest-p border p-3 rounded mr-1"></i>
                        </div>
                    </div>
                  </div>
                <?php } ?>
                <div class="bg-light p-2 mt-5 mb-5">
                  <form action="" method="post" id="commentfrm">
                    <div class="d-flex flex-row align-items-start">
                      <img class="rounded-circle" src="images/user-icon.jpg" width="40">
                      <textarea class="form-control ml-1 shadow-none textarea" name="comment" id="comment"></textarea>
                    </div>
                    <div class="mt-2 text-right">
                      <?php if(empty($_SESSION['userId'])){ ?>                        
                        <a href="#" data-toggle="modal" data-target="#userlogin" class="btn btn-primary btn-sm shadow-none text-white" type="submit">Post comment</a>
                      <?php }else{ ?>
                        <input type="hidden" name="discussion_forum_id" value="<?=$DiscussionForumsdata[0]['id'];?>">
                        <input type="hidden" name="uid" value="<?=$_SESSION['userId'];?>">
                        <button class="btn btn-primary btn-sm shadow-none" type="submit" name="commentBnt" id="commentBnt">Post comment</button>
                      <?php } ?>                      
                      <button class="btn btn-outline-primary btn-sm ml-1 shadow-none" type="button">Cancel</button>
                    </div>
                  </form>
                  <p style="color:red; text-align: center;"><?=(!empty($error_msg))?$error_msg:'';?>
                </div>

              </div>
            </div>
         </div>
      </div>
      <!-- end Page Content -->
      <!-- Footer -->
      <?php include_once'footer.php';?>
      <!-- End Footer -->
      <?php include_once'login.php';?>
      <!-- Bootstrap core JavaScript -->
      <script src="vendor/jquery/jquery.min.js"></script>
      <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
      <script src="js/bootstrap-4-hover-navbar.js"></script>
      <!--login window-->
     
      <script src="js/jquery.form-validator.min.js"></script>

      <script type="text/javascript">     
        $("#commentfrm").validate({
          rules: {
              comment: {
                  required: true
              }
          },
          messages: {
              comment: {
                  required: "Please enter your comment"
              }

          },
          submitHandler: function(form) {           
             
              form.submit();
             
          }   
        });
      </script>      
   </body>
</html>


PK 99
E-SHOP || DASHBOARD
404

Page Not Found

It looks like you found a glitch in the matrix...

← Back to Home