Ejemplo n.º 1
0
function ccEntered($entered) {

    if ($_SESSION["ttlflag"] != 1) {
        boxMsg("transaction must be totaled before tender can be accepted");        
    }
    elseif ($_SESSION["CCintegrate"] != 1) {
        xBoxMsg("<img src='graphics/redsquare.gif' alt='Red square'>System not initiated<p><font size=-1>Please process card<br />in standalone</font></p>");
    }
    elseif (pinghost($_SESSION["ccServer"]) != 1) {
        xBoxMsg("<img src='graphics/redsquare.gif' alt='Red square'>Local system offline<P><font size=-1>Please process card<br />in standalone</font></p>");
    }
    elseif (sys_pcc() == 1) {
        xBoxMsg("<img src='graphics/redsquare.gif' alt='Red square'>Remote system offline<P><font size=-1>Please process card<br />in standalone</font></p>");
    }
    else {
        $ccValid = ccValid($entered);

        if ($ccValid == 0 && $_SESSION["ccSwipe"] == "invalid") {
            // changed the error message since this usually just means a misread, not necessarily an invalid card --atf 5/16/07
            xBoxMsg("Card data invalid; scan again or type in manually<p><font size=-1>[clear] to cancel</font></p>");
        }
        elseif ($ccValid == 0 && $_SESSION["ccType"] = "Unsupported") {
            xBoxMsg("Card type not supported<p><font size=-1>[clear] to cancel</font></p>");
        }
        else {
        
            if ($_SESSION["ccAmtEntered"] != 1) {
                $_SESSION["ccAmt"] = $_SESSION["amtdue"];
            } 
            $ccAmt = $_SESSION["ccAmt"];

            if(substr($_SESSION['strEntered'],0,1) == 'V'|| substr($_SESSION['strEntered'],0,1) == 'v'){
                // added 04/01/05 by CvR process void....not fully implemented
                $_SESSION["boxMsg"] = "<b>Voiding credit card amount</b><p><font size='-1'>[enter] to continue<br />or [clear] to cancel</font></p>";    
            }
            elseif((substr($_SESSION["strEntered"],0,1) == 'f' || substr($_SESSION["strEntered"],0,1) == 'F') && ($ccAmt <= $_SESSION["amtdue"])){
                $_SESSION["boxMsg"] = "<b>Forcing $" . truncate2($ccAmt) . "?</b><p><font size='-1'>[enter] to continue <br />or [clear] to cancel</font></b>";
                $_SESSION["ccAmtInvalid"] = 0;        
            }
            elseif(is_numeric($ccAmt) && ($ccAmt <= $_SESSION["amtdue"])) {
                $_SESSION["boxMsg"] = "<b>Tendering $" . truncate2($ccAmt) . "?</b><p><font size='-1'>[enter] to continue if correct<br />Enter a different amount if incorrect<br />or [clear] to cancel</font></p>";
                $_SESSION["ccAmtInvalid"] = 0;
            }
            else {
                $_SESSION["boxMsg"] = "<b>Invalid entry</b><p><font size='-1'>Enter a different amount<br />or [clear] to cancel</font></p>";
                $_SESSION["ccAmtInvalid"] = 1;
            }
            ccboxMsgscreen();
        }
    }
}
Ejemplo n.º 2
0
<?php

include_once dirname(__FILE__) . "/frame.class.inc";
include_once dirname(__FILE__) . "/class.unix.inc";
include_once dirname(__FILE__) . "/class.postfix.inc";
if (isset($_GET["NetworkManager-check-redhat"])) {
    NetworkManager_redhat();
    exit;
}
if (isset($_GET["reconfigure-postfix-instances"])) {
    postfix_reconfigures_multiples_instances();
    exit;
}
if (isset($_GET["ping"])) {
    pinghost();
    exit;
}
if (isset($_GET["crossroads-restart"])) {
    crossroads_restart();
    exit;
}
if (isset($_GET["ipv6"])) {
    ipv6();
    exit;
}
if (isset($_GET["OpenVPNServerLogs"])) {
    OpenVPN_ServerLogs();
    exit;
}
if (isset($_GET["ipdeny"])) {
    ipdeny();
Ejemplo n.º 3
0
function testcc()
{
    $ccConnected = pinghost($_SESSION["ccServer"]);
    if ($ccConnected == 1) {
        $cn = mysql_connect($_SESSION["ccServer"], 'sa');
        if ($cn) {
            $_SESSION["ccMysql"] = 1;
        } else {
            $_SESSION["ccMysql"] = 0;
        }
    } else {
        $_SESSION["ccMysql"] = 0;
    }
}
Ejemplo n.º 4
0
function testcc()
{
    $ccConnected = pinghost($_SESSION["ccServer"]);
    if ($ccConnected == 1) {
        $cn = mysql_connect($_SESSION["ccServer"], 'sa');
        //mysql_select_db('is4cc',$cn);
        //$query1 = "SELECT * FROM globalvalues";
        //$result1 = mysql_query($query1);
        if ($cn) {
            $_SESSION["ccMysql"] = 1;
        } else {
            $_SESSION["ccMysql"] = 0;
        }
    } else {
        $_SESSION["ccMysql"] = 0;
    }
}
Ejemplo n.º 5
0
                document.getElementById('hide').style.display="inline";
                document.getElementById('show').style.display="none";
            }
        </script>
    </head>
    <body style='background-color: #ffffff; color: #004080' onload='document.forms[0].elements[0].focus();'>

        <div style='float: right;'>
        <form method=post action=pos.php>
        <input type=submit value=Back style='width: 70px;'>
        </form>
        </div>

        <div style='width: 685px;'>
        <?php 
