Changeset 579 for trunk/include/functions_category.inc.php
- Timestamp:
- Oct 23, 2004, 7:56:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_category.inc.php
r510 r579 346 346 function get_complete_dir( $category_id ) 347 347 { 348 return get_site_url( $category_id ).get_local_dir( $category_id);348 return get_site_url($category_id).get_local_dir($category_id); 349 349 } 350 350 … … 384 384 $database_dirs[$row['id']] = $row['dir']; 385 385 } 386 foreach ( $upper_array as $id ) { 386 foreach ($upper_array as $id) 387 { 387 388 $local_dir.= $database_dirs[$id].'/'; 388 389 } … … 393 394 // retrieving the site url : "http://domain.com/gallery/" or 394 395 // simply "./galleries/" 395 function get_site_url( $category_id)396 function get_site_url($category_id) 396 397 { 397 398 global $page; 398 399 399 $query = 'SELECT galleries_url'; 400 $query.= ' FROM '.SITES_TABLE.' AS s,'.CATEGORIES_TABLE.' AS c'; 401 $query.= ' WHERE s.id = c.site_id'; 402 $query.= ' AND c.id = '.$category_id; 403 $query.= ';'; 404 $row = mysql_fetch_array( mysql_query( $query ) ); 400 $query = ' 401 SELECT galleries_url 402 FROM '.SITES_TABLE.' AS s,'.CATEGORIES_TABLE.' AS c 403 WHERE s.id = c.site_id 404 AND c.id = '.$category_id.' 405 ;'; 406 $row = mysql_fetch_array(mysql_query($query)); 405 407 return $row['galleries_url']; 406 408 }
Note: See TracChangeset
for help on using the changeset viewer.