<?php exit("Powered by www.wikin.cn"); ?>
<!--{if $_GET[inajax]}-->
<input type="hidden" name="noticeauthor" value="$noticeauthor" />
 <input type="hidden" name="noticetrimstr" value="$noticetrimstr" />
 <input type="hidden" name="noticeauthormsg" value="$noticeauthormsg" />
 <input type="hidden" name="reppid" value="$reppid" />
 <!--{if $_GET[reppost]}-->
    <input type="hidden" name="reppost" value="$_GET[reppost]" />
    <!--{elseif $_GET[repquote]}-->
    <input type="hidden" name="reppost" value="$_GET[repquote]" />
    <!--{/if}-->
<!--{eval exit;}-->
<!--{/if}--> 
<!--{eval $header_nav='null';}-->
<!--{template common/header}-->
<!--{if CURSCRIPT == 'forum'}-->
<!--{eval $wq_smilies = get_system_smilies_from_js();}-->
<!--{/if}-->

<!--{eval $adveditor = $isfirstpost && $special && ($_GET['action'] == 'newthread' || $_GET['action'] == 'reply' && !empty($_GET['addtrade']) || $_GET['action'] == 'edit' );}-->
<form method="post" id="postform"
      {if $_GET[action] == 'newthread'}action="forum.php?mod=post&action={if $special != 2}newthread{else}newtrade{/if}&fid=$_G[fid]&extra=$extra&topicsubmit=yes&mobile=2"
      {elseif $_GET[action] == 'reply'}action="forum.php?mod=post&action=reply&fid=$_G[fid]&tid=$_G[tid]&extra=$extra&replysubmit=yes&mobile=2"
      {elseif $_GET[action] == 'edit'}action="forum.php?mod=post&action=edit&extra=$extra&editsubmit=yes&mobile=2" $enctype
      {/if}>
      <input type="hidden" name="formhash" id="formhash" value="{FORMHASH}" />
    <input type="hidden" name="posttime" id="posttime" value="{TIMESTAMP}"/>
    <!--{if !empty($_GET['modthreadkey'])}--><input type="hidden" name="modthreadkey" id="modthreadkey" value="$_GET['modthreadkey']" /><!--{/if}-->
    <!--{if $_GET[action] == 'reply'}-->
    <input type="hidden" name="noticeauthor" value="$noticeauthor" />
    <input type="hidden" name="noticetrimstr" value="$noticetrimstr" />
    <input type="hidden" name="noticeauthormsg" value="$noticeauthormsg" />
    <!--{if $reppid}-->
    <input type="hidden" name="reppid" value="$reppid" />
    <!--{/if}-->
    <!--{if $_GET[reppost]}-->
    <input type="hidden" name="reppost" value="$_GET[reppost]" />
    <!--{elseif $_GET[repquote]}-->
    <input type="hidden" name="reppost" value="$_GET[repquote]" />
    <!--{/if}-->
    <!--{/if}-->
    <!--{if $_GET[action] == 'edit'}-->
    <input type="hidden" name="fid" id="fid" value="$_G[fid]" />
    <input type="hidden" name="tid" value="$_G[tid]" />
    <input type="hidden" name="pid" value="$pid" />
    <input type="hidden" name="page" value="$_GET[page]" />
    <!--{/if}-->

    <!--{if $special}-->
    <input type="hidden" name="special" value="$special" />
    <!--{/if}-->
    <!--{if $specialextra}-->
    <input type="hidden" name="specialextra" value="$specialextra" />
    <!--{/if}-->
    <!--{block actiontitle}-->
    <!--{if $_GET['action'] == 'newthread'}-->
    <!--{if $special == 0}-->{lang post_newthread}
    <!--{elseif $special == 1}-->{lang post_newthreadpoll}
    <!--{elseif $special == 2}-->{lang post_newthreadtrade}
    <!--{elseif $special == 3}-->{lang post_newthreadreward}
    <!--{elseif $special == 4}-->{lang post_newthreadactivity}
    <!--{elseif $special == 5}-->{lang post_newthreaddebate}
    <!--{elseif $specialextra}-->{$_G['setting']['threadplugins'][$specialextra][name]}
    <!--{/if}-->
    <!--{elseif $_GET['action'] == 'reply' && !empty($_GET['addtrade'])}-->
    {lang trade_add_post}
    <!--{elseif $_GET['action'] == 'reply'}-->
    {lang join_thread}
    <!--{elseif $_GET['action'] == 'edit'}-->
    <!--{if $special == 2}-->{lang edit_trade}<!--{else}-->{lang edit_thread}<!--{/if}-->
    <!--{/if}-->
    <!--{/block}-->
    <!-- main postbox start -->
    <div class="wp post_title">{$actiontitle}-<!--{eval echo strip_tags($_G['forum']['name']) ? strip_tags($_G['forum']['name']) : $_G['forum']['name'];}--></div>
    <div class="wp">

        <!--{if $_GET[action] == 'newthread'}-->
        <!--{eval $post_nav_num=0;$postform_nav_li='';}-->

        <!--{loop $_G['forum']['threadsorts'][types] $tsortid $name}-->
        <!--{eval $postform_nav_li.=' <li'.($sortid == $tsortid?' class="a"':'').'><a href="forum.php?mod=post&action=newthread&sortid='.$tsortid.'&fid='.$_G['fid'].'">'. strip_tags($name).'</a></li>';$post_nav_num++;}-->
        <!--{/loop}-->

        <!--{if $_G['group']['allowpostpoll']}-->
        <!--{eval $postform_nav_li.=' <li '.$postspecialcheck[1].'><a href="forum.php?mod=post&action=newthread&special=1&fid='.$_G['fid'].'">&#x6295;&#x7968;</a></li>';$post_nav_num++;}-->
        <!--{/if}-->

        <!--{if $_G['group']['allowpostreward']}-->
        <!--{eval $postform_nav_li.=' <li '.$postspecialcheck[3].'><a href="forum.php?mod=post&action=newthread&special=3&fid='.$_G['fid'].'">&#x60AC;&#x8D4F;</a></li>';$post_nav_num++;}-->
        <!--{/if}-->

        <!--{if $_G['group']['allowpostdebate']}-->
        <!--{eval $postform_nav_li.=' <li '.$postspecialcheck[5].'><a href="forum.php?mod=post&action=newthread&special=5&fid='.$_G['fid'].'">&#x8FA9;&#x8BBA;</a></li>';$post_nav_num++;}-->
        <!--{/if}-->

        <!--{if $_G['group']['allowpostactivity']}-->
        <!--{eval $postform_nav_li.=' <li '.$postspecialcheck[4].'><a href="forum.php?mod=post&action=newthread&special=4&fid='.$_G['fid'].'">&#x6D3B;&#x52A8;</a></li>';$post_nav_num++;}-->
        <!--{/if}-->

        <!--{if $_G['group']['allowposttrade']}-->
        <!--{eval $postform_nav_li.=' <li '.$postspecialcheck[2].'><a href="forum.php?mod=post&action=newthread&special=2&fid='.$_G['fid'].'">&#x51FA;&#x552E;</a></li>';$post_nav_num++;}-->
        <!--{/if}-->

        <!--{if !$_G['forum']['threadsorts']['required'] && !$_G['forum']['allowspecialonly']}-->
        <!--{eval $postform_nav_li.='<li '.$postspecialcheck[0].'><a href="forum.php?mod=post&action=newthread&fid='.$_G['fid'].'">&#x5E16;&#x5B50;</a></li>';$post_nav_num++;}-->
        <!--{/if}-->
        <!--{if $post_nav_num>1}-->
        <!--{if $post_nav_num<4}-->
        <!--{eval $post_nav_width=100/$post_nav_num;}-->
        <style> .post_over_li li{width:{$post_nav_width}% }</style>
        <!--{else}-->
        <style>.my_wechat_tag .tag_list{width:2000px;}</style>
        <!--{/if}-->
        <div class="{if $post_nav_num>=4}my_wechat_tag{else}post_over_li{/if}" id="my_wechat_tag" style="overflow: hidden;">
            <div class="tag_list">
                <ul>$postform_nav_li</ul>
            </div>
        </div>
        <!--{/if}-->
        <!--{if $post_nav_num>=4}-->
        <script type="text/javascript" src="{$_G['style'][styleimgdir]}mobile/js/isScroll.min.js?{VERHASH}"></script>
        <script>
                    var post_selection_w_width = $('.my_wechat_tag ul').width();
            $('.tag_list').css('width', post_selection_w_width + (wq_window_width / 10))
            myscroll = new iScroll("my_wechat_tag", {
                hScrollbar: false,
                vScroll: false,
                bounce: true,
            });
            var my_wechat_tag = $('#my_wechat_tag .a').offset().left;
            if (my_wechat_tag > wq_window_width / 2) {
                var scrollTo_right = my_wechat_tag - (wq_window_width / 2);
                myscroll.scrollTo(-scrollTo_right, 0, 1500);
            }
        </script>
        <!--{/if}-->
        <!--{/if}-->
        <div class="post_from">
            <ul class="cl">
                <!--{if $isfirstpost && !empty($_G['forum'][threadtypes][types])}-->
                <li class="bl_line">
                    <select id="typeid" name="typeid" class="sort_sel b_all">
                        <option value="0" selected="selected">{lang select_thread_catgory}</option>
                        <!--{loop $_G['forum'][threadtypes][types] $typeid $name}-->
                        <!--{if empty($_G['forum']['threadtypes']['moderators'][$typeid]) || $_G['forum']['ismoderator']}-->
                        <option value="$typeid"{if $thread['typeid'] == $typeid || $_GET['typeid'] == $typeid} selected="selected"{/if}><!--{echo strip_tags($name);}--></option>
                        <!--{/if}-->
                        <!--{/loop}-->
                    </select>
                </li>
                <!--{/if}-->
                <li class="bl_line">
                    <!--{if $sortid}-->
                    <input type="hidden" name="sortid" value="$sortid" />
                    <!--{/if}-->
                    <!--{if $_GET['action'] != 'reply'}-->
                    <input type="text" tabindex="1" class="title_p b_bottom" id="needsubject" size="30" autocomplete="off" value="$postinfo[subject]" name="subject" placeholder="{lang thread_subject}" fwin="login">
                    <!--{if $_GET[action] == 'newthread'||$_GET[action] == 'edit'}-->
                    <!--{template common/checked}-->
                    <!--{if $showthreadsorts}-->
                    <div class="exfm cl bl_none">
                        <!--{template forum/post_sortoption}-->
                    </div>
                    <!--{elseif $adveditor}-->
                    <!--{if $special == 1}-->
                    <!--{template forum/post_poll}-->
                    <!--{elseif $special == 2 && ($_GET[action] != 'edit' || ($_GET[action] == 'edit' && ($thread['authorid'] == $_G['uid'] && $_G['group']['allowposttrade'] || $_G['group']['allowedittrade'])))}-->
                    <!--{template forum/post_trade}-->
                    <!--{elseif $special == 3}-->
                    <!--{template forum/post_reward}-->
                    <!--{elseif $special == 4}-->
                    <!--{template forum/post_activity}-->
                    <!--{elseif $special == 5}-->
                    <!--{template forum/post_debate}-->
                    <!--{elseif $specialextra}-->
                    <div class="specialpost s_clear">$threadplughtml</div>
                    <!--{/if}-->
                    <!--{/if}-->
                    <!--{/if}-->
                    <!--{else}-->
                    <span class="post_reply">RE: $thread['subject']</span>
                    <!--{if $quotemessage}-->$quotemessage<!--{/if}-->
                    <!--{/if}-->
                </li>
                <!--{if $_GET[action] == 'edit' && $isorigauthor && ($isfirstpost && $thread['replies'] < 1 || !$isfirstpost) && !$rushreply && $_G['setting']['editperdel']}-->
                <li class="bl_line p_l_b1 b_bottom">
                    <input type="checkbox" name="delete" id="delete" class="pc" value="1" title="{lang post_delpost}{if $thread[special] == 3}{lang reward_price_back}{/if}"> <label><i class="xzk"></i>{lang delete_check}</label>
                </li>
                <!--{/if}-->
                <!--{if $_G[forum_thread][special] == 5 && empty($firststand)}-->
                <li class="point_view b_top_bottom">
                    <select id="stand" name="stand">
                        <option value="">{lang debate_viewpoint}</option>
                        <option value="0"<!--{if $_GET[stand] == '0'}--> selected="selected"<!--{/if}-->>{lang debate_neutral}</option>
                        <option value="1"<!--{if $_GET[stand] == '1'}--> selected="selected"<!--{/if}-->>{lang debate_square}</option>
                        <option value="2"<!--{if $_GET[stand] == '2'}--> selected="selected"<!--{/if}-->>{lang debate_opponent}</option>
                    </select>
                </li>
                <!--{/if}-->
                <div class="bl_none area">
                    <div class="x_line"><textarea class="pt" id="needmessage" tabindex="3" autocomplete="off" id="{$editorid}_textarea" name="$editor[textarea]" cols="80" rows="2"  placeholder="{lang thread_content}" fwin="reply">$postinfo[message]</textarea></div>
                </div>
                <!--{if $_GET[action] != 'edit' && ($secqaacheck || $seccodecheck)}-->
                <!--{template common/seccheck}-->
                <!--{/if}-->
                <li style="position:relative; margin-bottom:10px;">
                    <span class="wqiconfont wqicon-emoji f30 m_l10 c_smile m_r30 wqexpression"></span>
                    <a href="javascript:;" id="upload_icon" class="wqiconfont wqicon-camara f30">
                        <input type="button" id="file_button" style="width:65px;height:40px;font-size:30px;opacity:0; position:absolute; top:0px; left:60px;"/>
                        <input type="file" name="Filedata" id="filedata"  style="display:none" accept="image/*" />
                        <i class="today_p l94" style="display: none">0</i>
                    </a>
                    <span class="y m_r10">
                        <button id="postsubmit" class="btn_pn <!--{if $_GET[action] == 'edit'}-->btn_pn_blue" disable="false"<!--{else}-->btn_pn_grey" disable="true"<!--{/if}-->><span>
                                <!--{if $_GET[action] == 'newthread'}-->{lang send_thread}<!--{elseif $_GET[action] == 'reply'}-->{lang join_thread}<!--{elseif $_GET[action] == 'edit'}-->
                                {lang edit_save}<!--{/if}--></span></button></span>
                </li>
            </ul>
            <ul id="imglist" class="post_imglist cl bl_line" style="display:none">
                <li id="increase" onclick="$('#file_button').click();"><i class="wqiconfont wqicon-increase"></i></li>
            </ul>
            <div class="cellphone_expression" style="display:none;">
                <ul class="look_smile expression">
                    <!--{loop $wq_smilies  $key $val}-->
                    <li id="li_$key" data="$key" <!--{if $key==0}--> class="on" <!--{/if}--> ><a href="javascript:;" class="b_right"><img src="./static/image/smiley/$val[0][image]" /></a></li>
                    <!--{if $key==5}-->
                    <!--{eval break;}-->
                    <!--{/if}-->
                    <!--{/loop}-->
                </ul>

                <div class="look_smile_div" style="position: relative">
                    <!--{eval $delete_emoji='<a class="delete_emoji"><img src="template/wq_touch/src/mobile/images/delete_emoji.png" /></a>';}-->
                    <!--{loop $wq_smilies $key $val}-->
                    <!--{eval $count=count($val);$data_html='';}-->
                    <div id="wqscrolls_$key" data="$key" class='wqscrolls'<!--{if $key!=0}-->style="display:none;"<!--{/if}--> >
                         <div id="wqscroll_$key" class="scroll_lb">
                            <div class="scroll_lump">
                                <!--{loop $val $k $v}-->
                                <!--{if ($k+1)%20==1}-->
                                <!--{eval $data_html.=$k==0?'<span class="small_dots on"></span>':'<span class="small_dots"></span>';}-->
                                <div class="image_b">
                                    <!--{/if}-->
                                    <!--{eval $v[code]=str_replace(array("/","'"),array("","\'"), $v['code']);}-->
                                    <a href="javascript:;" onclick="expression_insertunit('needmessage', '$v[code]')"><img class="delayload"  data="./static/image/smiley/$v[image]"/></a>
                                    <!--{echo ($k+1)%20==0 ||($k+1)==$count ?$delete_emoji.'</div>':'';}-->
                                    <!--{/loop}-->
                                </div>
                            </div>
                            <!--{if $k>=20}-->
                            <p class="small_dots_t" id="small_dots_t_$key">$data_html</p>
                            <!--{/if}-->
                        </div>
                        <!--{if $key==5}-->
                        <!--{eval break;}-->
                        <!--{/if}-->
                        <!--{/loop}-->
                    </div>
                </div>

                <!--{hook/post_bottom_mobile}-->
            </div>
        </div>
        <!--main postbox start-->
