2019-01-08 22:01:28 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
"html/template"
|
|
|
|
)
|
|
|
|
|
|
|
|
var view *template.Template
|
|
|
|
|
|
|
|
func startpage(w http.ResponseWriter, r *http.Request){
|
|
|
|
view.ExecuteTemplate(w, "index.html", nil)
|
|
|
|
}
|
2019-01-08 22:29:33 +01:00
|
|
|
func klientpage(w http.ResponseWriter, r *http.Request){
|
|
|
|
view.ExecuteTemplate(w, "panelklient.html", nil)
|
|
|
|
}
|
|
|
|
func wlaspage(w http.ResponseWriter, r *http.Request){
|
|
|
|
view.ExecuteTemplate(w, "panelwlas.html", nil)
|
|
|
|
}
|
2019-01-08 22:01:28 +01:00
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
view = template.Must(template.ParseGlob("templates/*.html"))
|
|
|
|
http.Handle("/appearance/", http.StripPrefix("/appearance/", http.FileServer(http.Dir("appearance"))))
|
|
|
|
http.HandleFunc("/", startpage)
|
2019-01-08 22:29:33 +01:00
|
|
|
http.HandleFunc("/panelklient", klientpage)
|
|
|
|
http.HandleFunc("/panelwlas", wlaspage)
|
2019-01-08 22:01:28 +01:00
|
|
|
http.ListenAndServe(":8888", nil)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//====================================================================================================================
|