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

` tmpl += item.(Reply).CreatedByName tmpl += ` ` if tmpl_profile_vars.CurrentUser.Is_Mod { tmpl += ` ` } tmpl += ` ` if item.(Reply).Tag != "" { tmpl += `` tmpl += item.(Reply).Tag tmpl += `` } tmpl += `
` } } tmpl += `
` if !tmpl_profile_vars.CurrentUser.Is_Banned { tmpl += `
` } tmpl += ` ` tmpl += `
` return tmpl }