示例#1
0
    } else {
        header("location:{$webaddr}/share.php?act=login&{$allurl}&error=用户名或密码错误");
        exit;
    }
}
if ($action == 'share') {
    $_url = $_POST['url'];
    $_title = $_POST['title'];
    $_des = $_POST['des'];
    if ($_des) {
        $des = "[desc]{$_des}[/desc]";
    } else {
        $des = "<br/>";
    }
    $content = "ET分享:{$_title}{$des}{$_url}";
    if (!empty($content)) {
        $content = replace($content);
        //词语过滤
        explodetopic($content);
        //专题
        $content = daddslashes($content);
        $db->query("INSERT INTO et_content (user_id,user_name,user_nickname,user_head,content_body,posttime) VALUES ('{$my['user_id']}','{$my['user_name']}','{$my['nickname']}','{$my['user_head']}','{$content}','{$addtime}')");
        $db->query("UPDATE et_users SET msg_num=msg_num+1,lastcontent='{$content}',lastconttime='{$addtime}' WHERE user_id='{$my['user_id']}'");
        header("location:{$webaddr}/share.php?shareok=1");
        exit;
    } else {
        header("location:{$webaddr}/share.php?shareok=0&{$allurl}&error=很抱歉,分享失败了");
        exit;
    }
}
include $template->getfile('share.htm');
示例#2
0
<?php

if (!defined('IN_ET')) {
    exit('Access Denied');
}
if (!$user['user_id']) {
    showmessage("<div class='showmag'><p>您还没有登录,不能执行此操作!</p><p><a href='index.php?op=login'>现在登陆</a></p></div>");
    exit;
}
if ($action == "reply") {
    if ($user[user_id]) {
        $replybody = trim($_POST['replybody']);
        $replybody = replace($replybody);
        //词语过滤
        explodetopic($replybody);
        //专题
        $back = atsend($replybody);
        //@
        $replybody = $back['content'];
        $uids = $back['uids'];
        $replybody = daddslashes($replybody);
        array_push($uids, $_POST['suid']);
        $uids = array_unique($uids);
        $status_id = $_POST['status_id'];
        if ($replybody && $status_id) {
            $db->query("INSERT INTO et_content (user_id,user_name,user_nickname,user_head,content_body,posttime,type,status_id) VALUES ('{$user['user_id']}','{$user['user_name']}','{$user['nickname']}','{$user['user_head']}','{$replybody}','{$addtime}','手机','{$status_id}')");
            $insertid = mysql_insert_id();
            if ($insertid) {
                for ($i = 0; $i < count($uids); $i++) {
                    $db->query("UPDATE et_users SET replyread = replyread+1 WHERE user_id='{$uids[$i]}'");
                    $db->query("INSERT INTO et_replyto (user_id,content_id) VALUES ('{$uids[$i]}','{$insertid}')");
示例#3
0
<?php

if (!defined('IN_ET')) {
    exit('Access Denied');
}
if (!$user['user_id']) {
    showmessage("<div class='showmag'><p>您还没有登录,不能执行此操作!</p><p><a href='index.php?op=login'>现在登陆</a></p></div>");
    exit;
}
//发送消息
if ($action == "post") {
    $cbody = trim($_POST['cbody']);
    $privacy = $_POST["privacy"] ? 1 : 0;
    $cbody = replace($cbody);
    //词语过滤
    explodetopic($cbody);
    //专题
    $back = atsend($cbody);
    //@
    $cbody = $back['content'];
    $uids = $back['uids'];
    $cbody = daddslashes($cbody);
    if ($user['user_id']) {
        if (!$cbody) {
            showmessage("<div class='showmag'><p>您没有填写发表的内容</p><a href='index.php'>返回首页</a></p></div>");
            exit;
        } else {
            $db->query("INSERT INTO et_content (user_id,user_name,user_nickname,user_head,content_body,posttime,type,privacy) VALUES ('{$user['user_id']}','{$user['user_name']}','{$user['nickname']}','{$user['user_head']}','{$cbody}','{$addtime}','手机','{$privacy}')");
            $insertid = mysql_insert_id();
            if ($insertid) {
                for ($i = 0; $i < count($uids); $i++) {