This repository was archived by the owner on Jan 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
162 lines (149 loc) · 3.76 KB
/
Copy pathindex.php
File metadata and controls
162 lines (149 loc) · 3.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?php
$start_time = microtime(TRUE);
?>
<!doctype html >
<?php include("func.php");?>
<html lang="en" >
<head>
<title> NRK P3s musikk graph</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css" >
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript"
src="https://www.google.com/jsapi?autoload={
'modules':[{
'name':'visualization',
'version':'1',
'packages':['corechart']
}]
}"></script>
<?php if($_GET["a"] && $_GET["s"]) : ?>
<script type="text/javascript">
google.setOnLoadCallback(drawChart);
function drawChart() {
<?php
dcdata("day", "dato", "spilt", songinfo($_GET["a"], $_GET["s"], "0"));
dcdata("week", "dato", "spilt", songinfo($_GET["a"], $_GET["s"], "1"));
?>
<?php
dcopt("day", "Daglige av spillinger siste månde", "200", "600");
dcopt("week", "Ukentlige av spillinger siste 6 uker", "200", "600");
?>
<?php
dcdraw("day");
dcdraw("week");
?>
};
</script>
<?php else :?>
<script type="text/javascript"
src="https://www.google.com/jsapi?autoload={
'modules':[{
'name':'visualization',
'version':'1',
'packages':['corechart']
}]
}"></script>
<script type="text/javascript">
google.setOnLoadCallback(drawChart);
function drawChart() {
<?php
dcdbdata("dbstats", "dato", "artist", "song", prepchartdbday(dbstatsday()));
dcdata("dbtotal", "dato", "total", prepchartdbtday(dbstatsday()));
?>
<?php
dcopt("dbstats", "antall sanger og artistar i databasen", "200", "600");
dcopt("dbtotal", "totalt antall spilte sanger", "200", "600");
?>
<?php
dcdraw("dbstats");
dcdraw("dbtotal");
?>
};
</script>
<?php endif; ?>
</head>
<body>
<div id="doc" class="yui-t7">
<div id="hd">
<div id="header"><a href="/"><img src="logo.png"></a></div>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<div class="yui-g">
<div class="yui-u first">
<div class="content">
<div id="left">
<?php
if($_GET["a"] && $_GET["s"]){
$song = song($_GET["s"],$_GET["a"]);
print $song;
$songarr = songans($_GET["s"],$_GET["a"]);
$playcount = playcount($_GET["s"],$_GET["a"]);
print "<h3>spilt totalt {$playcount} ganger</h3>";
//print "<a href=\"spotify:search:track:synthetic+romance+artist:cullen+omori\">spotify</a><br>";
$youtubeid = youtubelink($_GET["s"],$_GET["a"]);
//print "Youtube<br><a href=\"https://www.youtube.com/watch?v={$youtubeid}\"><img src=\"http://img.youtube.com/vi/{$youtubeid}/0.jpg\" height=\"100\" Width=\"120\"></a>";
print "<iframe width=\"500\" height=\"275\" src=\"https://www.youtube.com/embed/{$youtubeid}\" frameborder=\"0\" allowfullscreen></iframe>";
}
else{
indexlist();
}
?>
</div>
</div>
</div>
<div class="yui-u">
<div class="content">
<?php if($_GET["a"] == null && $_GET["s"] == null) : ?>
<div id="dbstats">
</div>
<p></p>
<div id="dbtotal">
</div>
<?php endif; ?>
<?php if($_GET["a"] && $_GET["s"]) : ?>
<div id="day">
</div>
<p></p>
<div id="week">
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<div class="yui-b">
<div id="secondary">
<div id="newest">
<p>laster...</p>
</div>
</div>
<div id="ft">
<div id="footer">
<?php
$end_time = microtime(TRUE);
$time_taken = $end_time - $start_time;
$time_taken = round($time_taken,5);
echo 'Page generated in '.$time_taken.' seconds.';
echo "</br> © Erviker IT"
?>
</div>
</br>
</br>
</div>
</div>
</div>
<script language="javascript" type="text/javascript">
function loadnew(){
$('#newest').load('latest.php',function () {
// $(this).unwrap();
});
}
setInterval(function(){loadnew()}, 10000);
loadnew();
</script>
</body>
</html>