[440] | 1 | <?php |
---|
| 2 | // +-----------------------------------------------------------------------+ |
---|
[593] | 3 | // | PhpWebGallery - a PHP based picture gallery | |
---|
| 4 | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | |
---|
[675] | 5 | // | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net | |
---|
[440] | 6 | // +-----------------------------------------------------------------------+ |
---|
[593] | 7 | // | branch : BSF (Best So Far) |
---|
[440] | 8 | // | file : $RCSfile$ |
---|
| 9 | // | last update : $Date: 2005-10-17 21:11:19 +0000 (Mon, 17 Oct 2005) $ |
---|
| 10 | // | last modifier : $Author: plg $ |
---|
| 11 | // | revision : $Revision: 896 $ |
---|
| 12 | // +-----------------------------------------------------------------------+ |
---|
| 13 | // | This program is free software; you can redistribute it and/or modify | |
---|
| 14 | // | it under the terms of the GNU General Public License as published by | |
---|
| 15 | // | the Free Software Foundation | |
---|
| 16 | // | | |
---|
| 17 | // | This program is distributed in the hope that it will be useful, but | |
---|
| 18 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
| 19 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
| 20 | // | General Public License for more details. | |
---|
| 21 | // | | |
---|
| 22 | // | You should have received a copy of the GNU General Public License | |
---|
| 23 | // | along with this program; if not, write to the Free Software | |
---|
| 24 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
| 25 | // | USA. | |
---|
| 26 | // +-----------------------------------------------------------------------+ |
---|
| 27 | |
---|
| 28 | /** |
---|
| 29 | * This file is included by category.php to show thumbnails for the category |
---|
| 30 | * calendar |
---|
| 31 | * |
---|
| 32 | */ |
---|
| 33 | |
---|
| 34 | // years of image availability |
---|
| 35 | $query = ' |
---|
[497] | 36 | SELECT YEAR('.$conf['calendar_datefield'].') AS year, COUNT(id) AS count |
---|
[440] | 37 | FROM '.IMAGES_TABLE.', '.IMAGE_CATEGORY_TABLE.' |
---|
| 38 | '.$page['where'].' |
---|
| 39 | AND id = image_id |
---|
| 40 | GROUP BY year |
---|
| 41 | ;'; |
---|
[587] | 42 | $result = pwg_query($query); |
---|
[440] | 43 | $calendar_years = array(); |
---|
| 44 | while ($row = mysql_fetch_array($result)) |
---|
| 45 | { |
---|
| 46 | $calendar_years[$row['year']] = $row['count']; |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | // if the year requested is not among the available years, we unset the |
---|
| 50 | // variable |
---|
| 51 | if (isset($page['calendar_year']) |
---|
| 52 | and !isset($calendar_years[$page['calendar_year']])) |
---|
| 53 | { |
---|
| 54 | unset($page['calendar_year']); |
---|
| 55 | } |
---|
| 56 | |
---|
| 57 | // years navigation bar creation |
---|
| 58 | $years_nav_bar = ''; |
---|
| 59 | foreach ($calendar_years as $calendar_year => $nb_picture_year) |
---|
| 60 | { |
---|
| 61 | if (isset($page['calendar_year']) |
---|
| 62 | and $calendar_year == $page['calendar_year']) |
---|
| 63 | { |
---|
[514] | 64 | $years_nav_bar.= ' <span class="dateSelected">'.$calendar_year.'</span>'; |
---|
[440] | 65 | } |
---|
| 66 | else |
---|
| 67 | { |
---|
| 68 | $url = PHPWG_ROOT_PATH.'category.php?cat=calendar'; |
---|
| 69 | $url.= '&year='.$calendar_year; |
---|
| 70 | $url = add_session_id($url); |
---|
| 71 | $years_nav_bar.= ' <a href="'.$url.'">'.$calendar_year.'</a>'; |
---|
| 72 | } |
---|
| 73 | } |
---|
| 74 | |
---|
| 75 | $template->assign_block_vars( |
---|
| 76 | 'calendar', |
---|
| 77 | array('YEARS_NAV_BAR' => $years_nav_bar) |
---|
| 78 | ); |
---|
| 79 | |
---|
| 80 | // months are calculated (to know which months are available, and how many |
---|
| 81 | // pictures per month we can find) only if a year is requested. |
---|
| 82 | if (isset($page['calendar_year'])) |
---|
| 83 | { |
---|
| 84 | // creation of hash associating the number of the month in the year with |
---|
| 85 | // the number of picture for this month : $calendar_months |
---|
| 86 | $query = ' |
---|
[497] | 87 | SELECT DISTINCT(MONTH('.$conf['calendar_datefield'].')) AS month |
---|
| 88 | , COUNT(id) AS count |
---|
[612] | 89 | FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id |
---|
[440] | 90 | '.$page['where'].' |
---|
[612] | 91 | AND '.$conf['calendar_datefield'].' |
---|
| 92 | BETWEEN \''.$page['calendar_year'].'-1-1\' |
---|
| 93 | AND \''.$page['calendar_year'].'-12-31\' |
---|
[497] | 94 | GROUP BY MONTH('.$conf['calendar_datefield'].') |
---|
[440] | 95 | ;'; |
---|
[587] | 96 | $result = pwg_query($query); |
---|
[440] | 97 | $calendar_months = array(); |
---|
| 98 | while ($row = mysql_fetch_array($result)) |
---|
| 99 | { |
---|
| 100 | $calendar_months[$row['month']] = $row['count']; |
---|
| 101 | } |
---|
| 102 | |
---|
| 103 | // if a month is requested and is not among the available months, we unset |
---|
| 104 | // the requested month |
---|
| 105 | if (isset($page['calendar_month']) |
---|
| 106 | and !isset($calendar_months[$page['calendar_month']])) |
---|
| 107 | { |
---|
| 108 | unset($page['calendar_month']); |
---|
| 109 | } |
---|
| 110 | |
---|
| 111 | // months navigation bar creation |
---|
| 112 | $months_nav_bar = ''; |
---|
| 113 | foreach ($calendar_months as $calendar_month => $nb_picture_month) |
---|
| 114 | { |
---|
| 115 | if (isset($page['calendar_month']) |
---|
| 116 | and $calendar_month == $page['calendar_month']) |
---|
| 117 | { |
---|
[514] | 118 | $months_nav_bar.= ' <span class="dateSelected">'; |
---|
[440] | 119 | $months_nav_bar.= $lang['month'][(int)$calendar_month]; |
---|
| 120 | $months_nav_bar.= '</span>'; |
---|
| 121 | } |
---|
| 122 | else |
---|
| 123 | { |
---|
| 124 | $url = PHPWG_ROOT_PATH.'category.php?cat=calendar&month='; |
---|
| 125 | $url.= $page['calendar_year'].'.'.sprintf('%02s', $calendar_month); |
---|
| 126 | $months_nav_bar.= ' '; |
---|
| 127 | $months_nav_bar.= '<a href="'.add_session_id($url).'">'; |
---|
| 128 | $months_nav_bar.= $lang['month'][(int)$calendar_month]; |
---|
| 129 | $months_nav_bar.= '</a>'; |
---|
| 130 | } |
---|
| 131 | } |
---|
| 132 | $template->assign_block_vars( |
---|
| 133 | 'calendar', |
---|
| 134 | array('MONTHS_NAV_BAR' => $months_nav_bar)); |
---|
| 135 | } |
---|
| 136 | |
---|
| 137 | /** |
---|
| 138 | * 4 sub-cases are possibles for the calendar category : |
---|
| 139 | * |
---|
| 140 | * 1. show years if no year is requested |
---|
| 141 | * 2. show months of the requested year if no month is requested |
---|
| 142 | * 3. show days of the {year,month} requested if no day requested |
---|
| 143 | * 4. show categories of the requested day (+ a special category gathering |
---|
| 144 | * all categories) |
---|
| 145 | */ |
---|
| 146 | |
---|
| 147 | if (!isset($page['calendar_year'])) |
---|
| 148 | { |
---|
| 149 | $nb_pics = count($calendar_years); |
---|
| 150 | } |
---|
| 151 | elseif (!isset($page['calendar_month'])) |
---|
| 152 | { |
---|
| 153 | $nb_pics = count($calendar_months); |
---|
| 154 | } |
---|
| 155 | elseif (!isset($page['calendar_day'])) |
---|
| 156 | { |
---|
| 157 | // creation of hash associating the number of the day in the month with |
---|
| 158 | // the number of picture for this day : $calendar_days |
---|
| 159 | $query = ' |
---|
[896] | 160 | SELECT |
---|
| 161 | DISTINCT DATE_FORMAT('.$conf['calendar_datefield'].', \'%Y-%m-%d\') AS day |
---|
| 162 | , COUNT(id) AS count |
---|
[612] | 163 | FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id |
---|
[440] | 164 | '.$page['where'].' |
---|
[612] | 165 | AND '.$conf['calendar_datefield'].' |
---|
| 166 | BETWEEN \''.$page['calendar_year'].'-'.$page['calendar_month'].'-1\' |
---|
| 167 | AND \''.$page['calendar_year'].'-'.$page['calendar_month'].'-31\' |
---|
[440] | 168 | GROUP BY day |
---|
| 169 | ;'; |
---|
[587] | 170 | $result = pwg_query($query); |
---|
[440] | 171 | $calendar_days = array(); |
---|
| 172 | while ($row = mysql_fetch_array($result)) |
---|
| 173 | { |
---|
| 174 | $calendar_days[$row['day']] = $row['count']; |
---|
| 175 | } |
---|
| 176 | $nb_pics = count($calendar_days); |
---|
| 177 | } |
---|
| 178 | elseif (isset($page['calendar_day'])) |
---|
| 179 | { |
---|
| 180 | // $page['calendar_date'] is the concatenation of year-month-day. simplier |
---|
| 181 | // to use in SQ queries |
---|
| 182 | $page['calendar_date'] = $page['calendar_year']; |
---|
| 183 | $page['calendar_date'].= '-'.$page['calendar_month']; |
---|
| 184 | $page['calendar_date'].= '-'.$page['calendar_day']; |
---|
| 185 | |
---|
| 186 | $query = ' |
---|
| 187 | SELECT category_id AS category, COUNT(id) AS count |
---|
[612] | 188 | FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id |
---|
[440] | 189 | '.$page['where'].' |
---|
[497] | 190 | AND '.$conf['calendar_datefield'].' = \''.$page['calendar_date'].'\' |
---|
[440] | 191 | GROUP BY category_id |
---|
| 192 | ;'; |
---|
[587] | 193 | $result = pwg_query($query); |
---|
[440] | 194 | $calendar_categories = array(); |
---|
| 195 | // special category 0 : gathering all available categories (0 cannot be a |
---|
| 196 | // oregular category identifier) |
---|
| 197 | $calendar_categories[0] = 0; |
---|
| 198 | while ($row = mysql_fetch_array($result)) |
---|
| 199 | { |
---|
| 200 | $calendar_categories[$row['category']] = $row['count']; |
---|
| 201 | } |
---|
| 202 | // update the total number of pictures for this day |
---|
| 203 | $calendar_categories[0] = array_sum($calendar_categories); |
---|
| 204 | |
---|
| 205 | $nb_pics = count($calendar_categories); |
---|
| 206 | } |
---|
| 207 | |
---|
| 208 | // template thumbnail initialization |
---|
| 209 | if ($nb_pics > 0) |
---|
| 210 | { |
---|
| 211 | $template->assign_block_vars('thumbnails', array()); |
---|
| 212 | // first line |
---|
| 213 | $template->assign_block_vars('thumbnails.line', array()); |
---|
| 214 | // current row displayed |
---|
| 215 | $row_number = 0; |
---|
| 216 | } |
---|
| 217 | |
---|
| 218 | if (!isset($page['calendar_year'])) |
---|
| 219 | { |
---|
| 220 | // for each month of this year, display a random picture |
---|
| 221 | foreach ($calendar_years as $calendar_year => $nb_pics) |
---|
| 222 | { |
---|
| 223 | $query = ' |
---|
[606] | 224 | SELECT file,tn_ext,'.$conf['calendar_datefield'].',path |
---|
[612] | 225 | FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id |
---|
[440] | 226 | '.$page['where'].' |
---|
[612] | 227 | AND '.$conf['calendar_datefield'].' |
---|
| 228 | BETWEEN \''.$calendar_year.'-1-1\' |
---|
| 229 | AND \''.$calendar_year.'-12-31\' |
---|
[440] | 230 | ORDER BY RAND() |
---|
| 231 | LIMIT 0,1 |
---|
| 232 | ;'; |
---|
[587] | 233 | $row = mysql_fetch_array(pwg_query($query)); |
---|
[440] | 234 | |
---|
[606] | 235 | $thumbnail_src = get_thumbnail_src($row['path'], @$row['tn_ext']); |
---|
[440] | 236 | |
---|
| 237 | $name = $calendar_year.' ('.$nb_pics.')'; |
---|
| 238 | |
---|
| 239 | $thumbnail_title = $lang['calendar_picture_hint'].$name; |
---|
| 240 | |
---|
| 241 | $url_link = PHPWG_ROOT_PATH.'category.php?cat=calendar'; |
---|
| 242 | $url_link.= '&year='.$calendar_year; |
---|
| 243 | |
---|
| 244 | $template->assign_block_vars( |
---|
| 245 | 'thumbnails.line.thumbnail', |
---|
| 246 | array( |
---|
[579] | 247 | 'IMAGE'=>$thumbnail_src, |
---|
[440] | 248 | 'IMAGE_ALT'=>$row['file'], |
---|
| 249 | 'IMAGE_TITLE'=>$thumbnail_title, |
---|
| 250 | |
---|
| 251 | 'U_IMG_LINK'=>add_session_id($url_link) |
---|
| 252 | ) |
---|
| 253 | ); |
---|
| 254 | |
---|
[761] | 255 | $template->assign_block_vars( |
---|
| 256 | 'thumbnails.line.thumbnail.category_name', |
---|
| 257 | array( |
---|
| 258 | 'NAME' => $name |
---|
| 259 | ) |
---|
| 260 | ); |
---|
| 261 | |
---|
[440] | 262 | // create a new line ? |
---|
| 263 | if (++$row_number == $user['nb_image_line']) |
---|
| 264 | { |
---|
| 265 | $template->assign_block_vars('thumbnails.line', array()); |
---|
| 266 | $row_number = 0; |
---|
| 267 | } |
---|
| 268 | } |
---|
| 269 | } |
---|
| 270 | elseif (!isset($page['calendar_month'])) |
---|
| 271 | { |
---|
| 272 | // for each month of this year, display a random picture |
---|
| 273 | foreach ($calendar_months as $calendar_month => $nb_pics) |
---|
| 274 | { |
---|
| 275 | $query = ' |
---|
[606] | 276 | SELECT file,tn_ext,'.$conf['calendar_datefield'].',path |
---|
[612] | 277 | FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id |
---|
[440] | 278 | '.$page['where'].' |
---|
[612] | 279 | AND '.$conf['calendar_datefield'].' |
---|
| 280 | BETWEEN \''.$page['calendar_year'].'-'.$calendar_month.'-1\' |
---|
| 281 | AND \''.$page['calendar_year'].'-'.$calendar_month.'-31\' |
---|
[440] | 282 | ORDER BY RAND() |
---|
| 283 | LIMIT 0,1 |
---|
| 284 | ;'; |
---|
[587] | 285 | $row = mysql_fetch_array(pwg_query($query)); |
---|
[440] | 286 | |
---|
[606] | 287 | $thumbnail_src = get_thumbnail_src($row['path'], @$row['tn_ext']); |
---|
[579] | 288 | |
---|
[440] | 289 | $name = $lang['month'][$calendar_month]; |
---|
| 290 | $name.= ' '.$page['calendar_year']; |
---|
| 291 | $name.= ' ('.$nb_pics.')'; |
---|
| 292 | |
---|
| 293 | $thumbnail_title = $lang['calendar_picture_hint'].$name; |
---|
| 294 | |
---|
| 295 | $url_link = PHPWG_ROOT_PATH.'category.php?cat=calendar'; |
---|
| 296 | $url_link.= '&month='.$page['calendar_year'].'.'; |
---|
| 297 | if ($calendar_month < 10) |
---|
| 298 | { |
---|
| 299 | // adding leading zero |
---|
| 300 | $url_link.= '0'; |
---|
| 301 | } |
---|
| 302 | $url_link.= $calendar_month; |
---|
| 303 | |
---|
| 304 | $template->assign_block_vars( |
---|
| 305 | 'thumbnails.line.thumbnail', |
---|
| 306 | array( |
---|
[579] | 307 | 'IMAGE'=>$thumbnail_src, |
---|
[440] | 308 | 'IMAGE_ALT'=>$row['file'], |
---|
| 309 | 'IMAGE_TITLE'=>$thumbnail_title, |
---|
| 310 | |
---|
| 311 | 'U_IMG_LINK'=>add_session_id($url_link) |
---|
| 312 | ) |
---|
| 313 | ); |
---|
| 314 | |
---|
[761] | 315 | $template->assign_block_vars( |
---|
| 316 | 'thumbnails.line.thumbnail.category_name', |
---|
| 317 | array( |
---|
| 318 | 'NAME' => $name |
---|
| 319 | ) |
---|
| 320 | ); |
---|
| 321 | |
---|
[440] | 322 | // create a new line ? |
---|
| 323 | if (++$row_number == $user['nb_image_line']) |
---|
| 324 | { |
---|
| 325 | $template->assign_block_vars('thumbnails.line', array()); |
---|
| 326 | $row_number = 0; |
---|
| 327 | } |
---|
| 328 | } |
---|
| 329 | } |
---|
| 330 | elseif (!isset($page['calendar_day'])) |
---|
| 331 | { |
---|
| 332 | // for each day of the requested month, display a random picture |
---|
| 333 | foreach ($calendar_days as $calendar_day => $nb_pics) |
---|
| 334 | { |
---|
| 335 | $query = ' |
---|
[606] | 336 | SELECT file,tn_ext,'.$conf['calendar_datefield'].',path |
---|
[697] | 337 | , DAYOFWEEK(\''.$calendar_day.'\') AS dow |
---|
[612] | 338 | FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id |
---|
[440] | 339 | '.$page['where'].' |
---|
[497] | 340 | AND '.$conf['calendar_datefield'].' = \''.$calendar_day.'\' |
---|
[440] | 341 | ORDER BY RAND() |
---|
| 342 | LIMIT 0,1 |
---|
| 343 | ;'; |
---|
[587] | 344 | $row = mysql_fetch_array(pwg_query($query)); |
---|
[440] | 345 | |
---|
[606] | 346 | $thumbnail_src = get_thumbnail_src($row['path'], @$row['tn_ext']); |
---|
[440] | 347 | |
---|
| 348 | list($year,$month,$day) = explode('-', $calendar_day); |
---|
[697] | 349 | $name = $lang['day'][$row['dow']-1]; |
---|
[440] | 350 | $name.= ' '.$day; |
---|
| 351 | $name.= ' ('.$nb_pics.')'; |
---|
| 352 | |
---|
| 353 | $thumbnail_title = $lang['calendar_picture_hint'].$name; |
---|
| 354 | |
---|
| 355 | $url_link = PHPWG_ROOT_PATH.'category.php'; |
---|
| 356 | $url_link.= '?cat=calendar&day='.str_replace('-', '.', $calendar_day); |
---|
| 357 | |
---|
| 358 | $template->assign_block_vars( |
---|
| 359 | 'thumbnails.line.thumbnail', |
---|
| 360 | array( |
---|
[579] | 361 | 'IMAGE'=>$thumbnail_src, |
---|
[440] | 362 | 'IMAGE_ALT'=>$row['file'], |
---|
| 363 | 'IMAGE_TITLE'=>$thumbnail_title, |
---|
| 364 | |
---|
| 365 | 'U_IMG_LINK'=>add_session_id($url_link) |
---|
| 366 | ) |
---|
| 367 | ); |
---|
| 368 | |
---|
[761] | 369 | $template->assign_block_vars( |
---|
| 370 | 'thumbnails.line.thumbnail.category_name', |
---|
| 371 | array( |
---|
| 372 | 'NAME' => $name |
---|
| 373 | ) |
---|
| 374 | ); |
---|
| 375 | |
---|
[440] | 376 | // create a new line ? |
---|
| 377 | if (++$row_number == $user['nb_image_line']) |
---|
| 378 | { |
---|
| 379 | $template->assign_block_vars('thumbnails.line', array()); |
---|
| 380 | $row_number = 0; |
---|
| 381 | } |
---|
| 382 | } |
---|
| 383 | } |
---|
| 384 | elseif (isset($page['calendar_day'])) |
---|
| 385 | { |
---|
[642] | 386 | $old_level_separator = $conf['level_separator']; |
---|
| 387 | $conf['level_separator'] = '<br />'; |
---|
[440] | 388 | // for each category of this day, display a random picture |
---|
| 389 | foreach ($calendar_categories as $calendar_category => $nb_pics) |
---|
| 390 | { |
---|
| 391 | if ($calendar_category == 0) |
---|
| 392 | { |
---|
[744] | 393 | $name = '['.$lang['all_categories'].']'; |
---|
[440] | 394 | } |
---|
| 395 | else |
---|
| 396 | { |
---|
| 397 | $cat_infos = get_cat_info( $calendar_category ); |
---|
[642] | 398 | |
---|
| 399 | $name = get_cat_display_name($cat_infos['name'],'',false); |
---|
[440] | 400 | $name = '['.$name.']'; |
---|
| 401 | } |
---|
| 402 | $name.= ' ('.$nb_pics.')'; |
---|
| 403 | |
---|
| 404 | $query = ' |
---|
[606] | 405 | SELECT file,tn_ext,'.$conf['calendar_datefield'].',path |
---|
[440] | 406 | FROM '.IMAGES_TABLE.', '.IMAGE_CATEGORY_TABLE.' |
---|
| 407 | '.$page['where'].' |
---|
[497] | 408 | AND '.$conf['calendar_datefield'].' = \''.$page['calendar_date'].'\''; |
---|
[440] | 409 | if ($calendar_category != 0) |
---|
| 410 | { |
---|
| 411 | $query.= ' |
---|
| 412 | AND category_id = '.$calendar_category; |
---|
| 413 | } |
---|
| 414 | $query.= ' |
---|
| 415 | AND id = image_id |
---|
| 416 | ORDER BY RAND() |
---|
| 417 | LIMIT 0,1 |
---|
| 418 | ;'; |
---|
[587] | 419 | $row = mysql_fetch_array(pwg_query($query)); |
---|
[440] | 420 | |
---|
[606] | 421 | $thumbnail_src = get_thumbnail_src($row['path'], @$row['tn_ext']); |
---|
[440] | 422 | |
---|
| 423 | $thumbnail_title = $lang['calendar_picture_hint'].$name; |
---|
| 424 | |
---|
| 425 | $url_link = PHPWG_ROOT_PATH.'category.php?cat=search'; |
---|
[497] | 426 | $url_link.= '&search='.$conf['calendar_datefield'].':'.$_GET['day']; |
---|
[456] | 427 | if ($calendar_category != 0) |
---|
| 428 | { |
---|
[867] | 429 | $url_link.= '--cat:'.$calendar_category.'|AND'; |
---|
[456] | 430 | } |
---|
| 431 | |
---|
[440] | 432 | $template->assign_block_vars( |
---|
| 433 | 'thumbnails.line.thumbnail', |
---|
| 434 | array( |
---|
[579] | 435 | 'IMAGE'=>$thumbnail_src, |
---|
[440] | 436 | 'IMAGE_ALT'=>$row['file'], |
---|
| 437 | 'IMAGE_TITLE'=>$thumbnail_title, |
---|
| 438 | |
---|
| 439 | 'U_IMG_LINK'=>add_session_id($url_link) |
---|
| 440 | ) |
---|
| 441 | ); |
---|
[761] | 442 | |
---|
| 443 | $template->assign_block_vars( |
---|
| 444 | 'thumbnails.line.thumbnail.category_name', |
---|
| 445 | array( |
---|
| 446 | 'NAME' => $name |
---|
| 447 | ) |
---|
| 448 | ); |
---|
[440] | 449 | |
---|
| 450 | // create a new line ? |
---|
| 451 | if (++$row_number == $user['nb_image_line']) |
---|
| 452 | { |
---|
| 453 | $template->assign_block_vars('thumbnails.line', array()); |
---|
| 454 | $row_number = 0; |
---|
| 455 | } |
---|
| 456 | } |
---|
[642] | 457 | $conf['level_separator'] = $old_level_separator; |
---|
[440] | 458 | } |
---|
| 459 | ?> |
---|