本文整理汇总了PHP中get_sess_userid函数的典型用法代码示例。如果您正苦于以下问题:PHP get_sess_userid函数的具体用法?PHP get_sess_userid怎么用?PHP get_sess_userid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_sess_userid函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
}
示例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);
}
示例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;
}
}
}
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
}
示例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();
}
示例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);
}
示例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();
}
}
示例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 = "";
}
示例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);
示例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;
}