예제 #1
0
             $w = 0;
         } else {
             $sof = '6 Months';
             $w = 6;
         }
     } else {
         $sof = 'None';
         $w = 0;
     }
     $content .= "<tr>\n\t\t\t\t\t\t\t\t<td>Ticket #" . $b[1] . "</td>\n\t\t\t\t\t\t\t    <td style='width:60px;'><center>{$phy}</center></td>\n\t\t\t\t\t\t\t\t<td style='width:60px;'><center>{$sof}</center></td>\n\t\t\t\t\t\t\t\t<td>\$" . $split[1] . "</td>\n\t\t\t\t\t\t\t</tr>";
     $nontaxable = $nontaxable + $split[1];
     MYSQL::QUERY("INSERT INTO core_tickets_processed (t_id, t_customer, t_manufacturer, t_model, t_imei, t_password, t_phy, t_liq, t_sof, t_created_by, t_store, t_session, t_created, t_estimate_created, t_estimate_price, t_estimate_items, t_estimate_time, t_repair_created, t_repair_price, t_repair_items, t_repair_time) SELECT * FROM core_tickets_checkout WHERE t_id = ? LIMIT 1", array($b[1]));
     MYSQL::QUERY("UPDATE core_tickets_processed SET t_warranty=?, t_checkout_created=?, t_checkout_price=?, t_checkout_time=? WHERE t_id = ? LIMIT 1", array($w, Date("Y-m-d H:i:s"), $split[1], $time, $b[1]));
     MYSQL::QUERY("UPDATE core_tickets_status SET t_status = ? WHERE t_id = ? LIMIT 1", array(4, $b[1]));
     MYSQL::QUERY("DELETE FROM core_tickets_checkout WHERE t_id = ? LIMIT 1", array($b[1]));
     USER::NOTE($b[1], "Processed This Ticket [ " . $split[1] . " ] [ {$time} ]", 2);
 } else {
     if ($b[0] == "ac") {
         $taxable = $taxable + $split[1];
         $ITEM = MYSQL::QUERY('SELECT * FROM device_accessories WHERE a_id = ? LIMIT 1', array($b[1]));
         $content .= "<tr>\n\t\t\t\t\t\t\t\t<td>" . $ITEM['a_name'] . "</td>\n\t\t\t\t\t\t\t    <td style='width:60px;'></td>\n\t\t\t\t\t\t\t\t<td style='width:60px;'></td>\n\t\t\t\t\t\t\t\t<td>\$" . $split[1] . "</td>\n\t\t\t\t\t\t\t</tr>";
     } else {
         if ($b[0] == "de") {
             $taxable = $taxable + $split[1];
             $DEVICE = MYSQL::QUERY('SELECT * FROM core_refurb_devices WHERE d_id = ? LIMIT 1', array($b[1]));
             $MODEL = MYSQL::QUERY('SELECT m_name FROM device_models WHERE m_id = ? LIMIT 1', array($DEVICE['d_model_id']));
             $content .= "<tr>\n\t\t\t\t\t\t\t    <td>" . $MODEL['m_name'] . "</td>\n\t\t\t\t\t\t\t\t<td style='width:60px;'>6 Month</td>\n\t\t\t\t\t\t\t\t<td style='width:60px;'>None</td>\n\t\t\t\t\t\t\t\t<td>\$" . $split[1] . "</td>\n\t\t\t\t\t\t\t</tr>";
             MYSQL::QUERY("UPDATE core_refurb_devices SET d_sold = ? WHERE d_id = ? LIMIT 1", array($T['c_id'] . "|" . $split[1], $b[1]));
         }
     }
 }
