Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -138,7 +138,7 @@ define('TABLE_ACTION', '`' . $config->db->prefix . 'action`');
|
||||
define('TABLE_FILE', '`' . $config->db->prefix . 'file`');
|
||||
define('TABLE_HISTORY', '`' . $config->db->prefix . 'history`');
|
||||
define('TABLE_EXTENSION', '`' . $config->db->prefix . 'extension`');
|
||||
define('TABLE_LANG', '`' . $config->db->prefix . 'lang`');
|
||||
if(!defined('TABLE_LANG')) define('TABLE_LANG', '`' . $config->db->prefix . 'lang`');
|
||||
|
||||
$config->objectTables['product'] = TABLE_PRODUCT;
|
||||
$config->objectTables['story'] = TABLE_STORY;
|
||||
|
||||
@@ -60,7 +60,7 @@ $(document).ready(function(){$('#fileType').change();});
|
||||
<?php echo html::select('fileType', $lang->exportFileTypeList, '', 'onchange=switchEncode(this.value) class="form-control"');?>
|
||||
</td>
|
||||
<td class='w-90px'>
|
||||
<?php echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8', key($lang->exportFileTypeList) == 'csv' ? "class='form-control'" : "class='form-control hidden'");?>
|
||||
<?php echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8', key($lang->exportFileTypeList) == 'csv' ? "class='form-control'" : "class='form-control'");?>
|
||||
</td>
|
||||
<td class='w-100px'>
|
||||
<?php echo html::select('exportType', $lang->exportTypeList, ($this->cookie->checkedItem) ? 'selected' : 'all', "class='form-control'");?>
|
||||
|
||||
@@ -103,8 +103,8 @@
|
||||
<td class='text-left' title="<?php echo $story->title?>"><nobr><?php echo html::a($viewLink, $story->title);?></nobr></td>
|
||||
<td title="<?php echo $story->planTitle?>"><?php echo $story->planTitle;?></td>
|
||||
<td><?php echo $lang->story->sourceList[$story->source];?></td>
|
||||
<td><?php echo $users[$story->openedBy];?></td>
|
||||
<td><?php echo $users[$story->assignedTo];?></td>
|
||||
<td><?php echo zget($users, $story->openedBy, $story->openedBy);?></td>
|
||||
<td><?php echo zget($users, $story->assignedTo, $story->assignedTo);?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
<td class='story-<?php echo $story->status;?>'><?php echo $lang->story->statusList[$story->status];?></td>
|
||||
<td><?php echo $lang->story->stageList[$story->stage];?></td>
|
||||
|
||||
@@ -209,7 +209,6 @@ class project extends control
|
||||
|
||||
/* team member pairs. */
|
||||
$memberPairs = array();
|
||||
$memberPairs[] = "";
|
||||
foreach($this->view->teamMembers as $key => $member)
|
||||
{
|
||||
$memberPairs[$key] = $member->realname;
|
||||
@@ -606,6 +605,7 @@ class project extends control
|
||||
|
||||
/* team member pairs. */
|
||||
$memberPairs = array();
|
||||
$memberPairs[] = "";
|
||||
foreach($this->view->teamMembers as $key => $member)
|
||||
{
|
||||
$memberPairs[$key] = $member->realname;
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<?php endif;?>
|
||||
|
||||
<td <?php echo $class;?>><?php echo $task->assignedTo == 'closed' ? 'Closed' : $task->assignedToRealName;?></td>
|
||||
<td><?php echo $users[$task->finishedBy];?></td>
|
||||
<td><?php echo zget($users, $task->finishedBy, $task->finishedBy);?></td>
|
||||
|
||||
<?php if($this->cookie->windowWidth > $this->config->wideSize):?>
|
||||
<td><?php echo substr($task->finishedDate, 5, 6);?></td>
|
||||
|
||||
@@ -93,19 +93,19 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->PM;?></th>
|
||||
<td><?php echo $users[$project->PM];?></td>
|
||||
<td><?php echo zget($users, $project->PM, $project->PM);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->PO;?></th>
|
||||
<td><?php echo $users[$project->PO];?></td>
|
||||
<td><?php echo zget($users, $project->PO, $project->PO);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->QD;?></th>
|
||||
<td><?php echo $users[$project->QD];?></td>
|
||||
<td><?php echo zget($users, $project->QD, $project->QD);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->RD;?></th>
|
||||
<td><?php echo $users[$project->RD];?></td>
|
||||
<td><?php echo zget($users, $project->RD, $project->RD);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->products;?></th>
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->mailto;?></th>
|
||||
<td><?php $mailto = explode(',', str_replace(' ', '', $task->mailto)); foreach($mailto as $account) echo ' ' . $users[$account]; ?></td>
|
||||
<td><?php $mailto = explode(',', str_replace(' ', '', $task->mailto)); foreach($mailto as $account) echo ' ' . zget($users, $account, $account); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
@@ -191,19 +191,19 @@
|
||||
<table class='table table-data table-condensed table-borderless'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->task->openedBy;?></th>
|
||||
<td><?php if($task->openedBy) echo $users[$task->openedBy] . $lang->at . $task->openedDate;?></td>
|
||||
<td><?php if($task->openedBy) echo zget($users, $task->openedBy, $task->openedBy) . $lang->at . $task->openedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->finishedBy;?></th>
|
||||
<td><?php if($task->finishedBy) echo $users[$task->finishedBy] . $lang->at . $task->finishedDate;?></td>
|
||||
<td><?php if($task->finishedBy) echo zget($users, $task->finishedBy, $task->finishedBy) . $lang->at . $task->finishedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->canceledBy;?></th>
|
||||
<td><?php if($task->canceledBy) echo $users[$task->canceledBy] . $lang->at . $task->canceledDate;?></td>
|
||||
<td><?php if($task->canceledBy) echo zget($users, $task->canceledBy, $task->canceledBy) . $lang->at . $task->canceledDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->closedBy;?></th>
|
||||
<td><?php if($task->closedBy) echo $users[$task->closedBy] . $lang->at . $task->closedDate;?></td>
|
||||
<td><?php if($task->closedBy) echo zget($users, $task->closedBy, $task->closedBy) . $lang->at . $task->closedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->closedReason;?></th>
|
||||
@@ -211,7 +211,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->lastEdited;?></th>
|
||||
<td><?php if($task->lastEditedBy) echo $users[$task->lastEditedBy] . $lang->at . $task->lastEditedDate;?></td>
|
||||
<td><?php if($task->lastEditedBy) echo zget($users, $task->lastEditedBy, $task->lastEditedBy) . $lang->at . $task->lastEditedDate;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
@@ -619,6 +619,8 @@ class userModel extends model
|
||||
public function failPlus($account)
|
||||
{
|
||||
$user = $this->dao->select('fails')->from(TABLE_USER)->where('account')->eq($account)->fetch();
|
||||
if(empty($user)) return 0;
|
||||
|
||||
$fails = $user->fails;
|
||||
$fails ++;
|
||||
if($fails < $this->config->user->failTimes)
|
||||
@@ -645,6 +647,8 @@ class userModel extends model
|
||||
public function checkLocked($account)
|
||||
{
|
||||
$user = $this->dao->select('locked')->from(TABLE_USER)->where('account')->eq($account)->fetch();
|
||||
if(empty($user)) return false;
|
||||
|
||||
if((strtotime(date('Y-m-d H:i:s')) - strtotime($user->locked)) > $this->config->user->lockMinutes * 60) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user