Esempio n. 1
0
<?php

require_once "{$TKTDIR}xactlog.php";
$action = postvalue("action", getvalue("action", "login"));
$errlist = "";
$presentform = 0;
dbconnect();
$x = new XactLog();
switch ($action) {
    /* Login / Register - prompt for info */
    case "login":
        $presentform = 1;
        $firstnm = "";
        $lastnm = "";
        $phonenbr = "";
        $usernm = "";
        $usernm2 = "";
        $passwd = "";
        $passwd2 = "";
        loginprompt(false);
        break;
        /* Login phase 2 - check usernm and passwd, login if match */
    /* Login phase 2 - check usernm and passwd, login if match */
    case "Log In":
        $usernm = postvalue("usernm", "");
        $passwd = postvalue("passwd", "");
        $pwcheck = dbgetsingleton("SELECT (PASSWORD('{$passwd}') = passwd) pwcheck " . "  FROM user " . "  WHERE usernm = '{$usernm}'", "pwcheck");
        if ($pwcheck) {
            h1("Login successful");
            $user = new User();
            $user->loadByUserNm($usernm);
Esempio n. 2
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>PayPal IPN</title>
</head>

<?php 
require_once "settings2.php";
require_once "{$TKTDIR}functions.php";
require_once "{$TKTDIR}database.php";
require_once "{$TKTDIR}xactlog.php";
require_once "{$TKTDIR}order.php";
dbconnect();
$x = new XactLog();
$order = new Order();
$ipn = $_POST;
$orderix = postvalue("invoice", NULL);
$payment_status = postvalue("payment_status", NULL);
$mc_gross = postvalue("mc_gross", 0.0);
$userix = NULL;
if ($orderix) {
    $order->loadByOrderIx($orderix);
    $userix = $order->userix;
    if ($userix) {
        $usernm = dbgetsingleton("SELECT usernm FROM user WHERE userix = {$userix}", "usernm");
    }
}
$x->log("PP IPN Notificaton", "Unvalidated PP Notification", $userix, $orderix, NULL, print_r($_POST, true));
/* Form the response */
if (array_key_exists("test_ipn", $_POST) && $_POST["test_ipn"] == 1) {
Esempio n. 3
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>PayPal IPN</title>
</head>

<?php 
require_once "settings.php";
require_once "{$TKTDIR}functions.php";
require_once "{$TKTDIR}database.php";
require_once "{$TKTDIR}xactlog.php";
require_once "{$TKTDIR}order.php";
dbconnect();
$x = new XactLog();
$order = new Order();
$ipn = $_POST;
$orderix = postvalue("invoice", NULL);
$userix = NULL;
if ($orderix) {
    $order->loadByOrderIx($orderix);
    $userix = $order->userix;
    if ($userix) {
        $usernm = dbgetsingleton("SELECT usernm FROM user WHERE userix = {$userix}", "usernm");
    }
}
$x->log("PP IPN Notificaton", "Unvalidated PP Notification", $userix, $orderix, NULL, print_r($_POST, true));
/* Form the response */
if (array_key_exists("test_ipn", $_POST) && $_POST["test_ipn"] == 1) {
    $ppurl = "https://www.sandbox.paypal.com/cgi-bin/webscr";
} else {
Esempio n. 4
0
<?php

require_once "{$TKTDIR}xactlog.php";
require_once "{$TKTDIR}order.php";
loginprompt(false);
$x = new XactLog();
$user = User::getSession();
$usernm = $user ? $user->usernm : "";
$userix = $user ? $user->userix : "";
$action = postvalue("action", getvalue("action"), "none");
$orderix = postvalue("orderix");
switch ($action) {
    /* *************************************************************************************************************************** */
    /* Submit Order: this is the first screen a user lands on when they submit an order from "eventstatus" */
    /* It shows the proposed order along with amounts and allows the user to either Confirm or Cancel */
    /* *************************************************************************************************************************** */
    case 'Submit Order':
        echo "<form action='eventorder.php' method='post'>\n";
        $memstatus = $user->member ? "Member" : "Non-Member";
        echo "<h1>Event Order Confirmation - {$usernm} - {$memstatus}</h1>\n";
        echo "<br/>\n";
        echo "<table>";
        echo "<tr>\n";
        echo "<th width=16%>Event</th>";
        echo "<th width=16%>Date</th>";
        echo "<th width=16%>Activity</th>";
        echo "<th width=16%>Quantity</th>";
        echo "<th width=16%>Price</th>";
        echo "<th width=16%>Ext. Price</th>";
        echo "</tr>\n";
        $ix = 0;
Esempio n. 5
0
<html>
<head>
<?php 
require_once "functions.php";
require_once "database.php";
require_once "xactlog.php";
?>
</head>
<body>
<h1>test.xactlog</h1>

<?php 
dbconnect();
echo "<h2>XactLog::log</h2>";
$x = new XactLog();
$x->log("Test Xact");
$x->log("Test Xact 2", "description");
$x->log("Test Xact 3", NULL);
$x->log("Test Xact 3", "");
$x->log("Test Xact 4", "userix", 1);
$x->log("Test Xact 4", "userix", NULL);
$x->log("Test Xact 4", "userix", "");
$x->log("Test Xact 4", NULL, 1);
$x->log("Test Xact 5", "eventix", 1, 2);
$x->log("Test Xact 5", "eventix", 1, NULL);
$x->log("Test Xact 5", "eventix", 1, "");
$x->log("Test Xact 5", "eventix", NULL, 2);
$x->log("Test Xact 5", "eventix", "", 2);
$x->log("Test Xact 5", NULL, 1, 2);
$x->log("Test Xact 5", "", 1, 2);
$x->log("Test Xact 6", "eventix", 1, 2, "This is a test transaction.\nMany test transactions have excessive detail.\nThis one is a good example of that.\n");