Subversion Repositories cheapmusic

Rev

Rev 134 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11 - 1
<?php
121 - 2
include_once ('php/hosting.php');
65 - 3
include_once ('php/sessions_db.php');
4
include_once ('php/cryptor.php');
5
include_once ('php/tools.php');
121 - 6
include_once ("php/NonceUtil.php");
11 - 7
 
8
error_reporting(E_ALL);
9
 
70 - 10
$configFile = parse_ini_file($_SERVER['DOCUMENT_ROOT'] . FCM_CONFIGFILE, true);
11 - 11
$crypt = Cryptor::getInstance($configFile['cryptor']);
12
$tmpSessionTab = (isset($_POST["sessionTab"]) && $_POST["sessionTab"] > 0 ? $_POST["sessionTab"] : null);
13
$handler = MySessionHandler::getInstance($tmpSessionTab, $configFile['mysqli']);
121 - 14
$systemConf = $configFile['system'];
11 - 15
unset($configFile);
16
 
120 - 17
session_set_cookie_params(604800, '/', '.findcheapmusic.com', true, true);
11 - 18
session_set_save_handler($handler, true);
32 - 19
if (!empty($_COOKIE['PHPSESSID'])) {
20
    session_id($_COOKIE['PHPSESSID']);
21
}
11 - 22
session_start();
23
 
138 - 24
initSessionVariables($systemConf);
11 - 25
 
26
if ($_SERVER["REQUEST_METHOD"] == "POST") {
121 - 27
    if (!getPGV("nonce") || NonceUtil::check($systemConf["nonce_secret"], getPGV("nonce")) === false) {
120 - 28
        exit;
29
    }
121 - 30
 
134 - 31
    if (in_array($_POST["submitBtn"], array(
65 - 32
        'TableView',
33
        'CardView'
34
    ))) {
134 - 35
        $_SESSION["currentLayout"] = $_POST["submitBtn"];
127 - 36
        echo storeOfferHeader();
59 - 37
        echo printResultHeader();
65 - 38
        echo printResult();
59 - 39
        MySessionHandler::commit(session_id());
134 - 40
    } else if (in_array($_POST["submitBtn"], array("Apply", "Reset"))) {
41
        if ($_POST["submitBtn"] == "Reset") {
66 - 42
            resetDetailFilter();
43
        } else {
44
            detailFilterResults($_POST);
45
        }
46
 
127 - 47
        echo storeOfferHeader();
66 - 48
        echo printResultHeader();
49
        echo printResult();
50
        MySessionHandler::commit(session_id());
65 - 51
    }
70 - 52
}