</form>
<script src="{$_G['style'][styleimgdir]}mobile/js/swipe.js"></script>
<script>
                                                function expression_insertunit(id, content) {
                                                    var id_val = $('#' + id).val();
                                                    $('#' + id).val(id_val + content);
                                                }
                                        $(function () {
                                            $(document).on('blur', 'input:text,input[type="tel"],textarea', function () {
                                                $('.footbar').show();
                                            });
                                            $(document).on('focus', 'input:text,input[type="tel"],textarea', function () {
                                                $('.footbar').hide();
                                            });
                                            function delayload(j, index) {
                                                $("#wqscroll_" + j + " .image_b[data-index=\"" + index + "\"] .delayload").each(function () {
                                                    var img = $(this).attr("data");
                                                    $(this).attr("src", img).attr("class", null);
                                                });
                                            }
                                            function expression_viwepager() {
                                                if (typeof ($('.wqscrolls:visible').attr('data')) != "undefined") {
                                                    var j = $('.wqscrolls:visible').attr('data');
                                                    var bullets = $('.small_dots_t:visible span');
                                                    window.Swipe(document.getElementById('wqscroll_' + j), {
                                                        continuous: true,
                                                        callback: function (pos, y, direction, ids) {
                                                            var s = i = bullets.length;
                                                            delayload(ids, pos);
                                                            if (i == 2 && pos > 1) {
                                                                pos = pos - 2;
                                                            }
                                                            while (i--) {
                                                                bullets[i].className = 'small_dots';
                                                            }
                                                            bullets[pos].className = 'small_dots on';
                                                        }
                                                    }, j);
                                                    delayload(j, 0);
                                                    j = $('.wqscrolls:visible').attr('data', null);
                                                }
                                            }
                                            $('.expression li').click(function () {
                                                var date = $(this).attr('data');
                                                $('.wqscrolls').hide();
                                                $('#wqscrolls_' + date).show();
                                                if (!$(this).is('.on')) {
                                                    expression_viwepager();
                                                }
                                                $('.expression li').removeClass('on');
                                                $(this).addClass('on');
                                            })
                                            $('.wqexpression').on('click', function () {
                                                if ($(this).is('.c_jianpan')) {
                                                    $('#needmessage').focus();
                                                }
                                                $(this).toggleClass('wqicon-emoji wqicon-jianpan c_jianpan');
                                                if ($('.cellphone_expression').is(':hidden')) {
                                                    $('#imglist').hide();
                                                    $('.cellphone_expression').show();
                                                    $('#upload_icon').removeClass('blue');
                                                    expression_viwepager();
                                                } else {
                                                    $('.cellphone_expression').hide();
                                                }
                                            })
                                            $('.delete_emoji').on('click', function () {
                                                var content = $('#needmessage').val();
                                                var start = content.length - 2;
                                                var last = content.substr(start, 2);
                                                if (last == ":}") {
                                                    var position = content.lastIndexOf('{:');
                                                    content = content.substr(0, position);
                                                } else {
                                                    content = content.substring(0, content.length - 1);
                                                }
                                                $('#needmessage').val(content);
                                            })
                                            $('#needmessage').on('keydown', function (event) {
                                                if (event.keyCode == "8") {
                                                    var content = $('#needmessage').val();
                                                    var start = content.length - 2;
                                                    var last = content.substr(start, 2);
                                                    if (last == ":}") {
                                                        var position = content.lastIndexOf('{:');
                                                        content = content.substr(0, position);
                                                        $('#needmessage').val(content);
                                                        return false;
                                                    }
                                                }
                                            });
                                            var needsubject = needmessage = false;
                                            if ('{$_GET[action]}' == 'reply') {
                                                needsubject = true;
                                            } else if ('{$_GET[action]}' == 'edit') {
                                                needsubject = needmessage = true;
                                            }
                                            if ('{$_GET[action]}' == 'newthread' || ('$_GET[action]' == 'edit' && '$isfirstpost')) {
                                                $('#needsubject').on('keyup input', function () {
                                                    var obj = $(this);
                                                    if (obj.val()) {
                                                        needsubject = true;
                                                        if (needmessage == true) {
                                                            $('.btn_pn').removeClass('btn_pn_grey').addClass('btn_pn_blue');
                                                            $('.btn_pn').attr('disable', 'false');
                                                        }
                                                    } else {
                                                        needsubject = false;
                                                        $('.btn_pn').removeClass('btn_pn_blue').addClass('btn_pn_grey');
                                                        $('.btn_pn').attr('disable', 'true');
                                                    }
                                                });
                                            }
                                            $('#needmessage').on('keyup input', function () {
                                                var obj = $(this);
                                                if (obj.val()) {
                                                    needmessage = true;
                                                    if (needsubject == true) {
                                                        $('.btn_pn').removeClass('btn_pn_grey').addClass('btn_pn_blue');
                                                        $('.btn_pn').attr('disable', 'false');
                                                    }
                                                } else {
                                                    needmessage = false;
                                                    $('.btn_pn').removeClass('btn_pn_blue').addClass('btn_pn_grey');
                                                    $('.btn_pn').attr('disable', 'true');
                                                }
                                            });
                                        })
