Beispiel #1
0
function updatereplynum($delid)
{
    //index.php
    global $db;
    $query = $db->query("SELECT user_id,status_id FROM et_content WHERE content_id='{$delid}'");
    $data = $db->fetch_array($query);
    if ($data) {
        if ($data['status_id'] > 0) {
            $db->query("UPDATE et_content SET replytimes=replytimes-1 WHERE content_id='" . $data['status_id'] . "'");
        }
        updatemsgnum('all', $data['user_id']);
    }
}
Beispiel #2
0
                    $content = "<p>我分享了音乐</p>" . $describe . "[music]" . urlop($link, 'e') . "[/music]";
                } else {
                    if ($type == 'flash') {
                        $content = "<p>我分享了Flash</p>" . $describe . "[flash]" . urlop($link, 'e') . "[/flash]";
                    } else {
                        if ($type == 'website') {
                            $content = "<p>我分享了网址</p>" . $describe . "{$link}";
                        }
                    }
                }
            }
            $content = replace($content);
            //词语过滤
            $content = daddslashes($content);
            $db->query("INSERT INTO et_content (user_id,user_name,user_nickname,user_head,content_body,posttime,conttype) VALUES ('{$my['user_id']}','{$my['user_name']}','{$my['nickname']}','{$my['user_head']}','{$content}','{$addtime}','media')");
            updatemsgnum('++', $my[user_id]);
            //更新消息数
            dsetcookie('setok', 'home6');
            header("location: {$webaddr}/{$my['user_name']}/profile");
            exit;
        } else {
            dsetcookie('setok', 'home7');
            header("location: {$webaddr}/{$my['user_name']}/profile");
            exit;
        }
    }
}
//好友判断
if ($user['user_id'] != $my['user_id']) {
    $isfriend = isfriend($user['user_id'], $my['user_id']);
}