Example #1
0
<?php

require_once 'include/functions.php';
require_once 'include/SessionCheck.php';
$sessionCheck = new SessionCheck();
$_SESSION['salt_value'] = $_SERVER['SCRIPT_NAME'];
$arrRooms = array();
$roomList = explode(';', getRequest('roomlist'));
if (count($roomList) > 0) {
    foreach ($roomList as $roomItem) {
        $roomData = explode(':', $roomItem);
        $arrRooms[$roomData[0]] = $roomData[1];
    }
}
?>
<!DOCTYPE html>
<html>
<head>
    <title>easiOffer</title>
    <!-- Latest compiled and minified Bootstrap CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <!-- Google Fonts : 1. font-family: 'Raleway', sans-serif; 2. font-family: 'Source Sans Pro', sans-serif; -->
    <link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro' rel='stylesheet' type='text/css'>
    <!-- font-awesome -->
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
    <link href="css/style.css" rel="stylesheet" type="text/css">
    <!-- my stuff -->
    <link href="css/main.css" rel="stylesheet" type="text/css">
    <link href="css/queries.css" rel="stylesheet" type="text/css">
</head>
Example #2
0
<?php

header('Content-Type: application/json');
require_once 'include/functions.php';
require_once 'include/SessionCheck.php';
$sessionCheck = new SessionCheck();
//result variable
$result = array('status' => 'error', 'messages' => array());
if ($sessionCheck->checkAjaxCall() == true) {
    if ($sessionCheck->checkKey(postRequest('hashkey'), sessionRequest('salt_value')) == true) {
        //added the verification on empty generated Captcha
        if (strtolower(postRequest('captcha')) !== strtolower(sessionRequest('captcha')) && sessionRequest('captcha') !== '') {
            array_push($result['messages'], 'error_captcha');
        }
        if (!filter_var(postRequest('email'), FILTER_VALIDATE_EMAIL)) {
            array_push($result['messages'], 'error_email');
        }
    } else {
        array_push($result['messages'], 'error');
    }
} else {
    array_push($result['messages'], 'error');
}
if (count($result['messages']) == 0) {
    $result['status'] = 'ok';
}
echo json_encode($result);
exit;