Subversion Repositories cheapmusic

Rev

Rev 108 | Rev 120 | 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');
11 - 6
 
7
error_reporting(E_ALL);
8
 
70 - 9
$configFile = parse_ini_file($_SERVER['DOCUMENT_ROOT'] . FCM_CONFIGFILE, true);
11 - 10
$crypt = Cryptor::getInstance($configFile['cryptor']);
11
$tmpSessionTab = (isset($_POST["sessionTab"]) && $_POST["sessionTab"] > 0 ? $_POST["sessionTab"] : null);
12
$handler = MySessionHandler::getInstance($tmpSessionTab, $configFile['mysqli']);
13
unset($configFile);
14
 
15
ini_set("session.cookie_httponly", 1);
16
ini_set("session.cookie_secure", 1);
17
session_set_save_handler($handler, true);
32 - 18
if (!empty($_COOKIE['PHPSESSID'])) {
19
    session_id($_COOKIE['PHPSESSID']);
20
}
11 - 21
session_start();
22
 
23
initSessionVariables();
24
 
25
if ($_SERVER["REQUEST_METHOD"] == "POST") {
108 - 26
    if (in_array($_POST["submit"], array(
65 - 27
        'TableView',
28
        'CardView'
29
    ))) {
30
        $_SESSION["currentLayout"] = $_POST["submit"];
108 - 31
        echo "<h2 class=\"text-center py-2\">Store Offers</h2>";
59 - 32
        echo printResultHeader();
65 - 33
        echo printResult();
59 - 34
        MySessionHandler::commit(session_id());
66 - 35
    } else if (in_array($_POST["submit"], array("Apply", "Reset"))) {
36
        if ($_POST["submit"] == "Reset") {
37
            resetDetailFilter();
38
        } else {
39
            detailFilterResults($_POST);
40
        }
41
 
108 - 42
        echo "<h2 class=\"text-center py-2\">Store Offers</h2>";
66 - 43
        echo printResultHeader();
44
        echo printResult();
45
        MySessionHandler::commit(session_id());
65 - 46
    }
70 - 47
}