• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_sess_userid函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_sess_userid函数的典型用法代码示例。如果您正苦于以下问题:PHP get_sess_userid函数的具体用法?PHP get_sess_userid怎么用?PHP get_sess_userid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_sess_userid函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: inbox_read_base

function inbox_read_base($fields = "*", $condition = "", $get_type = "", $num = "", $by_col = "mess_id", $order = "desc", $cache = "", $cache_key = "")
{
    global $tablePreStr;
    global $page_num;
    global $page_total;
    $uid = get_sess_userid();
    $t_scrip = $tablePreStr . "msg_inbox";
    $result_rs = array();
    $dbo = new dbex();
    dbplugin('r');
    $by_col = $by_col ? " {$by_col} " : " mess_id ";
    $order = $order ? $order : "desc";
    $get_type = $get_type == 'getRow' ? "getRow" : "getRs";
    $sql = " select {$fields} from {$t_scrip} where user_id = {$uid} and mesinit_id!='' {$condition} order by {$by_col} {$order} ";
    if ($cache == 1 && $cache_key != '') {
        $key = 'inbox_' . $cache_key . $uid . '_' . $num;
        $key_mt = 'inbox_' . $cache_key . 'mt_' . $uid . '_' . $num;
        $result_rs = model_cache($key, $key_mt, $dbo, $sql, $get_type);
    }
    if (empty($result_rs)) {
        $dbo->setPages(20, $page_num);
        $result_rs = $dbo->{$get_type}($sql);
        $page_total = $dbo->totalPage;
    }
    return $result_rs;
}
开发者ID:omusico,项目名称:Social,代码行数:26,代码来源:scrip_inbox.php


示例2: plugins_set_mine

function plugins_set_mine($id, $is_del = 0)
{
    $id = intval($id);
    $is_del = intval($is_del);
    $val = '';
    $uid = get_sess_userid();
    global $tablePreStr;
    $t_users = $tablePreStr . "users";
    $t_plugins = $tablePreStr . "plugins";
    $result_rs = array();
    $dbo = new dbex();
    dbplugin('r');
    $u_apps = get_sess_apps();
    if ($is_del == 0) {
        if ($u_apps == '') {
            $val = $id;
        } else {
            $val = $u_apps . "," . $id;
        }
    } else {
        $val = str_replace(",{$id},", "", ",{$u_apps},");
    }
    $sql = " update {$t_users} set use_apps = '{$val}' where user_id = {$uid} ";
    if ($dbo->exeUpdate($sql)) {
        set_sess_apps($val);
        if ($is_del == 0) {
            $sql = " update {$t_plugins} set use_num=use_num+1 where id={$id} ";
        } else {
            $sql = " update {$t_plugins} set use_num=use_num-1 where id={$id} ";
        }
        return $dbo->exeUpdate($sql);
    } else {
        return 0;
    }
}
开发者ID:omusico,项目名称:Social,代码行数:35,代码来源:plugins_set.php


示例3: scrip_send

function scrip_send($sender, $title, $content, $to_id, $scrip_id = '')
{
    global $tablePreStr;
    $uid = get_sess_userid();
    $uico = get_sess_userico();
    $t_scrip = $tablePreStr . "msg_inbox";
    $dbo = new dbex();
    dbplugin('w');
    $sql = "insert into {$t_scrip} (mess_title,mess_content,from_user,from_user_ico,user_id,add_time,from_user_id,mesinit_id)" . "value('{$title}','{$content}','{$sender}','{$uico}',{$to_id},NOW(),{$uid},'{$scrip_id}')";
    return $dbo->exeUpdate($sql);
}
开发者ID:omusico,项目名称:Social,代码行数:11,代码来源:scrip_send.php


示例4: code_exists

