<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>快捷文章发表框</title>
<link rel="StyleSheet" href="base.css">
<script src="dialog.js" type="text/javascript"></script>
<script src="base.js" type="text/javascript"></script>
<script src="publish_img.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript" src="word.js"></script>
<script language="JavaScript" type="text/javascript" src="sinaeditor.js"></script>
<script language="JavaScript" type="text/javascript" src="word_edit.js"></script>
<link rel="Stylesheet" href="word_edit.css" type="text/css" media="all" /><style type="text/css">
<!--
.input_text1{height:21px;border:1px solid #7f9db9;background:#f7f5e0}
.input_text2{height:21px;border:1px solid #7f9db9;background:#eff0f0}
.img_box a{ text-decoration:none; color:#000000}
.arrow_up{background:url("http://blog.sina.com.cn/images/arrow_up.gif") #bdb7b7 center;cursor:hand;cursor:pointer;}
.arrow_down{background:url("http://blog.sina.com.cn/images/arrow_down.gif") #bdb7b7 center;cursor:hand;cursor:pointer;}
.sort_close{background:url('http://blog.sina.com.cn/images/arrow_left.gif');cursor:hand;cursor:pointer;}
.sort_open{background:url('http://blog.sina.com.cn/images/arrow_right.gif');cursor:hand;cursor:pointer;}
.SinaEditorDisable {filter: alpha(opacity=30); -moz-opacity: 0.3;}
-->
</style>
<script type="text/javascript">
var guid = "1033102051" ;
var sState = "iframe";
var lastFormId = 1;
var checkEdit;
function report_upload_ok(front_id, pic_id)
{
lastFormId = front_id;
$('picShow' + front_id).innerHTML = "<span style='color:#ff0000;font-weight:bold'>上传成功</span>";
replaceStr($('filePath' + front_id).value, "http://album.sina.com.cn/pic/"+pic_id);
$('form' + front_id).reset();
if ($('album').value == ''){
var sp_char = '';
}
else{
var sp_char = ',';
}
$('album').value = $('album').value + sp_char + pic_id;
postFile(++front_id);
}
function opw(url){
window.open(url,null,"");
}
function report_upload_error(error_str, front_id)
{
_error_msg_show(error_str);
lastFormId = front_id;
}
function change_time()
{
var _now_time=new Date().getTime() - 1000*60*2 ;
SENDTIME = new Date( _now_time);
}
// 添加分类表单检查
function check_sort_form(){
if ($('sort_txt').value == ''){
_error_msg_show('分类输入值不能为空:S');
return;
}
$('typename[]').value = $('sort_txt').value;
if ($('sort_txt').value.length > 28){
_confirm_msg_show('分类长度不能超过28个字符或14个汉字');
return;
}
$('sortForm').submit();
}
// 添加分类框显示切换
function add_sort_switch(){
if ($('add_sort_txt').style.display == 'none'){
$('add_sort_txt').style.display = '';
$('add_sort_desc').style.display = '';
$('add_sort_switch').className = "sort_close";
}
else{
$('add_sort_txt').style.display = 'none';
$('add_sort_desc').style.display = 'none';
$('add_sort_switch').className = "sort_open";
}
}
function check_article_form(){
var btitle = $('blog_title');
if (btitle.value == ''){
_error_msg_show('你忘记输入文章标题了:S');
return false;
}
else if(btitle.length > 72){
_error_msg_show('文章标题最多为72个字符或36个汉字');
return false;
}
var bbody = $('blog_body_area');
if(exist('blog_body_textarea'))
{
if ($('blog_body_textarea').value.toLowerCase() =="<div></div>" ||$('blog_body_textarea').value =="")
{
_error_msg_show('你忘记输入文章内容了:S');
return false;
}
}
else if(exist('blog_body_area'))
{
if ($('blog_body_area').value =="")
{
alert($('blog_body_area').value);
_error_msg_show('你忘记输入文章内容了:S');
return false;
}
}
/*
if (bbody && bbody.value == ''){
_error_msg_show('你忘记输入文章内容了:S');
return false;
}
*/
return check_tags();
return true;
}
<!--add-->
function adv_setting_switch()
{
ArrowControl('arrow_up','arrow_down','adv_setting', 'adv_setting_arrow');
try{
parent.iframeResize();
}
catch(e){}
}
<!--add-->
function postFile(_sId){
var sId = 'form' + _sId;
if (exist(sId)) {
if ($(sId).title.length > 0 && seekUse(_sId)) {
$(sId).submit();
} else {
clearSelect(_sId);
postFile( ++_sId );
}
}else{
if(sState == "iframe"){
rep();
}
et.save();
$('article').submit();
}
}
function publish_article(){
et.save();
if (check_article_form()){
save_article();
if(getSend()<60){
_error_msg_show('请不要在短时间内多次发表文章 :)<br/> 您需要耐心等待 ' + (60 - getSend()) + ' 秒后,才能再次发表文章.');
return false;
}
initSendTime(); _error_msg_show("<center><b>正在发表文章...</b></center><br/> 提示:文章内容已经暂存至系统剪贴板,如遇网络故障等原因发表失败可点击鼠标右键→选择“粘贴”重新发表。", " ", 3);
postFile(lastFormId);
}
}
function save_article(){
et.save();
if(exist('blog_body_textarea')){
setCopy($('blog_body_textarea').value);
}else if(exist('blog_body_area')){
setCopy($('blog_body_area').value);
}
}
function publish_draft()
{
$('act').value = '3';
publish_article();
}
function article_preview()
{
et.save();
if (check_article_form()){
$('article').action = "/control/writing/scriber/article_preview.php";
$('article').target = "_blank";
$('article').submit();
$('article').action = "/control/writing/scriber/article_post.php";
$('article').target = "iframe_data";
}
}
function initForm(_sId){
var sFileUpload = '\
<form id="form' + _sId + '" title="" enctype="multipart/form-data" action="/myalbum/post.php" method="post" target="iframe_data">\
<input name="filePath" type="hidden" id="filePath' + _sId + '" />\
<input name="fileKey" type="hidden" value="' + _sId + '" />\
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="img_box">\
<tr>\
<td style="border:1px solid #000">\
<table width="100%" border="0" cellspacing="0" cellpadding="0">\
<tr style="background:#669999">\
<td>\
<table width="100%" height="21" border="0" cellpadding="0" cellspacing="0" background="http://blog.sina.com.cn/images/insert_image.jpg">\
<tr>\
<td width="93%"> <a href="javascript:;" onclick="addArticle(' + _sId + ');">插入图片</a></td>\
<td width="7%"><a href="javascript:clearSelect(' + _sId + ');"><img src="http://image2.sina.com.cn/blog/tmpl/v3/control/images/del_btn.gif" width="10" height="10" border="0"></a> </td>\
</tr>\
</table>\
</td>\
</tr>\
<tr>\
<td height="1" bgcolor="#787878"></td>\
</tr>\
<tr align="center" valign="middle" bgcolor="#ffffff">\
<td height="120" id="picShow' + _sId + '" style="background:url(\'http://image2.sina.com.cn/blog/tmpl/v3/control/images/publish_pic_bg.gif\');"><span style="color:#7f7f7f">图片剪切板</span></td>\
</tr>\
</table>\
</td>\
</tr>\
<tr>\
<td height="1"></td>\
</tr>\
<tr>\
<td><input name="fileContent" id="file' + _sId + '" type="file" style="width:140px;border:1px solid #000" onchange="javascript:initUpload(this,' + _sId + ');"></td>\
</tr>\
</table>\
</form>\
';
dw(sFileUpload);
}
function img_pool_switch()
{
ArrowControl('arrow_up','arrow_down','image_upload', 'img_upload_arrow');
try{
parent.iframeResize();
}
catch(e){}
}
function open_upload_window()
{
if($('blog_body_area').style.display == "none"){
_error_msg_show('请在设计模式下使用此功能。');
return false;
}
winopen("http://v.blog.sina.com.cn/blog/blog_video.php");
}
function winopen(url)
{
window.open(url, "sinavblogupload", "width=840,height=500,resizable=no,z-look=yes,alwaysRaised=yes,depended=yes,scrollbars=yes,left=" + (window.scre