| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276 | 
							- <?php /* Smarty version 2.6.17, created on 2018-04-25 15:06:49
 
-          compiled from admin/activity/interactive_survey_input_question.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);
 
-  ?>
 
- 	<input name="events_id" type="hidden" value="<?php echo $this->_tpl_vars['events_Data']['events']['id']; ?>
 
- ">
 
- 	
 
- 	<div  class="panel panel-default">
 
- 	<div class="panel-heading"><h3 class="panel-title" id="panel-title">表单设置</h3></div>
 
- 	<div class="panel-body">
 
- 		<table class="table">
 
- 				<thead>
 
- 				<tr>
 
- 					<th>名称</th>
 
- 					<th>类型</th>
 
- 					<th>是否必填</th>
 
- 				</tr>
 
- 				<?php $_from = $this->_tpl_vars['events_Data']['events']['forms']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
 
-     foreach ($_from as $this->_tpl_vars['form']):
 
- ?>
 
- 				<tr>
 
- 					<td><?php echo $this->_tpl_vars['form']['name']; ?>
 
- </td>
 
- 					<td><?php if ($this->_tpl_vars['form']['type'] == 'text'): ?>单行文本<?php endif; ?>
 
- 					<?php if ($this->_tpl_vars['form']['type'] == 'textarea'): ?>多行文本<?php endif; ?>
 
- 					<?php if ($this->_tpl_vars['form']['type'] == 'select'): ?>下拉菜单<?php endif; ?></td>
 
- 					<td><?php if ($this->_tpl_vars['form']['required'] == 1): ?>必填<?php else: ?> 选填<?php endif; ?></td>
 
- 				</tr>
 
- 				<?php endforeach; endif; unset($_from); ?>
 
- 				</thead>
 
- 		</table>
 
- 		</div>
 
- 		<div  style="text-align:right; margin-right: 20px;margin-bottom: 10px;"><a href="?c=Admin_Activity_SetInteractive&a=PageShow&events_id=<?php echo $this->_tpl_vars['events_Data']['events']['id']; ?>
 
- &typ=input">点击编辑</a></div>
 
- 	</div>
 
- 	
 
- 	<div  class="panel panel-default">
 
- 	<div class="panel-heading"><h3 class="panel-title" id="panel-title">奖品设置</h3></div>
 
- 	<div class="panel-body">
 
- 		<table class="table">
 
- 				<thead>
 
- 				<tr>
 
- 					<th>序号</th>
 
- 					<th>奖品名称</th>
 
- 					<th>图片</th>
 
- 					<th>数量</th>
 
- 					<th>操作</th>
 
- 				</tr>
 
- 				<?php $_from = $this->_tpl_vars['events_Data']['events']['survery_prize']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['survery'] = array('total' => count($_from), 'iteration' => 0);
 
- if ($this->_foreach['survery']['total'] > 0):
 
-     foreach ($_from as $this->_tpl_vars['index'] => $this->_tpl_vars['survery_prize']):
 
-         $this->_foreach['survery']['iteration']++;
 
- ?>
 
- 					<tr>
 
- 					<td><?php echo $this->_foreach['survery']['iteration']; ?>
 
- </td>
 
- 					<td><?php echo $this->_tpl_vars['survery_prize']['name']; ?>
 
- </td>
 
- 					<td><img src="<?php echo $this->_tpl_vars['survery_prize']['img_url']; ?>
 
- " class="img-thumbnail" style="width:50px;"></td>
 
- 					<td><?php echo $this->_tpl_vars['survery_prize']['num']; ?>
 
- <?php echo $this->_tpl_vars['survery_prize']['unit_name']; ?>
 
- </td>
 
- 					<td><a class="del_survery_prize" survery_prize_id='<?php echo $this->_tpl_vars['index']; ?>
 
- '  href="javascript:;">删除</a></td>
 
- 					</tr>
 
- 				<?php endforeach; endif; unset($_from); ?>
 
- 				</thead>
 
- 		</table>
 
- 	</div>
 
- 		<div  style="text-align:right; margin-right: 20px;margin-bottom: 10px;"><a href="?c=Admin_Activity_SetInteractive&a=PageShow&events_id=<?php echo $this->_tpl_vars['events_Data']['events']['id']; ?>
 
- &typ=prize"><i class="fa fa-plus"></i>添加奖品</a></div>
 
- 	</div>
 
- 	
 
- 	
 
- 	
 
- 	<div  class="panel panel-default">
 
- 	<div class="panel-heading"><h3 class="panel-title" id="panel-title">问题设置</h3></div>
 
- 		<div class="panel-body">
 
- 			<div class="form-group">
 
- 				<?php $_from = $this->_tpl_vars['events_Data']['events']['survery_question']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
 
-     foreach ($_from as $this->_tpl_vars['index'] => $this->_tpl_vars['survery_question']):
 
- ?>
 
- 				
 
- 				<?php if ($this->_tpl_vars['survery_question']['type'] == 'img'): ?>
 
- 						<div class="panel panel-default" style="padding: 10px;">
 
- 												<div style="margin: 10px;">问题:         <?php echo $this->_tpl_vars['survery_question']['question']; ?>
 
- </div>
 
- 						<div style="margin: 10px;">类型:        图片</div>
 
- 							<div style="clear:both;"></div>
 
- 							<table class="table">
 
- 								<tr>
 
- 										<?php $_from = $this->_tpl_vars['survery_question']['answer']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
 
-     foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['answer']):
 
- ?>
 
- 										<td style="text-align:center;">
 
- 											<img id="img_url_tag" src="<?php echo $this->_tpl_vars['answer']['img_url']; ?>
 
- " style="width:100px;" class="img-thumbnail"><br>
 
- 											<div style="text-align:center;">选择:<?php echo $this->_tpl_vars['answer']['answer']; ?>
 
- </div>
 
- 										</td>
 
- 										<?php endforeach; endif; unset($_from); ?>
 
- 										
 
- 								</tr>
 
- 							</table>
 
- 							<div style="margin: 10px;">操作:        <a survery_question_id="<?php echo $this->_tpl_vars['index']; ?>
 
- "  href="javascript:;" class="del_survery_question">点击删除</a></div>
 
- 						</div>
 
- 				<?php endif; ?>
 
- 				
 
- 				
 
- 				<?php if ($this->_tpl_vars['survery_question']['type'] == 'txt'): ?>
 
- 						<div class="panel panel-default" style="padding: 10px;">
 
- 												<div style="margin: 10px;">问题:         <?php echo $this->_tpl_vars['survery_question']['question']; ?>
 
- </div>
 
- 						<div style="margin: 10px;">类型:        文字</div>
 
- 							<div style="clear:both;"></div>
 
- 							<?php $_from = $this->_tpl_vars['survery_question']['answer']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
 
-     foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['answer']):
 
- ?>
 
- 								<div style="text-align:left;margin:10px;"><?php echo $this->_tpl_vars['answer']['answer']; ?>
 
- </div>
 
- 							<?php endforeach; endif; unset($_from); ?>
 
- 							<div style="margin: 10px;">操作:        <a survery_question_id="<?php echo $this->_tpl_vars['index']; ?>
 
- "  href="javascript:;" class="del_survery_question">点击删除</a></div>
 
- 						</div>
 
- 				<?php endif; ?>
 
- 				
 
- 				
 
- 				
 
- 				
 
- 				<?php endforeach; endif; unset($_from); ?>
 
- 				
 
- 			</div>
 
- 		</div>
 
- 		<div  style="text-align:right; margin-right: 20px;margin-bottom: 10px;"><a href="?c=Admin_Activity_SetInteractive&a=PageShow&events_id=<?php echo $this->_tpl_vars['events_Data']['events']['id']; ?>
 
- &typ=question"><i class="fa fa-plus"></i>添加一个问题</a></div>
 
- 	</div>
 
- 	
 
- </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, jquery', function (S, Node, IO, Event, jQuery) {
 
- 	var $ = S.all;
 
- 	
 
- 	$(".del_survery_question").on('click', function () {
 
-     	  var survery_question_id = $(this).attr('survery_question_id');
 
-     	  var events_id = <?php echo $this->_tpl_vars['events_Data']['events']['id']; ?>
 
- ;
 
-     	  var formData = {'survery_question_id':survery_question_id,'events_id':events_id};
 
-     	  new IO({
 
-   			type: "post"
 
-   			, url: VG.conf.root_domain + '/?c=Admin_Activity_SetInteractive&a=ReqDelSurveyQuestion'
 
-   			, data: formData
 
-   			, success: function (data) {
 
-   				if (data.ok) { //ok
 
-   					var url = data.msg;
 
-   					location.href = VG.conf.root_domain + '?c=Admin_Activity_SetInteractive&a=PageShow&events_id=<?php echo $this->_tpl_vars['events_Data']['events']['id']; ?>
 
- ';
 
-   				} else {
 
-   					alert('操作失败,原因:'+data.msg);
 
-   				}
 
-   				return false;
 
-   			}
 
-   			, error: function (NULL, textStatus) {
 
-   				alert("请求服务器失败,原因:"+textStatus);
 
-   			}
 
-   			, dataType: "json"
 
-   		});
 
-     	  
 
- 	});
 
- 	
 
- 	
 
- 	
 
- 	
 
- 	$(".del_survery_prize").on('click', function () {
 
-   	  var survery_prize_id = $(this).attr('survery_prize_id');
 
-   	  var events_id = <?php echo $this->_tpl_vars['events_Data']['events']['id']; ?>
 
- ;
 
-   	  var formData = {'survery_prize_id':survery_prize_id,'events_id':events_id};
 
-   	  
 
-   	  new IO({
 
- 			type: "post"
 
- 			, url: VG.conf.root_domain + '/?c=Admin_Activity_SetInteractive&a=ReqDelSurveyPrize'
 
- 			, data: formData
 
- 			, success: function (data) {
 
- 				if (data.ok) { //ok
 
- 					var url = data.msg;
 
- 					location.href = VG.conf.root_domain + '?c=Admin_Activity_SetInteractive&a=PageShow&events_id=<?php echo $this->_tpl_vars['events_Data']['events']['id']; ?>
 
- ';
 
- 				} else {
 
- 					alert('操作失败,原因:'+data.msg);
 
- 				}
 
- 				return false;
 
- 			}
 
- 			, error: function (NULL, textStatus) {
 
- 				alert("请求服务器失败,原因:"+textStatus);
 
- 			}
 
- 			, dataType: "json"
 
- 		});
 
-   	  
 
- 	});
 
- 	
 
- 	
 
- 	
 
- });
 
- </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);
 
-  ?>
 
 
  |