function code_exists()
{
    $is_admin = '';
    $sendor_id = '';
    $admin_id = get_session('admin_id');
    if ($admin_id) {
        $is_admin = 1;
        $sendor_id = $admin_id;
    } else {
        $user_id = get_sess_userid();
        if (!$user_id) {
            return false;
            exit;
        }
        $is_admin = 0;
        $sendor_id = $user_id;
    }
    if ($sendor_id != '' && $is_admin !== '') {
        global $inviteCodeValue;
        global $tablePreStr;
        global $inviteCodeLength;
        $t_invite_code = $tablePreStr . "invite_code";
        $t_users = $tablePreStr . "users";
        if ($is_admin == 0) {
            $user_info = api_proxy('user_self_by_uid', 'integral', $sendor_id);
            $intg = $user_info['integral'];
            if ($inviteCodeValue > $intg) {
                return false;
            }
        }
        $dbo = new dbex();
        dbplugin('r');
        $invite_code = randkeys($inviteCodeLength);
        $sql = "select id from {$t_invite_code} where code_txt='{$invite_code}'";
        $is_exists = $dbo->getRow($sql);
        if ($is_exists['id']) {
            code_exists();
        } else {
            $time = time();
            $sql = "insert into {$t_invite_code} (sendor_id,code_txt,is_admin,add_time) values({$sendor_id},'{$invite_code}',0,{$time})";
            $success = $dbo->exeUpdate($sql);
            if ($success) {
                if ($is_admin == 0) {
                    $sql = "update {$t_users} set integral=integral-{$inviteCodeValue} where user_id={$sendor_id}";
                    $dbo->exeUpdate($sql);
                }
                return $invite_code;
            } else {
                return false;
            }
        }
    }
}
开发者ID:omusico,项目名称:Social,代码行数:53,代码来源:produce_rand.php


示例5: message_get_remind_count

function message_get_remind_count($uid = '')
{
    $uid = intval($uid);
    $result_rs = array();
    $dbo = new dbex();
    dbplugin('r');
    $uid = $uid ? $uid : get_sess_userid();
    global $tablePreStr;
    $t_remind = $tablePreStr . "remind";
    $sql = "select count(*) from {$t_remind} where user_id={$uid} and is_focus=1";
    return $dbo->getRow($sql);
}
开发者ID:omusico,项目名称:Social,代码行数:12,代码来源:message_get.php


示例6: msgboard_self_by_uid

function msgboard_self_by_uid($fields = "*", $uid = "", $is_read = "", $num = "", $date = "")
{
    $uid = $uid ? $uid : get_sess_userid();
    $is_read = intval($is_read);
    $fields = filt_fields($fields);
    $condition = " to_user_id = {$uid} ";
    if ($date != '') {
        $condition .= str_replace("{date}", "add_time", date_filter($date));
    }
    if ($is_read != '') {
        $condition .= " and readed = {$is_read} ";
    }
    return msgboard_read_base($fields, $condition, "getRs", $num);
}
开发者ID:omusico,项目名称:Social,代码行数:14,代码来源:msgboard_self.php


示例7: pals_sort

function pals_sort($uid = '')
{
    $uid = intval($uid);
    if ($uid == 0) {
        $uid = get_sess_userid();
    }
    global $tablePreStr;
    $t_pals_sort = $tablePreStr . "pals_sort";
    $result_rs = array();
    $dbo = new dbex();
    dbplugin('r');
    $sql = " select * from {$t_pals_sort} where user_id={$uid} ";
    $result_rs = $dbo->getALL($sql);
    return $result_rs;
}
开发者ID:omusico,项目名称:Social,代码行数:15,代码来源:pals_sort.php


示例8: scrip_notice_get

function scrip_notice_get($fields = "*", $num = "", $condition = "")
{
    global $tablePreStr;
    global $page_num;
    global $page_total;
    $fields = filt_fields($fields);
    $uid = get_sess_userid();
    $t_scrip = $tablePreStr . "msg_inbox";
    $result_rs = array();
    $dbo = new dbex();
    dbplugin('r');
    $sql = " select {$fields} from {$t_scrip} where user_id = {$uid} and mesinit_id='' {$condition} order by mess_id desc ";
    $dbo->setPages(20, $page_num);
    $result_rs = $dbo->getRs($sql);
    $page_total = $dbo->totalPage;
    return $result_rs;
}
开发者ID:omusico,项目名称:Social,代码行数:17,代码来源:scrip_notice.php


示例9: check_pri

