<?php require "www2-funcs.php"; login_init(); bbs_session_modify_user_mode(BBS_MODE_GMENU); toolbox_header("好友名单"); assert_login(); if (isset($_GET["start"])) { $start = $_GET["start"]; settype($start, "integer"); } else { $start = 0; } $total = bbs_countfriends($currentuser["userid"]); if ($total < 0) { html_error_quit("系统错误"); } if ($total != 0) { if ($start >= $total) { $start = $total - 20; if ($start < 0) { $start = 0; } } else { if ($start < 0) { $start = $total - 20; if ($start < 0) { $start = 0; } } }
public function getFriendNum() { if (is_null($this->_friendNum)) { $this->_friendNum = bbs_countfriends($this->userid); } return $this->_friendNum; }