<?php if(!defined('IN_DISCUZ')) exit('Access Denied'); hookscriptoutput('portalcp_article');
0
|| checktplrefresh('./template/default/portal/portalcp_article.htm', './template/default/home/editor_image_menu.htm', 1664962051, '1', './data/template/1_1_portal_portalcp_article.tpl.php', './template/default', 'portal/portalcp_article')
|| checktplrefresh('./template/default/portal/portalcp_article.htm', './template/default/common/seccheck.htm', 1664962051, '1', './data/template/1_1_portal_portalcp_article.tpl.php', './template/default', 'portal/portalcp_article')
|| checktplrefresh('./template/default/portal/portalcp_article.htm', './template/default/common/upload.htm', 1664962051, '1', './data/template/1_1_portal_portalcp_article.tpl.php', './template/default', 'portal/portalcp_article')
;?><?php include template('common/header'); if($op == 'delete') { ?>



<h3 class="flb">
<em>ɾ������</em>
<?php if($_G['inajax']) { ?><span><a href="javascript:;" onclick="hideWindow('<?php echo $_GET['handlekey'];?>');" class="flbc" title="�ر�">�ر�</a></span><?php } ?>
</h3>

<form method="post" autocomplete="off" action="portal.php?mod=portalcp&amp;ac=article&amp;op=delete&amp;aid=<?php echo $_GET['aid'];?>">
<div class="c">
<?php if($_G['group']['allowpostarticlemod'] && $article['status'] == 1) { ?>
ȷ��Ҫɾ����������
<input type="hidden" name="optype" value="0" class="pc" />
<?php } else { ?>
<label class="lb"><input type="radio" name="optype" value="0" class="pc" />ֱ��ɾ��</label>
<label class="lb"><input type="radio" name="optype" value="1" class="pc" checked="checked" />�������վ</label>
<?php } ?>
</div>
<p class="o pns">
<button type="submit" name="btnsubmit" value="true" class="pn pnc"><strong>ȷ��</strong></button>
</p>
<input type="hidden" name="aid" value="<?php echo $_GET['aid'];?>" />
<input type="hidden" name="referer" value="<?php echo dreferer(); ?>" />
<input type="hidden" name="deletesubmit" value="true" />
<input type="hidden" name="formhash" value="<?php echo FORMHASH;?>" />
</form>
<?php } elseif($op == 'verify') { ?>
<h3 class="flb">
<em id="return_<?php echo $_GET['handlekey'];?>">�������</em>
<?php if($_G['inajax']) { ?><span><a href="javascript:;" onclick="hideWindow('<?php echo $_GET['handlekey'];?>');" class="flbc" title="�ر�">�ر�</a></span><?php } ?>
</h3>

<form method="post" autocomplete="off" id="aritcle_verify_<?php echo $aid;?>" action="portal.php?mod=portalcp&amp;ac=article&amp;op=verify&amp;aid=<?php echo $aid;?>">
<div class="c">
<label for="status_0" class="lb"><input type="radio" class="pr" name="status" value="0" id="status_0"<?php if($article['status']=='1') { ?> checked="checked"<?php } ?> />ͨ��</label>
<label for="status_x" class="lb"><input type="radio" class="pr" name="status" value="-1" id="status_x" />ɾ��</label>
<label for="status_2" class="lb"><input type="radio" class="pr" name="status" value="2" id="status_2"<?php if($article['status']=='2') { ?> checked="checked"<?php } ?> />����</label>
</div>
<p class="o pns">
<button type="submit" name="btnsubmit" value="true" class="pn pnc"><strong>ȷ��</strong></button>
</p>
<input type="hidden" name="aid" value="<?php echo $aid;?>" />
<input type="hidden" name="referer" value="<?php echo dreferer(); ?>" />
<input type="hidden" name="handlekey" value="<?php echo $_GET['handlekey'];?>" />
<input type="hidden" name="verifysubmit" value="true" />
<input type="hidden" name="formhash" value="<?php echo FORMHASH;?>" />
</form>
<?php } elseif($op == 'related') { if($ra) { ?>
<li id="raid_li_<?php echo $ra['aid'];?>"><input type="hidden" name="raids[]" value="<?php echo $ra['aid'];?>" size="5">[ <?php echo $ra['aid'];?> ] <a href="<?php echo fetch_article_url($ra);; ?>" target="_blank"><?php echo $ra['title'];?></a> <a href="javascript:;" onclick="raid_delete(<?php echo $ra['aid'];?>);">ɾ��</a></li>
<?php } } elseif($op == 'pushplus') { ?>
<h3 class="flb">
<em>��������</em>
<?php if($_G['inajax']) { ?><span><a href="javascript:;" onclick="hideWindow('<?php echo $_GET['handlekey'];?>');" class="flbc" title="�ر�">�ر�</a></span><?php } ?>
</h3>
<form method="post" target="_blank" action="portal.php?mod=portalcp&amp;ac=article&amp;tid=<?php echo $tid;?>&amp;aid=<?php echo $aid;?>">
<div class="c">
<b><?php echo $pushcount;?></b> ����������ӵ��������ء�<a href="<?php echo $article_url;?>" target="_blank" class="xi2">(�鿴����)</a>
<?php if($pushedcount) { ?><br />��ʾ��<?php echo $pushedcount;?> �������Ѿ�����������<?php } ?>
<div id="pushplus_list"><?php if(is_array($pids)) foreach($pids as $pid) { ?><input type="hidden" name="pushpluspids[]" value="<?php echo $pid;?>" />
<?php } ?>
</div>
</div>
<p class="o pns">
<input type="hidden" name="formhash" value="<?php echo FORMHASH;?>" />
<input type="hidden" name="pushplussubmit" value="1" />

<input type="hidden" name="toedit" value="1" />
<button type="submit" class="pn pnc vm"><span>�ύ</span></button>
</p>
</form>
<?php } elseif($op == 'add_success') { ?>
<div class="nfl">
<div class="f_c altw">
<div class="alert_right">
<p>�������³ɹ�</p>
<p class="alert_btnleft">
<a href="<?php echo $article_add_url;?>&op=edit&aid=<?php echo $aid;?>">�༭����</a>
<span class="pipe">|</span>
<a href="<?php echo $article_add_url;?>">��������������</a>
<span class="pipe">|</span>
<a href="portal.php?mod=view&amp;aid=<?php echo $aid;?>" target="_blank">�鿴����</a>
<?php if($htmlstatus) { ?>
<span class="pipe">|</span>
<span id='makehtml_' mktitle="����"></span>
<?php } ?>
</p>
</div>
</div>
</div>
<script src="<?php echo STATICURL;?>js/makehtml.js" type="text/javascript" type="text/javascript"></script>
<script type="text/javascript">
<?php if(!empty($_G['cookie']['clearUserdata']) && $_G['cookie']['clearUserdata'] == 'home') { ?>
saveUserdata('home', '')
<?php } ?>
make_html('portal.php?mod=view&aid=<?php echo $aid;?>', $('makehtml_'));
</script>
<?php } else { ?>

<div id="pt" class="bm cl">
<div class="z">
<a href="./" class="nvhm" title="��ҳ"><?php echo $_G['setting']['bbname'];?></a> <em>&rsaquo;</em>
<a href="<?php echo $_G['setting']['navs']['1']['filename'];?>"><?php echo $_G['setting']['navs']['1']['navname'];?></a> <em>&rsaquo;</em>
<?php if($catid ) { ?>
<a href="<?php echo $portalcategory[$catid]['caturl'];?>"><?php echo $portalcategory[$catid]['catname'];?></a> <em>&rsaquo;</em>
<?php } if(!empty($aid)) { ?>
<a href="portal.php?mod=portalcp&amp;ac=article&amp;aid=<?php echo $article['aid'];?>">�༭����</a>
<?php } else { ?>
<a href="portal.php?mod=portalcp&amp;ac=article&amp;catid=<?php echo $catid;?>">��������</a>
<?php } ?>
</div>
</div>

<div id="ct" class="wp cl">
<div class="mn">
<div class="bm bw0">
<h1 class="mbm bbs mt"><?php if(!empty($aid)) { ?>�༭����<?php } else { ?>��������<?php } ?></h1>
<script src="<?php echo $_G['setting']['jspath'];?>calendar.js?<?php echo VERHASH;?>" type="text/javascript"></script>
<form method="post" autocomplete="off" id="articleform" action="portal.php?mod=portalcp&amp;ac=article<?php if($_GET['modarticlekey']) { ?>&amp;modarticlekey=<?php echo $_GET['modarticlekey'];?><?php } ?>" enctype="multipart/form-data">
<?php if(!empty($_G['setting']['pluginhooks']['portalcp_top'])) echo $_G['setting']['pluginhooks']['portalcp_top'];?>
<div class="dopt cl">
<span class="z mtn" style="width: 80px;">�ꡡ����:&nbsp;</span>
<input type="text" name="title" id="title" class="px" value="<?php echo $article['title'];?>" size="80" />
<input type="button" id="color_style" class="pn colorwd" title="���ѡ����ɫ" fwin="eleStyle" onclick="change_title_color(this.id);" style="background-color:<?php echo $stylecheck['0'];?>" />
<input type="hidden" id="highlight_style_0" name="highlight_style[0]" value="<?php echo $stylecheck['0'];?>" />
<input type="hidden" id="highlight_style_1" name="highlight_style[1]" value="<?php echo $stylecheck['1'];?>" />
<input type="hidden" id="highlight_style_2" name="highlight_style[2]" value="<?php echo $stylecheck['2'];?>" />
<input type="hidden" id="highlight_style_3" name="highlight_style[3]" value="<?php echo $stylecheck['3'];?>" />
<a href="javascript:;" id="highlight_op_1" onclick="switchhl(this, 1)" class="dopt_b<?php if($stylecheck['1']) { ?> cnt<?php } ?>" style="text-decoration:none;font-weight:700" title="���ּӴ�">B</a>
<a href="javascript:;" id="highlight_op_2" onclick="switchhl(this, 2)" class="dopt_i<?php if($stylecheck['2']) { ?> cnt<?php } ?>" style="text-decoration:none;font-style:italic" title="����б��">I</a>
<a href="javascript:;" id="highlight_op_3" onclick="switchhl(this, 3)" class="dopt_l<?php if($stylecheck['3']) { ?> cnt<?php } ?>" style="text-decoration:underline" title="���ּ��»���">U</a>
</div>
<div id="htmlname_" class="dopt mtn cl"<?php if(!$htmlstatus) { ?> style="display: none"<?php } ?>>
<span class="z mtn" style="width: 80px;">HTML�ļ���:</span>
<input type="text" name="htmlname" id="htmlname" class="px" value="<?php echo $article['htmlname'];?>" size="80" onblur="check_htmlname_exists(this)"/>.<?php echo $_G['setting']['makehtml']['extendname'];?>
<strong id="checkhtmlnamemsg"></strong>
<input type="hidden" name="oldhtmlname" id="oldhtmlname" value="<?php echo $article['htmlname'];?>" />
</div>
<div id="pagetitle_" class="dopt mtn cl"<?php if($article['contents'] < 2) { ?> style="display: none"<?php } ?>>
<span class="z mtn" style="width: 80px;">��ҳ����:&nbsp;</span>
<input type="text" name="pagetitle" id="pagetitle" class="px" value="<?php echo $article_content['title'];?>" size="80" />
</div>

<div class="exfm pns cl">
<div class="sinf sppoll z">
<dl>
<?php if($_G['cache']['portalcategory'] && $categoryselect) { ?>
<dt>Ƶ����Ŀ</dt>
<dd><div class="ftid"><?php echo $categoryselect;?></div><script type="text/javascript">simulateSelect('catid', 158);</script></dd>
<?php } ?>

<dt>������Դ</dt>
<dd>
<input type="text" id="from" name="from" class="px p_fre" value="<?php echo $article['from'];?>" <?php if($from_cookie) { ?>size="10"<?php } else { ?>size="30"<?php } ?> />
<?php if($from_cookie) { ?>
<select name="from_cookie" id="from_cookie" class="ps" onchange="$('from').value=this.value;" style="width:96px;">
<option value="" selected>��ѡ��</option><?php if(is_array($from_cookie)) foreach($from_cookie as $var) { ?><option value="<?php echo $var;?>"><?php echo $var;?></option>
<?php } ?>
</select>
<?php } ?>
</dd>
<dt>��Դ��ַ</dt>
<dd><input type="text" name="fromurl" class="px p_fre" value="<?php echo $article['fromurl'];?>" size="30" /></dd>
<dt>����ʱ��</dt>
<dd><input type="text" name="dateline" class="px p_fre" value="<?php echo $article['dateline'];?>" size="30" onclick="showcalendar(event, this, true)" /></dd>

</dl>
</div>
<div class="sadd z">
<dl>
<?php if(empty($article['aid'])) { ?>
<dt>�Զ���ȡ</dt>
<dd>
<span class="ftid">
<select name="from_idtype" id="from_idtype" class="ps" change="$('ele_getauthorall').style.display=($('from_idtype').value=='tid' ? '' : 'none');">
<option value="tid"<?php echo $idtypes['tid'];?>>���� tid</option>
<option value="blogid"<?php echo $idtypes['blogid'];?>>��־ id</option>
</select>

</span>
<script type="text/javascript">simulateSelect('from_idtype', 81);</script>
<input type="text" name="from_id" id="from_id" value="<?php echo $_GET['from_id'];?>" size="8" class="px p_fre vm" />&nbsp;
<?php if($_GET['from_idtype'] == 'tid') { ?>
<span id="ele_getauthorall">
<label for="getauthorall"><input type="checkbox" name="getauthorall" id="getauthorall" value="1" class="pc" <?php if($_GET['getauthorall']) { ?>checked="checked"<?php } ?>/>��ȡ¥����������</label>
</span>
<?php } ?>
<button type="button" name="from_button" class="pn vm" onclick="return from_get();"><em>��ȡ</em></button>
<input type="hidden" name="id" value="<?php echo $_GET['from_id'];?>" />
<input type="hidden" name="idtype" value="<?php echo $_GET['from_idtype'];?>" />
</dd>
<?php } ?>
<dt>��תURL</dt>
<dd><input type="text" class="px p_fre" name="url" value="<?php echo $article['url'];?>" size="30" /></dd>
<dt>ԭ����</dt>
<dd><input type="text" name="author" class="px p_fre" value="<?php echo $article['author'];?>" size="30" /></dd>
<?php if($category[$catid]['allowcomment']) { ?>
<dt>��������</dt>
<dd><label for="ck_allowcomment"><input type="checkbox" name="forbidcomment" id="ck_allowcomment" class="pc" value="1"<?php if(isset($article['allowcomment']) && empty($article['allowcomment'])) { ?>checked="checked"<?php } ?> />��ֹ����</label></dd>
<?php } ?>
</dl>
<div><input type="hidden" id="conver" name="conver" value="" /></div>
</div>
<?php if(!empty($_G['setting']['pluginhooks']['portalcp_extend'])) echo $_G['setting']['pluginhooks']['portalcp_extend'];?>
</div>

<div class="pbw">
<script src="<?php echo STATICURL;?>image/editor/editor_function.js?<?php echo VERHASH;?>" type="text/javascript"></script><div id="icoImg_image_menu" style="display: none" unselectable="on">
<table width="100%" cellpadding="0" cellspacing="0" class="fwin"><tr><td class="t_l"></td><td class="t_c"></td><td class="t_r"></td></tr><tr><td class="m_l">&nbsp;&nbsp;</td><td class="m_c"><div class="mtm mbm">
<ul class="tb tb_s cl" id="icoImg_image_ctrl" style="margin-top:0;margin-bottom:0;">
<li class="y"><span class="flbc" onclick="hideAttachMenu('icoImg_image_menu')">�ر�</span></li>
<?php if($_G['basescript'] == 'home' && $_G['group']['allowupload'] || $_G['basescript'] == 'portal') { ?>
<li class="current" id="icoImg_btn_imgattachlist"><a href="javascript:;" hidefocus="true" onclick="switchImagebutton('imgattachlist');">�ϴ�ͼƬ</a></li>
<?php } if(helper_access::check_module('album')) { ?>
<li id="icoImg_btn_albumlist" <?php if($_G['basescript'] == 'home' && !$_G['group']['allowupload']) { ?> class="current"<?php } ?>><a href="javascript:;" hidefocus="true" onclick="switchImagebutton('albumlist');">���ͼƬ</a></li>
<?php } ?>
<li id="icoImg_btn_www" <?php if($_G['basescript'] == 'home' && !$_G['group']['allowupload'] && !helper_access::check_module('album')) { ?> class="current"<?php } ?>><a href="javascript:;" hidefocus="true" onclick="switchImagebutton('www');">����ͼƬ</a></li>
</ul>
<div class="p_opt popupfix" unselectable="on" id="icoImg_www" <?php if($_G['basescript'] == 'home' && ($_G['group']['allowupload'] || helper_access::check_module('album')) || $_G['basescript'] == 'portal') { ?> style="display: none"<?php } ?>>
<table cellpadding="0" cellspacing="0" width="100%">
<tr class="xg1">
<th>������ͼƬ��ַ</th>
<th>��(��ѡ)</th>
<th>��(��ѡ)</th>
</tr>
<tr>
<td width="74%"><input type="text" id="icoImg_image_param_1" onchange="loadimgsize(this.value)" style="width: 95%;" value="" class="px" autocomplete="off" /></td>
<td width="13%"><input id="icoImg_image_param_2" size="3" value="" class="px p_fre" autocomplete="off" /></td>
<td width="13%"><input id="icoImg_image_param_3" size="3" value="" class="px p_fre" autocomplete="off" /></td>
</tr>
<tr>
<td colspan="3" class="pns ptn">
<button type="button" class="pn pnc" onclick="insertWWWImg();"><strong>�ύ</strong></button>
</td>
</tr>
</table>
</div>
<div class="p_opt" unselectable="on" id="icoImg_imgattachlist"<?php if($_G['basescript'] == 'home' && !$_G['group']['allowupload']) { ?> style="display: none;"<?php } ?>>
<div class="pbm bbda cl">
<div id="uploadPanel" class="y">
<?php if($_G['basescript'] != 'portal') { ?>
�ϴ���:
<select name="savealbumid" id="savealbumid" class="ps vm" onchange="if(this.value == '-1') {selectCreateTab(0);}">
<option value="0">Ĭ�����</option><?php if(is_array($albums)) foreach($albums as $value) { ?><option value="<?php echo $value['albumid'];?>"><?php echo $value['albumname'];?></option>
<?php } ?>
<option value="-1" style="color:red;">+���������</option>
</select>
<?php } ?>
</div>
<div id="createalbum" class="y" style="display:none">
<input type="text" name="newalbum" id="newalbum" class="px vm" value="�������������"  onfocus="if(this.value == '�������������') {this.value = '';}" onblur="if(this.value == '') {this.value = '�������������';}" />
<button type="button" class="pn pnc" onclick="createNewAlbum();"><span>����</span></button>
<button type="button" class="pn" onclick="selectCreateTab(1);"><span>ȡ��</span></button>
</div>
<span id="imgSpanButtonPlaceholder"></span>
</div>
<div class="upfilelist upfl bbda">
<div id="imgattachlist">
<?php if($_G['basescript'] == 'portal') { ?><?php echo $article['attachs'];?><?php } ?>
</div>
<div class="fieldset flash" id="imgUploadProgress"></div>
</div>
<p class="notice">���ͼƬ��ӵ��༭��������</p>
</div>
<?php if(helper_access::check_module('album')) { ?>
<div class="p_opt" unselectable="on" id="icoImg_albumlist" <?php if($_G['basescript'] == 'home' && $_G['group']['allowupload'] || $_G['basescript'] == 'portal') { ?> style="display: none;"<?php } ?>>
<div class="upfilelist pbm bbda">
ѡ�����:
<select name="view_albumid" onchange="picView(this.value, 'albumphoto')" class="ps">
<option value="none">ѡ�����</option>
<option value="0">Ĭ�����</option><?php if(is_array($albums)) foreach($albums as $value) { ?><option value="<?php echo $value['albumid'];?>"><?php echo $value['albumname'];?></option>
<?php } ?>
</select>
<div id="albumphoto"></div>
</div>
<p class="notice">���ͼƬ��ӵ��༭��������</p>
</div>
<?php } ?>
</div></td><td class="m_r"></td></tr><tr><td class="b_l"></td><td class="b_c"></td><td class="b_r"></td></tr></table>
</div>


<div id="icoAttach_attach_menu" style="display: none" unselectable="on">
<table width="100%" cellpadding="0" cellspacing="0" class="fwin">
<tr>
<td class="t_l"></td>
<td class="t_c"></td>
<td class="t_r"></td>
</tr>
<tr>
<td class="m_l">&nbsp;&nbsp;</td>
<td class="m_c">
<div class="mtm mbm">
<ul class="tb tb_s cl" id="icoAttach_attach_ctrl" style="margin-top:0;margin-bottom:0;">
<li class="y"><span class="flbc" onclick="hideAttachMenu('icoAttach_attach_menu')">�ر�</span></li>
<li class="current" id="icoAttach_btn_attachlist"><a href="javascript:;" hidefocus="true" onclick="switchAttachbutton('attachlist');">�ϴ�����</a></li>
</ul>
<div class="p_opt post_tablelist" unselectable="on" id="icoAttach_attachlist">
<div class="pbm bbda">
<span id="spanButtonPlaceholder"></span>
</div>
<table cellpadding="0" cellspacing="0" border="0" width="100%" id="attach_tblheader" class="mtn bbs" style="display: none;">
<tr>
<td class="atnu"></td>
<td class="atna pbn">�ļ���</td>
<td class="atds pbn">�ļ���С</td>
<td class="attc"></td>
</tr>
</table>
<div class="upfl">
<div id="attachlist"></div>
<div class="fieldset flash" id="fsUploadProgress"></div>
</div>
<div class="notice upnf">
<p id="attach_notice">����ļ�����������ӵ�������</p>
</div>
</div>
</div>
</td>
<td class="m_r"></td>
</tr>
<tr>
<td class="b_l"></td>
<td class="b_c"></td>
<td class="b_r"></td>
</tr>
</table>
</div>

<iframe name="attachframe" id="attachframe" style="display: none;"></iframe>

<?php if($_G['basescript'] == 'home' && empty($_G['setting']['pluginhooks']['spacecp_blog_upload_extend']) || $_G['basescript'] == 'portal' && empty($_G['setting']['pluginhooks']['portalcp_top_upload_extend'])) { if(empty($_G['uploadjs'])) { ?>
<script src="<?php echo $_G['setting']['jspath'];?>upload.js?<?php echo VERHASH;?>" type="text/javascript"></script><?php $_G['uploadjs'] = 1;?><?php } ?><script type="text/javascript">
var attachUpload = new SWFUpload({
// Backend Settings
upload_url: "<?php echo $_G['siteurl'];?>misc.php?mod=swfupload&action=swfupload&operation=<?php if($_G['basescript'] == 'portal') { ?>portal<?php } else { ?>album<?php } ?>",
post_params: {"uid" : "<?php echo $_G['uid'];?>", "hash":"<?php echo $swfconfig['hash'];?>"<?php if($_G['basescript'] == 'portal') { ?>,"aid":<?php echo $aid;?>,"catid":<?php echo $catid;?><?php } ?>},

// File Upload Settings
file_size_limit : "<?php echo $swfconfig['max'];?>",	// 100MB
<?php if($_G['basescript'] == 'portal') { ?>
file_types : "<?php echo $swfconfig['attachexts']['ext'];?>",
file_types_description : "<?php echo $swfconfig['attachexts']['depict'];?>",
<?php } else { ?>
file_types : "<?php echo $swfconfig['imageexts']['ext'];?>",
file_types_description : "<?php echo $swfconfig['imageexts']['depict'];?>",
<?php } ?>
file_upload_limit : 0,
file_queue_limit : 0,

// Event Handler Settings (all my handlers are in the Handler.js file)
swfupload_preload_handler : preLoad,
swfupload_load_failed_handler : loadFailed,
file_dialog_start_handler : fileDialogStart,
file_queued_handler : fileQueued,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_start_handler : uploadStart,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,

// Button Settings
button_image_url : "<?php echo IMGDIR;?>/uploadbutton.png",
button_placeholder_id : "spanButtonPlaceholder",
button_width: 100,
button_height: 25,
button_cursor:SWFUpload.CURSOR.HAND,
button_window_mode: "transparent",

custom_settings : {
progressTarget : "fsUploadProgress",
uploadSource: 'portal',
uploadType: 'attach',
imgBoxObj: $('attachlist')
//thumbnail_height: 400,
//thumbnail_width: 400,
//thumbnail_quality: 100
},

// Debug Settings
debug: false
});
var upload = new SWFUpload({
// Backend Settings
upload_url: "<?php echo $_G['siteurl'];?>misc.php?mod=swfupload&action=swfupload&operation=<?php if($_G['basescript'] == 'portal') { ?>portal<?php } else { ?>album<?php } ?>",
post_params: {"uid" : "<?php echo $_G['uid'];?>", "hash":"<?php echo $swfconfig['hash'];?>"<?php if($_G['basescript'] == 'portal') { ?>,"aid":<?php echo $aid;?>,"catid":<?php echo $catid;?><?php } ?>},

// File Upload Settings
file_size_limit : "<?php echo $swfconfig['max'];?>",	// 100MB
file_types : "<?php echo $swfconfig['imageexts']['ext'];?>",
file_types_description : "<?php echo $swfconfig['imageexts']['depict'];?>",
file_upload_limit : 0,
file_queue_limit : 0,

// Event Handler Settings (all my handlers are in the Handler.js file)
swfupload_preload_handler : preLoad,
swfupload_load_failed_handler : loadFailed,
file_dialog_start_handler : fileDialogStart,
file_queued_handler : fileQueued,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_start_handler : uploadStart,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,

// Button Settings
button_image_url : "<?php echo IMGDIR;?>/uploadbutton.png",
button_placeholder_id : "imgSpanButtonPlaceholder",
button_width: 100,
button_height: 25,
button_cursor:SWFUpload.CURSOR.HAND,
button_window_mode: "transparent",

custom_settings : {
progressTarget : "imgUploadProgress",
uploadSource: 'portal',
uploadType: <?php if($_G['basescript'] == 'portal') { ?>'portal'<?php } else { ?>'blog'<?php } ?>,
imgBoxObj: $('imgattachlist')
//thumbnail_height: 400,
//thumbnail_width: 400,
//thumbnail_quality: 100
},

// Debug Settings
debug: false
});
</script>
<?php } else { if($_G['basescript'] == 'home') { ?>
<?php if(!empty($_G['setting']['pluginhooks']['spacecp_blog_upload_extend'])) echo $_G['setting']['pluginhooks']['spacecp_blog_upload_extend'];?>
<?php } elseif($_G['basescript'] == 'portal') { ?>
<?php if(!empty($_G['setting']['pluginhooks']['portalcp_top_upload_extend'])) echo $_G['setting']['pluginhooks']['portalcp_top_upload_extend'];?>
<?php } } ?>
<script type="text/javascript">
function switchImagebutton(btn) {
switchButton(btn, 'image');
$('icoImg_image_menu').style.height = '';
doane();
}
function hideAttachMenu(id) {
if($(id)) {
$(id).style.visibility = 'hidden';
}
}

function insertWWWImg() {
var urlObj = $('icoImg_image_param_1');
if(urlObj.value != '') {
var widthObj = $('icoImg_image_param_2');
var heightObj = $('icoImg_image_param_3');
insertImage(urlObj.value, null, widthObj.value, heightObj.value);
urlObj.value = widthObj.value = heightObj.value = '';
}
}
//note ѡ��ͼƬ
function picView(albumid, listid) {
if(albumid == 'none') {
$(listid).innerHTML = '';
} else {
ajaxget('home.php?mod=misc&ac=ajax&op=album&id='+albumid+'&ajaxdiv=albumpic_body', listid);
}
}
function createNewAlbum() {
var inputObj = $('newalbum');
if(inputObj.value == '' || inputObj.value == '�������������') {
inputObj.value = '�������������';
} else {
var x = new Ajax();
x.get('home.php?mod=misc&ac=ajax&op=createalbum&inajax=1&name=' + inputObj.value, function(s){
var aid = parseInt(s);
var albumList = $('savealbumid');
var haveoption = false;
for(var i = 0; i < albumList.options.length; i++) {
if(albumList.options[i].value == aid) {
albumList.selectedIndex = i;
haveoption = true;
break;
}
}
if(!haveoption) {
var oOption = document.createElement("OPTION");
oOption.text = trim(inputObj.value);
oOption.value = aid;
albumList.options.add(oOption);
albumList.selectedIndex = albumList.options.length-1;
}
inputObj.value = ''
});
selectCreateTab(1)
}
}
function selectCreateTab(flag) {
var vwObj = $('uploadPanel');
var opObj = $('createalbum');
var selObj = $('savealbumid');
if(flag) {
vwObj.style.display = '';
opObj.style.display = 'none';
selObj.value = selObj.options[0].value;
} else {
vwObj.style.display = 'none';
opObj.style.display = '';
}
}
</script>
<textarea class="userData" name="content" id="uchome-ttHtmlEditor" style="height: 100%; width: 100%; display: none; border: 0px"><?php echo $article_content['content'];?></textarea>
<div style="border:1px solid #C5C5C5;height:400px;"><iframe src="home.php?mod=editor&amp;charset=<?php echo CHARSET;?>&amp;allowhtml=1&amp;isportal=1" name="uchome-ifrHtmlEditor" id="uchome-ifrHtmlEditor" scrolling="no" border="0" frameborder="0" style="width:100%;height:100%;position:relative;"></iframe></div>
</div>

<?php if(!empty($_G['setting']['pluginhooks']['portalcp_middle'])) echo $_G['setting']['pluginhooks']['portalcp_middle'];?>

<div class="bm bml">
<div class="bm_h cl">
<h2>ժҪ</h2>
</div>
<div class="bm_c"><textarea name="summary" cols="80" class="pt" style="width: 98.7%; height: 51px;"><?php echo $article['summary'];?></textarea></div>
</div>

<div class="bm bml">
<div class="bm_h cl">
<h2>�ۺϱ�ǩ</h2>
</div>
<div class="bm_c"><?php if(is_array($article_tags)) foreach($article_tags as $key => $tag) { ?><input type="checkbox" name="tag[<?php echo $key;?>]" id="article_tag_<?php echo $key;?>" class="pc"<?php if($article_tags[$key]) { ?> checked="checked"<?php } ?> />
<label for="article_tag_<?php echo $key;?>" class="lb"><?php echo $tag_names[$key];?></label>
<?php } ?>
</div>
</div>

<div class="exfm">
<h2>���������� <a id="related_article" href="portal.php?mod=portalcp&amp;ac=related&amp;aid=<?php echo $aid;?>" class="xi2" style="text-decoration: underline;" onclick="showWindow(this.id, this.href+'&catid='+$('catid').value, 'get', 0);return false;">ѡ��</a></h2>
<ul id="raid_div" class="xl">
<?php if($article['related']) { if(is_array($article['related'])) foreach($article['related'] as $raid => $rtitle) { ?><li id="raid_li_<?php echo $raid;?>"><input type="hidden" name="raids[]" value="<?php echo $raid;?>" size="5"><a href="portal.php?mod=view&amp;aid=<?php echo $raid;?>" target="_blank"><?php echo $rtitle;?></a> (���� ID: <?php echo $raid;?>) <a href="javascript:;" onclick="raid_delete(<?php echo $raid;?>);" class="xg1">ɾ��</a></li>
<?php } } ?>
</ul>
</div>

<?php if(!empty($_G['setting']['pluginhooks']['portalcp_bottom'])) echo $_G['setting']['pluginhooks']['portalcp_bottom'];?>

<?php if(checkperm('seccode') && ($secqaacheck || $seccodecheck)) { ?><?php
$sectpl = <<<EOF
<sec> <span id="sec<hash>" onclick="showMenu(this.id)"><sec></span><div id="sec<hash>_menu" class="p_pop p_opt" style="display:none"><sec></div>
EOF;
?>
<div class="exfm pns"><?php $_G['sechashi'] = !empty($_G['cookie']['sechashi']) ? $_G['sechash'] + 1 : 0;
$sechash = 'S'.($_G['inajax'] ? 'A' : '').$_G['sid'].$_G['sechashi'];
$sectpl = !empty($sectpl) ? explode("<sec>", $sectpl) : array('<br />',': ','<br />','');
$sectpldefault = $sectpl;
$sectplqaa = str_replace('<hash>', 'qaa'.$sechash, $sectpldefault);
$sectplcode = str_replace('<hash>', 'code'.$sechash, $sectpldefault);
$secshow = !isset($secshow) ? 1 : $secshow;
$sectabindex = !isset($sectabindex) ? 1 : $sectabindex;?><?php
$__STATICURL = STATICURL;$seccheckhtml = <<<EOF

<input name="sechash" type="hidden" value="{$sechash}" />

EOF;
 if($sectpl) { if($secqaacheck) { 
$seccheckhtml .= <<<EOF

{$sectplqaa['0']}��֤�ʴ�{$sectplqaa['1']}<input name="secanswer" id="secqaaverify_{$sechash}" type="text" autocomplete="off" style="width:100px" class="txt px vm" onblur="checksec('qaa', '{$sechash}')" tabindex="{$sectabindex}" />
<a href="javascript:;" onclick="updatesecqaa('{$sechash}');doane(event);" class="xi2">��һ��</a>
<span id="checksecqaaverify_{$sechash}"><img src="{$__STATICURL}image/common/none.gif" width="16" height="16" class="vm" /></span>
{$sectplqaa['2']}<span id="secqaa_{$sechash}"></span>

EOF;
 if($secshow) { 
$seccheckhtml .= <<<EOF
<script type="text/javascript" reload="1">updatesecqaa('{$sechash}');</script>
EOF;
 } 
$seccheckhtml .= <<<EOF

{$sectplqaa['3']}

EOF;
 } if($seccodecheck) { 
$seccheckhtml .= <<<EOF

{$sectplcode['0']}��֤��{$sectplcode['1']}<input name="seccodeverify" id="seccodeverify_{$sechash}" type="text" autocomplete="off" style="
EOF;
 if($_G['setting']['seccodedata']['type'] != 1) { 
$seccheckhtml .= <<<EOF
ime-mode:disabled;
EOF;
 } 
$seccheckhtml .= <<<EOF
width:100px" class="txt px vm" onblur="checksec('code', '{$sechash}')" tabindex="{$sectabindex}" />
<a href="javascript:;" onclick="updateseccode('{$sechash}');doane(event);" class="xi2">��һ��</a>
<span id="checkseccodeverify_{$sechash}"><img src="{$__STATICURL}image/common/none.gif" width="16" height="16" class="vm" /></span>
{$sectplcode['2']}<span id="seccode_{$sechash}"></span>

EOF;
 if($secshow) { 
$seccheckhtml .= <<<EOF
<script type="text/javascript" reload="1">updateseccode('{$sechash}');</script>
EOF;
 } 
$seccheckhtml .= <<<EOF

{$sectplcode['3']}

EOF;
 } } 
$seccheckhtml .= <<<EOF


EOF;
?><?php unset($secshow);?><?php if(empty($secreturn)) { ?><?php echo $seccheckhtml;?><?php } ?></div>
<?php } ?>

<div class="ptm pbm">
<button type="button" id="issuance" class="pn pnc" name="articlebutton" onclick="validate(this);"><strong>�ύ</strong></button>
<label id="innernavele"<?php if($article['contents'] < 2) { ?> style="display: none"<?php } ?> for="ck_showinnernav"><input type="checkbox" name="showinnernav" id="ck_showinnernav" class="pc" value="1"<?php if(!empty($article['showinnernav'])) { ?>checked="checked"<?php } ?> />��ʾ��ҳ����</label>
</div>

<input type="hidden" id="aid" name="aid" value="<?php echo $article['aid'];?>" />
<input type="hidden" name="cid" value="<?php echo $article_content['cid'];?>" />
<input type="hidden" id="attach_ids" name="attach_ids" value="0" />
<input type="hidden" name="articlesubmit" value="true" />
<input type="hidden" name="formhash" value="<?php echo FORMHASH;?>" />
</form>
</div>
</div>
</div>
<iframe id="uploadframe" name="uploadframe" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank"></iframe>
<script type="text/javascript">
function from_get() {
var el = $('catid');
var catid = el ? el.value : 0;
window.location.href='portal.php?mod=portalcp&ac=article&from_idtype='+$('from_idtype').value+'&catid='+catid+'&from_id='+$('from_id').value+'&getauthorall='+($('getauthorall').checked ? '1' : '');
return true;
}
function validate(obj) {
var title = $('title');
if(title) {
var slen = strlen(title.value);
if (slen < 1 || slen > 80) {
alert("���ⳤ��(1~80�ַ�)������Ҫ��");
title.focus();
return false;
}
}
if(!check_catid()) {
return false;
}
edit_save();
window.onbeforeunload = null;
obj.form.submit();
return false;
}
function check_catid(){
var catObj = $("catid");
if(catObj) {
if (catObj.value < 1) {
alert("��ѡ��ϵͳ����");
catObj.focus();
return false;
}
}
return true;
}
function raid_add() {
var raid = $('raid').value;
if($('raid_li_'+raid)) {
alert('�������Ѿ���ӹ���');
return false;
}
var url = 'portal.php?mod=portalcp&ac=article&op=related&inajax=1&aid=<?php echo $article['aid'];?>&raid='+raid;
var x = new Ajax();
x.get(url, function(s){
s = trim(s);
if(s) {
$('raid_div').innerHTML += s;
} else {
alert('û���ҵ�ָ��������');
return false;
}
});
}
function raid_delete(aid) {
var node = $('raid_li_'+aid);
var p;
if(p = node.parentNode) {
p.removeChild(node);
}
}
function switchhl(obj, v) {
if(parseInt($('highlight_style_' + v).value)) {
$('highlight_style_' + v).value = 0;
obj.className = obj.className.replace(/ cnt/, '');
} else {
$('highlight_style_' + v).value = 1;
obj.className += ' cnt';
}
}
function change_title_color(hlid) {
var showid = hlid;
if(!$(showid + '_menu')) {
var str = '';
var coloroptions = {'0' : '#000', '1' : '#EE1B2E', '2' : '#EE5023', '3' : '#996600', '4' : '#3C9D40', '5' : '#2897C5', '6' : '#2B65B7', '7' : '#8F2A90', '8' : '#EC1282'};
var menu = document.createElement('div');
menu.id = showid + '_menu';
menu.className = 'cmen';
menu.style.display = 'none';
for(var i in coloroptions) {
str += '<a href="javascript:;" onclick="$(\'highlight_style_0\').value=\'' + coloroptions[i] + '\';$(\'' + showid + '\').style.backgroundColor=\'' + coloroptions[i] + '\';hideMenu(\'' + menu.id + '\')" style="background:' + coloroptions[i] + ';color:' + coloroptions[i] + ';">' + coloroptions[i] + '</a>';
}
menu.innerHTML = str;
$('append_parent').appendChild(menu);
}
showMenu({'ctrlid':hlid + '_ctrl','evt':'click','showid':showid});
}
if($('title')) {
$('title').focus();
}
function setConver(attach) {
$('conver').value = attach;
}

function deleteAttach(attachid, url) {
ajaxget(url);
$('attach_list_' + attachid).style.display = 'none';
if($('setconver' + attachid).checked) {
$('conver').value = '';
}
}
<?php if(!empty($article['conver'])) { ?>
setConver('<?php echo $article['conver'];?>');
<?php } ?>
function check_htmlname_exists(obj) {
name = obj.value;
var msg = $('checkhtmlnamemsg');
if(name && $('oldhtmlname').value != name) {
var catid = $('catid').value;
var aid = $('aid').value;
var x = new Ajax();
x.getJSON('portal.php?mod=portalcp&ac=article&op=checkhtmlname&htmlname='+name+'&catid='+catid+'&aid='+aid, function(s){
if(s['message'] == 'html_existed') {
obj.focus();
msg.style.color = 'red';
msg.style.paddingLeft = '10px';
msg.innerHTML = 'HTML��̬�ļ�������';
$('issuance').disabled = 'disabled';
} else {
msg.innerHTML = '';
$('issuance').disabled = '';
}
});
} else {
msg.innerHTML = '';
$('issuance').disabled = '';
}
}
</script>

<?php } include template('common/footer'); ?>