Esempio n. 1
0
 $magdb = $newColony->getManager();
 foreach ($magdb as $key => $value) {
     if ($value['username'] == $colony['admin']) {
         unset($magdb[$key]);
         array_unshift($magdb, $value);
     }
 }
 $managerNum = count($magdb);
 $magdb = array_slice($magdb, 0, 9);
 $memdb = $newColony->getMembers(array('ifadmin' => '3'), 10, 0, 'addtime');
 if (count($memdb) > 9) {
     $memdbNum = 10;
     array_pop($memdb);
 }
 $newvisit = $newColony->getVisitor(9);
 $newvisitnum = $newColony->getVisitorNum();
 $likegroup = $newColony->getLikeGroup();
 $uids = array_merge($uids, array_keys($magdb), array_keys($memdb), array_keys($newvisit));
 if ($uids) {
     $userService = L::loadClass('UserService', 'user');
     /* @var $userService PW_UserService */
     foreach ($userService->getByUserIds($uids) as $rt) {
         list($rt['faceurl']) = showfacedesign($rt['icon'], 1, 's');
         $udb[$rt['uid']] = $rt;
     }
 }
 if ($lastposter) {
     $userService = L::loadClass('UserService', 'user');
     /* @var $userService PW_UserService */
     foreach ($userService->getByUserNames($lastposter) as $rt) {
         list($rt['faceurl']) = showfacedesign($rt['icon'], 1, 'm');