Ejemplo n.º 1
0
function SetSessionVals($clientuserrecord, $PDOconn, $logname)
{
    $cancontinue = TRUE;
    //load client details
    $_SESSION['clientdefaults']['clientid'] = $clientuserrecord->clientid;
    $theq = 'select * from client where clientid=:clientid';
    try {
        $pdoquery = $PDOconn->prepare($theq);
        $pdoquery->setFetchMode(PDO::FETCH_OBJ);
        $pdoquery->execute(array('clientid' => $_SESSION["clientdefaults"]["clientid"]));
        $client = $pdoquery->fetch();
    } catch (PDOException $e) {
        logit($logname, '  **ERROR** on line ' . __LINE__ . ' with query - ' . $theq . ' ' . $e->getMessage());
        $cancontinue = FALSE;
    }
    if ($cancontinue) {
        $_SESSION["clientdefaults"]["dbname"] = $client->dbname;
        $_SESSION["clientdefaults"]["host"] = $client->host;
        $_SESSION["clientdefaults"]["fullname"] = $client->fullname;
        $_SESSION["clientdefaults"]["schoollogo"] = $client->schoollogo;
        $_SESSION["clientdefaults"]["fedidprefix"] = $client->fedidprefix;
    }
    if ($cancontinue) {
        $cancontinue = GetTheHTMLs($_SESSION["userlanguage"], $_SESSION["clientdefaults"]["clientid"], $PDOconn, $logname);
    }
    if ($cancontinue) {
        header('Location: school.php');
    }
    return $cancontinue;
}
Ejemplo n.º 2
0
$starttime = microtime(TRUE);
if (PHP_OS == 'WINNT') {
    require 'C:\\inetpub\\phplib\\logitv2.php';
    require 'C:\\inetpub\\phplib\\PDOconnectDB.php';
    require 'C:\\inetpub\\phplib\\cleanuserinput.php';
    require 'C:\\inetpub\\phplib\\wc2lib.php';
} else {
    require '/var/www/phplib/logitv2.php';
    require '/var/www/phplib/PDOconnectDB.php';
    require '/var/www/phplib/cleanuserinput.php';
    require '/var/www/phplib/wc2lib.php';
}
static $logname = 'recordpayment';
startthelog($logname, TRUE);
$dbconn = PDOconnect('nakaweb', $_SESSION["clientdefaults"]["host"], $logname);
GetTheHTMLs('EN-US', 0, $dbconn, $logname);
logit($logname, 'Client:"' . $_SESSION["clientdefaults"]["dbname"] . ' user:'******'REQUEST_METHOD'] === 'POST') {
    /*
     * record the payment
     */
    $dbconn = PDOconnect('nakaweb', $_SESSION["clientdefaults"]["host"], $logname);
    foreach ($_SESSION['invoices'] as $key => $value) {
        //        if (key_exists('checkno' . $value, $_POST)) {
        if ($_POST['checkno' . $value] != '') {
            logit($logname, '  updataing:' . $value);
            // create a pg conection