* change for my score page.

This commit is contained in:
wangyidong
2018-03-30 11:25:07 +08:00
parent 7b614b7620
commit b51a42c506
2 changed files with 111 additions and 99 deletions
+44 -40
View File
@@ -10,45 +10,49 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='titlebar'>
<div class='heading'><?php echo html::icon($lang->icons['score']); ?><?php echo $lang->score->record; ?></div>
<div class='actions'>
<a class='btn disabled'><strong><?php echo $lang->score->current; ?>:</strong><?php echo $user->score; ?></a>
<span class='btn disabled hidden'><label><?php echo $lang->score->level; ?>:</label><?php echo $user->scoreLevel; ?></span>
<?php common::printLink('score', 'rule', '', $lang->my->scoreRule, '', "class='btn btn-primary'");?>
<main id="main">
<div class="container">
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->score->record;?></span></span>
</div>
<div class="btn-toolbar pull-right">
<span class='btn text'><strong><?php echo $lang->score->current; ?>:</strong><?php echo $user->score; ?></span>
<span class='btn text hidden'><label><?php echo $lang->score->level; ?>:</label><?php echo $user->scoreLevel; ?></span>
<?php common::printLink('score', 'rule', '', $lang->my->scoreRule, '', "class='btn btn-primary'");?>
</div>
</div>
<div id="mainContent">
<table class="main-table table has-sort-head table-lg table-fixed">
<thead>
<tr>
<th class="w-200px"><?php echo $lang->score->time; ?></th>
<th class="w-150px"><?php echo $lang->score->module; ?></th>
<th class="w-150px"><?php echo $lang->score->method; ?></th>
<th class="w-100px"><?php echo $lang->score->before; ?></th>
<th class="w-100px"><?php echo $lang->score->score; ?></th>
<th class="w-100px"><?php echo $lang->score->after; ?></th>
<th><?php echo $lang->score->desc; ?></th>
</tr>
</thead>
<tbody>
<?php foreach($scores as $score):?>
<tr>
<td><?php echo $score->time; ?></td>
<td><?php echo $lang->score->modules[$score->module]; ?></td>
<td><?php echo $lang->score->methods[$score->module][$score->method]; ?></td>
<td><?php echo $score->before; ?></td>
<td><?php echo $score->score; ?></td>
<td><?php echo $score->after; ?></td>
<td><?php echo $score->desc; ?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php if($scores):?>
<div class="table-footer"><?php $pager->show('right', 'pagerjs');?></div>
<?php endif;?>
</div>
</div>
</div>
<table class='table tablesorter'>
<thead>
<tr class='colhead'>
<th class="w-200px"><?php echo $lang->score->time; ?></th>
<th class="w-150px"><?php echo $lang->score->module; ?></th>
<th class="w-150px"><?php echo $lang->score->method; ?></th>
<th class="w-100px"><?php echo $lang->score->before; ?></th>
<th class="w-100px"><?php echo $lang->score->score; ?></th>
<th class="w-100px"><?php echo $lang->score->after; ?></th>
<th><?php echo $lang->score->desc; ?></th>
</tr>
</thead>
<?php if(!empty($scores)):?>
<tbody>
<?php foreach($scores as $score):?>
<tr class='text-center'>
<td><?php echo $score->time; ?></td>
<td><?php echo $lang->score->modules[$score->module]; ?></td>
<td><?php echo $lang->score->methods[$score->module][$score->method]; ?></td>
<td><?php echo $score->before; ?></td>
<td><?php echo $score->score; ?></td>
<td><?php echo $score->after; ?></td>
<td><?php echo $score->desc; ?></td>
</tr>
<?php endforeach;?>
</tbody>
<?php endif;?>
<tfoot>
<tr>
<td colspan='7'><?php $pager->show();?></td>
</tr>
</tfoot>
</table>
</main>
<?php include '../../common/view/footer.html.php';?>
+67 -59
View File
@@ -10,64 +10,72 @@
*/
?>
<?php include '../../common/view/header.html.php'; ?>
<div id='titlebar'>
<div class='heading'><?php echo $lang->my->scoreRule; ?></div>
<div class='actions'>
<?php echo html::a($this->createLink('my', 'score'), $lang->score->common, '', "class='btn btn-primary'");?>
<main id="main">
<div class="container">
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->my->scoreRule;?></span></span>
</div>
<div class="btn-toolbar pull-right">
<?php echo html::a($this->createLink('my', 'score'), $lang->score->common, '', "class='btn btn-primary'");?>
</div>
</div>
<div id="mainContent">
<table class="main-table table has-sort-head table-lg table-fixed">
<thead>
<tr>
<th class="w-150px"><?php echo $lang->score->module;?></th>
<th class="w-150px"><?php echo $lang->score->method;?></th>
<th class="w-150px"><?php echo $lang->score->times;?></th>
<th class="w-150px"><?php echo $lang->score->hour;?></th>
<th class="w-80px"><?php echo $lang->score->score;?></th>
<th><?php echo $lang->score->desc;?></th>
</tr>
</thead>
<tbody>
<?php foreach($config->score->rule as $module => $moduleRule):?>
<?php foreach($moduleRule as $method => $rule):?>
<tr>
<td><?php echo $lang->score->modules[$module];?></td>
<td><?php echo $lang->score->methods[$module][$method];?></td>
<td><?php echo empty($rule['times']) ? $lang->score->noLimit : $rule['times'];?></td>
<td><?php echo empty($rule['hour']) ? $lang->score->noLimit : $rule['hour'];?></td>
<td><?php echo $rule['score'];?></td>
<td>
<?php
if(isset($lang->score->extended[$module][$method]))
{
$desc = $lang->score->extended[$module][$method];
$descRule = explode('##', $desc);
if(!empty($descRule))
{
foreach($descRule as $key => $value)
{
if($key % 2 == 1)
{
$match = explode(',', $value);
if(count($match) == 2)
{
$score = $config->score->ruleExtended[$module][$method][$match[0]][$match[1]];
}
else
{
$score = $config->score->ruleExtended[$module][$method][$match[0]];
}
$desc = str_replace('##' . $value . '##', $score, $desc);
}
}
}
echo $desc;
}
?>
</td>
</tr>
<?php endforeach;?>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
</div>
<table class="table table-striped">
<thead>
<tr>
<th class="w-150px"><?php echo $lang->score->module;?></th>
<th class="w-150px"><?php echo $lang->score->method;?></th>
<th class="w-150px"><?php echo $lang->score->times;?></th>
<th class="w-150px"><?php echo $lang->score->hour;?></th>
<th class="w-150px"><?php echo $lang->score->score;?></th>
<th><?php echo $lang->score->desc;?></th>
</tr>
</thead>
<tbody>
<?php foreach($config->score->rule as $module => $moduleRule):?>
<?php foreach($moduleRule as $method => $rule):?>
<tr>
<td class="text-center"><?php echo $lang->score->modules[$module];?></td>
<td class="text-center"><?php echo $lang->score->methods[$module][$method];?></td>
<td class="text-center"><?php echo empty($rule['times']) ? $lang->score->noLimit : $rule['times'];?></td>
<td class="text-center"><?php echo empty($rule['hour']) ? $lang->score->noLimit : $rule['hour'];?></td>
<td class="text-center"><?php echo $rule['score'];?></td>
<td>
<?php
if(isset($lang->score->extended[$module][$method]))
{
$desc = $lang->score->extended[$module][$method];
$descRule = explode('##', $desc);
if(!empty($descRule))
{
foreach($descRule as $key => $value)
{
if($key % 2 == 1)
{
$match = explode(',', $value);
if(count($match) == 2)
{
$score = $config->score->ruleExtended[$module][$method][$match[0]][$match[1]];
}
else
{
$score = $config->score->ruleExtended[$module][$method][$match[0]];
}
$desc = str_replace('##' . $value . '##', $score, $desc);
}
}
}
echo $desc;
}
?>
</td>
</tr>
<?php endforeach;?>
<?php endforeach;?>
</tbody>
</table>
</main>
<?php include '../../common/view/footer.html.php'; ?>