예제 #2
0
파일: reopen.php 프로젝트: Nvenom/Cellwiz
switch ($TICKET['t_status']) {
    case 97:
        $TBL = 'core_tickets_estimate';
        $ST = 1;
        break;
    case 98:
        $TBL = 'core_tickets_repair';
        $ST = 2;
        break;
    case 99:
        $TBL = 'core_tickets_checkout';
        $ST = 3;
        break;
}
$ROWS = MYSQL::QUERY("SHOW COLUMNS FROM {$TBL}");
$QUERY = "INSERT INTO {$TBL} SELECT ";
$I = 0;
foreach ($ROWS as $R) {
    if ($I == 0) {
        $QUERY .= $R['Field'];
    } else {
        $QUERY .= "," . $R['Field'];
    }
    $I++;
}
$QUERY .= " FROM core_tickets_walkout WHERE t_id = ? LIMIT 1";
MYSQL::QUERY($QUERY, array($TID));
MYSQL::QUERY("DELETE FROM core_tickets_walkout WHERE t_id = ? LIMIT 1", array($TID));
MYSQL::QUERY("UPDATE core_tickets_status SET t_status = ? WHERE t_id = ? LIMIT 1", array($ST, $TID));
USER::NOTE($TID, "Ticket Re-Opened", 2);
예제 #3
0
require "../../../frame/engine.php";
ENGINE::START();
$user = USER::VERIFY(0, TRUE);
$tid = $_GET['tid'];
$note = $_GET['note'];
$Ticket = MYSQL::QUERY("SELECT * FROM core_tickets_status WHERE t_id = ? LIMIT 1", array($tid));
if ($Ticket['t_status'] == 1) {
    MYSQL::QUERY("INSERT INTO core_tickets_walkout (t_id, t_customer, t_manufacturer, t_model, t_imei, t_password, t_phy, t_liq, t_sof, t_created_by, t_store, t_session, t_created) SELECT * FROM core_tickets_estimate WHERE t_id = ? LIMIT 1", array($tid));
    MYSQL::QUERY("UPDATE core_tickets_status SET t_status = 97 WHERE t_id = ? LIMIT 1", array($tid));
    MYSQL::QUERY("DELETE FROM core_tickets_estimate WHERE t_id = ? LIMIT 1", array($tid));
} else {
    if ($Ticket['t_status'] == 2) {
        MYSQL::QUERY("INSERT INTO core_tickets_walkout (t_id, t_customer, t_manufacturer, t_model, t_imei, t_password, t_phy, t_liq, t_sof, t_created_by, t_store, t_session, t_created, t_estimate_created, t_estimate_price, t_estimate_items, t_estimate_time) SELECT * FROM core_tickets_repair WHERE t_id = ? LIMIT 1", array($tid));
        MYSQL::QUERY("UPDATE core_tickets_status SET t_status = 98 WHERE t_id = ? LIMIT 1", array($tid));
        MYSQL::QUERY("DELETE FROM core_tickets_repair WHERE t_id = ? LIMIT 1", array($tid));
    } else {
        if ($Ticket['t_status'] == 3) {
            MYSQL::QUERY("INSERT INTO core_tickets_walkout (t_id, t_customer, t_manufacturer, t_model, t_imei, t_password, t_phy, t_liq, t_sof, t_created_by, t_store, t_session, t_created, t_estimate_created, t_estimate_price, t_estimate_items, t_estimate_time, t_repair_created, t_repair_price, t_repair_items, t_repair_time) SELECT * FROM core_tickets_checkout WHERE t_id = ? LIMIT 1", array($tid));
            MYSQL::QUERY("UPDATE core_tickets_status SET t_status = 99 WHERE t_id = ? LIMIT 1", array($tid));
            MYSQL::QUERY("DELETE FROM core_tickets_checkout WHERE t_id = ? LIMIT 1", array($tid));
        }
    }
}
if (!$note == '') {
    USER::NOTE($tid, "Walkedout Ticket [{$note}]", 2);
} else {
    USER::NOTE($tid, "Walked this ticket out", 2);
}
TRACKING::WALKOUTS($user);
echo "Ticket Walked Out";
예제 #4
0
<?php

