n/oldblog
Archived
1
0
Fork 0
This repository has been archived on 2024-02-13. You can view files and clone it, but cannot push or open issues or pull requests.
oldblog/webnews/settheme.php

49 lines
1.8 KiB
PHP
Raw Permalink Normal View History

2023-04-30 21:28:42 +02:00
<?php
include "include/lang.inc.php";
if ($lang == "fr")
{
$string1 = "Le th<74>me par d<>faut a bien <20>t<EFBFBD> chang<6E>, il s'agit maintenant de ";
$string2 = "Ce th<74>me a <20>t<EFBFBD> plac<61> dans un cookie sur votre machine, vous retrouverez donc ce th<74>me lors de votre prochaine visite !";
$string3 = "<p><b>PROBL<42>ME</b>: Il semblerait que votre navigateur n'accepte pas les cookies. Un cookie est utilis<69> pour sauvegarder le nom du th<74>me pendant et entre vos visites sur ce site.</p>
<p>...et franchement, ce serait bien dommage de passer <EFBFBD> c<EFBFBD>t<EFBFBD> d'un syst<EFBFBD>me de th<EFBFBD>mes <i>quasi-divin</i>, avouez... alors authorisez les cookies SVP.</p>";
$back = "Retour";
}
else
{
$string1 = "Default skin has been changed, it is now ";
$string2 = "This skin has been saved into a cookie on your machine, so it will be automaticaly selected during your next visit!";
$string3 = "<p><b>PROBLEM</b>: It seems that your browser doesn't accept cookies. A Cookie is used to save your skin during and between your visits.</p>
<p>...and you really don't want to miss that <i>wonderfull</i> skin system, do you? so make your browser accept cookies, please.</p>";
$back = "Back";
}
$theme=$_GET["theme"];
$time = time();
echo "
<html>
<head>
<title>Switching theme to $theme</title>
<META HTTP-EQUIV='Refresh' CONTENT='0; URL=".$_SERVER['HTTP_REFERER']."'>
<meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1' />
</head>
<body>";
// 60*60*24*30*12*5 = 155520000 (5 ans)
if (setcookie ("TourmentineThemeCookie",$theme, $time+155520000, "/", ".tourmentine.com")==TRUE)
{
echo "<p>$string1<b>$theme</b>.</p>
<p>$string2</p>";
}
else
{ echo $string3;
}
if ($_SERVER['HTTP_REFERER'] !="")
echo "<br /><a href='".$_SERVER['HTTP_REFERER']."'>$back</a>";
else
echo "<br /><a href=\"/\">$back</a>";
?>
</body>
</html>