Esempio n. 1
0
<?php

require_once 'classes/membership.php';
$membership = new membership();
$membership->logUserOut();
if ($_POST && !empty($_POST['username']) && !empty($_POST['password']) && !empty($_POST['password2'])) {
    $username = $membership->checkUsername($_POST['username']);
    $userLen = 0;
    if (strlen($_POST['username']) < 8) {
        $userLen = 1;
    } else {
        if (preg_match('/\\s/', $_POST['username'])) {
            $userLen = 2;
        }
    }
    if (strlen($_POST['password']) < 8 || strlen($_POST['password2']) < 8) {
        $password = 1;
    } else {
        if (strcmp($_POST['password'], $_POST['password2']) != 0) {
            $password = 2;
        } else {
            if (preg_match('/\\s/', $_POST['password']) || preg_match('/\\s/', $_POST['password2'])) {
                $password = 3;
            } else {
                $password = 0;
                if ($username == 0 && $password == 0 && $userLen == 0) {
                    $membership->createUser($_POST['username'], $_POST['password']);
                }
            }
        }
    }
Esempio n. 2
0
<?php

require_once 'classes/membership.php';
require_once 'classes/methodExec.php';
$membership = new membership();
$membership->confirmMember();
$methodExecVar = new methodExec();
if (isset($_GET['package']) && isset($_GET['trace'])) {
    $traceData = $methodExecVar->getTimes($_GET['trace'], $_GET['package']);
}
if (strpos($_GET['trace'], $_SESSION['user']) === false) {
    $redirect = 'location: index.php?user='******'user'];
    header($redirect);
}
$userName = $_SESSION['user'];
?>

<script type="text/javascript">var jsArray = <?php 
echo json_encode(str_replace('"', '\'', $traceData));
?>
;</script>

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
Esempio n. 3
0
            $argValues = $autoId . " , " . $typeId . "," . $viewedProfiles . ", now(), now(),'" . $payMode . "', '" . $status . "','" . $profileId . "'," . $profileCount;
            $this->switchqry('tm_paymentdetail', 'INSERT', '', $argValues);
        } else {
            $setValues = "pay_mode = '" . $payMode . "', Typeid=" . $typeId . ", date_updated=now() where ProfileId='{$profileId}'";
            $this->switchqry('tm_paymentdetail', 'UPDATE', $setValues, '');
        }
    }
    function paymentAutoId($Id, $tname)
    {
        $arg1 = "";
        $arg2 = "Max(" . $Id . ")";
        $this->switchqry($tname, 'SELECT', $arg1, $arg2);
        $res = mysql_fetch_array($this->qry_result);
        return $this->id = $res['Max(' . $Id . ')'] + 1;
    }
    function getPayment($Id, $tname, $profileId)
    {
        $arg1 = " where Profileid ='" . $profileId . "'";
        $arg2 = $Id;
        $this->switchqry($tname, 'SELECT', $arg1, $arg2);
        $res = mysql_fetch_array($this->qry_result);
        return $this->id = $res[$Id];
    }
}
$membership = new membership();
if ($_POST['action'] == 'membership') {
    $membership->insertMembership();
}
?>

Result
Esempio n. 4
0
<?php

session_start();
require_once 'classes/membership.php';
require_once 'classes/bank_operations.php';
$membership = new membership();
$payment = new transaction();
if (isset($_GET['status']) && $_GET['status'] == 'logged_out') {
    $membership->log_User_Out();
}
if ($_POST && !empty($_POST['username']) && !empty($_POST['pwd'])) {
    $response = $membership->validate_user($_POST['username'], $_POST['pwd']);
}
if ($_POST && !empty($_POST['username'])) {
    $_SESSION['username'] = $_POST['username'];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="assets/pic/logo_BANK.ico">
    <title>NBank</title>
    <link rel="stylesheet" href="assets/css/style.css">
    <link href="assets/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>