Beispiel #1
0
}
$smarty->assign('part', $rs->fields['count']);
/* Lets Grab Technicians Names */
$q = "SELECT EMPLOYEE_LOGIN, EMPLOYEE_ID FROM " . PRFX . "TABLE_EMPLOYEE WHERE EMPLOYEE_STATUS=1";
if (!($rs = $db->execute($q))) {
    force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
    exit;
}
$tech = $rs->GetMenu2('assign_val', $login, $login_id);
$smarty->assign('tech', $tech);
if (!($single_work_order = display_single_open_workorder($db, $VAR['wo_id']))) {
    force_page('core', "error&menu=1&error_msg=The Work Order you requested was not found&type=error");
    exit;
}
$smarty->assign('single_workorder_array', $single_work_order);
$smarty->assign('work_order_notes', display_workorder_notes($db, $VAR['wo_id']));
$smarty->assign('order', display_parts($db, $VAR['wo_id']));
$smarty->assign('work_order_status', display_workorder_status($db, $VAR['wo_id']));
$smarty->assign('work_order_sched', get_work_order_schedule($db, $VAR['wo_id']));
$smarty->assign('resolution', display_resolution($db, $VAR['wo_id']));
if (isset($VAR['submit'])) {
    $sql = "DELETE FROM " . PRFX . "TABLE_WORK_ORDER WHERE WORK_ORDER_ID=" . $db->qstr($wo_id);
    if (!($result = $db->Execute($sql))) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
        exit;
    }
    //Write comment to log
    $month = date("M");
    $day = date("d");
    $year = date("Y");
    $time = date("H") . ":" . date("i") . ":" . date("s");
Beispiel #2
0
<?php

require_once "include.php";
if (!($single_work_order = display_single_open_workorder($db, $VAR['wo_id']))) {
    force_page('core', "error&menu=1&error_msg=The Work Order you Requested was not found&type=error");
    exit;
} else {
    /* get company Information */
    $q = "SELECT * FROM " . PRFX . "TABLE_COMPANY";
    $rs = $db->execute($q);
    $company = $rs->GetArray();
    /* Work order notes */
    $work_order_notes = display_workorder_notes($db, $VAR['wo_id']);
    /* work order Status */
    $work_order_status = display_workorder_status($db, $VAR['wo_id']);
    /* work order schedule */
    $work_order_sched = get_work_order_schedule($db, $VAR['wo_id']);
    /* work order resolution */
    $work_order_res = display_resolution($db, $VAR['wo_id']);
}
/* get printing options */
$q = "SELECT  HTML_PRINT, PDF_PRINT FROM " . PRFX . "SETUP";
$rs = $db->execute($q);
$html_print = $rs->fields['HTML_PRINT'];
$pdf_print = $rs->fields['PDF_PRINT'];
if ($html_print == 1) {
    /* htm print page */
    $smarty->assign('company', $company);
    $smarty->assign('single_workorder_array', $single_work_order);
    $smarty->assign('work_order_notes', $work_order_notes);
    $smarty->assign('work_order_status', $work_order_status);