Exemplo n.º 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);
    }
}
Exemplo n.º 2
0
        $_SESSION["ccTender"] = 0;
        if (strlen($Reference) > 0) {
            $errorInfo = "Ref: " . $Reference;
        } else {
            $errorInfo = "Auth: " . $Auth;
        }
        $_SESSION["boxMsg"] = "Unable to process<br>" . $errorInfo . "<p>[clear]";
        //-------added 04/01/05 by CvR---need to save TroutD to void it
        ccout($User1, $Result, $TroutD, 0, $catTroutD);
        //-----
        boxMsgScreen();
    }
} else {
    if ($_SESSION["ouxWait"] < 5) {
        $_SESSION["ouxWait"]++;
        plainmsg("authorizing...");
        printfooter();
    } else {
        $_SESSION["ouxWait"] = 0;
        $_SESSION["ccTender"] = 0;
        $_SESSION["boxMsg"] = "Communication error<p><font size=-1>Unable to complete transaction<br>Please process card manually</font>";
        boxMsgScreen();
    }
}
?>

<HTML>
<META HTTP-EQUIV="Refresh" CONTENT="3;">

</HTML>
Exemplo n.º 3
0
     clearinput();
     break;
 case "NS":
     if ($_SESSION["LastID"] != 0) {
         boxMsg("Transaction in Progress");
     } else {
         $intAway = 1;
         maindisplay("nslogin.php");
     }
     break;
 case "CN":
     if ($_SESSION["runningTotal"] == 0) {
         printheaderb();
         receipt("cancelled");
         $_SESSION["msg"] = 2;
         plainmsg("transaction cancelled");
     } else {
         $intAway = 1;
         maindisplay("mgrlogin.php");
     }
     break;
 case "TA":
     tender("TA", $_SESSION["runningTotal"] * 100);
     break;
 case "TB":
     boxMsg("credit card tender must specify amount");
     break;
 case "EC":
     boxMsg("EBT tender must specify amount");
     break;
 case "FS":