You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
263 lines
9.1 KiB
263 lines
9.1 KiB
{template 'header', 'member'}
|
|
<div id="head-bar">
|
|
<div class="head-bar">
|
|
<div class="head-bar-back"><a href="{if $back_link}{$back_link}{else}javascript:Dback();" id="back-{$js_pageid}{/if}" data-direction="reverse"><img src="{DT_MOB}static/img/icon-back.png" width="24" height="24"/></a></div>
|
|
<div class="head-bar-title">{$MOD[name]}{if $action=='add'}发布{elseif $action=='edit'}修改{else}管理{/if}</div>
|
|
<div class="head-bar-right">
|
|
{if $action=='add'}
|
|
<a href="?mid={$mid}&status=3"><img src="{DT_MOB}static/img/icon-cancel.png" width="24" height="24"/></a>
|
|
{else}
|
|
<a href="?mid={$mid}&action=add"><img src="{DT_MOB}static/img/icon-add.png" width="24" height="24"/></a>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
<div class="head-bar-fix" id="load-fix-{$js_pageid}" style="height:0;"></div>
|
|
<div class="head-bar-fix" id="head-fix-{$js_pageid}"></div>
|
|
</div>
|
|
{if $action=='add'}
|
|
<script type="text/javascript" src="{DT_MOB}static/lib/webuploader.min.js?v={if DT_DEBUG}{DT_TIME}{else}{DT_REFRESH}{/if}"></script>
|
|
<div class="ui-form">
|
|
<iframe src="" name="send" id="send" style="display:none;"></iframe>
|
|
<form method="post" action="?" id="dform" target="send" data-ajax="false" onsubmit="return check();">
|
|
<input type="hidden" name="action" value="{$action}"/>
|
|
<input type="hidden" name="mid" value="{$mid}"/>
|
|
<input type="hidden" name="itemid" value="{$itemid}"/>
|
|
<input type="hidden" name="forward" value="{$forward}"/>
|
|
<input type="hidden" name="post[linkurl]" value="{$linkurl}"/>
|
|
<p>您的提问<em>*</em><b id="dtitle"></b></p>
|
|
<div><input name="post[title]" type="text" id="title" value="{$title}"/></div>
|
|
<p>问题分类<em>*</em><b id="dcatid"></b></p>
|
|
<div>{ajax_category_select('post[catid]', '选择分类', $catid, $moduleid)}</div>
|
|
{if $CP}
|
|
<script type="text/javascript">
|
|
var property_catid = {$catid};
|
|
var property_itemid = {$itemid};
|
|
var property_admin = 0;
|
|
</script>
|
|
<script type="text/javascript" src="{DT_STATIC}file/script/property.js?v={if DT_DEBUG}{DT_TIME}{else}{DT_REFRESH}{/if}"></script>
|
|
<section id="load_property" style="display:none;"></section>
|
|
{/if}
|
|
{if $FD}{fields_html('', '', $item)}{/if}
|
|
<p>补充说明</p>
|
|
</div>
|
|
<input type="hidden" name="post[content]" id="content"/>
|
|
<ul class="ui-editor-toolbar">
|
|
<li class="ui-editor-img"><div id="editor-picker"></div></li>
|
|
<li class="ui-editor-bold" id="editor-bold" editor-action="bold">B</li>
|
|
<li class="ui-editor-italic" id="editor-italic" editor-action="italic">I</li>
|
|
<li class="ui-editor-underline" id="editor-underline" editor-action="underline">U</li>
|
|
</ul>
|
|
<div class="ui-editor-content" id="editor">{$content}</div>
|
|
<script type="text/javascript" src="{DT_MOB}static/js/editor.js?v={if DT_DEBUG}{DT_TIME}{else}{DT_REFRESH}{/if}"></script>
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
$('#editor').DEditor({
|
|
editorid: 'editor',
|
|
textareaid: 'content',
|
|
server: UPPath+'?moduleid={$moduleid}&action=webuploader&from=editor'
|
|
});
|
|
});
|
|
</script>
|
|
<div class="ui-form">
|
|
{if $action=='add'}
|
|
<p>悬赏{$DT[credit_name]}</p>
|
|
<div>
|
|
<select name="post[credit]" id="credit">
|
|
{loop $CREDITS $v}
|
|
<option value="{$v}"{if $v==$credit} selected{/if}>{$v}</option>
|
|
{/loop}
|
|
</select>
|
|
您目前的{$DT[credit_name]}为{$_credit}
|
|
</div>
|
|
<p>匿名设定</p>
|
|
<div>
|
|
<input type="checkbox" name="post[hidden]" value="1" id="hidden"><label for="hidden">您可以对问题设定匿名,但您需要付出{$MOD[credit_hidden]}{$DT[credit_name]} </label>
|
|
</div>
|
|
{/if}
|
|
{if $fee_add}
|
|
<p>发布此信息需消费</p>
|
|
<div><span class="f_b f_red">{$fee_add}</span> {$fee_unit}</div>
|
|
{if $fee_currency == 'money'}
|
|
<p>{$DT[money_name]}余额</p>
|
|
<div><span class="f_blue f_b">{$_money}{$fee_unit}</span> <a href="charge.php?action=pay" class="b">[充值]</a></div>
|
|
{else}
|
|
<p>{$DT[credit_name]}余额</p>
|
|
<div><span class="f_blue f_b">{$_credit}{$fee_unit}</span> <a href="credit.php?action=buy" class="b">[购买]</a></div>
|
|
{/if}
|
|
{/if}
|
|
{if $need_password}
|
|
<p>支付密码<em>*</em><b id="dpassword"></b></p>
|
|
<div><input type="password" name="password" value="" id="password" autocomplete="off"/></div>
|
|
{/if}
|
|
{if $need_question}
|
|
<p>验证问题<em>*</em><b id="danswer"></b></p>
|
|
<div>{template 'question', 'chip'}</div>
|
|
{/if}
|
|
{if $need_captcha}
|
|
<p>验证码<em>*</em><b id="dcaptcha"></b></p>
|
|
<div>{template 'captcha', 'chip'}</div>
|
|
{/if}
|
|
<div class="blank-16"></div>
|
|
<input type="submit" name="submit" value="{if $action == 'edit'}修改{else}发布{/if}" class="btn-blue"/>
|
|
<div class="blank-32"></div>
|
|
</div>
|
|
</form>
|
|
<script type="text/javascript">
|
|
function thumb_action() {
|
|
Dsheet('{$js_pageid}','<a href="javascript:thumb_delete();void(0);"><span style="color:red;">删除图片</span></a>', '取消', '确定要删除图片吗?');
|
|
}
|
|
function thumb_delete() {
|
|
$('#thumb').val('');
|
|
$('.ui-form-thumb-show').html('');
|
|
$('.ui-form-thumb-show').hide();
|
|
$('.ui-form-thumb-upload').show();
|
|
}
|
|
function thumb_show(url) {
|
|
$('#thumb').val(url);
|
|
$('.ui-form-thumb-show').html('<img src="'+url+'"/>');
|
|
$('.ui-form-thumb-show').show();
|
|
$('.ui-form-thumb-upload').hide();
|
|
}
|
|
var thumbu = WebUploader.create({
|
|
auto: true,
|
|
server: UPPath+'?moduleid={$moduleid}&action=webuploader&from=thumb&width={$MOD[thumb_width]}&height={$MOD[thumb_height]}',
|
|
pick: '#thumb-picker',
|
|
accept: {
|
|
title: 'Images',
|
|
extensions: 'gif,jpg,jpeg,bmp,png',
|
|
mimeTypes: 'image/*'
|
|
},
|
|
resize: false
|
|
});
|
|
thumbu.on('fileQueued', function(file) {
|
|
Dtoast('{$js_pageid}',L['uploading'], '', 30);
|
|
});
|
|
thumbu.on('uploadProgress', function(file, percentage) {
|
|
var p = parseInt(percentage * 100);
|
|
$('.ui-toast').html(p > 99 ? L['processing'] : L['uploading']+p+'%');
|
|
});
|
|
thumbu.on('uploadSuccess', function(file, data) {
|
|
if(data.error) {
|
|
Dtoast('{$js_pageid}',data.message, '', 5);
|
|
} else {
|
|
thumb_show(data.url);
|
|
}
|
|
});
|
|
thumbu.on('uploadError', function(file, data) {
|
|
Dtoast('{$js_pageid}',data.message, '', 5);
|
|
});
|
|
thumbu.on('uploadComplete', function(file) {
|
|
$('.ui-toast').hide();
|
|
});
|
|
{if $thumb}
|
|
$(function(){
|
|
thumb_show('{$thumb}');
|
|
});
|
|
{/if}
|
|
</script>
|
|
{load('clear.js')}
|
|
{else}
|
|
<div class="ui-form">
|
|
<form action="?">
|
|
<input type="hidden" name="mid" value="{$mid}"/>
|
|
<input type="hidden" name="status" value="{$status}"/>
|
|
<div><input type="search" name="kw" value="{$kw}" placeholder="{$L[kw]}"/></div>
|
|
</form>
|
|
</div>
|
|
{if $_userid}
|
|
<script type="text/javascript">$(function(){Stabs('{$js_pageid}');});</script>
|
|
<div class="list-menu" id="tabs-{$js_pageid}">
|
|
<ul>
|
|
<a href="?mid={$mid}&status=3"><li{if $status==3} class="on"{/if} id="s3">已发布{if !$kw} {$nums[3]}{/if}</li></a>
|
|
<a href="?mid={$mid}&status=2"><li{if $status==2} class="on"{/if} id="s2">审核中{if !$kw} {$nums[2]}{/if}</li></a>
|
|
<a href="?mid={$mid}&status=1"><li{if $status==1} class="on"{/if} id="s1">未通过{if !$kw} {$nums[1]}{/if}</li></a>
|
|
</ul>
|
|
</div>
|
|
{/if}
|
|
<form method="post">
|
|
{if $lists}
|
|
{loop $lists $v}
|
|
<div class="list-img">
|
|
<input type="checkbox" name="itemid[]" value="{$v[itemid]}" class="dsn" id="checkbox-{$v[itemid]}"/>
|
|
<a href="{$v[linkurl]}"><img src="{if $v[thumb]}{$v[thumb]}{else}{DT_MOB}static/img/80x60.png{/if}" width="80" height="60" alt="" onerror="this.src='{DT_MOB}static/img/80x60.png';"/></a>
|
|
<ul>
|
|
<li><a href="{$v[linkurl]}"><strong>{$v[title]}</strong></a></li>
|
|
<li><span>{$v[date]}</span></li>
|
|
</ul>
|
|
</div>
|
|
{/loop}
|
|
{/if}
|
|
{if $mod_limit || (!$MG[fee_mode] && $MOD[fee_add])}
|
|
<div class="limit">
|
|
{if $mod_limit}
|
|
总共可发 <span class="f_b f_red">{$mod_limit}</span> 条
|
|
当前已发 <span class="f_b">{$limit_used}</span> 条
|
|
还可以发 <span class="f_b f_blue">{$limit_free}</span> 条
|
|
{/if}
|
|
{if !$MG[fee_mode] && $MOD[fee_add]}
|
|
发布信息收费 <span class="f_b f_red">{$MOD[fee_add]}</span> {if $MOD[fee_currency] == 'money'}{$DT[money_unit]}{else}{$DT[credit_unit]}{/if}/条
|
|
可免费发布 <span class="f_b">{if $mod_free_limit<0}无限{else}{$mod_free_limit}{/if}</span> 条
|
|
{/if}
|
|
</div>
|
|
{/if}
|
|
{if $pages}<div class="pages" id="pages-{$js_pageid}">{$pages}</div>{/if}
|
|
</form>
|
|
{/if}
|
|
{if $action == 'add'}
|
|
<script type="text/javascript">
|
|
function check() {
|
|
var l;
|
|
var f;
|
|
f = 'title';
|
|
l = Dd(f).value.length;
|
|
if(l < 5 || l > 30) {
|
|
Dmsg('提问标题应为5-30字,当前已输入'+l+'字', f);
|
|
return false;
|
|
}
|
|
f = 'catid_1';
|
|
if(Dd(f).value == 0) {
|
|
Dmsg('请选择问题分类', 'catid', 1);
|
|
return false;
|
|
}
|
|
{if $action=='add'}
|
|
f = 'credit';
|
|
if(Dd(f).value > {$_credit}) {
|
|
Dmsg('您的{$DT[credit_name]}不足', f);
|
|
return false;
|
|
}
|
|
f = 'hidden';
|
|
if(Dd(f).checked && Dd('credit').value > {$_credit}-{$MOD[credit_hidden]}) {
|
|
Dmsg('您的{$DT[credit_name]}不足', f);
|
|
return false;
|
|
}
|
|
{/if}
|
|
{if $FD}{fields_js()}{/if}
|
|
{if $CP}{property_js()}{/if}
|
|
{if $need_password}
|
|
f = 'password';
|
|
l = Dd(f).value.length;
|
|
if(l < 6) {
|
|
Dmsg('请填写支付密码', f);
|
|
return false;
|
|
}
|
|
{/if}
|
|
{if $need_question}
|
|
f = 'answer';
|
|
if($('#c'+f).html().indexOf('ok.png') == -1) {
|
|
Dmsg('请填写正确的验证问题', f);
|
|
return false;
|
|
}
|
|
{/if}
|
|
{if $need_captcha}
|
|
f = 'captcha';
|
|
if($('#c'+f).html().indexOf('ok.png') == -1) {
|
|
Dmsg('请填写正确的验证码', f);
|
|
return false;
|
|
}
|
|
{/if}
|
|
return true;
|
|
}
|
|
var destoon_oauth = '{$EXT[oauth]}';
|
|
</script>
|
|
{/if}
|
|
{template 'footer', 'member'}
|