本文整理汇总了PHP中jsg_member_info函数的典型用法代码示例。如果您正苦于以下问题:PHP jsg_member_info函数的具体用法?PHP jsg_member_info怎么用?PHP jsg_member_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了jsg_member_info函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ShowReminded
function ShowReminded()
{
if ((int) $this->Config['ajax_topic_time'] < 1) {
exit;
}
$uid = max(0, (int) $this->Post['uid']);
if ($uid < 1) {
exit;
}
$fcode = jpost('fcode');
$all_topic_notice = 'topicnew' == $fcode;
$__my = jsg_member_info($uid);
if (!$__my) {
exit;
}
$time = TIMESTAMP;
$is_uptime = $this->Post['is_uptime'];
if ($is_uptime == 1) {
DB::query("update `" . TABLE_PREFIX . "members` set `lastactivity`='{$time}' where `uid`='{$uid}'");
cache_db('rm', "{$uid}-topic-%", 1);
echo '<success></success>';
echo "<script language='Javascript'>";
echo "listTopic(0,0);";
echo "</script>";
exit;
}
$total_record = jlogic('buddy')->check_new_topic($uid, 0, 0, $all_topic_notice);
jsg_setcookie('topnotice', 'block');
include template('ajax_reminded');
}
示例2: add
function add($tag, $uid = MEMBER_ID)
{
$tag = jfilter($tag, 'txt');
$uid = jfilter($uid, 'int');
$info = $this->info($tag, $uid);
if ($info) {
return $info;
}
if ($uid < 1) {
return jerror('请指定一个正确的UID');
}
$uinfo = jsg_member_info($uid);
if (!$uinfo) {
return jerror('指定的UID已经不存在了');
}
if (!$tag) {
return jerror('请指定一个正确的话题');
}
$tinfo = jtable('tag')->info(array('name' => $tag));
if (!$tinfo) {
return jerror('指定的话题已经不存在了');
}
$data = array('tag' => $tag, 'uid' => $uid, 'dateline' => TIMESTAMP);
$id = $this->db->insert($data, 1, 1, 1);
if ($id > 0) {
$this->_rm_my_cache($uid);
jtable('members')->update_count($uid, 'tag_favorite_count', '+1');
jtable('tag')->update_count(array('name' => $tag), 'tag_count', '+1');
$info = $this->info($tag, $uid);
}
return $info;
}
示例3: Main
function Main()
{
$uid = MEMBER_ID;
if ($uid < 1) {
$this->Messager("请先<a href='index.php?mod=login'>点此登录</a>或者<a href='index.php?mod=member'>点此注册</a>一个帐号", 'index.php?mod=login');
}
$member = jsg_member_info($uid);
$sql = "select * from `" . TABLE_PREFIX . "blacklist` where `uid` = '" . MEMBER_ID . "' ";
$query = $this->DatabaseHandler->Query($sql);
$uids = array();
while (false != ($row = $query->GetRow())) {
$uids[$row['touid']] = $row['touid'];
}
if ($uids) {
$where = "where `uid` in (" . jimplode($uids) . ")";
$member_list = $this->_MemberList($where);
if ($uids && MEMBER_ID > 0) {
$sql = "select `uid`,`tid`,`content`,`dateline` from `" . TABLE_PREFIX . "topic` where `uid` in (" . jimplode($uids) . ") group by `uid` order by `dateline` desc";
$query = $this->DatabaseHandler->Query($sql);
$topic_list = array();
while (false != ($row = $query->GetRow())) {
$row['content'] = cut_str($row['content'], 100);
$row['dateline'] = my_date_format2($row['dateline']);
$topic_list[] = $row;
}
}
}
$group_list = jlogic('buddy_follow_group')->get_my_group(MEMBER_ID);
$this->Title = '黑名单';
include template('social/blacklist');
}
示例4: Modify
function Modify()
{
$member = jsg_member_info(MEMBER_ID);
$theme_id = $this->Member['theme_id'];
$theme_bg_image = $this->Member['theme_bg_image'];
$theme_bg_color = $this->Member['theme_bg_color'];
$theme_text_color = $this->Member['theme_text_color'];
$theme_link_color = $this->Member['theme_link_color'];
$theme_bg_image_type = $this->Member['theme_bg_image_type'];
$theme_bg_repeat = $this->Member['theme_bg_repeat'];
$theme_bg_fixed = $this->Member['theme_bg_fixed'];
$open_theme_list = jconf::get('theme');
$themelist = $open_theme_list['theme_list'];
$count = 0;
foreach ($themelist as $k => $v) {
$v['element'] = "{$v[theme_bg_color]},{$v[theme_text_color]},{$v[theme_link_color]},{$v[theme_id]},{$v[theme_bg_image_type]}";
$themelist[$k] = $v;
$count = $count + 1;
}
$prepage = 8;
$page_count = ceil($count / $prepage);
$page = 1;
if ($count > $perpage) {
$multi .= '<a href=\'javascript:;\' onclick=\'pre("pre");\'>上一页</a>';
$multi .= ' <a href=\'javascript:;\' onclick=\'pre("next");\'>下一页</a>';
}
$my_bg_image = RELATIVE_ROOT_PATH . 'images/theme/' . face_path(MEMBER_ID) . MEMBER_ID . '_o.jpg';
if (is_file($my_bg_image)) {
$my_bg_image = $this->Config['site_url'] . "/" . $my_bg_image;
} else {
$my_bg_image = '';
}
$this->Title = "个人模板设置";
include template('topic_theme');
}
示例5: ModuleObject
function ModuleObject($config)
{
$this->MasterObject($config);
$qun_setting = $this->Config['qun_setting'];
if (MEMBER_ROLE_TYPE != 'admin') {
if (!$qun_setting['qun_open']) {
$this->Messager('站点暂时不开放' . $this->Config[changeword][weiqun] . '功能', 'index.php');
}
}
$this->TopicLogic = jlogic('topic');
$this->my = array();
if (MEMBER_ID < 1 && $this->Code) {
$this->Messager("请先<a href='index.php?mod=login'>点此登录</a>或者<a href='index.php?mod=member'>点此注册</a>一个帐号", 'index.php?mod=login');
}
$this->my = jsg_member_info(MEMBER_ID);
$this->ShowConfig = jconf::get('show');
Load::logic('qun');
$this->QunLogic = new QunLogic();
ob_start();
$code = $this->Code;
if (!empty($this->Get['qid']) && empty($code)) {
$code = 'view';
$this->Code = $code;
}
if (method_exists('ModuleObject', $code)) {
$this->{$code}();
} else {
$this->Code = 'index';
$this->index();
}
$body = ob_get_clean();
$this->ShowBody($body);
}
示例6: get_at_my_topic
public function get_at_my_topic($p)
{
$rets = array();
$uid = isset($p['uid']) ? (int) $p['uid'] : MEMBER_ID;
$member = jsg_member_info($uid);
if ($member) {
if ($member['at_new'] > 0) {
jlogic('member')->clean_new_remind('at_new', $member['uid']);
}
$rets = $this->get_at_my_tid($p, 1);
if ($rets && is_array($rets)) {
if (!$rets['error']) {
$rets['member'] = $member;
$rets['list'] = $rets['count'] > 0 && $rets['ids'] ? jlogic('topic')->Get($rets['ids']) : array();
if ($rets['list']) {
if ($GLOBALS['_J']['config']['is_topic_user_follow'] && !$GLOBALS['_J']['disable_user_follow']) {
if (true === IN_JISHIGOU_WAP) {
$rets['list'] = buddy_follow_html($rets['list'], 'uid', 'wap_follow_html');
} else {
$rets['list'] = jlogic('buddy')->follow_html2($rets['list']);
}
}
$rets['parent_list'] = jlogic('topic')->get_parent_list($rets['list']);
}
if (true === IN_JISHIGOU_WAP) {
$rets = wap_iconv($rets);
}
}
}
} else {
return jerror('您无权查看该信息,请先登录', -1);
}
return $rets;
}
示例7: reminded
function reminded()
{
$my = jsg_member_info(MEMBER_ID);
if (!$my) {
Mobile::error("No User", 300);
}
$ret = array('at_count' => $my['at_new'], 'comment_count' => $my['comment_new'], 'pm_count' => $my['newpm'], 'total' => (string) ($my['at_new'] + $my['comment_new'] + $my['newpm']));
Mobile::output($ret);
}
示例8: new_tc
public function new_tc($p)
{
$member = jsg_member_info(MEMBER_ID);
$province_id = max(0, (int) $p['province_id']);
$city_id = max(0, (int) $p['city_id']);
$area_id = max(0, (int) $p['area_id']);
if ($province_id < 1) {
if ($province = $member['province']) {
$province_id = jlogic('common_district')->get_id_by_name($province);
if ($province_id > 0 && ($city = $member['city'])) {
$city_id = jlogic('common_district')->get_id_by_name($city);
if ($city_id > 0) {
$area = $member['area'];
}
}
}
} else {
$province = jlogic('common_district')->get_name_by_id($province_id);
if ($province && $city_id > 0) {
$city = jlogic('common_district')->get_name_by_id($city_id);
if ($city && $area_id > 0) {
$area = jlogic('common_district')->get_name_by_id($area_id);
}
}
}
$ps = array('cache_time' => max(0, (int) $p['cache_time']), 'cache_key' => 'topic-new_tc-' . "{$province}-{$city}-{$area}", 'page_url' => $p['page_url'], 'province' => $province, 'city' => $city, 'area' => $area, 'type' => get_topic_type(), 'vip' => $GLOBALS['_J']['config']['only_show_vip_topic']);
if (isset($p['perpage'])) {
$ps['perpage'] = (int) $p['perpage'];
if ($ps['perpage'] < 1) {
$ps['perpage'] = 20;
}
}
$rets = jlogic('topic_list')->get_tc_data($ps);
if (is_array($rets)) {
$rets['province'] = $province;
$rets['city'] = $city;
$rets['area'] = $area;
$rets['province_id'] = $province_id;
$rets['city_id'] = $city_id;
$rets['area_id'] = $area_id;
if ($member) {
$rets['member'] = $member;
}
if ($rets['list']) {
$rets['parent_list'] = jlogic('topic')->get_parent_list($rets['list']);
$rets['relate_list'] = jlogic('topic')->get_relate_list($rets['list']);
if ($GLOBALS['_J']['plugins']['func']['printtopic']) {
foreach ($rets['list'] as $row) {
jlogic('plugin')->hookscript('printtopic', 'funcs', $row, 'printtopic');
}
}
}
}
return $rets;
}
示例9: get
function get($p = array())
{
$uid = (int) $p['uid'];
$uid = $uid > 0 ? $uid : MEMBER_ID;
if ($uid < 1) {
return jerror('获取用户粉丝列表数据时,UID不能为空或您没有登录系统', -1);
}
$member = jsg_member_info($uid);
if (empty($member)) {
return jerror('您要查看的用户已经不存在了,UID错误', -2);
}
$count = (int) $member['fans_count'];
if ($count < 1) {
return array();
}
$page_num = 10;
if (isset($p['page_num'])) {
$page_num = (int) $p['page_num'];
if ($page_num < 1 || $page_num > 100) {
return jerror('请设置每页显示的数量在 1 ~ 100 之间', -3);
}
}
$ps = array('result_count' => $count, 'page_num' => $page_num, 'page_url' => $p['page_url'], 'sql_field' => ' M.* ', 'sql_table' => ' `' . DB::table($this->db->table_name($uid)) . '` AS BF LEFT JOIN `' . DB::table('members') . '` AS M ON M.`uid`=BF.`touid` ', 'sql_where' => " BF.`uid`='{$uid}' AND M.`uid` IS NOT NULL ", 'sql_order' => ' BF.`dateline` DESC ', 'result_list_row_make_func' => 'jsg_member_make', 'result_list_make_func' => 'buddy_follow_html');
if (true === IN_JISHIGOU_WAP) {
unset($ps['result_list_make_func']);
}
if (jallow($uid)) {
if ($member['fans_new'] > 0) {
jlogic('member')->clean_new_remind('fans_new', $uid);
}
if ($p['nickname']) {
$nickname = jfilter($p['nickname'], 'txt');
if (strlen($nickname) < 3 || strlen($nickname) > 15) {
return jerror('搜索用户昵称时,字数请控制在 3 ~ 15 个字符之间', -4);
}
unset($ps['result_count']);
$ps['cache_time'] = 600;
$ps['sql_where'] .= ' AND ' . build_like_query(' M.`nickname` ', $nickname);
}
if ($p['order'] && in_array($p['order'], array('lastpost', 'fans_count'))) {
$p['sql_order'] = ' M.`' . $p['order'] . '` DESC ';
}
}
$rets = $this->db->get($ps);
if (is_array($rets)) {
$rets['member'] = $member;
}
if (true === IN_JISHIGOU_WAP) {
if ($rets['list']) {
$rets['list'] = buddy_follow_html($rets['list'], 'uid', 'wap_follow_html');
}
$rets = wap_iconv($rets);
}
return $rets;
}
示例10: get_goods_list
public function get_goods_list($exp = '', $order = "`order` desc,id desc", $limit = 12)
{
if ('all' == $exp) {
return jtable("mall_goods")->get(array("sql_where" => 'expire > ' . TIMESTAMP, "sql_order" => $order, "page_num" => $limit));
} elseif ('exp' == $exp) {
$member = jsg_member_info(MEMBER_ID);
$config = jconf::get('mall');
$sql_where = "expire > " . TIMESTAMP . " AND credit <= " . $member['credits'] . " AND price <= " . $member[$config['credits']];
return jtable("mall_goods")->get(array("sql_where" => $sql_where, "sql_order" => $order, "page_num" => $limit));
} else {
return jtable("mall_goods")->get(array("sql_order" => "id desc", "page_num" => $limit));
}
}
示例11: show_user
function show_user($member = array())
{
if (MEMBER_ID < 0) {
$this->other_login();
return FALSE;
}
if (empty($member)) {
$uid = MEMBER_ID;
$member = jsg_member_info($uid);
}
include template('login/login_index_other');
exit;
}
示例12: get_my_tag_topic
public function get_my_tag_topic($p)
{
$uid = isset($p['uid']) ? (int) $p['uid'] : MEMBER_ID;
if (jdisallow($uid)) {
return jerror('您无权查看');
}
$member = jsg_member_info($uid);
if ($member['topic_new']) {
jlogic('member')->clean_new_remind('topic_new', $uid);
}
$rets = $this->get_my_tag_tid($p, 1);
if (is_array($rets)) {
$rets['member'] = $member;
}
return jlogic('topic')->get_by_ids($rets);
}
示例13: main
function main()
{
$option = array();
$option['page_url'] = 'admin.php?mod=reward';
$id = (int) get_param('id');
if ($id) {
$option['id'] = $id;
$option['page_url'] .= "&id={$id}";
} else {
unset($id);
}
$title = trim(get_param('title'));
if (isset($title)) {
$option['title'] = $title;
$option['page_url'] .= "&title={$title}";
}
$timefrom = get_param('timefrom');
$fromt = strtotime($timefrom);
if ($fromt) {
$option['fromt'] = $fromt;
$option['page_url'] .= "&timefrom={$timefrom}";
}
$timeto = get_param('timeto');
$tot = strtotime($timeto);
if ($tot) {
$option['tot'] = $tot;
$option['page_url'] .= "&timeto={$timeto}";
}
$nickname1 = trim(get_param('nickname'));
$uid = DB::result_first(" select `uid` from `" . TABLE_PREFIX . "members` where `nickname` = '{$nickname1}'");
if ($uid > 0) {
$option['uid'] = $uid;
$option['page_url'] .= "&nickname={$nickname1}";
$nickname = $nickname1;
}
$option['page'] = true;
$option['per_page_num'] = min(500, max((int) $_GET['per_page_num'], (int) $_GET['pn'], 20));
$option['_config'] = array('return' => 'array');
$option['page_set'] = '20 30 40 50 100 200';
extract(jlogic('reward')->getRewardList($option));
$count = $count ? $count : 0;
$member = jsg_member_info(MEMBER_ID);
$this->Title = '有奖转发';
include template('admin/reward_mian');
}
示例14: qun_announcement_index
function qun_announcement_index()
{
$this->Title = $this->Config['changeword']['weiqun'] . '公告';
$qid = jget('qid', 'int');
$id = jget('id', 'int');
if ($id < 1) {
$id = jget('ids', 'int');
if ($id < 1) {
$id = jget('code', 'int');
}
}
if ($id > 0) {
$qun_announcement_info = jtable('qun_announcement')->info($id);
$author_member = jsg_member_info($qun_announcement_info['author_id']);
$this->Title .= ' - ' . cutstr(trim(strip_tags($qun_announcement_info['message'])), 30);
}
include template('qun/qun_announcement_index');
}
示例15: goodsinfo
function goodsinfo()
{
$id = jget('id');
$info = jlogic('mall')->get_info($id);
if ($info) {
$config = jconf::get('mall');
$member = jsg_member_info(MEMBER_ID);
if ($info['expire'] < TIMESTAMP) {
$info['exp'] = '商品已过期';
} elseif ($info['price'] > $member[$config['credits']]) {
$info['exp'] = '您的' . $config['credits_name'] . '不够';
} elseif ($info['credit'] > $member['credits']) {
$info['exp'] = '您的总积分不够';
} else {
$info['exp'] = '';
}
$info['expire'] = my_date_format($info['expire']);
$info['desc'] = nl2br($info['desc']);
$this->Title = '商品详情 —— ' . $info['name'];
$this->MetaKeywords = '积分兑换,商品详情';
$this->MetaDescription = $info['name'];
$top_credit_members = jlogic('mall')->get_top_member_credits();
$feeds = jlogic('feed')->get_feed(5, "`action`='兑换了'");
$css['mall'] = ' class="current"';
$this->item = 'mall';
$this->item_id = $id;
$h_key = 'mall';
$gets = array('mod' => 'mall', 'code' => 'goodsinfo', 'id' => $id);
$page_url = 'index.php?' . url_implode($gets);
$tids = jlogic('mall')->get_topic_by_goodsid($id);
$options = array('tid' => $tids, 'perpage' => 5, 'page_url' => $page_url);
$topic_info = jlogic('topic_list')->get_data($options);
$topic_list = array();
if (!empty($topic_info)) {
$topic_list = $topic_info['list'];
$page_arr['html'] = $topic_info['page']['html'];
}
$albums = jlogic('image')->getalbum();
include template('mall_info');
} else {
header('Location: ' . jurl('index.php?mod=mall'));
}
}