增加了消息处理状态的判断

This commit is contained in:
Li Jianxuan 2011-11-17 09:45:28 +00:00
parent 5d7c23cb16
commit fcf59044dc
2 changed files with 18 additions and 3 deletions

View File

@ -3,7 +3,9 @@
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headScript()->appendFile('/static/js/jquery.jgrowl_minimized.js');
$this->headLink()->appendStylesheet('/static/css/jquery.jgrowl.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/sys">系统管理</a>');
@ -38,7 +40,20 @@
<?php echo $this->info['body'];?>
</p>
</form>
<?php if ($this->info['status']>=0) echo '<button class="btn" onclick="over();">标记为已处理</button>';?>
</div>
<div class="pagenavi"></div>
</div>
<script>
function over(){
$.ajax({
'type':"POST",
'url':"/admin/sys/message/do/over",
'data':'id=<?php echo $this->info['id'];?>',
'success':function(html){
$.jGrowl(html, {"life":5000 });
}
});
}
</script>

View File

@ -74,7 +74,7 @@ class message
static function getOne($db,$uid,$id){
$rev = array();
try{
$sql = "SELECT m.pid,m.rid,m.sendtime,m.status,m.msgid,m.title,mc.body,u.realname,ml.uid FROM messages m
$sql = "SELECT m.id,m.pid,m.rid,m.sendtime,m.status,m.msgid,m.title,mc.body,u.realname,ml.uid FROM messages m
LEFT JOIN messages_content mc ON m.msgid=mc.id
LEFT JOIN users u on u.id=m.pid
LEFT JOIN messages_logs ml ON m.id=ml.mid