/source/application/view/templates_pub/%%D3^D3C^D3C9DBFD%%mark_list.html.php
PHP | 232 lines | 218 code | 14 blank | 0 comment | 23 complexity | 65ce2a92d0bb274dbd510eebc4441c25 MD5 | raw file
Possible License(s): LGPL-2.1
- <?php /* Smarty version 2.6.19, created on 2011-10-04 00:53:13
- compiled from public/mark_list.html */ ?>
- <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
- 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); ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "public/header.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <script type="text/javascript" src="<?php echo @STATIC_COMPONENT_URL_JS; ?>
- jquery/jquery.tablesorter.custom.min.js"></script>
- <script type="text/javascript">
- function getContent()
- {
- var name = document.getElementById('name');
- var code = document.getElementById('code');
- var subject = document.getElementById('subject');
- var action_link = '<?php echo @APPLICATION_URL; ?>
- /mark/list';
- if(name.value) {
- action_link = action_link + '/name/' + URLEncode(name.value);
- }
- if(code.value) {
- action_link = action_link + '/code/' + URLEncode(code.value);
- }
- if(subject.value) {
- action_link = action_link + '/subject/' + URLEncode(subject.value);
- }
- document.form.action = action_link;
- document.form.submit();
- }
- function exportExcel()
- {
- var name = document.getElementById('name');
- var code = document.getElementById('code');
- var subject = document.getElementById('subject');
- var action_link = '<?php echo @APPLICATION_URL; ?>
- /mark/export';
- if(name.value) {
- action_link = action_link + '/name/' + URLEncode(name.value);
- }
- if(code.value) {
- action_link = action_link + '/code/' + URLEncode(code.value);
- }
- if(subject.value) {
- action_link = action_link + '/subject/' + URLEncode(subject.value);
- }
- document.form.action = action_link;
- document.form.submit();
- }
- </script>
- <form id="form" name="form" method="post" action="">
- <div class="right_content_col">
- <div class="clearfix">
- <div class="button" style="position: relative;float: right; margin-right: 10px;z-index: 1;">
- <a href="javascript:exportExcel()"><span><?php echo $this->_config[0]['vars']['_LB_EXPORT_MARK']; ?>
- </span></a>
- </div>
- <div class="header_top" style="position: relative;float: left; margin-left: 20px;">
- <div class="learfix header_top_left">
- <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)); ?>
- </h2>
- </div>
- </div>
- <div class="mlr">
- <div class="line"></div>
- <div class="content grid">
- <div class="filter" style="width: 100%;">
- <!-- start -->
- <div id="filter_panel">
- <p>
- <label>
- <?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)); ?>
- :
- </label>
- <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)); ?>
- " style="width:<?php echo Parameter::ONE_ONE_WIDTH; ?>
- px" maxlength="<?php echo Parameter::MAX_LENGTH_NAME; ?>
- "/>
- </p>
- <p>
- <label>
- <?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)); ?>
- :
- </label>
- <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)); ?>
- " style="width:<?php echo Parameter::ONE_ONE_WIDTH; ?>
- px" maxlength="<?php echo Parameter::MAX_LENGTH_NAME; ?>
- "/>
- </p>
- <p>
- <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)); ?>
- : </label>
- <select name="subject" id="subject" >
- <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)); ?>
- </option>
- <?php while ($this->_tpl_vars['subject']->fetch()) { ?>
- <option value="<?php echo $this->_tpl_vars['subject']->code; ?>
- " <?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)); ?>
- </option>
- <?php } ?>
- </select>
- </p>
- <p class="button" align="right">
- <a id="auto_teacher_list_search" href="javascript:getContent()">
- <span>
- <?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)); ?>
- </span>
- </a>
- </p>
- </div>
- <!-- end filter_panel -->
- </div>
- <div class="spacer line-boder"></div>
- <div class="content reset-content-width-ie" style="padding-top:0px;">
- <?php $this->assign('count', 0); ?>
- <?php if (count ( $this->_tpl_vars['marks'] ) > 0): ?>
- <table class="sorter grid" cellspacing="0">
- <thead>
- <tr class="head">
- <th width="5%" style="display: none;"><?php echo $this->_config[0]['vars']['_LB_NO']; ?>
- </th>
- <th width="12%;">
- <?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)); ?>
- </th>
- <th width="22%;">
- <?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)); ?>
- </th>
- <?php $this->assign('index', 0); ?>
- <?php while ($this->_tpl_vars['mark_subject']->fetch()) { ?>
- <?php $this->assign('index', $this->_tpl_vars['index']+1); ?>
- <th width="10px;">
- <span title="<?php echo $this->_tpl_vars['mark_subject']->name; ?>
- ">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)); ?>
- </span>
- </th>
- <?php } ?>
- <th style="text-align: center;">
- <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)); ?>
- "><?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)); ?>
- </span>
- </th>
- </tr>
- </thead>
- <tbody>
- <?php $this->assign('index', 0); ?>
- <?php $_from = $this->_tpl_vars['marks']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['code'] => $this->_tpl_vars['mark']):
- ?>
- <?php $this->assign('index', $this->_tpl_vars['index']+1); ?>
- <tr >
- <?php $this->assign('idx', 0); ?>
- <?php $this->assign('total_mark', 0); ?>
- <?php $this->assign('total_num', 0); ?>
- <?php $_from = $this->_tpl_vars['mark']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['id'] => $this->_tpl_vars['obj']):
- ?>
- <?php $this->assign('idx', $this->_tpl_vars['idx']+1); ?>
- <?php if ($this->_tpl_vars['obj']['total_mark']): ?>
- <?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);?>
- <?php endif; ?>
- <?php echo smarty_function_math(array('equation' => "x+y",'x' => $this->_tpl_vars['total_mark'],'y' => $this->_tpl_vars['total'],'assign' => 'total_mark'), $this);?>
- <?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);?>
- <?php if ($this->_tpl_vars['idx'] == 1): ?>
- <td style="display: none;"><?php echo $this->_tpl_vars['index']; ?>
- </td>
- <td>
- <?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)); ?>
- </td>
- <td>
- <a href= "<?php echo @APPLICATION_URL; ?>
- /student/detail/id/<?php echo $this->_tpl_vars['obj']['id_student']; ?>
- /parent_page/mark" >
- <?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)); ?>
- <?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)); ?>
- </a>
- </td>
- <?php endif; ?>
- <td style="text-align: center; <?php if ($this->_tpl_vars['obj']['total_mark'] < 5): ?>color:red;<?php endif; ?>">
- <?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)); ?>
- <?php else: ?> <?php endif; ?>
- </td>
- <?php endforeach; endif; unset($_from); ?>
- <?php if ($this->_tpl_vars['total_num'] != 0): ?>
- <?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);?>
- <?php endif; ?>
- <td style="color: #379EC9;text-align: center; font-weight: bold">
- <?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, '.', ',')); ?>
- <?php else: ?> <?php endif; ?>
- </td>
- </tr>
- <?php endforeach; endif; unset($_from); ?>
- </tbody>
- </table>
- <?php else: ?>
- <div class="empty_sessage" align="center">
- <?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)); ?>
- </div>
- <?php endif; ?>
- </div>
- </div>
- <div class="clear"></div>
-
- </div>
- </div>
- </div>
- </form>
- <script type="text/javascript">
- $(function() {
- $("table.sorter").tablesorter({
- sortList: [[1,0]]
- });
- });
- </script>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "public/footer.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>