diff --git a/crawler/crawler.php b/crawler/crawler.php index 1167241..07aa87c 100644 --- a/crawler/crawler.php +++ b/crawler/crawler.php @@ -36,11 +36,13 @@ echo "[i] Found $last_page pages\n"; //create an array with all pages $pages = range(1,65); -foreach($pages as $page) -{ - echo "[i] Crawling page $page\n"; - scanPage($page); -} +// foreach($pages as $page) +// { +// echo "[i] Crawling page $page\n"; +// scanPage($page); +// } + +scanPage(1,false); function scanPage($key,$usecache=true) { diff --git a/crawler/data.db b/crawler/data.db index 4980606..307f590 100644 Binary files a/crawler/data.db and b/crawler/data.db differ diff --git a/web/pages/demo/controller.php b/web/pages/demo/controller.php index 5a2c221..62947ce 100644 --- a/web/pages/demo/controller.php +++ b/web/pages/demo/controller.php @@ -17,9 +17,53 @@ class Demo extends Page{ function test() { - $u = new User(); - $u->load('Chris','firstname'); - var_dump($u->data); + $graph1 = partial('graph.html.php', [ + 'id' => 'graph1', + 'title' => 'Graph 1', + 'legend' => ['Geschwindigkeit', 'Fehler', 'Verweigerungen', 'Zeit', 'Geschwindigkeit', 'Punkte', 'Platz'], + 'xaxis' => ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'], + 'seriesdata' => [ + ['name' => 'Geschwindigkeit', 'type'=>'line','stack'=>'Total', 'data' => [120, 132, 101, 134, 90, 230, 210]], + ['name' => 'Fehler', 'type'=>'line','stack'=>'Total', 'data' => [220, 182, 191, 234, 290, 330, 310]], + ['name' => 'Verweigerungen', 'type'=>'line','stack'=>'Total', 'data' => [150, 232, 201, 154, 190, 330, 410]], + ['name' => 'Zeit', 'type'=>'line','stack'=>'Total', 'data' => [320, 332, 301, 334, 390, 330, 320]], + ['name' => 'Punkte', 'type'=>'line','stack'=>'Total', 'data' => [820, 932, 901, 934, 1290, 1330, 1320]], + ['name' => 'Platz', 'type'=>'line','stack'=>'Total', 'data' => [820, 932, 901, 934, 1290, 1330, 1320]] + ], + ]); + + $graph2 = partial('graph.html.php', [ + 'id' => 'graph2', + 'title' => 'Punkte', + 'xaxis' => ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'], + 'seriesdata' => [ + ['name' => 'Punkte', 'type'=>'line','stack'=>'Total', 'data' => [820, 932, 901, 934, 1290, 1330, 1320]], + ], + ]); + + $graph3 = partial('graph.html.php', [ + 'id' => 'graph3', + 'title' => 'Graph 3', + 'legend' => ['Punkte'], + 'xaxis' => ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'], + 'seriesdata' => [ + ['name' => 'Punkte', 'type'=>'line','stack'=>'Total', 'data' => [820, 932, 901, 934, 1290, 1330, 1320]], + ], + ]); + + return '
+
+
+ '.$graph1.' +
+
+ '.$graph2.' +
+
+ '.$graph3.' +
+
+
'; } function index() diff --git a/web/pages/smart/controller.php b/web/pages/smart/controller.php index 70134be..898fb6a 100644 --- a/web/pages/smart/controller.php +++ b/web/pages/smart/controller.php @@ -58,7 +58,6 @@ class Smart extends Page { $this->set('results_dogs', $results); $this->set('dogs', $dogs); - $this->set('query', $query); $this->set('template', 'search.html.php'); } diff --git a/web/pages/smart/search.html.php b/web/pages/smart/search.html.php index 76c52e4..b78ddf6 100644 --- a/web/pages/smart/search.html.php +++ b/web/pages/smart/search.html.php @@ -8,46 +8,46 @@ -

+

-
- - - - - - - - - - - - - - - - - - - - - " class="table" style="display:none"> + + + + + + + + + + + + + + + + + + + @@ -69,93 +69,64 @@ - - - + + + + + +

Statistik

+ +
+ +
+
+ +
+ 0) : ?> +
+ 'graph1'.$dogid, + 'title' => 'Fehler und Verweigerungen', + 'xaxis' => $sdata['dates'], + 'seriesdata' => [ + ['name' => 'Fehler', 'type' => 'line', 'stack' => 'Total', 'data' => $sdata['errors']], + ['name' => 'Verweigerungen', 'type' => 'line', 'stack' => 'Total', 'data' => $sdata['refusals']], + ], + ]); + ?> +
+ +
+ 'graph2'.$dogid, + 'title' => 'Geschwindigkeit', + 'xaxis' => $sdata['dates'], + 'seriesdata' => [ + ['name' => 'Geschwindigkeit', 'type' => 'line', 'stack' => 'Total', 'data' => $sdata['speed']], + ], + ]); + ?> +
+ +
+ 'graph3'.$dogid, + 'title' => 'Platzierung', + 'xaxis' => $sdata['dates'], + 'seriesdata' => [ + ['name' => 'Platzierung', 'type' => 'line', 'stack' => 'Total', 'data' => $sdata['ranking']], + ], + ]); + ?> +
- 0) : ?> -
-
- - -
- +
diff --git a/web/templates/partials/graph.html.php b/web/templates/partials/graph.html.php new file mode 100644 index 0000000..65d2640 --- /dev/null +++ b/web/templates/partials/graph.html.php @@ -0,0 +1,73 @@ + 'graph1', + 'title' => 'Graph 1', + 'gclass' => '', // classes for the graph div + 'legend' => ['Geschwindigkeit', 'Fehler', 'Verweigerungen', 'Zeit', 'Geschwindigkeit', 'Punkte', 'Platz'], + 'xaxis' => ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'], + 'seriesdata' => [ + ['name' => 'Geschwindigkeit', 'type'=>'line','stack'=>'Total', 'data' => [120, 132, 101, 134, 90, 230, 210]], + ['name' => 'Fehler', 'type'=>'line','stack'=>'Total', 'data' => [220, 182, 191, 234, 290, 330, 310]], + ['name' => 'Verweigerungen', 'type'=>'line','stack'=>'Total', 'data' => [150, 232, 201, 154, 190, 330, 410]], + ['name' => 'Zeit', 'type'=>'line','stack'=>'Total', 'data' => [320, 332, 301, 334, 390, 330, 320]], + ['name' => 'Punkte', 'type'=>'line','stack'=>'Total', 'data' => [820, 932, 901, 934, 1290, 1330, 1320]], + ['name' => 'Platz', 'type'=>'line','stack'=>'Total', 'data' => [820, 932, 901, 934, 1290, 1330, 1320]] + ], + ]) + */ + +?> + +
+ + \ No newline at end of file