Example #1
0
<?php

$sessionStart = session_start();
//include the DAL library to use the model layer methods
// check whether session has started or not if yes then executes the cosed else sends an error message
if ($sessionStart == TRUE) {
    include '../BLL.getData.php';
    //creating object of DAL
    $bllMangageData = new BLL_manageData();
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        if (isset($_POST['email_id']) == null || $_POST['password'] == null) {
            //sets the session value which can be used to show error message to the user
            $_SESSION['login_error'] = 'Email Id or password not entered';
            header('Location: ../../login.php');
        } else {
            $result = $bllMangageData->login_users($_POST['email_id'], $_POST['password']);
        }
        if ($result[0] == 'success') {
            $_SESSION['memberId'] = $result[1];
            header('Location: ../../my_tree.php');
        } else {
            if ($result[0] == 'failed' && $result[1] == 'incorrect') {
                // sets the session variable for inccorect username or password
                $_SESSION['login_error'] = 'Email ID or password entered is incorrect';
                header('Location: ../../login.php');
            } else {
                if ($result[0] == 'failed' && $result[1] == 'invalid_email') {
                    // sets the session variable for invalid member
                    $_SESSION['memberId'] = $result[2];
                    $_SESSION['invalid_member'] = 'Invalid Member';
                    header('Location: ../../invalidMember.php');
Example #2
0
<?php

$sessionStart = session_start();
//include the DAL library to use the model layer methods
// check whether session has started or not if yes then executes the cosed else sends an error message
if ($sessionStart == TRUE) {
    include '../BLL.getData.php';
    //creating object of DAL
    $bllMangageData = new BLL_manageData();
    //include the mail class to send the mails to new sign up
    include '../class.mail.php';
    $mail = new Mail();
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        if (isset($_POST['email_id']) == null) {
            //sets the session value which can be used to show error message to the user
            $_SESSION['error'] = 'Email Id not entered';
        } else {
            $result = $bllMangageData->forgot_pwd($_POST['email_id']);
        }
        if ($result[0] == 'success') {
            $mailsent = $mail->mailPassword($_POST['email_id'], $result[1]);
            if ($mailsent == 'mailsent') {
                $_SESSION['message'] = 'Password Is Sent To Your Email Id';
            } else {
                $_SESSION['message'] = 'Password Can Not Delivered Due To Some Reason';
            }
        } else {
            if ($result[0] == 'failed') {
                // sets the session variable for inccorect username or password
                $_SESSION['error'] = 'Email ID entered is incorrect';
            }
Example #3
0
<?php

session_start();
include '../../v-includes/BLL.getData.php';
$manageContent = new BLL_manageData();
//including class mail
include '../../v-includes/class.mail.php';
$mail = new Mail();
$deliveryStatus = '0';
$ipaddress = $_SERVER["REMOTE_ADDR"];
switch ($_POST['u']) {
    case 'uni':
        if (!isset($_SESSION['uniqueid'])) {
            $_SESSION['uniqueid'] = uniqid('order');
        }
        break;
    default:
        break;
}
switch ($_POST['refData']) {
    case 'olddata':
        if (isset($_SESSION['memberId'])) {
            //takes the values related to the user who is logged in
            $userData = $manageContent->getUserData($_SESSION['memberId']);
            $insertUserAddress = $manageContent->insertAddressValue($userData[0]['address'], 'olddata', $deliveryStatus, $ipaddress, $_SESSION['uniqueid']);
        } else {
            // enter just the address guest
            $insertUserAddress = $manageContent->insertAddressValue($_SESSION['guestId'], 'olddata', $deliveryStatus, $ipaddress, $_SESSION['uniqueid']);
        }
        break;
    case 'newdata':
Example #4
0
<?php

include 'v-includes/BLL.getData.php';
$manageContent = new BLL_manageData();
?>

<!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>
<link rel='shortcut icon' href='img/mojlife.ico'/> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap-responsive.css" />
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="assets/css/style.css" />


<script src="js/validate_function.js" type="text/javascript"></script>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="js/add_to_cart.js" type="text/javascript"></script>
<script src="js/v_function.js" type="text/javascript"></script>
<script src="assets/js/bootstrap.js"></script>
<script src="js/checkout.js" type="text/javascript"></script>
<script>
    //calls carousel automatically
    $('.carousel').carousel()
</script>

<title><?php