count_by_credits($mycredits); } else { $now_pos = C::t('common_member_count')->count_by_extcredits($now_choose, $mycredits); } $now_pos++; dsetcookie($cookie_name, $now_pos); } } else { $now_pos = -1; } $view = $_GET['view']; $orderby = $_GET['orderby']; $list = getranklistdata($type, $view, $orderby); } elseif ($_GET['view'] == 'friendnum') { $gettype = 'friend'; if($_G['uid']) { $space = $_G['member']; space_merge($space, 'count'); $cookie_name = 'space_top_'.$_GET['view'].'_'.$_G['uid']; if($_G['cookie'][$cookie_name]) { $now_pos = $_G['cookie'][$cookie_name]; } else { $now_pos = C::t('common_member_count')->count_by_friends($space['friends']); $now_pos++; dsetcookie($cookie_name, $now_pos); } } else { $now_pos = -1; } $view = $_GET['view']; $orderby = $_GET['orderby']; $list = getranklistdata($type, $view, $orderby); } elseif ($_GET['view'] == 'invite') { $gettype = 'invite'; $now_pos = -1; $inviterank_change = 1; $now_choose = 'thisweek'; switch($_GET['orderby']) { case 'thismonth': $now_choose = 'thismonth'; break; case 'today': $now_choose = 'today'; break; case 'thisweek': $now_choose = 'thisweek'; break; default : $now_choose = 'all'; } $view = $_GET['view']; $orderby = $_GET['orderby']; $list = getranklistdata($type, $view, $orderby); } elseif($_GET['view'] == 'blog') { $gettype = 'blog'; $now_pos = -1; $view = $_GET['view']; $orderby = $_GET['orderby']; $list = getranklistdata($type, $view, $orderby); } elseif($_GET['view'] == 'beauty') { $gettype = 'girl'; $now_pos = -1; $view = $_GET['view']; $orderby = $_GET['orderby']; $list = getranklistdata($type, $view, $orderby); } elseif($_GET['view'] == 'handsome') { $gettype = 'boy'; $now_pos = -1; $view = $_GET['view']; $orderby = $_GET['orderby']; $list = getranklistdata($type, $view, $orderby); } elseif($_GET['view'] == 'post') { $gettype = 'post'; $postsrank_change = 1; $now_pos = -1; $now_choose = 'posts'; switch($_GET['orderby']) { case 'digestposts': $now_choose = 'digestposts'; break; case 'thismonth': $now_choose = 'thismonth'; break; case 'today': $now_choose = 'today'; break; } $view = $_GET['view']; $orderby = $_GET['orderby']; $list = getranklistdata($type, $view, $orderby); } elseif($_GET['view'] == 'onlinetime') { $gettype = 'onlinetime'; $onlinetimerank_change = 1; $now_pos = -1; $now_choose = 'thismonth'; switch($_GET['orderby']) { case 'thismonth': $now_choose = 'thismonth'; break; case 'all': $now_choose = 'all'; break; default : $_GET['orderby'] = 'thismonth'; } $view = $_GET['view']; $orderby = $_GET['orderby']; $list = getranklistdata($type, $view, $orderby); } else { $gettype = 'bid'; $cachetip = FALSE; $_GET['view'] = 'show'; $creditid = 0; if($_G['setting']['creditstransextra'][6]) { $creditid = intval($_G['setting']['creditstransextra'][6]); $creditkey = 'extcredits'.$creditid; } elseif ($_G['setting']['creditstrans']) { $creditid = intval($_G['setting']['creditstrans']); $creditkey = 'extcredits'.$creditid; } $extcredits = $_G['setting']['extcredits']; $count = C::t('home_show')->count_by_credit(); $space = array(); if($count) { $space = $_G['member']; space_merge($space, 'count'); $space['credit'] = empty($creditkey) ? 0 : $space[$creditkey]; $myshowinfo = C::t('home_show')->fetch_by_uid_credit($space['uid']); //DB::fetch_first("SELECT unitprice, credit FROM ".DB::table('home_show')." WHERE uid='$space[uid]' AND credit>0"); $myallcredit = intval($myshowinfo['credit']); $space['unitprice'] = intval($myshowinfo['unitprice']); $now_pos = C::t('home_show')->count_by_credit($space['unitprice']);//DB::result_first("SELECT COUNT(*) FROM ".DB::table('home_show')." WHERE unitprice>='$space[unitprice]' AND credit>0"); $deluser = false; $query = C::t('home_show')->fetch_all_by_unitprice($start, $perpage); foreach ($query as $value) { if(!$deluser && $value['show_credit'] < 1) { $deluser = true; } else { $list[$value['uid']] = $value; } } if($deluser) { C::t('home_show')->delete_by_credit(1); } $multi = multi($count, $perpage, $page, "misc.php?mod=ranklist&type=member&view=$_GET[view]"); } } if($cachetip) { $lastupdate = $_G['lastupdate']; $nextupdate = $_G['nextupdate']; } $myfuids =array(); $query = C::t('home_friend')->fetch_all($_G['uid']); foreach($query as $value) { $myfuids[$value['fuid']] = $value['fuid']; } $myfuids[$_G['uid']] = $_G['uid']; $i = $_GET['page'] ? ($_GET['page']-1)*$perpage+1 : 1; foreach($list as $key => $value) { $fuids[] = $value['uid']; if(isset($value['lastactivity'])) $value['lastactivity'] = dgmdate($value['lastactivity'], 't'); $value['isfriend'] = empty($myfuids[$value['uid']])?0:1; $list[$key] = $value; $list[$key]['rank'] = $i; $i++; } $ols = array(); if($fuids) { foreach(C::app()->session->fetch_all_by_uid($fuids) as $value) { if(!$value['invisible']) { $ols[$value['uid']] = $value['lastactivity']; } elseif ($_GET['view'] == 'online' && $list[$value['uid']]) { unset($list[$value['uid']]); } } } $a_actives = array($_GET['view'] => ' class="a"'); $navname = $_G['setting']['navs'][8]['navname']; $navtitle = lang('ranklist/navtitle', 'ranklist_title_member_'.$gettype).' - '.$navname; $metakeywords = lang('ranklist/navtitle', 'ranklist_title_member_'.$gettype); $metadescription = lang('ranklist/navtitle', 'ranklist_title_member_'.$gettype); include template('diy:ranklist/member'); ?>