示例#1
0
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
0
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
0
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
0
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
0
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
0
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
0
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
0
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
0
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
0
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
0
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
0
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
0
文件: minbox.php 项目: omusico/Social
<?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
0
<?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
0
<?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;
}
示例#16
0
文件: index.php 项目: omusico/Social
<?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();
示例#17
0
<?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 {
示例#18
0
 * 如果您开启了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 = '';
示例#19
0
<?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");
示例#20
0
 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;
 }
示例#21
0
function pals_self_isset($holder_id, $pals_id = '')
{
    global $tablePreStr;
    $t_pals = $tablePreStr . "pals_mine";
    $result_rs = array();
    $pals_id = $pals_id ? $pals_id : get_sess_userid();
    if ($pals_id) {
        $dbo = new dbex();
        dbplugin('r');
        $sql = "select id from {$t_pals} where user_id={$holder_id} and pals_id={$pals_id}";
        $result_rs = $dbo->getRow($sql);
    } else {
        $result_rs = 0;
    }
    return $result_rs;
}
示例#22
0
function message_del_affair($rid)
{
    global $tablePreStr;
    $t_recent_affair = $tablePreStr . "recent_affair";
    $dbo = new dbex();
    dbplugin('w');
    $uid = get_sess_userid();
    $sql = "delete from {$t_recent_affair} where id={$rid} and user_id={$uid}";
    return $dbo->exeUpdate($sql);
}
示例#23
0
                    </ul>
                </dt>
                <dt><a href="main.php?app=mypals_search_list&online=1" hidefocus="true"><?php 
echo $mn_langpackage->mn_online;
?>
</a></dt>
                <dt><a href="main.php?app=msg_minbox" hidefocus="true"><?php 
echo $mn_langpackage->mn_scrip;
?>
</a></dt>
            </dl>
        </div>
        <div class="right_nav">
            <dl>
                <dt><a href="home.php?h=<?php 
echo get_sess_userid();
?>
" hidefocus="true"><?php 
echo filt_word(get_sess_username());
?>
</a></dt>
                <dt><a href="modules.php?app=mypals_invite" target="frame_content" hidefocus="true"><?php 
echo $mn_langpackage->mn_user_invite;
?>
</a></dt>
                <dt><a href="javascript:void(0);" hidefocus="true" onmouseout="setMenuShow(false);" onclick="setMenuShow(true);"><?php 
echo $mn_langpackage->mn_user_set;
?>
</a>
                    <div id="set_menu_bridge" style="width:58px;height:13px;display:none;" onmouseover="setMenuShow(true);" onmouseout="setMenuShow(false);">
                        <ul id="set_menu" onmouseover="setMenuShow(true);" onmouseout="setMenuShow(false);" class="set_menu" style="display:none;">
示例#24
0
<?php

