2003-05-09 14:42:42 +02:00
|
|
|
<?php
|
2004-02-07 12:50:26 +01:00
|
|
|
// +-----------------------------------------------------------------------+
|
2004-11-06 22:12:59 +01:00
|
|
|
// | PhpWebGallery - a PHP based picture gallery |
|
|
|
|
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
|
2006-02-28 02:13:16 +01:00
|
|
|
// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
|
2004-02-07 12:50:26 +01:00
|
|
|
// +-----------------------------------------------------------------------+
|
2004-11-06 22:12:59 +01:00
|
|
|
// | branch : BSF (Best So Far)
|
2004-02-07 12:50:26 +01:00
|
|
|
// | file : $RCSfile$
|
|
|
|
// | last update : $Date$
|
|
|
|
// | last modifier : $Author$
|
|
|
|
// | revision : $Revision$
|
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
// | This program is free software; you can redistribute it and/or modify |
|
|
|
|
// | it under the terms of the GNU General Public License as published by |
|
2004-02-07 16:31:01 +01:00
|
|
|
// | the Free Software Foundation |
|
|
|
|
// | |
|
|
|
|
// | This program is distributed in the hope that it will be useful, but |
|
|
|
|
// | WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
|
|
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
|
|
|
// | General Public License for more details. |
|
|
|
|
// | |
|
|
|
|
// | You should have received a copy of the GNU General Public License |
|
|
|
|
// | along with this program; if not, write to the Free Software |
|
|
|
|
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
|
|
|
|
// | USA. |
|
2004-02-07 12:50:26 +01:00
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
|
2004-02-07 16:31:01 +01:00
|
|
|
//--------------------------------------------------------------------- include
|
2004-02-19 01:31:09 +01:00
|
|
|
define('PHPWG_ROOT_PATH','./');
|
|
|
|
include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
|
2006-03-09 23:46:28 +01:00
|
|
|
|
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
// | Check Access and exit when user status is not ok |
|
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
check_status(ACCESS_GUEST);
|
|
|
|
|
2003-07-27 10:24:10 +02:00
|
|
|
//---------------------------------------------------------------------- logout
|
2004-02-02 01:55:18 +01:00
|
|
|
if ( isset( $_GET['act'] )
|
|
|
|
and $_GET['act'] == 'logout'
|
2006-01-15 14:45:42 +01:00
|
|
|
and isset( $_COOKIE[session_name()] ) )
|
2003-07-27 10:24:10 +02:00
|
|
|
{
|
|
|
|
// cookie deletion if exists
|
2006-01-15 14:45:42 +01:00
|
|
|
$_SESSION = array();
|
|
|
|
session_unset();
|
|
|
|
session_destroy();
|
2006-02-08 02:17:07 +01:00
|
|
|
setcookie(session_name(),'',0, cookie_path() );
|
2003-07-27 10:24:10 +02:00
|
|
|
$url = 'category.php';
|
2004-03-31 22:43:09 +02:00
|
|
|
redirect( $url );
|
2003-07-27 10:24:10 +02:00
|
|
|
}
|
2006-02-28 05:28:06 +01:00
|
|
|
//---------------------------------------------- change of image display order
|
2006-02-12 22:52:16 +01:00
|
|
|
if (isset($_GET['image_order']))
|
2004-11-23 23:31:24 +01:00
|
|
|
{
|
2006-02-12 22:52:16 +01:00
|
|
|
setcookie(
|
2006-02-28 05:28:06 +01:00
|
|
|
'pwg_image_order',
|
2006-02-12 22:52:16 +01:00
|
|
|
$_GET['image_order'] > 0 ? $_GET['image_order'] : '',
|
|
|
|
0
|
|
|
|
);
|
2006-02-28 05:28:06 +01:00
|
|
|
|
2006-02-12 22:52:16 +01:00
|
|
|
redirect(
|
2006-03-15 23:44:35 +01:00
|
|
|
make_index_URL(
|
|
|
|
array(),
|
|
|
|
array('image_order')
|
|
|
|
)
|
2006-02-12 22:52:16 +01:00
|
|
|
);
|
2006-02-01 23:56:17 +01:00
|
|
|
}
|
2003-05-09 14:42:42 +02:00
|
|
|
//-------------------------------------------------------------- initialization
|
2006-03-15 23:44:35 +01:00
|
|
|
include(PHPWG_ROOT_PATH.'include/section_init.inc.php');
|
2004-02-02 01:55:18 +01:00
|
|
|
// detection of the start picture to display
|
2006-03-15 23:44:35 +01:00
|
|
|
if (!isset($page['start']))
|
2004-09-04 10:07:33 +02:00
|
|
|
{
|
2004-02-02 01:55:18 +01:00
|
|
|
$page['start'] = 0;
|
2004-09-04 10:07:33 +02:00
|
|
|
}
|
2006-02-12 22:52:16 +01:00
|
|
|
|
|
|
|
// access authorization check
|
2006-03-15 23:44:35 +01:00
|
|
|
if (isset($page['category']))
|
2006-02-12 22:52:16 +01:00
|
|
|
{
|
2006-03-15 23:44:35 +01:00
|
|
|
check_restrictions($page['category']);
|
2006-02-12 22:52:16 +01:00
|
|
|
}
|
|
|
|
|
2006-03-15 23:44:35 +01:00
|
|
|
if (isset($page['cat_nb_images'])
|
2006-02-12 22:52:16 +01:00
|
|
|
and $page['cat_nb_images'] > $user['nb_image_page'])
|
|
|
|
{
|
|
|
|
$page['navigation_bar'] = create_navigation_bar(
|
2006-03-15 23:44:35 +01:00
|
|
|
duplicate_index_URL(array(), array('start')),
|
2006-02-12 22:52:16 +01:00
|
|
|
$page['cat_nb_images'],
|
|
|
|
$page['start'],
|
|
|
|
$user['nb_image_page'],
|
|
|
|
'back'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$page['navigation_bar'] = '';
|
|
|
|
}
|
2004-02-02 01:55:18 +01:00
|
|
|
|
2005-03-25 23:10:55 +01:00
|
|
|
// caddie filling :-)
|
|
|
|
if (isset($_GET['caddie']))
|
|
|
|
{
|
2006-02-12 22:52:16 +01:00
|
|
|
fill_caddie($page['items']);
|
2006-03-15 23:44:35 +01:00
|
|
|
// redirect();
|
2005-03-25 23:10:55 +01:00
|
|
|
}
|
|
|
|
|
2003-05-09 14:42:42 +02:00
|
|
|
//----------------------------------------------------- template initialization
|
2004-02-02 01:55:18 +01:00
|
|
|
//
|
|
|
|
// Start output of page
|
|
|
|
//
|
|
|
|
$title = $page['title'];
|
- new : HTML BODY identifier to let CSS stylesheets manage specific
behaviour.
- deletion : admin/search useless
- improvement : in admin/user_list, special behaviour for true/false fields
(expand, show_comments)
- new : gallery_title and gallery_description are displayed at the top of
each page.
- improvement : simplification in HTML for categories menu.
- improvement : standardization of presentation in all public pages
(identification, registration, search, profile, notification, comments,
etc.)
(not in ChangeLog, below this line)
- add forgotten notification.php (should have been added in a previous
commit)
- [template cclear] deletion of useless class .bouton
- [template cclear] for test purpose, new presentation of register page
(using FORM.filter)
- [template cclear] adaptation of admin/group_list from template default
- [template cclear] deletion of obsolete admin/infos_images
- [template cclear] deletion of obsolete admin/search_username
- [template cclear] new icon register.png
git-svn-id: http://piwigo.org/svn/trunk@850 68402e56-0260-453c-a942-63ccdbb3a9ee
2005-08-26 00:43:47 +02:00
|
|
|
$page['body_id'] = 'theCategoryPage';
|
2004-02-22 03:43:13 +01:00
|
|
|
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
2004-02-02 01:55:18 +01:00
|
|
|
|
2004-02-07 12:50:26 +01:00
|
|
|
$template->set_filenames( array('category'=>'category.tpl') );
|
|
|
|
//-------------------------------------------------------------- category title
|
2006-03-15 23:44:35 +01:00
|
|
|
if (isset($page['category']))
|
2004-12-25 20:33:36 +01:00
|
|
|
{
|
2006-03-15 23:44:35 +01:00
|
|
|
$template_title = get_cat_display_name(
|
|
|
|
$page['cat_name'],
|
|
|
|
'category.php?/category/',
|
|
|
|
false
|
|
|
|
);
|
2004-12-25 20:33:36 +01:00
|
|
|
}
|
2004-12-28 20:33:52 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
$template_title = $page['title'];
|
|
|
|
}
|
2004-12-25 20:33:36 +01:00
|
|
|
|
2006-03-15 23:44:35 +01:00
|
|
|
if (isset($page['cat_nb_images']) and $page['cat_nb_images'] > 0)
|
2004-06-15 22:00:40 +02:00
|
|
|
{
|
|
|
|
$template_title.= ' ['.$page['cat_nb_images'].']';
|
2004-02-07 12:50:26 +01:00
|
|
|
}
|
|
|
|
|
2004-07-09 23:00:00 +02:00
|
|
|
$icon_recent = get_icon(date('Y-m-d'));
|
2004-06-19 01:23:29 +02:00
|
|
|
|
2006-03-15 23:44:35 +01:00
|
|
|
$calendar_view_link = duplicate_index_URL(
|
|
|
|
array(), // nothing to redefine
|
|
|
|
array('chronology_type', 'start') // what to remove ?
|
|
|
|
);
|
|
|
|
|
|
|
|
if (!isset($page['chronology_type']))
|
2006-02-20 05:39:37 +01:00
|
|
|
{
|
2006-03-15 23:44:35 +01:00
|
|
|
$calendar_view_link.= '/calendar-';
|
|
|
|
|
2006-02-22 02:00:39 +01:00
|
|
|
$template->assign_block_vars(
|
2006-02-28 05:28:06 +01:00
|
|
|
'mode_created',
|
2006-03-15 23:44:35 +01:00
|
|
|
array(
|
|
|
|
'URL' => $calendar_view_link.'created'
|
|
|
|
)
|
2006-02-22 02:00:39 +01:00
|
|
|
);
|
2006-03-16 03:22:58 +01:00
|
|
|
|
2006-02-28 05:28:06 +01:00
|
|
|
$template->assign_block_vars(
|
|
|
|
'mode_posted',
|
2006-03-15 23:44:35 +01:00
|
|
|
array(
|
|
|
|
'URL' => $calendar_view_link.'posted'
|
|
|
|
)
|
2006-02-28 05:28:06 +01:00
|
|
|
);
|
2006-02-22 02:00:39 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$template->assign_block_vars(
|
2006-02-28 05:28:06 +01:00
|
|
|
'mode_normal',
|
2006-03-15 23:44:35 +01:00
|
|
|
array(
|
|
|
|
'URL' => $calendar_view_link
|
|
|
|
)
|
2006-02-22 02:00:39 +01:00
|
|
|
);
|
2006-02-28 05:28:06 +01:00
|
|
|
|
2006-03-15 23:44:35 +01:00
|
|
|
$calendar_view_link .= '/calendar-';
|
|
|
|
if ($page['chronology_type'] == 'created')
|
2006-02-28 05:28:06 +01:00
|
|
|
{
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'mode_posted',
|
2006-03-15 23:44:35 +01:00
|
|
|
array(
|
|
|
|
'URL' => $calendar_view_link.'posted'
|
|
|
|
)
|
2006-02-28 05:28:06 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'mode_created',
|
2006-03-15 23:44:35 +01:00
|
|
|
array(
|
|
|
|
'URL' => $calendar_view_link.'created'
|
|
|
|
)
|
2006-02-28 05:28:06 +01:00
|
|
|
);
|
|
|
|
}
|
2006-02-20 05:39:37 +01:00
|
|
|
}
|
|
|
|
|
- new : HTML BODY identifier to let CSS stylesheets manage specific
behaviour.
- deletion : admin/search useless
- improvement : in admin/user_list, special behaviour for true/false fields
(expand, show_comments)
- new : gallery_title and gallery_description are displayed at the top of
each page.
- improvement : simplification in HTML for categories menu.
- improvement : standardization of presentation in all public pages
(identification, registration, search, profile, notification, comments,
etc.)
(not in ChangeLog, below this line)
- add forgotten notification.php (should have been added in a previous
commit)
- [template cclear] deletion of useless class .bouton
- [template cclear] for test purpose, new presentation of register page
(using FORM.filter)
- [template cclear] adaptation of admin/group_list from template default
- [template cclear] deletion of obsolete admin/infos_images
- [template cclear] deletion of obsolete admin/search_username
- [template cclear] new icon register.png
git-svn-id: http://piwigo.org/svn/trunk@850 68402e56-0260-453c-a942-63ccdbb3a9ee
2005-08-26 00:43:47 +02:00
|
|
|
$template->assign_vars(
|
|
|
|
array(
|
2006-03-15 23:44:35 +01:00
|
|
|
'NB_PICTURE' => $user['nb_total_images'],
|
|
|
|
'TITLE' => $template_title,
|
|
|
|
'USERNAME' => $user['username'],
|
|
|
|
'TOP_NUMBER' => $conf['top_number'],
|
|
|
|
'MENU_CATEGORIES_CONTENT' => get_categories_menu(),
|
|
|
|
|
|
|
|
'F_IDENTIFY' => PHPWG_ROOT_PATH.'identification.php',
|
|
|
|
'T_RECENT' => $icon_recent,
|
2006-03-16 03:22:58 +01:00
|
|
|
|
2006-03-15 23:44:35 +01:00
|
|
|
'U_HOME' => make_index_URL(),
|
|
|
|
'U_REGISTER' => PHPWG_ROOT_PATH.'register.php',
|
|
|
|
'U_LOST_PASSWORD' => PHPWG_ROOT_PATH.'password.php',
|
|
|
|
'U_LOGOUT' => make_index_URL().'&act=logout',
|
|
|
|
'U_ADMIN'=> PHPWG_ROOT_PATH.'admin.php',
|
|
|
|
'U_PROFILE'=> PHPWG_ROOT_PATH.'profile.php',
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
if ('search' == $page['section'])
|
2006-01-27 23:40:51 +01:00
|
|
|
{
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'search_rules',
|
|
|
|
array(
|
2006-03-15 23:44:35 +01:00
|
|
|
'URL' => PHPWG_ROOT_PATH.'/search_rules.php?search_id='.$page['search'],
|
2006-01-27 23:40:51 +01:00
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
2005-06-25 19:09:01 +02:00
|
|
|
//-------------------------------------------------------------- external links
|
|
|
|
if (count($conf['links']) > 0)
|
|
|
|
{
|
|
|
|
$template->assign_block_vars('links', array());
|
|
|
|
|
|
|
|
foreach ($conf['links'] as $url => $label)
|
|
|
|
{
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'links.link',
|
|
|
|
array(
|
|
|
|
'URL' => $url,
|
|
|
|
'LABEL' => $label
|
2006-03-15 23:44:35 +01:00
|
|
|
)
|
|
|
|
);
|
2005-06-25 19:09:01 +02:00
|
|
|
}
|
|
|
|
}
|
2004-09-01 23:39:29 +02:00
|
|
|
//---------------------------------------------------------- special categories
|
|
|
|
// favorites categories
|
2003-05-09 14:42:42 +02:00
|
|
|
if ( !$user['is_the_guest'] )
|
|
|
|
{
|
2004-02-19 01:31:09 +01:00
|
|
|
$template->assign_block_vars('username', array());
|
2004-09-01 23:39:29 +02:00
|
|
|
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'special_cat',
|
|
|
|
array(
|
2006-03-15 23:44:35 +01:00
|
|
|
'URL' => make_index_URL(array('section' => 'favorites')),
|
2004-09-01 23:39:29 +02:00
|
|
|
'TITLE' => $lang['favorite_cat_hint'],
|
|
|
|
'NAME' => $lang['favorite_cat']
|
|
|
|
));
|
2003-05-09 14:42:42 +02:00
|
|
|
}
|
2004-09-01 23:39:29 +02:00
|
|
|
// most visited
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'special_cat',
|
|
|
|
array(
|
2006-03-15 23:44:35 +01:00
|
|
|
'URL' => make_index_URL(array('section' => 'most_visited')),
|
2004-09-01 23:39:29 +02:00
|
|
|
'TITLE' => $lang['most_visited_cat_hint'],
|
2005-02-09 22:47:21 +01:00
|
|
|
'NAME' => $lang['most_visited_cat']
|
2004-09-01 23:39:29 +02:00
|
|
|
));
|
|
|
|
// best rated
|
2005-09-19 00:29:17 +02:00
|
|
|
if ($conf['rate'])
|
|
|
|
{
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'special_cat',
|
|
|
|
array(
|
2006-03-15 23:44:35 +01:00
|
|
|
'URL' => make_index_URL(array('section' => 'best_rated')),
|
2005-09-19 00:29:17 +02:00
|
|
|
'TITLE' => $lang['best_rated_cat_hint'],
|
|
|
|
'NAME' => $lang['best_rated_cat']
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
2004-09-01 23:39:29 +02:00
|
|
|
// random
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'special_cat',
|
|
|
|
array(
|
2006-01-15 14:45:42 +01:00
|
|
|
'URL' => PHPWG_ROOT_PATH.'random.php',
|
2004-09-01 23:39:29 +02:00
|
|
|
'TITLE' => $lang['random_cat_hint'],
|
|
|
|
'NAME' => $lang['random_cat']
|
|
|
|
));
|
|
|
|
// recent pics
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'special_cat',
|
|
|
|
array(
|
2006-03-15 23:44:35 +01:00
|
|
|
'URL' => make_index_URL(array('section' => 'recent_pics')),
|
2004-09-01 23:39:29 +02:00
|
|
|
'TITLE' => $lang['recent_pics_cat_hint'],
|
|
|
|
'NAME' => $lang['recent_pics_cat']
|
|
|
|
));
|
|
|
|
// recent cats
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'special_cat',
|
|
|
|
array(
|
2006-03-15 23:44:35 +01:00
|
|
|
'URL' => make_index_URL(array('section' => 'recent_cats')),
|
2004-09-01 23:39:29 +02:00
|
|
|
'TITLE' => $lang['recent_cats_cat_hint'],
|
|
|
|
'NAME' => $lang['recent_cats_cat']
|
|
|
|
));
|
2006-03-15 23:44:35 +01:00
|
|
|
|
2004-09-01 23:39:29 +02:00
|
|
|
// calendar
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'special_cat',
|
|
|
|
array(
|
2006-03-15 23:44:35 +01:00
|
|
|
'URL' =>
|
|
|
|
make_index_URL()
|
|
|
|
.'/calendar-'
|
|
|
|
.($conf['calendar_datefield'] == 'date_available' ? 'posted' : 'created')
|
|
|
|
.'-monthly-c',
|
2004-09-01 23:39:29 +02:00
|
|
|
'TITLE' => $lang['calendar_hint'],
|
|
|
|
'NAME' => $lang['calendar']
|
2006-03-15 23:44:35 +01:00
|
|
|
)
|
|
|
|
);
|
2003-05-09 14:42:42 +02:00
|
|
|
//--------------------------------------------------------------------- summary
|
2004-02-26 19:33:45 +01:00
|
|
|
|
2005-07-17 17:06:39 +02:00
|
|
|
if ($user['is_the_guest'])
|
2003-05-09 14:42:42 +02:00
|
|
|
{
|
2005-07-17 17:06:39 +02:00
|
|
|
$template->assign_block_vars('register', array());
|
|
|
|
$template->assign_block_vars('login', array());
|
2006-02-28 05:28:06 +01:00
|
|
|
|
2005-07-17 17:06:39 +02:00
|
|
|
$template->assign_block_vars('quickconnect', array());
|
|
|
|
if ($conf['authorize_remembering'])
|
2004-02-26 19:33:45 +01:00
|
|
|
{
|
2005-07-17 17:06:39 +02:00
|
|
|
$template->assign_block_vars('quickconnect.remember_me', array());
|
2004-02-26 19:33:45 +01:00
|
|
|
}
|
2003-05-09 14:42:42 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-07-17 17:06:39 +02:00
|
|
|
$template->assign_block_vars('hello', array());
|
2006-03-09 23:46:28 +01:00
|
|
|
|
|
|
|
if (is_autorize_status(ACCESS_CLASSIC))
|
|
|
|
{
|
|
|
|
$template->assign_block_vars('profile', array());
|
|
|
|
}
|
2005-07-17 17:06:39 +02:00
|
|
|
|
|
|
|
// the logout link has no meaning with Apache authentication : it is not
|
|
|
|
// possible to logout with this kind of authentication.
|
|
|
|
if (!$conf['apache_authentication'])
|
|
|
|
{
|
|
|
|
$template->assign_block_vars('logout', array());
|
|
|
|
}
|
|
|
|
|
2006-03-09 00:14:53 +01:00
|
|
|
if (is_admin())
|
2004-10-07 00:48:48 +02:00
|
|
|
{
|
2005-07-17 17:06:39 +02:00
|
|
|
$template->assign_block_vars('admin', array());
|
2004-10-07 00:48:48 +02:00
|
|
|
}
|
2003-05-09 14:42:42 +02:00
|
|
|
}
|
2004-02-07 12:50:26 +01:00
|
|
|
|
2003-05-09 14:42:42 +02:00
|
|
|
// search link
|
2006-03-15 23:44:35 +01:00
|
|
|
$template->assign_block_vars(
|
|
|
|
'summary',
|
|
|
|
array(
|
|
|
|
'TITLE'=>$lang['hint_search'],
|
|
|
|
'NAME'=>$lang['search'],
|
|
|
|
'U_SUMMARY'=> 'search.php',
|
|
|
|
'REL'=> 'rel="search"'
|
|
|
|
)
|
|
|
|
);
|
2004-02-07 12:50:26 +01:00
|
|
|
|
2003-10-04 18:08:53 +02:00
|
|
|
// comments link
|
2006-03-15 23:44:35 +01:00
|
|
|
$template->assign_block_vars(
|
|
|
|
'summary',
|
|
|
|
array(
|
|
|
|
'TITLE'=>$lang['hint_comments'],
|
|
|
|
'NAME'=>$lang['comments'],
|
|
|
|
'U_SUMMARY'=> 'comments.php',
|
|
|
|
)
|
|
|
|
);
|
2004-02-07 12:50:26 +01:00
|
|
|
|
2003-05-09 14:42:42 +02:00
|
|
|
// about link
|
2006-03-15 23:44:35 +01:00
|
|
|
$template->assign_block_vars(
|
|
|
|
'summary',
|
|
|
|
array(
|
|
|
|
'TITLE' => $lang['about_page_title'],
|
|
|
|
'NAME' => $lang['About'],
|
|
|
|
'U_SUMMARY' => 'about.php?'.str_replace(
|
|
|
|
'&',
|
|
|
|
'&',
|
|
|
|
$_SERVER['QUERY_STRING']
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
2004-02-07 12:50:26 +01:00
|
|
|
|
2005-08-19 15:54:40 +02:00
|
|
|
// notification
|
2005-07-16 16:29:35 +02:00
|
|
|
$template->assign_block_vars(
|
|
|
|
'summary',
|
|
|
|
array(
|
2005-08-19 15:54:40 +02:00
|
|
|
'TITLE'=>l10n('notification'),
|
|
|
|
'NAME'=>l10n('Notification'),
|
2006-02-10 03:10:41 +01:00
|
|
|
'U_SUMMARY'=> PHPWG_ROOT_PATH.'notification.php',
|
|
|
|
'REL'=> 'rel="nofollow"'
|
2006-03-15 23:44:35 +01:00
|
|
|
)
|
|
|
|
);
|
2005-07-16 16:29:35 +02:00
|
|
|
|
2006-03-15 23:44:35 +01:00
|
|
|
if (isset($page['category']) and is_admin())
|
2005-08-19 19:00:20 +02:00
|
|
|
{
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'edit',
|
|
|
|
array(
|
|
|
|
'URL' =>
|
2006-03-15 23:44:35 +01:00
|
|
|
PHPWG_ROOT_PATH.'admin.php?page=cat_modify'
|
|
|
|
.'&cat_id='.$page['category']
|
2005-08-19 19:00:20 +02:00
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2004-06-25 22:29:51 +02:00
|
|
|
//------------------------------------------------------ main part : thumbnails
|
2006-03-15 23:44:35 +01:00
|
|
|
if (isset($page['thumbnails_include']))
|
2006-02-20 05:39:37 +01:00
|
|
|
{
|
|
|
|
include(PHPWG_ROOT_PATH.$page['thumbnails_include']);
|
|
|
|
}
|
2003-05-09 14:42:42 +02:00
|
|
|
//------------------------------------------------------- category informations
|
2006-03-15 23:44:35 +01:00
|
|
|
if (
|
|
|
|
$page['navigation_bar'] != ''
|
|
|
|
or (isset($page['comment']) and $page['comment'] != '')
|
|
|
|
)
|
2006-02-20 05:39:37 +01:00
|
|
|
{
|
|
|
|
$template->assign_block_vars('cat_infos',array());
|
|
|
|
}
|
|
|
|
// navigation bar
|
2006-03-15 23:44:35 +01:00
|
|
|
if ($page['navigation_bar'] != '')
|
2006-02-28 05:28:06 +01:00
|
|
|
{
|
2006-02-20 05:39:37 +01:00
|
|
|
$template->assign_block_vars(
|
|
|
|
'cat_infos.navigation',
|
2006-03-15 23:44:35 +01:00
|
|
|
array(
|
|
|
|
'NAV_BAR' => $page['navigation_bar'],
|
|
|
|
)
|
2006-02-20 05:39:37 +01:00
|
|
|
);
|
|
|
|
}
|
2006-02-23 03:30:19 +01:00
|
|
|
|
2006-03-15 23:44:35 +01:00
|
|
|
if (isset($page['cat_nb_images']) and $page['cat_nb_images'] > 0
|
|
|
|
and $page['section'] != 'most_visited'
|
|
|
|
and $page['section'] != 'best_rated')
|
2006-02-23 03:30:19 +01:00
|
|
|
{
|
|
|
|
// image order
|
|
|
|
$template->assign_block_vars( 'preferred_image_order', array() );
|
|
|
|
|
2006-03-15 23:44:35 +01:00
|
|
|
$order_idx = isset($_COOKIE['pwg_image_order'])
|
|
|
|
? $_COOKIE['pwg_image_order']
|
|
|
|
: 0
|
|
|
|
;
|
2006-02-23 03:30:19 +01:00
|
|
|
|
|
|
|
$orders = get_category_preferred_image_orders();
|
2006-03-15 23:44:35 +01:00
|
|
|
for ($i = 0; $i < count($orders); $i++)
|
2006-02-23 03:30:19 +01:00
|
|
|
{
|
|
|
|
if ($orders[$i][2])
|
|
|
|
{
|
2006-03-15 23:44:35 +01:00
|
|
|
$template->assign_block_vars(
|
|
|
|
'preferred_image_order.order',
|
|
|
|
array(
|
|
|
|
'DISPLAY' => $orders[$i][0],
|
|
|
|
'URL' => duplicate_index_URL().'&image_order='.$i,
|
|
|
|
'SELECTED_OPTION' => ($order_idx==$i ? 'SELECTED' : ''),
|
|
|
|
)
|
|
|
|
);
|
2006-02-23 03:30:19 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-03-15 23:44:35 +01:00
|
|
|
if (isset($page['category']))
|
2003-05-09 14:42:42 +02:00
|
|
|
{
|
2004-03-26 18:08:09 +01:00
|
|
|
// upload a picture in the category
|
2006-03-15 23:44:35 +01:00
|
|
|
if ($page['cat_uploadable'])
|
2003-05-09 14:42:42 +02:00
|
|
|
{
|
2006-03-15 23:44:35 +01:00
|
|
|
$url = PHPWG_ROOT_PATH.'upload.php?cat='.$page['category'];
|
2004-06-15 22:00:40 +02:00
|
|
|
$template->assign_block_vars(
|
|
|
|
'upload',
|
2006-03-15 23:44:35 +01:00
|
|
|
array(
|
|
|
|
'U_UPLOAD'=> $url
|
|
|
|
)
|
2004-06-15 22:00:40 +02:00
|
|
|
);
|
2003-05-09 14:42:42 +02:00
|
|
|
}
|
2006-03-16 03:22:58 +01:00
|
|
|
|
2004-02-07 12:50:26 +01:00
|
|
|
// category comment
|
2006-03-15 23:44:35 +01:00
|
|
|
if (isset($page['comment']) and $page['comment'] != '')
|
2004-02-07 12:50:26 +01:00
|
|
|
{
|
2004-06-15 22:00:40 +02:00
|
|
|
$template->assign_block_vars(
|
|
|
|
'cat_infos.comment',
|
2006-03-15 23:44:35 +01:00
|
|
|
array(
|
|
|
|
'COMMENTS' => $page['comment']
|
|
|
|
)
|
2004-06-15 22:00:40 +02:00
|
|
|
);
|
2003-05-09 14:42:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
//------------------------------------------------------------ log informations
|
2006-03-15 23:44:35 +01:00
|
|
|
pwg_log('category', $page['title']);
|
2004-02-02 01:55:18 +01:00
|
|
|
|
2005-01-13 11:18:49 +01:00
|
|
|
$template->parse('category');
|
2004-02-22 03:43:13 +01:00
|
|
|
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
2004-02-12 00:20:38 +01:00
|
|
|
?>
|