2017-04-03 21:32:13 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
func initPublicPage(w http.ResponseWriter, req *http.Request) *pageData {
|
2017-04-21 18:17:18 +00:00
|
|
|
p := InitPageData(w, req)
|
2017-04-03 21:32:13 +00:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func handleMain(w http.ResponseWriter, req *http.Request) {
|
|
|
|
page := initPublicPage(w, req)
|
2017-06-08 17:20:43 +00:00
|
|
|
page.SubTitle = ""
|
2017-06-22 15:34:57 +00:00
|
|
|
switch dbGetPublicSiteMode() {
|
|
|
|
case SiteModeWaiting:
|
|
|
|
page.show("public-waiting.html", w)
|
|
|
|
case SiteModeVoting:
|
|
|
|
page.show("public-voting.html", w)
|
2017-04-03 21:32:13 +00:00
|
|
|
}
|
|
|
|
}
|