Changeset 21 for trunk/inc/friends/list.inc.php
- Timestamp:
- 08/12/05 20:59:53 (7 years ago)
- Files:
-
- 1 modified
-
trunk/inc/friends/list.inc.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/friends/list.inc.php
r15 r21 23 23 ******************** http://opensource.ikse.net/projects/dotnode ***/ 24 24 25 include_once(INCLUDESPATH.'/pager.inc.php'); 26 25 27 $_SMARTY['Title'] = 'Friends'; 26 28 … … 28 30 $user['photo'] = build_image_url($url_id); 29 31 30 foreach($user['info']['friends_id'] as $friend_id) 32 $pager =& Pager_dotnode::factory(null, array('totalItems' => $user['info']['nb_friends'], 'perPage' => 15)); 33 34 list($first_item, $last_item) = $pager->getOffsetByPageId(); 35 $limit_offset = $first_item-1; 36 $limit_length = $last_item-$limit_start; 37 38 $friends_range = array_slice($user['info']['friends_id'], $limit_offset, $limit_length); 39 foreach($friends_range as $dummy=>$friend_id) 31 40 $friends[$friend_id] = get_cache_user_info($friend_id); 32 41 33 /********** determination du chem ain *****************/42 /********** determination du chemin *****************/ 34 43 $user['path'] = array(); 35 44 … … 55 64 $user['relation_type'] = 'members'; 56 65 57 58 59 66 /************** menu ***************************/ 60 67 $leftmenu["/profile/$url_id"] = 'Profile'; … … 70 77 71 78 $_SMARTY['leftmenu'] = $leftmenu; 79 /************************************************/ 72 80 73 /************************************************/74 81 $_SMARTY['tr_attr'] = array("class='odd' style='vertical-align:top'", "class='even' style='vertical-align:top'"); 75 82 $_SMARTY['user'] = $user; 83 $_SMARTY['pager'] = $pager->getLinks(); 76 84 $_SMARTY['friends'] = $friends; 77 85 ?>
