Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shirne committed Jun 23, 2024
1 parent 4f083e8 commit e3da9c7
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 55 deletions.
2 changes: 1 addition & 1 deletion dbscript/struct.sql
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ CREATE TABLE `sa_checkcode` (
`code` varchar(20) DEFAULT NULL,
`create_time` int UNSIGNED DEFAULT NULL,
`is_check` tinyint DEFAULT '0',
`check_at` int DEFAULT '0',
`check_time` int DEFAULT '0',
PRIMARY KEY (`id`),
KEY `sendto` (`sendto`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function reply($id)
if (!$validate->check($data)) {
$this->error($validate->getError());
} else {
$data['reply_at'] = time();
$data['reply_time'] = time();
$model = FeedbackModel::get($id);
if ($model->allowField(true)->save($data)) {
$this->success(lang('Update success!'), url('other.feedback/index'));
Expand Down
2 changes: 1 addition & 1 deletion src/application/common/service/CheckcodeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function verifyCode($sendto, $code)
->order('create_time DESC')->find();
$time = time();
if (!empty($crow) && $crow['create_time'] > $time - 60 * 5) {
Db::name('checkcode')->where('id', $crow['id'])->update(array('is_check' => 1, 'check_at' => $time));
Db::name('checkcode')->where('id', $crow['id'])->update(array('is_check' => 1, 'check_time' => $time));
return true;
}
return false;
Expand Down
43 changes: 22 additions & 21 deletions src/template/blog/member/feedback.tpl
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
{extend name="public:base" /}
{block name="body"}
<div class="container">
<div class="page-header"><h1>问题反馈</h1></div>
<ul class="list-group">
<div class="container">
<div class="page-header">
<h1>问题反馈</h1>
</div>
<ul class="list-group">
{foreach $feedbacks as $key => $v}
<li class="list-group-item">
<div>{$v.title} <span class="badge badge-secondary">{$v.create_time|showdate}</span></div>
<div>
{$v.content}
</div>
{if $v['reply_at'] > 1}
<div><span class="badge badge-info">管理员回复</span>{$v.reply}</div>
{else/}
<span class="badge badge-danger">待回复</span>
{/if}
</li>
{/foreach}
{if $unreplyed < 1}
<li class="list-group-item">
<div>{$v.title} <span class="badge badge-secondary">{$v.create_time|showdate}</span></div>
<div>
{$v.content}
</div>
{if $v['reply_time'] > 1}
<div><span class="badge badge-info">管理员回复</span>{$v.reply}</div>
{else/}
<span class="badge badge-danger">待回复</span>
{/if}
</li>
{/foreach}
{if $unreplyed < 1} <li class="list-group-item">
<form action="" method="post" class="form-horizontal container-fluid">
<div class="form-group">{$user.username}:</div>
<div class="form-group">
<textarea name="content" class="form-control" id="" cols="30" rows="5"></textarea>
</div>
<div class="form-group"><input type="submit" class="btn btn-info" value="提交" /></div>
</form>
</li>
{/if}
</ul>
{$page|raw}
</div>
</li>
{/if}
</ul>
{$page|raw}
</div>
{/block}
65 changes: 34 additions & 31 deletions src/template/default/member/agent/team.tpl
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
{extend name="public:base" /}
{block name="body"}
<div class="container">
<div class="page-header"><h1>我的会员</h1></div>
{if !empty($paths)}
<ol class="breadcrumb">
{foreach $paths as $key => $v}
<li><a href="{:aurl('index/member/team',array('pid'=>$v['id']))}">{$v.username}</a></li>
{/foreach}
</ol>
{/if}
<ul class="list-group">
<li class="row list-group-item">
<div class="col-xs-5">会员/等级</div>
<div class="col-xs-2">下级</div>
<div class="col-xs-3">注册日期</div>
<div class="col-xs-2">排位</div>
</li>
{foreach $users as $key => $v}
<li class="row list-group-item">
<a href="{:aurl('index/member/team',array('pid'=>$v['id']))}">
<div class="col-xs-5"><i class="fa fa-user"></i> {$v['username']}<br />{$levels[$v['level_id']]['level_name']}</div>
<div class="col-xs-2">{if $soncounts[$v['id']]}{$soncounts[$v['id']]}{else/}0{/if}</div>
<div class="col-xs-3"><span style="color: #999;">{$v.create_at|showdate}</span> </div>
<div class="container">
<div class="page-header">
<h1>我的会员</h1>
</div>
{if !empty($paths)}
<ol class="breadcrumb">
{foreach $paths as $key => $v}
<li><a href="{:aurl('index/member/team',array('pid'=>$v['id']))}">{$v.username}</a></li>
{/foreach}
</ol>
{/if}
<ul class="list-group">
<li class="row list-group-item">
<div class="col-xs-5">会员/等级</div>
<div class="col-xs-2">下级</div>
<div class="col-xs-3">注册日期</div>
<div class="col-xs-2">排位</div>
</li>
{foreach $users as $key => $v}
<li class="row list-group-item">
<a href="{:aurl('index/member/team',array('pid'=>$v['id']))}">
<div class="col-xs-5"><i class="fa fa-user"></i>
{$v['username']}<br />{$levels[$v['level_id']]['level_name']}</div>
<div class="col-xs-2">{if $soncounts[$v['id']]}{$soncounts[$v['id']]}{else/}0{/if}</div>
<div class="col-xs-3"><span style="color: #999;">{$v.create_time|showdate}</span> </div>
<div class="col-xs-2">
{if $v['position']}
<span class="label label-info">{$v['position']}</span>
{else/}
<span class="label label-default">未排位</span>
<span class="label label-info">{$v['position']}</span>
{else/}
<span class="label label-default">未排位</span>
{/if}
</div>
</a>
</li>
{/foreach}
</ul>
{$page|raw}
</div>
</a>
</li>
{/foreach}
</ul>
{$page|raw}
</div>
{/block}

0 comments on commit e3da9c7

Please sign in to comment.