All pastes #279678 Raw Edit

Untitled

public html v1 · immutable
·published 2006-12-15 06:22 UTC
rendered paste body
<body><?php // indique le style par default // $default = "style";//formulaire envoyer // if(isset($_POST['swapstyle']))// fichier selectionner //{  if (file_exists("./".$_POST['stylecss']."    .css")) // duree de validiter du cookie 1 semaine//{    setcookie('stylecss', $_POST['stylecss'],	      time()+(604800)) ;// style selectionner style choisie du formulaire //    $style_select = $_POST['stylecss'] ;  } // sinon choisir le style par default //   else {    $style_select = $default;  }}// if any variable sending from form but a cookie is a life with this var use a style indicated by the cookie //elseif (isset($_COOKIE['stylecss'])){  $style_select = $_COOKIE['stylecss'] ;}// if first visit attach a default style defaultelse {  $style_select = $default ;}?><style type="text/css" title="currentStyle" media="screen">@import url("./<?php echo $style_select ?>.css");@import url("./menu.css");@import url("./style.css");</style><form action="<?php $_SERVER['PHP_SELF'] ?>"method="post"><select name="stylecss"><option value="style" <?php if ($style_select == 'style') { echo 'selected="selected"'; }?>>Normal</option><option value="style1" <?php if($style_select == 'style1') { echo 'selected="selected"'; }?>>style1</option></select><input type="submit" name="swapstyle" value="Changer"></form>