示例#1
0
         $corps = "<p>Bonjour,<br />vous avez re&ccedil;u une r&eacute;ponse &agrave; votre ticket de support \"<b>{$sujet}</b>\" de la part de {$auteur}.<br /><br />Vous pouvez consulter la r&eacute;ponse &agrave; l'adresse : <a href=\"" . $url_site["value"] . "index.php?file=Support&amp;op=view&amp;id={$id}\">" . $url_site["value"] . "index.php?file=Support&amp;op=view&amp;id={$id}</p>";
         $subjet = $nuked['name'] . " - Notification de r&eacute;ponse au ticket : " . $sujet;
         $corp = $corps . "\r\n\r\n\r\n" . $nuked['name'] . " - " . $nuked['slogan'];
         $from = "From: " . $nuked["name"] . " - Notifications  <" . $nuked['mail'] . ">\r\nReply-To: " . $nuked['mail'] . "\r\n";
         $from .= "Content-Type: text/html\r\n\r\n";
         $corp = secu_html(html_entity_decode($corp));
         mail($mail, $subjet, $corp, $from);
         echo "<br /><br /><div style=\"text-align: center;\">" . _SENDCMAIL . "</div><br /><br />";
     } else {
         echo "<br /><br /><div style=\"text-align: center;\">" . _SENDFMAIL . "</div><br /><br />";
     }
     redirect("index.php?file=Support&amp;page=admin", 3);
 }
 switch ($_REQUEST['op']) {
     case "view":
         viewThread($_REQUEST['id']);
         break;
     case "index":
         if (isset($_REQUEST["tickets"]) and $_REQUEST["tickets"] == "close") {
             main(1);
         } else {
             main();
         }
         break;
     case "reply":
         reply($_REQUEST["id"], $_REQUEST["corps"]);
         break;
     case "close":
         close($_REQUEST["id"]);
         break;
     case "open":
示例#2
0
 {
     global $nuked;
     $sql = mysql_query("SELECT nom FROM " . mysql_real_escape_string($nuked["prefix"]) . "_support_cat WHERE id = '" . mysql_real_escape_string($catID) . "' ORDER BY id DESC LIMIT 0,1");
     $sql = mysql_fetch_assoc($sql);
     return $sql;
 }
 switch ($_REQUEST['op']) {
     case "index":
         if (isset($_REQUEST["tickets"]) and $_REQUEST["tickets"] == "close") {
             index(1);
         } else {
             index();
         }
         break;
     case "view":
         viewThread($_REQUEST["id"]);
         break;
     case "reply":
         reply($_REQUEST["id"], $_REQUEST["corps"]);
         break;
     case "close":
         close($_REQUEST["id"]);
         break;
     case "open":
         open($_REQUEST["id"]);
         break;
     case "post":
         if (isset($_POST['notify']) and $_POST['notify'] == 'on') {
             $notify = 1;
         } else {
             $notify = 0;
示例#3
0
$focusPostID = isset($_GET['postid']) ? $_GET['postid'] : null;
$postIDs;
$loggedUserDetails = null;
if (isset($_GET['threadid'])) {
    $threadID = $_GET['threadid'];
    $threadInfo = getThreadInfo($db, $_SESSION['id'], $threadID);
    echo "<title>" . $threadInfo[THREAD::TITLE] . "</title>";
} else {
    echo "No thread.";
    exit;
}
// If we navigate around the pages, it doesn't count as a view. If we come to a thread without the page set, it does count.
if (isset($_GET['page'])) {
    $page = $_GET['page'];
} else {
    viewThread($db, $threadID);
}
echo "</head><body>";
require "php/topbar.php";
if (isset($_SESSION['id']) && isset($_SESSION['token'])) {
    $loggedUserDetails = getPrivateUserDetails($db, $_SESSION['id'], $_SESSION['token']);
    //$_SESSION['token'] = $loggedUserDetails[SP::TOKEN];
    // Right now, we don't mind if the user's been logged out. This page doesn't require you to be logged in or anything.
    if ($loggedUserDetails[SP::ERROR] == ERR::OK) {
        $postsPerPage = $loggedUserDetails[USER::POSTS_PAGE];
    }
}
$postIDs = getThreadPosts($db, $_GET['threadid']);
$errorCode = $postIDs[SP::ERROR];
unset($postIDs[SP::ERROR]);
$numPosts = count($postIDs);