Changeset 394 for trunk


Ignore:
Timestamp:
Mar 26, 2004, 6:08:09 PM (20 years ago)
Author:
gweltas
Message:
  • Template migration
  • Admin Control Panel migration
  • Category management
Location:
trunk
Files:
7 added
3 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r393 r394  
    9090 case 'configuration':
    9191   $title = $lang['title_configuration']; $page_valide = true; break;
     92 case 'admin_phpinfo':
     93   $title = $lang['phpinfos']; $page_valide = true; break;
    9294 case 'help':
    9395   $title = $lang['title_instructions'];  $page_valide = true; break;
     
    173175
    174176$template->assign_vars(array(
    175   'L_CONFIG'=>$lang['menu_config'],
    176   'L_USERS'=>$lang['menu_users'],
    177   'L_GROUPS'=>$lang['menu_groups'],
    178   'L_CATEGORIES'=>$lang['menu_categories'],
    179   'L_WAITING'=>$lang['menu_waiting'].$nb_waiting,
    180   'L_COMMENTS'=>$lang['menu_comments'].$nb_comments,
    181   'L_UPDATE'=>$lang['menu_update'],
    182   'L_THUMBNAILS'=>$lang['menu_thumbnails'],
    183   'L_HISTORY'=>$lang['menu_history'],
    184   'L_FAQ'=>$lang['menu_instructions'],
    185   'L_RETURN'=>$lang['menu_back'],
    186  
     177  'L_TITLE'=>$lang['admin_panel'],
     178  'L_LINKS'=>$lang['links'],
     179  'L_GALLERY_INDEX'=>$lang['gallery_index'],
     180  'L_GENERAL'=>$lang['general'],
     181  'L_CONFIG'=>$lang['config'],
     182  'L_SITES'=>$lang['remote_site'],
     183  'L_DEFAULT'=>$lang['gallery_default'],
     184  'L_PHPINFO'=>$lang['phpinfos'],
     185  'L_HISTORY'=>$lang['history'],
     186  'L_FAQ'=>$lang['instructions'],
     187  'L_CATEGORIES'=>$lang['categories'],
     188  'L_MANAGE'=>$lang['manage'],
     189  'L_UPLOAD'=>$lang['upload'],
     190  'L_IMAGES'=>$lang['pictures'],
     191  'L_WAITING'=>$lang['waiting'].$nb_waiting,
     192  'L_COMMENTS'=>$lang['comments'].$nb_comments,
     193  'L_THUMBNAILS'=>$lang['thumbnails'],
     194  'L_IDENTIFY'=>$lang['identification'],
     195  'L_USERS'=>$lang['users'],
     196  'L_GROUPS'=>$lang['groups'],
     197  'L_AUTH'=>$lang['permissions'],
     198  'L_UPDATE'=>$lang['update'],
     199   
    187200  'U_CONFIG'=>add_session_id($link_start.'configuration' ),
     201  'U_PHPINFO'=>add_session_id($link_start.'admin_phpinfo' ),
    188202  'U_USERS'=>add_session_id($link_start.'user_search' ),
    189203  'U_GROUPS'=>add_session_id($link_start.'group_list' ),
     
    191205  'U_WAITING'=>add_session_id($link_start.'waiting' ),
    192206  'U_COMMENTS'=>add_session_id($link_start.'comments' ),
    193   'U_UPDATE'=>add_session_id($link_start.'update' ),
     207  'U_CAT_UPDATE'=>add_session_id($link_start.'update&update=cats' ),
     208  'U_IMG_UPDATE'=>add_session_id($link_start.'update&update=all' ),
    194209  'U_THUMBNAILS'=>add_session_id($link_start.'thumbnail' ),
    195210  'U_HISTORY'=>add_session_id($link_start.'stats' ),
  • trunk/admin/cat_list.php

    r362 r394  
    2525// | USA.                                                                  |
    2626// +-----------------------------------------------------------------------+
    27 include_once( './admin/include/isadmin.inc.php' );
    28 
    29 //----------------------------------------------------- template initialization
    30 $sub = $vtp->Open( './template/'.$user['template'].'/admin/cat_list.vtp' );
    31 $tpl = array( 'cat_edit','cat_up','cat_down','cat_image_info',
    32               'cat_permission','cat_update','cat_add','cat_parent','submit',
    33               'cat_virtual','delete','cat_first','cat_last','errors_title' );
    34 templatize_array( $tpl, 'lang', $sub );
    35 $vtp->setGlobalVar( $sub, 'user_template', $user['template'] );
    36 //--------------------------------------------------- adding a virtual category
     27
     28if( !defined("PHPWG_ROOT_PATH") )
     29{
     30        die ("Hacking attempt!");
     31}
     32include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' );
     33
    3734$errors = array();
    38 if ( isset( $_POST['submit'] ) )
     35$categories=array();
     36$navigation=$lang['gallery_index'];
     37
     38//---------------------------------------------------  virtual categories
     39if ( isset( $_GET['delete'] ) && is_numeric( $_GET['delete'] ) )
     40{
     41  delete_category( $_GET['delete'] );
     42  synchronize_all_users();
     43}
     44elseif ( isset( $_POST['submit'] ) )
    3945{
    4046  // is the given category name only containing blank spaces ?
    4147  if ( preg_match( '/^\s*$/', $_POST['virtual_name'] ) )
    4248    array_push( $errors, $lang['cat_error_name'] );
    43   // does the uppercat id exists in the database ?
    44   if ( $_POST['associate'] == '' )
    45   {
    46     $_POST['associate'] = -1;
    47   }
    48   else if ( !is_numeric( $_POST['associate'] ) )
    49   {
    50     array_push( $errors, $lang['cat_unknown_id'] );
    51   }
    52   else
    53   {
    54     $query = 'SELECT id';
    55     $query.= ' FROM '.PREFIX_TABLE.'categories';
    56     $query.= ' WHERE id = '.$_POST['associate'];
    57     $query.= ';';
    58     if ( mysql_num_rows( mysql_query( $query ) ) == 0 )
    59       array_push( $errors, $lang['cat_unknown_id'] );
    60   }
     49       
     50  if ( !count( $errors ))
     51  {
     52    // we have then to add the virtual category
     53        $parent_id = !empty($_GET['parent_id'])?$_GET['parent_id']:'NULL';
     54    $query = 'INSERT INTO '.CATEGORIES_TABLE;
     55    $query.= ' (name,id_uppercat,rank) VALUES ';
     56    $query.= " ('".$_POST['virtual_name']."',".$parent_id.",".$_POST['rank'].")";
     57    $query.= ';';
     58    mysql_query( $query );
     59    synchronize_all_users();
     60  }
     61}
     62
     63// Cache management
     64
     65$query = 'SELECT * FROM '.CATEGORIES_TABLE;
     66if ( !isset($_GET['parent_id']))
     67{
     68  $query.= ' WHERE id_uppercat IS NULL';
     69}
     70else
     71{
     72  $query.= ' WHERE id_uppercat = '.$_GET['parent_id'];
     73}
     74$query.= ' ORDER BY rank ASC';
     75$query.= ';';
     76$result = mysql_query( $query );
     77while ( $row = mysql_fetch_assoc( $result ) )
     78{
     79  $categories[$row['rank']]=$row;
     80}
     81
     82// Navigation path
     83if (isset($_GET['parent_id']))
     84{
     85  $current_category = get_cat_info($_GET['parent_id']);
     86  $url = PHPWG_ROOT_PATH.'admin.php?page=cat_list&parent_id=';
     87  $navigation = '<a class="" href="'.add_session_id(PHPWG_ROOT_PATH.'admin.php?page=cat_list').'">';
     88  $navigation.= $lang['gallery_index'].'</a>-&gt;';
     89  $navigation.= get_cat_display_name($current_category['name'], '-&gt;', $url);
     90}
     91
     92//---------------------------------------------------------------  rank updates
     93$current_rank=0;
     94if ( isset( $_GET['up'] ) && is_numeric( $_GET['up'] ))
     95{
     96  // 1. searching the id of the category just above at the same level
     97  while (list ($id,$current) = each($categories))
     98  {
     99    if ($current['id'] == $_GET['up'])
     100        {
     101          $current_rank = $current['rank'];
     102          break;
     103    }
     104  }
     105  if ($current_rank>1)
     106  {
     107    // 2. Exchanging ranks between the two categories
     108    $query = 'UPDATE '.CATEGORIES_TABLE;
     109    $query.= ' SET rank = '.($current_rank-1);
     110    $query.= ' WHERE id = '.$_GET['up'];
     111    $query.= ';';
     112    mysql_query( $query );
     113    $query = 'UPDATE '.CATEGORIES_TABLE;
     114    $query.= ' SET rank = '.$current_rank;
     115    $query.= ' WHERE id = '.$categories[($current_rank-1)]['id'];
     116    $query.= ';';
     117    mysql_query( $query );
     118        // 3. Updating the cache array
     119        $categories[$current_rank]=$categories[($current_rank-1)];
     120        $categories[($current_rank-1)] = $current;
     121  }
     122  else
     123  {
     124    // 2. Updating the rank of our category to be after the previous max rank
     125    $query = 'UPDATE '.CATEGORIES_TABLE;
     126    $query.= ' SET rank = '.(count($categories) + 1);
     127    $query.= ' WHERE id = '.$_GET['up'];
     128    $query.= ';';
     129    mysql_query( $query );
     130    $query = 'UPDATE '.CATEGORIES_TABLE;
     131    $query.= ' SET rank = rank-1';
     132        $query.= ' WHERE id_uppercat ';
     133        $query.= empty($_GET['parent_id'])?'IS NULL':('= '.$_GET['parent_id']);
     134        $query.= ';';
     135    mysql_query( $query );
     136        // 3. Updating the cache array
     137        array_push($categories, $current);
     138        array_shift($categories);
     139  }
     140}
     141elseif ( isset( $_GET['down'] ) && is_numeric( $_GET['down'] ) )
     142{
     143  // 1. searching the id of the category just above at the same level
     144  while (list ($id,$current) = each($categories))
     145  {
     146    if ($current['id'] == $_GET['down'])
     147        {
     148          $current_rank = $current['rank'];
     149          break;
     150        }
     151  }
     152  if ($current_rank < count($categories))
     153  {
     154    // 2. Exchanging ranks between the two categories
     155    $query = 'UPDATE '.CATEGORIES_TABLE;
     156    $query.= ' SET rank = '.($current_rank+1);
     157    $query.= ' WHERE id = '.$_GET['down'];
     158    $query.= ';';
     159    mysql_query( $query );
     160    $query = 'UPDATE '.CATEGORIES_TABLE;
     161    $query.= ' SET rank = '.$current_rank;
     162    $query.= ' WHERE id = '.$categories[($current_rank+1)]['id'];
     163    $query.= ';';
     164    mysql_query( $query );
     165        // 3. Updating the cache array
     166        $categories[$current_rank]=$categories[($current_rank+1)];
     167        $categories[($current_rank+1)] = $current;
     168  }
     169  else
     170  {
     171    // 2. updating the rank of our category to be the first one
     172    $query = 'UPDATE '.CATEGORIES_TABLE;
     173    $query.= ' SET rank = 0';
     174    $query.= ' WHERE id = '.$_GET['down'];
     175    $query.= ';';
     176    mysql_query( $query );
     177    $query = 'UPDATE '.CATEGORIES_TABLE;
     178    $query.= ' SET rank = (rank+1)';
     179        $query.= ' WHERE id_uppercat ';
     180        $query.= empty($_GET['parent_id'])?'IS NULL':('= '.$_GET['parent_id']);
     181        $query.= ';';
     182    mysql_query( $query );
     183        // 3. Updating the cache array
     184        array_unshift($categories, $current);
     185        array_pop($categories);
     186  }
     187}
     188reset($categories);
     189
     190//----------------------------------------------------- template initialization
     191$template->set_filenames( array('categories'=>'admin/cat_list.tpl') );
     192
     193$template->assign_vars(array(
     194  'CATEGORIES_NAV'=>$navigation,
     195  'NEXT_RANK'=>count($categories)+1,
    61196 
    62   if ( count( $errors ) == 0 )
    63   {
    64     // we have then to add the virtual category
    65     $query = 'INSERT INTO '.PREFIX_TABLE.'categories';
    66     $query.= ' (name,id_uppercat) VALUES ';
    67     if ( $_POST['associate'] == -1 )
    68     {
    69       $_POST['associate'] = 'NULL';
    70     }
    71     $query.= " ('".$_POST['virtual_name']."',".$_POST['associate'].")";
    72     $query.= ';';
    73     mysql_query( $query );
    74     synchronize_all_users();
    75   }
    76 }
    77 //---------------------------------------------------------------  rank updates
    78 if ( isset( $_GET['up'] ) and is_numeric( $_GET['up'] ) )
    79 {
    80   // 1. searching level (id_uppercat)
    81   //    and rank of the category to move
    82   $query = 'SELECT id_uppercat,rank';
    83   $query.= ' FROM '.PREFIX_TABLE.'categories';
    84   $query.= ' WHERE id = '.$_GET['up'];
    85   $query.= ';';
    86   $row = mysql_fetch_array( mysql_query( $query ) );
    87   $level = $row['id_uppercat'];
    88   $rank  = $row['rank'];
    89   // 2. searching the id and the rank of the category
    90   //    just above at the same level
    91   $query = 'SELECT id,rank';
    92   $query.= ' FROM '.PREFIX_TABLE.'categories';
    93   $query.= ' WHERE rank < '.$rank;
    94   if ( $level == '' )
    95   {
    96     $query.= ' AND id_uppercat IS NULL';
    97   }
    98   else
    99   {
    100     $query.= ' AND id_uppercat = '.$level;
    101   }
    102   $query.= ' ORDER BY rank DESC';
    103   $query.= ' LIMIT 0,1';
    104   $query.= ';';
    105   $row = mysql_fetch_array( mysql_query( $query ) );
    106   $new_rank     = $row['rank'];
    107   $replaced_cat = $row['id'];
    108   // 3. exchanging ranks between the two categories
    109   $query = 'UPDATE '.PREFIX_TABLE.'categories';
    110   $query.= ' SET rank = '.$new_rank;
    111   $query.= ' WHERE id = '.$_GET['up'];
    112   $query.= ';';
    113   mysql_query( $query );
    114   $query = 'UPDATE '.PREFIX_TABLE.'categories';
    115   $query.= ' SET rank = '.$rank;
    116   $query.= ' WHERE id = '.$replaced_cat;
    117   $query.= ';';
    118   mysql_query( $query );
    119 }
    120 if ( isset( $_GET['down'] ) and is_numeric( $_GET['down'] ) )
    121 {
    122   // 1. searching level (id_uppercat)
    123   //    and rank of the category to move
    124   $query = 'SELECT id_uppercat,rank';
    125   $query.= ' FROM '.PREFIX_TABLE.'categories';
    126   $query.= ' WHERE id = '.$_GET['down'];
    127   $query.= ';';
    128   $row = mysql_fetch_array( mysql_query( $query ) );
    129   $level = $row['id_uppercat'];
    130   $rank  = $row['rank'];
    131   // 2. searching the id and the rank of the category
    132   //    just below at the same level
    133   $query = 'SELECT id,rank';
    134   $query.= ' FROM '.PREFIX_TABLE.'categories';
    135   $query.= ' WHERE rank > '.$rank;
    136   if ( $level == '' )
    137   {
    138     $query.= ' AND id_uppercat IS NULL';
    139   }
    140   else
    141   {
    142     $query.= ' AND id_uppercat = '.$level;
    143   }
    144   $query.= ' ORDER BY rank ASC';
    145   $query.= ' LIMIT 0,1';
    146   $query.= ';';
    147   $row = mysql_fetch_array( mysql_query( $query ) );
    148   $new_rank     = $row['rank'];
    149   $replaced_cat = $row['id'];
    150   // 3. exchanging ranks between the two categories
    151   $query = 'UPDATE '.PREFIX_TABLE.'categories';
    152   $query.= ' SET rank = '.$new_rank;
    153   $query.= ' WHERE id = '.$_GET['down'];
    154   $query.= ';';
    155   mysql_query( $query );
    156   $query = 'UPDATE '.PREFIX_TABLE.'categories';
    157   $query.= ' SET rank = '.$rank;
    158   $query.= ' WHERE id = '.$replaced_cat;
    159   $query.= ';';
    160   mysql_query( $query );
    161 }
    162 if ( isset( $_GET['last'] ) and is_numeric( $_GET['last'] ) )
    163 {
    164   // 1. searching level (id_uppercat) of the category to move
    165   $query = 'SELECT id_uppercat,rank';
    166   $query.= ' FROM '.PREFIX_TABLE.'categories';
    167   $query.= ' WHERE id = '.$_GET['last'];
    168   $query.= ';';
    169   $row = mysql_fetch_array( mysql_query( $query ) );
    170   $level = $row['id_uppercat'];
    171   // 2. searching the highest rank of the categories of the same parent
    172   $query = 'SELECT MAX(rank) AS max_rank';
    173   $query.= ' FROM '.PREFIX_TABLE.'categories';
    174   $query.= ' WHERE id_uppercat';
    175   if ( $level == '' ) $query.= ' IS NULL';
    176   else                $query.= ' = '.$level;
    177   $query.= ';';
    178   $row = mysql_fetch_array( mysql_query( $query ) );
    179   $max_rank = $row['max_rank'];
    180   // 3. updating the rank of our category to be after the previous max rank
    181   $query = 'UPDATE '.PREFIX_TABLE.'categories';
    182   $query.= ' SET rank = '.($max_rank + 1);
    183   $query.= ' WHERE id = '.$_GET['last'];
    184   $query.= ';';
    185   mysql_query( $query );
    186 }
    187 if ( isset( $_GET['first'] ) and is_numeric( $_GET['first'] ) )
    188 {
    189   // to place our category as first, we simply say that is rank is 0, then
    190   // reordering will move category ranks correctly (first rank should be 1
    191   // and not 0)
    192   $query = 'UPDATE '.PREFIX_TABLE.'categories';
    193   $query.= ' SET rank = 0';
    194   $query.= ' WHERE id = '.$_GET['first'];
    195   $query.= ';';
    196   mysql_query( $query );
    197 }
    198 if ( isset( $_GET['delete'] ) and is_numeric( $_GET['delete'] ) )
    199 {
    200   delete_category( $_GET['delete'] );
    201   synchronize_all_users();
    202 }
    203 //------------------------------------------------------------------ reordering
    204 function ordering( $id_uppercat )
    205 {
    206   $rank = 1;
    207                
    208   $query = 'SELECT id';
    209   $query.= ' FROM '.PREFIX_TABLE.'categories';
    210   if ( !is_numeric( $id_uppercat ) )
    211   {
    212     $query.= ' WHERE id_uppercat IS NULL';
    213   }
    214   else
    215   {
    216     $query.= ' WHERE id_uppercat = '.$id_uppercat;
    217   }
    218   $query.= ' ORDER BY rank ASC, dir ASC';
    219   $query.= ';';
    220   $result = mysql_query( $query );
    221   while ( $row = mysql_fetch_array( $result ) )
    222   {
    223     $query = 'UPDATE '.PREFIX_TABLE.'categories';
    224     $query.= ' SET rank = '.$rank;
    225     $query.= ' WHERE id = '.$row['id'];
    226     $query.= ';';
    227     mysql_query( $query );
    228     $rank++;
    229     ordering( $row['id'] );
    230   }
    231 }
    232 ordering( 'NULL' );
     197  'L_ADD_VIRTUAL'=>$lang['cat_add'],
     198  'L_SUBMIT'=>$lang['submit'],
     199  'L_STORAGE'=>$lang['storage'],
     200  'L_NB_IMG'=>$lang['pictures'],
     201  'L_MOVE_UP'=>$lang['cat_up'],
     202  'L_MOVE_DOWN'=>$lang['cat_down'],
     203  'L_EDIT'=>$lang['edit'],
     204  'L_INFO_IMG'=>$lang['cat_image_info'],
     205  'L_DELETE'=>$lang['delete']
     206  ));
     207 
     208$tpl = array( 'cat_first','cat_last');
     209                         
    233210//-------------------------------------------------------------- errors display
    234 if ( count( $errors ) != 0 )
    235 {
    236   $vtp->addSession( $sub, 'errors' );
    237   foreach ( $errors as $error ) {
    238     $vtp->addSession( $sub, 'li' );
    239     $vtp->setVar( $sub, 'li.content', $error );
    240     $vtp->closeSession( $sub, 'li' );
    241   }
    242   $vtp->closeSession( $sub, 'errors' );
    243 }
    244 //---------------------------------------------------------------- page display
    245 function display_cat_manager( $id_uppercat, $indent,
    246                               $uppercat_visible, $level )
    247 {
    248   global $lang,$conf,$sub,$vtp,$page;
    249                
    250   // searching the min_rank and the max_rank of the category
    251   $query = 'SELECT MIN(rank) AS min, MAX(rank) AS max';
    252   $query.= ' FROM '.PREFIX_TABLE.'categories';
    253   if ( !is_numeric( $id_uppercat ) )
    254   {
    255     $query.= ' WHERE id_uppercat IS NULL';
    256   }
    257   else
    258   {
    259     $query.= ' WHERE id_uppercat = '.$id_uppercat;
    260   }
    261   $query.= ';';
    262   $result = mysql_query( $query );
    263   $row    = mysql_fetch_array( $result );
    264   if ( !isset( $row['min'] ) ) $row['min'] = 0;
    265   if ( !isset( $row['max'] ) ) $row['max'] = 0;
    266   $min_rank = $row['min'];
    267   $max_rank = $row['max'];
    268                
    269   // will we use <th> or <td> lines ?
    270   $td    = 'td';
    271   $class = '';
    272   if ( $level > 0 ) $class = 'row'.$level;
    273   else              $td = 'th';
    274                
    275   $query = 'SELECT id,name,dir,nb_images,status,rank,site_id,visible';
    276   $query.= ' FROM '.PREFIX_TABLE.'categories';
    277   if ( !is_numeric( $id_uppercat ) )
    278   {
    279     $query.= ' WHERE id_uppercat IS NULL';
    280   }
    281   else
    282   {
    283     $query.= ' WHERE id_uppercat = '.$id_uppercat;
    284   }
    285   $query.= ' ORDER BY rank ASC';
    286   $query.= ';';
    287   $result = mysql_query( $query );
    288   while ( $row = mysql_fetch_array( $result ) )
    289   {
    290     $subcat_visible = true;
    291     if ( !isset( $row['dir'] ) ) $row['dir'] = '';
    292 
    293     $vtp->addSession( $sub, 'cat' );
    294     // is the category expanded or not ?
    295     if ( isset($page['expand']) && $page['expand'] == 'all' )
    296     {
    297       $vtp->addSession( $sub, 'bullet_wo_link' );
    298       $vtp->closeSession( $sub, 'bullet_wo_link' );
    299     }
    300     else if ( isset($page['tab_expand']) && in_array( $row['id'], $page['tab_expand'] ) )
    301     {
    302       $vtp->addSession( $sub, 'bullet_expanded' );
    303       $tab_expand = array_diff( $page['tab_expand'], array( $row['id'] ) );
    304       $expand = implode( ',', $tab_expand );
    305       $url = './admin.php?page=cat_list&amp;expand='.$expand;
    306       $vtp->setVar( $sub, 'bullet_expanded.link', add_session_id( $url ) );
    307       $vtp->closeSession( $sub, 'bullet_expanded' );
    308     }
    309     else
    310     {
    311       $vtp->addSession( $sub, 'bullet_collapsed' );
    312       $tab_expand = array_merge( $page['tab_expand'], array( $row['id'] ) );
    313       $expand = implode( ',', $tab_expand );
    314       $url = './admin.php?page=cat_list&amp;expand='.$expand;
    315       $vtp->setVar( $sub, 'bullet_collapsed.link', add_session_id( $url ) );
    316       $vtp->closeSession( $sub, 'bullet_collapsed' );
    317     }
    318    
    319     $vtp->setVar( $sub, 'cat.td', $td );
    320     $vtp->setVar( $sub, 'cat.class', $class );
    321     $vtp->setVar( $sub, 'cat.indent', $indent );
    322     $vtp->setVar( $sub, 'cat.name', $row['name'] );
    323 
    324     if ( $row['dir'] != '' )
    325     {
    326       $vtp->addSession( $sub, 'storage' );
    327       $vtp->setVar( $sub, 'storage.dir', $row['dir'] );
    328       $vtp->closeSession( $sub, 'storage' );
    329       // category can't be deleted
    330       $vtp->addSession( $sub, 'no_delete' );
    331       $vtp->closeSession( $sub, 'no_delete' );
    332     }
    333     else
    334     {
    335       $vtp->addSession( $sub, 'virtual' );
    336       $vtp->closeSession( $sub, 'virtual' );
    337       // category can be deleted
    338       $vtp->addSession( $sub, 'delete' );
    339       $url = './admin.php?page=cat_list&amp;expand='.$page['expand'];
    340       $url.= '&amp;delete='.$row['id'];
    341       $vtp->setVar( $sub, 'delete.delete_url', add_session_id( $url ) );
    342       $vtp->closeSession( $sub, 'delete' );
    343     }
    344     if ( $row['visible'] == 'false' or !$uppercat_visible )
    345     {
    346       $subcat_visible = false;
    347       $vtp->setVar( $sub, 'cat.invisible', $lang['cat_invisible'] );
    348     }
    349     if ( $row['status'] == 'private' )
    350     {
    351       $vtp->setVar( $sub, 'cat.private', $lang['private'] );
    352     }
    353     $vtp->setVar( $sub, 'cat.nb_picture', $row['nb_images'] );
    354     $url = add_session_id( './admin.php?page=cat_modify&amp;cat='.$row['id'] );
    355     $vtp->setVar( $sub, 'cat.edit_url', $url );
    356     if ( $row['rank'] != $min_rank )
    357     {
    358       $vtp->addSession( $sub, 'up' );
    359       $url = './admin.php?page=cat_list&amp;expand='.$page['expand'];
    360       $url.= '&amp;up='.$row['id'];
    361       $vtp->setVar( $sub, 'up.up_url', add_session_id( $url ) );
    362       $vtp->closeSession( $sub, 'up' );
    363     }
    364     else if ( $min_rank != $max_rank )
    365     {
    366       $vtp->addSession( $sub, 'no_up' );
    367       $url = './admin.php?page=cat_list&amp;expand='.$page['expand'];
    368       $url.= '&amp;last='.$row['id'];
    369       $vtp->setVar( $sub, 'no_up.last_url', add_session_id( $url ) );
    370       $vtp->closeSession( $sub, 'no_up' );
    371     }
    372     if ( $row['rank'] != $max_rank )
    373     {
    374       $vtp->addSession( $sub, 'down' );
    375       $url = './admin.php?page=cat_list&amp;expand='.$page['expand'];
    376       $url.= '&amp;down='.$row['id'];
    377       $vtp->setVar( $sub, 'down.down_url', add_session_id( $url ) );
    378       $vtp->closeSession( $sub, 'down' );
    379     }
    380     else if ( $min_rank != $max_rank )
    381     {
    382       $vtp->addSession( $sub, 'no_down' );
    383       $url = './admin.php?page=cat_list&amp;expand='.$page['expand'];
    384       $url.= '&amp;first='.$row['id'];
    385       $vtp->setVar( $sub, 'no_down.first_url', add_session_id( $url ) );
    386       $vtp->closeSession( $sub, 'no_down' );
    387     }
    388     if ( $row['nb_images'] > 0 )
    389     {
    390       $vtp->addSession( $sub, 'image_info' );
    391       $url = './admin.php?page=infos_images&amp;cat_id='.$row['id'];
    392       $vtp->setVar( $sub, 'image_info.image_info_url', add_session_id($url) );
    393       $vtp->closeSession( $sub, 'image_info' );
    394     }
    395     else
    396     {
    397       $vtp->addSession( $sub, 'no_image_info' );
    398       $vtp->closeSession( $sub, 'no_image_info' );
    399     }
    400     if ( $row['status'] == 'private' )
    401     {
    402       $vtp->addSession( $sub, 'permission' );
    403       $url=add_session_id('./admin.php?page=cat_perm&amp;cat_id='.$row['id']);
    404       $vtp->setVar( $sub, 'permission.url', $url );
    405       $vtp->closeSession( $sub, 'permission' );
    406     }
    407     else
    408     {
    409       $vtp->addSession( $sub, 'no_permission' );
    410       $vtp->closeSession( $sub, 'no_permission' );
    411     }
    412     // you can individually update a category only if it is on the main site
    413     // and if it's not a virtual category (a category is virtual if there is
    414     // no directory associated)
    415     if ( $row['site_id'] == 1 and $row['dir'] != '' )
    416     {
    417       $vtp->addSession( $sub, 'update' );
    418       $url = add_session_id('./admin.php?page=update&amp;update='.$row['id']);
    419       $vtp->setVar( $sub, 'update.update_url', $url );
    420       $vtp->closeSession( $sub, 'update' );
    421     }
    422     else
    423     {
    424       $vtp->addSession( $sub, 'no_update' );
    425       $vtp->closeSession( $sub, 'no_update' );
    426     }
    427 
    428     $vtp->closeSession( $sub, 'cat' );
    429 
    430     if ( in_array( $row['id'], $page['tab_expand'] )
    431          or $page['expand'] == 'all')
    432       display_cat_manager( $row['id'], $indent.str_repeat( '&nbsp', 4 ),
    433                            $subcat_visible, $level + 1 );
    434   }
    435 }
    436 display_cat_manager( 'NULL', str_repeat( '&nbsp', 4 ), true, 0 );
    437 // add a virtual category ?
    438 // We only show a List Of Values if the number of categories is less than
    439 // $conf['max_LOV_categories']
    440 $query = 'SELECT COUNT(id) AS nb_total_categories';
    441 $query.= ' FROM '.PREFIX_TABLE.'categories';
    442 $query.= ';';
    443 $row = mysql_fetch_array( mysql_query( $query ) );
    444 if ( $row['nb_total_categories'] < $conf['max_LOV_categories'] )
    445 {
    446   $vtp->addSession( $sub, 'associate_LOV' );
    447   $vtp->addSession( $sub, 'associate_cat' );
    448   $vtp->setVar( $sub, 'associate_cat.value', '-1' );
    449   $vtp->setVar( $sub, 'associate_cat.content', '' );
    450   $vtp->closeSession( $sub, 'associate_cat' );
    451   $page['plain_structure'] = get_plain_structure( true );
    452   $structure = create_structure( '', array() );
    453   display_categories( $structure, '&nbsp;' );
    454   $vtp->closeSession( $sub, 'associate_LOV' );
    455 }
    456 // else, we only display a small text field, we suppose the administrator
    457 // knows the id of its category
    458 else
    459 {
    460   $vtp->addSession( $sub, 'associate_text' );
    461   $vtp->closeSession( $sub, 'associate_text' );
    462 }
     211if ( sizeof( $errors ) != 0 )
     212{
     213  $template->assign_block_vars('errors',array());
     214  for ( $i = 0; $i < sizeof( $errors ); $i++ )
     215  {
     216    $template->assign_block_vars('errors.error',array('ERROR'=>$errors[$i]));
     217  }
     218}
     219//----------------------------------------------------------- Categories display
     220while (list ($id,$category) = each($categories))
     221{
     222
     223  if ($category['status'] == 'private')
     224  {
     225    $category_image = '<img src="'.PHPWG_ROOT_PATH.'template/'.$user['template'].'/admin/images/icon_folder_lock.gif"
     226          width="46" height="25" alt="'.$lang['cat_private'].'" title="'.$lang['cat_private'].'"/>';
     227  }
     228  elseif (empty($category['dir']))
     229  {
     230    $category_image = '<img src="'.PHPWG_ROOT_PATH.'template/'.$user['template'].'/admin/images/icon_folder_link.gif"
     231          width="46" height="25" alt="'.$lang['cat_virtual'].'" title="'.$lang['cat_virtual'].'"/>';
     232  }
     233  else
     234  {
     235        // May be should we have to introduce a computed field in the table to avoid this query
     236    $query = 'SELECT COUNT(id) as sub_cats FROM ' . CATEGORIES_TABLE . ' WHERE id_uppercat = '.$category['id'];
     237    $result = mysql_fetch_array(mysql_query( $query ));
     238        $category_image = ($result['sub_cats']) ?
     239          '<img src="'.PHPWG_ROOT_PATH.'template/'.$user['template'].'/admin/images/icon_subfolder.gif" width="46" height="25" alt="" />' :
     240          '<img src="'.PHPWG_ROOT_PATH.'template/'.$user['template'].'/admin/images/icon_folder.gif" width="46" height="25" alt="" />';
     241  }
     242 
     243  if ( !isset( $category['dir'] ) ) $category['dir'] = '';
     244  $simple_url = PHPWG_ROOT_PATH.'admin.php?page=cat_list&amp;';
     245  $url = $simple_url;
     246  if (isset($_GET['parent_id']))
     247    $url = $simple_url.'parent_id='.$_GET['parent_id'].'&amp;';
     248
     249  $template->assign_block_vars('category' ,array(
     250    'CATEGORY_IMG'=>$category_image,
     251    'CATEGORY_NAME'=>$category['name'],
     252        'CATEGORY_DIR'=>$category['dir'],
     253        'CATEGORY_NB_IMG'=>$category['nb_images'],
     254       
     255        'U_CATEGORY'=>add_session_id( $simple_url.'parent_id='.$category['id']),
     256        'U_MOVE_UP'=>add_session_id( $url.'up='.$category['id'] ),
     257        'U_MOVE_DOWN'=>add_session_id( $url.'down='.$category['id'] ),
     258        'U_CAT_EDIT'=>add_session_id( PHPWG_ROOT_PATH.'admin.php?page=cat_modify&amp;cat_id='.$row['id'] ),
     259        'U_CAT_DELETE'=>add_session_id( $url.'delete='.$category['id'] ),
     260        'U_INFO_IMG'=>add_session_id( PHPWG_ROOT_PATH.'admin.php?page=infos_images&amp;cat_id='.$row['id'] ),
     261        'U_CAT_UPDATE'=>add_session_id( PHPWG_ROOT_PATH.'admin.php?page=update&amp;update='.$row['id'] )
     262        ));
     263       
     264  if ( !empty($category['dir']))
     265  {
     266    $template->assign_block_vars('category.storage' ,array());
     267  }
     268  else
     269  {
     270        $template->assign_block_vars('category.virtual' ,array());
     271  }
     272  $url = add_session_id( './admin.php?page=cat_modify&amp;cat='.$row['id'] );
     273  if ( $category['nb_images'] > 0 )
     274  {
     275    $template->assign_block_vars('category.image_info' ,array());
     276  }
     277  else
     278  {
     279    $template->assign_block_vars('category.no_image_info' ,array());
     280  }
     281}
     282
    463283//----------------------------------------------------------- sending html code
    464 $vtp->Parse( $handle , 'sub', $sub );
     284$template->assign_var_from_handle('ADMIN_CONTENT', 'categories');
    465285?>
  • trunk/admin/cat_modify.php

    r364 r394  
    130130$result = get_cat_info( $row['id'] );
    131131// cat name
    132 $cat_name = get_cat_display_name( $result['name'], ' - ', '' );
     132$cat_name = get_cat_display_name( $result['name'], ' - ' );
    133133$vtp->setVar( $sub, 'cat:name', $cat_name );
    134134// cat dir
  • trunk/admin/configuration.php

    r393 r394  
    250250  'L_ACCESS_FREE'=>$lang['conf_general_access_1'],
    251251  'L_ACCESS_RESTRICTED'=>$lang['conf_general_access_2'],
    252   'L_HISTORY'=>$lang['conf_general_log'],
    253   'L_HISTORY_INFO'=>$lang['conf_general_log_info'],
     252  'L_CONF_HISTORY'=>$lang['history'],
     253  'L_CONF_HISTORY_INFO'=>$lang['conf_general_log_info'],
    254254  'L_MAIL_NOTIFICATION'=>$lang['conf_general_mail_notification'],
    255255  'L_MAIL_NOTIFICATION_INFO'=>$lang['conf_general_mail_notification_info'],
     
    280280  'L_NB_COMMENTS'=>$lang['customize_show_nb_comments'],
    281281  'L_NB_COMMENTS_INFO'=>$lang['conf_default_show_nb_comments_info'],
    282   'L_UPLOAD'=>$lang['conf_upload_available'],
    283   'L_UPLOAD_INFO'=>$lang['conf_upload_available_info'],
     282  'L_AUTH_UPLOAD'=>$lang['conf_upload_available'],
     283  'L_AUTH_UPLOAD_INFO'=>$lang['conf_upload_available_info'],
    284284  'L_CONF_UPLOAD'=>$lang['conf_upload_title'],
    285285  'L_UPLOAD_MAXSIZE'=>$lang['conf_upload_maxfilesize'],
     
    307307  ));
    308308
    309 $tpl = array( 'conf_confirmation','remote_site','delete',
    310               'conf_remote_site_delete_info','submit','errors_title' );
    311 
    312309//-------------------------------------------------------------- errors display
    313310if ( sizeof( $error ) != 0 )
  • trunk/admin/include/functions.php

    r393 r394  
    137137  // destruction of the categories of the site
    138138  $query = 'SELECT id';
    139   $query.= ' FROM '.PREFIX_TABLE.'categories';
     139  $query.= ' FROM '.CATEGORIES_TABLE;
    140140  $query.= ' WHERE site_id = '.$id;
    141141  $query.= ';';
     
    191191  // destruction of the sub-categories
    192192  $query = 'SELECT id';
    193   $query.= ' FROM '.PREFIX_TABLE.'categories';
     193  $query.= ' FROM '.CATEGORIES_TABLE;
    194194  $query.= ' WHERE id_uppercat = '.$id;
    195195  $query.= ';';
     
    201201
    202202  // destruction of the category
    203   $query = 'DELETE FROM '.PREFIX_TABLE.'categories';
     203  $query = 'DELETE FROM '.CATEGORIES_TABLE;
    204204  $query.= ' WHERE id = '.$id;
    205205  $query.= ';';
     
    374374  if ( $id == 'all' )
    375375  {
    376     $query = 'SELECT id';
    377     $query.= ' FROM '.PREFIX_TABLE.'categories';
    378     $query.= ';';
     376    $query = 'SELECT id FROM '.CATEGORIES_TABLE.';';
    379377    $result = mysql_query( $query );
    380378    while ( $row = mysql_fetch_array( $result ) )
     
    400398    list( $date_available ) = mysql_fetch_array( mysql_query( $query ) );
    401399   
    402     $query = 'UPDATE '.PREFIX_TABLE.'categories';
     400    $query = 'UPDATE '.CATEGORIES_TABLE;
    403401    $query.= " SET date_last = '".$date_available."'";
    404402    $query.= ', nb_images = '.$nb_images;
     
    411409    // have to set representative_picture_id to NULL
    412410    $query = 'SELECT representative_picture_id';
    413     $query.= ' FROM '.PREFIX_TABLE.'categories';
     411    $query.= ' FROM '.CATEGORIES_TABLE;
    414412    $query.= ' WHERE id = '.$id;
    415413    $row = mysql_fetch_array( mysql_query( $query ) );
     
    426424      if ( mysql_num_rows( $result ) == 0 )
    427425      {
    428         $query = 'UPDATE '.PREFIX_TABLE.'categories';
     426        $query = 'UPDATE '.CATEGORIES_TABLE;
    429427        $query.= ' SET representative_picture_id = NULL';
    430428        $query.= ' WHERE id = '.$id;
     
    525523  $query = 'SELECT id,id_uppercat';
    526524  if ( $use_name ) $query.= ',name';
    527   $query.= ' FROM '.PREFIX_TABLE.'categories';
     525  $query.= ' FROM '.CATEGORIES_TABLE;
    528526  $query.= ' ORDER BY id_uppercat ASC, rank ASC';
    529527  $query.= ';';
     
    712710
    713711  $string_uppercats = implode( ',', array_reverse( $uppercats ) );
    714   $query = 'UPDATE '.PREFIX_TABLE.'categories';
     712  $query = 'UPDATE '.CATEGORIES_TABLE;
    715713  $query.= ' SET uppercats = '."'".$string_uppercats."'";
    716714  $query.= ' WHERE id = '.$final_id;
  • trunk/admin/update.php

    r393 r394  
    2828include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' );
    2929//------------------------------------------------------------------- functions
     30function ordering( $id_uppercat )
     31{
     32  $rank = 1;
     33               
     34  $query = 'SELECT id';
     35  $query.= ' FROM '.CATEGORIES_TABLE;
     36  if ( !is_numeric( $id_uppercat ) )
     37  {
     38    $query.= ' WHERE id_uppercat IS NULL';
     39  }
     40  else
     41  {
     42    $query.= ' WHERE id_uppercat = '.$id_uppercat;
     43  }
     44  $query.= ' ORDER BY rank ASC, dir ASC';
     45  $query.= ';';
     46  $result = mysql_query( $query );
     47  while ( $row = mysql_fetch_array( $result ) )
     48  {
     49    $query = 'UPDATE '.CATEGORIES_TABLE;
     50    $query.= ' SET rank = '.$rank;
     51    $query.= ' WHERE id = '.$row['id'];
     52    $query.= ';';
     53    mysql_query( $query );
     54    $rank++;
     55    ordering( $row['id'] );
     56  }
     57}
     58
    3059function insert_local_category( $id_uppercat )
    3160{
     
    678707  ));
    679708 
    680 $tpl = array('remote_site');
    681709//-------------------------------------------- introduction : choices of update
    682710// Display choice if "update" var is not specified
     
    733761  $start = get_moment();
    734762  update_category( 'all' );
     763  ordering('NULL');
    735764  $end = get_moment();
    736765  echo get_elapsed_time( $start, $end ).' for update_category( all )<br />';
  • trunk/category.php

    r393 r394  
    6868  if (empty($name)) $name = str_replace( '_', ' ', $category['dir'] );
    6969 
    70   $template->assign_block_vars(
    71     'category',
    72     array(
     70  $template->assign_block_vars('category', array(
    7371      'T_NAME' => $style,
    7472      'LINK_NAME' => $name,
     
    188186  if ( is_numeric( $page['cat'] ) )
    189187  {
    190     $cat_title = get_cat_display_name( $page['cat_name'], ' &gt; ',
    191                                     'font-style:italic;' );
     188    $cat_title = get_cat_display_name( $page['cat_name'], ' - ');
    192189  }
    193190  else
     
    357354    $thumbnail_title .= ' : '.$poids.' KB';
    358355    // url link on picture.php page
    359     $url_link = './picture.php?cat='.$page['cat'];
     356    $url_link = PHPWG_ROOT_PATH.'picture.php?cat='.$page['cat'];
    360357    $url_link.= '&amp;image_id='.$row['id'];
    361358    if ( $page['cat'] == 'search' )
     
    474471if ( isset ( $page['cat'] ) )
    475472{
    476   $cat_name='';
    477   // total number of pictures in the category
    478   if ( is_numeric( $page['cat'] ) )
    479   {
    480     $cat_name=get_cat_display_name( $page['cat_name'],' - ','font-style:italic;' );
    481     // upload a picture in the category
    482     if ( $page['cat_site_id'] == 1
    483          and $conf['upload_available']
    484          and $page['cat_uploadable'] )
    485     {
    486       $url = PHPWG_ROOT_PATH.'upload.php?cat='.$page['cat'];
    487           $template->assign_block_vars('upload',array('U_UPLOAD'=>add_session_id( $url )));
    488     }
    489   }
    490   else
    491   {
    492     $cat_name= $page['title'];
    493   }
    494   $template->assign_block_vars('cat_infos',array(
    495     'CAT_NAME'=>$cat_name,
    496     'NB_IMG_CAT' => $page['cat_nb_images']
    497         ));
     473  // upload a picture in the category
     474  if ( is_numeric( $page['cat']) && $page['cat_site_id'] == 1
     475       && $conf['upload_available'] && $page['cat_uploadable'] )
     476  {
     477    $url = PHPWG_ROOT_PATH.'upload.php?cat='.$page['cat'];
     478        $template->assign_block_vars('upload',array('U_UPLOAD'=>add_session_id( $url )));
     479  }
     480 
     481  $template->assign_block_vars('cat_infos',array('NB_IMG_CAT' => $page['cat_nb_images']));
    498482
    499483  // navigation bar
  • trunk/include/common.inc.php

    r393 r394  
    121121}
    122122
    123 define( 'PREFIX_INCLUDE', '' );// en attendant la migration complète
    124123include(PHPWG_ROOT_PATH . 'include/constants.php');
    125124include(PHPWG_ROOT_PATH . 'include/config.inc.php');
     
    141140if ( getenv( 'HTTP_X_FORWARDED_FOR' ) != '' )
    142141{
    143   $client_ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : $REMOTE_ADDR );
     142  $client_ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ?
     143    $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : $REMOTE_ADDR );
    144144
    145145  if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/",
     
    159159else
    160160{
    161   $client_ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : $REMOTE_ADDR );
     161  $client_ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ?
     162    $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : $REMOTE_ADDR );
    162163}
    163164$user_ip = encode_ip($client_ip);
    164165
    165166//
    166 // Setup forum wide options, if this fails then we output a CRITICAL_ERROR
    167 // since basic forum information is not available
     167// Setup gallery wide options, if this fails then we output a CRITICAL_ERROR
     168// since basic gallery information is not available
    168169//
    169170$query = 'SELECT param,value';
  • trunk/include/functions.inc.php

    r375 r394  
    2525// | USA.                                                                  |
    2626// +-----------------------------------------------------------------------+
    27 include( PHPWG_ROOT_PATH .'include/functions_user.inc.php' );
    28 include( PHPWG_ROOT_PATH .'include/functions_session.inc.php' );
    29 include( PHPWG_ROOT_PATH .'include/functions_category.inc.php' );
    30 include( PHPWG_ROOT_PATH .'include/functions_xml.inc.php' );
    31 include( PHPWG_ROOT_PATH .'include/functions_group.inc.php' );
     27include_once( PHPWG_ROOT_PATH .'include/functions_user.inc.php' );
     28include_once( PHPWG_ROOT_PATH .'include/functions_session.inc.php' );
     29include_once( PHPWG_ROOT_PATH .'include/functions_category.inc.php' );
     30include_once( PHPWG_ROOT_PATH .'include/functions_xml.inc.php' );
     31include_once( PHPWG_ROOT_PATH .'include/functions_group.inc.php' );
     32include_once( PHPWG_ROOT_PATH .'include/htmlfunctions.inc.php' );
    3233
    3334//----------------------------------------------------------- generic functions
     
    397398  {
    398399    $to = $row['mail_address'];
    399     include( PREFIX_INCLUDE.'./language/'.$row['language'].'.php' );
     400    include( PHPWG_ROOT_PATH.'language/'.$row['language'].'.php' );
    400401    $content = $lang['mail_hello']."\n\n";
    401402    switch ( $type )
  • trunk/include/functions_category.inc.php

    r387 r394  
    112112    $category = array();
    113113    foreach ( $infos as $info ) {
    114       if ( $info == 'uc.date_last' )
    115       {
    116         list($year,$month,$day) = explode( '-', $row['date_last'] );
    117         $category['date_last'] = mktime(0,0,0,$month,$day,$year);
     114      if ( $info == 'uc.date_last')
     115      {
     116            if (empty($row['date_last']))
     117                {
     118                  $category['date_last']= 0;
     119                }
     120                else
     121                {
     122          list($year,$month,$day) = explode( '-', $row['date_last'] );
     123          $category['date_last'] = mktime(0,0,0,$month,$day,$year);
     124                }
    118125      }
    119126      else if ( isset( $row[$info] ) ) $category[$info] = $row[$info];
     
    240247function get_cat_info( $id )
    241248{
    242   global $page;
    243 
    244249  $infos = array( 'nb_images','id_uppercat','comment','site_id','galleries_url'
    245250                  ,'dir','date_last','uploadable','status','visible'
     
    271276  $cat['name'] = array();
    272277
    273   $query = 'SELECT name FROM '.CATEGORIES_TABLE;
     278  $query = 'SELECT name,id FROM '.CATEGORIES_TABLE;
    274279  $query.= ' WHERE id IN ('.$cat['uppercats'].')';
    275280  $query.= ' ORDER BY id ASC';
     
    278283  while( $row = mysql_fetch_array( $result ) )
    279284  {
    280     array_push( $cat['name'], $row['name'] );
     285    $cat['name'][$row['id']] = $row['name'];
    281286  }
    282287 
     
    349354  $row = mysql_fetch_array( mysql_query( $query ) );
    350355  return $row['galleries_url'];
    351 }
    352 
    353 // The function get_cat_display_name returns a string containing the list
    354 // of upper categories to the root category from the lowest category shown
    355 // example : "anniversaires - fete mere 2002 - animaux - erika"
    356 // You can give two parameters :
    357 //   - $separation : the string between each category name " - " for example
    358 //   - $style : the style of the span tag for the lowest category,
    359 //     "font-style:italic;" for example
    360 function get_cat_display_name( $array_cat_names, $separation,
    361                                $style, $replace_space = true )
    362 {
    363   $output = '';
    364   foreach ( $array_cat_names as $i => $name ) {
    365     if ( $i > 0 ) $output.= $separation;
    366     if ( $i < count( $array_cat_names ) - 1 or $style == '')
    367       $output.= $name;
    368     else
    369       $output.= '<span style="'.$style.'">'.$name.'</span>';
    370   }
    371   if ( $replace_space ) return replace_space( $output );
    372   else                  return $output;
    373356}
    374357
     
    634617}
    635618?>
     619
  • trunk/include/functions_user.inc.php

    r393 r394  
    261261  $template_path = 'template/' ;
    262262  $template_name = $style ;
    263   include_once( PHPWG_ROOT_PATH . $template_path . $template_name.'/htmlfunctions.inc.php' );
    264263  $template = new Template(PHPWG_ROOT_PATH . $template_path . $template_name);
    265264  return $template;
  • trunk/language/en_UK.iso-8859-1/admin.lang.php

    r369 r394  
    2626// +-----------------------------------------------------------------------+
    2727
     28// Main words
     29$lang['links'] = 'Links';
     30$lang['general'] = 'General';
     31$lang['config'] = 'Configuration';
     32$lang['users'] = 'Users';
     33$lang['instructions'] = 'Instructions';
     34$lang['history'] = 'History';
     35$lang['manage'] = 'Manage';
     36$lang['waiting'] = 'Waiting';
     37$lang['groups'] = 'Groups';
     38$lang['permissions'] = 'Permissions';
     39$lang['update'] = 'Synchronize';
     40$lang['storage'] = 'Directory';
     41$lang['edit'] = 'Edit';
     42
     43// Specific words
     44$lang['phpinfos'] = 'PHP Information';
     45$lang['remote_site'] = 'Remote site';
     46$lang['gallery_default'] = 'Gallery Default';
     47$lang['upload'] = 'Upload';
     48
     49// Categorie words
     50$lang['cat_up'] = 'Move up';
     51$lang['cat_down'] = 'Move down';
     52$lang['cat_add'] = 'Add a virtual category';
     53$lang['cat_virtual'] = 'Virtual category';
     54$lang['cat_public'] = 'Public category';
     55$lang['cat_private'] = 'Private category';
     56$lang['cat_image_info'] = 'Images info';
     57
     58// Titles
     59$lang['admin_panel'] = 'Administration Panel';
     60$lang['default_message'] = 'PhpWebGallery Administration Control Panel';
    2861$lang['title_liste_users'] = 'Users list';
    2962$lang['title_history'] = 'History';
     
    3770$lang['title_thumbnails_2'] = 'for';
    3871$lang['title_default'] = 'PhpWebGallery administration';
    39 $lang['menu_title'] = 'Administration';
    40 $lang['menu_config'] = 'Configuration';
    41 $lang['menu_users'] = 'Users';
     72$lang['title_waiting'] = 'Pictures waiting for validation';
     73
    4274$lang['menu_add_user'] = 'add';
    4375$lang['menu_list_user'] = 'list';
    44 $lang['menu_categories'] = 'Categories';
    45 $lang['menu_update'] = 'Database update';
    46 $lang['menu_thumbnails'] = 'Thumbnails';
    47 $lang['menu_history'] = 'History';
    48 $lang['menu_instructions'] = 'Instructions';
    49 $lang['menu_back'] = 'Back to galleries';
    50 $lang['title_waiting'] = 'Pictures waiting for validation';
    51 $lang['menu_waiting'] = 'Waiting';
    52 $lang['default_message'] = 'PhpWebGallery administration panel';
     76
     77//Error messages
    5378$lang['conf_err_prefixe'] = 'thumbnail\'s prefix mustn\'t contain any accentued character';
    5479$lang['conf_err_mail'] = 'e-mail address refused, it must be like name@server.com';
     
    5681$lang['conf_err_sid_time'] = 'the session time must be an integer value between 5 and 60';
    5782$lang['conf_err_max_user_listbox'] = 'the max user listbox number must be an integer value between 0 and 255';
     83$lang['cat_error_name'] = 'The name of a category mustn\'t be empty';
     84
     85//FAQ
     86$lang['help_images_title'] = 'Adding pictures';
     87$lang['help_images_intro'] = 'How to place pictures in your directories';
     88$lang['help_images'][0] = 'in the directory "galleries", create directories that will represent your categories';
     89$lang['help_images'][1] = 'in each directory, you can create as many sub-level directories as you wish.';
     90$lang['help_images'][2] = 'you can create as many categories and sub-categories for each category as you wish';
     91$lang['help_images'][3] = 'picture files must have jpeg format (extension jpg or JPG), gif format (extension gif or GIF) or png format (extension png or PNG).';
     92$lang['help_images'][4] = 'try not to use blank space " " or hyphen "-" in picture files, I advise you to use underscore "_" character which is managed by PhpWebGallery and will provide better results';
     93$lang['help_thumbnails_title'] = 'Thumbnails';
     94$lang['help_thumbnails'][0] = 'in each directory containing picture to display on your site, there is a sub-directory nammed "thumbnail", if it doesn\'t exist, create it to place your thumbnails into it.';
     95$lang['help_thumbnails'][1] = 'thumbnails don\'t need to have the same extension as their associated picture (a picture with .jpg extension can have a thumbnail in .GIF extention for instance).';
     96$lang['help_thumbnails'][2] = 'the thumbnail associated to a picture must be prefixed with the prefix given on the configuration page(image.jpg -> TN_image.GIF for instance).';
     97$lang['help_thumbnails'][3] = 'I advise you to use the module for windows downloadable on the presentation site of PhpWebGallery for thumbnails management.';
     98$lang['help_thumbnails'][4] = 'you can use the thumbnail creation page integrated in PhpWebGallery, but I don\'t advice you so, because thumbnail quality may be poor and it uses a high CPU load which can be a problem if you use free web hosting.';
     99$lang['help_thumbnails'][5] = 'if you choose to use your hosting provider to create thumbnails, you must give 775 rights on "galleries" folder and all its sub-folders.';
     100$lang['help_database_title'] = 'Updating database';
     101$lang['help_database'][0] = 'once pictures files and thumbnails correctly placed in the directories, clic on "database update" in the menu of the administration panel.';
     102$lang['help_infos_title'] = 'Miscellanous informations';
     103$lang['help_infos'][1] = 'As soon as you created your gallery, go in the user list and modify permissions for user "visiteur". Indeed, every new registered users will have by default the same permissions as "visiteur" user.';
     104$lang['help_remote_title'] = 'Remote site';
     105$lang['help_remote'][0] = 'PhpWebGallery offers the possibility to use several servers to store the images which will compose your gallery. It can be useful if your gallery is installed on one limited space and that you have a big quantity of images to be shown. Please , follow this procedure : ';
     106$lang['help_remote'][1] = '1. edit file "create_listing_file.php" (you will find it in the directory "admin"), by modifying the line "$prefix_thumbnail = "TN-";" if the prefix for your thumbnails is not "TN-".';
     107$lang['help_remote'][2] = '2. place file "create_listing_file.php" modified on your distant website, in the root directory of your directories of images  (as the directory "galleries" of this website) by ftp.';
     108$lang['help_remote'][3] = '3. launch script using the url http://domaineDistant/repGalerie/create_listing_file.php, a file listing.xml has just been created.';
     109$lang['help_remote'][4] = '4. get back file listing.xml from your distant website to place it in directory "admin" of this website.';
     110$lang['help_remote'][5] = '5. please , launch an update of the data of images by the interface of administration, once the listing.xml used file, kill it from the directory "admin".';
     111$lang['help_remote'][6] = 'You can update the contents of a distant website by redoing the described manipulation. You can also kill a distant website by choosing the option in the configuration section of the administration panel.';
     112$lang['help_upload_title'] = 'Added images by users';
     113$lang['help_upload'][0] = 'PhpWebGallery offers the possibility for users to upload images. in order to do it :';
     114$lang['help_upload'][1] = '1. authorize the option in the configuration zone of the administration panel';
     115$lang['help_upload'][2] = '2. authorize the rights in writing in the images directories';
     116$lang['help_database'][1] = 'In order to avoid the update of too many pictures in a single update, I advise to start by updating only categories, then on the categories section of the administration panel, update each category thanks to the link "update"';
     117$lang['help_upload'][3] = 'The category must have upload available itself for upload.';
     118$lang['help_upload'][4] = 'Uploaded images by the users are not directly visible on the website, they must be validated by an administrator.  For that purpose, an administrator must go on the page "en attente" of the administration panel, to validate or to refuse the images proposed, then launch an update of the images data.';
     119$lang['help_virtual_title'] = 'Links between pictures and categories and virtual categories';
     120$lang['help_virtual'][0] = 'PhpWebGallery is able to dissociate categories where pictures are stored and categories where pictures are shown.';
     121$lang['help_virtual'][1] = 'By default, pictures are shown only in their real categories : the ones corresponding to directories on the web server.';
     122$lang['help_virtual'][2] = 'To link a picture to a category, you just have to make the association on the page of picture informations or on the informations of all pictures of a category.';
     123$lang['help_virtual'][3] = 'Using this principle, it is possible to create virtual categories in PhpWebGallery : no real directory coresponds to this category. You just have to create this category on the section "categories" of the admin panel.';
     124$lang['help_groups_title'] = 'Users Groups';
     125$lang['help_groups'][0] = 'PhpWebGallery is able to manage groups of users. It can be very useful to have common permission access for private categories.';
     126$lang['help_groups'][1] = '1. Create the group "family" on the section "Groups" of admin panel.';
     127$lang['help_groups'][2] = '2. On the section "Users", edit on of them and associate him to the group "family".';
     128$lang['help_groups'][3] = '3. By modifying the permissions for a category or for a group, you\'ll see that all categories accessible for a group are accessible for its members.';
     129$lang['help_groups'][4] = 'A user can belong to several groups. The authorization is stronger than prohibition : if a user "jack" belongs to the group "family" and "friends", and that only group "family" can see category "Christmas 2003", "jack" will be able to see "Christmas 2003".';
     130$lang['help_access_title'] = 'Access authorization';
     131$lang['help_access'][0] = 'PhpWebGallery is able to forbid access to categories. Categories can be "public" or "private". In order to forbid access to a category :';
     132$lang['help_access'][1] = '1. Modify category informations (from the "categories" section in tha admin panel) and make it "private".';
     133$lang['help_access'][2] = '2. On the page of permissions (for a group or a user) the private category will be shown and you\'ll be able to authorize access or not.';
     134if (isset($conf))
     135  $lang['help_infos'][2] = 'If you have any question, do not hesitate to take a look at the forum or ask a question there. The <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> (message board) is available on the presentation site of PhpWebGallery.';
     136
     137
     138
    58139$lang['conf_confirmation'] = 'Information data registered in database';
    59140$lang['conf_general_title'] = 'Main configuration';
    60 $lang['conf_general_webmaster'] = 'webmaster login';
     141$lang['conf_general_webmaster'] = 'Webmaster login';
    61142$lang['conf_general_webmaster_info'] = 'It will be shown to the visitors. It is necessary for website administration';
    62 $lang['conf_general_mail'] = 'webmaster mail adress';
     143$lang['conf_general_mail'] = 'Webmaster mail adress';
    63144$lang['conf_general_mail_info'] = 'Visitors will be able to contact by this mail';
    64 $lang['conf_general_prefix'] = 'thumbnail prefix';
     145$lang['conf_general_prefix'] = 'Thumbnail prefix';
    65146$lang['conf_general_prefix_info'] = 'Thumbnails use this prefix. Do not fill if your not sure.';
    66 $lang['conf_general_access'] = 'access type';
    67 $lang['conf_general_access_1'] = 'free';
    68 $lang['conf_general_access_2'] = 'restricted';
     147$lang['conf_general_access'] = 'Access type';
     148$lang['conf_general_access_1'] = 'Free';
     149$lang['conf_general_access_2'] = 'Restricted';
    69150$lang['conf_general_access_info'] = '- free : anyone can enter the site, any visitor can create an account in order to customize the appareance of the website<br />- restricted : the webmaster create accounts. Only registered users can enter the site';
    70 $lang['conf_general_max_user_listbox'] = 'max listbox users number';
    71 $lang['conf_general_max_user_listbox_info'] = '- this is the number maximum of users for which PhpWebGallery display a listbox instead of a simple text box on the identification page<br />- enter a number between 0 and 255, 0 means that you want to display the listbox';
    72 $lang['conf_comments'] = 'users comments';
    73 $lang['conf_comments_title'] = 'Configuration of '.$lang['conf_comments'];
     151$lang['conf_comments'] = 'Users comments';
     152$lang['conf_comments_title'] = 'Configuration of users comments';
    74153$lang['conf_comments_show_comments'] = $lang['conf_comments'];
    75154$lang['conf_comments_show_comments_info'] = 'display the users comments under each picture ?';
    76 $lang['conf_comments_comments_number'] = 'number of comments per page';
     155$lang['conf_comments_comments_number'] = 'Number of comments per page';
    77156$lang['conf_comments_comments_number_info'] = 'number of comments to display on each page. This number is unlimited for a picture. Enter a number between 5 and 50.';
    78157$lang['conf_err_comment_number'] = 'The number of comments a page must be between 5 and 50 included.';
     
    96175$lang['conf_err_upload_maxheight_thumbnail'] = 'Maximum height authorized for the uploaded thumbnails must be a number superior to 10 pixels.';
    97176$lang['conf_default_title'] = 'Default display properties for unregistered visitors and new accounts';
    98 $lang['conf_default_language_info'] = 'default language';
    99 $lang['conf_default_theme_info'] = 'default theme';
     177$lang['conf_default_language_info'] = 'Default language';
     178$lang['conf_default_theme_info'] = 'Default theme';
    100179$lang['conf_session_title'] = 'Sessions configuration';
    101180$lang['conf_session_size'] = 'identifier size';
     
    128207$lang['listuser_modify'] = 'modify';
    129208$lang['listuser_modify_hint'] = 'modify informations of';
    130 $lang['listuser_permission'] = 'permissions';
     209$lang['listuser_permission'] = 'Permissions';
    131210$lang['listuser_permission_hint'] = 'modify permissions of';
    132211$lang['listuser_delete'] = 'delete';
     
    135214$lang['listuser_button_invert'] = 'invert';
    136215$lang['listuser_button_create_address'] = 'create mail address';
    137 $lang['cat_invisible'] = 'invisible';
    138 $lang['cat_edit'] = 'Edit';
    139 $lang['cat_up'] = 'Move up';
    140 $lang['cat_down'] = 'Move down';
    141 $lang['cat_image_info'] = 'Images info';
    142 $lang['cat_total'] = 'total';
     216
     217
    143218$lang['editcat_confirm'] = 'Information registered in the database';
    144 $lang['editcat_back'] = 'categories';
    145219$lang['editcat_title1'] = 'Options for the';
    146220$lang['editcat_name'] = 'Name';
     
    194268$lang['tn_dirs_title'] = 'Directories list';
    195269$lang['tn_dirs_alone'] = 'pictures without thumbnail';
    196 $lang['help_images_title'] = 'Adding pictures';
    197 $lang['help_images_intro'] = 'How to place pictures in your directories';
    198 $lang['help_images'][0] = 'in the directory "galleries", create directories that will represent your categories';
    199 $lang['help_images'][1] = 'in each directory, you can create as many sub-level directories as you wish.';
    200 $lang['help_images'][2] = 'you can create as many categories and sub-categories for each category as you wish';
    201 $lang['help_images'][3] = 'picture files must have jpeg format (extension jpg or JPG), gif format (extension gif or GIF) or png format (extension png or PNG).';
    202 $lang['help_images'][4] = 'try not to use blank space " " or hyphen "-" in picture files, I advise you to use underscore "_" character which is managed by PhpWebGallery and will provide better results';
    203 $lang['help_thumbnails_title'] = 'Thumbnails';
    204 $lang['help_thumbnails'][0] = 'in each directory containing picture to display on your site, there is a sub-directory nammed "thumbnail", if it doesn\'t exist, create it to place your thumbnails into it.';
    205 $lang['help_thumbnails'][1] = 'thumbnails don\'t need to have the same extension as their associated picture (a picture with .jpg extension can have a thumbnail in .GIF extention for instance).';
    206 $lang['help_thumbnails'][2] = 'the thumbnail associated to a picture must be prefixed with the prefix given on the configuration page(image.jpg -> TN_image.GIF for instance).';
    207 $lang['help_thumbnails'][3] = 'I advise you to use the module for windows downloadable on the presentation site of PhpWebGallery for thumbnails management.';
    208 $lang['help_thumbnails'][4] = 'you can use the thumbnail creation page integrated in PhpWebGallery, but I don\'t advice you so, because thumbnail quality may be poor and it uses a high CPU load which can be a problem if you use free web hosting.';
    209 $lang['help_thumbnails'][5] = 'if you choose to use your hosting provider to create thumbnails, you must give 775 rights on "galleries" folder and all its sub-folders.';
    210 $lang['help_database_title'] = 'Updating database';
    211 $lang['help_database'][0] = 'once pictures files and thumbnails correctly placed in the directories, clic on "database update" in the menu of the administration panel.';
    212 $lang['help_infos_title'] = 'Miscellanous informations';
    213 $lang['help_infos'][1] = 'As soon as you created your gallery, go in the user list and modify permissions for user "visiteur". Indeed, every new registered users will have by default the same permissions as "visiteur" user.';
    214 $lang['help_remote_title'] = 'Remote site';
    215 $lang['help_remote'][0] = 'PhpWebGallery offers the possibility to use several servers to store the images which will compose your gallery. It can be useful if your gallery is installed on one limited space and that you have a big quantity of images to be shown. Please , follow this procedure : ';
    216 $lang['help_remote'][1] = '1. edit file "create_listing_file.php" (you will find it in the directory "admin"), by modifying the line "$prefix_thumbnail = "TN-";" if the prefix for your thumbnails is not "TN-".';
    217 $lang['help_remote'][2] = '2. place file "create_listing_file.php" modified on your distant website, in the root directory of your directories of images  (as the directory "galleries" of this website) by ftp.';
    218 $lang['help_remote'][3] = '3. launch script using the url http://domaineDistant/repGalerie/create_listing_file.php, a file listing.xml has just been created.';
    219 $lang['help_remote'][4] = '4. get back file listing.xml from your distant website to place it in directory "admin" of this website.';
    220 $lang['help_remote'][5] = '5. please , launch an update of the data of images by the interface of administration, once the listing.xml used file, kill it from the directory "admin".';
    221 $lang['help_remote'][6] = 'You can update the contents of a distant website by redoing the described manipulation. You can also kill a distant website by choosing the option in the configuration section of the administration panel.';
    222 $lang['help_upload_title'] = 'Added images by users';
    223 $lang['help_upload'][0] = 'PhpWebGallery offers the possibility for users to upload images. in order to do it :';
    224 $lang['help_upload'][1] = '1. authorize the option in the configuration zone of the administration panel';
    225 $lang['help_upload'][2] = '2. authorize the rights in writing in the images directories';
    226 $lang['remote_site'] = 'Remote site';
     270
     271
    227272$lang['title_add'] = 'Add a user';
    228273$lang['title_modify'] = 'Modify a user';
     
    232277$lang['title_group_perm'] = 'Modify permissions for group';
    233278$lang['title_picmod'] = 'Modify informations about a picture';
    234 $lang['menu_groups'] = 'Groups';
    235 $lang['menu_comments'] = 'Comments';
    236 $lang['conf_general_log'] = 'history';
    237279$lang['conf_general_log_info'] = 'Keep an history of visits on your website ? Visits will be shown in the history section of the administration panel';
    238280$lang['conf_general_mail_notification'] = 'Mail notification';
     
    259301$lang['group_list_title'] = 'List of existing groups';
    260302$lang['group_err_unknown'] = 'This group doesn\'t exist in the database';
    261 $lang['cat_permission'] = 'permissions';
    262 $lang['cat_update'] = 'update';
    263 $lang['cat_add'] = 'Add a virtual category';
    264 $lang['cat_parent'] = 'parent category';
    265 $lang['cat_error_name'] = 'The name of a category mustn\'t be empty';
    266 $lang['cat_virtual'] = 'virtual';
    267303$lang['cat_first'] = 'Move first';
    268304$lang['cat_last'] = 'Move last';
     
    281317$lang['comments_last_title'] = 'Last comments';
    282318$lang['comments_non_validated_title'] = 'Comments waiting for validation';
    283 $lang['help_database'][1] = 'In order to avoid the update of too many pictures in a single update, I advise to start by updating only categories, then on the categories section of the administration panel, update each category thanks to the link "update"';
    284 $lang['help_upload'][3] = 'The category must have upload available itself for upload.';
    285 $lang['help_upload'][4] = 'Uploaded images by the users are not directly visible on the website, they must be validated by an administrator.  For that purpose, an administrator must go on the page "en attente" of the administration panel, to validate or to refuse the images proposed, then launch an update of the images data.';
    286 $lang['help_virtual_title'] = 'Links between pictures and categories and virtual categories';
    287 $lang['help_virtual'][0] = 'PhpWebGallery is able to dissociate categories where pictures are stored and categories where pictures are shown.';
    288 $lang['help_virtual'][1] = 'By default, pictures are shown only in their real categories : the ones corresponding to directories on the web server.';
    289 $lang['help_virtual'][2] = 'To link a picture to a category, you just have to make the association on the page of picture informations or on the informations of all pictures of a category.';
    290 $lang['help_virtual'][3] = 'Using this principle, it is possible to create virtual categories in PhpWebGallery : no real directory coresponds to this category. You just have to create this category on the section "categories" of the admin panel.';
    291 $lang['help_groups_title'] = 'Users Groups';
    292 $lang['help_groups'][0] = 'PhpWebGallery is able to manage groups of users. It can be very useful to have common permission access for private categories.';
    293 $lang['help_groups'][1] = '1. Create the group "family" on the section "Groups" of admin panel.';
    294 $lang['help_groups'][2] = '2. On the section "Users", edit on of them and associate him to the group "family".';
    295 $lang['help_groups'][3] = '3. By modifying the permissions for a category or for a group, you\'ll see that all categories accessible for a group are accessible for its members.';
    296 $lang['help_groups'][4] = 'A user can belong to several groups. The authorization is stronger than prohibition : if a user "jack" belongs to the group "family" and "friends", and that only group "family" can see category "Christmas 2003", "jack" will be able to see "Christmas 2003".';
    297 $lang['help_access_title'] = 'Access authorization';
    298 $lang['help_access'][0] = 'PhpWebGallery is able to forbid access to categories. Categories can be "public" or "private". In order to forbid access to a category :';
    299 $lang['help_access'][1] = '1. Modify category informations (from the "categories" section in tha admin panel) and make it "private".';
    300 $lang['help_access'][2] = '2. On the page of permissions (for a group or a user) the private category will be shown and you\'ll be able to authorize access or not.';
    301 if (isset($conf))
    302   $lang['help_infos'][2] = 'If you have any question, do not hesitate to take a look at the forum or ask a question there. The <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> (message board) is available on the presentation site of PhpWebGallery.';
     319
    303320$lang['step1_err_copy'] = 'Copy the text between hyphens and paste it into the file "include/mysql.inc.php"(Warning : mysql.inc.php must only contain what is in blue, no line return or space character)';
    304321$lang['permuser_only_private'] = 'Only private categories are shown';
  • trunk/language/en_UK.iso-8859-1/common.lang.php

    r375 r394  
    2626// +-----------------------------------------------------------------------+
    2727
     28// Main words
     29
     30$lang['gallery_index'] = 'Gallery index';
     31$lang['category'] = 'Category';
     32$lang['categories'] = 'Categories';
     33$lang['thumbnail'] = 'Thumbnail';
     34$lang['thumbnails'] = 'Thumbnails';
     35$lang['search'] = 'Search';
     36$lang['submit'] = 'Submit';
     37$lang['comment'] = 'Comment';
     38$lang['comments'] = 'Comments';
     39$lang['picture'] = 'Picture';
     40$lang['pictures'] = 'Pictures';
     41$lang['no'] = 'No';
     42$lang['yes'] = 'Yes';
     43$lang['date'] = 'Date';
     44
     45// Identification
     46$lang['login'] = 'Login';
     47$lang['logout'] = 'Logout';
     48$lang['password'] = 'Password';
     49$lang['customize'] = 'Customize';
     50$lang['new'] = 'New';
     51$lang['delete'] = 'Delete';
     52$lang['identification'] = 'Identification';
     53
     54//Calendar
     55$lang['month'][1] = 'January';
     56$lang['month'][2] = 'February';
     57$lang['month'][3] = 'March';
     58$lang['month'][4] = 'April';
     59$lang['month'][5] = 'May';
     60$lang['month'][6] = 'June';
     61$lang['month'][7] = 'July';
     62$lang['month'][8] = 'August';
     63$lang['month'][9] = 'September';
     64$lang['month'][10] = 'October';
     65$lang['month'][11] = 'November';
     66$lang['month'][12] = 'December';
     67$lang['day'][0] = 'Sunday';
     68$lang['day'][1] = 'Monday';
     69$lang['day'][2] = 'Tuesday';
     70$lang['day'][3] = 'Wednesday';
     71$lang['day'][4] = 'Thursday';
     72$lang['day'][5] = 'Friday';
     73$lang['day'][6] = 'Saturday';
     74
    2875$lang['only_members'] = 'Only members can access this page';
    2976$lang['invalid_pwd'] = 'Invalid password!';
    3077$lang['access_forbiden'] = 'You are not authorized to access this page';
    31 $lang['submit'] = 'Submit';
    32 $lang['login'] = 'login';
    33 $lang['password'] = 'password';
    34 $lang['new'] = 'new';
    35 $lang['delete'] = 'delete';
    36 $lang['category'] = 'category';
    37 $lang['thumbnail'] = 'thumbnail';
    38 $lang['date'] = 'date';
    3978$lang['diapo_default_page_title'] = 'No category selected';
    40 $lang['thumbnails'] = 'Thumbnails';
    41 $lang['categories'] = 'Categories';
    4279$lang['hint_category'] = 'shows images at the root of this categry';
    4380$lang['total_images'] = 'total';
    4481$lang['title_menu'] = 'Menu';
    4582$lang['change_login'] = 'change login';
    46 $lang['login'] = 'login';
    4783$lang['hint_login'] = 'identification enables site\'s appareance customization';
    48 $lang['logout'] = 'Logout';
    49 $lang['customize'] = 'customize';
    5084$lang['hint_customize'] = 'customize the appareance of the gallery';
    5185$lang['hint_search'] = 'search';
    52 $lang['search'] = 'search';
    5386$lang['favorite_cat'] = 'favorites';
    5487$lang['favorite_cat_hint'] = 'display your favorites';
     
    112145$lang['comments_del'] = 'delete this comment';
    113146$lang['comments_add'] = 'Add a comment';
    114 $lang['month'][1] = 'January';
    115 $lang['month'][2] = 'February';
    116 $lang['month'][3] = 'March';
    117 $lang['month'][4] = 'April';
    118 $lang['month'][5] = 'May';
    119 $lang['month'][6] = 'June';
    120 $lang['month'][7] = 'July';
    121 $lang['month'][8] = 'August';
    122 $lang['month'][9] = 'September';
    123 $lang['month'][10] = 'October';
    124 $lang['month'][11] = 'November';
    125 $lang['month'][12] = 'December';
    126 $lang['day'][0] = 'Sunday';
    127 $lang['day'][1] = 'Monday';
    128 $lang['day'][2] = 'Tuesday';
    129 $lang['day'][3] = 'Wednesday';
    130 $lang['day'][4] = 'Thursday';
    131 $lang['day'][5] = 'Friday';
    132 $lang['day'][6] = 'Saturday';
     147
    133148$lang['add_favorites_alt'] = 'Add to favorites';
    134149$lang['add_favorites_hint'] = 'Add this picture to your favorites';
     
    165180// new or modified in release 1.3
    166181$lang['charset'] = 'iso-8859-1';
    167 $lang['no'] = 'no';
    168 $lang['yes'] = 'yes';
     182
    169183$lang['guest'] = 'guest';
    170184$lang['mail_address'] = 'mail address';
    171 $lang['public'] = 'public';
    172 $lang['private'] = 'private';
    173185$lang['add'] = 'add';
    174186$lang['dissociate'] = 'dissociate';
     
    183195$lang['infos_title'] = 'Informations';
    184196$lang['default'] = 'default';
    185 $lang['comments'] = 'comments';
    186197$lang['category_representative'] = 'representative';
    187198$lang['stats'] = 'statistics';
  • trunk/picture.php

    r393 r394  
    277277if (is_numeric( $page['cat'] ))
    278278{
    279   $title_img = replace_space(get_cat_display_name( $page['cat_name'], " &gt; ","font-style:italic;" ));
     279  $title_img = replace_space(get_cat_display_name( $page['cat_name'], " &gt; "));
    280280  $n = $page['num'] + 1;
    281281  $title_nb = "Photo".' '.$n.'/';
  • trunk/template/default/admin.tpl

    r393 r394  
    22  <p class="install_warning">{L_INSTALL_WARNING}</div>
    33<!-- END install_warning -->
    4 <div class="adminMenu">
    5   <a class="adminMenu" href="{U_CONFIG}">{L_CONFIG}</a>&nbsp;|&nbsp;
    6   <a class="adminMenu" href="{U_USERS}">{L_USERS}</a>&nbsp;|&nbsp;
    7   <a class="adminMenu" href="{U_GROUPS}">{L_GROUPS}</a>&nbsp;|&nbsp;
    8   <a class="adminMenu" href="{U_CATEGORIES}">{L_CATEGORIES}</a>&nbsp;|&nbsp;
    9   <a class="adminMenu" href="{U_WAITING}">{L_WAITING}</a>&nbsp;|&nbsp;
    10   <a class="adminMenu" href="{U_COMMENTS}">{L_COMMENTS}</a>&nbsp;|&nbsp;
    11   <a class="adminMenu" href="{U_UPDATE}">{L_UPDATE}</a>&nbsp;|&nbsp;
    12   <a class="adminMenu" href="{U_THUMBNAILS}">{L_THUMBNAILS}</a>&nbsp;|&nbsp;
    13   <a class="adminMenu" href="{U_HISTORY}">{L_HISTORY}</a>&nbsp;|&nbsp;
    14   <a class="adminMenu" href="{U_FAQ}">{L_FAQ}</a>&nbsp;|&nbsp;
    15   <a class="adminMenu" href="{U_RETURN}">{L_RETURN}</a>
     4<table style="width:100%;">
     5  <tr>
     6        <td valign="top" style="padding:10px;width:1%;">
     7        <div class="table1">
     8
     9<div class="titreMenu">{L_LINKS}</div>
     10<div class="menu">
     11<ul class="menu">
     12  <li><a class="adminMenu" href="{U_RETURN}">{L_GALLERY_INDEX}</a></li>
     13  </ul>
    1614</div>
    17 <div align="center">
    18 <div class="adminMain">
     15<div class="titreMenu">{L_GENERAL}</div>
     16<div class="menu">
     17<ul class="menu">
     18  <li><a class="adminMenu" href="{U_FAQ}">{L_FAQ}</a></li>
     19  <li><a class="adminMenu" href="{U_CONFIG}">{L_CONFIG}</a></li>
     20  <li><a class="adminMenu" href="{U_CONFIG}">{L_SITES}</a></li>
     21  <!--<li><a class="adminMenu" href="{U_CONFIG}">{L_DEFAULT}</a></li>-->
     22  <li><a class="adminMenu" href="{U_PHPINFO}">{L_PHPINFO}</a></li>
     23  <li><a class="adminMenu" href="{U_HISTORY}">{L_HISTORY}</a></li>
     24  </ul>
     25</div>
     26<div class="titreMenu">{L_CATEGORIES}</div>
     27<div class="menu">
     28<ul class="menu">
     29  <li><a class="adminMenu" href="{U_CATEGORIES}">{L_MANAGE}</a></li>
     30  <li><a class="adminMenu" href="{U_UPLOAD}">{L_UPLOAD}</a></li>
     31  <li><a class="adminMenu" href="{U_CAT_UPDATE}">{L_UPDATE}</a></li>
     32</ul>
     33</div>
     34<div class="titreMenu">{L_IMAGES}</div>
     35<div class="menu">
     36<ul class="menu">
     37  <li><a class="adminMenu" href="{U_WAITING}">{L_WAITING}</a></li>
     38  <li><a class="adminMenu" href="{U_THUMBNAILS}">{L_THUMBNAILS}</a></li>
     39  <li><a class="adminMenu" href="{U_COMMENTS}">{L_COMMENTS}</a></li>
     40  <li><a class="adminMenu" href="{U_IMG_UPDATE}">{L_UPDATE}</a></li>
     41  </ul>
     42</div>
     43<div class="titreMenu">{L_IDENTIFY}</div>
     44<div class="menu">
     45<ul class="menu">
     46  <li><a class="adminMenu" href="{U_USERS}">{L_USERS}</a></li>
     47  <li><a class="adminMenu" href="{U_GROUPS}">{L_GROUPS}</a></li>
     48</ul>
     49</div>
     50<div class="titreMenu">{L_AUTH}</div>
     51<div class="menu">
     52<ul class="menu">
     53  <li><a class="adminMenu" href="{U_AUTH}">{L_AUTH}</a></li>
     54  <li><a class="adminMenu" href="{U_USERS_AUTH}">{L_USERS}</a></li>
     55  <li><a class="adminMenu" href="{U_GROUPS_AUTH}">{L_GROUPS}</a></li>
     56</ul>
     57</div>
     58      </div>
     59        </td>
     60        <td style="padding:10px;width:99%;" valign="top">
     61<div class="home">
    1962  <div class="titrePage">{PAGE_TITLE}</div>
    2063  {ADMIN_CONTENT}
    21 </div></div>
     64</div>
     65        </td>
     66  </tr>
     67</table>
  • trunk/template/default/admin/configuration.tpl

    r393 r394  
    1212<!-- END confirmation -->
    1313<form method="post" action="{F_ACTION}">
    14 <table width="100%">
    15   <tr class="admin">
    16     <th colspan="3">{L_CONF_GENERAL}</th>
    17   </tr>
    18   <tr>
    19     <td colspan="3">&nbsp;</td>
    20   </tr>
    21   <tr>
    22     <td width="20%" >{L_ADMIN_NAME}</td>
    23         <td><input type="text" size="25" name="webmaster" value="{ADMIN_NAME}" /></td>
    24         <td width="50%" >{L_ADMIN_NAME_INFO}</td>
    25   </tr>
    26   <tr>
    27     <td>{L_ADMIN_MAIL}</td>
    28         <td><input type="text" size="25" maxlength="100" name="mail_webmaster" value="{ADMIN_MAIL}" /></td>
    29         <td>{L_ADMIN_MAIL_INFO}</td>
    30   </tr>
    31   <tr>
    32     <td>{L_THUMBNAIL_PREFIX}</td>
    33         <td><input type="text" size="3" maxlength="4" name="prefix_thumbnail" value="{THUMBNAIL_PREFIX}" /></td>
    34         <td>{L_THUMBNAIL_PREFIX_INFO}</td>
    35   </tr>
    36   <tr>
    37   <td>{L_ACCESS}</td>
    38         <td><input type="radio" class="radio" name="access" value="free" {ACCESS_FREE} />{L_ACCESS_FREE}&nbsp;&nbsp;
     14<table width="100%" align="center">
     15  <tr class="admin">
     16    <th colspan="2">{L_CONF_GENERAL}</th>
     17  </tr>
     18  <tr>
     19    <td colspan="2">&nbsp;</td>
     20  </tr>
     21  <tr>
     22    <td width="50%" ><strong>{L_ADMIN_NAME} &nbsp;:</strong><br /><span class="small">{L_ADMIN_NAME_INFO}</span></td>
     23        <td class="row1"><input type="text" size="25" name="webmaster" value="{ADMIN_NAME}" /></td>
     24  </tr>
     25  <tr>
     26    <td><strong>{L_ADMIN_MAIL}&nbsp;:</strong><br /><span class="small">{L_ADMIN_MAIL_INFO}</span></td>
     27        <td class="row1"><input type="text" size="25" maxlength="100" name="mail_webmaster" value="{ADMIN_MAIL}" /></td>
     28  </tr>
     29  <tr>
     30    <td><strong>{L_THUMBNAIL_PREFIX}&nbsp;:</strong><br /><span class="small">{L_THUMBNAIL_PREFIX_INFO}</span></td>
     31        <td class="row1"><input type="text" size="3" maxlength="4" name="prefix_thumbnail" value="{THUMBNAIL_PREFIX}" /></td>
     32  </tr>
     33  <tr>
     34  <td><strong>{L_ACCESS}&nbsp;:</strong><br /><span class="small">{L_ACCESS_INFO}</span></td>
     35        <td class="row1"><input type="radio" class="radio" name="access" value="free" {ACCESS_FREE} />{L_ACCESS_FREE}&nbsp;&nbsp;
    3936        <input type="radio" class="radio" name="access" value="restricted" {ACCESS_RESTRICTED} />{L_ACCESS_RESTRICTED}</td>
    40         <td>{L_ACCESS_INFO}</td>
    41   </tr>
    42   <tr>
    43     <td>{L_HISTORY}</td>
    44         <td><input type="radio" class="radio" name="log" value="true" {HISTORY_YES} />{L_YES}&nbsp;&nbsp;
     37  </tr>
     38  <tr>
     39    <td><strong>{L_CONF_HISTORY}&nbsp;:</strong><br /><span class="small">{L_CONF_HISTORY_INFO}</span></td>
     40        <td class="row1"><input type="radio" class="radio" name="log" value="true" {HISTORY_YES} />{L_YES}&nbsp;&nbsp;
    4541        <input type="radio" class="radio" name="log" value="false" {HISTORY_NO} />{L_NO}</td>
    46         <td>{L_HISTORY_INFO}</td>
    47   </tr>
    48   <tr>
    49     <td>{L_MAIL_NOTIFICATION}</td>
    50         <td><input type="radio" class="radio" name="mail_notification" value="true" {MAIL_NOTIFICATION_YES} />{L_YES}&nbsp;&nbsp;
     42  </tr>
     43  <tr>
     44    <td><strong>{L_MAIL_NOTIFICATION}&nbsp;:</strong><br /><span class="small">{L_MAIL_NOTIFICATION_INFO}</span></td>
     45        <td class="row1"><input type="radio" class="radio" name="mail_notification" value="true" {MAIL_NOTIFICATION_YES} />{L_YES}&nbsp;&nbsp;
    5146        <input type="radio" class="radio" name="mail_notification" value="false" {MAIL_NOTIFICATION_NO} />{L_NO}</td>
    52         <td>{L_MAIL_NOTIFICATION_INFO}</td>
    53   </tr>
    54     <tr>
    55     <td colspan="3">&nbsp;</td>
    56   </tr>
    57   <tr class="admin">
    58     <th colspan="3">{L_CONF_COMMENTS}</th>
    59   </tr>
    60     <tr>
    61     <td colspan="3">&nbsp;</td>
    62   </tr>
    63   <tr>
    64     <td>{L_SHOW_COMMENTS}</td>
    65         <td><input type="radio" class="radio" name="show_comments" value="true" {SHOW_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
     47  </tr>
     48    <tr>
     49    <td colspan="2">&nbsp;</td>
     50  </tr>
     51  <tr class="admin">
     52    <th colspan="2">{L_CONF_COMMENTS}</th>
     53  </tr>
     54    <tr>
     55    <td colspan="2">&nbsp;</td>
     56  </tr>
     57  <tr>
     58    <td><strong>{L_SHOW_COMMENTS}&nbsp;:</strong><br /><span class="small">{L_SHOW_COMMENTS_INFO}</span></td>
     59        <td class="row1"><input type="radio" class="radio" name="show_comments" value="true" {SHOW_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
    6660        <input type="radio" class="radio" name="show_comments" value="false" {SHOW_COMMENTS_NO} />{L_NO}</td>
    67         <td>{L_SHOW_COMMENTS_INFO}</td>
    68   </tr>
    69   <tr>
    70     <td>{L_COMMENTS_ALL}</td>
    71         <td><input type="radio" class="radio" name="comments_forall" value="true" {COMMENTS_ALL_YES} />{L_YES}&nbsp;&nbsp;
     61  </tr>
     62  <tr>
     63    <td><strong>{L_COMMENTS_ALL}&nbsp;:</strong><br /><span class="small">{L_NB_COMMENTS_PAGE_INFO}</span></td>
     64        <td class="row1"><input type="radio" class="radio" name="comments_forall" value="true" {COMMENTS_ALL_YES} />{L_YES}&nbsp;&nbsp;
    7265        <input type="radio" class="radio" name="comments_forall" value="false" {COMMENTS_ALL_NO} />{L_NO}</td>
    73         <td>{L_COMMENTS_ALL_INFO}</td>
    74   </tr>
    75   <tr>
    76     <td>{L_NB_COMMENTS_PAGE}</td>
    77         <td><input type="text" size="3" maxlength="4" name="nb_comment_page" value="{NB_COMMENTS_PAGE}" /></td>
    78         <td>{L_NB_COMMENTS_PAGE_INFO}</td>
    79   </tr>
    80   <tr>
    81     <td>{L_VALIDATE_COMMENTS}</td>
    82         <td><input type="radio" class="radio" name="comments_validation" value="true" {VALIDATE_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
     66  </tr>
     67  <tr>
     68    <td><strong>{L_NB_COMMENTS_PAGE}&nbsp;:</strong><br /><span class="small">{L_NB_COMMENTS_PAGE_INFO}</span></td>
     69        <td class="row1"><input type="text" size="3" maxlength="4" name="nb_comment_page" value="{NB_COMMENTS_PAGE}" /></td>
     70  </tr>
     71  <tr>
     72    <td><strong>{L_VALIDATE_COMMENTS}&nbsp;:</strong><br /><span class="small">{L_VALIDATE_COMMENTS_INFO}</span></td>
     73        <td class="row1"><input type="radio" class="radio" name="comments_validation" value="true" {VALIDATE_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
    8374        <input type="radio" class="radio" name="comments_validation" value="false" {VALIDATE_COMMENTS_NO} />{L_NO}</td>
    84         <td>{L_VALIDATE_COMMENTS_INFO}</td>
    85   </tr>
    86     <tr>
    87     <td colspan="3">&nbsp;</td>
    88   </tr>
    89   <tr class="admin">
    90     <th colspan="3">{L_ABILITIES_SETTINGS}</th>
    91   </tr>
    92     <tr>
    93     <td colspan="3">&nbsp;</td>
    94   </tr>
    95   <tr>
    96     <td>{L_LANG_SELECT}</td>
    97         <td>{LANG_SELECT}</td>
    98         <td>{L_LANG_SELECT_INFO}</td>
    99   </tr>
    100   <tr>
    101     <td>{L_NB_IMAGE_LINE}</td>
    102         <td><input type="text" size="3" maxlength="2" name="nb_image_line" value="{NB_IMAGE_LINE}" /></td>
    103         <td>{L_NB_IMAGE_LINE_INFO}</td>
    104   </tr>
    105   <tr>
    106     <td>{L_NB_ROW_PAGE}</td>
    107         <td><input type="text" size="3" maxlength="2" name="nb_line_page" value="{NB_ROW_PAGE}" /></td>
    108         <td>{L_NB_ROW_PAGE_INFO}</td>
    109   </tr>
    110   <tr>
    111     <td>{L_STYLE_SELECT}</td>
    112         <td>{STYLE_SELECT}</td>
    113         <td>{L_STYLE_SELECT_INFO}</td>
    114   </tr>
    115   <tr>
    116     <td>{L_SHORT_PERIOD}</td>
    117         <td><input type="text" size="3" maxlength="2" name="short_period" value="{SHORT_PERIOD}" /></td>
    118         <td>{L_SHORT_PERIOD_INFO}</td>
    119   </tr>
    120   <tr>
    121     <td>{L_LONG_PERIOD}</td>
    122         <td><input type="text" size="3" maxlength="2" name="long_period" value="{LONG_PERIOD}" /></td>
    123         <td>{L_LONG_PERIOD_INFO}</td>
    124   </tr>
    125   <tr>
    126     <td>{L_EXPAND_TREE}</td>
    127         <td><input type="radio" class="radio" name="auto_expand" value="true" {EXPAND_TREE_YES} />{L_YES}&nbsp;&nbsp;
     75  </tr>
     76    <tr>
     77    <td colspan="2">&nbsp;</td>
     78  </tr>
     79  <tr class="admin">
     80    <th colspan="2">{L_ABILITIES_SETTINGS}</th>
     81  </tr>
     82    <tr>
     83    <td colspan="2">&nbsp;</td>
     84  </tr>
     85  <tr>
     86    <td><strong>{L_LANG_SELECT}&nbsp;:</strong><br /><span class="small">{L_LANG_SELECT_INFO}</span></td>
     87        <td class="row1">{LANG_SELECT}</td>
     88  </tr>
     89  <tr>
     90    <td><strong>{L_NB_IMAGE_LINE}&nbsp;:</strong><br /><span class="small">{L_NB_IMAGE_LINE_INFO}</span></td>
     91        <td class="row1"><input type="text" size="3" maxlength="2" name="nb_image_line" value="{NB_IMAGE_LINE}" /></td>
     92  </tr>
     93  <tr>
     94    <td><strong>{L_NB_ROW_PAGE}&nbsp;:</strong><br /><span class="small">{L_NB_ROW_PAGE_INFO}</span></td>
     95        <td class="row1"><input type="text" size="3" maxlength="2" name="nb_line_page" value="{NB_ROW_PAGE}" /></td>
     96  </tr>
     97  <tr>
     98    <td><strong>{L_STYLE_SELECT}&nbsp;:</strong><br /><span class="small">{L_STYLE_SELECT_INFO}</span></td>
     99        <td class="row1">{STYLE_SELECT}</td>
     100  </tr>
     101  <tr>
     102    <td><strong>{L_SHORT_PERIOD}&nbsp;:</strong><br /><span class="small">{L_SHORT_PERIOD_INFO}</span></td>
     103        <td class="row1"><input type="text" size="3" maxlength="2" name="short_period" value="{SHORT_PERIOD}" /></td>
     104  </tr>
     105  <tr>
     106    <td><strong>{L_LONG_PERIOD}&nbsp;:</strong><br /><span class="small">{L_LONG_PERIOD_INFO}</span></td>
     107        <td class="row1"><input type="text" size="3" maxlength="2" name="long_period" value="{LONG_PERIOD}" /></td>
     108  </tr>
     109  <tr>
     110    <td><strong>{L_EXPAND_TREE}&nbsp;:</strong><br /><span class="small">{L_EXPAND_TREE_INFO}</span></td>
     111        <td class="row1"><input type="radio" class="radio" name="auto_expand" value="true" {EXPAND_TREE_YES} />{L_YES}&nbsp;&nbsp;
    128112        <input type="radio" class="radio" name="auto_expand" value="false" {EXPAND_TREE_NO} />{L_NO}</td>
    129         <td>{L_EXPAND_TREE_INFO}</td>
    130   </tr>
    131   <tr>
    132     <td>{L_NB_COMMENTS}</td>
    133         <td><input type="radio" class="radio" name="show_nb_comments" value="true" {NB_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
     113  </tr>
     114  <tr>
     115    <td><strong>{L_NB_COMMENTS}&nbsp;:</strong><br /><span class="small">{L_NB_COMMENTS_INFO}</span></td>
     116        <td class="row1"><input type="radio" class="radio" name="show_nb_comments" value="true" {NB_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
    134117        <input type="radio" class="radio" name="show_nb_comments" value="false" {NB_COMMENTS_NO} />{L_NO}</td>
    135         <td>{L_NB_COMMENTS_INFO}</td>
    136   </tr>
    137   <tr>
    138     <td colspan="3">&nbsp;</td>
    139   </tr>
    140   <tr class="admin">
    141     <th colspan="3">{L_CONF_UPLOAD}</th>
    142   </tr>
    143   <tr>
    144     <td colspan="3">&nbsp;</td>
    145   </tr>
    146   <tr>
    147     <td>{L_UPLOAD}</td>
    148         <td><input type="radio" class="radio" name="upload_available" value="true" {UPLOAD_YES} />{L_YES}&nbsp;&nbsp;
     118  </tr>
     119  <tr>
     120    <td colspan="2">&nbsp;</td>
     121  </tr>
     122  <tr class="admin">
     123    <th colspan="2">{L_CONF_UPLOAD}</th>
     124  </tr>
     125  <tr>
     126    <td colspan="2">&nbsp;</td>
     127  </tr>
     128  <tr>
     129    <td><strong>{L_AUTH_UPLOAD}&nbsp;:</strong><br /><span class="small">{L_AUTH_UPLOAD_INFO}</span></td>
     130        <td class="row1"><input type="radio" class="radio" name="upload_available" value="true" {UPLOAD_YES} />{L_YES}&nbsp;&nbsp;
    149131        <input type="radio" class="radio" name="upload_available" value="false" {UPLOAD_NO} />{L_NO}</td>
    150         <td>{L_UPLOAD_INFO}</td>
    151   </tr>
    152   <tr>
    153     <td>{L_UPLOAD_MAXSIZE}</td>
    154         <td><input type="text" size="4" maxlength="4" name="upload_maxfilesize" value="{UPLOAD_MAXSIZE}" /></td>
    155         <td>{L_UPLOAD_MAXSIZE_INFO}</td>
    156   </tr>
    157   <tr>
    158     <td>{L_UPLOAD_MAXWIDTH}</td>
    159         <td><input type="text" size="4" maxlength="4" name="upload_maxwidth" value="{UPLOAD_MAXWIDTH}" /></td>
    160         <td>{L_UPLOAD_MAXWIDTH_INFO}</td>
    161   </tr>
    162   <tr>
    163     <td>{L_UPLOAD_MAXHEIGHT}</td>
    164         <td><input type="text" size="4" maxlength="4" name="upload_maxheight" value="{UPLOAD_MAXHEIGHT}" /></td>
    165         <td>{L_UPLOAD_MAXHEIGHT_INFO}</td>
    166   </tr>
    167     <tr>
    168     <td>{L_TN_UPLOAD_MAXWIDTH}</td>
    169         <td><input type="text" size="4" maxlength="4" name="upload_maxwidth_thumbnail" value="{TN_UPLOAD_MAXWIDTH}" /></td>
    170         <td>{L_TN_UPLOAD_MAXWIDTH_INFO}</td>
    171   </tr>
    172   <tr>
    173     <td>{L_TN_UPLOAD_MAXHEIGHT}</td>
    174         <td><input type="text" size="4" maxlength="4" name="upload_maxheight_thumbnail" value="{TN_UPLOAD_MAXHEIGHT}" /></td>
    175         <td>{L_TN_UPLOAD_MAXHEIGHT_INFO}</td>
    176   </tr>
    177   <tr>
    178     <td colspan="3">&nbsp;</td>
    179   </tr>
    180   <tr class="admin">
    181     <th colspan="3">{L_CONF_SESSION}</th>
    182   </tr>
    183   <tr>
    184     <td colspan="3">&nbsp;</td>
    185   </tr>
    186     <tr>
    187     <td>{L_COOKIE}</td>
    188         <td><input type="radio" class="radio" name="authorize_cookies" value="true" {COOKIE_YES} />{L_YES}&nbsp;&nbsp;
     132  </tr>
     133  <tr>
     134    <td><strong>{L_UPLOAD_MAXSIZE}&nbsp;:</strong><br /><span class="small">{L_UPLOAD_MAXSIZE_INFO}</span></td>
     135        <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxfilesize" value="{UPLOAD_MAXSIZE}" /></td>
     136  </tr>
     137  <tr>
     138    <td><strong>{L_UPLOAD_MAXWIDTH}&nbsp;:</strong><br /><span class="small">{L_UPLOAD_MAXWIDTH_INFO}</span></td>
     139        <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxwidth" value="{UPLOAD_MAXWIDTH}" /></td>
     140  </tr>
     141  <tr>
     142    <td><strong>{L_UPLOAD_MAXHEIGHT}&nbsp;:</strong><br /><span class="small">{L_UPLOAD_MAXHEIGHT_INFO}</span></td>
     143        <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxheight" value="{UPLOAD_MAXHEIGHT}" /></td>
     144  </tr>
     145    <tr>
     146    <td><strong>{L_TN_UPLOAD_MAXWIDTH}&nbsp;:</strong><br /><span class="small">{L_TN_UPLOAD_MAXWIDTH_INFO}</span></td>
     147        <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxwidth_thumbnail" value="{TN_UPLOAD_MAXWIDTH}" /></td>
     148  </tr>
     149  <tr>
     150    <td><strong>{L_TN_UPLOAD_MAXHEIGHT}&nbsp;:</strong><br /><span class="small">{L_TN_UPLOAD_MAXHEIGHT_INFO}</span></td>
     151        <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxheight_thumbnail" value="{TN_UPLOAD_MAXHEIGHT}" /></td>
     152  </tr>
     153  <tr>
     154    <td colspan="2">&nbsp;</td>
     155  </tr>
     156  <tr class="admin">
     157    <th colspan="2">{L_CONF_SESSION}</th>
     158  </tr>
     159  <tr>
     160    <td colspan="2">&nbsp;</td>
     161  </tr>
     162    <tr>
     163    <td><strong>{L_COOKIE}&nbsp;:</strong><br /><span class="small">{L_COOKIE_INFO}</span></td>
     164        <td class="row1"><input type="radio" class="radio" name="authorize_cookies" value="true" {COOKIE_YES} />{L_YES}&nbsp;&nbsp;
    189165        <input type="radio" class="radio" name="authorize_cookies" value="false" {COOKIE_NO} />{L_NO}</td>
    190         <td>{L_COOKIE_INFO}</td>
    191   </tr>
    192   <tr>
    193     <td>{L_SESSION_LENGTH}</td>
    194         <td><input type="text" size="4" maxlength="6" name="session_time" value="{SESSION_LENGTH}" /></td>
    195         <td>{L_SESSION_LENGTH_INFO}</td>
    196   </tr>
    197     <tr>
    198     <td>{L_SESSION_ID_SIZE}</td>
    199         <td><input type="text" size="2" maxlength="3" name="session_id_size" value="{SESSION_ID_SIZE}" /></td>
    200         <td>{L_SESSION_ID_SIZE_INFO}</td>
     166  </tr>
     167  <tr>
     168    <td><strong>{L_SESSION_LENGTH}&nbsp;:</strong><br /><span class="small">{L_SESSION_LENGTH_INFO}</span></td>
     169        <td class="row1"><input type="text" size="4" maxlength="6" name="session_time" value="{SESSION_LENGTH}" /></td>
     170  </tr>
     171    <tr>
     172    <td><strong>{L_SESSION_ID_SIZE}&nbsp;:</strong><br /><span class="small">{L_SESSION_ID_SIZE_INFO}</span></td>
     173        <td class="row1"><input type="text" size="2" maxlength="3" name="session_id_size" value="{SESSION_ID_SIZE}" /></td>
    201174  </tr>
    202175    <!-- BEGIN remote_sites -->
    203176    <tr>
    204       <th colspan="3" align="center">{#remote_site}</th>
     177      <th colspan="2" align="center">{#remote_site}</th>
    205178    </tr>
    206179    <tr>
     
    217190      <td align="center"><input type="checkbox" name="delete_site_{#id}" value="1" /></td>
    218191      <!-- BEGIN rowspan -->
    219           <td class="row2" rowspan="{#nb_sites}">{#conf_remote_site_delete_info}</td>
     192          <td class="row2" rowspan="{#nb_sites}">{#conf_remote_site_delete_INFO}</span></td>
    220193          <!-- END rowspan -->
    221194    </tr>
     
    226199    <!-- END remote_sites -->
    227200    <tr>
    228       <td colspan="3" align="center">
     201      <td colspan="2" align="center">
    229202        <input type="submit" name="submit" class="bouton" value="{L_SUBMIT}">
    230203      </td>
  • trunk/template/default/admin/help.tpl

    r393 r394  
    1313      {cat.illustration.CAPTION}
    1414      <!-- END illustration -->
    15       <ul style="margin-right:10px;">
     15      <ul style="text-align:left; margin-right:10px;">
    1616        <!-- BEGIN item -->
    1717        <li>{cat.item.CONTENT}</li>
  • trunk/template/default/category.tpl

    r393 r394  
    103103                          <!-- END comment -->
    104104                          <div class="infoCat">
    105                           {L_NB_IMG} "{cat_infos.CAT_NAME}" : {cat_infos.NB_IMG_CAT}
     105                          {L_NB_IMG} "{TITLE}" : {cat_infos.NB_IMG_CAT}
    106106                          </div>
    107107                        <!-- END cat_infos -->
  • trunk/template/default/comments.tpl

    r393 r394  
    5050</table>
    5151<!-- BEGIN validation -->
     52<div align="center">
    5253<input type="submit" name="validate" class="bouton" value="{L_VALIDATE}" />
    5354<input type="submit" name="delete" class="bouton" value="{L_DELETE}" />
     55</div>
    5456</form>
    5557<!-- END validation -->
  • trunk/template/default/default.css

    r393 r394  
    1 /* Main styles */
     1/* MAIN STYLES */
    22
    33body {
    44  font-family: Verdana, Geneva, Arial, sans-serif;
    5   font-size:10px;
     5  font-size:12px;
    66  background-color:#000000;
    77  color:#E0E0E0;
     
    99}
    1010
    11 a {
    12   text-decoration:none;
    13   color:#FFFFFF;
    14 }
    15 a:hover {
    16   text-decoration:underline;
    17   color:#FFF48E;
    18 }
    19 
    20 a.none:hover {
    21   text-decoration:none;
    22 }
     11h1 {
     12        font:                   bold 18pt 'Trebuchet MS', Verdana, sans-serif;
     13        text-decoration:none;
     14        line-height:    120%;
     15}
     16h2 {
     17        font:                   bold 12pt Arial, Helvetica, sans-serif;
     18        text-decoration:none;
     19        line-height:    120%;
     20}
     21
     22.small{ font-size:80%;}
     23
     24/* ANCHORS */
     25
     26a { text-decoration:none; color:#FFFFFF;}
     27a:hover { text-decoration:underline; color:#FFF48E;}
     28a.none:hover { text-decoration:none;}
     29a.image:hover { text-decoration:none;}
     30a.thumbLink:hover { text-decoration:none;}
     31/*a.adminMenu:hover{ color : #C6B78E; }
     32a.adminMenu{ color : #FFF48E; }*/
     33
    2334/* Navigation styles */
    2435
     
    8091}
    8192
    82 a.image:hover {
    83   text-decoration:none;
    84 }
    85 
    8693.commentImage {
    8794  text-align:justify;
     
    145152  color:#FFFFCC;
    146153  background-color:#3F3F3F;
    147   width:100%;
    148154  text-align:center;
    149155  font-weight:bold;
     
    176182        border-color: #A0A0A0;
    177183        margin: 2px;
    178 }
    179 
    180 a.thumbLink:hover {
    181   text-decoration:none;
    182184}
    183185
     
    203205}
    204206/* Form styles */
     207
     208form{
     209  text-align:left;
     210  padding:10px;
     211}
    205212
    206213.bouton {
     
    216223
    217224input,select {
     225 text-indent:2px;
    218226 background-color:#505050;
    219227 border: 1px solid #797979;
     
    222230}
    223231
     232.radio{
     233  border:0;
     234}
    224235/* Admin styles */
    225236
     
    231242div.adminMenu{
    232243margin:10px 50px 10px 50px;
    233 }
    234 
    235 a.adminMenu:hover{
    236   color : #C6B78E;
    237 }
    238 
    239 a.adminMenu{
    240   color : #FFF48E;
    241244}
    242245
  • trunk/upload.php

    r369 r394  
    278278{
    279279  $advise_title = $lang['upload_advise'];
    280   $advise_title.= get_cat_display_name( $page['cat_name'], ' - ', 'font-style:italic;' );
     280  $advise_title.= get_cat_display_name( $page['cat_name'], ' - ' );
    281281}
    282282
Note: See TracChangeset for help on using the changeset viewer.