require "../../../frame/engine.php";
ENGINE::START();
$user = USER::VERIFY(0, TRUE);
$price = $_POST['price'];
unset($_POST['price']);
$time = $_POST['time'];
unset($_POST['time']);
$items = $_POST['items'];
unset($_POST['items']);
$ticket = $_POST['ticket'];
unset($_POST['ticket']);
$Main = MYSQL::QUERY("SELECT * FROM core_tickets_status WHERE t_id = ? LIMIT 1", array($ticket));
if ($Main['t_status'] == 1) {
    $status = array(2);
    foreach ($_POST as $k => $v) {
        $key1 = "t_" . str_replace($ticket, "", $k);
        $key2 = explode(".", $Main[$key1]);
        $key3 = $v . "." . $key2[1];
        array_push($status, $key3);
    }
    array_push($status, $ticket);
    MYSQL::QUERY("INSERT INTO core_tickets_repair (t_id, t_customer, t_manufacturer, t_model, t_imei, t_password, t_phy, t_liq, t_sof, t_created_by, t_store, t_session, t_created) SELECT * FROM core_tickets_estimate WHERE t_id = ? LIMIT 1", array($ticket));
    MYSQL::QUERY("UPDATE core_tickets_repair SET t_estimate_created = ?, t_estimate_price = ?, t_estimate_items = ?, t_estimate_time = ? WHERE t_id = ? LIMIT 1", array(Date("Y-m-d H:i:s"), $price, $items, $time, $ticket));
    MYSQL::QUERY("UPDATE core_tickets_status SET t_status = ?,t_simcard = ?,t_sdcard = ?,t_case = ?,t_charger = ?,t_power = ?,t_buttons = ?,t_inaudio = ?,t_exaudio = ?,t_touch = ?,t_housing = ?,t_charging = ?,t_service = ? WHERE t_id = ? LIMIT 1", $status);
    MYSQL::QUERY("DELETE FROM core_tickets_estimate WHERE t_id = ? LIMIT 1", array($ticket));
    USER::NOTE($ticket, "Ticket Estimated [ {$price} ] [ {$time} ]", 2);
    USER::STAT('estimates');
    USER::MEDAL('bronze', 1);
}
예제 #5
0
파일: tpanel.php 프로젝트: Nvenom/Cellwiz
<?php

