Line 13... |
Line 13... |
13 |
include_once ($_SERVER['DOCUMENT_ROOT'] . '/php/sessions_db.php');
|
13 |
include_once ($_SERVER['DOCUMENT_ROOT'] . '/php/sessions_db.php');
|
14 |
include_once ($_SERVER['DOCUMENT_ROOT'] . '/php/cryptor.php');
|
14 |
include_once ($_SERVER['DOCUMENT_ROOT'] . '/php/cryptor.php');
|
15 |
include_once ($_SERVER['DOCUMENT_ROOT'] . '/php/wishlist.php');
|
15 |
include_once ($_SERVER['DOCUMENT_ROOT'] . '/php/wishlist.php');
|
16 |
include_once ($_SERVER['DOCUMENT_ROOT'] . '/php/clsLibGTIN.php');
|
16 |
include_once ($_SERVER['DOCUMENT_ROOT'] . '/php/clsLibGTIN.php');
|
17 |
include_once ($_SERVER['DOCUMENT_ROOT'] . '/php/constants.php');
|
17 |
include_once ($_SERVER['DOCUMENT_ROOT'] . '/php/constants.php');
|
- |
|
18 |
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/NonceUtil.php");
|
18 |
|
19 |
|
19 |
$configFile = parse_ini_file($_SERVER['DOCUMENT_ROOT'] . FCM_CONFIGFILE, true);
|
20 |
$configFile = parse_ini_file($_SERVER['DOCUMENT_ROOT'] . FCM_CONFIGFILE, true);
|
20 |
$crypt = Cryptor::getInstance($configFile['cryptor']);
|
21 |
$crypt = Cryptor::getInstance($configFile['cryptor']);
|
21 |
$tmpSessionTab = (isset($_POST["sessionTab"]) && $_POST["sessionTab"] > 0 ? $_POST["sessionTab"] : null);
|
22 |
$tmpSessionTab = (isset($_POST["sessionTab"]) && $_POST["sessionTab"] > 0 ? $_POST["sessionTab"] : null);
|
22 |
$handler = MySessionHandler::getInstance($tmpSessionTab, $configFile['mysqli']);
|
23 |
$handler = MySessionHandler::getInstance($tmpSessionTab, $configFile['mysqli']);
|
- |
|
24 |
$systemConf = $configFile['system'];
|
23 |
unset($configFile);
|
25 |
unset($configFile);
|
24 |
|
26 |
|
25 |
session_set_cookie_params(604800, '/', '.findcheapmusic.com', true, true);
|
27 |
session_set_cookie_params(604800, '/', '.findcheapmusic.com', true, true);
|
26 |
session_set_save_handler($handler, true);
|
28 |
session_set_save_handler($handler, true);
|
27 |
if (!empty($_COOKIE['PHPSESSID'])) {
|
29 |
if (!empty($_COOKIE['PHPSESSID'])) {
|
28 |
session_id($_COOKIE['PHPSESSID']);
|
30 |
session_id($_COOKIE['PHPSESSID']);
|
29 |
}
|
31 |
}
|
30 |
@session_start();
|
32 |
@session_start();
|
31 |
|
33 |
|
32 |
$uid = $_SESSION['sessData']['userID'];
|
34 |
$uid = $_SESSION['sessData']['userID'];
|
- |
|
35 |
$rc = 0;
|
- |
|
36 |
|
- |
|
37 |
if (empty($_POST["nonce"]) || NonceUtil::check($systemConf["nonce_secret"], $_POST["nonce"]) === false) {
|
- |
|
38 |
$msg = "Internal Error. Please reload page.";
|
- |
|
39 |
$rc = 1;
|
- |
|
40 |
}
|
- |
|
41 |
|
- |
|
42 |
if (!$rc && !empty($uid) && $uid > 0) {
|
33 |
|
43 |
|
34 |
if (!empty($uid) && $uid > 0) {
|
- |
|
35 |
if ($_POST['function'] == "delete") {
|
44 |
if ($_POST['function'] == "delete") {
|
36 |
$rc = deleteWishlist($uid, $_POST["id"]);
|
45 |
$rc = deleteWishlist($uid, $_POST["id"]);
|
37 |
}
|
46 |
}
|
38 |
else if ($_POST['function'] == "add") {
|
47 |
else if ($_POST['function'] == "add") {
|
39 |
$rc = addWishlist($uid, json_decode(base64_decode($_POST['wl'])));
|
48 |
$rc = addWishlist($uid, json_decode(base64_decode($_POST['wl'])));
|