| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 | <?php /* Smarty version 2.6.17, created on 2018-04-26 11:28:54         compiled from admin/activity/interactive_prize_edit.html */ ?><?php $_smarty_tpl_vars = $this->_tpl_vars;$this->_smarty_include(array('smarty_include_tpl_file' => "./admin/header.html", 'smarty_include_vars' => array()));$this->_tpl_vars = $_smarty_tpl_vars;unset($_smarty_tpl_vars); ?><?php $_smarty_tpl_vars = $this->_tpl_vars;$this->_smarty_include(array('smarty_include_tpl_file' => "./admin/left.html", 'smarty_include_vars' => array()));$this->_tpl_vars = $_smarty_tpl_vars;unset($_smarty_tpl_vars); ?><?php $_smarty_tpl_vars = $this->_tpl_vars;$this->_smarty_include(array('smarty_include_tpl_file' => "./admin/nav.html", 'smarty_include_vars' => array()));$this->_tpl_vars = $_smarty_tpl_vars;unset($_smarty_tpl_vars); ?><?php $_smarty_tpl_vars = $this->_tpl_vars;$this->_smarty_include(array('smarty_include_tpl_file' => "get_kindeditor.html", 'smarty_include_vars' => array()));$this->_tpl_vars = $_smarty_tpl_vars;unset($_smarty_tpl_vars); ?><style>.set-nav {	margin: 0 auto;}.set-nav-hr {	background-color: #ddd;    height: 1px;    position: relative;}.form-group label {	font-weight: 600;}.checkbox-inline, .radio-inline {	font-weight: 400!important;}.rowlabel {	font-weight: 300!important;}.music_play_hide {	display:none;}</style><div id="activity_container"><form id="activity_form"><div class="activity_center"><?php $_smarty_tpl_vars = $this->_tpl_vars;$this->_smarty_include(array('smarty_include_tpl_file' => "./admin/activity/common_nav.html", 'smarty_include_vars' => array()));$this->_tpl_vars = $_smarty_tpl_vars;unset($_smarty_tpl_vars); ?><!-- <form method="post" action="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>?c=Admin_Activity_SetInteractive&a=ReqUp"> -->	<input name="events_id" type="hidden" value="<?php echo $this->_tpl_vars['events_Data']['events']['id']; ?>">	<input name="prize_id" type="hidden" value="<?php echo $this->_tpl_vars['prize_id']; ?>">	<div class="form-group">		<label class="control-label rowlabel">奖项名称: </label>		<div>			<input name="prize_name" type="text" class="form-control" value="<?php echo $this->_tpl_vars['prize']['prize_name']; ?>">		</div>	</div>	<div class="form-group">		<label class="control-label rowlabel">奖项图片: </label>		<div>			<img id="img_url_tag" src="<?php echo $this->_tpl_vars['prize']['img_url']; ?>" style="width:150px;" class="img-thumbnail">			<input id="img_url_input" name="img_url" type="hidden" value="<?php echo $this->_tpl_vars['prize']['img_url']; ?>">			<input id="image_upload" type="button" value="选择图片" >		</div>	</div>	<div class="form-group">		<label class="control-label rowlabel">状态: </label>		<div class="row">			<div class="col-md-2">			<select name="display" class="form-control">				<?php $_from = $this->_tpl_vars['prizeDisplay']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['item']):?>				<option value="<?php echo $this->_tpl_vars['key']; ?>" <?php if ($this->_tpl_vars['key'] == $this->_tpl_vars['prize']['display']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['item']['desc']; ?></option>				<?php endforeach; endif; unset($_from); ?>			</select>			</div>		</div>	</div>	<div class="form-group">		<label class="control-label rowlabel">发奖时间段: </label>		<div class="row">		<div class="col-md-2">			<input name="begin_hour" type="text" class="form-control" value="<?php echo $this->_tpl_vars['prize']['begin_hour']; ?>">		</div>		<div class="col-md-2">			<input name="end_hour" type="text" class="form-control" value="<?php echo $this->_tpl_vars['prize']['end_hour']; ?>">		</div>		</div>	</div>	<div class="form-group">		<label class="control-label rowlabel">属性: </label>		<div class="row">			<div class="col-md-2">			<input type="text" class="form-control" value="<?php if ($this->_tpl_vars['prize']['type'] == 1): ?>实物<?php endif; ?><?php if ($this->_tpl_vars['prize']['type'] == 2): ?>虚拟<?php endif; ?>" disabled="disabled">			</div>		</div>	</div>	<div class="form-group">		<label class="control-label rowlabel">是否需要快递: </label>		<div class="row">		<div class="col-md-2">			<select name="express" class="form-control">				<option value="1" <?php if ($this->_tpl_vars['prize']['express'] == 1): ?>selected<?php endif; ?>>需要</option>				<option value="2" <?php if ($this->_tpl_vars['prize']['express'] == 2): ?>selected<?php endif; ?>>不需要</option>			</select>		</div>		</div>	</div>	<div class="form-group">		<label class="control-label rowlabel">白名单: "换行"分割UID </label>		<div>			<textarea name="white_list" class="form-control" rows="3"><?php echo $this->_tpl_vars['prize']['white_list']; ?></textarea>		</div>	</div>	<div class="form-group">				<label class="control-label rowlabel">100%中奖名单:"换行"分割UID</label>				<div>					<textarea name="hundred_percent_list" class="form-control" rows="3"><?php echo $this->_tpl_vars['prize']['hundred_percent_list']; ?></textarea>				</div>			</div>	<div class="form-group">		<label class="control-label rowlabel">黑名单:"换行"分割UID</label>		<div>			<textarea name="black_list" class="form-control" rows="3"><?php echo $this->_tpl_vars['prize']['black_list']; ?></textarea>		</div>	</div>	<a id="activity_submit" href="javascript:;" class="button button-3d button-primary button-rounded"><i class="fa fa-refresh fa-spin" style="display:none;"></i> 修改奖项</a></div><?php $_smarty_tpl_vars = $this->_tpl_vars;$this->_smarty_include(array('smarty_include_tpl_file' => "./admin/activity/common_right.html", 'smarty_include_vars' => array()));$this->_tpl_vars = $_smarty_tpl_vars;unset($_smarty_tpl_vars); ?><div style="clear:both;"></div></form></div><script>KISSY.use('node, io, event', function (S, Node, IO, Event) {	var $ = S.all;		var activity_submit_status = false; //按钮状态    function submit_button_active() {    	activity_submit_status = true;    	$("#activity_submit").addClass('active').all('i').show();    }    function submit_button_default() {    	activity_submit_status = false;    	$("#activity_submit").removeClass('active').all('i').hide();    }    	$("#activity_submit").on('click', function () {		if (activity_submit_status) {    		return false;    	}    	submit_button_active();    			var events_id = $("input[name=events_id]").val();		var prize_id = $("input[name=prize_id]").val();		var post_data = {};				post_data.events_id = events_id;		post_data.prize_id = prize_id;		post_data.prize_name = $('input[name=prize_name]').val();		post_data.prize_image_url = $("input[name=img_url]").val();		post_data.begin_hour = $("input[name=begin_hour]").val();		post_data.end_hour = $("input[name=end_hour]").val();		post_data.express = $("select[name=express]").val();		post_data.white_list = $("textarea[name=white_list]").val();		post_data.hundred_percent_list = $("textarea[name=hundred_percent_list]").val();		post_data.black_list = $("textarea[name=black_list]").val();		post_data.display = $("select[name=display]").val();				new IO({			type: "post"			, url: VG.conf.root_domain + '/?c=Admin_Activity_SetInteractive&a=ReqUpPrize'			, data: post_data			, success: function (data) {				if (data.ok) { //ok					alert('操作成功');					var redirect_url = data.msg;					location.href = redirect_url;				} else {					alert('操作失败,原因:'+data.msg);				}								return false;			}			, error: function (NULL, textStatus) {				alert("请求服务器失败,原因:"+textStatus);			}			, dataType: "json"		});	});});//列表默认图KindEditor.ready(function(K) {	var uploadbutton = K.uploadbutton({		button : K('#image_upload')[0],		fieldName : 'imgFile',		url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',		afterUpload : function(data) {			if (data.error === 0) {				var url = K.formatUrl(data.url, 'absolute');				K('#img_url_input').val(data.url);				K('#img_url_tag').attr('src', data.url);			} else {				alert(data.message);			}		},		afterError : function(str) {			alert('自定义错误信息: ' + str);		}	});	uploadbutton.fileBox.change(function(e) {		uploadbutton.submit();	});});</script><?php $_smarty_tpl_vars = $this->_tpl_vars;$this->_smarty_include(array('smarty_include_tpl_file' => "./admin/bottom.html", 'smarty_include_vars' => array()));$this->_tpl_vars = $_smarty_tpl_vars;unset($_smarty_tpl_vars); ?>
 |