function check_pri($holder, $exp = '')
{
    $sess_uid = get_sess_userid();
    $is_admin = get_sess_admin();
    if ($sess_uid != $holder && !$is_admin) {
        if ($exp) {
            if (!$sess_uid) {
                return false;
            }
            if ($exp == '!all') {
                //全否定
                return false;
            }
            if (strpos(",{$exp}", "{")) {
                //限定人
                $per_str = preg_replace("/{([,\\d]+)}/", "\$1", $exp);
                if (strpos(",{$per_str}", ",{$sess_uid},")) {
                    return true;
                }
            }
            if (strpos(",{$exp}", "[")) {
                //限定组
                $sort_str = preg_replace("/\\[([,\\d]+)\\]/", "\$1", $exp);
                global $dbo;
                global $tablePreStr;
                global $dbServs;
                if (!$dbo) {
                    $dbo = new dbex();
                    dbplugin('r');
                }
                $table = $tablePreStr . "pals_mine";
                $sql = "select pals_sort_id from {$table} where pals_id={$sess_uid} and user_id={$holder}";
                $sort_id = $dbo->getRow($sql);
                $sess_sort_id = $sort_id['pals_sort_id'];
                if (strpos(",{$sort_str}", ",{$sess_sort_id},")) {
                    return true;
                }
            }
        } else {
            return true;
        }
    } else {
        return true;
    }
}
开发者ID:omusico,项目名称:Social,代码行数:45,代码来源:trans_pri.php


示例10: share_act

function share_act($dbo, $type_id, $for_content_id, $s_title = '', $tag = '', $link_href = '', $link_thumb = '', $re_m_link = '')
{
    $user_id = get_sess_userid();
    $user_name = get_sess_username();
    $userico = get_sess_userico();
    global $tablePreStr;
    $t_share = $tablePreStr . 'share';
    if ($for_content_id == 0) {
        $sql = "select max(s_id) as max_id from {$t_share}";
        $last_id = $dbo->getRow($sql);
        if ($last_id['max_id'] == NULL) {
            $for_content_id = 1;
        } else {
            $for_content_id = $last_id['max_id'] + 1;
        }
    }
    $sql = "insert into {$t_share} ( type_id,user_id,user_name,user_ico,add_time,for_content_id,s_title,out_link,movie_thumb,movie_link,`tag`) values " . "({$type_id},{$user_id},'{$user_name}','{$userico}',NOW(),{$for_content_id},'{$s_title}','{$link_href}','{$link_thumb}','{$re_m_link}','{$tag}')";
    $dbo->exeUpdate($sql);
    return mysql_insert_id();
}
开发者ID:omusico,项目名称:Social,代码行数:20,代码来源:module_share.php


示例11: update_online_time

function update_online_time($dbo, $table)
{
    $user_id = get_sess_userid();
    $now_time = time();
    $kick_time = 20;
    //设置超时时间
    if ($user_id) {
        $sql = "update {$table} set active_time='{$now_time}' where user_id={$user_id}";
        if (!$dbo->exeUpdate($sql)) {
            global $tablePreStr;
            $t_online = $tablePreStr . "online";
            $user_id = get_sess_userid();
            $user_name = get_sess_username();
            $user_ico = get_sess_userico();
            $user_sex = get_sess_usersex();
            $sql = "insert into {$t_online} (`user_id`,`user_name`,`user_sex`,`user_ico`,`active_time`,`hidden`) values ({$user_id},'{$user_name}','{$user_sex}','{$user_ico}','{$now_time}',0)";
            $dbo->exeUpdate($sql);
        }
    }
    $sql = "delete from {$table} where {$now_time}-active_time>{$kick_time}*60";
    $dbo->exeUpdate($sql);
}
开发者ID:omusico,项目名称:Social,代码行数:22,代码来源:module_remind.php


示例12: group_self_by_uid

function group_self_by_uid($fields = "*", $id = '', $get_type = '')
{
    global $tablePreStr;
    $id = intval($id) ? $id : get_sess_userid();
    $t_group_members = $tablePreStr . "group_members";
    $gid_array = array();
    $dbo = new dbex();
    dbplugin('r');
    $sql = "select group_id from {$t_group_members} where user_id='{$id}' and state>0";
    $gid_array = $dbo->getRs($sql);
    if ($gid_array) {
        $gid_str = '';
        foreach ($gid_array as $rs) {
            if ($gid_str != '') {
                $gid_str .= ',';
            }
            $gid_str .= $rs['group_id'];
        }
        $fields = filt_fields($fields);
        return group_self_by_gid($fields, $gid_str, $get_type);
    } else {
        return array();
    }
}
开发者ID:omusico,项目名称:Social,代码行数:24,代码来源:group_self.php


示例13: msglp

<?php

