<?php
/************************************************************************/
/*                                WEBSHARE                              */
/************************************************************************/
//
// Copyright (c) 2008 by Virginie Vivancos
// http://www.webshare.fr
//
// This program is free software. You can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License.
//
// =======================================================================
// Fonction : Change le style d'affichage
// Nom      : changestyle.php
// Version  : 0.6.5
// Date     : 28/05/08
// =======================================================================
session_start();
if (!empty($_REQUEST["nomstyle"])) {
      $_SESSION["ws"]["styleUser"]= $_REQUEST["nomstyle"];
      $_SESSION["ws"]["cheminImg"]= "style/".$_REQUEST["nomstyle"]."/images/";
      $_SESSION["ws"]["cheminIcn"]= "style/".$_REQUEST["nomstyle"]."/icones/";
    $_SESSION["ws"]["formatExt"]  = "png";

    if (($handle = @opendir("../".$_SESSION["ws"]["cheminIcn"]))!==false) {
      while (false !== ($entry = readdir($handle)))
      if (stristr($entry,".gif")!==false) $_SESSION["ws"]["formatExt"]  = "gif";
        closedir($handle); } else $_SESSION["ws"]["formatExt"]  = "gif";
}
if (!empty($_REQUEST["nomtri"]))   $_SESSION["ws"]["triUser"]=$_REQUEST["nomtri"];
if (!empty($_REQUEST["nomtype"]))  $_SESSION["ws"]["visuUser"]=$_REQUEST["nomtype"];
if (!empty($_REQUEST["nomsens"]))  $_SESSION["ws"]["senstriUser"]=$_REQUEST["nomsens"];
?>