예제 #1
0
function drawitems($top_item, $rows, $highlight)
{
    printheaderb();
    $query = "select count(*) as count from localtemptrans";
    $db = tDataConnect();
    $result = sql_query($query, $db);
    $row = sql_fetch_array($result);
    $rowCount = $row["count"];
    sql_close($db);
    if ($rowCount == 0) {
        if ($_SESSION["training"] != 1) {
            plainmsg($_SESSION["welcomeMsg1"] . "<br />" . $_SESSION["welcomeMsg2"] . "<br />" . $_SESSION["welcomeMsg3"]);
        } else {
            plainmsg($_SESSION["trainingMsg1"] . "<br />" . $_SESSION["trainingMsg2"]);
        }
    } else {
        $query_range = "select * from screendisplay where trans_id >= " . $top_item . " and trans_id <= " . ($top_item + $rows) . " order by trans_id";
        $db_range = tDataConnect();
        $result_range = sql_query($query_range, $db_range);
        $num_rows = sql_num_rows($result_range);
        echo "<tr><td width='600' colspan='3'>&nbsp;</td></tr>\n";
        for ($i = 0; $i < $num_rows; $i++) {
            $row = sql_fetch_array($result_range);
            $trans_id = $row["trans_id"];
            $description = $row["description"];
            $total = $row["total"];
            $comment = $row["comment"];
            $tf = $row["status"];
            $color = $row["lineColor"];
            if ($trans_id == $highlight) {
                if ($color == "") {
                    printitemhilite($description, $comment, $total, $tf);
                } else {
                    printitemcolorhilite($color, $description, $comment, $total, $tf);
                }
            } else {
                if ($color == "") {
                    printitem($description, $comment, $total, $tf);
                } else {
                    printitemcolor($color, $description, $comment, $total, $tf);
                }
            }
        }
        sql_close($db_range);
    }
}
예제 #2
0
파일: memlist.php 프로젝트: WedgeCoop/IS4C
                 e = event;
             }
             var ieKey=e.keyCode;
             if (ieKey==13) {
                 document.selectform.submit();
             }
             if (ieKey==27) {
                 window.top.location = 'pos.php';
             }
         }
         document.onkeydown = keyDown;
     </script>
 </head>
 <body onLoad='document.selectform.selectlist.focus();'>
     <?php 
     printheaderb();
     ?>
     <table>
         <tr>
             <td height='295' align='center' valign='center'>
                 <form name='selectform' method='post' action='memid.php'>
                     <select name='selectlist' size='15' onBlur='document.selectform.selectlist.focus();'>
                         <?php 
     if (!is_numeric($entered) && $_SESSION["memlistNonMember"] == 1) {
         $selectFlag = 1;
     } else {
         $selectFlag = 0;
     }
     for ($i = 0; $i < $num_rows; $i++) {
         $row = sql_fetch_array($result);
         if ($i == 0 && $selectFlag == 0) {
예제 #3
0
function msgbox($strmsg, $icon)
{
    printheaderb();
    echo "<TR><TD height='295' width='640' align='center' valign='center'>";
    echo "<TABLE border='0' cellpadding='0' cellspacing='0'>";
    echo "<TR><TD colspan='5' bgcolor='#004080' height='30' width='260' valign='center'>&nbsp;&nbsp;&nbsp;<FONT size='+1' face='arial' color='white'><B>" . $_SESSION["alertBar"] . "</B></FONT></TD></TR>";
    echo "<TR><TD colspan='5' bgcolor='black' height='1' width='260'></TD></TR>";
    echo "<TR><TD width='1' height='118' bgcolor='black'></TD>";
    echo "<TD bgcolor='white' height='118' width='50' valign='top' align='left'>";
    echo "<IMG src='" . $icon . "'></TD>";
    echo "<TD bgcolor='white' height='118' width='208' valign='center' align='left'><FONT face='arial' color='black'>";
    echo $strmsg . "</FONT></CENTER></TD>";
    echo "<TD width='10' bgcolor='white' height='118'></TD>";
    echo "<TD width='1' height='118' bgcolor='black'></TD></TR>";
    echo "<TR><TD colspan='5' bgcolor='black' height='1' width='260'></TD></TR></TABLE>";
    echo "</TD></TR>";
    $_SESSION["strRemembered"] = $_SESSION["strEntered"];
    errorBeep();
    //$_SESSION["scan"] = "noScan";
    $_SESSION["msgrepeat"] = 1;
    //$_SESSION["toggletax"] = 0;
    //$_SESSION["togglefoodstamp"] = 0;
    $_SESSION["away"] = 1;
}
예제 #4
0
function msgbox($strmsg, $icon)
{
    printheaderb();
    echo "<tr><td height='295' width='640' align='center' valign='center'>";
    echo "<table border='0' cellpadding='0' cellspacing='0'>";
    echo "<tr><td colspan='5' bgcolor='#004080' height='30' width='260' valign='center'>&nbsp;&nbsp;&nbsp;<font size='+1' face='arial' color='white'><b>" . $_SESSION["alertBar"] . "</b></font></td></tr>";
    echo "<tr><td colspan='5' bgcolor='black' height='1' width='260'></td></tr>";
    echo "<tr><td width='1' height='118' bgcolor='black'></td>";
    echo "<td bgcolor='white' height='118' width='50' valign='top' align='left'>";
    echo "<img src='" . $icon . "' alt='' /></td>";
    echo "<td bgcolor='white' height='118' width='208' valign='center' align='left'><font face='arial' color='black'>";
    echo $strmsg . "</font></center></td>";
    echo "<td width='10' bgcolor='white' height='118'></td>";
    echo "<td width='1' height='118' bgcolor='black'></td></tr>";
    echo "<tr><td colspan='5' bgcolor='black' height='1' width='260'></td></tr></table>";
    echo "</td></tr>";
    $_SESSION["strRemembered"] = $_SESSION["strEntered"];
    errorBeep();
    $_SESSION["msgrepeat"] = 1;
    $_SESSION["away"] = 1;
}