PageRenderTime 52ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/source/application/view/templates_pub/%%D3^D3C^D3C9DBFD%%mark_list.html.php

http://sharebooks.googlecode.com/
PHP | 232 lines | 218 code | 14 blank | 0 comment | 23 complexity | 65ce2a92d0bb274dbd510eebc4441c25 MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php /* Smarty version 2.6.19, created on 2011-10-04 00:53:13
  2. compiled from public/mark_list.html */ ?>
  3. <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
  4. smarty_core_load_plugins(array('plugins' => array(array('modifier', 'utf8_escape_html', 'public/mark_list.html', 49, false),array('modifier', 'number_format', 'public/mark_list.html', 150, false),array('function', 'math', 'public/mark_list.html', 127, false),)), $this); ?>
  5. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  6. $this->_smarty_include(array('smarty_include_tpl_file' => "public/header.html", 'smarty_include_vars' => array()));
  7. $this->_tpl_vars = $_smarty_tpl_vars;
  8. unset($_smarty_tpl_vars);
  9. ?>
  10. <script type="text/javascript" src="<?php echo @STATIC_COMPONENT_URL_JS; ?>
  11. jquery/jquery.tablesorter.custom.min.js"></script>
  12. <script type="text/javascript">
  13. function getContent()
  14. {
  15. var name = document.getElementById('name');
  16. var code = document.getElementById('code');
  17. var subject = document.getElementById('subject');
  18. var action_link = '<?php echo @APPLICATION_URL; ?>
  19. /mark/list';
  20. if(name.value) {
  21. action_link = action_link + '/name/' + URLEncode(name.value);
  22. }
  23. if(code.value) {
  24. action_link = action_link + '/code/' + URLEncode(code.value);
  25. }
  26. if(subject.value) {
  27. action_link = action_link + '/subject/' + URLEncode(subject.value);
  28. }
  29. document.form.action = action_link;
  30. document.form.submit();
  31. }
  32. function exportExcel()
  33. {
  34. var name = document.getElementById('name');
  35. var code = document.getElementById('code');
  36. var subject = document.getElementById('subject');
  37. var action_link = '<?php echo @APPLICATION_URL; ?>
  38. /mark/export';
  39. if(name.value) {
  40. action_link = action_link + '/name/' + URLEncode(name.value);
  41. }
  42. if(code.value) {
  43. action_link = action_link + '/code/' + URLEncode(code.value);
  44. }
  45. if(subject.value) {
  46. action_link = action_link + '/subject/' + URLEncode(subject.value);
  47. }
  48. document.form.action = action_link;
  49. document.form.submit();
  50. }
  51. </script>
  52. <form id="form" name="form" method="post" action="">
  53. <div class="right_content_col">
  54. <div class="clearfix">
  55. <div class="button" style="position: relative;float: right; margin-right: 10px;z-index: 1;">
  56. <a href="javascript:exportExcel()"><span><?php echo $this->_config[0]['vars']['_LB_EXPORT_MARK']; ?>
  57. </span></a>
  58. </div>
  59. <div class="header_top" style="position: relative;float: left; margin-left: 20px;">
  60. <div class="learfix header_top_left">
  61. <h2><?php echo ((is_array($_tmp=$this->_config[0]['vars']['_LB_MARK_LIST'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  62. </h2>
  63. </div>
  64. </div>
  65. <div class="mlr">
  66. <div class="line"></div>
  67. <div class="content grid">
  68. <div class="filter" style="width: 100%;">
  69. <!-- start -->
  70. <div id="filter_panel">
  71. <p>
  72. <label>
  73. <?php echo ((is_array($_tmp=$this->_config[0]['vars']['_LB_STUDENT_CODE'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  74. &nbsp;:&nbsp;
  75. </label>
  76. <input type="text" name="code" id="code" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['code'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  77. " style="width:<?php echo Parameter::ONE_ONE_WIDTH; ?>
  78. px" maxlength="<?php echo Parameter::MAX_LENGTH_NAME; ?>
  79. "/>
  80. </p>
  81. <p>
  82. <label>
  83. <?php echo ((is_array($_tmp=$this->_config[0]['vars']['_LB_STUDENT_NAME'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  84. &nbsp;:&nbsp;
  85. </label>
  86. <input type="text" name="name" id="name" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['name'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  87. " style="width:<?php echo Parameter::ONE_ONE_WIDTH; ?>
  88. px" maxlength="<?php echo Parameter::MAX_LENGTH_NAME; ?>
  89. "/>
  90. </p>
  91. <p>
  92. <label for="id_subject"><?php echo ((is_array($_tmp=$this->_config[0]['vars']['_LB_SUBJECT'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  93. : </label>
  94. <select name="subject" id="subject" >
  95. <option value=""><?php echo ((is_array($_tmp=$this->_config[0]['vars']['_LB_ALL'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  96. </option>
  97. <?php while ($this->_tpl_vars['subject']->fetch()) { ?>
  98. <option value="<?php echo $this->_tpl_vars['subject']->code; ?>
  99. " <?php if ($this->_tpl_vars['subject_code'] == $this->_tpl_vars['subject']->code): ?>selected<?php endif; ?>><?php echo ((is_array($_tmp=$this->_tpl_vars['subject']->name)) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  100. </option>
  101. <?php } ?>
  102. </select>
  103. </p>
  104. <p class="button" align="right">
  105. <a id="auto_teacher_list_search" href="javascript:getContent()">
  106. <span>
  107. <?php echo ((is_array($_tmp=$this->_config[0]['vars']['_LB_SEARCH'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  108. </span>
  109. </a>
  110. </p>
  111. </div>
  112. <!-- end filter_panel -->
  113. </div>
  114. <div class="spacer line-boder"></div>
  115. <div class="content reset-content-width-ie" style="padding-top:0px;">
  116. <?php $this->assign('count', 0); ?>
  117. <?php if (count ( $this->_tpl_vars['marks'] ) > 0): ?>
  118. <table class="sorter grid" cellspacing="0">
  119. <thead>
  120. <tr class="head">
  121. <th width="5%" style="display: none;"><?php echo $this->_config[0]['vars']['_LB_NO']; ?>
  122. </th>
  123. <th width="12%;">
  124. <?php echo ((is_array($_tmp=$this->_config[0]['vars']['_LB_STUDENT_CODE'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  125. </th>
  126. <th width="22%;">
  127. <?php echo ((is_array($_tmp=$this->_config[0]['vars']['_LB_STUDENT_NAME'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  128. </th>
  129. <?php $this->assign('index', 0); ?>
  130. <?php while ($this->_tpl_vars['mark_subject']->fetch()) { ?>
  131. <?php $this->assign('index', $this->_tpl_vars['index']+1); ?>
  132. <th width="10px;">
  133. <span title="<?php echo $this->_tpl_vars['mark_subject']->name; ?>
  134. ">M<?php echo ((is_array($_tmp=$this->_tpl_vars['index'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  135. </span>
  136. </th>
  137. <?php } ?>
  138. <th style="text-align: center;">
  139. <span title="<?php echo ((is_array($_tmp=$this->_config[0]['vars']['_LB_NOTE_AVG_MARK'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  140. "><?php echo ((is_array($_tmp=$this->_config[0]['vars']['_LB_AVG_MARK'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  141. </span>
  142. </th>
  143. </tr>
  144. </thead>
  145. <tbody>
  146. <?php $this->assign('index', 0); ?>
  147. <?php $_from = $this->_tpl_vars['marks']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  148. foreach ($_from as $this->_tpl_vars['code'] => $this->_tpl_vars['mark']):
  149. ?>
  150. <?php $this->assign('index', $this->_tpl_vars['index']+1); ?>
  151. <tr >
  152. <?php $this->assign('idx', 0); ?>
  153. <?php $this->assign('total_mark', 0); ?>
  154. <?php $this->assign('total_num', 0); ?>
  155. <?php $_from = $this->_tpl_vars['mark']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  156. foreach ($_from as $this->_tpl_vars['id'] => $this->_tpl_vars['obj']):
  157. ?>
  158. <?php $this->assign('idx', $this->_tpl_vars['idx']+1); ?>
  159. <?php if ($this->_tpl_vars['obj']['total_mark']): ?>
  160. <?php echo smarty_function_math(array('equation' => "x*y",'x' => $this->_tpl_vars['obj']['total_mark'],'y' => $this->_tpl_vars['obj']['num_arg'],'assign' => 'total'), $this);?>
  161. <?php endif; ?>
  162. <?php echo smarty_function_math(array('equation' => "x+y",'x' => $this->_tpl_vars['total_mark'],'y' => $this->_tpl_vars['total'],'assign' => 'total_mark'), $this);?>
  163. <?php echo smarty_function_math(array('equation' => "x+y",'x' => $this->_tpl_vars['total_num'],'y' => $this->_tpl_vars['obj']['num_arg'],'assign' => 'total_num'), $this);?>
  164. <?php if ($this->_tpl_vars['idx'] == 1): ?>
  165. <td style="display: none;"><?php echo $this->_tpl_vars['index']; ?>
  166. </td>
  167. <td>
  168. <?php echo ((is_array($_tmp=$this->_tpl_vars['obj']['code_student'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  169. </td>
  170. <td>
  171. <a href= "<?php echo @APPLICATION_URL; ?>
  172. /student/detail/id/<?php echo $this->_tpl_vars['obj']['id_student']; ?>
  173. /parent_page/mark" >
  174. <?php echo ((is_array($_tmp=$this->_tpl_vars['obj']['first_name'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  175. <?php echo ((is_array($_tmp=$this->_tpl_vars['obj']['last_name'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  176. </a>
  177. </td>
  178. <?php endif; ?>
  179. <td style="text-align: center; <?php if ($this->_tpl_vars['obj']['total_mark'] < 5): ?>color:red;<?php endif; ?>">
  180. <?php if ($this->_tpl_vars['obj']['total_mark']): ?><?php echo ((is_array($_tmp=$this->_tpl_vars['obj']['total_mark'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  181. <?php else: ?>&nbsp;<?php endif; ?>
  182. </td>
  183. <?php endforeach; endif; unset($_from); ?>
  184. <?php if ($this->_tpl_vars['total_num'] != 0): ?>
  185. <?php echo smarty_function_math(array('equation' => "round(x/y, 2)",'x' => $this->_tpl_vars['total_mark'],'y' => $this->_tpl_vars['total_num'],'assign' => 'avg_mark'), $this);?>
  186. <?php endif; ?>
  187. <td style="color: #379EC9;text-align: center; font-weight: bold">
  188. <?php if ($this->_tpl_vars['avg_mark']): ?><?php echo ((is_array($_tmp=$this->_tpl_vars['avg_mark'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2, '.', ',') : number_format($_tmp, 2, '.', ',')); ?>
  189. <?php else: ?>&nbsp;<?php endif; ?>
  190. </td>
  191. </tr>
  192. <?php endforeach; endif; unset($_from); ?>
  193. </tbody>
  194. </table>
  195. <?php else: ?>
  196. <div class="empty_sessage" align="center">
  197. <?php echo ((is_array($_tmp=$this->_config[0]['vars']['_WAR_NO_MARK'])) ? $this->_run_mod_handler('utf8_escape_html', true, $_tmp) : smarty_modifier_utf8_escape_html($_tmp)); ?>
  198. </div>
  199. <?php endif; ?>
  200. </div>
  201. </div>
  202. <div class="clear"></div>
  203. </div>
  204. </div>
  205. </div>
  206. </form>
  207. <script type="text/javascript">
  208. $(function() {
  209. $("table.sorter").tablesorter({
  210. sortList: [[1,0]]
  211. });
  212. });
  213. </script>
  214. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  215. $this->_smarty_include(array('smarty_include_tpl_file' => "public/footer.html", 'smarty_include_vars' => array()));
  216. $this->_tpl_vars = $_smarty_tpl_vars;
  217. unset($_smarty_tpl_vars);
  218. ?>