-
Notifications
You must be signed in to change notification settings - Fork 163
/
test.go
40 lines (31 loc) · 1.11 KB
/
test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// +----------------------------------------------------------------------
// | GoCMS 0.1
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2014 http://www.6574.com.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: zzdboy <zzdboy1616@163.com>
// +----------------------------------------------------------------------
package controllers
//测试
import "strconv"
import "github.com/revel/revel"
import "admin/app/models"
type Test struct {
*revel.Controller
}
func (c Test) Index(admin *models.Admin) revel.Result {
title := "测试--GoCMS管理系统"
if UserID, ok := c.Session["UserID"]; ok {
UserID, err := strconv.ParseInt(UserID, 10, 64)
if err != nil {
revel.WARN.Println(err)
}
admin_info := admin.GetById(UserID)
admin_panel := new(models.Admin_Panel)
admin_panel.IsAdd(18, admin_info)
}
c.Render(title)
return c.RenderTemplate("Public/Test.html")
}