package main import "strconv" import "io" func init() { template_profile_handle = template_profile } func template_profile(tmpl_profile_vars ProfilePage, w io.Writer) { 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(`
` + tmpl_profile_vars.ProfileOwner.Name + ``)) if tmpl_profile_vars.ProfileOwner.Tag != "" { w.Write([]byte(`` + tmpl_profile_vars.ProfileOwner.Tag + ``)) } w.Write([]byte(`
Add Friend `)) if tmpl_profile_vars.CurrentUser.Is_Super_Mod && !tmpl_profile_vars.ProfileOwner.Is_Super_Mod { w.Write([]byte(` `)) if tmpl_profile_vars.ProfileOwner.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.ContentHtml) + `

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