//引入公共方法
$session_power = true;
require dirname(__FILE__) . "/../../api/base_support.php";
if (get_sess_userid()) {
    $group_users = api_proxy('pals_self_by_uid', "pals_id,pals_name,pals_ico,pals_sort_id,pals_sort_name", get_sess_userid());
    $data_str = 'var menu_pop_data=[';
    $group_length = count($group_users);
    if ($group_length) {
        $group_pointer = -1;
        for ($i = 0; $i < $group_length; $i++) {
            if ($group_pointer == -1 || $group_pointer != $group_users[$i]['pals_sort_id']) {
                $group_pointer = $group_users[$i]['pals_sort_id'];
                if ($data_str != 'var menu_pop_data=[') {
                    $data_str = substr($data_str, 0, -1);
                    $data_str .= ']],';
                }
                if ($group_users[$i]['pals_sort_id'] == 0) {
                    $data_str .= '["' . $group_users[$i]['pals_sort_id'] . '","默认分组",[';
                } else {
                    $data_str .= '["' . $group_users[$i]['pals_sort_id'] . '","' . $group_users[$i]['pals_sort_name'] . '",[';
                }
            }
            $data_str .= '["' . $group_users[$i]['pals_id'] . '","' . $group_users[$i]['pals_name'] . '","' . $group_users[$i]['pals_ico'] . '"],';
        }
        if ($data_str != 'var menu_pop_data=[') {
            $data_str = substr($data_str, 0, -1);
            $data_str .= ']]];';
        }
        echo $data_str;
示例#25
0
文件: start.php 项目: omusico/Social
}
parent.showDiv();
</script>
</head>
<body id="main_iframe">
<input type='hidden' id='affair_type' value=0 />
<input type='hidden' id='affair_start_num' value=0 />
<div class="mypanel">
    <div class="myphoto"><img src="<?php 
echo get_sess_userico();
?>
" /></div>
    <div class="myinfo">
        <span class="left">
            <a class="strong" href="<?php 
echo get_uhome_url(get_sess_userid());
?>
" target="_blank"><?php 
echo filt_word(get_sess_username());
?>
</a>
            <span id='on_line_state' class="mystatus" onmouseover='show_obj("set_state");' onmouseout='hidden_obj("set_state");'>
                <img id="ol_ioc_gif" src='skin/<?php 
echo $skinUrl;
?>
/images/online.gif'>
                <span id='ol_label_txt' style='color:#838383'></span>
                <span id='set_state' class='mystatus' onmouseover='show_obj("set_state");' onmouseout='hidden_obj("set_state");' style="display:none;"></span>
            </span>
        </span>
        <span class="stats"> <?php 
示例#26
0
    if ($img_ext == 'gif') {
        $temp_img = imagecreatefromgif($ico_url);
    }
    if ($img_ext == 'png') {
        $temp_img = imagecreatefrompng($ico_url);
    }
    $s_ico = str_replace('.' . $img_ext, '_small.' . $img_ext, $ico_url);
    $small_ico = imagecreatetruecolor(70, 70);
    imagecopyresampled($small_ico, $temp_img, 0, 0, 0, 0, 70, 70, 200, 200);
    imagejpeg($small_ico, $s_ico);
} else {
    $s_ico = $ico_url;
}
if (update_user_ico($dbo, $t_users, $user_ico, $u_field_id, $user_id, $s_ico)) {
    if (get_sess_userico() == "skin/{$skinUrl}/images/d_ico_0_small.gif" or get_sess_userico() == "skin/{$skinUrl}/images/d_ico_1_small.gif") {
        increase_integral($dbo, $int_one_ico, get_sess_userid());
    }
    //更新数据
    update_user_ico($dbo, $t_mypals, $pals_ico, $p_field_id, $user_id, $s_ico);
    update_user_ico($dbo, $t_pals_req, $req_ico, $q_field_id, $user_id, $s_ico);
    set_sess_userico($s_ico);
    if (preg_match("/uploadfiles\\/photo_store/", $photo_url)) {
        unlink($photo_url);
        //删除临时图片文件
    }
    //记录新鲜事
    $title = $u_langpackage->u_picture_update;
    $content = '<img class="photo_frame" onerror=parent.pic_error(this) src="' . $ico_url . '" align="top">';
    api_proxy("message_set", 0, $title, $content, 1, 7);
    action_return(1, "", 'modules.php?app=user_ico');
} else {
示例#27
0
function show_action($creator, $member_num, $manager)
{
    $exit_action = "content_none";
    $drop_action = "content_none";
    $manage_action = "content_none";
    $user_id = get_sess_userid();
    if ($user_id == $creator && $member_num <= 1) {
        $drop_action = "";
    }
    if (strstr($manager, "," . $user_id . ",") || $user_id == $creator) {
        $manage_action = "";
    } else {
        $exit_action = "";
    }
    return $action = array("drop" => $drop_action, "manage" => $manage_action, "exit" => $exit_action);
}