<?php

if (isset($_REQUEST['ssid']) && $_REQUEST['ssid'] != "0") {
    $ssid = $_REQUEST['ssid'];
    session_id($ssid);
}
session_start();
if (isset($_SESSION['username'])) {
    include_once 'vendorsClass.php';
    $vpc = new vendorsClass('vendorList.xml');
    $username = $_SESSION['username'];
    $vendor = $vpc->findVendorWithEmail($username);
    if (!is_null($vendor)) {
        $vendor->password = $_REQUEST['password'];
        $vendor->save();
        echo json_encode(true);
    } else {
        echo json_encode(false);
    }
} else {
    echo json_encode(false);
}
<?php

$ssid = 0;
if (isset($_REQUEST['ssid'])) {
    $ssid = $_REQUEST['ssid'];
    session_id($ssid);
    $ssidLink_continuing = "&ssid=" . $ssid;
    $ssidLink_starting = "?ssid=" . $ssid;
}
session_start();
include_once 'vendorsClass.php';
include_once 'scripts/Mobile-Detect-2.8.11/Mobile_Detect.php';
$mobileDetect = new Mobile_Detect();
$vpc = new vendorsClass('vendorList.xml');
$username = "";
$isAdmin = false;
$vendor = NULL;
$currentUser_id = "";
$vendor_id = $_REQUEST['user_id'];
$validToEdit = false;
$mailToLink = "";
$mailToLinkSubject = "";
$mailToLinkBody = "Instructions:%0AAttach the image file and send the email.%0ADO NOT modify any part of this email or your image will not upload.";
$maxUploadSize = 500;
$maxSizeString = "maxSize:" . $maxUploadSize;
if (isset($_SESSION['username'])) {
    $username = $_SESSION['username'];
    $vendor = $vpc->findVendorWithEmail($username);
    if (!is_null($vendor)) {
        $isAdmin = $vendor->isAdmin();
        $currentUser_id = $vendor->id;
<?php

$ssid = 0;
if (isset($_REQUEST['ssid']) && $_REQUEST['ssid'] != "0") {
    $ssid = $_REQUEST['ssid'];
    session_id($ssid);
    $ssidLink_continuing = "&ssid=" . $ssid;
    $ssidLink_starting = "?ssid=" . $ssid;
}
session_start();
include_once 'vendorsClass.php';
include_once 'scripts/validationClass/validator.php';
$vendorObj = unserialize($_REQUEST['vendorObj']);
$vpc = new vendorsClass('vendorList.xml');
$username = "";
$isAdmin = false;
$vendor = NULL;
$currentUser_id = "";
$validToEdit = false;
$saved = false;
//print_r($vendorObj);
if (isset($_SESSION['username']) && !is_null($vendorObj)) {
    $username = $_SESSION['username'];
    $vendor = $vpc->findVendorWithEmail($username);
    if (!is_null($vendor)) {
        $isAdmin = $vendor->isAdmin();
        $currentUser_id = $vendor->id;
    }
    if ($vendorObj['id'] == $currentUser_id) {
        $validToEdit = true;
    } else {
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,  user-scalable=no"/>
<title>St. Louis Bridal Professionals - Vendors</title>
<script src="scripts/jquery/jquery-1.11.2.min.js"></script>
<!--<script src="scripts/jquery/vendorContactFormScripts.js"></script>-->
<link href="html5reset-1.6.1.css" rel="stylesheet" type="text/css">
<link href="all.css" rel="stylesheet" type="text/css">
<!--<link href="desktop.css" media="screen and (min-width:900px)" rel="stylesheet" type="text/css">
<link href="tablet.css" media="screen and (min-width:400px) and (max-width:899px)" rel="stylesheet" type="text/css">
<link href="phone.css" media="screen and (max-width:399px)" rel="stylesheet" type="text/css"> -->
<link href="vendorLandingPage.css" rel="stylesheet" type="text/css">
<link href="vendorLandingPage_NavMenu.css" rel="stylesheet" type="text/css">
</head>

<body>
<?php 
$vpc = new vendorsClass('vendorList.xml');
$vendor = $vpc->getVendorByID($vendorID);
?>

<header>
	<div id="header_innerWrap">
        <div id="groupLogo">
            <a href="http://www.stlbridalpros.com?m=vendors"><img id="groupLogoImg" src="images/logo_black_523_450.gif"/></a>
        </div>
        <div id="vendorLogoHolder">
            <img id="vendorHeaderImage" src="<?php 
echo $vendor->logo;
?>
"/>
        </div>
    </div>
    $mobileDetect = new Mobile_Detect();
    $vpc = new vendorsClass('vendorList.xml');
    $username = "";
    $isAdmin = false;
    $vendor = NULL;
    $username = $_SESSION['username'];
    $vendor = $vpc->findVendorWithEmail($username);
    if (!is_null($vendor)) {
        $isAdmin = $vendor->isAdmin();
    }
}
if ($isAdmin) {
    include_once 'vendorsClass.php';
    include_once 'Mail.php';
    require_once '/home/dvaqpvvw/php/Mail/mime.php';
    $vC = new vendorsClass();
    $admins = $vC->getAdmins();
    $vendor = $vC->getVendorByID($_REQUEST['vendorID']);
    $crlf = "\r\n";
    $hdrs = array('From' => '*****@*****.**', 'Subject' => 'Welcome to St. Louis Bridal Professionals');
    $mime = new Mail_mime($crlf);
    $mime->addHTMLImage("images/stlbridalprosLogo_200x180.jpg", "image/jpeg");
    $logo_cid = $mime->_html_images[count($mime->_html_images) - 1]['cid'];
    $mime->addHTMLImage("images/adminLogin.gif", "image/gif");
    $loginButton_cid = $mime->_html_images[count($mime->_html_images) - 1]['cid'];
    $emailBody = "<p>Welcome to <b>St. Louis Bridal Professionals</b>!</p>";
    $emailBody .= "<p> A profile has been created for you, but you must fill in the information before your information will be made available on the website.</p>";
    $emailBody .= '<p><a href="http://www.stlbridalpros.com/vendorLogin.php">Click here login and finish your profile.</a></p>';
    $emailBody .= '<p>Keep your login details for reference:</p>';
    $emailBody .= '<p><b>Email: </b>' . $vendor->email . '</p>';
    $emailBody .= '<p><b>Password: </b>' . $vendor->password . '</p>';
<?php

include_once 'vendorsClass.php';
$vC = new vendorsClass();
$vendor = $vC->getVendorByID($_REQUEST['id']);
/*echo "vendor\n";
	print_r($vendor);
	echo "\n*******\n";*/
echo json_encode($vendor->isAdmin());
<?php

if (isset($_REQUEST['ssid']) && $_REQUEST['ssid'] != "0") {
    $ssid = $_REQUEST['ssid'];
    session_id($ssid);
}
session_start();
include_once 'vendorsClass.php';
$vpc = new vendorsClass('vendorList.xml');
$username = "";
$isAdmin = false;
$vendor = NULL;
if (isset($_SESSION['username'])) {
    $username = $_SESSION['username'];
    $vendor = $vpc->findVendorWithEmail($username);
    if (!is_null($vendor)) {
        $isAdmin = $vendor->isAdmin();
    }
}
if ($isAdmin) {
    if ($_REQUEST['vendorID'] != "") {
        $success = $vpc->removeVendor($_REQUEST['vendorID']);
        //print_r($vpc);
        echo json_encode($success);
    }
} else {
    echo json_encode(false);
}
<?php

$ssid = 0;
if (isset($_REQUEST['ssid']) && $_REQUEST['ssid'] != "0") {
    $ssid = $_REQUEST['ssid'];
    session_id($ssid);
    $ssidLink_continuing = "&ssid=" . $ssid;
    $ssidLink_starting = "?ssid=" . $ssid;
}
session_start();
include_once 'vendorsClass.php';
$newVendorOrdering = unserialize($_REQUEST['newOrder']);
$vpc = new vendorsClass('vendorList.xml');
$username = "";
$isAdmin = false;
$vendor = NULL;
if (isset($_SESSION['username'])) {
    $username = $_SESSION['username'];
    $vendor = $vpc->findVendorWithEmail($username);
    if (!is_null($vendor)) {
        $isAdmin = $vendor->isAdmin();
    }
}
if ($isAdmin) {
    //header('Location: http://www.stlbridalpros.com/vendorAdmin.php');
    $vpc->reorderVendors($newVendorOrdering);
    echo json_encode(true);
} else {
    echo json_encode(false);
}
        } else {
            $emailNotFound = true;
        }
    }
}
if (isset($_POST['users_email']) || isset($_POST['users_pass'])) {
    $attempted_login = true;
}
if (isset($_REQUEST['users_email'])) {
    $userNameToFillIn = $_REQUEST['users_email'];
} else {
    $userNameToFillIn = $_COOKIE['remember_me'];
}
if (isset($_POST['users_email']) && isset($_POST['users_pass'])) {
    include_once 'vendorsClass.php';
    $vpc = new vendorsClass('vendorList.xml');
    $vendor = $vpc->findVendorWithEmail($_POST['users_email']);
    if (!is_null($vendor)) {
        if ($vendor->password == $_POST['users_pass']) {
            $valid_login = true;
        }
    }
    if ($valid_login) {
        $year = time() + 31536000;
        if ($_POST['rememberMe']) {
            setcookie('remember_me', $_POST['users_email'], $year);
        } elseif (!$_POST['rememberMe']) {
            if (isset($_COOKIE['remember_me'])) {
                $past = time() - 100;
                setcookie('remember_me', gone, $past);
            }
<?php

if (isset($_REQUEST['ssid']) && $_REQUEST['ssid'] != "0") {
    $ssid = $_REQUEST['ssid'];
    session_id($ssid);
}
session_start();
if (isset($_SESSION['username'])) {
    include_once 'vendorsClass.php';
    $vC = new vendorsClass();
    $vendor = $vC->getVendorByID($_REQUEST['vendorID']);
    $vendor->vendorType = $_REQUEST['vendorType'];
    $vendor->vendorMembershipType = $_REQUEST['vendorMembershipType'];
    $vendor->save();
    echo json_encode(true);
} else {
    echo json_encode(false);
}
Esempio n. 11
0
<?php

$ssid = 0;
if (isset($_REQUEST['ssid'])) {
    $ssid = $_REQUEST['ssid'];
    session_id($ssid);
    $ssidLink_continuing = "&ssid=" . $ssid;
    $ssidLink_starting = "?ssid=" . $ssid;
}
session_start();
/*echo "Session info: <br>";
	print_r($_SESSION);
	echo "<br><br>";*/
include_once 'vendorsClass.php';
$vpc = new vendorsClass('vendorList.xml');
$username = "";
$isAdmin = false;
$vendor = NULL;
$valid_login = false;
if (isset($_SESSION['username'])) {
    $valid_login = true;
    $username = $_SESSION['username'];
    $vendor = $vpc->findVendorWithEmail($username);
    if (!is_null($vendor)) {
        $isAdmin = $vendor->isAdmin();
    }
}
//else echo "Warning Session Didn't Set<br>";
?>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,  user-scalable=no"/>