require "../../frame/engine.php";
ENGINE::START();
$USER = USER::VERIFY(0, TRUE);
$CODE = $_GET['tid'];
$TICKET = ENGINE::TICKETINFO($CODE);
if (!isset($_GET['from'])) {
    USER::NOTE($_GET['tid'], "(" . $USER['username'] . ") Loaded this Ticket", 1, 4);
}
$CO = "DISABLED";
$RT = "DISABLED";
$ET = "DISABLED";
$AE = "DISABLED";
$WT = 'OnClick="Walkout(' . "'" . $CODE . "'" . ')"';
$LC = "DISABLED";
$WTA = 'Walkout Ticket';
$BUTTONS = array('B1' => 'Load Customer', 'B1_F' => 'onClick="LoadCustomer(' . "'" . $TICKET['CUST']['c_id'] . "'" . ')"', 'B2' => 'Load Corporation', 'B2_F' => 'DISABLED', 'B3' => 'Walkout Ticket', 'B3_F' => 'OnClick="Walkout(' . "'" . $CODE . "'" . ')"', 'B4' => 'Estimate Ticket', 'B4_F' => 'onClick="Estimate(' . "'" . $CODE . "'" . ', ' . $TICKET['INFO']['t_model'] . ', ' . $TICKET['MODE']['m_type'] . ', ' . "'" . $TICKET['MODE']['m_date'] . "'" . ')"', 'B5' => 'Print Check-In', 'B5_F' => 'onClick="PrintCheckIn(' . "'" . $CODE . "'" . ')"', 'B6' => 'Load Device info', 'B6_F' => 'DISABLED', 'B7' => 'Change Device', 'B7_F' => 'onClick="ChangeDevice(' . "'" . $CODE . "'" . ')"');
switch ($TICKET['STATUS']['t_status']) {
    case 1:
        $BUTTONS['B4'] = 'Estimate Ticket';
        $BUTTONS['B4_F'] = 'onClick="Estimate(' . "'" . $CODE . "'" . ', ' . $TICKET['INFO']['t_model'] . ', ' . $TICKET['MODE']['m_type'] . ', ' . "'" . $TICKET['MODE']['m_date'] . "'" . ')"';
        break;
    case 2:
        if ($TICKET['STATUS']['t_reserved'] == 0) {
            $BUTTONS['B4'] = 'Accept Estimate';
            $BUTTONS['B4_F'] = 'onClick="AcceptEstimate(' . "'" . $CODE . "'" . ', ' . $TICKET['INFO']['t_model'] . ', ' . $TICKET['MODE']['m_type'] . ', ' . "'" . $TICKET['MODE']['m_date'] . "'" . ')"';
        } else {
            if ($TICKET['STATUS']['t_reserved'] == 1) {
                $BUTTONS['B4'] = 'Repair Device';
                $BUTTONS['B4_F'] = 'onClick="Repair(' . "'" . $CODE . "'" . ', ' . $TICKET['INFO']['t_model'] . ', ' . $TICKET['MODE']['m_type'] . ', ' . "'" . $TICKET['MODE']['m_date'] . "'" . ')"';
예제 #6
0
    $v = explode("-", $v);
    if ($v[0] == "it") {
        MYSQL::QUERY("UPDATE inventory_stock SET quantity = quantity + 1 WHERE store = ? AND item = ? LIMIT 1", array($user['store'], $v[1]));
    }
}
foreach ($added as $k => $v) {
    $v = explode("-", $v);
    if ($v[0] == "it") {
        MYSQL::QUERY("UPDATE inventory_stock SET quantity = quantity - 1 WHERE store = ? AND item = ? LIMIT 1", array($user['store'], $v[1]));
    }
}
$status = array(3);
foreach ($_POST as $k => $v) {
    $key1 = "t_" . str_replace($ticket, "", $k);
    $key2 = explode(".", $Main[$key1]);
    $key3 = $key2[0] . "." . $v;
    array_push($status, $key3);
}
$reward = round($price / 50);
array_push($status, $ticket);
MYSQL::QUERY("INSERT INTO core_tickets_checkout (t_id, t_customer, t_manufacturer, t_model, t_imei, t_password, t_phy, t_liq, t_sof, t_created_by, t_store, t_session, t_created, t_estimate_created, t_estimate_price, t_estimate_items, t_estimate_time) SELECT * FROM core_tickets_repair WHERE t_id = ? LIMIT 1", array($ticket));
MYSQL::QUERY("UPDATE core_tickets_checkout SET t_repair_created = ?, t_repair_price = ?, t_repair_items = ?, t_repair_time = ? WHERE t_id = ?", array(Date("Y-m-d H:i:s"), $price, $items, $time, $ticket));
MYSQL::QUERY("UPDATE core_tickets_status SET t_status = ?,t_order = 0,t_simcard = ?,t_sdcard = ?,t_case = ?,t_charger = ?,t_power = ?,t_buttons = ?,t_inaudio = ?,t_exaudio = ?,t_touch = ?,t_housing = ?,t_charging = ?,t_service = ? WHERE t_id = ? LIMIT 1", $status);
MYSQL::QUERY("DELETE FROM core_tickets_repair WHERE t_id = ? LIMIT 1", array($ticket));
MYSQL::QUERY('INSERT INTO core_tickets_note (t_id, t_note, t_note_by, t_date) VALUES (?, ?, ?, ?)', array($ticket, "Device Repaired [{$time}]", $user['user_id'], Date("Y-m-d H:i:s")));
TRACKING::REPAIRS($itemsnew, $user);
USER::NOTE($ticket, "Device Repaired [ {$price} ] [ {$time} ]", 2);
USER::STAT('repairs');
USER::MEDAL('bronze', $reward);
?>