Changeset 134
- Timestamp:
- Sep 19, 2003, 11:41:42 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/category.php
r128 r134 348 348 $i = 0; 349 349 foreach ( $subcats as $subcat_id => $non_empty_id ) { 350 $ subcat_infos = get_cat_info( $subcat_id );351 352 $name ='[ <span style="font-weight:bold;">';353 $name.= $ subcat_infos['name'][0];350 $name = '<img src="'.$user['lien_collapsed'].'" style="border:none;"'; 351 $name.= ' alt=">"/> '; 352 $name.= '[ <span style="font-weight:bold;">'; 353 $name.= $page['plain_structure'][$subcat_id]['name']; 354 354 $name.= '</span> ]'; 355 355 356 // searching the representative picture of the category 357 $query = 'SELECT representative_picture_id'; 358 $query.= ' FROM '.PREFIX_TABLE.'categories'; 359 $query.= ' WHERE id = '.$non_empty_id; 360 $row = mysql_fetch_array( mysql_query( $query ) ); 361 356 362 $query = 'SELECT file,tn_ext,storage_category_id'; 357 363 $query.= ' FROM '.PREFIX_TABLE.'images'; 358 364 $query.= ' LEFT JOIN '.PREFIX_TABLE.'image_category ON id = image_id'; 359 365 $query.= ' WHERE category_id = '.$non_empty_id; 360 $query.= ' ORDER BY RAND()'; 366 // if the category has a representative picture, this is its thumbnail 367 // tha will be displayed ! 368 if ( $row['representative_picture_id'] != '' ) 369 $query.= ' AND id = '.$row['representative_picture_id']; 370 else 371 $query.= ' ORDER BY RAND()'; 361 372 $query.= ' LIMIT 0,1'; 362 373 $query.= ';'; … … 384 395 $url_link.= $subcat_id; 385 396 386 list( $year,$month,$day ) = explode( '-', $subcat_infos['date_last'] ); 387 $date = mktime( 0, 0, 0, $month, $day, $year ); 397 $date = $page['plain_structure'][$subcat_id]['date_last']; 388 398 389 399 // sending vars to display
Note: See TracChangeset
for help on using the changeset viewer.