if (!pinghost($_SESSION["memServer"])) {
    echo 'The membership server is currently unavailable.';
    exit;
} else {
    $memNum = $_SESSION["memberID"];
    if (strlen($memNum) == 6) {
        $query = "select Member, Last_Name, First_Name, Last, First, Address, Address2, City, State, Zip," . "Country, Home_Phone, Work_Phone, Signature2, Status, Refund_Requested, convert(char(8),Refund_Requested_On,1)," . "Mailing, Newsletter, Mix, convert(char(8),DateJoined,1), Comments,inactiveStatus,signature1" . "from MBRData where Member='" . $memNum . "'";
        echo "<table cellspacing=0 cellpadding=1 style='width: 680px;'>";
        $db = memDataConnect();
        $result = sql_query($query, $db);
        $num_rows = sql_num_rows($result);
        for ($i = 0; $i < $num_rows; $i++) {
            $row = sql_fetch_array($result);
            if ($row[23] == 0) {
                $sign = "Extra Name:";
            } else {
Ejemplo n.º 6
0
<?php

$_SESSION["OS"] = "linux";
pinghost("192.168.123.96");
function pinghost($host)
{
    $host = str_replace("[", "", $host);
    $host = str_replace("]", "", $host);
    $intConnected = 0;
    if ($_SESSION["OS"] == "win32") {
        $pingReturn = exec("ping -n 1 {$host}", $aPingReturn);
        $packetLoss = "(0% loss";
    } else {
        $pingReturn = exec("ping -c 1 -r {$host}", $aPingReturn);
        $packetLoss = "1 received, 0% packet loss";
    }
    foreach ($aPingReturn as $returnLine) {
        echo $returnLine . "<br>";
    }
    $pos = strpos($returnLine, $packetLoss);
    if ($pos) {
        $intConnected = 1;
    }
    return $intConnected;
}
Ejemplo n.º 7
0
<?php
include_once(dirname(__FILE__)."/frame.class.inc");
include_once(dirname(__FILE__)."/class.unix.inc");
include_once(dirname(__FILE__)."/class.postfix.inc");



if(isset($_GET["NetworkManager-check-redhat"])){NetworkManager_redhat();exit;}
if(isset($_GET["reconfigure-postfix-instances"])){postfix_reconfigures_multiples_instances();exit;}
if(isset($_GET["ping"])){pinghost();exit;}
if(isset($_GET["crossroads-restart"])){crossroads_restart();exit;}
if(isset($_GET["ipv6"])){ipv6();exit;}
if(isset($_GET["OpenVPNServerLogs"])){OpenVPN_ServerLogs();exit;}
if(isset($_GET["ipdeny"])){ipdeny();exit;}
if(isset($_GET["fw-inbound-rules"])){iptables_inbound();exit;}
if(isset($_GET["fqdn"])){fqdn();exit;}
if(isset($_GET["iptaccount-installed"])){iptaccount_check();exit;}




while (list ($num, $ligne) = each ($_GET) ){$a[]="$num=$ligne";}
writelogs_framework("unable to unserstand ".@implode("&",$a),__FUNCTION__,__FILE__,__LINE__);


function NetworkManager_redhat(){
	$unix=new unix();
	$chkconfig=$unix->find_program("chkconfig");
	if(!is_file($chkconfig)){return;}
	exec("$chkconfig --list NetworkManager 2>&1",$results);
	echo "<articadatascgi>". @implode("\n",$results)."</articadatascgi>";