Index: extensions/cuise/admin/admin.inc.php
===================================================================
--- extensions/cuise/admin/admin.inc.php	(revision 19486)
+++ extensions/cuise/admin/admin.inc.php	(revision 19486)
@@ -0,0 +1,412 @@
+<?php
+load_language('theme.lang', PHPWG_THEMES_PATH.'cuise/');
+$params = array_merge(unserialize($conf['cuise']));
+
+if (!defined('PHPWG_ROOT_PATH'))
+{
+  die ("Hacking attempt!");
+}
+
+include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+include_once(PHPWG_ROOT_PATH.'include/template.class.php');
+include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
+
+
+check_status(ACCESS_ADMINISTRATOR); 
+global $themeconf,$parent,$user;
+ global $nb_template;
+ $nb_template=5 ;
+global $id;
+
+include_once(PHPWG_ROOT_PATH.'themes/cuise/themeconf.inc.php');
+$save_options=false ;
+
+ define ('PHPWG_THEME_PATH',PHPWG_THEMES_PATH.$themeconf['name']."/" );
+
+$my_base_url="admin.php?page=theme&amp;theme=".$themeconf['name'];
+$tabsheet = new tabsheet();
+$tabsheet->add( 'admin',
+                l10n('admin'),
+                $my_base_url.'&amp;tab=admin'
+			   );
+ 
+$tabsheet->add( 'texture',
+                l10n('texture'),
+                $my_base_url.'&amp;tab=texture'
+			   );
+			   
+    
+			   
+	if (!isset($_GET['tab']))
+	   $page['tab'] = 'admin';
+else
+       $page['tab'] = $_GET['tab'];	
+	   
+ $tabsheet->select($page['tab']);
+ $tabsheet->assign();
+ /************************* 
+ *
+ *************************/
+ if(!function_exists("cl_print_var")){
+   function cl_print_var($variables){
+    ob_start();
+    echo '<pre>';
+    print_r($variables);
+    echo '</pre>';
+    $m= ob_get_contents();
+    ob_end_clean();
+    return $m;		
+  }
+}
+
+
+if (isset($_POST['submit'])){
+ $val_id=$_POST['submit'];
+  $save_options=true ;
+}
+if (isset($_POST['compiled-templates']) ){
+      $template->delete_compiled_templates();
+      $FileCombiner = new  FileCombiner("tpl") ;
+      $FileCombiner::clear_combined_files();
+    //  array_push($page['infos'],l10n('parent') . ":" . $_POST['compiled-templates']);
+      array_push($page['infos'], l10n('delete_compiled'));
+      $parent=$_POST['compiled-templates'];
+      $save_options=true ;
+  }
+for($id=0;$id<$nb_template;$id++){
+  if (!isset($params["chk_cuise_$id"])){
+      $_POST['default']=true ;
+  }
+}
+ $id=0;
+
+
+if (isset($_POST['default']) || !isset($params['chk_cuise_0'])   ){
+ 
+  $params['parent']=  $parent ;
+   $params['theme']=  'cuise' ;
+  $name=array("cbmt.gif","bpv.png","bp3.jpg","bph.png","header.png");
+  for($id=0;$id<$nb_template;$id++){
+  $params  = array_merge($params,array( 			
+						"bg_cuise_$id"			=> '#FFA800',
+						"bgho_cuise_$id"			=> '#0072FF',
+						"bd_cuise_$id"			=> '#4F4F4F',
+						"co_cuise_$id"		  => '#4F4F4F',
+            "coho_cuise_$id"		  => '#F4F4F4',
+            "img_cuise_$id"    =>   $name[$id],
+            "rayon_cuise_$id"    => '8px',
+            "chk_cuise_$id"      => '',
+            "chk_cuise_x_$id"      => '',
+            "chk_cuise_y_$id"      => '',
+           
+            ));
+            }
+            $id=0;
+    array_push($page['warnings'], cl_print_var($params));
+       $save_options=true ;
+
+}
+$params = array_merge(unserialize($conf['cuise']));
+
+
+if ($save_options==true) {
+  $i="0";  
+  $New_params=array();
+  $j=$i;
+  for($i=0;$i<$nb_template;$i++){
+   if( isset($_POST["bg_cuise_$i"]) ) {
+
+   $img_src= (isset($_POST["img_cuise_$i"])&&$_POST["img_cuise_$i"]!="")?$_POST["img_cuise_$i"]:$params["img_cuise_$i"] ;
+ 
+        $New_params  = array(	            
+					  "bg_cuise_$i"			=> isset($_POST["bg_cuise_$i"])?$_POST["bg_cuise_$i"]:$params["bg_cuise_$i"], 
+            "bgho_cuise_$i"			=> isset($_POST["bgho_cuise_$i"])?$_POST["bgho_cuise_$i"]:$params["bgho_cuise_$i"], 
+					  "bd_cuise_$i"			=> isset($_POST["bd_cuise_$i"])?$_POST["bd_cuise_$i"]:$params["bd_cuise_$i"], 
+					  "co_cuise_$i"		 => isset($_POST["co_cuise_$i"])?$_POST["co_cuise_$i"]:$params["co_cuise_$i"], 
+					  "coho_cuise_$i"		 => isset($_POST["coho_cuise_$i"])?$_POST["coho_cuise_$i"]:$params["coho_cuise_$i"], 
+            "img_cuise_$i"    =>$img_src, 
+            "rayon_cuise_$i"    => isset($_POST["rayon_cuise_$i"])?$_POST["rayon_cuise_$i"]:$params["rayon_cuise_$i"],    
+            "chk_cuise_$i"    => isset($_POST["chk_cuise_$i"])?"checked":"no",  
+            "chk_cuise_x_$i"    => isset($_POST["chk_cuise_x_$i"])?"checked":"no",       
+            "chk_cuise_y_$i"    => isset($_POST["chk_cuise_y_$i"])?"checked":"no",      
+            );
+            $id=$i;
+            break;
+        }
+}
+
+ $i=$j; 
+  $params  = array_merge($params,$New_params ,array('parent' => $parent,
+  "theme" => PHPWG_THEMES_PATH.$themeconf['name']."/"
+  ));
+  
+// array_push($page['warnings'],  print_r($params,true));
+  conf_update_param('cuise', pwg_db_real_escape_string(serialize($params)));
+  array_push($page['infos'], l10n('Your configuration settings are saved'));
+  load_conf_from_db();
+  $params = array_merge(unserialize($conf['cuise']));
+  $keys=$params;
+}
+
+// array_push($page['warnings'], print_r($parent,true) );
+//  array_push($page['warnings'], print_r($params,true));
+
+$params = array_merge(unserialize($conf['cuise']));
+
+$name_tpl = array("fondBG","fondBp","fondHoriz","fondVert","Header" );
+
+
+if(isset($val_id)){
+  $ids = explode("_",$val_id) ;
+  $id= ( isset($ids[1]) ) ? $ids[1]  :0;
+  
+ }
+$id=  isset( $_POST["sel_tab"]  ) ? $_POST["sel_tab"]: $id;
+ 
+ if(!isset($id)) $id=0;
+  //==============================================
+ // $list_themes = get_list_dirs("themes");
+ 
+  get_list_theme();
+
+
+$template->assign(array(
+             'root' => PHPWG_ROOT_PATH,
+            'theme' => PHPWG_THEME_PATH,
+             "classeRoot" =>  PHPWG_THEMES_PATH.'cuise/admin/classes/' ,
+            'parent'		=> $parent,
+             
+            'nb_template' => $nb_template,
+            'ind'			=> $id,
+            'name_tpl'			=> $name_tpl,
+						'selected_bg_cuise'			=> $params['bg_cuise_'.$id],
+            'selected_bgho_cuise'			=> $params['bgho_cuise_'.$id],
+						'selected_bd_cuise'			=> $params['bd_cuise_'.$id],
+						'selected_co_cuise'		=> $params['co_cuise_'.$id],
+            'selected_coho_cuise'		=> $params['coho_cuise_'.$id],
+            'selected_img_cuise'		=> $params['img_cuise_'.$id],
+'selected_x_cuise'		=> $params['chk_cuise_x_'.$id],
+'selected_y_cuise'		=> $params['chk_cuise_y_'.$id],
+            'selected_rayon_cuise'		=> $params['rayon_cuise_'.$id],
+
+            'selected_chk_cuise'		=> ($params['chk_cuise_'.$id]=="checked")?"checked":"",
+            'params'		=> pwg_db_real_escape_string(serialize($params)),
+
+						));
+//===============================================
+ if (isset($_GET['hlp'])){
+   global      $BGIMGcss, $BGcolcss;
+  if ($_GET['hlp']=="1") 
+        $theme_css= "themes/".$themeconf['name']."/theme.css.css";
+    else if ($_GET['hlp']=="2") 
+        $theme_css= "themes/".$themeconf['parent']."/theme.css";
+    else if ($_GET['hlp']=="3") 
+        $theme_css= "themes/".$themeconf['name']."/theme.css.php";
+    else {
+    $path="themes/".$themeconf['name']."/";
+    $theme_css=$path."theme.css.php";
+      if(!file_exists($theme_css)){
+               $theme_css=$path."css/style.css";
+               if(!file_exists($theme_css)){              
+                  $theme_css=$path."css/theme.css";
+                  if(!file_exists($theme_css)){     
+                      $theme_css=$path."style.css";
+                      if(!file_exists($theme_css)){     
+                         $theme_css=$path."theme.css";
+                  }
+                  }
+               }
+
+         
+        }
+    }
+  $arguments = $conf['cuise'];
+
+$Css =css($theme_css); 
+
+$message  =$theme_css."<br>";
+//$message .= cl_print_var($Css)."<br>";
+//$message .= cl_print_var($BGIMGcss)."<br>";
+$message .= cl_print_var($BGcolcss)."<br>";
+
+   array_push($page['infos'], $message);
+}
+//=============================================== 
+
+$template->assign('options', unserialize($conf['cuise']));
+switch ($page['tab']) {
+ case 'admin':
+     $template->set_filenames(array('theme_admin_content' => dirname(__FILE__) . '/cuise_admin.tpl'));
+     $template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content');
+ break;
+ case 'texture':
+$template->set_filenames(array('theme_admin_content' => dirname(__FILE__) . '/cuise_texture.tpl'));
+  $template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content');
+  break ;
+
+}
+
+//================================================
+function css($theme_local) {	
+ global      $BGIMGcss, $BGcolcss;
+ $BGIMGcss=Array();
+     $BGcolcss=Array();
+      
+    $path = $_SERVER['DOCUMENT_ROOT'];
+    if (substr($path,-1)=='/'){
+              $path =  substr($path,0,-1);
+          }
+     if(isset($_GET['path'])) 
+              $path=$_GET['path'];
+          else
+              $path=PHPWG_ROOT_PATH."local/css/";
+
+            $path="";
+              $mycssfile=$path.$theme_local;
+
+              if(!file_exists($theme_local))
+            
+               $mycssfile=$path."default-rules.css";
+
+               if(!file_exists($mycssfile)){              
+              return Array();
+               }
+
+ 
+
+function remove_comments( & $string ) { 
+    $order   = array("/}/","/\r\n/",'#/\*.*?\*/#s','/\n/','/\r/','/\s[\s]+/');
+    $replace = array('}|' ,''      ,''            ,''    ,''    ,''         );
+  $string = preg_replace($order, $replace,$string); 
+  echo  ($string)."<br>"; 
+    //  $string = preg_replace('#/\*.*?\*/#s',"",$string); 
+       return $string;
+}
+    
+ $ret =   file_get_contents ($mycssfile);  
+   echo $ret;
+
+  $string= remove_comments( $ret);
+ echo  ($string);   
+
+    $newstr = explode('|',$ret);
+    $css=Array();
+     $BGIMGcss=Array();
+     $BGcolcss=Array();
+    $order   = array('/[\s]+/','/}/');
+    $replace = array(' ',"");
+
+
+  foreach ($newstr as $key => $value) {   
+   
+   $value = preg_replace($order, $replace, $value);  
+    $value = trim($value);    
+
+
+   if($value){
+echo $value."<br>";
+      $css2=Array();
+      $key = explode("{",$value); 
+      $key_id=   $key[0];
+      if(isset($key[1]))
+      $value = $key[1] ;
+     
+      $value=explode(";",$value); 
+           foreach ($value as $key2 => $value2) {   
+            if($value2){
+            
+            $value2 = str_replace(" ", '', $value2);  
+           
+
+              $key2=explode(":",$value2);    
+              if(isset($key2[1])) {       
+                $key2[0]=trim($key2[0]);  
+                $css2[$key2[0]] = trim($key2[1]) ; 
+                
+
+                if(preg_match("/url/",$key2[1])){
+                   $head = preg_replace("#(.*)url.(.*?)\)(.*)#is", '$2', $key2[1]);   
+                   echo  $head." ".$key2[0]." ".$key_id."<br>";
+                    $BGIMGcss[$head]=array_merge(array(
+                    "head" => $head,
+                    "clef" => $key_id,
+                    "val" => $key2[0],
+                    ));
+                 
+                  }elseif(preg_match("/(color)/",$key2[0])){ 
+                      $head = preg_replace("#(.*)color.(.*?);(.*)#is", '$2', $key2[1]);
+                      echo  $head." ".$key2[0]." ".$key_id."<br>";
+                     
+                   $BGcolcss[$head]=array_merge(array(
+                    "head" => $head,
+                    "clef" => $key_id,
+                    "val" => $key2[0],
+                    ));
+                  
+                  }else{
+                    // echo " no " . $key_id . "{" . $key2[0] . " : " . $key2[1] ."}<br>";
+                  }
+               }
+            }
+           }      
+          
+              
+      $css[$key_id]=$css2 ;
+     }   
+}
+echo cl_print_var($css);
+die();
+             return $css;
+        }
+
+
+function get_list_theme()
+{
+  global $user, $template, $conf,$parent;  
+  foreach (get_pwg_themes() as $id => $name) {
+    $img =  PHPWG_THEMES_PATH.$id.'/screenshot.png';         
+    if (file_exists($img)) {
+      $theme = array(
+        'id' => $id,
+        'name' => $name,
+        'url' => add_url_params( duplicate_index_url(), array('theme'=>$id) ),
+        'img' => $img,
+        );        
+      if ($id==$parent){
+        $template->assign('list_themes_active', $theme);
+      }
+      
+      $template->append('list_themes', $theme);
+    }
+  } 
+  }
+
+function get_list_dirs($path='')
+{
+  $options = array();
+ global $parent ;
+ $options= array(); 
+  if (is_dir($path)) {
+    $fh = opendir($path);
+    while ($file = readdir($fh))
+    {
+      $pathfile = $path . '/' . $file;
+      if ($file != '.' and $file != '..' and $file != '.svn' and is_dir($pathfile))
+      {
+ 
+
+    $options[$file] = array(
+      'name' => $file,
+      'url' => $pathfile,
+      'select' =>  ($file==$parent) ? 'selected="selected"' :  "false",
+      );
+  
+      }
+    }
+    closedir($fh);
+  } 
+  return $options;
+}
+
+
+ ?>
Index: extensions/cuise/admin/classes/ImgLoad.php
===================================================================
--- extensions/cuise/admin/classes/ImgLoad.php	(revision 19486)
+++ extensions/cuise/admin/classes/ImgLoad.php	(revision 19486)
@@ -0,0 +1,257 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')){
+  die ("Hacking attempt!");
+}
+
+
+class AjaxImgupload{
+	var $options = array(); 
+	/* constructor */
+	function __construct($options = array()){
+
+		/* default configuration */ 
+
+    $this->options = array( 'rootImg' => "/images/",
+		'destDir'=>'/images/',
+		'upload_url'=>'/images/',
+    'file_support'=>array('jpeg', 'jpg', 'png', 'gif','bmp' ),
+		'max_size'=>array(
+				'jpeg'=>'20111110',
+        'jpg'=>'2011110',
+        'gif'=>'2011110',
+        'png'=>'2011110',
+        'bmp'=>'2011110',
+				'txt'=>'500'
+				),		
+		'thumbnail_dir'=>'/images/',
+		'thumbnail_url'=>'/images/',
+		'thumbnail_dimension'=>array("max_width"=>200,"max_height"=>200)				
+		);
+
+		/* replace with customi condiguration */
+		$this->options = array_replace_recursive($this->options, $options);
+	}
+	/****** add file to repository *********/
+	function addFile()	{
+		/* validate uploaded file */
+		$this->validate();		
+	}
+	/******************************
+	*	validate file
+	*	 -  file size
+	*	 -  supported file type
+	*	 -  any kind of error in file upload
+	*******************************/
+	function validateFiles()	{
+		$errorslist = array();
+		$details = array();
+		foreach($_FILES as $key=>$value){
+			//print $key;
+			$name = $value['name'];
+			$type = $value['type'];
+			$size = $value['size'];
+			
+			$extension = strtolower(substr(strstr($name,"."),1));
+
+ 			/* extension check */
+			if(!in_array($extension,$this->options['file_support']))			{
+				$errorslist[$key][$name][] = "File is not of correct type";continue;
+			}      
+
+			/* Size of file check*/
+      if ( isset($this->options['max_size'][$extension]) ){
+        if(1024 * $this->options['max_size'][$extension] < $size)	{
+				    $errorslist[$key][$name][] = "File is too large".$size;
+				    continue;
+			    } 
+			}else{
+      $errorslist['error'] = $extension . " no max-size " . print_r($this->options['max_size'],true) ;
+     
+      }
+
+
+			/* mime type check */
+			if(!in_array($extension,$this->options['file_support']))			{
+				$errorslist[$key][$name][] = "File is not of correct type";continue;
+			}
+			/* check for any kind of error in file upload */
+			if($value['error']!=0)			{
+				$errorslist[$key][$name][] = "There was some error while uploading file. Please try again.";continue;	
+			}
+			/* generate unique name for file */
+			   $filename = rand(10,10000)."_".date("Ymdh").".".$extension;
+			/* move file from temporary location to some location */			
+     
+			move_uploaded_file($value['tmp_name'], $this->options['destDir']."$filename");
+      move_uploaded_file($value['tmp_name'], $this->options['destDir']."new.png");
+
+			if(isset($this->options['thumbnail_dir']))			{
+				$this->createThumbnail($filename);	
+			}
+			
+			$details['files'][] = array(
+      "name"=>$filename,
+      "upload_name"=>$name,
+      'thumbimgurl'=>$this->options['destDir'].$filename,
+      'imgUrl'=>$this->options['destDir'].$filename,
+      'action'=>'added',
+      'errors'=> $errorslist
+      
+      );
+			
+
+		}
+			
+		if(isset($this->options['callback']))
+		{
+			call_user_func($this->options['callback'],$details['files']);
+		}
+		return $details;
+		
+	}
+
+	/******************************************************
+	*this function generate thumbnail for uploaded images
+	*******************************************************/
+	function createThumbnail($file_name)	{
+		$dimension = $this->options['thumbnail_dimension'];
+		$file_path = $this->options['destDir'].$file_name;
+		$new_file_path = $this->options['thumbnail_dir'].$file_name;
+		list($img_width, $img_height) = @getimagesize($file_path);
+		
+		if (!$img_width || !$img_height) {
+		    return false;
+		}
+		$scale = min(
+		    $dimension['max_width'] / $img_width,
+		    $dimension['max_height'] / $img_height
+		);
+		
+		if ($scale >= 1) {
+		    if ($file_path !== $new_file_path) {
+		        return copy($file_path, $new_file_path);
+		    }
+		    return true;
+		}
+		
+		$new_width = $img_width * $scale;
+		$new_height = $img_height * $scale;
+		$new_img = @imagecreatetruecolor($new_width, $new_height);
+		
+		switch (strtolower(substr(strrchr($file_name, '.'), 1))) {
+		    case 'jpg':
+		    case 'jpeg':
+					
+		        $src_img = @imagecreatefromjpeg($file_path);
+		        $write_image = 'imagejpeg';
+		        $image_quality = 75;
+		        break;
+		    case 'gif':
+		        @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
+		        $src_img = @imagecreatefromgif($file_path);
+		        $write_image = 'imagegif';
+		        $image_quality = null;
+		        break;
+		    case 'png':
+		        @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
+		        @imagealphablending($new_img, false);
+		        @imagesavealpha($new_img, true);
+		        $src_img = @imagecreatefrompng($file_path);
+		        $write_image = 'imagepng';
+		        $image_quality = 9;
+		        break;
+		    default:
+		        $src_img = null;
+		}
+		$success = $src_img && @imagecopyresampled(
+		    $new_img,
+		    $src_img,
+		    0, 0, 0, 0,
+		    $new_width,
+		    $new_height,
+		    $img_width,
+		    $img_height
+		) && $write_image($new_img, $new_file_path, $image_quality);
+	
+		// Free up memory (imagedestroy does not delete files):
+		@imagedestroy($src_img);
+		@imagedestroy($new_img);
+		return $success;
+	}
+	
+	/* Remove file from disk and call user function to clean related to file from database */
+	function removeFile($names=array())	{
+		$details = array();
+		foreach($names as $name){
+			$status = array("name"=>$name,'action'=>'deleted');
+			$status['status'] = $this->unlinkImages($name);
+			$details['files'][] = $status;	
+		}
+		if(isset($this->options['callback']))		{
+				call_user_func($this->options['callback'],$details['files']);
+		}
+		return true; 	
+	}
+
+	/* File delete */
+	function unlinkImages($name)	{
+		if(file_exists($this->options['destDir'].$name))
+		{
+			@unlink($this->options['destDir'].$name);
+			@unlink($this->options['thumbnail_dir'].$name);
+			return true;	
+		}
+		else
+			return false;
+	}
+
+	/* Return all file */	
+	function getFilesDetails()	{	 
+		$files = array();
+		if(isset($this->options['loadcallback']))
+		$files = call_user_func($this->options['loadcallback'],$this);
+		return $files;
+	}
+
+	/* get thumbnail url */
+	function getFile($id,$thumb=true)	{
+		return $this->options['thumbnail_url'].$id;
+	}	
+
+	/* 
+		interaction related to common functionality
+		- addimg  upload image to repository
+		- getfilethumb get file thumbnail as when required
+		- deleteimg delete image from server
+		- retrive all image details located on server
+
+	*/
+	function responder($action=''){			
+		switch($action)
+		{
+			case "addimg":
+				$details = $this->validateFiles();
+				print "<html><body>";
+				print(json_encode($details));
+				print "</body></html>";
+				break;
+			case "getfilethumb":
+				print $this->getFile($_REQUEST['action'],$name);
+				break;
+			case "deleteimg":
+				$filenames = explode(",",$_REQUEST['name']);
+				print $this->removeFile($filenames);
+				break;
+			case "getimages":
+				$details = $this->getFilesDetails();
+				print "<html><body>";
+				print(json_encode($details));
+				print "</body></html>";
+				break;
+		}
+
+	}
+
+}
+?>
Index: extensions/cuise/admin/classes/process.php
===================================================================
--- extensions/cuise/admin/classes/process.php	(revision 19486)
+++ extensions/cuise/admin/classes/process.php	(revision 19486)
@@ -0,0 +1,95 @@
+<?php
+$racine='../../../../';
+$racine_up='../../../.';
+  if(isset($_GET['root'])){
+    $root=  $racine_up.$_GET['root'] ;
+    $root_img=  $racine_up.$_GET['root_img'] ;
+    $root_theme=  $racine_up.$_GET['root_theme'] ;
+ } 
+ 
+
+ define ('PHPWG_ROOT_PATH',$root);
+ define ('PHPWG_THEMES_PATH',PHPWG_ROOT_PATH."themes/" );
+ define ('PHPWG_THEME_PATH', $root_theme );
+
+
+include("ImgLoad.php");
+/*************************************************************
+*	server destDir - location where image will be uploaded
+*	upload_url	  - http address to access image
+*	max_size 	  - Maximum size for image or file type
+*	file_support	  - Supported file type
+*	thumbnail_dir     - Location of thumbnail on server
+*	thumbnail_dimension - dimension of thumbnail to displayed
+*	callback 	  - when image is created/uploaded on server , this function is called to store information in database or anything eg.  add_userEntry
+*	loadcallback	  - this function is called to retrive details of all images stored so far on *server eg. getalldetails	
+***************************************************************/
+
+ 
+/* configuration options */
+$options = array();
+$options = array( 'rootImg' => $root_img,
+		'destDir'=>$root_img,
+		'upload_url'=>$root_img,
+		'max_size'=>array(
+				'jpeg'=>'20111110',
+        'jpg'=>'2011110',
+        'gif'=>'2011110',
+        'png'=>'2011110',
+        'bmp'=>'2011110',
+				'txt'=>'500'
+				),
+
+		'file_support'=>array('jpeg', 'jpg', 'png', 'gif','bmp' ),
+	  
+  	    'thumbnail_dir'=>$root_img ,
+		    'thumbnail_url'=>$root_img ,
+		    'thumbnail_dimension'=>array("max_width"=>120,"max_height"=>120)		
+   		
+		);
+
+//  $options['callback'] = 'add_userEntry';
+//  $options['loadcallback'] = 'getalldetails';
+   $options['loadcallback'] = 'get_list_images';
+
+ $options['root'] = '.';
+$userid = 5;
+$action = $_REQUEST['action'];
+ 
+$Filehandler = new AjaxImgupload($options);
+$Filehandler->responder($action);
+ 
+
+ 
+function get_list_images($obj){
+ 
+   $path_img=$obj->options['destDir'] ;
+   $path= $path_img; 
+   if (is_dir($path)) {
+    
+                $fh = opendir($path);
+ 	              $details = array();
+	              $details['files'] = array();
+                while ($file = readdir($fh)){             
+                  $pathfile = $path .  $file; 
+                  if ($file != '.' and $file != '..' and $file != '.svn' and !is_dir($pathfile)){                     
+		                $details['files'][] = array(
+                          "name"=>$file,
+                          "upload_name"=>$file,
+                          'thumbimgurl'=>$pathfile,
+                          'action'=>'loaded',
+                          'imgUrl'=>$path_img.$file,
+                           );			
+                  }
+                }
+                closedir($fh);
+     } else{
+      
+       echo realpath(".");
+ echo "Erreur dir: " . $path ;
+
+       }
+  	return $details;    
+}
+
+?>
Index: extensions/cuise/admin/cuise_admin.tpl
===================================================================
--- extensions/cuise/admin/cuise_admin.tpl	(revision 19486)
+++ extensions/cuise/admin/cuise_admin.tpl	(revision 19486)
@@ -0,0 +1,242 @@
+{html_head}
+	<script type="text/javascript" src="themes/cuise/admin/js/farbtastic.js" ></script>
+  <script type="text/javascript" src="themes/cuise/admin/js/admin.js" ></script>
+	<script type="text/javascript" src="themes/default/js/ui/minified/jquery.ui.slider.min.js"></script>
+  	<script type="text/javascript" src="themes/cuise/admin/js/fileupload.js" ></script> 
+    <link rel="stylesheet" href="themes/cuise/admin/theme.css" />
+<style type='text/css'>
+#result{ldelim}  width:auto;height:300px;
+float:right;
+right:0px;
+top:0px;
+overflow:auto;
+}
+.image{ldelim} width:55%;height:300px;
+        border:1px solid yellow;
+        min-height:300px;
+}
+.filemgt{ldelim}
+    z-index:2;
+    border:1px solid blue;
+    width:auto;
+    
+    right:0px;
+    min-height:400px;
+}
+.filemgt table td{ldelim}
+    border:1px solid green
+}
+
+
+</style>
+    <script type="text/javascript">
+var process_script='{$classeRoot}process.php';
+var path='{$root}'
+var path_theme='{$theme}';
+var path_theme_images='{$theme}images/';
+
+jQuery(document).ready(function(){ldelim}
+jQuery('#fileInput').ajaxfileuploader({ldelim} 
+    SCRIPT: process_script,
+    PATH: path,
+    PATH_THEME: path_theme,
+    PATH_IMG:path_theme_images,
+    VALIDFORMAT:['jpeg','jpg','png','gif','bmp'],
+    MAXUPLOAD:9,
+    TABLEHEAD:{ldelim}
+        name:'name',
+        imgname:'image name',
+        operation:'Operation',
+       
+        }})
+});
+
+  jQuery.fn.ajaxfileuploader.defaults = {ldelim}
+    SCRIPT: process_script,
+    PATH: path,
+    PATH_THEME: path_theme,
+    PATH_IMG:path_theme_images,
+    ACTION: '',
+    VALIDFORMAT: ['jpeg', 'jpg', 'png', 'gif', 'bmp'],
+    MAXUPLOAD: 5,
+    TABLEHEAD:  {ldelim} name: 'name',
+      imgname: 'image name',
+      operation: 'Operation'
+     
+    }
+  }
+
+</script>
+
+{/html_head}	
+<div class="titrePage">
+<h2>{$theme}{$parent}</h2>
+</div>
+<form action="" method="post">
+
+<fieldset  >
+	<legend>{'Color of theme'|@translate}</legend>
+	  <div id="textcolor">
+    <fieldset   ><legend>Select</legend>
+    {foreach from=$name_tpl item=name_1  name=t} 
+    <input type="submit" name="sel_tab" value="{$smarty.foreach.t.index}" ><span>{$name_1}</span> 
+    {/foreach}
+
+
+    </fieldset>
+    <fieldset class="fld1" ><legend>{$name_tpl.$ind}</legend>
+
+    	  <div class="form-item"><label>
+    {'Rayon'|@translate}:</label>
+    <input type="text" name="rayon_cuise_{$ind}" class="color" value="{$selected_rayon_cuise}" />
+    </div>
+
+	  <div class="form-item"><label>{'Background color'|@translate}:</label>
+    <input type="text" name="bg_cuise_{$ind}" class="colorwell" value="{$selected_bg_cuise}" />
+    </div>
+    	  <div class="form-item"><label>{'Background color hover'|@translate}:</label>
+    <input type="text" name="bgho_cuise_{$ind}" class="colorwell" value="{$selected_bgho_cuise}" />
+    </div>
+
+	  <div class="form-item">
+    <label>{'Border color'|@translate}:</label><input type="text" name="bd_cuise_{$ind}" class="colorwell" value="{$selected_bd_cuise}" />
+    </div>
+	  <div class="form-item">
+    <label>{'Text color'|@translate}:</label>
+    <input type="text" name="co_cuise_{$ind}" class="colorwell" value="{$selected_co_cuise}" />
+    </div>
+ <div class="form-item">
+    <label>{'Text color hover'|@translate}:</label>
+    <input type="text" name="coho_cuise_{$ind}" class="colorwell" value="{$selected_coho_cuise}" />
+   </div>
+
+
+   <div class="form-item">
+    <label>{'Image'|@translate}:</label>
+    
+<p>
+<label >{$theme}images/{$selected_img_cuise} </label> 
+<p>
+<label >{'repeat x'|@translate} </label> <input name="chk_cuise_x_{$ind}" type=checkbox value="chk_cuise_x" {$selected_chk_x_cuise} />
+
+
+<label >{'repeat y'|@translate} </label> <input name="chk_cuise_y_{$ind}" type=checkbox value="chk_cuise_y" {$selected_chk_y_cuise} />
+
+ 
+<p>
+<p>
+<label >{'no background'|@translate} </label> <input name="chk_cuise_{$ind}" type=checkbox  value="chk_cuise" {$selected_chk_cuise} />
+   </div>
+
+
+
+
+    </fieldset>
+	  <p>  <input type="submit" name="default" value="{'Default'|@translate}" >
+  <input type="submit" name="compiled-templates" id="compiled-templates" value="{$parent}" >
+</p>
+<p>
+
+   <ul>
+   <li>{strip}{'Parent theme'|@translate}:&nbsp;
+
+<select onchange="javascript:jQuery('#compiled-templates').val(this.value).click();">
+
+{foreach from=$list_themes item=list_theme} 
+  <option value="{$list_theme.id}"   {if $list_theme.name==$parent }  selected="selected"  {/if } >{$list_theme.name} </option><br>
+{/foreach}
+
+</select>
+{/strip}</li>
+</ul>
+   </p>
+	  </div>
+ 
+	  <div id="picker"></div> 
+ 
+
+    <style>
+   #thePicturePage{ldelim}
+    background-color:{$selected_bg_cuise};
+    {if $selected_chk_cuise!="checked"}
+    background-image:url({$theme}images/{$selected_img_cuise}) ;
+    {else}
+      background-image:none ;
+{/if}
+      background-repeat: repeat-x;
+      float:right;
+      right:0px;
+      width:450px;
+      height:300px;
+      border:3px solid {$selected_bd_cuise};
+          
+     -moz-border-radius: {$selected_rayon_cuise} ;
+      border-radius: {$selected_rayon_cuise} {$selected_rayon_cuise}; 
+    
+    }  
+    #thePicturePage a:hover{ldelim}
+        color:{$selected_coho_cuise};  
+    }
+
+      #thePicturePage:hover{ldelim}
+          background-color:{$selected_bgho_cuise};
+          background-image:url({$theme}images/hover_{$selected_img_cuise}) ;
+          background-repeat: repeat-x;
+          
+      }
+    #theHeader a{ldelim}
+        color:{$selected_co_cuise};
+    }
+        #menubar a{ldelim}
+        color:{$selected_co_cuise};
+    }
+       .wrap1 , .wrap2 a{ldelim}
+        color:{$selected_co_cuise};
+    }
+    </style>
+
+
+    <div id="thePicturePage" class="image admin" > 
+        <div id="theHeader"   style="padding:100px" >
+ <a name='test'  > {$theme}images/{$selected_img_cuise}</a> 
+        </div>
+
+        <div id="#menubar"   >
+         <dt>
+         test 1
+         </dt>
+          <dt>
+         test 2
+         </dt>
+ 
+        </div>
+         <div class="wrap1" >
+
+         <div class="wrap2" >
+   
+        </div>
+    
+        </div>
+    </div>
+
+ {if $selected_chk_cuise!="checked"}	  
+	   	 <label>Name</label>: 
+         <input type="text" name="img_cuise_{$ind}" id='fileInputTxt' value="{$selected_img_cuise}" />
+	     <label>Upload</label>:<input type='file' size="60" value="{$theme}images/{$selected_img_cuise}" id='fileInput' >
+         <div id="result" style="float:left" >
+       
+     </div>
+      
+
+     
+
+
+{/if}
+
+</fieldset>  
+{footer_script}{literal}
+
+{/literal}{/footer_script}
+<p><input type="submit" name="submit" id="send" value="{'Submit'|@translate}_{$ind}">
+</form>
+<a href="themes/cuise/theme.css.php?{$options}" >Sauvegarde</a>
Index: extensions/cuise/admin/cuise_texture.tpl
===================================================================
--- extensions/cuise/admin/cuise_texture.tpl	(revision 19486)
+++ extensions/cuise/admin/cuise_texture.tpl	(revision 19486)
@@ -0,0 +1,99 @@
+ 
+{html_head}
+	<script type="text/javascript" src="themes/cuise/admin/js/fileupload.js" ></script> 
+    <link rel="stylesheet" href="themes/cuise/admin/theme.css" />
+
+<style type='text/css'>
+#result{ldelim}  width:40%;height:300px;
+float:right;
+right:0px;
+top:0px;
+overflow:auto;
+}
+.image{ldelim} width:55%;height:300px;
+        border:1px solid yellow;
+        min-height:300px;
+}
+.filemgt{ldelim}
+    z-index:2;
+    border:1px solid blue;
+    width:500px;
+    top:100px;
+    right:0px;
+    min-height:400px;
+}
+.filemgt table td{ldelim}
+    border:1px solid green
+}
+
+
+</style>
+
+<script type="text/javascript">
+var process_script='{$classeRoot}process.php';
+
+var path='{$root}'
+var path_theme='{$theme}';
+var path_theme_images='{$theme}images/';
+
+
+jQuery(document).ready(function(){ldelim}
+jQuery('#fileInput').ajaxfileuploader({ldelim} 
+    SCRIPT: process_script,
+    PATH: path,
+    PATH_THEME: path_theme,
+    PATH_IMG:path_theme_images,
+    VALIDFORMAT:['jpeg','jpg','png','gif','bmp'],
+    MAXUPLOAD: 30,
+    TABLEHEAD:{ldelim}
+        name:'name',
+        imgname:'image name',
+        operation:'Operation',
+       
+        }})
+});
+
+  jQuery.fn.ajaxfileuploader.defaults = {ldelim}
+    SCRIPT: process_script,
+    PATH: path_theme,
+    PATH_IMG:path_theme_images,
+    ACTION: '',
+    VALIDFORMAT: ['jpeg', 'jpg', 'png', 'gif', 'bmp'],
+    MAXUPLOAD:5,
+    TABLEHEAD:  {ldelim} name: 'name',
+      imgname: 'image name',
+      operation: 'Operation'
+     
+    }
+  }
+
+</script>
+
+ {/html_head}
+<body>
+<div class="titrePage"><h2>{$theme}{$parent}</h2></div> 
+<fieldset  >
+	<legend>{'Texture'|@translate}</legend>
+    <form name='form1' action='#' >
+	    <fieldset >
+        <fieldset >
+        <div id="result" class="texture">
+
+        </div>
+        <div id='queuearea' class="image texture">
+        
+        </div> 
+        </fieldset >
+	      <label>Name</label>:<input type='text' size="80" id='fileInputTxt'  >	 
+	      <label>Upload</label>:<input type='file' size="60" value='' id='fileInput' class="file" >
+	</fieldset>
+</form>
+
+
+
+</fieldset  >
+
+
+
+</body>
+
Index: extensions/cuise/admin/img.html
===================================================================
--- extensions/cuise/admin/img.html	(revision 19486)
+++ extensions/cuise/admin/img.html	(revision 19486)
@@ -0,0 +1,468 @@
+﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="fr" dir="ltr">
+<head>
+<link rel="stylesheet" href="themes/cuise/themes.css.css"  type="text/css" /> 
+</head>
+<body id="theCategoryPage">
+<div id="the_page">
+<div id="theHeader">TEST
+</div>
+<div id="menubar">
+	<dl id="mbCategories">
+<dt>
+	<a href="/cl.josse.free.fr/Galerie/?filter=start-recent-1" class="pwg-state-default pwg-button menubarFilter" title="n'afficher que les photos publiées récemment" rel="nofollow"><span class="pwg-icon pwg-icon-filter"> </span></a>
+	<a href="index.php?/categories">Albums</a>
+</dt>
+<dd>
+  <ul>
+ 
+    <li >
+      <a href="index.php?/category/59"  title="2 photos dans cet album">Album Set</a>
+      <span class="menuInfoCat" title="2 photos dans cet album">[2]</span>
+      </li>
+    
+    <li >
+      <a href="index.php?/category/40"  title="26 photos dans cet album">charlies</a>
+      <span class="menuInfoCat" title="26 photos dans cet album">[26]</span>
+      </li>
+    
+    <li >
+      <a href="index.php?/category/41"  title="11 photos dans cet album">famille</a>
+      <span class="menuInfoCat" title="11 photos dans cet album">[11]</span>
+      </li>
+    
+    <li >
+      <a href="index.php?/category/43"  title="6 photos dans cet album">haute_definition</a>
+      <span class="menuInfoCat" title="6 photos dans cet album">[6]</span>
+      </li>
+    <li >
+      <a href="index.php?/category/2"  title="1 photo dans cet album / 1383 photos dans 18 sous-albums">Voyages</a>
+      <span class="menuInfoCat" title="1 photo dans cet album / 1383 photos dans 18 sous-albums">[1384]</span>
+  </li></ul>
+
+	<p class="totalImages">1854 photos</p>
+</dd>	</dl>
+	<dl id="mbSpecials">
+<dt>Spéciales</dt>
+<dd>
+	<ul><li><a href="index.php?/favorites" title="afficher mes photos favorites">Mes favorites</a></li><li><a href="index.php?/most_visited" title="afficher les photos les plus vues">Plus vues</a></li><li><a href="index.php?/best_rated" title="afficher les photos les mieux notées">Mieux notées</a></li><li><a href="random.php" title="afficher un ensemble de photos prises au hasard" rel="nofollow">Photos au hasard</a></li><li><a href="index.php?/recent_pics" title="afficher les photos les plus récentes">Photos récentes</a></li><li><a href="index.php?/recent_cats" title="afficher les albums récemment mis à jour ou créés">Albums récents</a></li><li><a href="index.php?/created-monthly-calendar" title="affichage année par année, mois par mois, jour par jour" rel="nofollow">Calendrier</a></li></ul>
+</dd>	</dl>
+	<dl id="mbMenu">
+<dt>Menu</dt>
+<dd>
+	<form action="qsearch.php" method="get" id="quicksearch" onsubmit="return this.q.value!='' && this.q.value!=qsearch_prompt;">
+		<p style="margin:0;padding:0">
+			<input type="text" name="q" id="qsearchInput" onfocus="if (value==qsearch_prompt) value='';" onblur="if (value=='') value=qsearch_prompt;" style="width:90%">
+		</p>
+	</form>
+	<script type="text/javascript">var qsearch_prompt="Recherche rapide"; document.getElementById('qsearchInput').value=qsearch_prompt;</script>
+	<ul><li><a href="tags.php" title="Voir les tags disponibles">Tags</a></li><li><a href="search.php" title="recherche" rel="search">Recherche</a></li><li><a href="comments.php" title="Voir les derniers commentaires utilisateurs">Commentaires</a></li><li><a href="about.php" title="À propos de Piwigo">À propos</a></li><li><a href="notification.php" title="flux RSS" rel="nofollow">Notification</a></li><li><a href="http://192.168.1.25/cl.josse.free.fr/Galerie/index.php?/contact/" title="">Contacter</a></li></ul>
+</dd>	</dl>
+	<dl id="mbIdentification">
+<dt>Identification</dt>
+<dd>
+<p>Bonjour cl_josse !</p><ul><li><a href="?act=logout">Déconnexion</a></li><li><a href="profile.php" title="personnaliser l'apparence de la galerie">Personnaliser</a></li><li><a href="admin.php" title="disponible uniquement pour les administrateurs">Administration</a></li></ul>
+</dd>	</dl>
+	<dl id="mbAMM_randompict">
+<!-- random picture menu bar -->
+<dt>Une image au hasard</dt>
+
+<dd id="irandompicdd" class="randompicdd">
+  <div id="irandompicinner" class="illustration">
+    <div class="ammillustrationc">
+      <div id="iamm_ill0" class="ammillustration">
+        <span id='iammRPicNameO' style='display:none;'></span>
+        <span id='iammRPicCommentO' style='display:none;'></span>
+        <a id='iammRPicLink' ><img id="iammRPicImg"/></a>
+        <span id='iammRPicNameU' style='display:none;'></span>
+        <span id='iammRPicCommentU' style='display:none;'></span>
+      </div>
+    </div>
+  </div>
+</dd>
+	</dl>
+	<dl id="mbAMM_links">
+<!-- links menu bar -->
+  <dt>Liens</dt>
+<dd>
+  <ul  class="amm-MenuBar-links-icons">
+      <li>
+        <img src='plugins/AMenuManager/links_pictures/internet.png' style="position:relative;top:3px;"/>        <a href="http://192.168.1.25/cl.josse.free.fr/piwigo"
+          >0RC3</a>
+      </li>
+      <li>
+        <img src='plugins/AMenuManager/links_pictures/internet-url.png' style="position:relative;top:3px;"/>        <a href="http://192.168.1.25/cl.josse.free.fr/GTEST"
+          >GTEST</a>
+      </li>
+      <li>
+        <img src='plugins/AMenuManager/links_pictures/internet-url.png' style="position:relative;top:3px;"/>        <a href="http://cl.josse.free.fr/GTEST"
+          >site GTEST</a>
+      </li>
+  </ul>
+</dd>	</dl>
+</div><div id="menuSwitcher"></div>
+
+<div id="content" class="content contentWithMenu">
+<div class="titrePage">
+	<ul class="categoryActions">
+
+		<li><a href="index.php?/categories/flat" title="afficher à plat les photos des albums et des sous-albums" class="pwg-state-default pwg-button" rel="nofollow"><span class="pwg-icon pwg-icon-category-view-flat">&nbsp;</span><span class="pwg-button-text">afficher à plat les photos des albums et des sous-albums</span></a></li>
+		<li><a href="index.php?/categories/posted-monthly-list" title="afficher un calendrier par date d'ajout" class="pwg-state-default pwg-button" rel="nofollow"><span class="pwg-icon pwg-icon-calendar">&nbsp;</span><span class="pwg-button-text">Calendrier</span></a></li>
+		<li><a href="index.php?/categories/created-monthly-list" title="afficher un calendrier par date de création" class="pwg-state-default pwg-button" rel="nofollow"><span class="pwg-icon pwg-icon-camera-calendar">&nbsp;</span><span class="pwg-button-text">Calendrier</span></a></li>
+<li><a id="icon_gmaps"
+   class="button size28x28"
+   style="display:inline-block;background:url(plugins/GMaps/img/i28x28_1.png);width:28px;height:28px;"
+   title="Localiser la photo sur une carte"
+   href=''
+   onclick='$("#iGMapsIconContent").dialog("open"); return(false);'></a>
+</li>
+<li><a href="map.php?/categories" title="afficher Accueil sur la carte" rel="nofollow" class="pwg-state-default pwg-button"><span class="pwg-icon pwg-icon-map">&nbsp;</span><span class="pwg-button-text">Carte</span></a></li><li><a id="themeSwitchLink" title="Thème de l'interface" class="pwg-state-default pwg-button" rel="nofollow"><span class="pwg-icon" style="background:url('./plugins/theme_switch/icon.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">Thème de l'interface</span></a><div id="themeSwitchBox" class="switchBox"><div class="switchBoxTitle">Thème de l'interface</div><a rel="nofollow" href="index.php?/categories&amp;theme=blancmontxl" title="BlancMont XL"><img src="./themes/blancmontxl/screenshot.png" alt="BlancMont XL" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=cuise" title="Cuise"><img src="./themes/cuise/screenshot.png" alt="Cuise" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=stripped_cuise_bloc" title="Cuise stripped &amp; columns"><img src="./themes/stripped_cuise_bloc/screenshot.png" alt="Cuise stripped &amp; columns" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=dark" title="dark"><img src="./themes/dark/screenshot.png" alt="dark" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=elegant" title="elegant"><img src="./themes/elegant/screenshot.png" alt="elegant" class="theme-thumb"></a><br><a rel="nofollow" href="index.php?/categories&amp;theme=Float" title="Float"><img src="./themes/Float/screenshot.png" alt="Float" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=flop_mauve" title="flop_mauve"><img src="./themes/flop_mauve/screenshot.png" alt="flop_mauve" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=gally-cuise" title="Gally/Cuise"><img src="./themes/gally-cuise/screenshot.png" alt="Gally/Cuise" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=gally-grum-dark-II" title="Gally/Grum dark II"><img src="./themes/gally-grum-dark-II/screenshot.png" alt="Gally/Grum dark II" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=gally-minimalist" title="Gally/Minimalist"><img src="./themes/gally-minimalist/screenshot.png" alt="Gally/Minimalist" class="theme-thumb"></a><br><a rel="nofollow" href="index.php?/categories&amp;theme=hr_glass_xl" title="hr_glass_xl"><img src="./themes/hr_glass_xl/screenshot.png" alt="hr_glass_xl" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=kardon" title="Kardon"><img src="./themes/kardon/screenshot.png" alt="Kardon" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=montblancxl" title="Montblanc XL"><img src="./themes/montblancxl/screenshot.png" alt="Montblanc XL" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=OS_glass_clear" title="OS_glass_clear"><img src="./themes/OS_glass_clear/screenshot.png" alt="OS_glass_clear" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=Pure_freaky" title="Pure_freaky"><img src="./themes/Pure_freaky/screenshot.png" alt="Pure_freaky" class="theme-thumb"></a><br><a rel="nofollow" href="index.php?/categories&amp;theme=simple-black" title="Simple Black"><img src="./themes/simple-black/screenshot.png" alt="Simple Black" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=simple" title="Simple Grey"><img src="./themes/simple/screenshot.png" alt="Simple Grey" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=simple-white" title="Simple White"><img src="./themes/simple-white/screenshot.png" alt="Simple White" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=simpleng" title="SimpleNG"><img src="./themes/simpleng/screenshot.png" alt="SimpleNG" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=Slim" title="Slim"><img src="./themes/Slim/screenshot.png" alt="Slim" class="theme-thumb"></a><br><a rel="nofollow" href="index.php?/categories&amp;theme=stripped" title="stripped"><img src="./themes/stripped/screenshot.png" alt="stripped" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=stripped_black_bloc" title="Stripped &amp; Columns"><img src="./themes/stripped_black_bloc/screenshot.png" alt="Stripped &amp; Columns" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=Sylvia" title="Sylvia"><img src="./themes/Sylvia/screenshot.png" alt="Sylvia" class="theme-thumb"></a><a rel="nofollow" href="index.php?/categories&amp;theme=VerticalWhite" title="VerticalWhite"><img src="./themes/VerticalWhite/screenshot.png" alt="VerticalWhite" class="theme-thumb"></a></div></li>
+
+
+
+
+
+
+<li><a id="languageSwitchLink" title="Langue" class="pwg-state-default pwg-button" rel="nofollow"><span class="pwg-icon" style="background:url('language/fr_FR/fr_FR.jpg') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">Langue</span></a><div id="languageSwitchBox" class="switchBox"><div class="switchBoxTitle">Langue</div><a rel="nofollow" href="index.php?/categories&amp;lang=pt_BR"><img class="flags" src="language/pt_BR/pt_BR.jpg" alt="Brasil [BR]"> Brasil </a><a rel="nofollow" href="index.php?/categories&amp;lang=cs_CZ"><img class="flags" src="language/cs_CZ/cs_CZ.jpg" alt="Česky [CZ]"> Česky </a><a rel="nofollow" href="index.php?/categories&amp;lang=da_DK"><img class="flags" src="language/da_DK/da_DK.jpg" alt="Dansk [DK]"> Dansk </a><br><a rel="nofollow" href="index.php?/categories&amp;lang=de_DE"><img class="flags" src="language/de_DE/de_DE.jpg" alt="Deutsch [DE]"> Deutsch </a><a rel="nofollow" href="index.php?/categories&amp;lang=en_UK"><img class="flags" src="language/en_UK/en_UK.jpg" alt="English [UK]"> English </a><a rel="nofollow" href="index.php?/categories&amp;lang=es_AR"><img class="flags" src="language/es_AR/es_AR.jpg" alt="Español [AR]"> Español </a><br><a rel="nofollow" href="index.php?/categories&amp;lang=fr_FR"><img class="flags" src="language/fr_FR/fr_FR.jpg" alt="Français [FR]"> Français </a><a rel="nofollow" href="index.php?/categories&amp;lang=hr_HR"><img class="flags" src="language/hr_HR/hr_HR.jpg" alt="Hrvatski [HR]"> Hrvatski </a><a rel="nofollow" href="index.php?/categories&amp;lang=it_IT"><img class="flags" src="language/it_IT/it_IT.jpg" alt="Italiano [IT]"> Italiano </a><br><a rel="nofollow" href="index.php?/categories&amp;lang=hu_HU"><img class="flags" src="language/hu_HU/hu_HU.jpg" alt="Magyar [HU]"> Magyar </a><a rel="nofollow" href="index.php?/categories&amp;lang=nl_NL"><img class="flags" src="language/nl_NL/nl_NL.jpg" alt="Nederlands [NL]"> Nederlands </a><a rel="nofollow" href="index.php?/categories&amp;lang=pl_PL"><img class="flags" src="language/pl_PL/pl_PL.jpg" alt="Polski [PL]"> Polski </a><br><a rel="nofollow" href="index.php?/categories&amp;lang=pt_PT"><img class="flags" src="language/pt_PT/pt_PT.jpg" alt="Português [PT]"> Português </a><a rel="nofollow" href="index.php?/categories&amp;lang=ro_RO"><img class="flags" src="language/ro_RO/ro_RO.jpg" alt="Română [RO]"> Română </a><a rel="nofollow" href="index.php?/categories&amp;lang=sr_RS"><img class="flags" src="language/sr_RS/sr_RS.jpg" alt="Srpski [SR]"> Srpski </a><br><a rel="nofollow" href="index.php?/categories&amp;lang=tr_TR"><img class="flags" src="language/tr_TR/tr_TR.jpg" alt="Türkçe [TR]"> Türkçe </a><a rel="nofollow" href="index.php?/categories&amp;lang=vi_VN"><img class="flags" src="language/vi_VN/vi_VN.jpg" alt="Vietnamese [VN]"> Vietnamese </a><a rel="nofollow" href="index.php?/categories&amp;lang=mk_MK"><img class="flags" src="language/mk_MK/mk_MK.jpg" alt="Македонски [MK]"> Македонски </a><br><a rel="nofollow" href="index.php?/categories&amp;lang=ru_RU"><img class="flags" src="language/ru_RU/ru_RU.jpg" alt="Русский [RU]"> Русский </a><a rel="nofollow" href="index.php?/categories&amp;lang=ar_SA"><img class="flags" src="language/ar_SA/ar_SA.jpg" alt="العربية [AR]"> العربية </a><a rel="nofollow" href="index.php?/categories&amp;lang=ja_JP"><img class="flags" src="language/ja_JP/ja_JP.jpg" alt="日本語 [JP]"> 日本語 </a><br><a rel="nofollow" href="index.php?/categories&amp;lang=zh_CN"><img class="flags" src="language/zh_CN/zh_CN.jpg" alt="﻿简体中文 [CN]"> ﻿简体中文 </a></div></li>
+
+
+
+
+
+
+	</ul>
+
+<h2><a href="http://192.168.1.25/cl.josse.free.fr/Galerie">Accueil</a></h2>
+
+
+
+</div>
+
+<ul class="thumbnailCategories">
+	<li class="even">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/59">
+				<img src="_data/i/upload/2012/11/08/20121108152628-f7f09388-th.jpg" alt="Album Set" title="Album Set - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/59">Album Set</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">2 photos</p>
+		</div>
+			</div>
+		</div>
+	</li>
+	<li class="odd">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/40">
+				<img src="_data/i/galleries/charlies/pwg_representative/sarko_vandamme-th.jpg" alt="charlies" title="charlies - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/40">charlies</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">26 photos</p>
+				<p><p>
+	Divers annimations</p>
+</p>
+		</div>
+			</div>
+		</div>
+	</li>
+	<li class="even">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/41">
+				<img src="_data/i/galleries/famille/photo2-th.JPG" alt="famille" title="famille - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/41">famille</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">11 photos</p>
+		</div>
+			</div>
+		</div>
+	</li>
+	<li class="odd">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/43">
+				<img src="_data/i/upload/2010/10/30/20101030160856-b5869215-th.jpg" alt="haute_definition" title="haute_definition - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/43">haute_definition</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">6 photos</p>
+		</div>
+			</div>
+		</div>
+	</li>
+	<li class="even">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/55">
+				<img src="_data/i/galleries/lightroom/images3-3-th.jpg" alt="lightroom" title="lightroom - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/55">lightroom</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">11 photos</p>
+		</div>
+			</div>
+		</div>
+	</li>
+	<li class="odd">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/48">
+				<img src="_data/i/galleries/MANIFESTATIONS/Oise_verte_et_bleu/Fossiles_et_chocolats/P1000758-th.JPG" alt="MANIFESTATIONS" title="MANIFESTATIONS - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/48">MANIFESTATIONS</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">179 photos dans 4 sous-albums</p>
+		</div>
+			</div>
+		</div>
+	</li>
+	<li class="even">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/42">
+				<img src="_data/i/galleries/miniatures/gare_porto-th.jpg" alt="miniatures" title="miniatures - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/42">miniatures</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">41 photos</p>
+		</div>
+			</div>
+		</div>
+	</li>
+	<li class="odd">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/1">
+				<img src="_data/i/galleries/panoramiques/JODHPUR-th.jpg" alt="panoramiques" title="panoramiques - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/1">panoramiques</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">39 photos<br>33 photos dans 1 sous-album</p>
+		</div>
+			</div>
+		</div>
+	</li>
+	<li class="even">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/44">
+				<img src="_data/i/upload/2012/10/01/20121001090337-e8465a26-th.jpg" alt="photo espace" title="photo espace - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/44">photo espace</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">9 photos</p>
+		</div>
+			</div>
+		</div>
+	</li>
+	<li class="odd">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/54">
+				<img src="_data/i/galleries/rotation/IMG_0134-th.JPG" alt="rotation" title="rotation - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/54">rotation</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">4 photos</p>
+		</div>
+			</div>
+		</div>
+	</li>
+	<li class="even">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/53">
+				<img src="_data/i/galleries/test/Eco021-th.jpg" alt="test" title="test - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/53">test</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">98 photos</p>
+				<p><p>
+	</p>
+</p>
+		</div>
+			</div>
+		</div>
+	</li>
+	<li class="odd">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/35">
+				<img src="./galleries/Videos/pwg_representative/cuba.jpg" alt="Videos" title="Videos - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/35">Videos</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">5 photos</p>
+				<p><p>
+	Acte 3</p>
+<p>
+	Le bourrru bienfaisant est une pi&egrave;ce de th&eacute;&acirc;tre de Carlo Goldoni, repr&eacute;sent&eacute;e pour la premi&egrave;re fois &agrave; Paris, &agrave; la Com&eacute;die-Fran&ccedil;aise, le 4 novembre 1771. &Eacute;crite &agrave; l&rsquo;occasion du mariage de Louis XVI et de Marie-Antoinette, la pi&egrave;ce conna&icirc;tra le succ&egrave;s jusqu&rsquo;au XIX e si&egrave;cle. Un homme col&eacute;rique mais g&eacute;n&eacute;reux aide sa ni&egrave;ce &agrave; se marier. Elle d&eacute;pend de son fr&egrave;re qui, cribl&eacute; de dettes, veut la mettre dans un couvent, ne pouvant assurer la dote. Ang&eacute;lique, timide n&rsquo;arrive pas &agrave; dire &agrave; son oncle son amour pour Val&egrave;re. Il veut donc lui choisir un &eacute;poux, Dorval (45 ans), son meilleur ami.</p>
+</p>
+		</div>
+			</div>
+		</div>
+	</li>
+	<li class="even">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/58">
+				<img src="_data/i/upload/2011/03/20/20110320180718-dc14bd1b-th.jpg" alt="virtuelle" title="virtuelle - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/58">virtuelle</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">10 photos</p>
+		</div>
+			</div>
+		</div>
+	</li>
+	<li class="odd">
+		<div class="thumbnailCategory">
+			<div class="illustration">
+			<a href="index.php?/category/2">
+				<img src="_data/i/upload/2010/09/07/20100907133435-b82907c5-th.jpg" alt="Voyages" title="Voyages - montre les photos à la racine de cet album">
+			</a>
+			</div>
+			<div class="description">
+				<h3>
+					<a href="index.php?/category/2">Voyages</a>
+				</h3>
+		<div class="text">
+				<p class="Nb_images">1 photo<br>1383 photos dans 18 sous-albums</p>
+				<p><p>
+	Voyages<br />
+	TEST BR<br />
+	TEST p<br />
+	TEST</p>
+<p>
+	&nbsp;</p>
+</p>
+		</div>
+			</div>
+		</div>
+	</li>
+</ul>
+
+</div><div class="content contentWithMenu stuffs_block">
+  <div class="content stuffs_block stuffs">
+    <div id="stuffs_block_1" class="content middle_block" >
+      <div class="titrePage">
+        <ul class="categoryActions">
+          <li><a href="admin.php?page=plugin-PWG_Stuffs-edit_module&amp;edit=1&amp;redirect=%252Fcl.josse.free.fr%252FGalerie%252F" title="éditer" class="pwg-state-default pwg-button">
+            <span class="pwg-icon pwg-icon-category-edit"> </span><span class="pwg-button-text">éditer</span>
+	         	</a></li>
+        </ul>
+      <h2><a href="tags.php">Tags</a></h2>
+      </div>
+<div id="fullTagCloud">
+	<span><a href="index.php?/tags/18-arona" class="tagLevel1" title="1">Arona</a></span>
+	<span><a href="index.php?/tags/25-chianti" class="tagLevel1" title="1">chianti</a></span>
+	<span><a href="index.php?/tags/6-cuba" class="tagLevel1" title="1">cuba</a></span>
+	<span><a href="index.php?/tags/1-ecosse" class="tagLevel5" title="365">Ecosse</a></span>
+	<span><a href="index.php?/tags/9-edimbourg" class="tagLevel1" title="1">edimbourg</a></span>
+	<span><a href="index.php?/tags/30-fleur" class="tagLevel1" title="1">fleur</a></span>
+	<span><a href="index.php?/tags/32-florence" class="tagLevel1" title="1">Florence</a></span>
+	<span><a href="index.php?/tags/36-goldoni" class="tagLevel1" title="1">GOLDONI</a></span>
+	<span><a href="index.php?/tags/10-inde" class="tagLevel5" title="80">Inde</a></span>
+	<span><a href="index.php?/tags/19-italie" class="tagLevel1" title="1">Italie</a></span>
+	<span><a href="index.php?/tags/22-italie" class="tagLevel1" title="3">italie</a></span>
+	<span><a href="index.php?/tags/11-jodhpur" class="tagLevel1" title="1">jodhpur</a></span>
+	<span><a href="index.php?/tags/20-lac_mageur" class="tagLevel1" title="1">lac mageur</a></span>
+	<span><a href="index.php?/tags/12-lille" class="tagLevel2" title="14">Lille</a></span>
+	<span><a href="index.php?/tags/13-lochlomond" class="tagLevel1" title="1">lochlomond</a></span>
+	<span><a href="index.php?/tags/8-mexique" class="tagLevel1" title="1">mexique</a></span>
+	<span><a href="index.php?/tags/14-pano200" class="tagLevel2" title="11">Pano200</a></span>
+	<span><a href="index.php?/tags/24-panorama" class="tagLevel1" title="1">panorama</a></span>
+	<span><a href="index.php?/tags/15-panorama" class="tagLevel2" title="14">Panorama</a></span>
+	<span><a href="index.php?/tags/26-place" class="tagLevel1" title="1">place</a></span>
+	<span><a href="index.php?/tags/16-rajasthan" class="tagLevel5" title="80">Rajasthan</a></span>
+	<span><a href="index.php?/tags/34-roscoff" class="tagLevel1" title="3">roscoff</a></span>
+	<span><a href="index.php?/tags/33-rotation" class="tagLevel1" title="3">rotation</a></span>
+	<span><a href="index.php?/tags/23-sienne" class="tagLevel1" title="1">sienne</a></span>
+	<span><a href="index.php?/tags/21-ticino" class="tagLevel1" title="2">ticino</a></span>
+	<span><a href="index.php?/tags/29-victor_hugo" class="tagLevel1" title="1">victor hugo</a></span>
+</div>
+
+    </div>
+  </div>
+  <div class="content stuffs_block stuffs">
+    <div id="stuffs_block_2" class="content middle_block" >
+      <div class="titrePage">
+        <ul class="categoryActions">
+          <li><a href="admin.php?page=plugin-PWG_Stuffs-edit_module&amp;edit=2&amp;redirect=%252Fcl.josse.free.fr%252FGalerie%252F" title="éditer" class="pwg-state-default pwg-button">
+            <span class="pwg-icon pwg-icon-category-edit"> </span><span class="pwg-button-text">éditer</span>
+	         	</a></li>
+        </ul>
+      <h2>Bloc personnel</h2>
+      </div>
+<div class="personal_block">
+<p><?php echo "---------";?>
+<iframe frameborder="0" width="100%" height="270" src="http://www.dailymotion.com/embed/video/k2R0coHHdwh6uq3qCqJ"></iframe><br />
+
+ 
+
+</div>    </div>
+  </div>
+</div><div id="copyright">
+	Page fabriquée en 1.721 s (61 requêtes SQL en 0.219 s) -
+	Propulsé par	<a href="http://fr.piwigo.org" class="Piwigo">Piwigo</a>
+	2.4.5
+	- <a href="http://192.168.1.25/cl.josse.free.fr/Galerie/index.php?/contact/">Contacter le webmestre</a>
+
+</div> </div></body>
+</html>
Index: extensions/cuise/admin/img.php
===================================================================
--- extensions/cuise/admin/img.php	(revision 19486)
+++ extensions/cuise/admin/img.php	(revision 19486)
@@ -0,0 +1,42 @@
+<html>
+<body>
+<form method="post" enctype="multipart/form-data" action="upload.php">
+<p>
+<input type="file" name="fichier" size="30">
+<input type="submit" name="upload" value="Uploader">
+</p>
+</form>
+<?php
+if( isset($_POST['upload']) ) // si formulaire soumis
+{
+    $content_dir = 'upload/'; // dossier où sera déplacé le fichier
+
+    $tmp_file = $_FILES['fichier']['tmp_name'];
+
+    if( !is_uploaded_file($tmp_file) )
+    {
+        exit("Le fichier est introuvable");
+    }
+
+    // on vérifie maintenant l'extension
+    $type_file = $_FILES['fichier']['type'];
+
+    if( !strstr($type_file, 'jpg') && !strstr($type_file, 'jpeg') && !strstr($type_file, 'bmp') && !strstr($type_file, 'gif') )
+    {
+        exit("Le fichier n'est pas une image");
+    }
+
+    // on copie le fichier dans le dossier de destination
+    $name_file = $_FILES['fichier']['name'];
+
+    if( !move_uploaded_file($tmp_file, $content_dir . $name_file) )
+    {
+        exit("Impossible de copier le fichier dans $content_dir");
+    }
+
+    echo "Le fichier a bien été uploadé";
+}
+?>
+</body>
+
+</html>
Index: extensions/cuise/admin/index1.php
===================================================================
--- extensions/cuise/admin/index1.php	(revision 19486)
+++ extensions/cuise/admin/index1.php	(revision 19486)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/cuise/admin/js/admin.js
===================================================================
--- extensions/cuise/admin/js/admin.js	(revision 19486)
+++ extensions/cuise/admin/js/admin.js	(revision 19486)
@@ -0,0 +1,47 @@
+jQuery(document).ready(function () {
+  var input = $("input:file").val();
+
+  //===================================
+  // jQuery("#fileinput").trigger("ON");
+  //===================================
+  jQuery("#fileinput").live('ON', function (e) {
+    target = e.target.id;
+    url = jQuery("#img_cuise").val();
+
+    url = url.substr(url.lastIndexOf("\\") + 1);
+    ing = jQuery("#img_cuise");
+    id = this.id;
+    jQuery("#fileinput").val(url);
+    jQuery('#thePicturePage').css("background-image", 'url(' + url + ')');
+
+  });
+
+
+
+  jQuery("#img_cuise").click(function (i) {
+
+    n = 1;
+  });
+
+  var f = jQuery.farbtastic('#picker');
+  var p = jQuery('#picker').css('opacity', 1);
+  var selected;
+  jQuery('.colorwell')
+      .each(function () {
+        f.linkTo(this);
+        $(this).css('opacity', 1);
+
+      })
+      .focus(function () {
+        if (selected) {
+          $(selected).css('opacity', 1).removeClass('colorwell-selected');
+        }
+        f.linkTo(this);
+        p.css('opacity', 1);
+        $(selected = this).css('opacity', 1).addClass('colorwell-selected');
+        col = $(selected = this).css("backgroundColor");
+
+      });
+});
+
+   
Index: extensions/cuise/admin/js/farbtastic.js
===================================================================
--- extensions/cuise/admin/js/farbtastic.js	(revision 19486)
+++ extensions/cuise/admin/js/farbtastic.js	(revision 19486)
@@ -0,0 +1,345 @@
+/**
+ * Farbtastic Color Picker 1.2
+ * © 2008 Steven Wittens
+ *
+ * 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, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+jQuery.fn.farbtastic = function (callback) {
+  $.farbtastic(this, callback);
+  return this;
+};
+
+jQuery.farbtastic = function (container, callback) {
+  var container = $(container).get(0);
+  return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback));
+}
+
+jQuery._farbtastic = function (container, callback) {
+  // Store farbtastic object
+  var fb = this;
+
+  // Insert markup
+  $(container).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>');
+  var e = $('.farbtastic', container);
+  fb.wheel = $('.wheel', container).get(0);
+  // Dimensions
+  fb.radius = 84;
+  fb.square = 100;
+  fb.width = 194;
+
+  // Fix background PNGs in IE6
+  if (navigator.appVersion.match(/MSIE [0-6]\./)) {
+    $('*', e).each(function () {
+      if (this.currentStyle.backgroundImage != 'none') {
+        var image = this.currentStyle.backgroundImage;
+        image = this.currentStyle.backgroundImage.substring(5, image.length - 2);
+        $(this).css({
+          'backgroundImage': 'none',
+          'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')"
+        });
+      }
+    });
+  }
+
+  /**
+   * Link to the given element(s) or callback.
+   */
+  fb.linkTo = function (callback) {
+    // Unbind previous nodes
+    if (typeof fb.callback == 'object') {
+      $(fb.callback).unbind('keyup', fb.updateValue);
+    }
+
+    // Reset color
+    fb.color = null;
+
+    // Bind callback or elements
+    if (typeof callback == 'function') {
+      fb.callback = callback;
+    }
+    else if (typeof callback == 'object' || typeof callback == 'string') {
+      fb.callback = $(callback);
+      fb.callback.bind('keyup', fb.updateValue);
+      if (fb.callback.get(0).value) {
+        fb.setColor(fb.callback.get(0).value);
+      }
+    }
+    return this;
+  }
+  fb.updateValue = function (event) {
+    if (this.value && this.value != fb.color) {
+      fb.setColor(this.value);
+    }
+  }
+
+  /**
+   * Change color with HTML syntax #123456
+   */
+  fb.setColor = function (color) {
+    var unpack = fb.unpack(color);
+    if (fb.color != color && unpack) {
+      fb.color = color;
+      fb.rgb = unpack;
+      fb.hsl = fb.RGBToHSL(fb.rgb);
+      fb.updateDisplay();
+    }
+    return this;
+  }
+
+  /**
+   * Change color with HSL triplet [0..1, 0..1, 0..1]
+   */
+  fb.setHSL = function (hsl) {
+    fb.hsl = hsl;
+    fb.rgb = fb.HSLToRGB(hsl);
+    fb.color = fb.pack(fb.rgb);
+    fb.updateDisplay();
+    return this;
+  }
+
+  /////////////////////////////////////////////////////
+
+  /**
+   * Retrieve the coordinates of the given event relative to the center
+   * of the widget.
+   */
+  fb.widgetCoords = function (event) {
+    var x, y;
+    var el = event.target || event.srcElement;
+    var reference = fb.wheel;
+
+    if (typeof event.offsetX != 'undefined') {
+      // Use offset coordinates and find common offsetParent
+      var pos = { x: event.offsetX, y: event.offsetY };
+
+      // Send the coordinates upwards through the offsetParent chain.
+      var e = el;
+      while (e) {
+        e.mouseX = pos.x;
+        e.mouseY = pos.y;
+        pos.x += e.offsetLeft;
+        pos.y += e.offsetTop;
+        e = e.offsetParent;
+      }
+
+      // Look for the coordinates starting from the wheel widget.
+      var e = reference;
+      var offset = { x: 0, y: 0 }
+      while (e) {
+        if (typeof e.mouseX != 'undefined') {
+          x = e.mouseX - offset.x;
+          y = e.mouseY - offset.y;
+          break;
+        }
+        offset.x += e.offsetLeft;
+        offset.y += e.offsetTop;
+        e = e.offsetParent;
+      }
+
+      // Reset stored coordinates
+      e = el;
+      while (e) {
+        e.mouseX = undefined;
+        e.mouseY = undefined;
+        e = e.offsetParent;
+      }
+    }
+    else {
+      // Use absolute coordinates
+      var pos = fb.absolutePosition(reference);
+      x = (event.pageX || 0*(event.clientX + $('html').get(0).scrollLeft)) - pos.x;
+      y = (event.pageY || 0*(event.clientY + $('html').get(0).scrollTop)) - pos.y;
+    }
+    // Subtract distance to middle
+    return { x: x - fb.width / 2, y: y - fb.width / 2 };
+  }
+
+  /**
+   * Mousedown handler
+   */
+  fb.mousedown = function (event) {
+    // Capture mouse
+    if (!document.dragging) {
+      $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup);
+      document.dragging = true;
+    }
+
+    // Check which area is being dragged
+    var pos = fb.widgetCoords(event);
+    fb.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > fb.square;
+
+    // Process
+    fb.mousemove(event);
+    return false;
+  }
+
+  /**
+   * Mousemove handler
+   */
+  fb.mousemove = function (event) {
+    // Get coordinates relative to color picker center
+    var pos = fb.widgetCoords(event);
+
+    // Set new HSL parameters
+    if (fb.circleDrag) {
+      var hue = Math.atan2(pos.x, -pos.y) / 6.28;
+      if (hue < 0) hue += 1;
+      fb.setHSL([hue, fb.hsl[1], fb.hsl[2]]);
+    }
+    else {
+      var sat = Math.max(0, Math.min(1, -(pos.x / fb.square) + .5));
+      var lum = Math.max(0, Math.min(1, -(pos.y / fb.square) + .5));
+      fb.setHSL([fb.hsl[0], sat, lum]);
+    }
+    return false;
+  }
+
+  /**
+   * Mouseup handler
+   */
+  fb.mouseup = function () {
+    // Uncapture mouse
+    $(document).unbind('mousemove', fb.mousemove);
+    $(document).unbind('mouseup', fb.mouseup);
+    document.dragging = false;
+  }
+
+  /**
+   * Update the markers and styles
+   */
+  fb.updateDisplay = function () {
+    // Markers
+    var angle = fb.hsl[0] * 6.28;
+    $('.h-marker', e).css({
+      left: Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + 'px',
+      top: Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + 'px'
+    });
+
+    $('.sl-marker', e).css({
+      left: Math.round(fb.square * (.5 - fb.hsl[1]) + fb.width / 2) + 'px',
+      top: Math.round(fb.square * (.5 - fb.hsl[2]) + fb.width / 2) + 'px'
+    });
+
+    // Saturation/Luminance gradient
+    $('.color', e).css('backgroundColor', fb.pack(fb.HSLToRGB([fb.hsl[0], 1, 0.5])));
+
+    // Linked elements or callback
+    if (typeof fb.callback == 'object') {
+      // Set background/foreground color
+      $(fb.callback).css({
+        backgroundColor: fb.color,
+        color: fb.hsl[2] > 0.5 ? '#000' : '#fff'
+      });
+
+      // Change linked value
+      $(fb.callback).each(function() {
+        if (this.value && this.value != fb.color) {
+          this.value = fb.color;
+        }
+      });
+    }
+    else if (typeof fb.callback == 'function') {
+      fb.callback.call(fb, fb.color);
+    }
+  }
+
+  /**
+   * Get absolute position of element
+   */
+  fb.absolutePosition = function (el) {
+    var r = { x: el.offsetLeft, y: el.offsetTop };
+    // Resolve relative to offsetParent
+    if (el.offsetParent) {
+      var tmp = fb.absolutePosition(el.offsetParent);
+      r.x += tmp.x;
+      r.y += tmp.y;
+    }
+    return r;
+  };
+
+  /* Various color utility functions */
+  fb.pack = function (rgb) {
+    var r = Math.round(rgb[0] * 255);
+    var g = Math.round(rgb[1] * 255);
+    var b = Math.round(rgb[2] * 255);
+    return '#' + (r < 16 ? '0' : '') + r.toString(16) +
+           (g < 16 ? '0' : '') + g.toString(16) +
+           (b < 16 ? '0' : '') + b.toString(16);
+  }
+
+  fb.unpack = function (color) {
+    if (color.length == 7) {
+      return [parseInt('0x' + color.substring(1, 3)) / 255,
+        parseInt('0x' + color.substring(3, 5)) / 255,
+        parseInt('0x' + color.substring(5, 7)) / 255];
+    }
+    else if (color.length == 4) {
+      return [parseInt('0x' + color.substring(1, 2)) / 15,
+        parseInt('0x' + color.substring(2, 3)) / 15,
+        parseInt('0x' + color.substring(3, 4)) / 15];
+    }
+  }
+
+  fb.HSLToRGB = function (hsl) {
+    var m1, m2, r, g, b;
+    var h = hsl[0], s = hsl[1], l = hsl[2];
+    m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s;
+    m1 = l * 2 - m2;
+    return [this.hueToRGB(m1, m2, h+0.33333),
+        this.hueToRGB(m1, m2, h),
+        this.hueToRGB(m1, m2, h-0.33333)];
+  }
+
+  fb.hueToRGB = function (m1, m2, h) {
+    h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h);
+    if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;
+    if (h * 2 < 1) return m2;
+    if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6;
+    return m1;
+  }
+
+  fb.RGBToHSL = function (rgb) {
+    var min, max, delta, h, s, l;
+    var r = rgb[0], g = rgb[1], b = rgb[2];
+    min = Math.min(r, Math.min(g, b));
+    max = Math.max(r, Math.max(g, b));
+    delta = max - min;
+    l = (min + max) / 2;
+    s = 0;
+    if (l > 0 && l < 1) {
+      s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l));
+    }
+    h = 0;
+    if (delta > 0) {
+      if (max == r && max != g) h += (g - b) / delta;
+      if (max == g && max != b) h += (2 + (b - r) / delta);
+      if (max == b && max != r) h += (4 + (r - g) / delta);
+      h /= 6;
+    }
+    return [h, s, l];
+  }
+
+  // Install mousedown handler (the others are set on the document on-demand)
+  $('*', e).mousedown(fb.mousedown);
+
+    // Init color
+  fb.setColor('#000000');
+
+  // Set linked elements/callback
+  if (callback) {
+    fb.linkTo(callback);
+  }
+}
Index: extensions/cuise/admin/js/fileupload.js
===================================================================
--- extensions/cuise/admin/js/fileupload.js	(revision 19486)
+++ extensions/cuise/admin/js/fileupload.js	(revision 19486)
@@ -0,0 +1,193 @@
+(function ($) {
+  jQuery.fn.ajaxfileuploader = function (options) {
+    var opts = jQuery.extend({}, jQuery.fn.ajaxfileuploader.defaults, options);
+    var filelist = new Array();
+    var uploadwidget = new Object();
+    var imgwidget = new Object();
+    return this.each(function () {
+      buildElement($(this).attr("id"))
+      jQuery(this).change(onChange);
+    });
+
+    function onChange() {
+      /* Validate Form Before submit */
+      var filename = $(this).val();
+      var pos = filename.lastIndexOf('.');
+      var msg = '';
+      if (pos !== -1) {
+        var extension = filename.substring(pos + 1);
+        var isvalidextension = false;
+        msg = " Invalid file [" + extension + "] not supported:";
+
+        for (i in opts.VALIDFORMAT) {
+          var reg = new RegExp("(" + opts.VALIDFORMAT[i] + ")", "gi");
+          if (extension.match(reg)) {
+            isvalidextension = true; break;
+          }
+        }
+      }
+
+      if (isvalidextension && imgwidget.find("tr").length > opts.MAXUPLOAD) {
+        isvalidextension = false; msg = "only " + opts.MAXUPLOAD + " File can be uploaded ";
+        displayUploadForm();
+      }
+
+      if (isvalidextension) uploadwidget.find("form").submit();
+      if (!isvalidextension || pos == -1)
+        alert(msg);
+      return false;
+    }
+
+    function setbck() {
+      var row = $(this).parents("tr");
+      var imgname = $(this).attr("title");
+      var name = $(this).attr("name");
+      jQuery("#fileInputTxt").val(name);
+      jQuery(".image").css({ backgroundImage: "url(" + imgname + ")" });
+      return;
+
+      var request = $.ajax({
+        url: opts.SCRIPT + "?action=adding",
+        type: "POST",
+        async: false,
+        data: { name: imgname },
+        dataType: "html"
+      });
+      request.done(function (msg) {
+
+        displayUploadForm();
+      });
+
+      request.fail(function (jqXHR, textStatus) {
+        alert("Request failed:User " + textStatus);
+      });
+
+      return false;
+    }
+
+    var del_ok = false;
+    function delRow() {
+      if (!del_ok)
+        if (!confirm("Are you sure, you want to delete this image?"))
+          return;
+
+      del_ok = true;
+
+      var row = $(this).parents("tr");
+      var imgname = $(this).attr("title");
+      var request = $.ajax({
+        url: opts.SCRIPT + "?action=deleteimg",
+        type: "POST",
+        async: false,
+        data: { name: imgname },
+        dataType: "html"
+      });
+      request.done(function (msg) {
+        row.remove();
+        displayUploadForm();
+      });
+
+      request.fail(function (jqXHR, textStatus) {
+        alert("Request failed:User " + textStatus);
+      });
+
+      return false;
+    }
+
+
+    function displayUploadForm() {
+
+      if (imgwidget.find("tr").length < opts.MAXUPLOAD + 1)
+        uploadwidget.find('form input').removeAttr("disabled")
+      else
+        uploadwidget.find('form input').attr("disabled", "disabled")
+    }
+
+    function loaddetails() {
+      var txt = uploadwidget.find("iframe").contents().find('body').html();
+      try {
+        var obj = jQuery.parseJSON(txt);
+      } catch (e) {
+        alert(txt);
+        var obj;
+      }
+
+      if (obj) {
+        for (i in obj['files']) {
+          var name = obj['files'][i].name;
+          var thumbimgurl = obj['files'][i].thumbimgurl;
+          var upload_name = obj['files'][i].upload_name;
+          var errors = obj['files'][i].errors;
+          var imgUrl = obj['files'][i].imgUrl;
+          link = "<a href='javascript:void(0)' class='setbck' name='" + name + "' title='" + opts.PATH_IMG + name + "' >";
+          messages = "<tr id='" + name + "'  style='width:120px'>";
+          messages += "<td>" + link + "<img src='" + opts.PATH_IMG + name + "'></a></td>";
+          if (jQuery(".image").hasClass("texture")) {
+            messages += "<td>" + upload_name + "</td> ";
+            jQuery(errors).each(
+          function (i) {
+            messages += "<td><span>" + this.error + "</span> </td>";
+          }
+          );
+            messages += "<td><a href='javascript:void(0)' class='delrow' title='" + name + "'>Delete</a> </td>";
+          }
+          messages += "</tr>";
+
+          imgwidget.find("table").append(messages);
+          if (jQuery(".image").hasClass("texture")) {
+            jQuery("#fileInputTxt").val(opts.PATH_IMG + name);
+            imgwidget.find("tr[id='" + name + "'] a.delrow").click(delRow);
+            jQuery(".image").css({ backgroundImage: "url(" + opts.PATH_IMG + name + ")" });
+          }
+          imgwidget.find("tr[id='" + name + "'] a.setbck").click(setbck);
+
+        }
+      }
+
+      displayUploadForm();
+    }
+
+    function buildElement(id) {
+      var pos = jQuery("#" + id).offset();
+      var divid = "uploadwidget" + id
+      var formid = "idOfFormElement" + id;
+      var iframeid = "idOfIframeElement" + id;
+
+      jQuery('#result').append(jQuery('<div id="' + divid + '"></div>'));
+      jQuery('#result').append(jQuery('<div id="' + divid + '_imgmgt" class="filemgt"><table></table><div class="paginate"></div></div>'));
+      uploadwidget = jQuery('#' + divid);
+      imgwidget = jQuery('#' + divid + '_imgmgt');
+      if (jQuery(".image").hasClass("texture"))
+        imgwidget.find("table").append("<tr><td>" + opts.TABLEHEAD.name + "</td><td>" + opts.TABLEHEAD.imgname + "</td><td>" + opts.TABLEHEAD.operation + "</td></tr>");
+
+      uploadwidget.append('<iframe name="' + iframeid + '" id="' + iframeid + '" style="width:0px;height:0px" src="' + opts.SCRIPT + '?action=getimages&root=' + opts.PATH +
+       '&root_img=' + opts.PATH_IMG +
+       '&root_theme=' + opts.PATH_THEME + '"></iframe>');
+
+      uploadwidget.append(jQuery('<form action="' + opts.SCRIPT + '?action=addimg&root=' + opts.PATH +
+       '&root_img=' + opts.PATH_IMG +
+       '&root_theme=' + opts.PATH_THEME + '" enctype="multipart/form-data" method="post" target="' + iframeid + '"></form>'));
+      uploadwidget.find('form').append('<input id="fileupload" type="file" name="files" class="file" >');
+
+      uploadwidget.css("position", "absolute")
+      uploadwidget.css("top", pos.top);
+      uploadwidget.css("left", pos.left);
+      uploadwidget.find('iframe').hide();
+
+      uploadwidget.find('iframe').bind('load', loaddetails);
+      jQuery("#" + id).hide();
+      uploadwidget.find('.file').change(onChange);
+
+    }
+
+
+  }
+
+  jQuery(document).ready(function () {
+    jQuery(window).load(function (i) {
+
+    });
+  });
+})(jQuery);
+
+
Index: extensions/cuise/admin/maintain.inc.php
===================================================================
--- extensions/cuise/admin/maintain.inc.php	(revision 19486)
+++ extensions/cuise/admin/maintain.inc.php	(revision 19486)
@@ -0,0 +1,46 @@
+<?php
+
+function theme_activate($id, $version, &$errors){
+	global $conf;
+   global $nb_template;
+ $nb_template=5 ;
+
+	if (!isset($conf['cuise']))
+		{
+
+    $params['parent'] = "elegant";
+    $params['theme'] = 'cuise' ;
+
+    $name_tpl=array("cbmt.gif","bpv.jpg","bp3.jpg","bph.png","header.png");
+  for($id=0;$id<$nb_template;$id++){
+  		$params  = array_merge($params,array( 			
+						"bg_cuise_$id"			=> '#FFA800',
+						"bgho_cuise_$id"			=> '#0072FF',
+						"bd_cuise_$id"			=> '#4F4F4F',
+						"co_cuise_$id"		  => '#4F4F4F',
+            "coho_cuise_$id"		  => '#F4F4F4',
+            "img_cuise_$id"    =>   $name_tpl[$id],
+            "chk_cuise_x_$id"    => 'checked',
+            "chk_cuise_y_$id"    => '',
+            "rayon_cuise_$id"    => '8px',
+            "chk_cuise_$id"    => ''
+            ));
+            }
+
+$config=$params;
+		  
+		$query = "
+	INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
+	VALUES ('cuise' , '".pwg_db_real_escape_string(serialize($config))."' , 'cuise theme parameters');";
+
+		pwg_query($query);
+		}
+	}
+
+function theme_deactivate()
+	{
+    $query = "DELETE FROM " . CONFIG_TABLE . " WHERE param='cuise';";
+	pwg_query($query);
+	}
+
+?>
Index: extensions/cuise/admin/theme.css
===================================================================
--- extensions/cuise/admin/theme.css	(revision 19486)
+++ extensions/cuise/admin/theme.css	(revision 19486)
@@ -0,0 +1,151 @@
+.ui-slider {
+  color: #383838;
+  border-radius: 8px 8px 8px 8px;
+  position: relative;
+  text-align: left;
+  width: 450px;
+}
+.ui-slider .ui-slider-handle {
+  border: 1px solid #D7DEF0;
+  background: url("images/bouton_slide.png") repeat-x scroll 50% 50% transparent;
+  font-weight: bold;
+  color: #4C3000;
+  position: absolute;
+  z-index: 2;
+  cursor: default;
+  height: 26px;
+  width: 449px;
+}
+.ui-slider .ui-slider-range {
+  position: absolute;
+  z-index: 1;
+}
+.ui-slider-horizontal {
+  height: 30px;
+}
+.ui-slider-horizontal .ui-slider-handle {
+  border-radius: 8px;
+}
+.ui-slider-horizontal .ui-slider-range {
+  top: 0;
+  height: 100%;
+}
+.ui-slider-horizontal .ui-slider-range-min {
+  left: 0;
+}
+.ui-slider-horizontal .ui-slider-range-max {
+  right: 0;
+}
+.switcher input {
+  display: none;
+}
+.switcher {
+  border: 2px inset #EFEFEF;
+  border-radius: 8px;
+  background: #EDEDED;
+  height: 30px;
+  width: 900px;
+  color: #000;
+  position: relative;
+  margin-bottom: 40px;
+}
+.opt {
+  float: left;
+  border-right: 1px solid #FFF;
+  width: 449px;
+  height: 30px;
+  text-align: center;
+  font-size: 20px;
+}
+INPUT[type="text"].colorwell{
+  border: 2px inset #EFEFEF;
+  border-radius: 8px;
+  background: #EDEDED;
+  height: 30px;
+  width: 100px;
+  color: #000;
+  margin-bottom: 10px;
+}
+INPUT[type="text"]:active {
+  border: 2px inset #8f8f8f;
+}
+INPUT[type="text"].input{
+  border: 2px inset #EFEFEF;
+   border-radius: 8px;
+  background: #EDEDED;
+  height: 20px;
+  width:250px;
+  color: #000;
+  
+}
+INPUT[type="text"].input:active {
+  border: 2px inset #8f8f8f;   
+  border-radius: 8px;
+  background: #EDEDED;
+  height: 20px;  
+  color: #000;
+}
+
+#picker {
+  border: 1px solid #000;
+  border-radius: 5px;
+  padding: 20px;
+  width: 195px;
+  float: left;
+}
+#thePicturePage,
+#textcolor {
+  margin: 0px 20px 0 0;  
+  float: left;
+}
+.form-item {
+  text-align: right;
+}
+.farbtastic {
+  position: relative;
+}
+.farbtastic * {
+  position: absolute;
+  cursor: crosshair;
+}
+.farbtastic, .farbtastic .wheel {
+  width: 195px;
+  height: 195px;
+}
+.farbtastic .color, .farbtastic .overlay {
+  top: 47px;
+  left: 47px;
+  width: 101px;
+  height: 101px;
+}
+.farbtastic .wheel {
+  background: url(images/wheel.png) no-repeat;
+  width: 195px;
+  height: 195px;
+}
+.farbtastic .overlay {
+  background: url(images/mask.png) no-repeat;
+}
+.farbtastic .marker {
+  width: 17px;
+  height: 17px;
+  margin: -8px 0 0 -8px;
+  overflow: hidden;
+  background: url(images/marker.png) no-repeat;
+}
+.colorwell {
+  border: 2px solid #fff;
+  width: 5em;
+  text-align: center;
+  cursor: pointer;
+}
+.colorwell {
+  border: 2px solid #fff;
+  width: 3em;
+  text-align: center;
+  cursor: pointer;
+}
+body .colorwell-selected {
+  font-weight: bold;
+}
+
Index: extensions/cuise/classes/maintenance.php
===================================================================
--- extensions/cuise/classes/maintenance.php	(revision 19486)
+++ extensions/cuise/classes/maintenance.php	(revision 19486)
@@ -0,0 +1,225 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based photo gallery                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2012 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH'))
+{
+  die ("Hacking attempt!");
+}
+
+include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+
+// +-----------------------------------------------------------------------+
+// | Check Access and exit when user status is not ok                      |
+// +-----------------------------------------------------------------------+
+
+check_status(ACCESS_ADMINISTRATOR);
+
+if (isset($_GET['action']))
+{
+  check_pwg_token();
+}
+
+// +-----------------------------------------------------------------------+
+// |                                actions                                |
+// +-----------------------------------------------------------------------+
+
+$action = isset($_GET['action']) ? $_GET['action'] : '';
+
+switch ($action)
+{
+  case 'lock_gallery' :
+  {
+    conf_update_param('gallery_locked', 'true');
+    redirect(get_root_url().'admin.php?page=maintenance');
+    break;
+  }
+  case 'unlock_gallery' :
+  {
+    conf_update_param('gallery_locked', 'false');
+    $_SESSION['page_infos'] = array(l10n('Gallery unlocked'));
+    redirect(get_root_url().'admin.php?page=maintenance');
+    break;
+  }
+  case 'categories' :
+  {
+    update_uppercats();
+    update_category('all');
+    update_global_rank();
+    invalidate_user_cache(true);
+    break;
+  }
+  case 'images' :
+  {
+    update_path();
+		include_once(PHPWG_ROOT_PATH.'include/functions_rate.inc.php');
+    update_rating_score();
+    break;
+  }
+  case 'delete_orphan_tags' :
+  {
+    delete_orphan_tags();
+    break;
+  }
+  case 'history_detail' :
+  {
+    $query = '
+DELETE
+  FROM '.HISTORY_TABLE.'
+;';
+    pwg_query($query);
+    break;
+  }
+  case 'history_summary' :
+  {
+    $query = '
+DELETE
+  FROM '.HISTORY_SUMMARY_TABLE.'
+;';
+    pwg_query($query);
+    break;
+  }
+  case 'sessions' :
+  {
+    pwg_session_gc();
+    break;
+  }
+  case 'feeds' :
+  {
+    $query = '
+DELETE
+  FROM '.USER_FEED_TABLE.'
+  WHERE last_check IS NULL
+;';
+    pwg_query($query);
+    break;
+  }
+  case 'database' :
+  {
+    do_maintenance_all_tables();
+    break;
+  }
+  case 'c13y' :
+  {
+    include_once(PHPWG_ROOT_PATH.'admin/include/check_integrity.class.php');
+    $c13y = new check_integrity();
+    $c13y->maintenance();
+    break;
+  }
+  case 'search' :
+  {
+    $query = '
+DELETE
+  FROM '.SEARCH_TABLE.'
+;';
+    pwg_query($query);
+    break;
+  }
+  case 'compiled-templates':
+  {
+    $template->delete_compiled_templates();
+    FileCombiner::clear_combined_files();
+    break;
+  }
+  case 'derivatives':
+  {
+    clear_derivative_cache($_GET['type']);
+    break;
+  }
+  default :
+  {
+    break;
+  }
+}
+
+// +-----------------------------------------------------------------------+
+// |                             template init                             |
+// +-----------------------------------------------------------------------+
+
+$template->set_filenames(array('maintenance'=>'maintenance.tpl'));
+
+$url_format = get_root_url().'admin.php?page=maintenance&amp;action=%s&amp;pwg_token='.get_pwg_token();
+
+$purge_urls[l10n('All')] = sprintf($url_format, 'derivatives').'&amp;type=all';
+foreach(ImageStdParams::get_defined_type_map() as $params)
+{
+  $purge_urls[ l10n($params->type) ] = sprintf($url_format, 'derivatives').'&amp;type='.$params->type;
+}
+$purge_urls[ l10n(IMG_CUSTOM) ] = sprintf($url_format, 'derivatives').'&amp;type='.IMG_CUSTOM;
+
+$template->assign(
+  array(
+    'U_MAINT_CATEGORIES' => sprintf($url_format, 'categories'),
+    'U_MAINT_IMAGES' => sprintf($url_format, 'images'),
+    'U_MAINT_ORPHAN_TAGS' => sprintf($url_format, 'delete_orphan_tags'),
+    'U_MAINT_HISTORY_DETAIL' => sprintf($url_format, 'history_detail'),
+    'U_MAINT_HISTORY_SUMMARY' => sprintf($url_format, 'history_summary'),
+    'U_MAINT_SESSIONS' => sprintf($url_format, 'sessions'),
+    'U_MAINT_FEEDS' => sprintf($url_format, 'feeds'),
+    'U_MAINT_DATABASE' => sprintf($url_format, 'database'),
+    'U_MAINT_C13Y' => sprintf($url_format, 'c13y'),
+    'U_MAINT_SEARCH' => sprintf($url_format, 'search'),
+    'U_MAINT_COMPILED_TEMPLATES' => sprintf($url_format, 'compiled-templates'),
+    'U_MAINT_DERIVATIVES' => sprintf($url_format, 'derivatives'),
+    'purge_derivatives' => $purge_urls,
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=maintenance',
+    )
+  );
+
+
+if ($conf['gallery_locked'])
+{
+  $template->assign(
+    array(
+      'U_MAINT_UNLOCK_GALLERY' => sprintf($url_format, 'unlock_gallery'),
+      )
+    );
+}
+else
+{
+  $template->assign(
+    array(
+      'U_MAINT_LOCK_GALLERY' => sprintf($url_format, 'lock_gallery'),
+      )
+    );
+}
+
+// +-----------------------------------------------------------------------+
+// | Define advanced features                                              |
+// +-----------------------------------------------------------------------+
+
+$advanced_features = array();
+
+//$advanced_features is array of array composed of CAPTION & URL
+$advanced_features = trigger_event(
+  'get_admin_advanced_features_links',
+  $advanced_features
+  );
+
+$template->assign('advanced_features', $advanced_features);
+
+// +-----------------------------------------------------------------------+
+// |                           sending html code                           |
+// +-----------------------------------------------------------------------+
+
+$template->assign_var_from_handle('ADMIN_CONTENT', 'maintenance');
+?>
Index: extensions/cuise/classes/resize_helper.php
===================================================================
--- extensions/cuise/classes/resize_helper.php	(revision 19486)
+++ extensions/cuise/classes/resize_helper.php	(revision 19486)
@@ -0,0 +1,607 @@
+<?php
+
+class Resize_image_helper
+{
+	
+	protected $_units = array("B", "KB", "MB", "GB");	
+	protected $_allowed_extensions = array("jpeg", "jpg", "png", "gif");
+	private $_jpg_quality = 100;
+	private $_png_compression = 0;  
+	private $_width;
+	private $_height;
+	private $_aspect;	
+	/**
+	 * ["dirname"]  : Full folder path of image
+	 * ["fullpath]  : Same as dirname but includes the filename and extension
+	 * ["filename]  : Image name without extension
+	 * ["extension] : Image extension
+	 * ["filesize"] : Image filesize
+	 * @var array
+	 * 
+	 */
+	private $file = array();
+	protected $_resource;		
+	function __construct($src_path_img = NULL,$dest_path_img=NULL)
+	{
+  if(!empty($src_path_img)){
+  if(!empty($dest_path_img)) 
+			$this->dest_path_img= $dest_path_img;
+		else
+  	  $this->dest_path_img= $src_path_img;
+			$this->load_image($src_path_img);
+		}
+		$this->_reflex = new ReflectionClass('Resize_image_helper');
+	}	
+	/**
+	 * 
+	 * Verifies that the file extension is supported
+	 * @param string $ext
+	 * @return boolean
+	 */
+	private function _is_allowed_extension($ext)
+	{
+		try{
+			if(empty($ext)){
+				throw new Exception("Invalid Argument");	
+			}
+			
+			$ext = strtolower($ext);
+		 	return in_array($ext, $this->_allowed_extensions);
+		 	
+		}catch(Exception $e){
+			echo $e->getMessage();
+		}
+	}
+	
+	/**
+	 * Returns a value with two decimals from Megabyte.
+	 * If the conversion is in the order of 1E-3 returns zero
+	 * @param string
+	 * @return int|float
+	 */
+	private function _convert_size($unit)
+	{
+		try{
+			
+			if(empty($unit)){
+				throw new Exception("Invalid Argument");
+			}
+			
+			switch($unit){
+				case "B":{ 
+					return $this->file["filesize"];
+				}
+				case "KB":{
+					$size = floor($this->file["filesize"] / 1024 );
+					return $size;
+				}
+				case "MB":{
+					$size = round( 
+							($this->file["filesize"] / 1048576 ),
+						 	2, PHP_ROUND_HALF_DOWN
+						 );
+					return $size;
+				}
+				case "GB":{
+					$size = round(
+								($this->file["filesize"] / 1073741824 ),
+								2, PHP_ROUND_HALF_DOWN
+							);
+					return $size;
+				}
+			}
+		}catch(Exception $e){
+			echo $e->getMessage();
+		}
+	}
+	
+	/**
+	 * Assumes the existing resource and extension validates
+	 * Generates a new image
+	 * $output = NULL : the raw image stream will be outputted directly
+	 * $output = filepath : the raw image will be saved in a file
+	 * 
+	 * @param resource $container
+	 * @param string $ext
+	 * @param $output
+	 */
+	private function _sample($container, $ext, $output = NULL)
+	{
+		try{
+			if(empty($container) || empty($ext)){
+				throw new Exception("Invalid Argument");
+			}		
+			$ext = strtolower($ext);
+			switch($ext)
+			{
+				case "jpg":{
+					$resample = imageJPEG(
+									$container, 
+									$output, 
+									$this->_jpg_quality
+									);
+					break;
+				}
+				case "jpge":{
+					$resample = imageJPEG(
+									$container, 
+									$output, 
+									$this->_jpg_quality
+									);
+					break;
+				}
+				case "png":{
+					$resample = imagepng(
+									$container, 
+									$output, 
+									$this->_png_compression
+									);
+					break;
+				}
+				case "gif":{
+					$resample = imagegif($container, $output);
+				}
+			}
+			
+			if(empty($resample)){
+				throw new Exception("Cannot Render the Image");
+			}
+			
+			return $resample;
+			
+		}catch(Extension $e){
+			echo $e->getMessage();
+		}
+	}
+	
+	/**
+	 * Initializes an image
+	 * @param string
+	 */
+	function load_image($src_path_image)
+	{
+		try{
+			if(empty($src_path_image)){
+				
+				throw new Exception("Invalid Argument");
+			}
+				
+			$foo = pathinfo($src_path_image);
+			
+			if(!isset($foo["extension"])){
+				throw new Exception(
+					"Could not retrieve information from the image"
+				);
+			}
+				
+			if(!$this->_is_allowed_extension($foo["extension"])){
+				throw new Exception("Unsupported extension");
+			}
+				
+			$this->file["fullpath"] = $src_path_image;
+			$this->file["dirname"] = $foo["dirname"];
+			$this->file["basename"] = $foo["basename"];
+			$this->file["extension"] = strtoupper(
+										$foo["extension"]
+										);
+			$this->file["filename"] = $foo["filename"];
+			$this->file["filesize"] = filesize($src_path_image);
+			
+			switch($this->file["extension"]){
+				
+				case "JPEG":{
+					$this->_resource = ImageCreateFromJPEG(
+						$src_path_image
+						);
+					break;
+				}
+				
+				case "JPG":{
+					$this->_resource = ImageCreateFromJPEG(
+						$src_path_image
+						);
+					break;
+				}
+				
+				case "PNG":{
+					$this->_resource = ImageCreateFromPNG(
+						$src_path_image
+						);
+					break;
+				}
+				
+				case "GIF":{
+					$this->_resource = ImageCreateFromGIF(
+						$src_path_image
+						);
+					break;
+				}
+			}
+			
+			if($this->_resource === FALSE){
+				
+				throw new Exception("Could not create the resource");
+			}else{
+				$this->_width = imagesx($this->_resource);
+				// Get Original Image Width 
+				$this->_height = imagesy($this->_resource); 
+				// Get Original Image Height
+				if(!empty($this->_width) && !empty($this->_height)){
+					
+					$this->aspect = round(
+									($this->_width / $this->_height),
+								 	2, PHP_ROUND_HALF_DOWN
+								 );
+					return true;
+				}else{
+					
+					throw new Exception(
+						"Could not recover the dimensions of the image"
+					);
+				}
+			}
+		}catch(Exception $e){
+			echo $e->getMessage();
+		}
+	}
+	
+	/**
+	 * Convert the format of an image.
+	 * $reload = true : Load the resulting image on the object
+	 * @param string $ext
+	 * @param boolena $reload
+	 */
+	function convert_as($ext, $reload = FALSE, $save_as_file = TRUE, $save_name = NULL)
+	{
+		try{
+			if(empty($ext)){
+				throw new Exception("Extension cannot be NULL");
+			}
+			
+			if(empty($this->_resource)){
+				throw new Exception("Resource is needed");
+			}
+			
+			strtolower($ext);
+			
+			if($this->_is_allowed_extension($ext)){
+				
+				$temp_image = @imagecreatetruecolor($this->_width, $this->_height);
+				@imagecopyresampled(
+								$temp_image, 
+								$this->_resource, 0, 0, 0, 0, 
+								$this->_width, $this->_height, 
+								$this->_width, $this->_height
+								);
+				
+				if($save_as_file){
+					$output = $this->file["dirname"] . "/";
+					
+					if(!empty($save_name)){
+						$output .= $save_name . "." . $ext;
+					}
+					else{
+						$output .= $this->file["filename"] . "." . $ext;
+					}
+				}
+				else{
+					$output = NULL;
+				}
+				
+				if($this->_sample($temp_image, $ext, $output)){
+					
+					if($reload === TRUE){
+						return $this->load_image($output);
+					}
+					else{
+						return true;
+					}
+				}
+				else{
+					throw new Exception("Cannot Render the Image");
+				}
+			}
+			else{
+				throw new Exception("Unsupported extension");
+			}
+		}catch(Exception $e){
+			echo $e->getMessage();
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * 
+	 * Resize height of image
+	 * 
+	 * $respect_proportion = TRUE : 
+	 * 		Adjusts the image heigh; 
+	 * 		Adjusts the image width based on the original aspect ratio
+	 * 
+	 * $respect_proportion = FALSE:
+	 * 		Adjusts the image height 
+	 * 
+	 * WARNING: 
+	 * If the $overwrite option is active the original image will be replace.
+	 * 
+	 * $overwrite = TRUE: replace the original image
+	 * $overwrite = FALSE (default): create a copy with the original 
+	 * name and suffix w{$width}
+	 * 
+	 * @param int $width
+	 * @param boolean $width
+	 * @param boolean $respect_proportion
+	 * @return boolean
+	 */
+	function resize_width($width, $overwrite = FALSE, $respect_proportion = TRUE)
+	{
+		try{
+			if(empty($width)){
+				throw new Exception("Invalid Argument");
+			}
+			
+			if(empty($this->_resource)){
+				throw new Exception("Resource is needed");
+			}
+			
+			if($respect_proportion){
+				$height = (int)($width /  $this->aspect);
+			}else{
+				$height = $this->_height;
+			}
+			
+			$temp_image = @imagecreatetruecolor($width, $height);
+			@imagecopyresampled(
+							$temp_image, 
+							$this->_resource, 0, 0, 0, 0, 
+							$width, $height, // Resize dimensions 
+							$this->_width, $this->_height // Original dimensions
+							);
+			
+			if(!$overwrite){
+				$output = "{$this->file["dirname"]}/{$this->file["filename"]}_w{$height}.{$this->file["extension"]}";
+			}
+			else{
+				$output = $this->file["fullpath"];
+			}
+			$output =	$this->dest_path_img;
+
+			if($this->_sample($temp_image, $this->file["extension"], $output)){
+				return TRUE;
+			}else{
+				return FALSE;
+			}
+			
+		}catch(Exception $e){
+			echo $e->getMessage();
+		}
+	}
+	
+	
+	
+	/**
+	 * Destroy the image resource
+	 * @return boolean
+	 */
+	function free_image_mem()
+	{
+		if(!empty($this->_resource)){
+			return @imagedestroy($this->_resource);
+		}else{
+			return true;
+		}
+	}
+	
+	/**
+	 * Returns the width if it exists, false otherwise
+	 * @return int|FALSE
+	 */
+	function get_width()
+	{
+		if(empty($this->_width)){
+			return false;
+		}else{
+			return $this->_width;
+		}
+	}
+	
+	/**
+	 * Returns the heigth if it exists, false otherwise
+	 * @return int|FALSE
+	 */
+	function get_height()
+	{
+		if(empty($this->_height)){
+			return false;
+		}else{
+			return $this->_height;
+		}
+	}
+	
+	/**
+	 * Returns the aspect if it exists, false otherwise
+	 * @return float|FALSE
+	 */
+	function get_aspect()
+	{
+		if(empty($this->aspect)){
+			return false;
+		}else{
+			return $this->aspect;
+		}
+	}
+	
+	/**
+	 * Returns the file array if it exists, false otherwise
+	 * @return array|FALSE
+	 */
+	function get_fileinfo()
+	{
+		if(empty($this->file)){
+			return false;
+		}else{
+			return $this->file;
+		}
+	}
+	
+	/**
+	 * Returns the dirname of a image, false otherwise
+	 * @return string|FALSE
+	 */
+	function get_dirname()
+	{
+		if(!empty($this->file["dirname"])){
+			return $this->file["dirname"];
+		}else{
+			return false;
+		}
+	}
+	
+	/**
+	 * Returns the fullpath of a image, false otherwise
+	 * @return string|FALSE
+	 */
+	function get_fullpath()
+	{
+		if(!empty($this->file["fullpath"])){
+			return $this->file["fullpath"];
+		}else{
+			return false;
+		}
+	}
+	
+	/**
+	 * Returns the filename of a image, false otherwise
+	 * @return string|FALSE
+	 */
+	function get_filename()
+	{
+		if(!empty($this->file["filename"])){
+			return $this->file["filename"];
+		}else{
+			return false;
+		}
+	}
+	
+	/**
+	 * Returns the extension of a image, false otherwise
+	 * @return string|FALSE
+	 */
+	function get_extension()
+	{
+		if(!empty($this->file["extension"])){
+		    $ext = strtoupper($this->file["extension"]);
+			return $ext;
+		}else{
+			return false;
+		}
+	}
+	
+	/**
+	 * Retrieves the file size
+	 * @param string [optional]
+	 */
+	function get_filesize($unit = "B")
+	{
+		try{
+			if(empty($unit)){
+				throw new Exception("Invalid Argument");
+			}
+			
+			$unit = strtoupper($unit);
+				
+			if(in_array($unit, $this->_units)){
+				
+				return $this->_convert_size($unit);				
+			}
+		}catch(Exception $e){
+			echo $e->getMessage();
+		}
+	}
+	
+	/**
+	 * Return jpg_quality used to sample
+	 * @return int
+	 */
+	function get_jpg_quality()
+	{
+		return $this->_jpg_quality;
+	}
+	
+	
+	/**
+	 * Set jpg Quality used to sample
+	 * @param int $quality
+	 */
+	function set_jpg_quality($quality)
+	{
+		try{
+			
+			if(isset($quality) && $quality === 0){
+				$this->_jpg_quality = 0;
+				return true;
+			}
+			
+			if(empty($quality)){
+				throw new Exception("Invalid Argument - Accepted: (int)0~100");
+			}
+			
+			if($quality<1 || $quality>100){
+				throw new Exception(
+							"Invalid value to JPG quality - Accepted: (int)0~100"
+							);
+			}
+			
+			$this->_jpg_quality = $quality;
+			
+		}catch(Exception $e){
+			echo $e->getMessage();
+		}
+	}
+	
+	/**
+	 * Return PNG compression used to sample
+	 * @return int
+	 */
+	function get_png_compression()
+	{
+		return $this->_png_compression;
+	}
+	
+	/**
+	 * Set PNG compression used to sample
+	 * @param int $compression
+	 * @return boolean
+	 */
+	function set_png_compression($compression)
+	{
+		try{
+			if(isset($compression) && $compression === 0){
+				$this->_png_compression = 0;
+				return true;
+			}
+			
+			if(empty($compression)){
+				throw new Exception("Invalid Argument - Accepted: (int)1~9");
+			}
+		
+			if($compression<1 || $compression>9){
+				throw new Exception(
+						"Invalid value to PNG compression - Accepted: (int)1~9"
+						);
+			}
+			
+			$this->_png_compression = (int)$compression;
+			return true;
+		}catch(Exception $e){
+			echo $e->getMessage();
+		}
+	}
+	
+	function __destruct()
+	{
+		$this->free_image_mem();
+	}
+}
Index: extensions/cuise/index.php
===================================================================
--- extensions/cuise/index.php	(revision 19486)
+++ extensions/cuise/index.php	(revision 19486)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/cuise/js/gally_theme.js
===================================================================
--- extensions/cuise/js/gally_theme.js	(revision 19486)
+++ extensions/cuise/js/gally_theme.js	(revision 19486)
@@ -0,0 +1,117 @@
+/* -----------------------------------------------------------------------------
+  GALLY-CUISE
+  Template for Piwigo
+  ------------------------------------------------------------------------------
+  file: js/theme.js
+  file release:  1.0.0
+  theme release: 1.5.0
+  ------------------------------------------------------------------------------
+  author: cljosse at piwigo.org
+  << May the Little SpaceFrog be with you >>
+  ------------------------------------------------------------------------------
+  Specific JS for the theme
+
+  see the release_notes.txt file for more informations
+----------------------------------------------------------------------------- */
+
+var gallyCuise=null;
+
+jQuery(document).ready(
+  function()
+  {
+    gallyCuise = new GallyCuise();
+ 
+  
+    jQuery('a.pwg-state-default').each(function (i) {
+      obj = this;
+
+
+      jQuery(obj).addClass("button").removeClass('pwg-state-default').removeClass('pwg-button');
+      html = jQuery(obj).html();
+      if (html.indexOf("url(") > 0) {
+
+        id = this.id;
+        jQuery(this).css({
+         backgroundPosition:"-588px +28px"  
+         
+         });
+        htmls = html.split("url(");
+        htmls = htmls[1].split(")");
+        html = "<img src=" + htmls[0] + " class='pwg-button img_button'   />";
+ 
+      }else if (html.indexOf("map") > 0) {
+      html="";
+      jQuery(this).css({
+         backgroundPosition:"-588px -28px" ,
+         position:'relative' 
+        // bottom:'-10px',left:'-5px'
+         });
+      }
+
+      jQuery(obj).html(html);
+    });
+ }
+);
+
+
+  function GallyCuise()
+{
+  function init() { 
+
+  
+    // apply specific actions for categories pages
+    if(jQuery('#theCategoryPage').length>0)
+    {
+      setCatThumbHeight();
+      setTipPosition_Category();
+    }
+    // apply specific actions for picture pages
+    if(jQuery('#thePicturePage').length>0)
+    {
+      setTipPosition_Picture();
+    }
+    setTipPosition_Menu();
+    win_height = jQuery("#thumbContents").height();
+    if (!win_height)
+      win_height = jQuery("#theImage").height();
+
+  }
+
+  /**
+   * set the same height for all category block
+   */
+  function setCatThumbHeight()
+  {
+    var maxH=0;
+
+    jQuery('div ul.thumbnailCategories li div.thumbnailCategory').each(
+     function (index)
+     {
+        height=jQuery(this).height();
+        if(height>maxH) maxH=height;
+     }
+    );
+
+    jQuery('div ul.thumbnailCategories li div.thumbnailCategory').height(maxH);
+  }
+
+  function setTipPosition_Category()
+  {
+    jQuery('#categoryActionsID a.button').addClass('sTipOnLeft');
+    jQuery('div ul.thumbnailCategories li div.thumbnailCategory').addClass('sTipOnTop');
+  }
+
+  function setTipPosition_Picture()
+  {
+    jQuery('#imageToolBar div.navButtons a.navButton').addClass('sTipOnLeft').removeClass('sTipOnTop');
+    jQuery('#imageToolBar div.randomButtons a.button').addClass('sTipOnRight').removeClass('sTipOnTop');
+  }
+
+  function setTipPosition_Menu()
+  {
+    jQuery('#menubar span').removeClass('sTipOnTop');
+    jQuery('#menuTagCloud a').removeClass('sTipOnTop').addClass('sTipOnRight');
+  }
+
+  init();
+}
Index: extensions/cuise/js/stripped_block_theme.js
===================================================================
--- extensions/cuise/js/stripped_block_theme.js	(revision 19486)
+++ extensions/cuise/js/stripped_block_theme.js	(revision 19486)
@@ -0,0 +1,53 @@
+/* -----------------------------------------------------------------------------
+  GALLY-CUISE
+  Template for Piwigo
+  ------------------------------------------------------------------------------
+  file: js/theme.js
+  file release:  1.0.0
+  theme release: 1.5.0
+  ------------------------------------------------------------------------------
+  author: cljosse at piwigo.org
+  << May the Little SpaceFrog be with you >>
+  ------------------------------------------------------------------------------
+  Specific JS for the theme
+
+  see the release_notes.txt file for more informations
+----------------------------------------------------------------------------- */
+
+jQuery(document).ready(
+  function () {
+          jQuery('.size28x28#icon_gmaps').css({
+      height: '23px'
+    });
+    
+    jQuery('a.pwg-state-default').each(function (i) {
+      obj = this;
+      jQuery(obj).addClass("button").removeClass('pwg-state-default').removeClass('pwg-button');
+      html = jQuery(obj).html();
+      if (html.indexOf("url(") > 0) {
+
+        id = this.id;
+        jQuery(this).css({
+          backgroundPosition: "-588px +28px"
+
+        });
+        htmls = html.split("url(");
+        htmls = htmls[1].split(")");
+        html = "<img src=" + htmls[0] + " class='pwg-button img_button'   />";
+
+      } else if (html.indexOf("map") > 0) {
+        html = "";
+        jQuery(this).css({
+          backgroundPosition: "-588px -28px",
+          position: 'relative'
+          // bottom:'-10px',left:'-5px'
+        });
+      }
+
+      jQuery(obj).html(html);
+    });
+  }
+);
+
+
+   
Index: extensions/cuise/js/theme.js
===================================================================
--- extensions/cuise/js/theme.js	(revision 19486)
+++ extensions/cuise/js/theme.js	(revision 19486)
@@ -0,0 +1,53 @@
+/* -----------------------------------------------------------------------------
+  GALLY-CUISE
+  Template for Piwigo
+  ------------------------------------------------------------------------------
+  file: js/theme.js
+  file release:  1.0.0
+  theme release: 1.5.0
+  ------------------------------------------------------------------------------
+  author: cljosse at piwigo.org
+  << May the Little SpaceFrog be with you >>
+  ------------------------------------------------------------------------------
+  Specific JS for the theme
+
+  see the release_notes.txt file for more informations
+----------------------------------------------------------------------------- */
+
+jQuery(document).ready(
+  function () {
+          jQuery('.size28x28#icon_gmaps').css({
+      height: '23px'
+    });
+    
+    jQuery('a.pwg-state-default').each(function (i) {
+      obj = this;
+      jQuery(obj).addClass("button").removeClass('pwg-state-default').removeClass('pwg-button');
+      html = jQuery(obj).html();
+      if (html.indexOf("url(") > 0) {
+
+        id = this.id;
+        jQuery(this).css({
+          backgroundPosition: "-588px +28px"
+
+        });
+        htmls = html.split("url(");
+        htmls = htmls[1].split(")");
+        html = "<img src=" + htmls[0] + " class='pwg-button img_button'   />";
+
+      } else if (html.indexOf("map") > 0) {
+        html = "";
+        jQuery(this).css({
+          backgroundPosition: "-588px -28px",
+          position: 'relative'
+          // bottom:'-10px',left:'-5px'
+        });
+      }
+
+      jQuery(obj).html(html);
+    });
+  }
+);
+
+
+   
Index: extensions/cuise/js/theme1.js
===================================================================
--- extensions/cuise/js/theme1.js	(revision 19486)
+++ extensions/cuise/js/theme1.js	(revision 19486)
@@ -0,0 +1,117 @@
+/* -----------------------------------------------------------------------------
+  GALLY-CUISE
+  Template for Piwigo
+  ------------------------------------------------------------------------------
+  file: js/theme.js
+  file release:  1.0.0
+  theme release: 1.5.0
+  ------------------------------------------------------------------------------
+  author: cljosse at piwigo.org
+  << May the Little SpaceFrog be with you >>
+  ------------------------------------------------------------------------------
+  Specific JS for the theme
+
+  see the release_notes.txt file for more informations
+----------------------------------------------------------------------------- */
+
+var gallyCuise=null;
+
+jQuery(document).ready(
+  function()
+  {
+    gallyCuise = new GallyCuise();
+ 
+  
+    jQuery('a.pwg-state-default').each(function (i) {
+      obj = this;
+
+
+      jQuery(obj).addClass("button").removeClass('pwg-state-default').removeClass('pwg-button');
+      html = jQuery(obj).html();
+      if (html.indexOf("url(") > 0) {
+
+        id = this.id;
+        jQuery(this).css({
+         backgroundPosition:"-588px +28px"  
+         
+         });
+        htmls = html.split("url(");
+        htmls = htmls[1].split(")");
+        html = "<img src=" + htmls[0] + " class='pwg-button img_button'   />";
+ 
+      }else if (html.indexOf("map") > 0) {
+      html="";
+      jQuery(this).css({
+         backgroundPosition:"-588px -28px" ,
+         position:'relative' 
+        // bottom:'-10px',left:'-5px'
+         });
+      }
+
+      jQuery(obj).html(html);
+    });
+ }
+);
+
+
+  function GallyCuise()
+{
+  function init() { 
+
+  
+    // apply specific actions for categories pages
+    if(jQuery('#theCategoryPage').length>0)
+    {
+      setCatThumbHeight();
+      setTipPosition_Category();
+    }
+    // apply specific actions for picture pages
+    if(jQuery('#thePicturePage').length>0)
+    {
+      setTipPosition_Picture();
+    }
+    setTipPosition_Menu();
+    win_height = jQuery("#thumbContents").height();
+    if (!win_height)
+      win_height = jQuery("#theImage").height();
+
+  }
+
+  /**
+   * set the same height for all category block
+   */
+  function setCatThumbHeight()
+  {
+    var maxH=0;
+
+    jQuery('div ul.thumbnailCategories li div.thumbnailCategory').each(
+     function (index)
+     {
+        height=jQuery(this).height();
+        if(height>maxH) maxH=height;
+     }
+    );
+
+    jQuery('div ul.thumbnailCategories li div.thumbnailCategory').height(maxH);
+  }
+
+  function setTipPosition_Category()
+  {
+    jQuery('#categoryActionsID a.button').addClass('sTipOnLeft');
+    jQuery('div ul.thumbnailCategories li div.thumbnailCategory').addClass('sTipOnTop');
+  }
+
+  function setTipPosition_Picture()
+  {
+    jQuery('#imageToolBar div.navButtons a.navButton').addClass('sTipOnLeft').removeClass('sTipOnTop');
+    jQuery('#imageToolBar div.randomButtons a.button').addClass('sTipOnRight').removeClass('sTipOnTop');
+  }
+
+  function setTipPosition_Menu()
+  {
+    jQuery('#menubar span').removeClass('sTipOnTop');
+    jQuery('#menuTagCloud a').removeClass('sTipOnTop').addClass('sTipOnRight');
+  }
+
+  init();
+}
Index: extensions/cuise/load_img.php
===================================================================
--- extensions/cuise/load_img.php	(revision 19486)
+++ extensions/cuise/load_img.php	(revision 19486)
@@ -0,0 +1,11 @@
+<?php
+
+require_once("./classes/resize_helper.php");
+ 
+$path = "./img/01.jpg";
+$savedir= "./images/02.jpg";
+$image = new Resize_image_helper($path,$savedir); 
+$ret=$image->resize_width(800); 
+$image->free_image_mem();
+
+?>
Index: extensions/cuise/local_head.tpl
===================================================================
--- extensions/cuise/local_head.tpl	(revision 19486)
+++ extensions/cuise/local_head.tpl	(revision 19486)
@@ -0,0 +1,35 @@
+{if $themeconf.parent=="elegant"}
+{combine_script id='theme_js' load='header' require='jquery' path="themes/cuise/js/theme.js" }
+{elseif $themeconf.parent=="gally-grum-dark-II"}
+{combine_script id='theme_js' load='header' require='jquery' path="themes/cuise/js/gally_theme.js" }
+{elseif $themeconf.parent=="stripped_black_bloc"}
+{combine_script id='theme_js' load='header' require='jquery' path="themes/cuise/js/stripped_block_theme.js" }
+{/if}
+{php}
+global $themeconf,$mytheme ,$fond_color,$conf ;  
+global $arguments;
+$mytheme = 'themes/'.$themeconf['name'].'/';
+$mycss="theme.css.php";
+
+load_conf_from_db();
+$params = array_merge(unserialize($conf['cuise']));
+ $keys="";
+  foreach($params as $ligne=>$id){ 
+    $id=str_replace("#","_",$id);
+    $keys .= $ligne ."=".$id ."&";    
+  }
+$args='?'.$keys."redraw='ok'";
+if(file_exists( $mytheme."theme.css.css")){
+    $mycss="theme.css.css";
+    $args="";
+}
+{/php}
+
+
+
+ 
+<!-- **LOCAL** >HEADER> {$themeconf.name} / {$themeconf.parent} -->
+<link rel="stylesheet" href="{php} echo  $mytheme.$mycss.$args;  {/php}"  type="text/css" /> 
+<!-- **LOCAL** >HEADER> -->
+
+ 
Index: extensions/cuise/mail-css.tpl
===================================================================
--- extensions/cuise/mail-css.tpl	(revision 19486)
+++ extensions/cuise/mail-css.tpl	(revision 19486)
@@ -0,0 +1,10 @@
+{literal}
+body { background:#CCCCCC  }
+#copyright { font-size:8px; }
+h2 { background:#999999; border:outset   }
+img { border:1px #303030 solid; margin:8px; border-radius:0; -moz-border-radius:0;}
+img:hover { border:1px #fff solid; margin:8px; padding:0px; border-radius:0; -moz-border-radius:0;}
+a {  }
+a:hover { color: #00ff80; }
+ 
+{/literal}
Index: extensions/cuise/mail.css
===================================================================
--- extensions/cuise/mail.css	(revision 19486)
+++ extensions/cuise/mail.css	(revision 19486)
@@ -0,0 +1,9 @@
+/* CSS Document */
+body { background:#CCCCCC  }
+#copyright { font-size:8px; }
+h2 { background:#999999; border:outset   }
+img { border:1px #303030 solid; margin:8px; border-radius:0; -moz-border-radius:0;}
+img:hover { border:1px #fff solid; margin:8px; padding:0px; border-radius:0; -moz-border-radius:0;}
+a {  }
+a:hover { color: #00ff80; }
+
Index: extensions/cuise/theme.css
===================================================================
--- extensions/cuise/theme.css	(revision 19486)
+++ extensions/cuise/theme.css	(revision 19486)
@@ -0,0 +1,5 @@
+/* elegant */
+#menubar { 
+ margin-top:0px;   
+} 
+/*===========================*/
Index: extensions/cuise/theme.css.php
===================================================================
--- extensions/cuise/theme.css.php	(revision 19486)
+++ extensions/cuise/theme.css.php	(revision 19486)
@@ -0,0 +1,947 @@
+<?php  
+
+ $patterns = array();
+$patterns[0] = '_';
+$replacements = array();
+$replacements[0] = '#';
+if ( !isset($_GET['theme'])  ) {
+  global $nb_template;
+ $nb_template=5 ;
+
+$params['theme']="cuise";
+$params['parent']="cuise";
+
+$keys=array();
+  $name=array("cbmt.gif","bpv.png","bp3.jpg","bph.png");
+  for($id=0;$id<$nb_template;$id++){
+      $params  = array_merge($params,array( 			
+						"bg_cuise_$id"			=> '#FFA800',
+						"bgho_cuise_$id"			=> '#0072FF',
+						"bd_cuise_$id"			=> '#4F4F4F',
+						"co_cuise_$id"		  => '#4F4F4F',
+            "coho_cuise_$id"		  => '#F4F4F4',
+            "img_cuise_$id"    =>   $name[$id],
+            "rayon_cuise_$id"    => '8px',
+            "chk_cuise_$id"    => 'nochecked',
+
+            ));
+            } 
+$keys=$params ;
+ 
+
+$keys['theme']="cuise";
+$keys['parent']="cuise";
+}else{
+ $keys=$_GET;
+}
+ 
+ global $theme ;
+$theme_dir = $keys['theme'];
+$theme_parent = $keys['parent'];
+
+/*===============================================*/
+ if ($keys['chk_cuise_0']!='checked'){
+      $fondBG = "url(./images/" . $keys['img_cuise_0'].")" ;
+       $fondBG_hover = "url(images/hover_" . $keys['img_cuise_0'].")" ;
+      }else {
+      $fondBG ="none";   
+      $fondBG_hover ="none";
+}
+
+
+ 
+$rayon_0 = $keys['rayon_cuise_0'];  
+$fondBG_color = str_replace("_", "#",   $keys['bg_cuise_0']);
+$fondBG_color_hover = str_replace("_", "#",   $keys['bgho_cuise_0']);
+$lien_a = str_replace("_", "#",   $keys['co_cuise_0']);
+$lien_a_hover= str_replace("_", "#",   $keys['coho_cuise_0']); 
+/*===============================================*/
+ if ($keys['chk_cuise_1']!='checked'){
+      $fondBp = "url(images/" . $keys['img_cuise_1'].")" ;
+      $fondBp_hover =  "url(images/hover_".$keys['img_cuise_1'].")";
+}else {
+      $fondBp ="none"; 
+      $fondBp_hover ="none"; 
+      } 
+$fondBp_color =  str_replace("_", "#",   $keys['bg_cuise_1']);
+$fondBp_color_hover =str_replace("_", "#",   $keys['bgho_cuise_1']);
+$rayon_1 = $keys['rayon_cuise_1']; 
+/* menubar ---*/
+$bp_a = str_replace("_", "#",   $keys['co_cuise_1']);
+$bp_a_hover= str_replace("_", "#",   $keys['coho_cuise_1']); 
+/*=========== Menubar ========================*/
+ if ($keys['chk_cuise_2']!='checked'){
+    $fondHoriz = "url(images/".$keys['img_cuise_2'].")";
+    $fondHoriz_hover =  "url(images/hover_".$keys['img_cuise_2'].")";
+}else {
+    $fondHoriz ="none";  
+    $fondHoriz_hover = "non";
+}
+$fondHoriz_color =  str_replace("_", "#",   $keys['bg_cuise_2']);
+$fondHoriz_color_hover = str_replace("_", "#",   $keys['bgho_cuise_2']);
+$rayon_2 = $keys['rayon_cuise_2']; 
+$thumb_a = str_replace("_", "#",   $keys['co_cuise_2']);
+$thumb_a_hover= str_replace("_", "#",   $keys['coho_cuise_2']); 
+/*===============================================*/
+if ($keys['chk_cuise_3']!='checked'){
+    $fondVert = "url(images/".$keys['img_cuise_3'].")";
+$fondVert_hover = "url(images/hover_".$keys['img_cuise_3'].")";
+}else {
+    $fondVert="none";
+    $fondVert_hover="none";
+    }
+$fondVert_color =  str_replace("_", "#",   $keys['bg_cuise_3']);
+
+$fondVert_color_hover = str_replace("_", "#",   $keys['bgho_cuise_3']);
+$rayon_3 = $keys['rayon_cuise_3']; 
+$menu_a = str_replace("_", "#",   $keys['co_cuise_3']);
+$menu_a_hover= str_replace("_", "#",   $keys['coho_cuise_3']); 
+/*===============================================*/
+    $bck_header="none";
+    $bck_header_hover="none";
+if ($keys['chk_cuise_4']!='checked'){
+    $bck_header = "url(images/".$keys['img_cuise_4'].")";
+    if(file_exists("images/hover_".$keys['img_cuise_4']))
+        $bck_header_hover = "url(images/hover_".$keys['img_cuise_4'].")";
+} 
+$bck_header_color =  str_replace("_", "#",   $keys['bg_cuise_4']);
+$bck_header_color_hover = str_replace("_", "#",   $keys['bgho_cuise_4']);
+$bck_header_rayon = $keys['rayon_cuise_4']; 
+$bck_header_a = str_replace("_", "#",   $keys['co_cuise_4']);
+$bck_header_a_hover= str_replace("_", "#",   $keys['coho_cuise_4']); 
+
+
+
+
+ header( 'content-type: text/css' ); 
+ /*
+ if($keys['redraw'] != true ){ }
+
+ header('HTTP/1.0 304 Not Modified');  
+ header('Cache-Control: max-age=3600, must-revalidate');
+ */
+
+
+?>
+ /***************************************************************/
+ *,.*{
+  background-image:none;
+  background-color:transparent ;
+   
+ }
+ a{
+  color:<?php echo $lien_a ;?>;
+ }
+  a:hover{
+  color:<?php echo $lien_a_hover ;?>;
+ }
+
+ .browsePath{
+   background-image:none;
+  background-color:transparent ;
+ }
+
+ #imageHeaderBar, .titrePage{ 
+ height:32px;
+ }
+ #imageHeaderBar .browsePath,.titrePage{
+ padding-top:8px;
+ }
+ #theImageAndInfos{
+    background-image:none;
+  background-color:transparent ;
+ }
+input[type='text'], input[type='password'], input[type='button'], input[type='submit'], input[type='reset'], input[type='file'], select, textarea{
+ background-color:<?php echo $fondBG_color;?> ;
+ color:<?php echo $lien_a ;?>;
+}
+ body{ 
+ background-color:<?php echo $fondBG_color;?> ;
+ background-image:<?php echo $fondBG ;?>;
+ color:<?php echo $lien_a ;?>;
+}
+
+.titrePage,#imageHeaderBar{
+background-color:<?php echo $fondBp_color ;?>;
+background-image:<?php echo $fondBp ;?>; 
+ color:<?php echo $bp_a ;?>;
+}
+.titrePage a,#imageHeaderBar a{
+ 
+ color:<?php echo $bp_a ;?>;
+}
+.titrePage a:hover,#imageHeaderBar a:hover{
+ 
+ color:<?php echo $bp_a_hover ;?>;
+}
+
+#menubar{
+background-color:<?php echo $fondHoriz_color ;?>;
+background-image:<?php echo $fondHoriz ;?>; 
+    -moz-border-radius: <?php echo $rayon_2 ;?>;  
+  border-radius:  <?php echo $rayon_3." ".$rayon_2 ;?>; 
+
+}
+#menubar:hover{
+  background-color:<?php echo $fondHoriz_color_hover ;?>;
+  background-image:<?php echo $fondHoriz_hover ;?>; 
+
+}
+#menubar dd a{
+ color:<?php echo $fondHoriz_a_color ;?>;
+ 
+
+}
+#menubar dd a:hover{
+  color:<?php echo $fondHoriz_a_hover ;?>;  
+}
+
+#menubar dt{
+  background-color:<?php echo $fondBp_color ;?>;
+  background-image:<?php echo $fondBp ;?>;     
+   -moz-border-radius: <?php echo $rayon_3 ;?>;  
+  border-radius:  <?php echo $rayon_3." ".$rayon_3 ;?>; 
+}
+#menubar dt:hover{
+  background-color:<?php echo $fondBp_color_hover ;?>;
+  background-image:<?php echo $fondBp_hover ;?>; 
+}
+
+
+#content,.content{
+background-color:<?php echo $fondHoriz_color ;?>;
+background-image:<?php echo $fondHoriz ;?>; 
+  
+}
+#content:hover{
+background-color:<?php echo $fondHoriz_color_hover ;?>;
+background-image:<?php echo $fondHoriz_hover ;?>; 
+ 
+
+}
+#content a,.content a{
+  color:<?php echo $fondHoriz_a ;?>;
+  
+}
+#content a:hover{
+  color:<?php echo $fondHoriz_a_hover ;?>;
+}
+
+.thumbnailCategory{
+background-color:<?php echo $fondVert_color ;?>;
+background-image:<?php echo $fondVert ;?>; 
+}
+.thumbnailCategory:hover{
+  background-color:<?php echo $fondVert_color_hover ;?>;
+  background-image:<?php echo $fondVert_hover ;?>; 
+}
+
+
+#theHeader{
+background-color:<?php echo $bck_header_color ;?>;
+background-image:<?php echo $bck_header ;?>; 
+}
+
+#imageInfos{ 
+background-image:<?php echo $fondHoriz ;?>; 
+background-position: center middle;
+}
+
+#comments  {
+ background-color:<?php echo $fondVert_color_hover ;?>;
+background-image:<?php echo $fondBp ;?>; 
+ 
+background-repeat: repeat-x;
+background-position: center middle;
+}
+#pictureComments  {
+background-image:<?php echo $fondVert ;?>; 
+background-repeat: repeat-x;
+background-position: center middle;
+}
+
+
+
+/******** stripped ********/
+.categoryActions {
+<?php if(  $theme_parent =="stripped_black_bloc" ) 
+ echo "float:none;"; 
+?>
+ 
+}
+#themeSwitchBox{width:420px;
+diplay:block;
+}
+.theme-thumb{ height:80px;width:80px;
+ 
+}
+
+.menuhidden .switchArrow		{ background-position: 0 0;}
+.menushown   .switchArrow		{ background-position: -16px 0;}
+.infohidden .switchArrow		{ background-position: -16px 0;}
+.infoshown   .switchArrow		{ background-position: 0 0;}
+.commentshidden .switchArrow	{ background-position: -48px 0;}
+.commentsshown   .switchArrow	{ background-position: -32px 0;}
+
+#menubar li {
+	list-style-position: inside;
+	list-style-image: url(images/small_bullet_0.png);
+}
+#menubar li li {
+	list-style-position: inside;
+	list-style-image: url(images/small_bullet_2.png);
+}
+#menubar li li li{
+	list-style-position: inside;
+	list-style-image: url(images/small_bullet_vert.png);
+}
+#menubar li li li li{
+	list-style-position: inside;
+	list-style-image: url(images/small_bullet_bleu.png);
+}
+/*================================================================*/
+ <?php
+if(0){
+/*===========  Couleur ==================*/
+
+$C_FFB0B0 = '#FFB0B0' ;
+$C_802020 = '#802020' ;
+$C_800000 = '#800000';
+$C_ffffff = '#ffffff';
+$C_B0FFB0 = '#B0FFB0';
+$C_208020 = '#208020';
+$C_008000 = '#008000';
+$C_DEDEDE = '#050505';
+$C_101010 = 'Transparent';
+$C_303030 = '#606060';
+ $border_color = '#606060';
+$tag_hover ='transparent';
+$C_606060 = '#303030';
+$C_000000= "#000000";
+$input_color= "#030380";
+$C_999999= "#999999";
+$input_bg= "#f5f5f5";
+$C_CCC= "#333";
+?>
+#the_page{ 
+ background-color:<?php echo $fondBG_color;?> ;
+ background-image:<?php echo $fondBG ;?>;
+}
+#thePicturePage{
+ background-color:<?php echo $fondBG_color;?> ;
+ background-image:<?php echo $fondBG ;?>;
+}
+
+
+html,body,#content{  
+ background-color:<?php echo $fondBG_color;?> ;
+ background-image:<?php echo $fondBG ;?>;
+ }
+
+
+
+
+/*============================================================*/
+.content .titrePage, 
+.bloc_stuff,
+.browsePath,
+.randomButtons,
+ #imageTitle, .randomButtons, #footer_left, #copyright,
+ #tabZone,.imageToolBarBg ,
+.navigationBar, #imageHeaderBar,#copyright,#imageHeaderBar,.masonry-brick, .bloc .title, .nav_bulle{
+background-color:<?php echo $fondBp_color ;?>;
+background-image:<?php echo $fondBp ;?>; 
+ 
+}
+
+
+
+#titreContent1,
+.calendarTitle,
+.calendarBar{
+     
+}
+
+#calendar_block{
+padding:0px;
+top:0px; 
+background-image:<?php echo  $fondHoriz; ?>;
+background-repeat: repeat-x ; 
+}
+#titreContent1{
+  background-image:<?php echo $fondHoriz; ?>;
+  background-repeat: repeat-x ; 
+  
+}
+ 
+.calendarViews{
+ 
+background-image:<?php echo  $fondHoriz; ?> ;
+background-repeat: repeat-x ; 
+}
+
+.calendarTitle {
+  background-image:<?php echo $fondHoriz; ?> ;
+}
+.calendarBar{ 
+ background-image:<?php echo $fondVert; ?> ;
+  
+}
+
+ 
+/*=======================================================*/
+.header_notes{ padding:0px;align:left;vertical-align:middle;
+  background-Color:Transparent;
+
+  background-image:url(icon/notes.png) ;
+}
+.header_notes p{
+background-color:<?php echo $fondHoriz_color ; ?> ;
+ background-image:<?php echo $fondHoriz ; ?> ;
+  
+}
+
+#tabs,#theImageAndInfos{  
+background-color:<?php echo $fondHoriz_color ; ?> ;
+ background-image:<?php echo $fondHoriz ; ?> ;
+}
+
+/*============================================================*/
+#imageToolBar,.contentWithMenu #imageHeaderBar,.titrePage ul .categoryActions,.categoryActions{
+background-color:transparent;
+ background-image:none ;
+  margin-top:-5px;
+}
+ 
+.titrePage .categoryActions li a{
+  vertical-align: middle; 
+  text-align: center;
+  cursor:pointer
+}
+.contentWithMenu #imageHeaderBar,.titrePage {  
+background-color:<?php echo $fondBp_color ; ?> ;
+ background-image:<?php echo $fondBp ; ?> ; 
+ background-position: center;
+ padding:8px
+}
+.browsePath{
+ background-image:<?php echo "none" ; ?> ;
+ background-color:<?php echo "transparent" ; ?> ;
+}
+ /*-------------- MON THEME -------------------------*/ 
+
+#thePicturePage #comments{
+  background-color:<?php echo $fondHoriz_color ; ?> ;
+  background-image:<?php echo $fondHoriz ; ?> ;
+    -moz-border-radius: <?php echo $rayon_3 ;?>;  
+  border-radius:  <?php echo $rayon_3." ".$rayon_3 ;?>; 
+}
+
+#imageInfos{
+background-color:<?php echo $fondHoriz_color ; ?> ;
+ background-image:<?php echo $fondHoriz ; ?> ;
+ 
+
+}
+
+/*--------------- menubar -------------*/
+#menubar DT,#menubar dt{ 
+    background-color: <?php echo $fondBp_color ;?>; 
+    background-image:<?php echo $fondBp ;?>; ;
+     background-repeat: repeat-x ;   
+       -moz-border-radius: <?php echo $rayon_1 ;?>;  
+  border-radius:  <?php echo $rayon_1." ".$rayon_1 ;?>; 
+}
+#menubar { 
+  background-color: <?php echo $fondHoriz_color ;?>; 
+  background-image:<?php echo $fondHoriz ; ?> ;
+  border: <?php echo $border_color ;?> ; 
+  -moz-border-radius: <?php echo $rayon_1 ;?>;  
+  border-radius:  <?php echo $rayon_1." ".$rayon_1 ;?>; 
+} 
+
+#menubar:hover {   
+background-color: <?php echo $fondHoriz_color_hover ;?>; 
+background-image:<?php echo $fondHoriz_hover ; ?> ;
+} 
+#menubar a:hover,#menubar dt:hover {   
+color:<?php echo $bp_a_hover ;?>;
+} 
+#menubar a,#menubar dt,#menubar span{  
+  color:<?php echo $bp_a ;?> ;
+}  
+
+/*--------- Categorie ---------------------*/
+
+#theComments{background-image:<?php echo $fondHoriz ; ?>;} 
+
+div ul.thumbnails span.wrap2{
+ 
+  overflow:hidden ;
+  
+}
+
+.wrap2:hover ,.wrap1:hover{
+background-color:<?php echo $fondHoriz_color_hover; ?> ;
+  background-image:<?php echo $fondHoriz_hover; ?> ;
+     -moz-border-radius: <?php echo $rayon_2 ;?>;  
+  border-radius:  <?php echo $rayon_2." ".$rayon_2 ;?>; 
+}
+
+
+.wrap1{  
+background-color:<?php echo $fondHoriz_color; ?> ;
+  background-image:<?php echo $fondHoriz ; ?> ;
+   -moz-border-radius:  <?php echo $rayon_2 ;?>; 
+  border-radius: <?php echo $rayon_2." ".$rayon_2." ".$rayon_2." ".$rayon_2 ;?>; 
+}
+
+.content div.thumbnailCategory,
+.thumbnailCategory {
+background-color:<?php echo $fondHoriz_color; ?> ;
+         -moz-border-radius: <?php echo $rayon_3 ;?>; 
+        border-radius: <?php echo $rayon_3." ".$rayon_3 ;?>;
+  background-image:<?php echo $fondHoriz; ?>;
+
+} 
+.content div.thumbnailCategory:hover,.thumbnailCategory:hover {
+background-color:<?php echo $fondHoriz_color_hover; ?> ;
+  background-image:<?php echo $fondHoriz_hover ; ?> ;
+} 
+
+ 
+#imageToolBar H2{
+                 background-color:transparent;                  
+                 }
+
+
+
+#navThumbPrevContainer{background-image:<?php echo $fondHoriz; ?>;background-position:center;}
+#navThumbNextContainer{background-image:<?php echo $fondHoriz; ?>; background-position:center;}
+ 
+ #navThumbNextContainer{ position: static
+}
+
+
+.infoTable{background-image:<?php echo $fondHoriz_hover; ?> ;}
+
+INPUT[type="submit"], input[type="button"], input[type="reset"] {
+ 
+ background-image:<?php echo $fondHoriz; ?>;
+}
+
+fieldset { background-image:<?php echo $fondHoriz; ?>;}
+
+fieldset legend {
+border:none;
+background-image:<?php echo $fondHoriz; ?>;}
+
+#theTabsContainer{  background-image:url(icon/1x1transp.gif) }
+
+ 
+
+/*===========  Couleur ==================*/
+ 
+div.errors {
+  background:<?php echo $C_FFB0B0 ; ?>;
+  border: <?php echo $C_802020 ; ?>;
+  color:<?php echo $C_802020 ; ?>;  
+}
+div.errors a {
+  color:<?php echo $C_800000 ; ?>;  
+}
+div.errors button {
+  color:<?php echo $C_ffffff ; ?>;
+  background:<?php echo $C_802020 ; ?>; 
+}
+div.errors button:hover {
+  color:<?php echo $C_FFB0B0 ; ?>;
+}
+div.errors button:active {
+  color:<?php echo $C_802020 ; ?>;
+  background:<?php echo $C_ffffff ; ?>;
+}
+div.infos {
+  background:<?php echo $C_B0FFB0 ;?>;
+  border: <?php echo $C_208020 ;?>;
+  color:<?php echo $C_208020 ;?>;
+ 
+}
+div.infos a {
+  color:<?php echo $C_008000 ;?>;
+  
+}
+div.infos button {
+  color:<?php echo $C_ffffff ; ?>;
+  background:<?php echo $C_208020 ;?>;
+}
+div.infos button:hover {
+  color:<?php echo $C_B0FFB0 ;?>;
+}
+div.infos button:active {
+  color:<?php echo $C_208020 ;?>;
+  background:<?php echo $C_ffffff ; ?>;
+}
+
+ 
+ 
+div.ui-widget-overlay ,#additional_infoTOP, #additional_infoBOTTOM{
+  background:<?php echo $C_101010 ;?>;
+}
+
+.thumbnailCategory{ 
+  border-bottom:  <?php echo $border_color ;?> ;
+  border-right:  <?php echo $border_color ;?> ;
+  vetical-align:middle;
+}
+
+
+.illustration a img {
+  border:2px <?php echo $border_color ; ?> ;
+}
+
+p.thumbCatDesc {
+  border-top: <?php echo $border_color ;?> dotted;
+ 
+}
+
+div ul.thumbnails img, #linkPrev img, #linkNext img {
+  border:  <?php $border_color ; ?>;
+}
+
+
+
+
+
+.copyright {
+
+ background-image:<?php echo $fondHoriz_hover ; ?>; 
+  border-top: <?php echo $border_color ;?> ;
+}
+
+
+
+
+
+.titrePage{   
+ background-position: center center;
+background-image:<?php echo $fondBp ;?>; 
+background-repeat: repeat-x ;  
+}
+
+
+  
+
+
+table.calMonth td.calDayCellFull:hover {
+  background-color:<?php echo $C_ffffff ; ?>;
+}
+
+
+
+/*  inputs*/
+input[type="text"], input[type="password"], select, textarea, file { 
+ background: <?php echo $input_bg ;?>;   
+}
+
+input:focus, select:focus {
+  background: <?php echo $C_ffffff ; ?>; 
+}
+
+input[type="submit"], input[type="button"], input[type="reset"], button {
+ 
+  border-bottom: <?php echo $border_color ;?> ;
+  border-right: <?php echo $border_color ;?> ;
+  border-top: <?php echo $C_ffffff ; ?> ;
+  border-left: <?php echo $C_ffffff ; ?> ;
+
+}
+
+input[type="submit"]:active, input[type="button"]:active, input[type="reset"]:active {
+ 
+  border-bottom: <?php echo $C_ffffff ; ?> ;
+  border-right: <?php echo $C_ffffff ; ?> ;
+  border-top: <?php echo $border_color ;?> ;
+  border-left: <?php echo $border_color ;?> ;
+}
+
+ 
+
+
+fieldset {
+  border: <?php echo $border_color ;?> dotted;
+}
+
+fieldset legend {
+  background-color:<?php echo $C_000000 ;?>;
+}
+/*  picture page*/
+.switchBox { 
+    border:   <?php echo $border_color ; ?>;  
+    background-color:<?php echo $fondHoriz_color ; ?>; 
+    background-image:<?php echo $fondHoriz; ?>;
+
+}
+
+#theImgHighBg {
+  background-color:<?php echo $C_000000 ;?>;
+  opacity:0.88;
+  filter:alpha(opacity:88);
+}
+
+
+.imageNumber {
+  border: <?php echo $C_999999 ;?> ;
+}
+
+#theImgContainer {
+/* border:8px <?php echo $border_color ; ?> ;*/
+}
+
+.navThumbPrevContent a img, .navThumbNextContent a img {
+  border: <?php echo $border_color ;?> ;
+}
+
+.navThumbPrevContent a:hover img, .navThumbNextContent a:hover img {
+  border: <?php echo $border_color ;?> ;
+}
+
+
+.infoTable tr { 
+ 
+    border: dotted  <?php echo $border_color ;?>;
+}
+
+.infoTable .label { 
+  border-left: dotted <?php echo $border_color ;?>;
+}
+
+.infoTable tr:hover {
+    border:  <?php echo $border_color ;?>;
+      background:transparent;
+}
+.infoTable tr.emptyrow:hover {
+  background:transparent;
+
+}
+.commentDetail {
+  border-bottom: dotted <?php echo $C_606060 ;?>;
+}
+ 
+#content, .content, .content .titrePage, #imageToolBarContainer,#subContent h2 {
+  border-bottom:0px <?php echo $border_color ;?> ;
+}
+
+
+.commentDetail .description .author,
+.commentDetail .description .date {
+ 
+}
+#titleComment h3:hover {
+  background:<?php echo $C_303030 ;?>;
+}
+/*
+ * tabs
+*/
+ 
+#theTabsBg, #theTabs {
+    background-position: center top;
+     background-repeat: repeat-x;
+  background-attachment: fixed;
+ background-image:<?php echo $fondHoriz_hover ; ?>;
+}
+
+#theTabsheets li.tab {
+ 
+ background-color:Transparent;
+  background-position: center;
+  background-image:<?php echo $fondHoriz_hover ; ?>;
+ border:<?php echo $C_606060 ;?>;
+ 
+}
+
+ 
+ 
+
+/*
+  tags
+*/
+ 
+#fullTagCloud SPAN a:hover {
+  background:<?php echo $tag_hover ;?>; 
+ 
+}
+
+ 
+ 
+
+.mandatorystar {
+  color:<?php echo "blue" ;?>;
+}
+
+ 
+/*
+  help
+*/
+#thePopuphelpPage h1 {
+  background:<?php echo $C_606060 ;?>;
+}
+
+
+#iSimpleTipContent { background: <?php echo $C_ffffff ; ?>;
+   
+}
+div.content ul.categoryActions li.menuf ul.flag-pan .flags:hover, .menuf a img.flags {
+ /* border:  <?php echo $C_303030 ;?>;*/
+}
+
+div.content ul.categoryActions li.menuf ul.flag-pan .flags {
+ /* border:  <?php echo $C_000000 ;?>;*/
+}
+
+ul.flag-pan {
+ 
+  border:  <?php echo $C_303030 ;?>;
+}
+
+
+/*
+ * Comment editor compatibility
+*/
+div#ce-content.content, div#ce-message-block.content  {
+ 
+  border:  <?php echo $C_606060 ;?>;
+}
+
+ 
+
+
+.img_button{ height:25px;
+   -moz-border-radius: 3px;  /* round corners with Geko */
+  border-radius: 3px 3px; /* round corners with CSS3 compliant browsers */
+}
+#bp_cla {
+  background-position:-588px +28px;
+ border:1px  white;
+   -moz-border-radius: 3px;  /* round corners with Geko */
+  border-radius: 3px 3px; /* round corners with CSS3 compliant browsers */
+}
+#bp_cla.button:hover {
+  background-position:-588px +28px;
+}
+
+
+/*==============================================================*/
+
+.gmapsMarkup {
+   background-image:<?php echo $fondHoriz; ?>;
+}
+.content bloc_stuff .isotope .isotope-item{
+         -moz-border-radius: <?php echo $rayon_2 ;?>;  /* round corners with Geko */
+        border-radius: <?php echo $rayon_2." ".$rayon_2 ;?>; /* round corners with CSS3 compliant browsers */
+      background-image:<?php echo $fondHoriz; ?> ;
+
+
+}
+.content_block, #the_page .middle_block{   
+        
+         -moz-border-radius: <?php echo $rayon_2 ;?>;  /* round corners with Geko */
+        border-radius: <?php echo $rayon_2." ".$rayon_2 ;?>; /* round corners with CSS3 compliant browsers */
+      background-image:<?php echo $fondHoriz; ?> ;
+ 
+   }
+
+.content .additional_info,.content_block .additional_info,tr .additional_info{   
+border:none;
+         -moz-border-radius: <?php echo $rayon_2 ;?>;  /* round corners with Geko */
+        border-radius: <?php echo $rayon_2." ".$rayon_2 ;?>; /* round corners with CSS3 compliant browsers */
+      background-image:<?php echo $fondHoriz; ?> ;
+ 
+   }
+   
+
+/*==============================================================*/
+ 
+.masonry-brick:hover, .bloc:hover .title:hover, .nav_bulle:hover{
+  
+  background-image:<?php echo $fondHoriz_hover ; ?>;
+}
+ 
+ 
+
+  
+    #the_page #menuSwitcher.menuhidden	{ background-color: Transparent;}
+    #the_page #infoSwitcher{ background-color: Transparent;}
+
+  #quicksearch input,  input, select, textarea,input[type='submit'], input[type='reset']{ background-color: transparent ;
+  
+    }
+
+    #comments > ul > li{
+ 
+  background-image:<?php echo $fondHoriz_hover ; ?>;
+    }
+        #comments > ul > li:hover{
+  background-image:<?php echo $fondHoriz; ?>;
+    }
+
+
+button:hover  {
+ color:<?php echo $lien_a_hover ;?>;
+ 
+}
+input[type='text'], input[type='password'], input[type='button'], input[type='submit'], input[type='reset'], input[type='file'], select, textarea{
+   color: <?php echo $lien_a ;?>; 
+}
+.commentList a,.content_block a,
+input[type='submit'], input[type='reset'],
+#comments .description .author, #comments .description .date,
+#tabZone *,
+ .masonry-brick,
+  .bloc .title,
+   .nav_bulle,
+     *,
+      a  {     color: <?php echo $lien_a ;?>;     }
+*:active , *:hover, *:focus, a:hover {   color: <?php echo $lien_a_hover ;?>;      }
+
+.browsePath, .randomButtons, #footer_left, #copyright{
+  color: <?php echo $lien_a ;?>;  
+}
+
+#imageHeaderBar{  
+  color: <?php echo $bck_header_a ;?>; 
+    background-color:<?php echo $bck_header_color;?> ;
+    background-image:<?php echo $bck_header; ?>;
+}
+ 
+ #theHeader, #imageTitle {
+  color: <?php echo $bck_header_a ;?>; 
+    background-color:<?php echo $bck_header_color;?> ;
+    background-image:<?php echo $bck_header; ?>;
+ }
+   
+
+
+
+
+
+#theTabsBg {
+opacity:0.2;
+filter:alpha(opacity:15)
+}
+
+.thumbnails li, #thumbnails li,.thumbnailCategories li, #thumbnails ul{
+  background-image:<?php echo $fondHoriz; ?> ;
+     -moz-border-radius: <?php echo $rayon_2 ;?>;  
+  border-radius:  <?php echo $rayon_2." ".$rayon_2 ;?>; 
+}
+.thumbnails li:hover, #thumbnails li:hover,.thumbnailCategories li:hover,#thumbnails ul:hover{
+  background-image:<?php echo $fondHoriz_hover; ?> ;
+     -moz-border-radius: <?php echo $rayon_2 ;?>;  
+  border-radius:  <?php echo $rayon_2." ".$rayon_2 ;?>; 
+}
+.switchArrow				{ background-image:url(icon/arrows_black.png);}
+.switchArrow:hover 			{ background-image:url(icon/arrows_black_hover.png);}
+ <?php
+}
+?>
Index: extensions/cuise/themeconf.inc.php
===================================================================
--- extensions/cuise/themeconf.inc.php	(revision 19486)
+++ extensions/cuise/themeconf.inc.php	(revision 19486)
@@ -0,0 +1,40 @@
+<?php
+/*
+Theme Name: Cuise
+Version: 1.0.0
+Description: Theme Customizable
+Theme URI: http://piwigo.org/ext/extension_view.php?eid=662
+Author: cljosse
+Author URI: http://cl.josse.free.fr
+*/
+global  $themeconf,$conf;
+if(!isset($conf['cuise']))
+  $params['parent'] ="elegant";
+    else
+  $params = array_merge(unserialize($conf['cuise']));
+
+  if(!isset($params['parent']) || $params['parent'] =="parent" ||  empty($params['parent'])  ) {
+
+ $params['parent'] ="elegant";
+}
+$parent=$params['parent'];
+$themeconf = array(
+  'name' => 'cuise',
+  'theme_dir' => 'cuise',
+  'img_dir' => 'images',
+
+  'parent' => $parent,
+  'icon_dir' => "themes/cuise/icon",
+
+  'admin_icon_dir' => 'themes/default/icon/admin',
+  'mime_icon_dir' => 'themes/default/icon/mimetypes/',
+  'local_head' => 'local_head.tpl',
+  'load_parent_local_head' => true
+);
+if( isset($_GET['cl_view']) ){
+ echo "<pre>";
+ print_r($themeconf);
+ die();
+ }
+
+?>
