Example #1
0
<?php

//if(!isset($_SERVER['HTTP_REFERER'])){
//    header("location: ../../access_denied.php?data=You don't have direct access to this page");
//}
require_once 'db/query_detail_class.php';
$a = query_detail_class::getAllQuerys(0);
$b = query_detail_class::getAllQuerys(1);
echo "<table><tr><th>ID</th><th>Time Stamp</th><th>Name</th><th>Query</th><th colspan='1'>Manage Detail</th></tr>";
if (sizeof($a) != 0) {
    foreach ($a as $arr) {
        echo "<tr><td>{$arr->query_id}</td><td>{$arr->query_date}</td><td>{$arr->query_name}</td><td>{$arr->query_detail}</td><td><a href='query_give_reply.php?id={$arr->query_id}'>Give reply</a></td>";
    }
}
if (sizeof($b) != 0) {
    foreach ($b as $arr) {
        echo "<tr><td>{$arr->query_id}</td><td>{$arr->query_date}</td><td>{$arr->query_name}</td><td>{$arr->query_detail}</td><td><a href='query_view_reply.php?id={$arr->query_id}'>View reply</a></td>";
    }
}
echo "</table>";
Example #2
0
 <?php 
if (!isset($_SERVER['HTTP_REFERER'])) {
    header("location: ../../access_denied.php?data=You don't have direct access to this page");
}
require_once '../../db/query_detail_class.php';
require_once '../../db/site_log_class.php';
require_once '../../db/user_class.php';
session_start();
define('INCLUDE_CHECK', true);
if (isset($_POST['name'])) {
    $name = $_POST['name'];
} else {
    die('Name is required');
}
if (isset($_POST['email'])) {
    $email = $_POST['email'];
} else {
    die('email is required');
}
if (isset($_POST['query'])) {
    $query = $_POST['query'];
} else {
    die('query is required');
}
$a = new query_detail_class(NULL, NULL, $name, $email, $query, NULL, "0");
echo $a->insertQuery();
$l = new site_log(NULL, NULL, "visitor", $_SERVER['REMOTE_ADDR'], $name . " query added");
$l->insertlog();
Example #3
0
<?php

//if(!isset($_SERVER['HTTP_REFERER'])){
//    header("location: ../../access_denied.php?data=You don't have direct access to this page");
//}
require_once 'db/query_detail_class.php';
define('INCLUDE_CHECK', true);
if (!isset($_GET['id'])) {
    die("go to Query management page");
}
$id = $_GET['id'];
$de = query_detail_class::getQueryObject($id);
if ($de->query_status == "1") {
    die("Reply alredy sent");
}
?>
<form method="post" id="updateform" action="server/query-feedback/query_reply_server.php"> 
         <label for="queryID">Query ID<span style="color:red;">*</span>:</label>
     <input type="text" value="<?php 
echo $de->query_id;
?>
" id="queryID" class="text ui-widget-content ui-corner-all" name="queryID" required readonly="true" />
    <label for="time">Time/Date<span style="color:red;">*</span>:</label>
     <input type="text" value="<?php 
echo $de->query_date;
?>
" id="time" class="text ui-widget-content ui-corner-all" name="time" required readonly="true" />
      <label for="name">Name<span style="color:red;">*</span>:</label>
      <input type="text" name="name" value="<?php 
echo $de->query_name;
?>