Changeset 1048
- Timestamp:
- Feb 20, 2006, 11:14:24 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/configuration.php
r1044 r1048 254 254 $blockname = 'default.template_option'; 255 255 256 foreach (get_ themes() as $pwg_template)256 foreach (get_pwg_themes() as $pwg_template) 257 257 { 258 258 if (isset($_POST['submit'])) -
trunk/admin/include/functions.php
r1042 r1048 1317 1317 function update_average_rate( $element_id=-1 ) 1318 1318 { 1319 $average_rates = array();1320 1321 1319 $query = ' 1322 1320 SELECT element_id, … … 1330 1328 1331 1329 $result = pwg_query($query); 1330 1331 $datas = array(); 1332 1332 1333 while ($row = mysql_fetch_array($result)) 1333 {1334 array_push($average_rates, $row);1335 }1336 1337 $datas = array();1338 foreach ($average_rates as $item)1339 1334 { 1340 1335 array_push( 1341 1336 $datas, 1342 1337 array( 1343 'id' => $ item['element_id'],1344 'average_rate' => $ item['average_rate']1338 'id' => $row['element_id'], 1339 'average_rate' => $row['average_rate'] 1345 1340 ) 1346 1341 ); 1347 1342 } 1348 $fields = array('primary' => array('id'), 'update' => array('average_rate')); 1349 mass_updates(IMAGES_TABLE, $fields, $datas); 1343 1344 mass_updates( 1345 IMAGES_TABLE, 1346 array( 1347 'primary' => array('id'), 1348 'update' => array('average_rate') 1349 ), 1350 $datas 1351 ); 1350 1352 1351 1353 $query=' -
trunk/admin/user_list.php
r1004 r1048 592 592 $blockname = 'template_option'; 593 593 594 foreach (get_ themes() as $pwg_template)594 foreach (get_pwg_themes() as $pwg_template) 595 595 { 596 596 if (isset($_POST['pref_submit'])) -
trunk/include/functions.inc.php
r1035 r1048 547 547 548 548 /** 549 * returns available templates/themes 550 */ 551 function get_templates() 552 { 553 return get_dirs(PHPWG_ROOT_PATH.'theme'); 554 } 555 function get_themes() 549 * returns available template/theme 550 */ 551 function get_pwg_themes() 556 552 { 557 553 $themes = array(); 558 554 559 foreach (get_dirs(PHPWG_ROOT_PATH.'template') as $template) 560 { 561 foreach (get_dirs(PHPWG_ROOT_PATH.'template/'.$template.'/theme') as $theme) 555 $template_dir = PHPWG_ROOT_PATH.'template'; 556 557 foreach (get_dirs($template_dir) as $template) 558 { 559 foreach (get_dirs($template_dir.'/'.$template.'/theme') as $theme) 562 560 { 563 561 array_push($themes, $template.'/'.$theme);
Note: See TracChangeset
for help on using the changeset viewer.