Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Change Skin

a guest Jul 13th, 2018 17 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. <?php
  2.   ################################################################
  3.  # Change Skin 1.0 - 12/07/2018 © Alessandro Marinuzzi [Alecos] #
  4.  ################################################################
  5.  @ini_set('default_charset', 'UTF-8');
  6.   header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
  7.   header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
  8.   header("Cache-Control: no-store, no-cache, must-revalidate");
  9.   header("Cache-Control: post-check=0, pre-check=0", false);
  10.   header("Pragma: no-cache");
  11. ?>
  12. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  13.  
  14. <html>
  15.  
  16. <head>
  17.   <meta http-equiv="content-type" content="text/html;charset=utf-8">
  18.   <meta name="author" content="Alessandro Marinuzzi [Alecos]">
  19.   <meta name="generator" content="Notepad2">
  20.   <meta name="pragma" content="no-cache">
  21.   <meta name="robots" content="noindex, nofollow">
  22.   <title>Change Skin</title>
  23. <?php
  24.   if (isset($_POST['change'])) {
  25.     switch ($_POST['skin']) {
  26.       case 'finalfantasy.css':
  27.       setcookie('skin', 'finalfantasy.css', time()+31556926 ,'/');
  28.       $_COOKIE['skin'] = 'finalfantasy.css';
  29.       break;
  30.       case 'science.css':
  31.       setcookie('skin', 'science.css', time()+31556926 ,'/');
  32.       $_COOKIE['skin'] = 'science.css';
  33.       break;
  34.       case 'matrix.css':
  35.       setcookie('skin', 'matrix.css', time()+31556926 ,'/');
  36.       $_COOKIE['skin'] = 'matrix.css';
  37.       break;
  38.       case 'stylish.css':
  39.       setcookie('skin', 'stylish.css', time()+31556926 ,'/');
  40.       $_COOKIE['skin'] = 'stylish.css';
  41.       break;
  42.       default:
  43.       setcookie('skin', 'default.css', time()+31556926 ,'/');
  44.       $_COOKIE['skin'] = 'default.css';
  45.     }
  46.   }
  47.   if (isset($_COOKIE['skin'])) {
  48.     $my_skin = htmlspecialchars($_COOKIE['skin'], ENT_QUOTES);
  49.     echo "  <link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"$my_skin\">\r\n";
  50.   } else {
  51.     echo "  <link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"default.css\">\r\n";
  52.   }
  53. ?>
  54. </head>
  55.  
  56. <body>
  57.  
  58. <form name="skin" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" method="post">
  59. <select name="skin" class="skin">
  60. <option class="my_skin" value="finalfantasy.css"<?php if (isset($_COOKIE['skin']) && $_COOKIE['skin'] == 'finalfantasy.css') { echo ' selected'; } ?>>finalfantasy</option>
  61. <option class="my_skin" value="science.css"<?php if (isset($_COOKIE['skin']) && $_COOKIE['skin'] == 'science.css') { echo ' selected'; } ?>>science</option>
  62. <option class="my_skin" value="matrix.css"<?php if (isset($_COOKIE['skin']) && $_COOKIE['skin'] == 'matrix.css') { echo ' selected'; } ?>>Matrix</option>
  63. <option class="my_skin" value="stylish.css"<?php if (isset($_COOKIE['skin']) && $_COOKIE['skin'] == 'stylish.css') { echo ' selected'; } ?>>stylish</option>
  64. </select>
  65. <input class="button" type="submit" name="change" value="Change Skin">
  66. </form>
  67.  
  68. </body>
  69.  
  70. </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