package main import "io" import "strconv" func init() { ctemplates["profile"] = template_profile } func template_profile(tmpl_profile_vars Page, w io.Writer) { var extra_data User = tmpl_profile_vars.Something.(User) w.Write([]byte(` ` + tmpl_profile_vars.Title + `
`)) if len(tmpl_profile_vars.NoticeList) != 0 { for _, item := range tmpl_profile_vars.NoticeList { w.Write([]byte(`
` + item + `
`)) } } w.Write([]byte(`
` + extra_data.Name + ``)) if extra_data.Tag != "" { w.Write([]byte(`` + extra_data.Tag + ``)) } w.Write([]byte(`
Add Friend `)) if tmpl_profile_vars.CurrentUser.Is_Super_Mod && !extra_data.Is_Super_Mod { w.Write([]byte(` `)) if extra_data.Is_Banned { w.Write([]byte(`Unban`)) } else { w.Write([]byte(`Ban`)) } w.Write([]byte(` `)) } w.Write([]byte(` Report
`)) if len(tmpl_profile_vars.ItemList) != 0 { for _, item := range tmpl_profile_vars.ItemList { w.Write([]byte(`
` + string(item.(Reply).ContentHtml) + `

` + item.(Reply).CreatedByName + ` `)) if tmpl_profile_vars.CurrentUser.Is_Mod { w.Write([]byte(` `)) } w.Write([]byte(` `)) if item.(Reply).Tag != "" { w.Write([]byte(`` + item.(Reply).Tag + ``)) } w.Write([]byte(`
`)) } } w.Write([]byte(`
`)) if !tmpl_profile_vars.CurrentUser.Is_Banned { w.Write([]byte(`
`)) } w.Write([]byte(`
`)) }