//引入模块公共权限过程文件
require "foundation/fpages_bar.php";
require "api/base_support.php";
//引入语言包
$m_langpackage = new msglp();
//变量获得
$user_id = get_sess_userid();
//当前页面参数
$page_num = trim(get_argg('page'));
$msg_inbox_rs = api_proxy("scrip_inbox_get_mine", "*");
$isNull = 0;
$content_data_none = "content_none";
$show_data = "";
if (empty($msg_inbox_rs)) {
    $isNull = 1;
    $show_data = "content_none";
    $content_data_none = "";
}
开发者ID:omusico,项目名称:Social,代码行数:20,代码来源:minbox.php


示例14: grouplp

<?php

//引入语言包
$g_langpackage = new grouplp();
$url_uid = intval(get_argg('user_id'));
$ses_uid = get_sess_userid();
//引入模块公共权限过程文件
$is_self_mode = 'partLimit';
$is_login_mode = '';
require "foundation/auser_validate.php";
require "foundation/module_users.php";
require "foundation/module_group.php";
require "api/base_support.php";
$group_rs = array();
//按钮控制
$button = 0;
$button_show = "content_none";
$button_hidden = "";
if ($is_self == 'Y') {
    $group_title = $g_langpackage->g_mine;
    $no_data = $g_langpackage->g_none_group;
    $button = 1;
    $button_show = "";
    $button_hidden = "content_none";
    $show_mine = "";
    $show_his = "content_none";
} else {
    $show_mine = "content_none";
    $show_his = "";
    $holder_name = get_hodler_name($url_uid);
    $group_title = str_replace("{holder}", $holder_name, $g_langpackage->g_his_group);
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:group_mine.php


示例15: publiclp

<?php

//引入语言包
$pu_langpackage = new publiclp();
//变量取得
$comment_content = get_argp("comment_content");
$comment_type = get_argp("comment_type");
//$user_id 	= get_session('user_id');
$commenter_id = get_sess_userid();
if (empty($commenter_id)) {
    header("location:error.php");
    exit;
}
$paper_id = get_argp("paper_id");
//数据表定义区
$t_comments = $tablePreStr . "comments";
$t_papers = $tablePreStr . "papers";
$current_time = date('y-m-d H:i:s', time());
$dbo = new dbex();
//增加评论数
//insert into isns_papers (user_id, content, picture, create_time) value (1, '纸条内容', '纸条路径', '2015-08-12 15:57:12');
dbplugin('r');
$get_comment_count_sql = "select {$t_papers}.comment_count,{$t_papers}.private_count from {$t_papers} where {$t_papers}.paper_id={$paper_id}";
$result_rs = $dbo->getRow($get_comment_count_sql);
$comment_count = $result_rs['comment_count'];
$private_count = $result_rs['private_count'];
if ($comment_type == 0) {
    $comment_count += 1;
} else {
    $private_count += 1;
}
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:comment_add.action.php


示例16: header

<?php

header("content-type:text/html;charset=utf-8");
if (!file_exists('docs/install.lock')) {
    header("location:install/index.php");
}
require "foundation/asession.php";
require "configuration.php";
require "includes.php";
require "foundation/module_users.php";
require "foundation/fcontent_format.php";
require "foundation/fplugin.php";
require "api/base_support.php";
//语言包引入
$pu_langpackage = new publiclp();
if (get_sess_userid()) {
    echo '<script type="text/javascript">location.href="main.php";</script>';
}
$tg = get_argg('tg');
if ($tg == 'invite') {
    $index_ref = "modules/invite.php";
} elseif ($tg == 'search_pals_list') {
    $index_ref = "modules/mypals/search_pals_list.php";
} else {
    $index_ref = "modules/default.php";
}
//数据表定义区
$t_plugins = $tablePreStr . "plugins";
$rec_rs = array();
$rec_rs0 = array();
$rec_rs1 = array();
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:index.php


示例17: gobacklp

<?php

//$lim_message='';//可重定义限制访问返回消息
//$lim_rdurl='';//可重定义跳转url
//引入语言包
$ref_langpackage = new gobacklp();
$lim_mess = '';
$lim_message = '';
if ($lim_message != '') {
    $lim_mess = $lim_message;
} else {
    $lim_mess = $ref_langpackage->ref_see_popedom;
}
if ($is_login_mode == 'accessLimit') {
    if (!get_sess_userid()) {
        if ($lim_rdurl == "login") {
            echo '<script language=javascript>alert("' . $ref_langpackage->ref_no_land . '");top.location="do.php?act=logout";</script>';
        } else {
            if ($lim_rdurl != "") {
                echo '<script language=javascript>top.location="' . $lim_rdurl . '";</script>';
            }
        }
    }
}
$is_self = '';
$userid = '';
if ($is_self_mode == 'partLimit') {
    if ($url_uid == '' && $ses_uid != '' || $url_uid != '' && $url_uid == $ses_uid) {
        $userid = $ses_uid;
        $is_self = 'Y';
    } else {
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:auser_validate.php


示例18: grouplp

 * 如果您开启了debug模式运行,那么您可以省去上面这一步,但是debug模式每次都会判断程序是否更新,debug模式只适合开发调试。
 * 如果您正式运行此程序时,请切换到service模式运行!
 *
 * 如有您有问题请到官方论坛(http://tech.jooyea.com/bbs/)提问,谢谢您的支持。
 */
//引入公共模块
require "foundation/fpages_bar.php";
require "foundation/module_group.php";
require "api/base_support.php";
//引入语言包
$g_langpackage = new grouplp();
$mn_langpackage = new menulp();
//变量区
$url_group_id = intval(get_argg('group_id'));
$subject_id = intval(get_argg('subject_id'));
$visitor_id = get_sess_userid();
$visitor_name = get_sess_username();
$user_id = get_argg('user_id');
$role = '';
//数据表定义
$t_blog = $tablePreStr . "blog";
//权限判断
if ($visitor_id != '') {
    $role = api_proxy("group_member_by_role", $url_group_id, $user_id);
    $role = $role[0];
}
$g_join_type = api_proxy("group_self_by_gid", "*", $url_group_id);
$join_type = $g_join_type['group_join_type'];
//控制评论
$isNull = 0;
$show_com = '';
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:group_sub_show.php


示例19: msgboardlp

<?php

require "foundation/aintegral.php";
require "api/Check_MC.php";
//引入语言包
$mb_langpackage = new msgboardlp();
//变量取得
$to_user_id = intval(get_argg('user_id'));
$mess_id = intval(get_argg('mess_id'));
$from_user_id = get_sess_userid();
//数据表定义区
$t_message = $tablePreStr . "msgboard";
$dbo = new dbex();
//读写分离定义函数
dbtarget('w', $dbServs);
//评论相册
$sql = "delete from {$t_message} where mess_id={$mess_id} ";
if ($dbo->exeUpdate($sql)) {
    increase_integral($dbo, $int_del_com_msg, $to_user_id);
}
//回应信息
action_return(1, "", "-1");
开发者ID:omusico,项目名称:Social,代码行数:22,代码来源:msgboard_del.action.php


示例20: calc_all_distance

 function calc_all_distance($res)
 {
     $user_id = get_sess_userid();
     $user_lat = get_session("position_y");
     $user_long = get_session("position_x");
     $deal = false;
     $isNull = empty($user_lat) || empty($user_long);
     if (is_array($res)) {
         if (array_key_exists("user_id", $res)) {
             if ($res["user_id"] == $user_id) {
                 $res["distance_to_me"] = 0;
                 $deal = true;
             }
         }
         if (!$deal && array_key_exists("position_x", $res) && array_key_exists("position_y", $res)) {
             $x = $res["position_x"];
             $y = $res["position_y"];
             if ($isNull || empty($x) || empty($y)) {
                 $res["distance_to_me"] = rand(1000, 100000);
                 $deal = true;
             } else {
                 $res["distance_to_me"] = calc_distance($y, $x, $user_lat, $user_long);
                 $deal = true;
             }
         }
         if (!$deal) {
             foreach ($res as $key => $value) {
                 $isSameUser = false;
                 if (array_key_exists("user_id", $value)) {
                     if ($value["user_id"] == $user_id) {
                         $res[$key]["distance_to_me"] = 0;
                         $isSameUser = true;
                     }
                 }
                 if (!$isSameUser && array_key_exists("position_x", $value) && array_key_exists("position_y", $value)) {
                     $x = $value["position_x"];
                     $y = $value["position_y"];
                     if ($isNull || empty($x) || empty($y)) {
                         $res[$key]["distance_to_me"] = rand(1000, 100000);
                     } else {
                         $res[$key]["distance_to_me"] = calc_distance($y, $x, $user_id, $user_long);
                     }
                 }
             }
         }
     }
     return $res;
 }
开发者ID:omusico,项目名称:Social,代码行数:48,代码来源:base_support.php



注:本文中的get_sess_userid函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_sess_username函数代码示例发布时间:2022-05-15
下一篇:
PHP get_sess_userico函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap