Ejemplo n.º 1
0
 /**
  * Called immediately after creating a page.
  * @param ENVIRONMENT $env
  * @param PAGE $page
  * @access private
  */
 protected function _init_page($env, $page)
 {
     parent::_init_page($env, $page);
     $this->_init_theme($page);
     /* Load the user's preferred theme from local storage (using a COOKIE).
      * Leave this out in order to force the 'default theme'.
      */
     if ($this->use_local_theme) {
         $page->load_theme();
     }
 }
Ejemplo n.º 2
0
<?php

require "../../../frame/engine.php";
ENGINE::START();
$user = USER::VERIFY(0, TRUE);
$CID = $_GET['cid'];
$CARD = $_GET['card'];
$TID = $_GET['tid'];
$CUSTOMER = MYSQL::QUERY('SELECT * FROM core_customers WHERE c_id = ? LIMIT 1', array($CID));
if (empty($CUSTOMER['c_card']) || $CUSTOMER['c_card'] == $CARD) {
    if (empty($CUSTOMER['c_card'])) {
        $CS = MYSQL::QUERY('SELECT c_id FROM core_customers WHERE c_card = ? LIMIT 1', array($CARD));
        if (empty($CS)) {
            echo "This customer has no card and this card is not in use. Please Enter their Primary email.<br/><br/><input type='email' placeholder='Customers Email Address..' style='width:280px;'><br/>\n\t\t\t<button style='cursor:pointer;width:287px;' onClick='AttachCard(\$(this)," . '"' . $CID . '"' . "," . '"' . $CARD . '"' . "," . '"' . $TID . '"' . "," . '"' . $user['store_info']['s_taxrate'] . '"' . ")'>Attach Card</button>";
        } else {
            echo "This card belongs to someone else...";
        }
    } else {
        echo "Valid Card. 5% Off Applied.\n        <script>AddDiscount('5','Membership Card','.ticket" . $TID . "','" . $user['store_info']['s_taxrate'] . "','" . $TID . "');</script>";
    }
} else {
    echo "This Customer has a different Card..";
}
Ejemplo n.º 3
0
<?php

require 'frame/engine.php';
ENGINE::START("HASH");
$KEY = $_GET['K'];
$ACT = $_GET['A'];
$CUS = $_GET['C'];
$VER = $_GET['V'];
Ejemplo n.º 4
0
$totalcost = $_POST['totalcost'];
$totaltax = $_POST['totaltax'];
$tid = $_POST['ticket'];
$time = $_POST['checkouttime'];
if ($pm2cost <= 0.0 || $pm2cost == '') {
    $pm2 = 'None';
}
if (!$pm2 == 'None') {
    $paymentmethod = $pm1 . ' (' . $pm1cost . '), ' . $pm2 . ' (' . $pm2cost . ')';
} else {
    $paymentmethod = $pm1;
}
$items = $_POST['items'];
$itemscut = explode("|", $items);
$ses = FORMAT::SES(10);
$T = ENGINE::TICKET($tid, 3);
$return = MYSQL::QUERY("INSERT INTO core_checkout_sessions (customer, items, pm_1, pm_1_cost, pm_2, pm_2_cost, ses, s_id, d_date) VALUES (?,?,?,?,?,?,?,?,?)", array($T['t_customer'], $items, $pm1, $pm1cost, $pm2, $pm2cost, $ses, $user['store'], Date("Y-m-d H:i:s")));
echo "\n        <style>\n            .escca td{\n                border-top: 0px;\n                border-right: 0px;\n            }\n        </style>\n    ";
$content = "\n        <center style='width:724px;'>\n            <table border='1' cellspacing='0' id='Header-Table' class='escca' style='margin-top:10px;border: 1px solid black;width: 98% !important;border-left: 0px;border-bottom:0px none !important;'>\n\t            <thead>\n\t\t            <tr>\n\t\t\t            <td style='width:150px;height:150px;border-right:0px none;'><img src='https://my-cpr.com/cprlogo.jpg' border='0'></td>\n\t\t\t\t        <td style='border-left:0px none;border-right:0px none;text-align:center;'>\n\t\t\t\t            <div style='font-size:28px;'>\n\t\t\t\t\t            <label style='font-size:32px;'><b>" . $user['store_info']['s_header'] . "</b></label><br/>\n\t\t\t\t\t\t        <label style='font-size:24px;'>Contact our " . $user['store_info']['s_name'] . " Location at</label><br/>\n\t\t\t\t\t\t        <label>" . FORMAT::PHONE($user['store_info']['s_phone']) . "</label><br/>\n\t\t\t\t\t\t        <label><b>" . $user['store_info']['s_website'] . "</b></label>\n\t\t\t\t\t        </div>\n\t\t\t\t        </td>\n\t\t\t        </tr>\n\t\t        </thead>\n\t        </table>\n\t        <table border='1' cellspacing='0' id='Customer-Table' class='escca' style='border: 1px solid black;width: 98% !important;border-left: 0px;border-bottom:0px none !important;border-top:0px none;'>\n\t            <tbody>\n\t\t            <tr>\n\t\t\t            <td><b>Name</b></td>\n\t\t\t\t        <td><b>Phone Number</b></td>\n\t\t\t\t        <td><b>Date (M/D/Y)</b></td>\n\t\t\t\t        <td><b>Time</b></td>\n\t\t\t        </tr>\n\t\t\t        <tr style='font-family:Courier, monospace;'>\n\t\t\t            <td>" . $T['c_name'] . "</td>\n\t\t\t\t        <td>" . FORMAT::PHONE($T['c_phone']) . "</td>\n\t\t\t\t        <td>" . Date('m/d/y') . "</td>\n\t\t\t\t        <td>" . Date('h:i A') . "</td>\n\t\t\t        </tr>\n\t\t        </tbody>\n\t        </table>\n            <table border='1' cellspacing='0' id='Device-Table' class='escca' style='border: 1px solid black;width: 98% !important;border-left: 0px;border-bottom:0px none !important;border-top:0px none;'>\n\t            <thead>\n\t\t            <tr>\n\t\t\t            <td><b>Service/Item<b/></td>\n\t\t\t\t\t    <td style='width:60px'><center><b>Physical</b></center></td>\n\t\t\t\t        <td style='width:60px'><center><b>Software</b></center></td>\n\t\t\t\t\t\t<td><b>Cost</b></td>\n\t\t\t        </tr>\n\t\t        </thead>\n\t\t        <tbody style='font-family:Courier, monospace;'>\n\t\t\t\t\t";
$nontaxable = '';
$taxable = '';
$itemscheckedout = 0;
foreach ($itemscut as $item) {
    $itemscheckedout++;
    $split = explode("/", $item);
    $b = explode("-", $split[0]);
    if ($b[0] == "ti") {
        $NT = MYSQL::QUERY("SELECT t_phy, t_liq, t_sof FROM core_tickets_checkout WHERE t_id = ? LIMIT 1;", array($b[1]));
        if ($NT['t_liq'] == 1) {
            $warr = false;
        } else {
Ejemplo n.º 5
0
<?php

require "../../../frame/engine.php";
ENGINE::START();
$USER = USER::VERIFY(0, TRUE);
$TICKET = ENGINE::TICKETINFO($_GET['tid']);
$content = "\n<style>\n.escca td{\n    border-top: 0px;\n    border-right: 0px;\n}\n</style>\n<center style='width:724px;'>\n    <table border='1' cellspacing='0' id='Header-Table' class='escca' style='margin-top:10px;border: 1px solid black;width: 98% !important;border-left: 0px;border-bottom:0px none !important;'>\n\t    <thead>\n\t\t    <tr>\n\t\t\t    <td style='width:150px;height:150px;border-right:0px none;'><img src='https://my-cpr.com/cprlogo.jpg' border='0'></td>\n\t\t\t\t<td style='border-left:0px none;border-right:0px none;text-align:center;'>\n\t\t\t\t    <div style='font-size:28px;'>\n\t\t\t\t\t    <label style='font-size:32px;'><b>" . $USER['store_info']['s_header'] . "</b></label><br/>\n\t\t\t\t\t\t<label style='font-size:24px;'>Contact our " . $USER['store_info']['s_name'] . " Location at</label><br/>\n\t\t\t\t\t\t<label>" . FORMAT::PHONE($USER['store_info']['s_phone']) . "</label><br/>\n\t\t\t\t\t\t<label><b>" . $USER['store_info']['s_website'] . "</b></label>\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</thead>\n\t</table>\n\t<table border='1' cellspacing='0' id='Customer-Table' class='escca' style='border: 1px solid black;width: 98% !important;border-left: 0px;border-bottom:0px none !important;border-top:0px none;'>\n\t    <tbody>\n\t\t    <tr>\n\t\t\t    <td><b>Name</b></td>\n\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t<td><b>Date (M/D/Y)</b></td>\n\t\t\t\t<td><b>Time</b></td>\n\t\t\t</tr>\n\t\t\t<tr style='font-family:Courier, monospace;'>\n\t\t\t    <td>" . $TICKET['CUST']['c_name'] . "</td>\n\t\t\t\t<td>" . $TICKET['CUST']['c_contact_info'] . "</td>\n\t\t\t\t<td>" . Date('m/d/y') . "</td>\n\t\t\t\t<td>" . Date('h:i A') . "</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n    <table border='1' cellspacing='0' id='Device-Table' class='escca' style='border: 1px solid black;width: 98% !important;border-left: 0px;border-bottom:0px none !important;border-top:0px none;'>\n\t    <thead>\n\t\t    <tr>\n\t\t\t    <td><b>Device</b></td>\n\t\t\t    <td><b>Ticket</b></td>\n\t\t\t\t<td><b>IMEI</b></td>\n\t\t\t\t<td style='width:60px'><center><b>Physical</b></center></td>\n\t\t\t\t<td style='width:60px'><center><b>Liquid</b></center></td>\n\t\t\t\t<td style='width:60px'><center><b>Software</b></center></td>\n\t\t\t\t<td style='width:60px'><center><b>Estimate</b></center></td>\n\t\t\t\t<td style='width:60px'><center><b>Est. Init.</b></center></td>\n\t\t\t\t<td style='width:60px'><center><b>QC. Init.</b></center></td>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody style='font-family:Courier, monospace;'>\n";
$Main = MYSQL::QUERY("SELECT * FROM core_tickets_estimate WHERE t_session=? ORDER BY t_id ASC", array($TICKET['INFO']['t_session']));
$amount = MYSQL::QUERY("SELECT COUNT(t_id) FROM core_tickets_estimate WHERE t_session=? ORDER BY t_id ASC", array($TICKET['INFO']['t_session']));
$i = 1;
$nt = '';
while ($i <= $amount[0]['COUNT(t_id)']) {
    $a = $i - 1;
    if ($Main[$a]['t_liq'] == 1) {
        $liq = '&#x2713;';
    } else {
        $liq = '&#x2717;';
    }
    if ($Main[$a]['t_phy'] == 1) {
        $phy = '&#x2713;';
    } else {
        $phy = '&#x2717;';
    }
    if ($Main[$a]['t_sof'] == 1) {
        $sof = '&#x2713;';
    } else {
        $sof = '&#x2717;';
    }
    $params = array($Main[$a]['t_model']);
    $mod = MYSQL::QUERY("SELECT m_name FROM device_models WHERE m_id=? LIMIT 1", $params);
    $content .= "\t\t\n\t\t    <tr>\n\t\t\t    <td rowspan='2'>{$i}</td>\n\t\t\t\t<td style='position:relative;'>\n\t\t\t\t    <center>\n\t\t\t\t        <img src='https://my-cpr.com/barcode.php?encode=I25&height=20&scale=1&color=000000&bgcolor=FFFFFF&type=png&file=&bdata=" . $Main[$a]['t_id'] . "' border='0' />\n\t\t\t            <font style='position: absolute;bottom: 0px;left: 18px;'>" . $Main[$a]['t_id'] . "</font>\n\t\t\t\t\t</center>\n\t\t\t\t</td>\n\t\t\t\t<td>" . substr($Main[$a]['t_imei'], -4) . "</td>\n\t\t\t\t<td style='width:60px;font-size:23px'><center>{$phy}</center></td>\n\t\t\t\t<td style='width:60px;font-size:23px'><center>{$liq}</center></td>\n\t\t\t\t<td style='width:60px;font-size:23px'><center>{$sof}</center></td>\n\t\t\t\t<td style='width:60px;position:relative;'><font style='position:absolute;bottom:0px;right:2px;font-size:6px;'>A{$i}</font></td>\n\t\t\t\t<td style='width:60px;position:relative;'><font style='position:absolute;bottom:0px;right:2px;font-size:6px;'>B{$i}</font></td>\n\t\t\t\t<td style='width:60px;position:relative;'><font style='position:absolute;bottom:0px;right:2px;font-size:6px;'>C{$i}</font></td>\n\t\t\t</tr>\n\t\t    <tr>\n\t\t\t    <td colspan='9'><b>Device:</b> " . $mod['m_name'] . "</td>\n\t\t\t</tr>";
Ejemplo n.º 6
0
<?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'] . "'" . ')"';
Ejemplo n.º 7
0
<?php

require "../../../frame/engine.php";
ENGINE::START();
$user = USER::VERIFY(0, TRUE);
$tid = $_GET['ticket'];
$mid = $_GET['mid'];
$part = explode("-", $_GET['part']);
$release = explode(" ", $_GET['release']);
$type = $_GET['type'];
$Model = MYSQL::QUERY("SELECT * FROM device_models WHERE m_id = ? LIMIT 1", array($mid));
if ($part[0] == "it") {
    ENGINE::ITEM($tid, $user, $Model, $part[1], $type, $release);
} else {
    ENGINE::SERVICE($tid, $user, $Model, $part[1], $type, $release);
}
Ejemplo n.º 8
0
<?php

require "../../../frame/engine.php";
ENGINE::START();
$user = USER::VERIFY(0, TRUE);
$tid = $_GET['ticket'];
$mid = $_GET['model'];
$type = $_GET['type'];
$release = explode(" ", $_GET['release']);
$T = ENGINE::TICKETINFO($tid);
$repair_price = $T['INFO']['t_repair_price'];
$arr = FORMAT::CHECKLIST(array($T['STATUS']['t_simcard'], $T['STATUS']['t_sdcard'], $T['STATUS']['t_case'], $T['STATUS']['t_charger'], $T['STATUS']['t_power'], $T['STATUS']['t_buttons'], $T['STATUS']['t_inaudio'], $T['STATUS']['t_exaudio'], $T['STATUS']['t_touch'], $T['STATUS']['t_housing'], $T['STATUS']['t_charging'], $T['STATUS']['t_service']));
$title = "\n\t\t<b>Device:</b> " . $T['MODE']['m_name'] . "<br/>\n\t\t<b>Estimate:</b> \$" . $T['INFO']['t_estimate_price'] . "<br/>\n\t\t<b>Repair Time:</b> " . $T['INFO']['t_repair_time'] . "<br/>\n\t\t" . $arr . "\n\t";
$PHY = $T['INFO']['t_phy'] == 1 ? "Yes" : "No";
$LIQ = $T['INFO']['t_liq'] == 1 ? "Yes" : "No";
$SOF = $T['INFO']['t_sof'] == 1 ? "Yes" : "No";
$MANU = $T['MANU']['m_name'];
$MODEL = str_replace($MANU . " ", "", $T['MODE']['m_name']);
$PHONE = FORMAT::PHONE($T['CUST']['c_phone']);
$CD = date("M d, Y h:i A", strtotime($T['INFO']['t_created']));
$ED = date("M d, Y h:i A", strtotime($T['INFO']['t_estimate_created']));
$RD = date("M d, Y h:i A", strtotime($T['INFO']['t_repair_created']));
?>
    <form style="width:492px;height:170px;" id="checkoutf<?php 
echo $tid;
?>
">
	    <div style="width:52%;height:157px;float:left;overflow-y:scroll;">
            <?php 
echo <<<STR
                    <div style="width:100%;border-bottom: 1px solid #ACB1B7;" class="aname"><center>CUSTOMER</center></div><br/>
Ejemplo n.º 9
0
	</form>
    <div style="width:492px;height:215px;">
        <div class="txt_dsb" style="width:100%;height:180px;margin:0px !important;" id="estimator">
            <h4 class="ui-widget-header" style="margin:0px;border: 0px;border-top-right-radius: 3px;border-top-left-radius: 3px;">Repair parts used</h4>
            <div id="estimation" style="padding:10px;height:113px;">
                <?php 
$items = explode("|", $ticket['t_estimate_items']);
foreach ($items as $item) {
    if (!empty($item)) {
        $partid = explode("-", $item);
        if ($partid[0] == "it") {
            $partid = $partid[1];
            ENGINE::ITEM($tid, $user, $Model, $partid, $type, $release);
        } else {
            $serviceid = $partid[1];
            ENGINE::SERVICE($tid, $user, $Model, $serviceid, $type, $release);
        }
    }
}
?>
            </div>
			<div id="total" class="ui-widget-header" style="border:0px;border-top:1px solid #ACB1B7;padding-right:10px;height:24px;">
			    <div class="bname">TOTAL: $<font class="tc"><?php 
echo $ticket['t_estimate_price'];
?>
</font></div>
			</div>
        </div>
	    <button type="button" class="continue" onClick="PassRepair('<?php 
echo $tid;
?>