mirror of
https://github.com/tenox7/wrp.git
synced 2025-02-10 12:31:01 +00:00
changed names to prev/next due to issue with ie1.5
This commit is contained in:
parent
b91bbed4a7
commit
c7fcea908f
9
wrp.go
9
wrp.go
@ -51,9 +51,9 @@ func pageServer(out http.ResponseWriter, r *http.Request) {
|
||||
i = false
|
||||
}
|
||||
p, _ := strconv.ParseInt(r.FormValue("p"), 10, 64)
|
||||
if r.FormValue("pg") == ">>" {
|
||||
if r.FormValue("pg") == "Next" {
|
||||
p++
|
||||
} else if r.FormValue("pg") == "<<" {
|
||||
} else if r.FormValue("pg") == "Prev" {
|
||||
p--
|
||||
} else {
|
||||
p = 0
|
||||
@ -80,8 +80,8 @@ func pageServer(out http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprintf(out, "Height:<INPUT TYPE=\"TEXT\" NAME=\"h\" VALUE=\"%d\" SIZE=\"4\"> \n", h)
|
||||
fmt.Fprintf(out, "Scale:<INPUT TYPE=\"TEXT\" NAME=\"s\" VALUE=\"%1.2f\" SIZE=\"3\"> \n", s)
|
||||
fmt.Fprintf(out, "Page:<INPUT TYPE=\"HIDDEN\" NAME=\"p\" VALUE=\"%d\"> \n", p)
|
||||
fmt.Fprintf(out, "<INPUT TYPE=\"SUBMIT\" NAME=\"pg\" VALUE=\"<<\"> %d \n", p)
|
||||
fmt.Fprintf(out, "<INPUT TYPE=\"SUBMIT\" NAME=\"pg\" VALUE=\">>\"> \n")
|
||||
fmt.Fprintf(out, "<INPUT TYPE=\"SUBMIT\" NAME=\"pg\" VALUE=\"Prev\"> %d \n", p)
|
||||
fmt.Fprintf(out, "<INPUT TYPE=\"SUBMIT\" NAME=\"pg\" VALUE=\"Next\"> \n")
|
||||
fmt.Fprintf(out, "</FORM><P>\n")
|
||||
if len(u) > 4 {
|
||||
if strings.HasPrefix(u, "http") {
|
||||
@ -109,7 +109,6 @@ func mapServer(out http.ResponseWriter, req *http.Request) {
|
||||
log.Printf("%s MAP Request for %s [%v]\n", req.RemoteAddr, req.URL.Path, req.URL.Query())
|
||||
}
|
||||
|
||||
|
||||
func haltServer(out http.ResponseWriter, req *http.Request) {
|
||||
log.Printf("%s Shutdown request received [%s]\n", req.RemoteAddr, req.URL.Path)
|
||||
out.Header().Set("Content-Type", "text/plain")
|
||||
|
Loading…
x
Reference in New Issue
Block a user