PK

ADDRLIN : /home/questend/public_html/domains/rwa40.com/admin/help-support/
FLL :
Current File : /home/questend/public_html/domains/rwa40.com/admin/help-support/view.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 '../includes/settings/constant.php';
   require_once '../includes/settings/PDODB.php';
   include '../includes/modules/functions.php';

   $function = new FUNCTIONS();

   if (!empty($_SESSION['adminId']) && !empty($_SESSION['admin_role_id'])) {
     if($_SESSION['admin_role_id']==1){
      //header("Location: index.php");
    }elseif($_SESSION['admin_role_id']==2){
      header("Location: ../dashboard/index.php");
    }
   }else{
    header("Location: ../index.php");
    exit();
   }
   
    $user = $function->getUsers($id=$_GET['uid'],$email=NULL,$password=NULL,$isactive=1);
    $username = $user[0]['owner_name'];

    $user_details = $function->getUserDetails($_GET['uid'],1);
    $house_no = $user_details[0]['house_no'];
    $ticketdata = $function->getTickets($id=$_GET['id'],$uid=NULL,$status=NULL,$orderBy='ASC');
   
?>
<!DOCTYPE html>
<html>
   <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>RWA | Sector 40</title>
      <?php include_once '../layout/style.php'; ?>
      <style type="text/css">
        .open{
          background-color: #1c84c6;
          color: #FFFFFF;
        }
        .resolved{
          background-color: #1ab394;
          color: #FFFFFF;
        }
        .closed{
          background-color: #ed5565;
          color: #FFFFFF;
        }
      </style>
   </head>
   <body>
      <div id="wrapper">
        <?php $currentPage = 'help-support'; include_once '../layout/side-bar.php'; ?>
         <div id="page-wrapper" class="gray-bg">
            <?php include_once '../layout/header.php'; ?>
            <div class="row wrapper border-bottom white-bg page-heading">
               <div class="col-sm-8">
                  <h2>Help Support</h2>
                    <h5>Name : <strong><?=$username;?></strong></h5>
                    <h5>House No : <strong><?=$house_no;?></strong></h5>
                    <div class="widget <?=(!empty($ticketdata[0]['status']))?$ticketdata[0]['status']:'';?> p-lg text-center">
                        <div class="m-b-md">
                            <!-- <i class="fa fa-bell fa-4x"></i> -->
                            <h1 class="m-xs"><?=html_entity_decode($ticketdata[0]['title']);?></h1>
                            <h3 class="font-bold no-margins"><?=html_entity_decode($ticketdata[0]['msg']);?></h3>
                        </div>
                    </div>
               </div>
               <div class="col-lg-2">
                   <button class="btn-lg btn-primary pull-right" style="margin-top: 15px;" onclick="history.back()">Back</button>
               </div>
            </div>           
            <div class="row">
               <div class="col-lg-8">
                 <div class="ibox float-e-margins">
                    <div class="ibox-content">
                       <div id="comments-container">
                          <!-- Comments will be loaded here via AJAX -->
                       </div>
                       <div class="chat-form">
                          <form role="form" id="comment-form" method="post">
                             <input type="hidden" name="ticket_id" value="<?=$_GET['id']?>">
                             <input type="hidden" name="uid" value="<?=$_GET['uid']?>">
                             <div class="form-group">
                                <textarea class="form-control" name="msg" rows="4" placeholder="Message" required></textarea>
                             </div>
                             <div class="text-left">
                                <select class="form-control m-b" name="status">
                                    <option value="open" <?=($ticketdata[0]['status']=='Open')?'selected':'';?>>Open</option>
                                    <option value="closed" <?=($ticketdata[0]['status']=='closed')?'selected':'';?>>Closed</option>
                                    <!-- <option value="resolved" <?=($ticketdata[0]['status']=='resolved')?'selected':'';?>>Resolved</option> -->
                                </select>
                             </div>
                             <div class="text-right">
                                <button type="submit" class="btn btn-sm btn-primary m-t-n-xs"><strong>Send message</strong></button>
                             </div>
                          </form>
                       </div>
                    </div>
                 </div>
              </div>
            </div>
         </div>         
      </div>
      <?php include_once '../layout/script.php'; ?>
      <script type="text/javascript">
        $('#data_5 .input-daterange').datepicker({
            keyboardNavigation: false,
            forceParse: false,
            autoclose: true
        });
      </script>
      <script>
         function tossterMsgAlert(msg='Welcome',title='') {
             toastr.options = {
                 closeButton: true,
                 //debug: false,
                 newestOnTop: false,
                 //progressBar: false,
                 positionClass: 'toast-top-center',
                 preventDuplicates: true,
                 //onclick: null,
                 //showDuration: 300,
                 //hideDuration: 1000,
                 timeOut: 2000,
                 //extendedTimeOut: 1000,
                 //showEasing: 'swing',
                 //hideEasing: 'linear',
                 //showMethod: 'fadeIn',
                 hideMethod: 'fadeOut'
             };
             toastr.warning(title,msg);
         }
      </script>
      <!-- Page-Level Scripts -->
      <script>
        $(document).ready(function(){
            $('.dataTables-example').DataTable({
                dom: '<"html5buttons"B>lTfgitp',
                columnDefs: [
                    { type: "num-fmt", symbols:"R$" , targets: 4 }
                ],
                buttons: [
                    { extend: 'copy'},
                    {extend: 'csv'},
                    /*{extend: 'excel', title: 'ExampleFile'},
                    {extend: 'pdf', title: 'ExampleFile'},*/
                    /*{extend: 'print',
                     customize: function (win){
                        $(win.document.body).addClass('white-bg');
                        $(win.document.body).css('font-size', '10px');
                        $(win.document.body).find('table')
                            .addClass('compact')
                            .css('font-size', 'inherit');
                        }
                    }*/
                ]    
            });
        });
      </script>
      <script>
        $(document).ready(function() {
            // Load comments initially
            loadComments();
            
            // Set interval to refresh comments periodically (every 5 seconds)
            setInterval(loadComments, 5000); // Changed from 30000 (30s) to 5000 (5s)
            
            // Handle form submission
            $('#comment-form').on('submit', function(e) {
                e.preventDefault();
                
                $.ajax({
                    url: 'ajax_save_comment.php',
                    type: 'POST',
                    data: $(this).serialize(),
                    dataType: 'json',
                    success: function(response) {
                        if(response.success) {
                            // Clear the message textarea
                            $('textarea[name="msg"]').val('');
                            // Reload comments
                            loadComments();
                        } else {
                            alert('Error: ' + response.message);
                        }
                    },
                    error: function(xhr, status, error) {
                        alert('An error occurred: ' + error);
                    }
                });
            });
            
            function loadComments() {
                $.ajax({
                    url: 'ajax_get_comments.php',
                    type: 'GET',
                    data: {
                        ticket_id: <?=$_GET['id']?>,
                        uid: <?=$_GET['uid']?>
                    },
                    dataType: 'html',
                    success: function(response) {
                        $('#comments-container').html(response);
                        // Scroll to bottom of comments
                        var container = $('.chat-activity-list');
                        container.scrollTop(container[0].scrollHeight);
                    },
                    error: function(xhr, status, error) {
                        console.log('Error loading comments: ' + error);
                    }
                });
            }
        });
      </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