daily pastebin goal
69%
SHARE
TWEET

Skin PHP

a guest Jul 11th, 2018 5 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); #Data Passata
  3.  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); #Sempre Modificato
  4.  header("Cache-Control: no-store, no-cache, must-revalidate"); #HTTP/1.1
  5.  header("Cache-Control: post-check=0, pre-check=0", false);
  6.   header("Pragma: no-cache"); #HTTP/1.0
  7. ?>
  8. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  9.  
  10. <html>
  11.  
  12. <head>
  13.   <meta http-equiv="content-type" content="text/html;charset=utf-8">
  14.   <meta name="author" content="Alessandro Marinuzzi [Alecos]">
  15.   <meta name="generator" content="Notepad2">
  16.   <meta name="pragma" content="no-cache">
  17.   <meta name="robots" content="noindex, nofollow">
  18.   <title>CSS Skin</title>
  19. <?php
  20.   if (isset($_POST['change'])) {
  21.     switch ($_POST['skin']) {
  22.       case 'colorato.css':
  23.       setcookie('skin', 'colorato.css', time()+31556926 ,'/');
  24.       $_COOKIE['skin'] = 'colorato.css';
  25.       break;
  26.       case 'riposante.css':
  27.       setcookie('skin', 'riposante.css', time()+31556926 ,'/');
  28.       $_COOKIE['skin'] = 'riposante.css';
  29.       break;
  30.       case 'matrix.css':
  31.       setcookie('skin', 'matrix.css', time()+31556926 ,'/');
  32.       $_COOKIE['skin'] = 'matrix.css';
  33.       break;
  34.       case 'verde.css':
  35.       setcookie('skin', 'verde.css', time()+31556926 ,'/');
  36.       $_COOKIE['skin'] = 'verde.css';
  37.       break;
  38.       default:
  39.       setcookie('skin', 'default.css', time()+31556926 ,'/');
  40.       $_COOKIE['skin'] = 'default.css';
  41.     }
  42.   }
  43.   if (isset($_COOKIE['skin'])) {
  44.     $my_skin = htmlspecialchars($_COOKIE['skin'], ENT_QUOTES, 'ISO-8859-1');
  45.     echo "  <link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"$my_skin\">\r\n";
  46.   } else {
  47.     echo "  <link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"dafault.css\">\r\n";
  48.   }
  49. ?>
  50. </head>
  51.  
  52. <body>
  53.  
  54. <form name="skin" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
  55. <select name="skin" class="skin">
  56. <option class="option_skin" value="colorato.css"<?php if (isset($_COOKIE['skin']) && $_COOKIE['skin'] == 'colorato.css') { echo ' selected'; } ?>>Colorato</option>
  57. <option class="option_skin" value="riposante.css"<?php if (isset($_COOKIE['skin']) && $_COOKIE['skin'] == 'riposante.css') { echo ' selected'; } ?>>Riposante</option>
  58. <option class="option_skin" value="matrix.css"<?php if (isset($_COOKIE['skin']) && $_COOKIE['skin'] == 'matrix.css') { echo ' selected'; } ?>>Matrix</option>
  59. <option class="option_skin" value="verde.css"<?php if (isset($_COOKIE['skin']) && $_COOKIE['skin'] == 'verde.css') { echo ' selected'; } ?>>Verde</option>
  60. </select>
  61. <input class="button" type="submit" name="change" value="Cambia Skin">
  62. </form>
  63.  
  64. </body>
  65.  
  66. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top