Пример #1
0
<?php

include 'smarty/Smarty.class.php';
include 'index/common.func.php';
set_smarty();
load_lang_pack(array($global['channel']));
initial('index');
$smarty->display('info.php');
//新秀
Пример #2
0
function existing_login_error()
{
    //@@@@@ Error U-R-703: Username or password was entered incorrectly
    $error_number = 703;
    initial(include "includes/feedback/error_r_700series.txt");
}
Пример #3
0
<?php

include 'smarty/Smarty.class.php';
include 'admin/common.func.php';
set_smarty();
load_lang_pack(array($global['channel']), 'admin');
initial('admin');
run(array('module' => 'info_main', 'display' => 'no'));
$smarty->display('info.php');
//新秀
function do_dispreport($date_in, $func_in)
{
    // $frm_date, $mode as params - 6/8/11
    global $nature, $disposition, $patient, $incident, $incidents;
    // 12/3/10
    global $evenodd, $types;
    global $w_tiny, $w_small, $w_medium, $w_large;
    // 4/14/11
    function the_time($in_val)
    {
        return date("j H:i", (int) $in_val);
    }
    function print_row($ary_in, $_i)
    {
        //
        $_evenodd = array("even", "odd");
        $_priorities = array("typical", "high", "highest");
        $disp_str = empty($ary_in[6]) ? "" : the_time($ary_in[6]) . " <I>(" . round(($ary_in[6] - $ary_in[2]) / 60) . ")</I>";
        $enr_str = empty($ary_in[7]) ? "" : the_time($ary_in[7]) . " <I>(" . round(($ary_in[7] - $ary_in[2]) / 60) . ")</I>";
        $onsc_str = empty($ary_in[8]) ? "" : the_time($ary_in[8]) . " <I>(" . round(($ary_in[8] - $ary_in[2]) / 60) . ")</I>";
        $facen_str = empty($ary_in[9]) ? "" : the_time($ary_in[9]) . " <I>(" . round(($ary_in[9] - $ary_in[2]) / 60) . ")</I>";
        $facar_str = empty($ary_in[10]) ? "" : the_time($ary_in[10]) . " <I>(" . round(($ary_in[10] - $ary_in[2]) / 60) . ")</I>";
        $clr_str = empty($ary_in[11]) ? "" : the_time($ary_in[11]) . " <I>(" . round(($ary_in[11] - $ary_in[2]) / 60) . ")</I>";
        $res_str = empty($ary_in[12]) ? "" : the_time($ary_in[12]);
        $_class = isset($_priorities[$ary_in[3]]) ? $_priorities[$ary_in[3]] : $_priorities[0];
        $_shortname = empty($ary_in[1]) ? "[#{$ary_in[0]}]" : shorten($ary_in[1], 32);
        $_full_time = format_date((string) $ary_in[2]);
        echo "<TR CLASS='{$_evenodd[$_i % 2]}'>";
        echo "<TD class='{$_class}' onmouseout='UnTip()' onmouseover=\"Tip('{$ary_in[1]}');\" >{$_shortname}</TD>";
        //	ticket name
        echo "<TD  onmouseout='UnTip()' onmouseover=\"Tip('{$_full_time}');\">" . the_time($ary_in[2]) . "</TD>";
        //	ticket start
        $_unit_name = empty($ary_in[5]) ? "[#{$ary_in[4]}]" : $ary_in[5];
        echo "<TD>{$_unit_name}</TD>";
        //	unit name
        echo "<TD>{$disp_str}</TD>";
        //	dispatched
        echo "<TD>{$enr_str}</TD>";
        //	en route
        echo "<TD>{$onsc_str}</TD>";
        //	on scene
        echo "<TD>{$facen_str}</TD>";
        //	far enroute
        echo "<TD>{$facar_str}</TD>";
        //	fac arr
        echo "<TD>{$clr_str}</TD>";
        //	clear
        echo "<TD>{$res_str}</TD>";
        //	reset
        echo "</TR>\n";
    }
    // end function echo row()
    /*
    0	- ticket id
    1	- ticket name
    2	- ticket start
    3	- ticket severity
    4	- unit id
    5	- unit name
    6	- dispatched
    7	- en route
    8	- on scene
    9	- far enroute
    10	- fac arr
    11	- clear
    12	- reset
    */
    function initial($row_in)
    {
        $ary_out = array("", "", "", "", "", "", "", "", "", "", "", "", "");
        $ary_out[0] = $row_in['ticket_id'];
        $ary_out[1] = $row_in['scope'];
        $ary_out[2] = $row_in['problemstart'];
        $ary_out[3] = $row_in['severity'];
        $ary_out[4] = $row_in['responder_id'];
        $ary_out[5] = $row_in['handle'];
        return $ary_out;
    }
    $from_to = date_range($date_in, $func_in);
    // get date range as array
    $titles = array();
    $titles['dr'] = "Dispatch - Daily Report - ";
    $titles['cm'] = "Dispatch - Current Month-to-date - ";
    $titles['lm'] = "Dispatch - Last Month - ";
    $titles['cw'] = "Dispatch - Current Week-to-date - ";
    $titles['lw'] = "Dispatch - Last Week - ";
    $titles['cy'] = "Dispatch - Current Year-to-date - ";
    $titles['ly'] = "Dispatch - Last Year - ";
    $to_str = $func_in == "dr" ? "" : " to " . $from_to[3];
    print "\n<TABLE ALIGN='left' BORDER = 0 >\n<TR CLASS='even' style='height: 24px'>\n";
    print "<TH COLSPAN=99 ALIGN = 'center' border=1>" . $titles[$func_in] . $from_to[2] . $to_str . "</TH></TR>\n";
    $where = " WHERE `when` BETWEEN '" . $from_to[0] . "' AND '" . $from_to[1] . "'";
    $which_inc = $_POST['frm_tick_sel'] == 0 ? "" : " AND `ticket_id` = " . $_POST['frm_tick_sel'];
    // 2/7/09
    $which_unit = $_POST['frm_resp_sel'] == 0 ? "" : " AND `responder_id` = " . $_POST['frm_resp_sel'];
    // 6/4/11
    $codes = "{$GLOBALS['LOG_CALL_DISP']}, {$GLOBALS['LOG_CALL_RESP']}, {$GLOBALS['LOG_CALL_ONSCN']}, {$GLOBALS['LOG_CALL_CLR']}, {$GLOBALS['LOG_CALL_RESET']}, {$GLOBALS['LOG_CALL_U2FENR']}, {$GLOBALS['LOG_CALL_U2FARR']}";
    //		$codes = "{$GLOBALS['LOG_CALL_U2FENR']}, {$GLOBALS['LOG_CALL_U2FARR']}";
    $query = "SELECT *, \n\t\t\tUNIX_TIMESTAMP(`l`.`when`) AS `when_num`, \n\t\t\tUNIX_TIMESTAMP(`t`.`problemstart`) AS `problemstart`, \n\t\t\t`r`.`name` AS `unit_name`, \n\t\t\t`l`.`info` AS `status`\n\t\t\tFROM `{$GLOBALS['mysql_prefix']}log` `l`\n\t\t\tLEFT JOIN `{$GLOBALS['mysql_prefix']}ticket` `t` ON (`t`.`id` = `l`.`ticket_id`)\n\t\t\tLEFT JOIN `{$GLOBALS['mysql_prefix']}responder` `r` ON (`r`.`id` = `l`.`responder_id`)\n\t\t\t{$where} {$which_inc} {$which_unit}\n\t\t\tAND `l`.`code` IN ({$codes})\n\t\t\tORDER BY `l`.`ticket_id` ASC, `l`.`responder_id` ASC, `l`.`code` ASC";
    $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), __FILE__, __LINE__);
    //		dump($query);
    $normalize = array($GLOBALS['LOG_CALL_DISP'] => 6, $GLOBALS['LOG_CALL_RESP'] => 7, $GLOBALS['LOG_CALL_ONSCN'] => 8, $GLOBALS['LOG_CALL_U2FENR'] => 9, $GLOBALS['LOG_CALL_U2FARR'] => 10, $GLOBALS['LOG_CALL_CLR'] => 11, $GLOBALS['LOG_CALL_RESET'] => 12);
    $i = 0;
    $disp_start = "";
    $_data = $empty = array("", "", "", "", "", "", "", "", "", "", "", "", "");
    // incident, unit, start, dispatch time, responding time, on-scene time, fac-enr time, fac-arr time, clear, reset
    $counts = $minutes = $stats = array(0, 0, 0, 0, 0, 0, 0);
    // elapsed minutes and counts to dispatched, responding, on-scene, fac-enr, fac-arr, cleared - 2/6/09
    if (mysql_affected_rows() > 0) {
        // main loop - top
        $header = "<TR><TH ALIGN='left'>&nbsp;{$incident}&nbsp;</TH><TH ALIGN='left'>&nbsp;Start&nbsp;</TH><TH ALIGN='left'>&nbsp;" . get_text("Unit") . "&nbsp;</TH><TH ALIGN='left'>&nbsp;Dispatched&nbsp;</TH><TH ALIGN='left'>&nbsp;Responding&nbsp;</TH><TH ALIGN='left'>&nbsp;On-scene&nbsp;</TH><TH ALIGN='left'>&nbsp;Fac-enr&nbsp;</TH><TH ALIGN='left'>&nbsp;Fac-arr&nbsp;</TH><TH ALIGN='left'>&nbsp;Cleared&nbsp;</TH><TH ALIGN='left'>&nbsp;Reset&nbsp;</TH></TR>\n";
        echo $header;
        $i = 0;
        $initialized = FALSE;
        while ($row = stripslashes_deep(mysql_fetch_assoc($result))) {
            if (!$initialized) {
                $_data = initial($row);
                $initialized = TRUE;
            }
            $disp_event = $normalize[$row['code']];
            // normalize to column position
            // change in incident, unit, or code collision?
            if ($row['ticket_id'] != $_data[0] || !$row['responder_id'] == $_data[4] || !empty($_data[$disp_event])) {
                print_row($_data, $i);
                $i++;
                if ($i % 100 == 0) {
                    echo $header;
                }
                $_data = initial($row);
                $_data[$normalize[$row['code']]] = $row['when_num'];
            } else {
                $_data[$normalize[$row['code']]] = $row['when_num'];
            }
        }
        // end while ...
        // do the last line if any
        if (!empty($_data[6]) || !empty($_data[7]) || !empty($_data[8]) || !empty($_data[9]) || !empty($_data[10]) || !empty($_data[11]) || !empty($_data[12])) {
            print_row($_data, $i);
        }
    } else {
        // 10/31/09
        print "\n<TR CLASS='odd'><TD COLSPAN='99' ALIGN='center'><br /><I>No data for this period</I><BR /></TD></TR>\n";
    }
    print "<TR><TD COLSPAN=99 ALIGN='center'><HR STYLE = 'color: blue; size: 1; width: 50%'></TD></TR>";
    print "</TABLE>\n";
}
Пример #5
0
<?php

include 'smarty/Smarty.class.php';
include 'index/common.func.php';
set_smarty();
load_lang_pack(array($global['channel']));
initial('message');
$smarty->display('message.php');
create_html($global['url']);
//新秀
Пример #6
0
<?php

include 'smarty/Smarty.class.php';
include 'index/common.func.php';
set_smarty();
load_lang_pack(array($global['channel']));
initial('article');
$smarty->display('article.php');
create_html($global['url']);
//新秀
Пример #7
0
<head>
    <title>PokeMon Center</title>
    <link href='http://fonts.googleapis.com/css?family=Black+Ops+One' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="http://<?php 
echo $_SERVER['HTTP_HOST'];
?>
/CSS/style.css">
</head>

<body style="margin:0;">

<?php 
//template
include_once "./template/menu.tpl";
//call function
initial();
//hello message
if ($module_name == "" && $function_name == "") {
    html_div(100, 0, "#ffffff", 30);
    echo "Welcome to Pokemon Center.";
    html_div_end();
    html_img("http://" . $_SERVER['HTTP_HOST'] . "/img/chansey.png");
}
//template
include_once "./template/bottom.tpl";
?>

</body>

</html>