Subversion Repositories cheapmusic

Rev

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

Rev Author Line No. Line
11 - 1
<?php
65 - 2
include_once ('php/dnsexit.php');
3
include_once ('php/sessions_db.php');
4
include_once ('php/cryptor.php');
5
include_once ('php/tools.php');
120 - 6
include_once ($_SERVER['DOCUMENT_ROOT'] . "/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']);
120 - 14
$nonceSecret = $configFile['nonce']['secret'];
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
 
24
initSessionVariables();
25
 
26
if ($_SERVER["REQUEST_METHOD"] == "POST") {
120 - 27
/*    print_r($_POST);
28
    if (empty($_POST["nonce"]) || NonceUtil::check($nonceSecret, $_POST["nonce"]) === false) {
29
        exit;
30
    }
31
    $_SESSION["nonce"] = $_POST["nonce"];
32
*/
108 - 33
    if (in_array($_POST["submit"], array(
65 - 34
        'TableView',
35
        'CardView'
36
    ))) {
37
        $_SESSION["currentLayout"] = $_POST["submit"];
108 - 38
        echo "<h2 class=\"text-center py-2\">Store Offers</h2>";
59 - 39
        echo printResultHeader();
65 - 40
        echo printResult();
59 - 41
        MySessionHandler::commit(session_id());
66 - 42
    } else if (in_array($_POST["submit"], array("Apply", "Reset"))) {
43
        if ($_POST["submit"] == "Reset") {
44
            resetDetailFilter();
45
        } else {
46
            detailFilterResults($_POST);
47
        }
48
 
108 - 49
        echo "<h2 class=\"text-center py-2\">Store Offers</h2>";
66 - 50
        echo printResultHeader();
51
        echo printResult();
52
        MySessionHandler::commit(session_id());
65 - 53
    }
70 - 54
}