make expiry date relative (~10years)

This commit is contained in:
m-bene 2014-05-01 09:53:45 +02:00
parent ed7ca66045
commit b197f985e0
4 changed files with 3 additions and 8 deletions

View File

@ -114,11 +114,6 @@ define( "SCALE_BASE", 100 ); // The additional scalin
define( "STRF_FMT_DATETIME_DB", "%Y-%m-%d %H:%M:%S" ); // Strftime format for database queries, don't change define( "STRF_FMT_DATETIME_DB", "%Y-%m-%d %H:%M:%S" ); // Strftime format for database queries, don't change
define( "MYSQL_FMT_DATETIME_SHORT", "%y/%m/%d %H:%i:%S" ); // MySQL date_format shorter format for dates with time define( "MYSQL_FMT_DATETIME_SHORT", "%y/%m/%d %H:%i:%S" ); // MySQL date_format shorter format for dates with time
//
// zmSkin Cookie validity
//
define ( "ZMSKIN_COOKIE_EXPIRES", 2147483647 );
require_once( 'database.php' ); require_once( 'database.php' );
loadConfig(); loadConfig();

View File

@ -79,7 +79,7 @@ session_start();
if ( !isset($_SESSION['skin']) || isset($_REQUEST['skin']) ) if ( !isset($_SESSION['skin']) || isset($_REQUEST['skin']) )
{ {
$_SESSION['skin'] = $skin; $_SESSION['skin'] = $skin;
setcookie( "zmSkin", $skin, ZMSKIN_COOKIE_EXPIRES ); setcookie( "zmSkin", $skin, time()+3600*24*30*12*10 );
} }
require_once( 'includes/config.php' ); require_once( 'includes/config.php' );

View File

@ -85,7 +85,7 @@ foreach ( $tabs as $name=>$value )
if($tab == 'skins') { if($tab == 'skins') {
$current_skin = $_COOKIE['zmSkin']; $current_skin = $_COOKIE['zmSkin'];
if (isset($_GET['skin-choice'])) { if (isset($_GET['skin-choice'])) {
setcookie('zmSkin',$_GET['skin-choice'], ZMSKIN_COOKIE_EXPIRES ); setcookie('zmSkin',$_GET['skin-choice'], time()+3600*24*30*12*10 );
//header("Location: index.php?view=options&tab=skins&reset_parent=1"); //header("Location: index.php?view=options&tab=skins&reset_parent=1");
echo "<script type=\"text/javascript\">window.opener.location.reload();window.location.href=\"{$_SERVER['PHP_SELF']}?view={$view}&tab={$tab}\"</script>"; echo "<script type=\"text/javascript\">window.opener.location.reload();window.location.href=\"{$_SERVER['PHP_SELF']}?view={$view}&tab={$tab}\"</script>";
} }

View File

@ -85,7 +85,7 @@ foreach ( $tabs as $name=>$value )
if($tab == 'skins') { if($tab == 'skins') {
$current_skin = $_COOKIE['zmSkin']; $current_skin = $_COOKIE['zmSkin'];
if (isset($_GET['skin-choice'])) { if (isset($_GET['skin-choice'])) {
setcookie('zmSkin',$_GET['skin-choice'], ZMSKIN_COOKIE_EXPIRES ); setcookie('zmSkin',$_GET['skin-choice'], time()+3600*24*30*12*10 );
//header("Location: index.php?view=options&tab=skins&reset_parent=1"); //header("Location: index.php?view=options&tab=skins&reset_parent=1");
echo "<script type=\"text/javascript\">window.opener.location.reload();window.location.href=\"{$_SERVER['PHP_SELF']}?view={$view}&tab={$tab}\"</script>"; echo "<script type=\"text/javascript\">window.opener.location.reload();window.location.href=\"{$_SERVER['PHP_SELF']}?view={$view}&tab={$tab}\"</script>";
} }