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.
365 lines
12 KiB
365 lines
12 KiB
{template 'header', 'member'}
|
|
<div class="menu">
|
|
<table cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td class="tab" id="add"><a href="?action=list"><span>广告预定</span></a></td>
|
|
<td class="tab" id="s3"><a href="?action=index"><span>已通过({$nums[3]})</span></a></td>
|
|
<td class="tab" id="s2"><a href="?status=2"><span>审核中({$nums[2]})</span></a></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
{if $action == 'add'}
|
|
<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"/>
|
|
<table cellpadding="10" cellspacing="1" class="tb">
|
|
<tr>
|
|
<td class="tl">广告位名称</td>
|
|
<td class="tr"><strong>{$p[name]}</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">广告位类型</td>
|
|
<td class="tr">{$TYPE[$typeid]}</td>
|
|
</tr>
|
|
{if $p[introduce]}
|
|
<tr>
|
|
<td class="tl">广告位介绍</td>
|
|
<td class="tr">{$p[introduce]}</td>
|
|
</tr>
|
|
{/if}
|
|
{if $p[width] && $p[height]}
|
|
<tr>
|
|
<td class="tl">广告位大小</td>
|
|
<td class="tr">{$p[width]}px X {$p[height]}px</td>
|
|
</tr>
|
|
{/if}
|
|
{if $typeid == 1}
|
|
<tr>
|
|
<td class="tl"><span class="f_red">*</span> 广告代码</td>
|
|
<td class="tr"><textarea name="post[code]" id="code" style="width:98%;height:50px;overflow:visible;"></textarea><br/><span id="dcode" class="f_red"></span></td>
|
|
</tr>
|
|
{elseif $typeid == 2}
|
|
<tr>
|
|
<td class="tl"><span class="f_red">*</span> 链接文字</td>
|
|
<td class="tr f_gray"><input type="text" size="30" name="post[text_name]" id="text_name"/> <span id="dtext_name" class="f_red"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl"><span class="f_red">*</span> 链接地址</td>
|
|
<td class="tr"><input type="text" size="70" name="post[text_url]" id="text_url" value="http://"/> <span id="dtext_url" class="f_red"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">标题提示</td>
|
|
<td class="tr"><input type="text" size="70" name="post[text_title]" id="text_title"/></td>
|
|
</tr>
|
|
{elseif $typeid == 3 || $typeid == 5}
|
|
<tr>
|
|
<td class="tl"><span class="f_red">*</span> 图片地址</td>
|
|
<td class="tr f_gray"><input type="text" size="70" name="post[image_src]" id="thumb" ondblclick="Dthumb({$moduleid},{$p[width]},{$p[height]}, Dd('thumb').value,true);"/> <span onclick="Dthumb({$moduleid},{$p[width]},{$p[height]}, Dd('thumb').value,true);" class="jt">[上传]</span> <span onclick="_preview(Dd('thumb').value);" class="jt">[预览]</span> <span onclick="Dd('thumb').value='';" class="jt">[删除]</span> <span id="dthumb" class="f_red"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">链接地址</td>
|
|
<td class="tr"><input type="text" size="70" name="post[image_url]" id="image_url" value="http://"/> <span id="dimage_url" class="f_red"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">标题提示</td>
|
|
<td class="tr"><input type="text" size="70" name="post[image_alt]"/></td>
|
|
</tr>
|
|
{elseif $typeid == 4}
|
|
<tr>
|
|
<td class="tl"><span class="f_red">*</span> 视频地址</td>
|
|
<td class="tr f_gray">
|
|
<script type="text/javascript" src="{DT_STATIC}file/script/webuploader.min.js?v={if DT_DEBUG}{DT_TIME}{else}{DT_REFRESH}{/if}"></script>
|
|
<script type="text/javascript" src="{DT_STATIC}file/script/player.js?v={if DT_DEBUG}{DT_TIME}{else}{DT_REFRESH}{/if}"></script>
|
|
<script type="text/javascript" src="{DT_STATIC}file/script/url2video.js?v={if DT_DEBUG}{DT_TIME}{else}{DT_REFRESH}{/if}"></script>
|
|
<input type="text" size="70" name="post[video_src]" id="video"/> <span id="video-picker" class="jt">[上传]</span> <span onclick="vs();" class="jt">[预览]</span> <span onclick="Dd('video').value='';vh();$('#video-progress').html('');" class="jt">[删除]</span> <span id="video-progress" class="f_gray"></span> <span id="dvideo" class="f_red"></span>
|
|
<script type="text/javascript">
|
|
var filev = WebUploader.create({
|
|
auto: true,
|
|
server: UPPath+'?moduleid={$moduleid}&action=webuploader&from=file',
|
|
pick: '#video-picker',
|
|
accept: {
|
|
title: 'video',
|
|
extensions: 'mp4',
|
|
mimeTypes: 'video/*'
|
|
},
|
|
resize: false
|
|
});
|
|
filev.on('fileQueued', function(file) {
|
|
$('#video-progress').html('0%');
|
|
});
|
|
filev.on('uploadProgress', function(file, percentage) {
|
|
var p = parseInt(percentage * 100);
|
|
if(p >= 100) p = 100;
|
|
$('#video-progress').html(p+'%');
|
|
});
|
|
filev.on( 'uploadSuccess', function(file, data) {
|
|
if(data.error) {
|
|
Dmsg(data.message, 'video');
|
|
} else {
|
|
$('#video-progress').html('100%');
|
|
$('#video').val(data.url);
|
|
}
|
|
});
|
|
filev.on( 'uploadError', function(file, data) {
|
|
Dmsg(data.message, 'video');
|
|
});
|
|
filev.on('uploadComplete', function(file) {
|
|
$('#video-progress').html('100%');
|
|
});
|
|
function vs() {
|
|
UpdateURL();
|
|
if(Dd('video').value.length > 5) {
|
|
Ds('v_player');
|
|
Inner('v_play', player(Dd('video').value,'{$p[width]}','{$p[height]}',1));
|
|
} else {
|
|
Dmsg('视频地址为空', 'video');
|
|
vh();
|
|
}
|
|
}
|
|
function vh() {Inner('v_play', '');Dh('v_player');}
|
|
function UpdateURL() {
|
|
var str = url2video(Dd('video').value);
|
|
if(str) Dd('video').value = str;
|
|
}
|
|
</script>
|
|
<tr id="v_player" style="display:none;">
|
|
<td class="tl">视频预览</td>
|
|
<td><div id="v_play"></div><div style="padding-top:10px;"><a href="javascript:" onclick="vh();" class="t">[关闭预览]</a></div></td>
|
|
</tr>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">自动播放</td>
|
|
<td class="tr">
|
|
<input type="radio" name="post[video_auto]" value="1" checked/> 是
|
|
<input type="radio" name="post[video_auto]" value="0"/> 否
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">循环播放</td>
|
|
<td class="tr">
|
|
<input type="radio" name="post[video_loop]" value="1" checked/> 是
|
|
<input type="radio" name="post[video_loop]" value="0"/> 否
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">链接地址</td>
|
|
<td class="tr"><input type="text" size="70" name="post[video_url]" value="http://"/></td>
|
|
</tr>
|
|
{elseif $typeid == 6}
|
|
<tr>
|
|
<td class="tl">所属模块</td>
|
|
<td class="tr"><a href="{$MODULE[$p[moduleid]][linkurl]}" target="_blank" class="t">{$MODULE[$p[moduleid]][name]}</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">所属分类</td>
|
|
<td class="tr">{ajax_category_select('post[catid]', '请选择', 0, $p[moduleid])}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">关键词</td>
|
|
<td class="tr"><input type="text" size="30" name="post[word]" id="word"/> <span id="dword" class="f_red"></span></td>
|
|
</tr>
|
|
{if $p[moduleid] == 4}
|
|
<input type="hidden" name="post[key_id]" id="key_id" value="{$_userid}"/>
|
|
{else}
|
|
<tr>
|
|
<td class="tl"><span class="f_red">*</span> 信息ID</td>
|
|
<td class="tr"><input type="text" size="10" name="post[key_id]" id="key_id" onfocus="select_item({$p[moduleid]}, 'member');"/> <span id="dkey_id" class="f_red"></span></td>
|
|
</tr>
|
|
{/if}
|
|
{elseif $typeid == 7}
|
|
<tr>
|
|
<td class="tl">所属模块</td>
|
|
<td class="tr"><a href="{$MODULE[$p[moduleid]][linkurl]}" target="_blank" class="t">{$MODULE[$p[moduleid]][name]}</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">所属分类</td>
|
|
<td class="tr">{ajax_category_select('post[catid]', '请选择', 0, $p[moduleid])}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">关键词</td>
|
|
<td class="tr"><input type="text" size="30" name="post[word]"/></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl"><span class="f_red">*</span> 广告代码</td>
|
|
<td class="tr"><textarea name="post[code]" id="code" style="width:98%;height:50px;overflow:visible;font-family:Fixedsys,verdana;"></textarea><br/><span id="dcode" class="f_red"></span></td>
|
|
</tr>
|
|
{/if}
|
|
<tr>
|
|
<td class="tl"><span class="f_red">*</span> 开始日期</td>
|
|
<td class="tr">{dcalendar('post[fromtime]', $fromdate)} <span id="dpostfromtime" class="f_red"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl"><span class="f_red">*</span> 购买时长</td>
|
|
<td class="tr f_gray">
|
|
<select name="month" id="month"{if $price} onchange="CA();"{/if}>
|
|
{loop $months $m}<option value="{$m}">{$m}月</option>{/loop}
|
|
</select>
|
|
(注:按30天/月计算)
|
|
</td>
|
|
</tr>
|
|
{if $price}
|
|
<tr>
|
|
<td class="tl">广告价格</td>
|
|
<td class="tr"><span class="f_red f_b">{$p[price]} {$unit}/月</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">应付总价</td>
|
|
<td class="tr"><span id="money" class="f_price px16">{$p[price]}</span>{$unit}</td>
|
|
</tr>
|
|
{if $currency == 'money'}
|
|
<tr>
|
|
<td class="tl">账户余额</td>
|
|
<td class="tr"><span class="f_blue">{$_money}</span> {$DT[money_unit]} <a href="charge.php?action=pay" target="_blank" class="t">[充值]</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl"><span class="f_red">*</span> 支付密码</td>
|
|
<td class="tr">{template 'password', 'chip'} <span id="dpassword" class="f_red"></span></td>
|
|
</tr>
|
|
{else}
|
|
<tr>
|
|
<td class="tl">{$DT[credit_name]}余额</td>
|
|
<td class="tr"><span class="f_blue">{$_credit}</span> {$DT[credit_unit]} <a href="credit.php?action=buy" target="_blank" class="t">[购买]</a></td>
|
|
</tr>
|
|
{/if}
|
|
{/if}
|
|
<tr>
|
|
<td class="tl">备注事项</td>
|
|
<td class="tr"><input type="text" size="70" name="post[note]"/></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl"> </td>
|
|
<td class="tr">
|
|
<input type="submit" name="submit" value="确定购买" class="btn_g"/>
|
|
<input type="button" value="重新选择" class="btn" onclick="Go('?action=list');"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
{load('clear.js')}
|
|
<script type="text/javascript">s('ad');m('add');</script>
|
|
{elseif $action == 'list'}
|
|
<div class="ls">
|
|
<table cellpadding="10" cellspacing="0" class="tb">
|
|
<tr>
|
|
<th>编号</th>
|
|
<th>广告位名称</th>
|
|
<th>广告类型</th>
|
|
<th>规格(px)</th>
|
|
<th>价格/月</th>
|
|
<th>示意图</th>
|
|
<th>预定</th>
|
|
</tr>
|
|
{loop $lists $k $v}
|
|
<tr align="center" title="{$v[introduce]}">
|
|
<td id="a_{$v[pid]}">A{$v[pid]}</td>
|
|
<td>{$v[name]}</td>
|
|
<td>{$v[typename]}</td>
|
|
<td class="f_gray">{$v[width]} x {$v[height]}</td>
|
|
<td class="f_red">{if $v[price]}{$v[price]}{$unit}{else}面议{/if}</td>
|
|
<td class="f_gray">{if $v[thumb]}<a href="javascript:;" onclick="_preview('{$v[thumb]}');" title="点击查看大图" class="t">查看</a>{else}暂无{/if}</td>
|
|
<td>{if $EXT[ad_buy]}<a href="?action=add&pid={$v[pid]}" class="t">预定</a>{else}--{/if}</td>
|
|
</tr>
|
|
{/loop}
|
|
</table>
|
|
</div>
|
|
<div class="pages">{$pages}</div>
|
|
<script type="text/javascript">s('ad');m('add');</script>
|
|
{else}
|
|
<div class="ls">
|
|
<table cellpadding="10" cellspacing="0" class="tb">
|
|
<tr>
|
|
<th>广告类型</th>
|
|
<th>广告名称</th>
|
|
<th> 出价 </th>
|
|
<th>开始日期</th>
|
|
<th>结束日期</th>
|
|
<th>剩余(天)</th>
|
|
<th>投放状态</th>
|
|
<th>申请时间</th>
|
|
<th> 预览 </th>
|
|
</tr>
|
|
{loop $lists $k $v}
|
|
<tr align="center" title="简介:{$v[introduce]}">
|
|
<td>{$TYPE[$v[typeid]]}</td>
|
|
<td align="left"> <a href="{$adurl}{rewrite('index.php?aid='.$v['aid'])}" target="_blank" class="t">{$v[title]}</a></td>
|
|
<td class="f_red">{$v[amount]}{if $v[currency] == 'money'}{$DT[money_unit]}{else}{$DT[credit_unit]}{/if}</td>
|
|
<td>{timetodate($v[fromtime], 3)}</td>
|
|
<td>{timetodate($v[totime], 3)}</td>
|
|
<td{if $v[days]<5} class="f_red"{/if}>{$v[days]}</td>
|
|
<td>{$v[process]}</td>
|
|
<td class="f_gray">{timetodate($v[addtime], 5)}</td>
|
|
<td><a href="{$adurl}{rewrite('index.php?aid='.$v['aid'])}" target="_blank" class="t">预览</a></td>
|
|
</tr>
|
|
{/loop}
|
|
</table>
|
|
</div>
|
|
<div class="pages">{$pages}</div>
|
|
<script type="text/javascript">s('ad');m('s{$status}');</script>
|
|
{/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'}
|