","",$content);
$content = str_replace("","",$content);
$title = '无标题!';
$in_date = date('Y-m-d H:i:s');
$new_mail = 1;
$reply = 0;
$defunct = 'N';
pdo_query('INSERT INTO `mail`(`to_user`, `from_user`, `title`, `content`, `new_mail`, `reply`, `in_date`, `defunct`) VALUES (?,?,?,?,?,?,?,?)',$to_user,$from_user,$title,$content,$new_mail,$reply,$in_date,$defunct);
$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ?"https://": "http://";
$url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header("Location:".$url);
}
?>
-

0) {?>
'.$this_f.''.''.'
';
$this_info=pdo_query('SELECT * FROM `mail` WHERE (`from_user`=? AND `to_user`=?) OR (`to_user`=? AND `from_user`=?) ORDER BY unix_timestamp(in_date) DESC LIMIT 1',$user_id,$this_f,$user_id,$this_f)[0];
$this_info['content'] =preg_replace('/\
/i','[图片]',$this_info['content']);
$this_info['content'] =preg_replace('/\[\s\S]*\<\/pre\>/i','[代码]',$this_info['content']);
$this_info['content'] =preg_replace('/\[\s\S]*\<\/a\>/i','[链接]',$this_info['content']);
$this_info['content'] =preg_replace('/\[\s\S]*\<\/table\>/i','[表格]',$this_info['content']);
$this_info['content'] = strip_tags($this_info['content']);
echo substr($this_info['content'],0,18).'...';
?>
$chat_r) {
if ($chat_r['from_user']==$user_id) {
$say = 1;
$this_u = $user_id;
}
else {
$say = 0;
$this_u=$friend;
}
$logopng = 'http://q.qlogo.cn/headimg_dl?dst_uin=1440169768&spec=160';
//if ($chat_id != 0 && strtotime($chat_r['in_date'])-strtotime($chats_i[$chat_id-1]['in_date'])>30*60) {
?>
暂无联系人或联系人不存在从列表中选择联系人,或者输入用户名后按回车直接聊天";
}
?>