diff --git a/db/update9.5.1.sql b/db/update9.5.1.sql index 789f54ab2e..e8021f50e2 100644 --- a/db/update9.5.1.sql +++ b/db/update9.5.1.sql @@ -36,6 +36,23 @@ ALTER TABLE `zt_team` ADD `left` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0' ALTER TABLE `zt_team` ADD `order` TINYINT(3) NOT NULL DEFAULT '0' AFTER `left`; ALTER TABLE `zt_team` CHANGE `days` `days` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'; - ALTER TABLE `zt_team` DROP PRIMARY KEY; -ALTER TABLE `zt_team` ADD PRIMARY KEY (`project`, `task`, `account`); \ No newline at end of file +ALTER TABLE `zt_team` ADD PRIMARY KEY (`project`, `task`, `account`); + +ALTER TABLE `zt_user` ADD `score` DECIMAL(12,1) NOT NULL DEFAULT '0' AFTER `deleted`; +ALTER TABLE `zt_user` ADD `score_level` DECIMAL(12,1) NOT NULL DEFAULT '0' AFTER `score`; + +CREATE TABLE `zt_score` ( + `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT, + `userID` int(11) NOT NULL DEFAULT '0', + `account` varchar(30) NOT NULL, + `model` varchar(30) NOT NULL, + `method` varchar(30) NOT NULL, + `score` decimal(12,1) NOT NULL DEFAULT '0.0', + `type` enum('repeat','one') NOT NULL DEFAULT 'repeat', + `time` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `account` (`account`), + KEY `model` (`model`), + KEY `method` (`method`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/module/score/control.php b/module/score/control.php index 08c3586b4f..4cb167c4ec 100644 --- a/module/score/control.php +++ b/module/score/control.php @@ -16,9 +16,15 @@ class score extends control * @access public * @return mixed */ - public function browse() + public function browse($recTotal = 0, $recPerPage = 100) { - $this->view->title = $this->lang->score->common; + $this->app->loadClass('pager', $static = true); + $pager = new pager($recTotal, $recPerPage); + $scores = $this->score->getScores($pager); + + $this->view->title = $this->lang->score->common; + $this->view->pager = $pager; + $this->view->scores = $scores; $this->display(); } } \ No newline at end of file diff --git a/module/score/lang/zh-cn.php b/module/score/lang/zh-cn.php index 917048ec31..f090ab8c1b 100644 --- a/module/score/lang/zh-cn.php +++ b/module/score/lang/zh-cn.php @@ -2,4 +2,16 @@ $lang->score->common = '积分'; $lang->score->record = '积分记录'; $lang->score->reset = '重置积分'; -$lang->score->reset = '重置积分'; + +$lang->score->id = '编号'; +$lang->score->userID = '用户ID'; +$lang->score->account = '用户'; +$lang->score->model = '模块'; +$lang->score->method = '方式'; +$lang->score->type = '类型'; +$lang->score->score = '分值'; +$lang->score->time = '时间'; + +$lang->score->methods['login'] = '登录'; +$lang->score->methods['admin'] = ''; +$lang->score->methods['tutorial'] = '新手教程'; diff --git a/module/score/model.php b/module/score/model.php index 0f6f2ef07d..c418afc981 100644 --- a/module/score/model.php +++ b/module/score/model.php @@ -10,5 +10,9 @@ */ class scoreModel extends model { + public function getScores($pager) + { + + } } \ No newline at end of file diff --git a/module/score/view/browse.html.php b/module/score/view/browse.html.php index 6845415fc1..82f353c61c 100644 --- a/module/score/view/browse.html.php +++ b/module/score/view/browse.html.php @@ -18,57 +18,27 @@
| action->objectType);?> | -idAB);?> | -action->objectName;?> | -action->actor);?> | -action->date);?> | -actions;?> | +score->id;?> | +score->account;?> | +score->model;?> | +score->method;?> | +score->type;?> | +score->score;?> | +score->time;?> |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| action->objectTypes, $action->objectType, '');?> | -objectID;?> | -- objectType == 'user' ? "account={$action->objectName}" : "id={$action->objectID}"; - if($module == 'doclib') - { - echo $action->objectName; - } - else - { - echo html::a($this->createLink($module, $methodName, $params), $action->objectName); - } - ?> - | -actor];?> | -date;?> | -- id", $lang->action->undelete, 'hiddenwin'); - if($type == 'all') common::printLink('action', 'hideOne', "actionid=$action->id", $lang->action->hideOne, 'hiddenwin'); - ?> - | +|||||||
|
-
-
- action->hideAll, inlink('hideAll'), 'hiddenwin');?>
-
-
+ action->trashTips;?>
- | show();?> | |||||||||||