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.
288 lines
10 KiB
288 lines
10 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">{$head_name}</div>
|
|
<div class="head-bar-right">
|
|
{if $action=='add'}
|
|
<a href="?action=list"><img src="{DT_MOB}static/img/icon-cancel.png" width="24" height="24"/></a>
|
|
{elseif $action=='list'}
|
|
<a href="?action=index"><img src="{DT_MOB}static/img/icon-cancel.png" width="24" height="24"/></a>
|
|
{else}
|
|
<a href="?action=list"><span>购买</span></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>
|
|
<form method="post" action="?" id="dform" onsubmit="return check();">
|
|
<input type="hidden" name="action" value="{$action}"/>
|
|
<input type="hidden" name="pid" value="{$pid}"/>
|
|
<input type="hidden" name="price" value="{$p[price]}" id="price"/>
|
|
<div class="blank-20"></div>
|
|
<div class="list-set">
|
|
<ul>
|
|
<li><div><span>{$p[name]}</span>广告位名称</div></li>
|
|
<li><div><span>{$TYPE[$typeid]}</span>广告位类型</div></li>
|
|
{if $p[introduce]}<li><div><span>{$p[introduce]}</span>广告位介绍</div></li>{/if}
|
|
{if $p[width] && $p[height]}<li><div><span>{$p[width]}px X {$p[height]}px</span>广告位大小</div></li>{/if}
|
|
</ul>
|
|
</div>
|
|
<div class="blank-20"></div>
|
|
<div class="ui-form">
|
|
{if $typeid == 1}
|
|
<p>广告代码<em>*</em><b id="dcode"></b></p>
|
|
<div><textarea name="post[code]" id="code" style="height:50px;overflow:visible;"></textarea></div>
|
|
{elseif $typeid == 2}
|
|
<p>链接文字<em>*</em><b id="dtext_name"></b></p>
|
|
<div><input type="text" name="post[text_name]" id="text_name"/></div>
|
|
<p>链接地址<em>*</em><b id="dtext_url"></b></p>
|
|
<div><input type="url" name="post[text_url]" id="text_url"/></div>
|
|
<p>标题提示</p>
|
|
<div><input type="text" name="post[text_title]" id="text_title"/></div>
|
|
{elseif $typeid == 3 || $typeid == 5}
|
|
<p>图片地址<em>*</em><b id="dthumb"></b></p>
|
|
<div><input type="url" name="post[image_src]" id="thumb"/></div>
|
|
<div class="ui-form-file-upload"><div id="file-picker"></div></div>
|
|
<script type="text/javascript">
|
|
var fileu = WebUploader.create({
|
|
auto: true,
|
|
server: UPPath+'?moduleid={$moduleid}&action=webuploader&from=thumb&width={$p[width]}&height={$p[height]}',
|
|
pick: '#file-picker',
|
|
accept: {
|
|
title: 'Images',
|
|
extensions: 'gif,jpg,jpeg,bmp,png',
|
|
mimeTypes: 'image/*'
|
|
},
|
|
resize: false
|
|
});
|
|
fileu.on('fileQueued', function(file) {
|
|
Dtoast('{$js_pageid}',L['uploading'], '', 30);
|
|
});
|
|
fileu.on('uploadProgress', function(file, percentage) {
|
|
var p = parseInt(percentage * 100);
|
|
$('#toast-{$js_pageid}').html(p > 99 ? L['processing'] : L['uploading']+p+'%');
|
|
});
|
|
fileu.on( 'uploadSuccess', function(file, data) {
|
|
if(data.error) {
|
|
Dtoast('{$js_pageid}',data.message, '', 5);
|
|
} else {
|
|
$('#thumb').val(data.url);
|
|
}
|
|
});
|
|
fileu.on( 'uploadError', function(file, data) {
|
|
Dtoast('{$js_pageid}',data.message, '', 5);
|
|
});
|
|
fileu.on('uploadComplete', function(file) {
|
|
$('#toast-{$js_pageid}').hide();
|
|
});
|
|
</script>
|
|
|
|
<p>链接地址<em>*</em><b id="dimage_url"></b></p>
|
|
<div><input type="url" name="post[image_url]" id="image_url"/></div>
|
|
<p>标题提示</p>
|
|
<div><input type="text" name="post[image_alt]" id="image_alt"/></div>
|
|
{elseif $typeid == 4}
|
|
<p>视频地址<em>*</em><b id="dvideo"></b></p>
|
|
<div><input type="url" name="post[video_src]" id="video"/></div>
|
|
<div class="ui-form-file-upload"><div id="file-picker"></div></div>
|
|
<script type="text/javascript">
|
|
var fileu = WebUploader.create({
|
|
auto: true,
|
|
server: UPPath+'?moduleid={$moduleid}&action=webuploader&from=file',
|
|
pick: '#file-picker',
|
|
accept: {
|
|
title: 'video',
|
|
extensions: 'mp4',
|
|
mimeTypes: 'video/*'
|
|
},
|
|
resize: false
|
|
});
|
|
fileu.on('fileQueued', function(file) {
|
|
Dtoast('{$js_pageid}',L['uploading'], '', 30);
|
|
});
|
|
fileu.on('uploadProgress', function(file, percentage) {
|
|
var p = parseInt(percentage * 100);
|
|
$('#toast-{$js_pageid}').html(p > 99 ? L['processing'] : L['uploading']+p+'%');
|
|
});
|
|
fileu.on( 'uploadSuccess', function(file, data) {
|
|
if(data.error) {
|
|
Dtoast('{$js_pageid}',data.message, '', 5);
|
|
} else {
|
|
$('#video').val(data.url);
|
|
}
|
|
});
|
|
fileu.on( 'uploadError', function(file, data) {
|
|
Dtoast('{$js_pageid}',data.message, '', 5);
|
|
});
|
|
fileu.on('uploadComplete', function(file) {
|
|
$('#toast-{$js_pageid}').hide();
|
|
});
|
|
</script>
|
|
|
|
<p>自动播放</p>
|
|
<div>
|
|
<input type="radio" name="post[video_auto]" value="1" checked/> 是
|
|
<input type="radio" name="post[video_auto]" value="0"/> 否
|
|
</div>
|
|
<p>循环播放</p>
|
|
<div>
|
|
<input type="radio" name="post[video_loop]" value="1" checked/> 是
|
|
<input type="radio" name="post[video_loop]" value="0"/> 否
|
|
</div>
|
|
<p>链接地址</p>
|
|
<div><input type="url" name="post[video_url]" id="video_url"/></div>
|
|
{elseif $typeid == 6}
|
|
<p>所属模块</p>
|
|
<div>{$MODULE[$p[moduleid]][name]}</div>
|
|
<p>所属分类</p>
|
|
<div>{ajax_category_select('post[catid]', '请选择', 0, $p[moduleid])}</div>
|
|
<p>关键词</p>
|
|
<div><input type="text" name="post[word]" id="word"/></div>
|
|
{if $p[moduleid] == 4}
|
|
<input type="hidden" name="post[key_id]" id="key_id" value="{$_userid}"/>
|
|
{else}
|
|
<p>信息ID<em>*</em><b id="dkey_id"></b></p>
|
|
<div><input type="tel" name="post[key_id]" id="key_id"/></div>
|
|
{/if}
|
|
{elseif $typeid == 7}
|
|
<p>所属模块</p>
|
|
<div>{$MODULE[$p[moduleid]][name]}</div>
|
|
<p>所属分类</p>
|
|
<div>{ajax_category_select('post[catid]', '请选择', 0, $p[moduleid])}</div>
|
|
<p>关键词</p>
|
|
<div><input type="text" name="post[word]" id="word"/></div>
|
|
<p>广告代码<em>*</em><b id="dcode"></b></p>
|
|
<div><textarea name="post[code]" id="code" style="height:50px;overflow:visible;"></textarea></div>
|
|
{/if}
|
|
<p>开始日期<em>*</em><b id="dpostfromtime"></b></p>
|
|
<div><input type="datetime-local" name="post[fromtime]" value="{str_replace(' ', 'T', $fromdate)}" id="postfromtime" step="1"/></div>
|
|
<p>购买时长<em>*</em><b id="dmonth"></b></p>
|
|
<div>
|
|
<select name="month" id="month"{if $price} onchange="CA();"{/if}>
|
|
{loop $months $m}<option value="{$m}">{$m}月</option>{/loop}
|
|
</select>
|
|
</div>
|
|
{if $price}
|
|
<p>广告价格</p>
|
|
<div><span class="f_red">{$p[price]}{$unit}/月</span></div>
|
|
<p>应付总价</p>
|
|
<div><strong style="font-size:20px;color:#FF6600;" id="money">{$p[price]}</strong>{$unit}</div>
|
|
{if $currency == 'money'}
|
|
<p>账户余额</p>
|
|
<div><span class="f_blue">{$_money}</span> {$DT[money_unit]} <a href="charge.php?action=pay" target="_blank" class="b">[充值]</a></div>
|
|
<p>支付密码<em>*</em><b id="dpassword"></b></p>
|
|
<div><input type="password" name="password" id="password" autocomplete="new-password"/></div>
|
|
{else}
|
|
<p>{$DT[credit_name]}余额</p>
|
|
<div><span class="f_blue">{$_credit}</span> {$DT[credit_unit]} <a href="credit.php?action=buy" target="_blank" class="b">[购买]</a></div>
|
|
{/if}
|
|
{/if}
|
|
<p>备注事项</p>
|
|
<div><input type="text" name="post[note]"/></div>
|
|
</div>
|
|
<div class="blank-20"></div>
|
|
<div class="list-btn"><input type="submit" name="submit" value="确定购买" class="btn-green"/></div>
|
|
<div class="blank-20"></div>
|
|
<div class="list-btn"><input type="button" class="btn" value="重新选择" onclick="Dsheet('{$js_pageid}','<a href="?action=list"><span style="color:red">重新选择</span></a>', '取消', '确定要重新选择吗?');"/></div>
|
|
<div class="blank-20"></div>
|
|
</form>
|
|
{load('clear.js')}
|
|
{elseif $action == 'list'}
|
|
<div class="blank-20"></div>
|
|
<div class="list-set">
|
|
<ul>
|
|
{loop $lists $k $v}
|
|
<li><div><span>{if $v[price]}{$v[price]}{$DT[money_unit]}/月{else}面议{/if}</span><a href="?action=add&pid={$v[pid]}">{$v[typename]}/{$v[name]}</a></li>
|
|
{/loop}
|
|
</ul>
|
|
</div>
|
|
{if $pages}<div class="pages" id="pages-{$js_pageid}">{$pages}</div>{/if}
|
|
{else}
|
|
<script type="text/javascript">$(function(){Stabs('{$js_pageid}');});</script>
|
|
<div class="list-menu" id="tabs-{$js_pageid}">
|
|
<ul>
|
|
<a href="?status=3"><li{if $status==3} class="on"{/if} id="s3">已通过{if !$kw} {$nums[3]}{/if}</li></a>
|
|
<a href="?status=2"><li{if $status==2} class="on"{/if} id="s2">审核中{if !$kw} {$nums[2]}{/if}</li></a>
|
|
</ul>
|
|
</div>
|
|
{if $lists}
|
|
{loop $lists $v}
|
|
<div class="list-img">
|
|
<ul>
|
|
<li><span class="f_r">{$v[amount]}{if $v[currency]=='money'}{$DT[money_unit]}{else}{$DT[credit_unit]}{/if}</span><strong>{$TYPE[$v[typeid]]}/{$v[title]}</strong></li>
|
|
<li><span class="f_r">{$v[process]}</span><span>{timetodate($v[fromtime], 3)} / {timetodate($v[totime], 3)}</span></li>
|
|
</ul>
|
|
</div>
|
|
{/loop}
|
|
{/if}
|
|
{if $pages}<div class="pages" id="pages-{$js_pageid}">{$pages}</div>{/if}
|
|
{/if}
|
|
{if $action == 'add'}
|
|
{load('clear.js')}
|
|
<script type="text/javascript">
|
|
function CA() {
|
|
Dd('money').innerHTML = Dd('price').value*Dd('month').value;
|
|
}
|
|
function check() {
|
|
var p = Dd('price').value;
|
|
{if $currency == 'money'}
|
|
if(p*Dd('month').value > {$_money}) {
|
|
alert('帐户余额不足,请先充值');
|
|
return false;
|
|
}
|
|
{else}
|
|
if(p*Dd('month').value > {$_credit}) {
|
|
alert('您的{$DT[credit_name]}不足,请先购买');
|
|
return false;
|
|
}
|
|
{/if}
|
|
{if $typeid == 1 || $typeid == 7}
|
|
if(Dd('code').value.length < 5) {
|
|
Dmsg('请填写广告代码', 'code');
|
|
return false;
|
|
}
|
|
{elseif $typeid == 2}
|
|
if(Dd('text_name').value.length < 2) {
|
|
Dmsg('请填写链接文字', 'text_name');
|
|
return false;
|
|
}
|
|
if(Dd('text_url').value.length < 10) {
|
|
Dmsg('请填写链接地址', 'text_url');
|
|
return false;
|
|
}
|
|
{elseif $typeid == 3 || $typeid == 5}
|
|
if(Dd('thumb').value.length < 10) {
|
|
Dmsg('请填写图片地址或上传图片', 'thumb');
|
|
return false;
|
|
}
|
|
{elseif $typeid == 4}
|
|
if(Dd('video').value.length < 10) {
|
|
Dmsg('请填写视频地址', 'video');
|
|
return false;
|
|
}
|
|
{elseif $typeid == 6}
|
|
if(Dd('key_id').value.length < 1) {
|
|
Dmsg('请填写信息ID', 'key_id');
|
|
return false;
|
|
}
|
|
{/if}
|
|
if(Dd('postfromtime').value.replace(/-/g, '') < '{$fromdate}'.replace(/-/g, '')) {
|
|
Dd('postfromtime').value = '{$fromdate}';
|
|
Dd('postfromtime').focus();
|
|
Dmsg('开始投放日期需从{$fromdate}开始', 'postfromtime');
|
|
return false;
|
|
}
|
|
{if $price && $currency == 'money'}
|
|
if(Dd('password').value.length < 6) {
|
|
Dmsg('请填写支付密码', 'password');
|
|
return false;
|
|
}
|
|
{/if}
|
|
}
|
|
</script>
|
|
{/if}
|
|
{template 'footer', 'member'}
|