Beispiel #1
0
function message_set_remind($touid, $content, $link, $type, $is_focus)
{
    $uid = get_sess_userid();
    $userico = get_sess_userico();
    $uname = get_sess_username();
    global $tablePreStr;
    $t_remind = $tablePreStr . "remind";
    $dbo = new dbex();
    dbplugin('w');
    $content = htmlspecialchars_decode($content);
    $link = htmlspecialchars_decode($link);
    if ($is_focus == 0) {
        $update_con = " and type_id = {$type} ";
    } else {
        $update_con = " and link = '{$link}' ";
    }
    $sql_check = " select id from {$t_remind} where user_id={$touid} {$update_con} ";
    $is_set = $dbo->getRow($sql_check);
    if (empty($is_set)) {
        $sql = " insert into {$t_remind} (user_id,type_id,date,content,is_focus,from_uid,from_uname,from_uico,link) values ({$touid},{$type},NOW(),'{$content}',{$is_focus},{$uid},'{$uname}','{$userico}','{$link}') ";
    } else {
        $sql = " update {$t_remind} set count = count+1,date = NOW() where user_id = {$touid} {$update_con} ";
    }
    return $dbo->exeUpdate($sql);
}
Beispiel #2
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();
}
Beispiel #3
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);
}
Beispiel #4
0
<?php

//引入模块公共方法文件
require "api/base_support.php";
require "foundation/aanti_refresh.php";
//引入语言包
$pol_langpackage = new polllp();
//权限验证
if (!get_argp('action')) {
    action_return(0, "{$pol_langpackage->pol_error}", "-1");
}
//变量声明区
$user_id = get_sess_userid();
$user_name = get_sess_username();
$userico = get_sess_userico();
$cho = get_argp('pol_cho');
$pid = intval(get_argg('pid'));
$anon = short_check(get_argp('anonymity'));
$total_credit = short_check(get_argp('credit'));
$per_int = short_check(get_argp('percredit'));
$p_subject = short_check(get_argp('subject'));
if (empty($anon)) {
    $anon = 0;
}
if (empty($cho)) {
    action_return(0, "{$pol_langpackage->pol_error}", -1);
}
//数据表定义区
$t_poll = $tablePreStr . "poll";
$t_polloption = $tablePreStr . "polloption";
$t_polluser = $tablePreStr . "polluser";
Beispiel #5
0
 * 如果您正式运行此程序时,请切换到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 = '';
if (empty($comment_rs)) {
Beispiel #6
0
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;">
                            <li class="user_info"><a href="main.php?app=user_info" target="_top" hidefocus="true"><?php 
echo $u_langpackage->u_achives;
?>
Beispiel #7
0
 *
 * 修改完成之后需要您进入后台重新编译,才会重新生成。
 * 如果您开启了debug模式运行,那么您可以省去上面这一步,但是debug模式每次都会判断程序是否更新,debug模式只适合开发调试。
 * 如果您正式运行此程序时,请切换到service模式运行!
 *
 * 如有您有问题请到官方论坛(http://tech.jooyea.com/bbs/)提问,谢谢您的支持。
 */
//引入语言包
$gu_langpackage = new guestlp();
//引入公共模块
require "foundation/fcontent_format.php";
require "api/base_support.php";
//变量取得
$url_uid = intval(get_argg('user_id'));
$ses_uid = get_sess_userid();
$guest_user_name = get_sess_username();
$guest_user_ico = get_sess_userico();
$mypals = get_sess_mypals();
//引入模块公共权限过程文件
$is_login_mode = '';
$is_self_mode = 'partLimit';
require "foundation/auser_validate.php";
//数据表定义区
$t_guest = $tablePreStr . "guest";
$t_users = $tablePreStr . "users";
$dbo = new dbex();
//加为好友 打招呼
$add_friend = "mypalsAddInit";
$send_hi = "hi_action";
if (!$ses_uid) {
    $add_friend = 'goLogin';