echo "<script>alert(\"提示:您发送的用户不存在!\");window.location.href='{$prev}';</script>"; } exit; } if ($uissendmsg == 1 && $isfriend[allfri] == 0 && $uid != $my[user_id]) { if ($refer) { header("location: " . $refer . "&tip=20"); } else { echo "<script>alert(\"提示:很抱歉,该用户开启隐私设置,只接受好友的私信!\");window.location.href='{$prev}';</script>"; } exit; } if (!empty($content)) { $content = replace($content); $db->query("INSERT INTO et_messages (js_id,fs_id,message_body,m_time) VALUES ('{$uid}','{$my['user_id']}','{$content}','{$addtime}')"); fsock($uid, "【小T提醒】 " . $my[user_name] . "给你发送了一封私信,查看地址:" . $webaddr . "/home/privatemsg"); if ($refer) { header("location: " . $refer . "&tip=22"); } else { echo "<script>alert(\"提示:私信已经发送成功!\");window.location.href='{$prev}';</script>"; } exit; } else { if ($refer) { header("location: " . $refer . "&tip=24"); } else { echo "<script>alert(\"提示:您没有填写发送的内容,返回重新填写!\");window.location.href='{$prev}';</script>"; } exit; } }
} } } } $user = array("user_id" => $data['user_id'], "theme_bgcolor" => $data['theme_bgcolor'], "theme_pictype" => $data['theme_pictype'], "theme_text" => $data['theme_text'], "theme_link" => $data['theme_link'], "theme_sidebar" => $data['theme_sidebar'], "theme_sidebox" => $data['theme_sidebox'], "theme_bgurl" => $data['theme_bgurl']); if (!$share_id) { header("location: {$webaddr}/op/share&tip=38"); exit; } if ($action == "sendreply") { $content = daddslashes(trim($_POST['content'])); if ($share_id && $content) { $ret = $retimes + 1; $db->query("INSERT INTO et_sharereply (share_id,user_id,reply_body,reply_time) VALUES ('{$share_id}','{$my['user_id']}','{$content}','{$addtime}')"); $db->query("UPDATE et_share SET retimes='{$ret}' where share_id='{$share_id}'"); fsock($share_uid, "¡¾Ð¡TÌáÐÑ¡¿ " . $my[user_name] . "»Ø¸´ÁËÄúµÄ·ÖÏí£¬²é¿´µØÖ·:" . $webaddr . "/op/sharereply/" . $share_id); header("location: {$webaddr}/op/sharereply/{$share_id}&tip=39"); } else { header("location: {$webaddr}/op/sharereply/{$share_id}&tip=40"); } } if ($act == "del") { $cid = $_GET['cid']; $t = $db->query("DELETE FROM et_sharereply where shre_id='{$cid}' && user_id='{$my['user_id']}'"); if ($t == 1) { $ret = $retimes - 1; $db->query("UPDATE et_share SET retimes='{$ret}' where share_id='{$sid}'"); echo "success"; exit; } else { echo "ºÜ±§Ç¸£¬É¾³ýÆÀÂÛʧ°ÜÁË£¬";
//以下是 发送 代码 if ($action == "msgsend") { tologin(); $content = daddslashes(trim($_POST["content"])); $toid = $_POST["toid"]; $status_id = $_POST["status_id"]; $status_type = $_POST["status_type"]; $topid = $_POST["topid"] ? $_POST["topid"] : 0; $toname = idtoname($toid); if (!empty($content)) { $content = replace($content); //词语过滤 if ($toid && $status_id) { $content = "@<a href=\"{$webaddr}/home/u.{$toid}\">{$toname}</a> {$content}"; $db->query("INSERT INTO et_content (user_id,topicid,content_body,posttime,status_id,status_uid,status_uname,status_type) VALUES ('{$my['user_id']}','{$topid}','{$content}','{$addtime}','{$status_id}','{$toid}','{$toname}','{$status_type}')"); fsock($toid, "【小T提醒】 " . $my[user_name] . "回复了你的TALK,查看地址:" . $webaddr . "/home/replies"); } else { $db->query("INSERT INTO et_content (user_id,topicid,content_body,posttime) VALUES ('{$my['user_id']}','{$topid}','{$content}','{$addtime}')"); } $db->query("UPDATE et_users SET msg_num='" . ($my[msg_num] + 1) . "' where user_id='{$my['user_id']}'"); header("location: {$webaddr}/home"); exit; } else { header("location: {$webaddr}/home?tip=25"); exit; } } if ($hm) { include 'source/hm_' . $hm . '.inc.php'; exit; }