Example #1
0
<?php

require "controller.php";
staff_logs($TEXT['Staff offline']);
session_unset();
session_destroy();
header('Location: ../index.php');
Example #2
0
     break;
 case 'changedepartment':
     $api->update_ticket_deparment($_GET[ticketid], $_GET[dep]);
     $listof = ", " . $STAFF[departments] . ",";
     $search = ", " . $_GET[dep] . ",";
     if (strpos($listof, $search) === false) {
         $reg = $api->get_ticket($_GET[ticketid]);
         /*The ticket won't belong to any staffuser*/
         $api->derivate($_GET[ticketid]);
         /*The staffuser has one ticket less*/
         if ($reg[staffuser] == $STAFF[user]) {
             $STAFF[tickets]--;
         }
     }
     $api->logs($TEXT['Ticket property updated'] . ' #' . $_GET[ticketid]);
     staff_logs($TEXT['Ticket property updated'] . ' #' . $_GET[ticketid]);
     header("Location: index.php?mode=ViewTickets&submode=Ticket%20Viewer&id={$_GET['ticketid']}");
     break;
 case 'staffprop':
     $prop = $api->get_property('name', $_GET[name]);
     if (!$prop[edit]) {
         header('Location: index.php');
         exit;
     }
     $api->edit_staff_prop($_GET[name], $_GET[pvalue], $STAFF[id], false);
     header('Location: index.php');
     break;
 case 'editfilter':
     $prop = $api->get_property('name', $_GET[name]);
     if ($prop[input] == "checkbox") {
         $api->edit_filter($_GET[name], $STAFF[id], $_POST[def]);
Example #3
0
/* Create Staff user array */
$STAFF = $api->get_staff($_SESSION[STAFFID]);
/* Language */
include "../../lang/" . $DATA['lang'] . ".php";
/* START: Get BTEXT from MySQL*/
if ($_DATA['lang'] != 'en') {
    $txt = $api->get_text($_DATA['lang']);
    $txten = $api->get_text('en');
    $TEXT = array_merge($txten, $txt, $TEXT);
} else {
    $txten = $api->get_text('en');
    $TEXT = array_merge($txten, $TEXT);
}
/* END: Get BTEXT from MySQL*/
if ($_SESSION[CVERIFY] == false) {
    staff_logs($TEXT['Staff logged']);
    $_SESSION[CVERIFY] = true;
}
function staff_logs($thing)
{
    global $STAFF;
    global $api;
    $query = $api->staff_logs($STAFF[user], $thing);
}
function download($result, $filename)
{
    header("Content-Type: text/plain");
    header('Content-Disposition: attachment; filename="' . $filename . '"');
    header("Content-Length: " . strlen($result));
    echo $result;
    exit;