PageRenderTime 43ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/protected/template_c/%%A9^A94^A942575E%%huoyuedu.tpl.php

https://github.com/karlom/gameadmin
PHP | 219 lines | 203 code | 16 blank | 0 comment | 26 complexity | cb372cff73d8cb26730da299a3ce6c80 MD5 | raw file
  1. <?php /* Smarty version 2.6.25, created on 2014-04-18 11:17:31
  2. compiled from module/basedata/huoyuedu.tpl */ ?>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  7. <title><?php echo $this->_tpl_vars['lang']->menu->huoyuedu; ?>
  8. </title>
  9. <link rel="stylesheet" href="/static/css/base.css" type="text/css">
  10. <link rel="stylesheet" href="/static/css/style.css" type="text/css">
  11. <script type="text/javascript" src="/static/js/My97DatePicker/WdatePicker.js"></script>
  12. <script type="text/javascript" src="/static/js/jquery.min.js"></script>
  13. <script type="text/javascript" src="/static/js/highcharts/highcharts.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(function(){
  16. var huoyuedu = new Highcharts.Chart({
  17. chart: {
  18. renderTo: 'huoyuedu',
  19. defaultSeriesType: 'spline',
  20. type:'column'
  21. },
  22. title: {
  23. text: '<?php echo $this->_tpl_vars['selectDay']; ?>
  24. 玩家活跃度'
  25. },
  26. xAxis: {
  27. categories: [
  28. <?php $_from = $this->_tpl_vars['viewData']['huoyue']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['hy'] = array('total' => count($_from), 'iteration' => 0);
  29. if ($this->_foreach['hy']['total'] > 0):
  30. foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['it']):
  31. $this->_foreach['hy']['iteration']++;
  32. ?>
  33. '<?php echo $this->_tpl_vars['key']; ?>
  34. '<?php if (! ($this->_foreach['hy']['iteration'] == $this->_foreach['hy']['total'])): ?>,<?php endif; ?>
  35. <?php endforeach; endif; unset($_from); ?>
  36. ]
  37. },
  38. yAxis: {
  39. title: {
  40. text: ''
  41. }
  42. },
  43. plotOptions: {
  44. column: {
  45. dataLabels: {
  46. enabled: true
  47. }
  48. }
  49. },
  50. series: [{
  51. name: '人数',
  52. data:[
  53. <?php $_from = $this->_tpl_vars['viewData']['huoyue']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['hy'] = array('total' => count($_from), 'iteration' => 0);
  54. if ($this->_foreach['hy']['total'] > 0):
  55. foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['it']):
  56. $this->_foreach['hy']['iteration']++;
  57. ?>
  58. {
  59. dataLabels :{formatter : function(){ return '<strong><?php echo $this->_tpl_vars['it']; ?>
  60. </strong>'} },
  61. y: <?php echo $this->_tpl_vars['it']; ?>
  62. }
  63. <?php if (! ($this->_foreach['hy']['iteration'] == $this->_foreach['hy']['total'])): ?>,<?php endif; ?>
  64. <?php endforeach; endif; unset($_from); ?>
  65. ]
  66. }]
  67. });
  68. var huoyueFinishRate = new Highcharts.Chart({
  69. chart: {
  70. renderTo: 'finishRate',
  71. defaultSeriesType: 'spline',
  72. type:'column'
  73. },
  74. title: {
  75. text: '<?php echo $this->_tpl_vars['selectDay']; ?>
  76. 活跃行动完成率'
  77. },
  78. xAxis: {
  79. categories: [
  80. <?php $_from = $this->_tpl_vars['viewData']['finishRate']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['hyr'] = array('total' => count($_from), 'iteration' => 0);
  81. if ($this->_foreach['hyr']['total'] > 0):
  82. foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['it']):
  83. $this->_foreach['hyr']['iteration']++;
  84. ?>
  85. '<strong><?php echo $this->_tpl_vars['it']['name']; ?>
  86. </strong>'<?php if (! ($this->_foreach['hyr']['iteration'] == $this->_foreach['hyr']['total'])): ?>,<?php endif; ?>
  87. <?php endforeach; endif; unset($_from); ?>
  88. ],
  89. labels: {
  90. rotation: -45,
  91. align: 'right',
  92. style: {
  93. font: 'normal 13px Verdana, sans-serif'
  94. }
  95. }
  96. },
  97. yAxis: {
  98. title: {
  99. text: '百分比'
  100. }
  101. },
  102. plotOptions: {
  103. column: {
  104. dataLabels: {
  105. enabled: true
  106. }
  107. }
  108. },
  109. series: [{
  110. name: '完成率',
  111. data:[
  112. <?php $_from = $this->_tpl_vars['viewData']['finishRate']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['hyr'] = array('total' => count($_from), 'iteration' => 0);
  113. if ($this->_foreach['hyr']['total'] > 0):
  114. foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['it']):
  115. $this->_foreach['hyr']['iteration']++;
  116. ?>
  117. {
  118. dataLabels :{formatter : function(){ return '<strong><?php echo $this->_tpl_vars['it']['rate']; ?>
  119. </strong>'} },
  120. y: <?php echo $this->_tpl_vars['it']['rate']; ?>
  121. }
  122. <?php if (! ($this->_foreach['hyr']['iteration'] == $this->_foreach['hyr']['total'])): ?>,<?php endif; ?>
  123. <?php endforeach; endif; unset($_from); ?>
  124. ]
  125. }]
  126. });
  127. });
  128. </script>
  129. </head>
  130. <body>
  131. <div id="position">
  132. <b><?php echo $this->_tpl_vars['lang']->menu->class->baseData; ?>
  133. <?php echo $this->_tpl_vars['lang']->menu->huoyuedu; ?>
  134. </b>
  135. </div>
  136. <div><?php echo $this->_tpl_vars['lang']->page->serverOnlineDate; ?>
  137. : <?php echo $this->_tpl_vars['minDate']; ?>
  138. &nbsp; <?php echo $this->_tpl_vars['lang']->page->today; ?>
  139. : <?php echo $this->_tpl_vars['maxDate']; ?>
  140. </div>
  141. <br />
  142. <form id="searchform" name="searchform" action="" method="POST" accept-charset="utf-8">
  143. <td>&nbsp;<?php echo $this->_tpl_vars['lang']->page->date; ?>
  144. <input type="text" size="13" class="Wdate" name="selectDate" id="selectDate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'<?php echo $this->_tpl_vars['minDate']; ?>
  145. ',maxDate:'<?php echo $this->_tpl_vars['maxDate']; ?>
  146. '})" value="<?php echo $this->_tpl_vars['selectDate']; ?>
  147. "></td>
  148. <td><input type="image" name="search" src="/static/images/search.gif" align="absmiddle" /></td>
  149. </form>
  150. <br />
  151. <div><h3>玩家活跃度</h3></div>
  152. <?php if ($this->_tpl_vars['viewData']['huoyue']): ?>
  153. <div id="huoyuedu" style="width: 960px; height: 400px"></div>
  154. <?php else: ?>
  155. <div><?php echo $this->_tpl_vars['lang']->page->noData; ?>
  156. </div>
  157. <?php endif; ?>
  158. <br />
  159. <div><h3>活跃行动完成率</h3></div>
  160. <?php if ($this->_tpl_vars['viewData']['finishRate']): ?>
  161. <div id="finishRate" style="width: 960px; height: 400px"></div>
  162. <?php else: ?>
  163. <div><?php echo $this->_tpl_vars['lang']->page->noData; ?>
  164. </div>
  165. <?php endif; ?>
  166. <br />
  167. <div><h3>活跃奖励礼包领取率</h3></div>
  168. <br />
  169. <?php if ($this->_tpl_vars['viewData']): ?>
  170. <table class="DataGrid" style="width:960px">
  171. <tr >
  172. <th>活跃礼包</th>
  173. <th>礼包ID</th>
  174. <th>可领取玩家数</th>
  175. <th>已领取玩家数</th>
  176. <th>领取率</th>
  177. </tr>
  178. <?php $_from = $this->_tpl_vars['viewData']['rewardTakeRate']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['reward'] = array('total' => count($_from), 'iteration' => 0);
  179. if ($this->_foreach['reward']['total'] > 0):
  180. foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['item']):
  181. $this->_foreach['reward']['iteration']++;
  182. ?>
  183. <tr align="center">
  184. <td><?php echo $this->_tpl_vars['item']['name']; ?>
  185. </td>
  186. <td><?php echo $this->_tpl_vars['item']['item_id']; ?>
  187. </td>
  188. <td><?php echo $this->_tpl_vars['item']['all']; ?>
  189. </td>
  190. <td><?php echo $this->_tpl_vars['item']['taked']; ?>
  191. </td>
  192. <td><?php echo $this->_tpl_vars['item']['rate']; ?>
  193. %</td>
  194. </tr>
  195. <?php endforeach; endif; unset($_from); ?>
  196. </table>
  197. <?php else: ?>
  198. <div><?php echo $this->_tpl_vars['lang']->page->noData; ?>
  199. </div>
  200. <?php endif; ?>
  201. <br />
  202. </body>
  203. </html>