Merge branch 'master' of https://git.zcorp.cc/easycorp/zentaopms
This commit is contained in:
+2
-2
@@ -64,12 +64,12 @@ $config->slaveDB = new stdclass();
|
||||
$config->db->persistant = false; // 是否为持续连接。 Pconnect or not.
|
||||
$config->db->driver = 'mysql'; // 目前只支持MySQL数据库。Must be MySQL. Don't support other database server yet.
|
||||
$config->db->encoding = 'UTF8'; // 数据库编码。 Encoding of database.
|
||||
$config->db->strictMode = false; // 关闭MySQL的严格模式。 Turn off the strict mode of MySQL.
|
||||
$config->db->strictMode = true; // 默认开启MySQL的严格模式。 Turn on the strict mode of MySQL.
|
||||
$config->db->prefix = 'zt_'; // 数据库表名前缀。 The prefix of the table name.
|
||||
$config->slaveDB->persistant = false;
|
||||
$config->slaveDB->driver = 'mysql';
|
||||
$config->slaveDB->encoding = 'UTF8';
|
||||
$config->slaveDB->strictMode = false;
|
||||
$config->slaveDB->strictMode = true;
|
||||
|
||||
/* 可用域名后缀列表。Domain postfix lists. */
|
||||
$config->domainPostfix = "|com|com.cn|com.hk|com.tw|com.vc|edu.cn|es|";
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
body {padding-bottom: 20px;}
|
||||
.nav > li > .btn {padding: 0 5px; line-height: 24px; margin: 3px; color: #3C4353;}
|
||||
.nav > li > .btn.btn-primary {color: #fff;}
|
||||
.nav .icon-more {font-size: 14px;}
|
||||
.block-statistic .nav-stacked {overflow: auto; max-height: 220px;}
|
||||
#dashboard .col-side {width: 450px; max-width: 450px;}
|
||||
#dashboard .panel {margin-bottom: 20px; position: relative;}
|
||||
#dashboard .panel-body {max-height: 400px; overflow: auto;}
|
||||
#dashboard .panel-body.has-table {padding-top: 0;}
|
||||
#dashboard .panel-move-handler {position: absolute; top: 0; left: 0; right: 50px; height: 40px; z-index: 10; cursor: move;}
|
||||
#dashboard .panel-heading {cursor: move; padding-right: 75px;}
|
||||
#dashboard .panel-actions {position: absolute; top: 0; right: 0; margin-right: 0; padding: 7px 8px}
|
||||
#dashboard .panel-actions > a {padding: 0 5px; line-height: 22px;}
|
||||
@media (min-width: 992px)
|
||||
{
|
||||
#dashboard > .row {display: table; width: 100%; margin: 0;}
|
||||
#dashboard > .row > .col-main,
|
||||
#dashboard > .row > .col-side {display: table-cell; float: none; padding: 0; vertical-align: top;}
|
||||
#dashboard > .row > .col-main {padding-right: 10px;}
|
||||
#dashboard > .row > .col-side {padding-left: 10px;}
|
||||
}
|
||||
#dashboard.sortable-sorting .panel {margin-bottom: 10px; box-shadow: 0 1px 1px rgba(0,0,0,.075), 0 2px 6px 0 rgba(0,0,0,.075); height: 46px;}
|
||||
#dashboard.sortable-sorting .panel > * {display: none;}
|
||||
#dashboard.sortable-sorting .panel:before {display: block; content: attr(data-name); padding: 12px 20px; font-weight: bold; font-size: 14px; color: #3c4353; opacity: 1 !important; text-align: left; visibility: visible;}
|
||||
#dashboard.sortable-sorting .panel.dragging {visibility: visible; background: transparent; background: rgba(0,0,0,.075); box-shadow: inset 0 2px 6px rgba(0,0,0,.075);}
|
||||
#dashboard.sortable-sorting .panel.dragging:before {color: #bbb;}
|
||||
#dashboard.sortable-sorting .panel.drag-shadow {box-shadow: 0 1px 3px rgba(0,0,0,.175), 0 3px 8px 0 rgba(0,0,0,.175);}
|
||||
|
||||
#dashboard .block-sm .hide-in-sm {display: none;}
|
||||
#dashboard .block-dynamic .panel-body {overflow-x: hidden;}
|
||||
.modal-body {padding: 10px 20px 20px 20px;}
|
||||
|
||||
#dashboard .block-scrumoverview .table {margin-bottom: 12px;}
|
||||
#dashboard .block-scrumoverview .table thead tr th {padding-left: 0; text-align: right; border-bottom: unset;}
|
||||
#dashboard .block-scrumoverview .table tbody tr td {padding-left: 0;}
|
||||
#dashboard .block-scrumoverview .table tbody tr th {text-align: right;}
|
||||
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
namespace zin;
|
||||
|
||||
$mainBlocks = array();
|
||||
foreach($longBlocks as $index => $block)
|
||||
{
|
||||
$mainBlocks[] =
|
||||
div
|
||||
(
|
||||
set('class', "panel rounded shadow ring-0 canvas {$block->block}" . (isset($block->params->color) ? 'panel-' . $block->params->color : '')),
|
||||
set('data-id', $block->id),
|
||||
set('data-name', $block->title),
|
||||
set('data-order', $block->order),
|
||||
set('data-url', $block->blockLink),
|
||||
div
|
||||
(
|
||||
set('class', 'panel-heading'),
|
||||
div
|
||||
(
|
||||
set('class', 'panel-title'),
|
||||
$block->title
|
||||
),
|
||||
nav
|
||||
(
|
||||
set('class', 'panel-actions nav nav-default'),
|
||||
dropdown
|
||||
(
|
||||
icon
|
||||
(
|
||||
set('class', 'icon icon-ellipsis-v')
|
||||
),
|
||||
set::items
|
||||
([
|
||||
['text' => $lang->block->refresh, 'url' => '', 'class' => 'refresh-panel'],
|
||||
['text' => $lang->edit, 'url' => $this->createLink("block", "admin", "id=$block->id&module=$module"), 'class' => 'refresh-panel'],
|
||||
['text' => $lang->block->hidden, 'url' => '', 'class' => 'refresh-panel'],
|
||||
['text' => $lang->block->createBlock, 'url' => $this->createLink("block", "admin", "id=0&module=$module"), 'data-toggle' => 'modal'],
|
||||
['text' => $lang->block->reset, 'url' => '', 'class' => 'refresh-panel'],
|
||||
]),
|
||||
)
|
||||
)
|
||||
),
|
||||
div
|
||||
(
|
||||
set('class', 'panel-body scrollbar-hover')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$sideBlocks = array();
|
||||
foreach($shortBlocks as $index => $block)
|
||||
{
|
||||
$sideBlocks[] =
|
||||
div
|
||||
(
|
||||
set('class', "panel rounded shadow ring-0 canvas {$block->block}" . (isset($block->params->color) ? 'panel-' . $block->params->color : '')),
|
||||
set('data-id', $block->id),
|
||||
set('data-name', $block->title),
|
||||
set('data-order', $block->order),
|
||||
set('data-url', $block->blockLink),
|
||||
div
|
||||
(
|
||||
set('class', 'panel-heading'),
|
||||
div
|
||||
(
|
||||
set('class', 'panel-title'),
|
||||
$block->title
|
||||
),
|
||||
nav
|
||||
(
|
||||
set('class', 'panel-actions nav nav-default'),
|
||||
dropdown
|
||||
(
|
||||
icon
|
||||
(
|
||||
set('class', 'icon icon-ellipsis-v')
|
||||
),
|
||||
set::items
|
||||
([
|
||||
['text' => $lang->block->refresh, 'url' => '', 'class' => 'refresh-panel'],
|
||||
['text' => $lang->edit, 'url' => $this->createLink("block", "admin", "id=$block->id&module=$module"), 'class' => 'refresh-panel'],
|
||||
['text' => $lang->block->hidden, 'url' => '', 'class' => 'refresh-panel'],
|
||||
['text' => $lang->block->createBlock, 'url' => $this->createLink("block", "admin", "id=0&module=$module"), 'data-toggle' => 'modal'],
|
||||
['text' => $lang->block->reset, 'url' => '', 'class' => 'refresh-panel'],
|
||||
]),
|
||||
)
|
||||
)
|
||||
),
|
||||
div
|
||||
(
|
||||
set('class', 'panel-body scrollbar-hover')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
div
|
||||
(
|
||||
set('class', 'dashboard'),
|
||||
set('id', 'dashboard'),
|
||||
div
|
||||
(
|
||||
set('class', 'row'),
|
||||
div
|
||||
(
|
||||
set('class', 'col-main'),
|
||||
$mainBlocks
|
||||
),
|
||||
div
|
||||
(
|
||||
set('class', 'col-side'),
|
||||
$sideBlocks
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
render();
|
||||
@@ -33,7 +33,7 @@ class my extends control
|
||||
public function index()
|
||||
{
|
||||
$this->view->title = $this->lang->my->common;
|
||||
$this->display();
|
||||
echo $this->fetch('block', 'dashboard', 'module=my');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1399,7 +1399,7 @@ class userModel extends model
|
||||
if($this->session->{"{$account}.loginLocked"} and (time() - strtotime($this->session->{"{$account}.loginLocked"})) <= $this->config->user->lockMinutes * 60) return true;
|
||||
|
||||
$user = $this->dao->select('locked')->from(TABLE_USER)->where('account')->eq($account)->fetch();
|
||||
if(empty($user)) return false;
|
||||
if(empty($user) or is_null($user->locked)) return false;
|
||||
|
||||
if((time() - strtotime($user->locked)) > $this->config->user->lockMinutes * 60) return false;
|
||||
return true;
|
||||
@@ -1414,7 +1414,7 @@ class userModel extends model
|
||||
*/
|
||||
public function cleanLocked($account)
|
||||
{
|
||||
$this->dao->update(TABLE_USER)->set('fails')->eq(0)->set('locked')->eq('0000-00-00 00:00:00')->where('account')->eq($account)->exec();
|
||||
$this->dao->update(TABLE_USER)->set('fails')->eq(0)->set('locked = null')->where('account')->eq($account)->exec();
|
||||
|
||||
unset($_SESSION['loginFails']);
|
||||
unset($_SESSION["{$account}.loginLocked"]);
|
||||
|
||||
Reference in New Issue
Block a user