From 30595335d040d937c25106e8dc38caf45722e837 Mon Sep 17 00:00:00 2001 From: Sven Zemanek Date: Sun, 2 Nov 2014 23:27:12 +0100 Subject: [PATCH] new version --- count.php | 9 +- css/style.css | 31 +++++ data/export-hsg.php | 62 ++++++++++ data/stats.php | 24 ++++ includes/file.php | 19 ++- includes/funcs.php | 8 +- listenabfrage.php | 6 +- mahlowat.php | 36 ++++-- multiplier.php | 2 +- result-bars.php | 220 --------------------------------- result-table.php => result.php | 132 +++++++++++++++----- ui-todo.txt | 4 + 12 files changed, 274 insertions(+), 279 deletions(-) create mode 100644 data/export-hsg.php delete mode 100644 result-bars.php rename result-table.php => result.php (71%) create mode 100644 ui-todo.txt diff --git a/count.php b/count.php index 6e6cf25..12fef1b 100644 --- a/count.php +++ b/count.php @@ -1,5 +1,10 @@ \ No newline at end of file diff --git a/css/style.css b/css/style.css index d89877d..857b4e9 100644 --- a/css/style.css +++ b/css/style.css @@ -3,6 +3,37 @@ body { /*padding: 0em 0.5em 1em 0.5em;*/ } +.container { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +@media (min-width: 768px) { + .container { + width: 100%; + } +} +@media (min-width: 992px) { + .container { + width: 970px; + } +} +@media (min-width: 1200px) { + .container { + width: 1170px; + } +} +@media (max-width: 992px) and (min-resolution: 100dpi) and (orientation:portrait) { + .btn-block{ + font-size: 32px; + height: 120px; + } + .btn{ + font-size: 32px; + } +} + .hsganswer{ width: 80px; padding-left: auto; diff --git a/data/export-hsg.php b/data/export-hsg.php new file mode 100644 index 0000000..c14b1ec --- /dev/null +++ b/data/export-hsg.php @@ -0,0 +1,62 @@ +"; + +} +?> \ No newline at end of file diff --git a/data/stats.php b/data/stats.php index 505d2b8..9cd3b16 100644 --- a/data/stats.php +++ b/data/stats.php @@ -3,6 +3,12 @@ $visits = get_visits('', 'visits.sav'); + $nocount = $visits['nocount']; + $answers = $visits['ans']; + + unset($visits['nocount']); + unset($visits['ans']); + $max_visitors = 0; foreach($visits as $value){ if(sizeof($value) > $max_visitors){ @@ -105,6 +111,24 @@ +
+

Nicht gezählte Aufrufe

+

Aufrufe wurden nicht gespeichert.

+
+ +
+

Antworten

+

+ $value){ + foreach($value as $k => $ans){ + echo "$ans
\n"; + } + } + ?> +

+
+ diff --git a/includes/file.php b/includes/file.php index 7793e90..cc6004e 100644 --- a/includes/file.php +++ b/includes/file.php @@ -1,14 +1,19 @@ -\n"; + return "-\n"; } if($vote == 1){ - return "\n"; + return "\n"; } if($vote == 0){ - return "\n"; + return "\n"; } if($vote == -1){ - return "\n"; + return "\n"; } } diff --git a/listenabfrage.php b/listenabfrage.php index a8fdcee..57e1100 100644 --- a/listenabfrage.php +++ b/listenabfrage.php @@ -170,10 +170,10 @@ }); - function etoggle(){ - $(this).prev + $('.explanationbutton').click(function(event){ + event.preventDefault(); $('.explic').toggle(); - } + }); function setThesis(selection){ resultArray[activeThesis] = result2letter(selection, false); diff --git a/mahlowat.php b/mahlowat.php index 01587f3..4f6dd04 100644 --- a/mahlowat.php +++ b/mahlowat.php @@ -74,16 +74,16 @@

-
+
-
+
-
+
-
+
@@ -118,9 +118,10 @@ $('#weight').text('These doppelt gewichten'); } }); - $('.explanationbutton').click(function(){ + $('.explanationbutton').click(function(event){ + event.preventDefault(); $('.explic').toggle(); - }) + }); thesesboxes = $('.singlethesis'); pagination = $('#navigation li'); @@ -142,7 +143,7 @@ }); function gotoResultPage(result){ - target = "result-bars.php?ans="; + target = "result.php?ans="; for(i = 0; i < result.length; i++){ target += result[i]; @@ -161,14 +162,29 @@ function callResult(count){ if(count){ - jQuery.get("count.php",function( data ) { - window.location.href = target; + url = "count.php?ans="; + ans = "" + for(i = 0; i < resultArray.length; i++){ + ans += resultArray[i]; + } + url = url + ans; + jQuery.get(url,function( data ) { + //window.location.href = target; + callPage(ans); }); } else { - window.location.href = target; + jQuery.get("count.php?false",function( data ) { + window.location.href = target; + }); } } + function callPage(data){ + var action = 'result.php' + var html = ""; + $('
').attr('action', action).html(html).appendTo('body').submit(); + } + function nextThesis(selection){ multiply = false; if($('#weight').hasClass('active')){ diff --git a/multiplier.php b/multiplier.php index ac15824..e2e8396 100644 --- a/multiplier.php +++ b/multiplier.php @@ -150,7 +150,7 @@ } function gotoResultPage(result){ - target = "result-bars.php?ans="; + target = "result.php?ans="; for(i = 0; i < result.length; i++){ target += result[i]; diff --git a/result-bars.php b/result-bars.php deleted file mode 100644 index b56950c..0000000 --- a/result-bars.php +++ /dev/null @@ -1,220 +0,0 @@ - - - - - Mahlowat - Ergebnis - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

- -
- -

Ergebnisse

- - - - - - - - - - -

Nicht zufrieden mit dem Ergebnis? Vielleicht willst du die Thesen anders gewichten.

- - - - - -
ListePunktePunkte
- - -
- -
-

Ergebnis teilen:

-
- -
-

Achtung! Aus diesem Link kann man ablesen, welche Antworten du ausgewählt und wie du die Thesen gewichtet hast!

-
- - - -
- Du kannst die Befragung - neu starten, - deine - Antworten ändern - oder die - Gewichtung anpassen.
- Außerdem haben wir auch eine FAQ-Seite. -
-
-
-
- - - - - \ No newline at end of file diff --git a/result-table.php b/result.php similarity index 71% rename from result-table.php rename to result.php index beae753..d263adb 100644 --- a/result-table.php +++ b/result.php @@ -1,9 +1,10 @@ - Mahlowat - Ergebnis - + + + + + + + + + + + + + - - + @@ -101,17 +118,33 @@ }, "info_link":"http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html", "display_infobox":"off", - 'cookie_domain' : '//ToDo', - 'uri' : '//ToDo' + 'cookie_domain' : 'akut-bonn.de', + 'uri' : '' });} }); - - -