110 lines
3.3 KiB
Plaintext
110 lines
3.3 KiB
Plaintext
{{ define "headertpl"}}
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
<title>{{.Title}}</title>
|
|
<script>
|
|
|
|
var currentType = "statsusername";
|
|
var currentTime = {{.CurrentTime}};
|
|
var strSplit, currentYear, currentMonth, currentDay;
|
|
updateSplits(currentTime);
|
|
|
|
function updateSplits(c){
|
|
strSplit = c.split('-');
|
|
currentYear = strSplit[0];
|
|
currentMonth = strSplit[1];
|
|
currentDay = strSplit[2];
|
|
}
|
|
</script>
|
|
<script src="load.js"></script>
|
|
<style>
|
|
body {
|
|
background: white
|
|
}
|
|
#imageholder {
|
|
background: black;
|
|
margin: auto;
|
|
width: 50%;
|
|
padding: 10px;
|
|
}
|
|
span {
|
|
float: left;
|
|
clear: left;
|
|
}
|
|
</style>
|
|
</head>
|
|
{{end}}
|
|
|
|
|
|
{{ define "footertpl"}}
|
|
<div id="imageholder"></div>
|
|
</body>
|
|
</html>
|
|
{{end}}
|
|
|
|
{{ define "dailytpl"}}
|
|
<body onload="loadImage(currentYear+currentMonth+currentDay, currentType)">
|
|
<span>
|
|
<label for="statsday">Statistics for: </label>
|
|
<input id="statsday" type="date" value="{{.CurrentTime}}" min="{{.MinDate}}" max="{{.MaxDate}}" onchange="updateSplits(this.value); loadImage(currentYear+currentMonth+currentDay, currentType)"/>
|
|
</span>
|
|
<span>
|
|
<label for="statstype">Type: </label>
|
|
<select selected="statsusername" onchange="currentType = this.value; loadImage(currentYear+currentMonth+currentDay, currentType)">
|
|
<option value="statsusername">Usernames</option>
|
|
<option value="statssrc">Sources</option>
|
|
<option value="statshost">Hosts</option>
|
|
</select>
|
|
</span>
|
|
{{end}}
|
|
|
|
{{ define "yearlytpl"}}
|
|
<body onload="loadImage(currentYear, currentType)">
|
|
<span>
|
|
<select onchange="currentYear = this.value; loadImage(currentYear, currentType)">
|
|
{{range $val := .YearList}}
|
|
<option value="{{$val}}">{{$val}}</option>
|
|
{{end}}
|
|
</select>
|
|
</span>
|
|
<span>
|
|
<label for="statstype">Type: </label>
|
|
<select selected="statsusername" onchange="currentType = this.value; loadImage(currentYear, currentType)">
|
|
<option value="statsusername">Usernames</option>
|
|
<option value="statssrc">Sources</option>
|
|
<option value="statshost">Hosts</option>
|
|
</select>
|
|
</span>
|
|
{{end}}
|
|
|
|
{{ define "monthlytpl"}}
|
|
<body onload="loadImage(currentYear+currentMonth, currentType)">
|
|
<span>
|
|
<select onchange="currentMonth = this.value; loadImage(currentYear+currentMonth, currentType)">
|
|
{{range $key, $val := .MonthList}}
|
|
{{range $month := index $val}}
|
|
<option value="{{$month}}">{{$month}}</option>
|
|
{{end}}
|
|
{{end}}
|
|
</select>
|
|
</span>
|
|
<span>
|
|
<select onchange="currentYear = this.value; loadImage(currentYear+currentMonth, currentType)">
|
|
{{range $key, $val := .MonthList}}
|
|
<option value="{{$key}}">{{$key}}</option>
|
|
{{end}}
|
|
</select>
|
|
</span>
|
|
<span>
|
|
<label for="statstype">Type: </label>
|
|
<select selected="statsusername" onchange="currentType = this.value; loadImage(currentYear+currentMonth, currentType)">
|
|
<option value="statsusername">Usernames</option>
|
|
<option value="statssrc">Sources</option>
|
|
<option value="statshost">Hosts</option>
|
|
</select>
|
|
</span>
|
|
{{end}}
|
|
'' |