</script>
<script type="text/javascript" src="./template/wq_touch/src/mobile/js/buildfileupload.js"></script>
<script type="text/javascript">
                                        var imgexts = typeof imgexts == 'undefined' ? 'jpg, jpeg, gif, png' : imgexts;
                                        var STATUSMSG = {
                                            '-1': '{lang uploadstatusmsgnag1}',
                                            '0': '{lang uploadstatusmsg0}',
                                            '1': '{lang uploadstatusmsg1}',
                                            '2': '{lang uploadstatusmsg2}',
                                            '3': '{lang uploadstatusmsg3}',
                                            '4': '{lang uploadstatusmsg4}',
                                            '5': '{lang uploadstatusmsg5}',
                                            '6': '{lang uploadstatusmsg6}',
                                            '7': '{lang uploadstatusmsg7}(' + imgexts + ')',
                                            '8': '{lang uploadstatusmsg8}',
                                            '9': '{lang uploadstatusmsg9}',
                                            '10': '{lang uploadstatusmsg10}',
                                            '11': '{lang uploadstatusmsg11}'
                                        };
                                        var uploadsuccess_forum;
                                        var maxheight = '$wq_touch_setting[maxheight]' < 1 ? 0 : parseInt('$wq_touch_setting[maxheight]');
                                        var maxwidth = '$wq_touch_setting[maxwidth]' < 1 ? 0 : parseInt('$wq_touch_setting[maxwidth]');
                                        function picture(uploadsuccess, id, name, url) {
                                            var uploadurl = url ? url : 'misc.php?mod=swfupload&operation=upload&type=image&inajax=yes&infloat=yes&simple=2';
                                            popup.open('<img src="' + IMGDIR + '/imageloading.gif">');
                                            $.buildfileupload({
                                                uploadurl: uploadurl,
                                                files: document.getElementById(id).files,
                                                uploadformdata: {uid: "$_G[uid]", hash: "{echo  md5(substr(md5($_G[config][security][authkey]), 8).$_G[uid])}"},
                                                uploadinputname: name,
                                                maxfilesize: "$swfconfig[max]",
                                                maxheight: maxheight,
                                                maxwidth: maxwidth,
                                                success: uploadsuccess,
                                                error: function () {
                                                    popup.open('{lang uploadpicfailed}', 'alert');
                                                }
                                            });
                                        }
                                        $(document).on('change', '#filedata', function () {
                                            if ($(this).val()) {
                                                picture(uploadsuccess_forum, 'filedata', 'Filedata');
                                            }
                                        });
                                        var forum_upload = function (data) {
                                            if (data == '') {
                                                popup.open('{lang uploadpicfailed}', 'alert');
                                            }
                                            var dataarr = data.split('|');
                                            if (dataarr[0] == 'DISCUZUPLOAD' && dataarr[2] == 0) {
                                                popup.close();
                                                if ($('#imglist').is(':hidden')) {
                                                    $('.cellphone_expression').hide();
                                                    $('.wqexpression').removeClass('c_jianpan').removeClass('wqicon-jianpan').addClass('wqicon-emoji');
                                                    $('#imglist').show();
                                                    $('#upload_icon').addClass('blue');
                                                }
                                                $('#imglist').prepend('<li><span aid="' + dataarr[3] + '" class="del"><a href="javascript:;">\n\
                                  <i class="wqiconfont wqicon-delete f22 wq_del"></i></a></span><span class="p_img"><a href="javascript:;"><img style="height:54px;width:54px;" id="aimg_' + dataarr[3] + '" title="' + dataarr[6] + '" src="{$_G[setting][attachurl]}forum/' + dataarr[5] + '" /></a></span><input type="hidden" name="attachnew[' + dataarr[3] + '][description]" /></li>');
                                                $('.today_p').show().text($('#imglist li').length - 1);
                                                $('#filedata').val('');
                                            } else {
                                                var sizelimit = '';
                                                if (dataarr[7] == 'ban') {
                                                    sizelimit = '{lang uploadpicatttypeban}';
                                                } else if (dataarr[7] == 'perday') {
                                                    sizelimit = '{lang donotcross}' + Math.ceil(dataarr[8] / 1024) + 'K)';
                                                } else if (dataarr[7] > 0) {
                                                    sizelimit = '{lang donotcross}' + Math.ceil(dataarr[7] / 1024) + 'K)';
                                                }
                                                popup.open(STATUSMSG[dataarr[2]] + sizelimit, 'alert');
                                            }
                                        };
                                        $(document).on('click', '#file_button', function () {
                                            if ($('#imglist li').length == 1 || $('#imglist').is(':visible')) {
                                                uploadsuccess_forum = forum_upload;
                                                $('#filedata').click();
                                            } else {
                                                $('.cellphone_expression').hide();
                                                $('.wqexpression').removeClass('c_jianpan').removeClass('wqicon-jianpan').addClass('wqicon-emoji');
                                                $('#imglist').show();
                                                $('#upload_icon').addClass('blue');
                                            }
                                        });

                                        $(document).on('click', '#postsubmit', function () {
                                            var form = $('#postform');
                                            var obj = $('#postsubmit');
                                            if (obj.attr('disable') == 'true') {
                                                return false;
                                            }
                                            popup.open('<img src="' + IMGDIR + '/imageloading.gif">');
                                            var postlocation = '';
                                            if (geo.errmsg === '' && geo.loc) {
                                                postlocation = geo.longitude + '|' + geo.latitude + '|' + geo.loc;
                                            }
                                            $.ajax({
                                                type: 'POST',
                                                url: form.attr('action') + '&geoloc=' + postlocation + '&handlekey=' + form.attr('id') + '&inajax=1',
                                                data: form.serialize(),
                                                dataType: 'xml'
                                            }).success(function (s) {
                                                popup.open(s.lastChild.firstChild.nodeValue);
                                                if ('$_GET[do]' == 'broadcast') {
                                                    location.href = 'home.php?mod=follow';
                                                }
                                            }).error(function () {
                                                popup.open('{lang networkerror}', 'alert');
                                            });
                                            return false;
                                        });
                                        $(document).on('click', '.del', function () {
                                            var obj = $(this);
                                            $.ajax({
                                                type: 'GET',
                                                url: 'forum.php?mod=ajax&action=deleteattach&inajax=yes&aids[]=' + obj.attr('aid'),
                                            }).success(function (s) {
                                                obj.parent().remove();
                                                if ($('#imglist li').length - 1 == 0) {
                                                    $('.today_p').hide();
                                                }
                                                $('.today_p').text($('#imglist li').length - 1);
                                            }).error(function () {
                                                popup.open('{lang networkerror}', 'alert');
                                            });
                                            return false;
                                        });
</script>
<!--{eval $nofooter = true;}-->
<!--{template common/footer}-->
