Subversion Repositories cheapmusic

Rev

Rev 134 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php
error_reporting(E_ALL);

include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/hosting.php");
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/sessions_db.php");
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/cryptor.php");
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/constants.php");
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/media.php");
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/NonceUtil.php");
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/class.html.php");

$configFile = parse_ini_file(FCM_CONFIGFILE, true);
$crypt = Cryptor::getInstance($configFile['cryptor']);
$handler = MySessionHandler::getInstance('login', $configFile['mysqli']);
$systemConf = $configFile['system'];
unset($configFile);

session_set_cookie_params(604800, '/', '.' . $systemConf["domain_name"], true, true);
session_set_save_handler($handler, true);
if (!empty($_COOKIE['PHPSESSID'])) {
    session_id($_COOKIE['PHPSESSID']);
}

session_start();

$_SESSION["gtmId"] = (empty($systemConf["gtmId"]) ? "" : $systemConf["gtmId"]);
$_SESSION["nonce"] = NonceUtil::generate($systemConf["nonce_secret"]);
include_once ($_SERVER['DOCUMENT_ROOT'] . "/php/csp.php");

function timeStampUrl($file) {
    return "/" . $file . "?" . filemtime($_SERVER['DOCUMENT_ROOT'] . "/" . $file);
}