Index: /trunk/template/default/about.vtp
===================================================================
--- /trunk/template/default/about.vtp	(revision 24)
+++ /trunk/template/default/about.vtp	(revision 25)
@@ -3,4 +3,5 @@
     {#style}
     <title>{#about_page_title}</title>
+    <meta http-equiv="Content-Type" content="text/html; {#charset}">
   </head>
   <body>
Index: /trunk/template/default/admin/admin.vtp
===================================================================
--- /trunk/template/default/admin/admin.vtp	(revision 24)
+++ /trunk/template/default/admin/admin.vtp	(revision 25)
@@ -1,5 +1,5 @@
 <html>
   <head>
-    <title>{#page_title}</title>
+    <title>{#title_default}</title>
     <style>
       a {
@@ -56,6 +56,10 @@
         background-color:#E6E4E4;
       }
-      td.row2 {
+      td.row2,td.throw2 {
         background-color:#E8E8E8;
+      }
+      td.throw2 {
+        text-align:center;
+        font-weight:bold;
       }
       td.row3 {
@@ -95,4 +99,10 @@
         text-align:center;
       }
+      div.key {
+        margin-left : 10px;
+      }
+      td.choice {
+        text-align : center;
+      }
     </style>
     <script language="javascript">
@@ -125,4 +135,5 @@
       }
     </script>
+    <meta http-equiv="Content-Type" content="text/html; {#charset}">
   </head>
   <body>
Index: /trunk/template/default/admin/comments.vtp
===================================================================
--- /trunk/template/default/admin/comments.vtp	(revision 25)
+++ /trunk/template/default/admin/comments.vtp	(revision 25)
@@ -0,0 +1,124 @@
+<style>
+      .commentsAuthor,.commentsTitle,.commentsInfos,.commentsContent,.commentsNavigationBar {
+        color:{#text_color};
+        font-family:arial,sans-Serif;
+        font-size:12px;
+      }
+      .commentsTitle,.commentsAuthor {
+        text-align:center;
+        font-weight:bold;
+      }
+      .commentsInfos {
+        text-align:right;
+        margin:3px 3px 3px 10px;
+        font-size:11px;
+      }
+      .commentsContent {
+        margin:10px;
+      }
+      .commentsTitle {
+        margin-top:15px;
+      }
+      .commentsAuthor {
+        margin:5px;
+      }
+      .commentsNavigationBar {
+        margin:10px;
+      }
+      .tableComment {
+        width:100%;
+        border:2px solid #006699;
+        margin:10px;
+      }
+      .cellAuthor {
+        border-right:1px solid #006699;
+        width:100px;
+      }
+      .cellInfo {
+        border-bottom:1px solid #006699;
+      }
+      .imgLink {
+        border:1px solid black;
+      }
+</style>
+<!--VTP_section-->
+<table style="width:100%;">
+  <tr>
+    <th>
+      {#title}
+      <!--VTP_last_days-->
+      [
+      <!--VTP_last_day_option-->
+      <a href="{#link}" style="{#style}">{#option}</a>{#separation}
+      <!--/VTP_last_day_option-->
+      {#stats_last_days}
+      ]
+      <!--/VTP_last_days-->
+      <!--VTP_open-->
+      [ <a href="{#url}">{#open}</a> ]
+      <!--/VTP_open-->
+      <!--VTP_close-->
+      [ <a href="{#url}">{#close}</a> ]
+      <!--/VTP_close-->
+    </th>
+  </tr>
+</table>
+<!--VTP_start_form-->
+<form action="{#action}" method="post">
+<!--/VTP_start_form-->
+<!--VTP_picture-->
+<div style="border:2px solid #D3DCE3;margin:2px;">
+  <table style="width:100%;">
+    <tr>
+     <td valign="top" width="1px">
+       <!-- the thumbnail of the picture, linked to the full size page -->
+       <a href="{#thumb_url}" title="{#thumb_title}">
+         <img src="{#thumb_src}" class="imgLink" alt="{#thumb_alt}"/>
+       </a>
+     </td>
+     <td>
+       <div style="font-weight:bold;">{#title}</div>
+       <!--VTP_comment-->
+       <table style="width:100%;">
+         <tr>
+           <td>
+             <table class="tableComment">
+               <tr>
+                 <td rowspan="2" valign="top" class="cellAuthor">
+                   <div class="commentsAuthor">{#author}</div>
+                 </td>
+                 <td class="cellInfo">
+                   <div class="commentsInfos">
+                     {#date}<!--VTP_delete--><a href="{#link}" title="{#comments_del}"><img src="./images/delete.gif" style="border:none;margin-left:5px;" alt="[{#delete}]"/></a><!--/VTP_delete-->
+                   </div>
+                 </td>
+               </tr>
+               <tr>
+                 <td>
+                   <div class="commentsContent">{#content}</div>
+                 </td>
+               </tr>
+             </table>
+           </td>
+           <!--VTP_validation-->
+           <td style="width:1px;">
+             <input type="checkbox" name="validate-{#id}" value="true" />
+           </td>
+           <!--/VTP_validation-->
+         </tr>
+       </table>
+       <!--/VTP_comment-->
+     </td>
+    </tr>
+  </table>
+</div>
+<!--/VTP_picture-->
+<!--VTP_submit-->
+<div style="text-align:center;margin:10px;">
+  <input type="submit" name="submit" value="{#submit}" />
+</div>
+<!--/VTP_submit-->
+<!--VTP_end_form-->
+</form>
+<!--/VTP_end_form-->
+<!--/VTP_section-->
Index: /trunk/template/default/admin/help.vtp
===================================================================
--- /trunk/template/default/admin/help.vtp	(revision 25)
+++ /trunk/template/default/admin/help.vtp	(revision 25)
@@ -0,0 +1,26 @@
+<table style="width:100%;">
+  <!--VTP_cat-->
+  <tr>
+    <th>{#name}</th>
+  </tr>
+  <tr>
+    <td>&nbsp;</td>
+  </tr>
+  <tr>
+    <td>
+      <!--VTP_illustration-->
+      <div style="text-align:center;margin:auto;margin-bottom:10px;"><img src="{#pic_src}" style="border:1px solid black;" alt="{#pic_alt}"/></div>
+      {#caption}
+      <!--/VTP_illustration-->
+      <ul style="margin-right:10px;">
+        <!--VTP_item-->
+        <li>{#content}</li>
+        <!--/VTP_item-->
+      </ul>
+    </td>
+  </tr>
+  <tr>
+    <td>&nbsp;</td>
+  </tr>
+  <!--/VTP_cat-->
+</table>
Index: /trunk/template/default/admin/infos_image.vtp
===================================================================
--- /trunk/template/default/admin/infos_image.vtp	(revision 24)
+++ /trunk/template/default/admin/infos_image.vtp	(revision 25)
@@ -43,5 +43,5 @@
     <!--VTP_picture-->
     <tr>
-      <td style="text-align:center;"><a name="{#link}"><img src="{#thumbnail_url}" alt="" class="miniature" title="{#filename}" /></td>
+      <td style="text-align:center;"><a name="{#link}" href="{#url}"><img src="{#thumbnail_url}" alt="" class="miniature" title="{#filename}" /></td>
       <td style="text-align:center;">{#default_name}<br /><input type="text" name="name-{#id}" value="{#name}" maxlength="255"/></td>
       <td style="text-align:center;"><input type="text" name="author-{#id}" value="{#author}" maxlength="255"/></td>
Index: /trunk/template/default/admin/stats.vtp
===================================================================
--- /trunk/template/default/admin/stats.vtp	(revision 25)
+++ /trunk/template/default/admin/stats.vtp	(revision 25)
@@ -0,0 +1,125 @@
+<style>
+      .commentsAuthor,.commentsTitle,.commentsInfos,.commentsContent,.commentsNavigationBar {
+        color:{#text_color};
+        font-family:arial,sans-Serif;
+        font-size:12px;
+      }
+      .commentsTitle,.commentsAuthor {
+        text-align:center;
+        font-weight:bold;
+      }
+      .commentsInfos {
+        text-align:right;
+        margin:3px 3px 3px 10px;
+        font-size:11px;
+      }
+      .commentsContent {
+        margin:10px;
+      }
+      .commentsTitle {
+        margin-top:15px;
+      }
+      .commentsAuthor {
+        margin:5px;
+      }
+      .commentsNavigationBar {
+        margin:10px;
+      }
+      .tableComment {
+        width:100%;
+        border:2px solid #006699;
+        margin:10px;
+      }
+      .cellAuthor {
+        border-right:1px solid #006699;
+        width:100px;
+      }
+      .cellInfo {
+        border-bottom:1px solid #006699;
+      }
+      .imgLink {
+        border:1px solid black;
+      }
+</style>
+<div style="text-align:center;margin-top:5px;">
+  <!--VTP_last_day_option-->
+  <a href="{#link}" style="{#style}">{#option}</a>{#separation}
+  <!--/VTP_last_day_option-->
+  {#stats_last_days}
+</div>
+
+<table width="100%">
+  <tr>
+    <th width="1%">{#date}</th>
+    <th>{#login}</th>
+    <th>{#IP}</th>
+    <th>{#file}</th>
+    <th>{#category}</th>
+    <th>{#picture}</th>
+  </tr>
+  <tr>
+    <td colspan="6" style="text-align:center;"><a href="{#emply_url}">{#stats_empty}</a></td>
+  </tr>
+  <!--VTP_day-->
+  <tr>
+    <td colspan="6">
+      <a href="{#url}"><!--VTP_collapsed--><img src="./images/collapsed.gif" style="border:none;" /><!--/VTP_collapsed--><!--VTP_expanded--><img src="./images/expanded.gif" style="border:none;" /><!--/VTP_expanded--></a>
+      <span style="font-weight:bold;">{#name}</span> [ {#nb_pages} {#stats_pages_seen} - {#nb_visitors} {#stats_visitors} ]
+    </td>
+  </tr>
+  <!--VTP_line-->
+  <tr>
+    <td>{#date}</td>
+    <td style="text-align:center;">{#login}</td>
+    <td>{#IP}</td>
+    <td>{#file}</td>
+    <td>{#category}</td>
+    <td>{#picture}</td>
+  </tr>
+  <!--/VTP_line-->
+  <!--/VTP_day-->
+</table>
+
+<!-- Graph with the number of pages seen per day -->
+<table style="margin:auto;margin-top:10px;margin-bottom:10px;border:1px solid black;">
+<tr>
+  <td colspan="3" style="text-align:center;font-weight:bold">{#stats_pages_seen_graph_title}</td>
+</tr>
+<!--VTP_pages_day-->
+<tr>
+  <td>{#date}</td>
+  <td>
+    <table style="border-collapse:collapse;">
+      <tr>
+        <td style="padding:0;"><img src="./images/stat_left.gif" width="4" height="12" /></td>
+        <td style="padding:0;"><img src="./images/stat_middle.gif" width="{#width}" height="12" /></td>
+        <td style="padding:0;"><img src="./images/stat_right.gif" width="4" height="12" /></td>
+      </tr>
+    </table>
+  </td>
+  <td align="center">[ {#nb_pages} ]</td>
+</tr>
+<!--/VTP_pages_day-->
+</table>
+
+<!-- Graph with the number of visitors per day -->
+<table style="margin:auto;margin-top:10px;margin-bottom:10px;border:1px solid black;">
+<tr>
+  <td colspan="3" style="text-align:center;font-weight:bold">{#stats_visitors_graph_title}</td>
+</tr>
+<!--VTP_visitors_day-->
+<tr>
+  <td>{#date}</td>
+  <td>
+    <table style="border-collapse:collapse;">
+      <tr>
+        <td style="padding:0;"><img src="./images/stat_left.gif" width="4" height="12" /></td>
+        <td style="padding:0;"><img src="./images/stat_middle.gif" width="{#width}" height="12" /></td>
+        <td style="padding:0;"><img src="./images/stat_right.gif" width="4" height="12" /></td>
+      </tr>
+    </table>
+  </td>
+  <td align="center">[ {#nb_visitors} ]</td>
+</tr>
+<!--/VTP_visitors_day-->
+</table>
Index: /trunk/template/default/admin/thumbnail.vtp
===================================================================
--- /trunk/template/default/admin/thumbnail.vtp	(revision 25)
+++ /trunk/template/default/admin/thumbnail.vtp	(revision 25)
@@ -0,0 +1,188 @@
+<!--VTP_directory_list-->
+<table style="width:100%;">
+  <tr>
+    <th>{#tn_dirs_title}</th>
+  </tr>
+  <tr>
+    <td>
+      <div style="text-indent:30px;">
+        <img src="./images/puce.gif" alt="&gt;" style="border:none;" />
+        galleries
+      </div>
+      <!--VTP_dir-->
+      <div style="text-indent:{#indent}px;">
+        <img src="./images/puce.gif" alt="&gt;" style="border:none;" />
+        <!--VTP_linked-->
+        <a href="{#url}">{#name}</a> [ {#nb_pic} {#tn_dirs_alone} ]
+        <!--/VTP_linked-->
+        <!--VTP_unlinked-->
+        {#name}
+        <!--/VTP_unlinked-->
+      </div>
+      <!--/VTP_dir-->
+    </td>
+  </tr>
+</table>
+<!--/VTP_directory_list-->
+
+<!--VTP_warning-->
+<div style="text-align:center;font-weight:bold;margin:10px;"> [ 0 {#tn_dirs_alone} ]</div>
+<!--/VTP_warning-->
+
+<!--VTP_errors-->
+<div class="errors">
+  <ul>
+    <!--VTP_li-->
+    <li>{#li}</li>
+    <!--/VTP_li-->
+  </ul>
+</div>
+<!--/VTP_errors-->
+
+<!--VTP_results-->
+<table style="width:100%;">
+  <tr>
+    <th colspan="10">{#tn_results_title}</th>
+  </tr>
+  <tr>
+    <td class="throw2">&nbsp;</td>
+    <td class="throw2">{#tn_picture}</td>
+    <td class="throw2">{#filesize}</td>
+    <td class="throw2">{#tn_width}</td>
+    <td class="throw2">{#tn_height}</td>
+    <th>{#tn_results_gen_time}</th>
+    <td class="throw2">{#thumbnail}</td>
+    <td class="throw2">{#filesize}</td>
+    <td class="throw2">{#tn_width}</td>
+    <td class="throw2">{#tn_height}</td>
+  </tr>
+  <!--VTP_picture-->
+  <tr>
+    <td class="row2">{#num}</td>
+    <td class="{#class}">{#file}</td>
+    <td class="{#class}" style="text-align:right;">{#filesize}</td>
+    <td class="{#class}" style="text-align:right;">{#width}</td>
+    <td class="{#class}" style="text-align:right;">{#height}</td>
+    <th>
+      <div style="text-align:right;margin-right:5px;color:{#color};">{#time}</div>
+    </th>
+    <td class="{#class}">{#thumb_file}</td>
+    <td class="{#class}" style="text-align:right;">{#thumb_filesize}</td>
+    <td class="{#class}" style="text-align:right;">{#thumb_width}</td>
+    <td class="{#class}" style="text-align:right;">{#thumb_height}</td>
+  </tr>
+  <!--/VTP_picture-->
+  <tr>
+    <td colspan="10">&nbsp;</td>
+  </tr>
+</table>
+<table style="margin:auto;border:1px solid black;">
+  <tr>
+    <td colspan="2" style="text-align:center;font-weight:bold;" class="row2">{#tn_stats}</td>
+  </tr>
+  <tr>
+    <td>{#tn_stats_nb}</td>
+    <td style="text-align:center;">{#stats_nb}</td>
+  </tr>
+  <tr>
+    <td>{#tn_stats_total}</td>
+    <td style="text-align:right;">{#stats_total}</td>
+  </tr>
+  <tr>
+    <td>{#tn_stats_max}</td>
+    <td style="text-align:right;color:red;">{#stats_max}</td>
+  </tr>
+  <tr>
+    <td>{#tn_stats_min}</td>
+    <td style="text-align:right;color:green;">{#stats_min}</td>
+  </tr>
+  <tr>
+    <td>{#tn_stats_mean}</td>
+    <td style="text-align:right;">{#stats_mean}</td>
+  </tr>
+</table>
+<table>
+  <tr>
+    <td>&nbsp;</td>
+  </tr>
+</table>
+<!--/VTP_results-->
+
+<!--VTP_params-->
+<form method="post" action="{#action}">
+  <table style="width:100%;">
+    <tr>
+      <th colspan="3">{#tn_params_title}</th>
+    </tr>
+    <tr><td colspan="3">&nbsp;</td></tr>
+    <tr>
+      <td><div class="key">{#tn_params_GD}</div></td>
+      <td class="choice">
+        <input type="radio" name="gd" value="2"{#gd2_checked} />2.x
+        <input type="radio" name="gd" value="1"{#gd1_checked} />1.x
+      </td>
+      <td style="width:50%;" class="row2">{#tn_params_GD_info}</td>
+    </tr>
+    <tr>
+      <td><div class="key">{#tn_width}</div></td>
+      <td class="choice">
+        <input type="text" name="width" value="{#width_value}"/>
+      </td>
+      <td class="row2">{#tn_params_width_info}</td>
+    </tr>
+    <tr>
+      <td><div class="key">{#tn_height}</div></td>
+      <td class="choice">
+        <input type="text" name="height" value="{#height_value}"/>
+      </td>
+      <td class="row2">{#tn_params_height_info}</td>
+    </tr>
+    <tr>
+      <td><div class="key">{#tn_params_create}</div></td>
+      <td class="choice">
+        <select name="n">
+          <!--VTP_n_option-->
+          <option{#selected}>{#option}</option>
+          <!--/VTP_n_option-->
+        </select>
+      </td>
+      <td class="row2">{#tn_params_create_info}</td>
+    </tr>
+    <tr>
+      <td><div class="key">{#tn_params_format}</div></td>
+      <td class="choice"><span style="font-weight:bold;">jpeg</span></td>
+      <td class="row2">{#tn_params_format_info}</td>
+    </tr>
+    <tr><td colspan="3">&nbsp;</td></tr>
+    <tr>
+      <td colspan="3" style="text-align:center;">
+        <input type="submit" name="submit" value="{#submit}"/>
+      </td>
+    </tr>
+  </table>
+</form>
+<!--/VTP_params-->
+
+<!--VTP_remainings-->
+<table style="width:100%;">
+  <tr>
+    <th colspan="5"><span style="color:#006699;">{#total}</span> {#tn_alone_title}</th>
+  </tr>
+  <tr>
+    <td class="throw2">&nbsp;</td>
+    <td class="throw2" style="width:50%;">{#tn_picture}</td>
+    <td class="throw2" style="width:17%;">{#filesize}</td>
+    <td class="throw2" style="width:17%;">{#tn_width}</td>
+    <td class="throw2" style="width:16%;">{#tn_height}</td>
+  </tr>
+  <!--VTP_remaining-->
+  <tr>
+    <td class="row2">{#num}</td>
+    <td class="{#class}"><div style="margin-left:10px;">{#file}</div></td>
+    <td class="{#class}"><div style="margin-left:10px;">{#filesize}</div></td>
+    <td class="{#class}"><div style="margin-left:10px;">{#width}</div></td>
+    <td class="{#class}"><div style="margin-left:10px;">{#height}</div></td>
+  </tr>
+  <!--/VTP_remaining-->
+</table>
+<!--/VTP_remainings-->
Index: /trunk/template/default/admin/waiting.vtp
===================================================================
--- /trunk/template/default/admin/waiting.vtp	(revision 25)
+++ /trunk/template/default/admin/waiting.vtp	(revision 25)
@@ -0,0 +1,39 @@
+<form action="{#action}" method="post">
+  <table style="width:100%;">
+    <tr>
+      <th style="width:20%;">{#category}</th>
+      <th style="width:20%;">{#date}</th>
+      <th style="width:20%;">{#file}</th>
+      <th style="width:20%;">{#thumbnail}</th>
+      <th style="width:20%;">{#author}</th>
+      <th style="width:1px;">&nbsp;</th>
+    </tr>
+    <!--VTP_picture-->
+    <tr>
+      <td class="{#class}" style="white-space:nowrap;">{#cat_name}</td>
+      <td class="{#class}" style="white-space:nowrap;">{#date}</td>
+      <td class="{#class}" style="white-space:nowrap;">
+        <a target="_blank" href="{#preview_url}">{#file}</a>
+      </td>
+      <td class="{#class}" style="white-space:nowrap;">
+        <!--VTP_thumbnail-->
+        <a target="_blank" href="{#preview_url}">{#file}</a>
+        <!--/VTP_thumbnail-->
+        <!--VTP_no_thumbnail-->
+        &nbsp;
+        <!--/VTP_no_thumbnail-->
+      </td>
+      <td class="{#class}" style="white-space:nowrap;">
+        <a href="mailto:{#mail_address}">{#username}</a>
+      </td>
+      <td class="{#class}" style="white-space:nowrap;">
+        <input type="radio" name="validate-{#id}" value="true" />{#submit}
+        <input type="radio" name="validate-{#id}" value="false" />{#delete}
+      </td>
+    </tr>
+    <!--/VTP_picture-->
+    <tr>
+      <td colspan="5" align="center"><input type="submit" name="submit" value="{#submit}" style="margin:5px;" /></td>
+    </tr>
+  </table>
+</form>
Index: /trunk/template/default/category.vtp
===================================================================
--- /trunk/template/default/category.vtp	(revision 24)
+++ /trunk/template/default/category.vtp	(revision 25)
@@ -1,4 +1,5 @@
 <html>
   <head>
+    <meta http-equiv="Content-Type" content="text/html; charset={#charset}" />
     {#style}
     <title>{#title}</title>
@@ -12,5 +13,5 @@
             <div class="titreMenu">{#categories}</div>
             <div class="menu">
-              <!--VTP_category-->{#indent}<!--VTP_bullet_w_link--><a href="{#bullet_link}"><img src="{#bullet_url}" style="border:none;" alt="{#bullet_alt}" /></a><!--/VTP_bullet_w_link--><!--VTP_bullet_wo_link--><img src="{#bullet_url}" style="border:none;" alt="{#bullet_alt}" /><!--/VTP_bullet_wo_link-->&nbsp;<a href="{#link_url}"><span title="{#hint_category}" style="{#name_style}">{#link_name}</span>&nbsp;<span class="menuInfoCat">[&nbsp;<!--VTP_subcat--><span title="{#nb_subcats} {#sub-cat}">{#nb_subcats}</span>&nbsp;-&nbsp;<!--/VTP_subcat--><span title="{#total_cat} {#images_available}">{#total_cat}</span>&nbsp;]</span></a>{#cat_icon}<br />
+              <!--VTP_category-->{#indent}<!--VTP_bullet_w_link--><a href="{#bullet_link}"><img src="{#bullet_url}" style="border:none;" alt="&gt;" /></a><!--/VTP_bullet_w_link--><!--VTP_bullet_wo_link--><img src="{#bullet_url}" style="border:none;" alt="&gt;" /><!--/VTP_bullet_wo_link-->&nbsp;<a href="{#link_url}"><span title="{#hint_category}" style="{#name_style}">{#link_name}</span>&nbsp;<span class="menuInfoCat">[&nbsp;<!--VTP_subcat--><span title="{#nb_subcats} {#sub-cat}">{#nb_subcats}</span>&nbsp;-&nbsp;<!--/VTP_subcat--><span title="{#total_cat} {#images_available}">{#total_cat}</span>&nbsp;]</span></a>{#cat_icon}<br />
               <!--/VTP_category-->
               <div class="totalImages">[&nbsp;{#nb_total_pictures}&nbsp;{#total}&nbsp;]</div>
@@ -78,5 +79,5 @@
                   {#nb_image_category} "{#cat_name}" : {#cat_nb_images}
                   <!--VTP_upload-->
-                  <br /><a href="{#url}" class="back">{#upload_name}</a>
+                  <br /><a href="{#url}" class="back">{#upload_picture}</a>
                   <!--/VTP_upload-->
                   </div>
Index: /trunk/template/default/htmlfunctions.inc.php
===================================================================
--- /trunk/template/default/htmlfunctions.inc.php	(revision 24)
+++ /trunk/template/default/htmlfunctions.inc.php	(revision 25)
@@ -1,8 +1,8 @@
 <?php
 /***************************************************************************
- *            htmlfunctions.inc.php is a part of PhpWebGallery             *
+ *                           htmlfunctions.inc.php                         *
  *                            -------------------                          *
- *   last update          : Wednesday, 25 December 2002                    *
- *   email                : pierrick@z0rglub.com                           *
+ *   application          : PhpWebGallery 1.3                              *
+ *   author               : Pierrick LE GALL <pierrick@z0rglub.com>        *
  *                                                                         *
  ***************************************************************************
@@ -16,4 +16,9 @@
  ***************************************************************************/
 
+include( PREFIX_INCLUDE.'./template/'.$user['template'].'/theme/conf.php' );
+$user['lien_expanded']='./template/'.$user['template'].'/theme/expanded.gif';
+$user['lien_collapsed']='./template/'.$user['template'].'/theme/collapsed.gif';
+include_once( PREFIX_INCLUDE.'./template/'.$user['template'].'/style.inc.php');
+
 function get_icon( $date_comparaison )
 {
@@ -24,5 +29,5 @@
   if ( $difference < $user['long_period'] * $jours )
   {
-    $icon_url = './theme/'.$user['theme'].'/';
+    $icon_url = './template/'.$user['template'].'/theme/';
     if ( $difference < $user['short_period'] * $jours )
     {
@@ -98,5 +103,5 @@
   return '<table style="width:';
 }
-
+/*
 function get_frame_begin()
 {
@@ -113,9 +118,10 @@
           </table>';
 }
-/*
+*/
+
 function get_frame_begin()
 {
   global $user;
-  $path = './theme/'.$user['theme'].'/';
+  $path = './template/'.$user['template'].'/theme/';
   $size_01 = getimagesize( $path.'01.gif' );
   $size_02 = getimagesize( $path.'02.gif' );
@@ -135,5 +141,5 @@
 {
   global $user;
-  $path = './theme/'.$user['theme'].'/';
+  $path = './template/'.$user['template'].'/theme/';
   $size_08 = getimagesize( $path.'08.gif' );
   return '
@@ -148,9 +154,10 @@
           </table>';
 }
-*/
+
 function initialize_template()
 {
-  global $vtp, $handle, $user;
-
+  global $vtp, $handle, $user, $lang;
+
+  $vtp->setGlobalVar( $handle, 'charset', $lang['charset'] );
   $vtp->setGlobalVar( $handle, 'style', $user['style'] );
   $vtp->setGlobalVar( $handle, 'frame_start', get_frame_start() );
@@ -162,3 +169,71 @@
                  './template/'.$user['template'].'/footer.htm' );
 }
+
+function display_category( $category, $indent, $handle )
+{
+  global $user,$lang,$vtp;
+
+  $vtp->addSession( $handle, 'category' );
+  $vtp->setVar( $handle, 'category.indent', $indent );
+
+  if ( $user['expand'] or count( $category['subcats'] ) == 0 )
+  {
+    $vtp->addSession( $handle, 'bullet_wo_link' );
+    $vtp->setVar( $handle, 'bullet_wo_link.bullet_url',
+                  $user['lien_collapsed'] );
+    $vtp->closeSession( $handle, 'bullet_wo_link' );
+  }
+  else
+  {
+    $vtp->addSession( $handle, 'bullet_w_link' );
+    $url = './category.php?cat='.$page['cat'];
+    $url.= '&amp;expand='.$category['expand_string'];
+    if ( $page['cat'] == 'search' )
+    {
+      $url.= '&amp;search='.$_GET['search'].'&amp;mode='.$_GET['mode'];
+    }
+    $vtp->setVar( $handle, 'bullet_w_link.bullet_link', add_session_id($url) );
+    if ( $category['expanded'] )
+    {
+      $vtp->setVar( $handle, 'bullet_w_link.bullet_url',
+                    $user['lien_expanded'] );
+    }
+    else
+    {
+      $vtp->setVar( $handle, 'bullet_w_link.bullet_url',
+                    $user['lien_collapsed'] );
+    }
+    $vtp->closeSession( $handle, 'bullet_w_link' );
+  }
+
+  $url = './category.php?cat='.$category['id'];
+  $url.= '&amp;expand='.$category['expand_string'];
+  $vtp->setVar( $handle, 'category.link_url', add_session_id( $url ) );
+
+  $name = $category['name'];
+  if ( $name == '' ) $name = str_replace( '_', ' ', $category['dir'] );
+  $vtp->setVar( $handle, 'category.link_name', $name );
+
+  if ( $category['id_uppercat'] == '' )
+  {
+    $vtp->setVar( $handle, 'category.name_style', 'font-weight:bold;' );
+  }
+  if ( count( $category['subcats'] ) > 0 )
+  {
+    $vtp->addSession( $handle, 'subcat' );
+    $vtp->setVar( $handle, 'subcat.nb_subcats', count($category['subcats']) );
+    $vtp->closeSession( $handle, 'subcat' );
+  }
+  $vtp->setVar( $handle, 'category.total_cat', $category['nb_images'] );
+  $vtp->setVar( $handle, 'category.cat_icon',get_icon($category['date_last']));
+  $vtp->closeSession( $handle, 'category' );
+
+  // recursive call
+  if ( $category['expanded'] )
+  {
+    foreach ( $category['subcats'] as $subcat ) {
+      display_category( $subcat, $indent.str_repeat( '&nbsp', 2 ), $handle );
+    }
+  }
+}
 ?>
Index: /trunk/template/default/identification.vtp
===================================================================
--- /trunk/template/default/identification.vtp	(revision 24)
+++ /trunk/template/default/identification.vtp	(revision 25)
@@ -1,8 +1,10 @@
 <html>
   <head>
-    {#page_style}
+    {#style}
     <title>{#ident_page_title}</title>
+    <meta http-equiv="Content-Type" content="text/html; charset={#charset}" />
   </head>
   <body>
+    {#header}
     <table style="width:100%;height:100%">
       <tr align="center" valign="middle">
@@ -60,7 +62,7 @@
                     <div  style="margin-top:10px;text-align:left;">
                       <!--VTP_register-->
-                        <a href="register.php"><img src="./theme/{#user_theme}/register.gif" style="border:0;" alt="{#ident_register}"/>&nbsp;{#ident_register}</a><br />
+                        <a href="register.php"><img src="./template/{#user_template}/theme/register.gif" style="border:0;" alt="{#ident_register}"/>&nbsp;{#ident_register}</a><br />
                       <!--/VTP_register-->
-                      <a href="mailto:{#mail_webmaster}?subject=[PhpWebGallery] {#ident_forgotten_password}"><img src="./theme/{#user_theme}/lost.gif" style="border:0;" alt=""/>&nbsp;{#ident_forgotten_password}</a>
+                      <a href="mailto:{#mail_webmaster}?subject=[PhpWebGallery] {#ident_forgotten_password}"><img src="./template/{#user_template}/theme/lost.gif" style="border:0;" alt=""/>&nbsp;{#ident_forgotten_password}</a>
                     </div>
                   </td>
@@ -72,4 +74,5 @@
       </tr>
     </table>
+    {#footer}
   </body>
 </html>
Index: /trunk/template/default/picture.vtp
===================================================================
--- /trunk/template/default/picture.vtp	(revision 24)
+++ /trunk/template/default/picture.vtp	(revision 25)
@@ -1,4 +1,8 @@
 <html>
   <head>
+    <!--VTP_refresh-->
+    <meta http-equiv="refresh" content="{#time};url={#url}">
+    <!--/VTP_refresh-->
+    <meta http-equiv="Content-Type" content="text/html;charset={#charset}">
     {#style}
     <!-- Specific style to picture.php-->
@@ -42,8 +46,25 @@
       }
     </style>
-    <title>{#page_title}</title>        
+    <title>{#page_title}</title>
   </head>
   <body>
     {#header}
+    <!--VTP_information-->
+    <div class="information">{#content}</div>
+    <!--/VTP_information-->
+    <!--VTP_start_slideshow-->
+    <div style="text-align:center;margin-bottom:5px;">
+      [ {#slideshow} :
+      <!--VTP_second-->
+      <a href="{#url}" class="back" style="font-weight:bold;">{#option}</a>
+      <!--/VTP_second-->
+      {#period_seconds} ]
+    </div>
+    <!--/VTP_start_slideshow-->
+    <!--VTP_stop_slideshow-->
+    <div style="text-align:center;margin-bottom:5px;">
+      [ <a href="{#url}" class="back" style="font-weight:bold;">{#slideshow_stop}</a> ]
+    </div>
+    <!--/VTP_stop_slideshow-->
     <table style="width:100%;height:100%;">
       <tr align="center" valign="middle">
@@ -127,5 +148,5 @@
                       <td align="right" class="cellInfo">
                         <div class="commentsInfos">
-                          {#date}<!--VTP_delete--><a href="{#link}" title="{#comments_del}"><img src="./theme/{#user_theme}/delete.gif" style="border:none;margin-left:5px;" alt="[{#delete}]"/></a><!--/VTP_delete-->
+                          {#date}<!--VTP_delete--><a href="{#link}" title="{#comments_del}"><img src="./template/{#user_template}/theme/delete.gif" style="border:none;margin-left:5px;" alt="[{#delete}]"/></a><!--/VTP_delete-->
                         </div>
                       </td>
Index: /trunk/template/default/profile.vtp
===================================================================
--- /trunk/template/default/profile.vtp	(revision 24)
+++ /trunk/template/default/profile.vtp	(revision 25)
@@ -3,4 +3,5 @@
     {#style}
     <title>{#customize_page_title}</title>
+    <meta http-equiv="Content-Type" content="text/html; {#charset}">
   </head>
   <body>
Index: /trunk/template/default/register.vtp
===================================================================
--- /trunk/template/default/register.vtp	(revision 24)
+++ /trunk/template/default/register.vtp	(revision 25)
@@ -1,7 +1,8 @@
 <html>
   <head>
-    {#page_style}
+    {#style}
     <title>{#register_page_title}</title>
-    </head>
+    <meta http-equiv="Content-Type" content="text/html; {#charset}">
+  </head>
   <body>
     <table style="width:100%;height:100%">
Index: /trunk/template/default/search.vtp
===================================================================
--- /trunk/template/default/search.vtp	(revision 24)
+++ /trunk/template/default/search.vtp	(revision 25)
@@ -3,4 +3,5 @@
     {#style}
     <title>{#search_title}</title>
+    <meta http-equiv="Content-Type" content="text/html; {#charset}">
   </head>
   <body>
Index: /trunk/template/default/style.inc.php
===================================================================
--- /trunk/template/default/style.inc.php	(revision 24)
+++ /trunk/template/default/style.inc.php	(revision 25)
@@ -138,3 +138,8 @@
         color:white;
       }
+      div.information {
+        text-align:center;
+        border:2px solid '.$user['couleur_text_fond'].';
+        margin:10px;padding:5px;
+      }
     </style>';
Index: /trunk/template/default/theme/conf.php
===================================================================
--- /trunk/template/default/theme/conf.php	(revision 25)
+++ /trunk/template/default/theme/conf.php	(revision 25)
@@ -0,0 +1,7 @@
+<?php
+	/*---------------couleur de fond pour le template agjimmy - lightred------------------*/
+	/* ce template a été "adapté" par thierry                                         */
+	$user['couleur_fond'] = "#FFFFFF";
+	$user['couleur_text_fond'] = "black";
+	$user['couleur_text'] = "black";
+?>
Index: /trunk/template/default/upload.vtp
===================================================================
--- /trunk/template/default/upload.vtp	(revision 24)
+++ /trunk/template/default/upload.vtp	(revision 25)
@@ -5,4 +5,5 @@
   </head>
   <body>
+    {#header}
     <table style="width:100%;height:100%">
       <tr align="center" valign="middle">
@@ -45,14 +46,44 @@
                 </tr>
                 <!--VTP_fields-->
+                <!-- username -->
                 <tr>
-                  <td class="menu">{#upload_username}</td>
+                  <td class="menu">{#upload_username} <span style="color:red;">*</span></td>
                   <td align="center" style="padding:10px;">
-                    <input name="username" type="text" value="{#user_login}" />
+                    <input name="username" type="text" value="{#username}" />
                   </td>
                 </tr>
+                <!-- mail address -->
                 <tr>
-                  <td class="menu">{#mail_address}</td>
+                  <td class="menu">{#mail_address} <span style="color:red;">*</span></td>
                   <td align="center" style="padding:10px;">
                     <input name="mail_address" type="text" value="{#user_mail_address}" />
+                  </td>
+                </tr>
+                <!-- name of the picture -->
+                <tr>
+                  <td class="menu">{#upload_name}</td>
+                  <td align="center" style="padding:10px;">
+                    <input name="name" type="text" value="{#name}" />
+                  </td>
+                </tr>
+                <!-- author -->
+                <tr>
+                  <td class="menu">{#upload_author}</td>
+                  <td align="center" style="padding:10px;">
+                    <input name="author" type="text" value="{#author}" />
+                  </td>
+                </tr>
+                <!-- date of creation -->
+                <tr>
+                  <td class="menu">{#upload_creation_date}</td>
+                  <td align="center" style="padding:10px;">
+                    <input name="date_creation" type="text" value="{#date_creation}" />
+                  </td>
+                </tr>
+                <!-- comment -->
+                <tr>
+                  <td class="menu">{#upload_comment}</td>
+                  <td align="center" style="padding:10px;">
+                   <textarea name="comment" rows="3" cols="40" style="overflow:auto">{#comment}</textarea>
                   </td>
                 </tr>
@@ -72,8 +103,12 @@
               <a href="{#return_url}">[ {#search_return_main_page} ]</a>
             </div>
+            <!--VTP_note-->
+            <div style="text-align:left;"><span style="color:red;">*</span> : {#mandatory}</div>
+            <!--/VTP_note-->
           {#frame_end}
         </td>
       </tr>
     </table>
+    {#footer}
   </body>
 </html>
