new version

This commit is contained in:
Sven Zemanek
2014-11-02 23:27:12 +01:00
parent 722ecfd0b0
commit 30595335d0
12 changed files with 274 additions and 279 deletions

View File

@@ -1,5 +1,10 @@
<?php <?php
include 'includes/file.php'; include 'includes/file.php';
add_visit(crypt($_SERVER['REMOTE_ADDR'], get_salt('./data/salt.sav')), './data/visits.sav'); if(isset($_GET['false'])){
echo "s"; add_visit(crypt($_SERVER['REMOTE_ADDR'], get_salt('./data/salt.sav')), './data/visits.sav', true);
echo "n";
} elseif(isset($_GET['ans'])) {
add_visit(crypt($_SERVER['REMOTE_ADDR'], get_salt('./data/salt.sav')), './data/visits.sav', false, $_GET['ans']);
echo "s";
}
?> ?>

View File

@@ -3,6 +3,37 @@ body {
/*padding: 0em 0.5em 1em 0.5em;*/ /*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{ .hsganswer{
width: 80px; width: 80px;
padding-left: auto; padding-left: auto;

62
data/export-hsg.php Normal file
View File

@@ -0,0 +1,62 @@
<?php
include '../includes/file.php';
$hsg_array_s = load_var('lists.sav');
$hsg_array = Array();
if($hsg_array_s != null){
header("Content-Type: text/plain");
header("Content-Disposition: attachment; filename=hsg.php");
$keys = array_keys($hsg_array_s);
for($i=0; $i<sizeof($keys); $i++){
$hsg_array[$i] = $hsg_array_s[$keys[$i]];
for($c=0; $c<sizeof($hsg_array[$i]['comments']); $c++){
if($hsg_array[$i]['comments'][$c] === ''){
$hsg_array[$i]['comments'][$c] = "Zu dieser These hat die Liste {\$hsg_array[$i]['name']} keine Begründung angegeben.";
}
}
}
echo '<?php
function get_hsg_array(){
';
for($i=0; $i<sizeof($hsg_array); $i++){
echo " \$hsg_array[$i]['name'] = '{$hsg_array[$i]['name']}';
\$hsg_array[$i]['name_x'] = '{$hsg_array[$i]['name_x']}';
";
if(isset($hsg_array[$i]['answers'])){
echo " \$hsg_array[$i]['answers'] = Array(";
echo "{$hsg_array[$i]['answers'][0]}";
for($a=1;$a<sizeof($hsg_array[$i]['answers']);$a++){
echo ','.$hsg_array[$i]['answers'][$a];
}
echo ");
";
}
if(isset($hsg_array[$i]['comments'])){
echo "\$hsg_array[$i]['comments'] = Array(
";
echo " \"{$hsg_array[$i]['comments'][0]}\"";
for($c=1; $c<sizeof($hsg_array[$i]['comments']);$c++){
echo ",
\"{$hsg_array[$i]['comments'][$c]}\"";
}
echo ");
";
}
echo "
";
}
echo " return \$hsg_array;
}
?>";
}
?>

View File

@@ -3,6 +3,12 @@
$visits = get_visits('', 'visits.sav'); $visits = get_visits('', 'visits.sav');
$nocount = $visits['nocount'];
$answers = $visits['ans'];
unset($visits['nocount']);
unset($visits['ans']);
$max_visitors = 0; $max_visitors = 0;
foreach($visits as $value){ foreach($visits as $value){
if(sizeof($value) > $max_visitors){ if(sizeof($value) > $max_visitors){
@@ -105,6 +111,24 @@
</table> </table>
</div> </div>
<div class="well">
<h1>Nicht gezählte Aufrufe</h1>
<p><span class="label label-primary"><?php echo $nocount;?></span> Aufrufe wurden nicht gespeichert.</p>
</div>
<div class="well">
<h1>Antworten</h1>
<p>
<?php
foreach($answers as $key => $value){
foreach($value as $k => $ans){
echo "$ans<br>\n";
}
}
?>
</p>
</div>
</div> </div>

View File

@@ -1,14 +1,19 @@
<?php <?php
function add_visit($id, $file){ function add_visit($id, $file, $nocount=false, $ans=''){
$visits = get_visits($id, $file); $visits = get_visits($id, $file);
if($visits != null){ if($visits != null){
$date = date('Ymd'); if($nocount){
$visits['nocount'] = $visits['nocount'] + 1;
if(!isset($visits[$date][$id])){
$visits[$date][$id] = 1;
} else { } else {
$visits[$date][$id] = $visits[$date][$id] + 1; $date = date('Ymd');
if(!isset($visits[$date][$id])){
$visits[$date][$id] = 1;
} else {
$visits[$date][$id] = $visits[$date][$id] + 1;
}
$visits['ans'][$id][] = $ans;
} }
set_visits($visits, $file); set_visits($visits, $file);
} else { } else {
@@ -19,6 +24,8 @@ function add_visit($id, $file){
function get_visits($id, $file){ function get_visits($id, $file){
if(!file_exists($file)){ if(!file_exists($file)){
$visits[date('Ymd')][$id] = 0; $visits[date('Ymd')][$id] = 0;
$visits['nocount'] = 0;
$visits['ans'] = Array();
return $visits; return $visits;
} }
if(is_readable($file)){ if(is_readable($file)){

View File

@@ -212,16 +212,16 @@ function code_to_answer($code){
$hsgclass = "hsg-".$hsg['name']; $hsgclass = "hsg-".$hsg['name'];
if($vote === 'skip'){ if($vote === 'skip'){
return "<td><a class='btn btn-default btn-block disabled hsganswer $hsgclass' $popover>-</a></td>\n"; return "<td class='hidden-xs hidden-sm $hsgclass'><a class='btn btn-default btn-block disabled hsganswer' $popover>-</a></td>\n";
} }
if($vote == 1){ if($vote == 1){
return "<td><a class='btn btn-success btn-block disabled hsganswer $hsgclass' $popover><span class='glyphicon glyphicon-thumbs-up'></span></a></td>\n"; return "<td class='hidden-xs hidden-sm $hsgclass'><a class='btn btn-success btn-block disabled hsganswer' $popover><span class='glyphicon glyphicon-thumbs-up'></span></a></td>\n";
} }
if($vote == 0){ if($vote == 0){
return "<td><a class='btn btn-warning btn-block disabled hsganswer $hsgclass' $popover><span class='glyphicon glyphicon-tree-deciduous'></span></a></td>\n"; return "<td class='hidden-xs hidden-sm $hsgclass'><a class='btn btn-warning btn-block disabled hsganswer' $popover><span class='glyphicon glyphicon-tree-deciduous'></span></a></td>\n";
} }
if($vote == -1){ if($vote == -1){
return "<td><a class='btn btn-danger btn-block disabled hsganswer $hsgclass' $popover><span class='glyphicon glyphicon-thumbs-down'></i></a></td>\n"; return "<td class='hidden-xs hidden-sm $hsgclass'><a class='btn btn-danger btn-block disabled hsganswer' $popover><span class='glyphicon glyphicon-thumbs-down'></i></a></td>\n";
} }
} }

View File

@@ -170,10 +170,10 @@
}); });
function etoggle(){ $('.explanationbutton').click(function(event){
$(this).prev event.preventDefault();
$('.explic').toggle(); $('.explic').toggle();
} });
function setThesis(selection){ function setThesis(selection){
resultArray[activeThesis] = result2letter(selection, false); resultArray[activeThesis] = result2letter(selection, false);

View File

@@ -74,16 +74,16 @@
<p class='text-center'><button id="weight" type="button" class="btn btn-default" data-toggle="button">These doppelt gewichten</button></p> <p class='text-center'><button id="weight" type="button" class="btn btn-default" data-toggle="button">These doppelt gewichten</button></p>
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-3 col-md-2 col-md-offset-2"> <div class="col-xs-12 col-sm-12 col-md-2 col-md-offset-2">
<button id='yes' type='submit' class='btn btn-success btn-block' name='yes' onclick="nextThesis('a')"><span class="glyphicon glyphicon-thumbs-up"></span> Zustimmung</button> <button id='yes' type='submit' class='btn btn-success btn-block' name='yes' onclick="nextThesis('a')"><span class="glyphicon glyphicon-thumbs-up"></span> Zustimmung</button>
</div> </div>
<div class="col-xs-12 col-sm-3 col-md-2 "> <div class="col-xs-12 col-sm-12 col-md-2 ">
<button id='neutral' type='submit' class='btn btn-warning btn-block' name='neutral' onclick="nextThesis('b')"><span class="glyphicon glyphicon-tree-deciduous"></span> Neutral</button> <button id='neutral' type='submit' class='btn btn-warning btn-block' name='neutral' onclick="nextThesis('b')"><span class="glyphicon glyphicon-tree-deciduous"></span> Neutral</button>
</div> </div>
<div class="col-xs-12 col-sm-3 col-md-2"> <div class="col-xs-12 col-sm-12 col-md-2">
<button id='no' type='submit' class='btn btn-danger btn-block' name='no' onclick="nextThesis('c')"><span class="glyphicon glyphicon-thumbs-down"></span> Ablehnung</button> <button id='no' type='submit' class='btn btn-danger btn-block' name='no' onclick="nextThesis('c')"><span class="glyphicon glyphicon-thumbs-down"></span> Ablehnung</button>
</div> </div>
<div class="col-xs-12 col-sm-3 col-md-2"> <div class="col-xs-12 col-sm-12 col-md-2">
<button id='skip' type='submit' class='btn btn-default btn-block' name='skip' onclick="nextThesis('d')"><span class="glyphicon glyphicon-share-alt"></span> Überspringen</button> <button id='skip' type='submit' class='btn btn-default btn-block' name='skip' onclick="nextThesis('d')"><span class="glyphicon glyphicon-share-alt"></span> Überspringen</button>
</div> </div>
</div> </div>
@@ -118,9 +118,10 @@
$('#weight').text('These doppelt gewichten'); $('#weight').text('These doppelt gewichten');
} }
}); });
$('.explanationbutton').click(function(){ $('.explanationbutton').click(function(event){
event.preventDefault();
$('.explic').toggle(); $('.explic').toggle();
}) });
thesesboxes = $('.singlethesis'); thesesboxes = $('.singlethesis');
pagination = $('#navigation li'); pagination = $('#navigation li');
@@ -142,7 +143,7 @@
}); });
function gotoResultPage(result){ function gotoResultPage(result){
target = "result-bars.php?ans="; target = "result.php?ans=";
for(i = 0; i < result.length; i++){ for(i = 0; i < result.length; i++){
target += result[i]; target += result[i];
@@ -161,14 +162,29 @@
function callResult(count){ function callResult(count){
if(count){ if(count){
jQuery.get("count.php",function( data ) { url = "count.php?ans=";
window.location.href = target; 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 { } 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 = "<input name='ans' value='"+data+"'/>";
$('<form style="display: none;" method="post"/>').attr('action', action).html(html).appendTo('body').submit();
}
function nextThesis(selection){ function nextThesis(selection){
multiply = false; multiply = false;
if($('#weight').hasClass('active')){ if($('#weight').hasClass('active')){

View File

@@ -150,7 +150,7 @@
} }
function gotoResultPage(result){ function gotoResultPage(result){
target = "result-bars.php?ans="; target = "result.php?ans=";
for(i = 0; i < result.length; i++){ for(i = 0; i < result.length; i++){
target += result[i]; target += result[i];

View File

@@ -1,220 +0,0 @@
<?php
include 'includes/funcs.php';
include 'includes/theses.php';
include 'includes/hsg.php';
$theses = get_theses_array();
$theses_count = sizeof($theses['s']);
$ans = Array();
$emph = Array();
$answerstring = '';
$warning = false;
if(!isset($_GET['ans'])){
$warning = true;
for($i = 0; $i < $theses_count; $i++){
$ans[$i] = 'skip';
$emph[$i] = 1;
}
} else {
$answerstring = $_GET['ans'];
$retval = result_from_string($answerstring, $theses_count);
$ans = $retval[0];
$emph = $retval[1];
}
$hsg_array = get_hsg_array();
$hsg_array = sort_hsgs($ans, $hsg_array, $emph);
?>
<!DOCTYPE html>
<html>
<head>
<title>Mahlowat - Ergebnis</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta content="Mahlowat, akut, akut Bonn, SP-Wahl Bonn">
<meta name="image_src" content="img/mahlowat_logo.png"/>
<meta name="description" content="Mein Mahlowat-Ergebnis"/>
<meta property="og:title" content="Mahlowat"/>
<meta property="og:type" content="website"/>
<meta property="og:image" content="img/mahlowat_logo.png"/>
<meta property="og:url" content=""/>
<meta property="og:site-name" content="akut-bonn.de"/>
<meta property="og:description" content="Mein Mahlowat-Ergebnis"/>
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/jquery-2.0.2.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/mahlowat-rb.js"></script>
<link href="css/socialshareprivacy-min.css" rel="stylesheet">
<script type="text/javascript" src="js/social_bookmarks-min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
if($('#socialshareprivacy').length > 0){
$('#socialshareprivacy').socialSharePrivacy({
"services":{"facebook":{
"status":"on",
"txt_info":"2 Klicks f\u00fcr mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie k\u00f6nnen Ihre Empfehlung an Facebook senden. Schon beim Aktivieren werden Daten an Dritte \u00fcbertragen.",
"perma_option":"off",
"action":"recommend",
"language":"de_DE"
},
"twitter":{
"tweet_text":"Der Mahlowat meint, ich könnte evtl. \'<?php echo $hsg_array[0]['name']; ?>\' gut finden.",
"status":"on",
"txt_info":"2 Klicks f\u00fcr mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie k\u00f6nnen Ihre Empfehlung an Twitter senden. Schon beim Aktivieren werden Daten an Dritte \u00fcbertragen.",
"perma_option":"off",
"language":"de",
'referrer_track' : ''
},
"gplus":{
"status":"off",
"txt_info":"2 Klicks f\u00fcr mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie k\u00f6nnen Ihre Empfehlung an Google+ senden. Schon beim Aktivieren werden Daten an Dritte \u00fcbertragen.",
"perma_option":"off"
},
"flattr":{
"status":"off",
"txt_info":"2 Klicks f\u00fcr mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie k\u00f6nnen Ihre Empfehlung an Flattr senden. Schon beim Aktivieren werden Daten an Dritte \u00fcbertragen.",
"perma_option":"off"
},
"xing":{
"status":"off","txt_info":"2 Klicks f\u00fcr mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie k\u00f6nnen Ihre Empfehlung an Xing senden. Schon beim Aktivieren werden Daten an Dritte \u00fcbertragen.",
"perma_option":"off",
"language":"de"
},
"pinterest":{
"status":"off",
"txt_info":"2 Klicks f\u00fcr mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie k\u00f6nnen Ihre Empfehlung an Pinterest senden. Schon beim Aktivieren werden Daten an Dritte \u00fcbertragen.",
"perma_option":"off"
},
"t3n":{
"status":"off",
"txt_info":"2 Klicks f\u00fcr mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie k\u00f6nnen Ihre Empfehlung an t3n senden. Schon beim Aktivieren werden Daten an Dritte \u00fcbertragen.",
"perma_option":"off"
},
"linkedin":{
"status":"off",
"txt_info":"2 Klicks f\u00fcr mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie k\u00f6nnen Ihre Empfehlung an LinkedIn senden. Schon beim Aktivieren werden Daten an Dritte \u00fcbertragen.",
"perma_option":"off"
}
},
"info_link":"http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html",
"display_infobox":"off",
'cookie_domain' : 'akut-bonn.de',
'uri' : ''
});}
});
</script>
</head>
<body>
<div class="container" style="margin-top: 20px;">
<img src="img/mahlowat_logo.png" title="Mahlowat Logo" class="pull-right" onclick="changeText()"/>
<p id="spruch" class="pull-right"></p>
<div class="bottom-buffer top-buffer">
<h1>Ergebnisse</h1>
<ul class="pagination">
<li class="active"><a href="result-bars.php?ans=<?php echo $answerstring; ?>">Übersicht</a></li>
<li class=""><a href="result-table.php?ans=<?php echo $answerstring; ?>">Detailansicht</a></li>
</ul>
<?php if($warning && !isset($_GET['ans'])){ ?>
<div id="warning" class="modal hide fade">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Hoppla...</h3>
</div>
<div class="modal-body">
<p><strong>Anscheinend hast du keine Fragen beantwortet.</strong><br />
Entweder musst du auf dieser Seite Cookies zulassen, oder du hast die Thesen wirklich noch nicht bearbeitet.</p>
<p>Falls letzteres zutrifft, möchten wir dir empfehlen, dies nun zu tun.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn" data-dismiss="modal" aria-hidden="true">Schließen</button>
<a href="mahlowat.php" class="btn btn-primary">Thesen bearbeiten</a>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
setTimeout(function(){
$('#warning').modal('show');
}, 1000);
});
</script>
<?php } ?>
<p><small>Nicht zufrieden mit dem Ergebnis? Vielleicht willst du die Thesen <a href="multiplier.php?ans=<?php echo $answerstring; ?>" title="Gewichtung ändern">anders gewichten</a>.</small></p>
<table class="table table-bordered table-hover">
<tr><th style="width: 200px;">Liste</th><th style="width:100px">Punkte</th><th style="width:640px;">Punkte</th></tr>
<?php
$top = calculate_points($ans, $hsg_array[0]['answers'], $emph);
for($i = 0; $i < sizeof($hsg_array); $i++){
(calculate_points($ans, $hsg_array[$i]['answers'], $emph) == $top) ? $class = "success" : $class = "";
html_hsg_bar($hsg_array[$i], $ans, $emph, $class);
echo "\n";
}
?>
</table>
<hr />
<div class="control-group alert alert-info">
<p><strong>Ergebnis teilen:</strong></p>
<div class="controls sharecontrols">
<input type="text" class="col-md-5 form-control" id="resultlink" placeholder="" value="result-bars.php?ans=<?php echo result_to_string($ans, $emph); ?>">
</div>
<p><strong>Achtung!</strong> Aus diesem Link kann man ablesen, welche Antworten du ausgewählt und wie du die Thesen gewichtet hast!</p>
</div>
<div id="socialshareprivacy" class="social_share_privacy clearfix 1.6.2 locale-de_DE sprite-de_DE" style="width: 330px; height: 50px;"></div>
<div class="text-right">
<small>Du kannst die Befragung
<a href="index.php" title="Von vorn beginnen">neu starten</a>,
deine
<a href="mahlowat.php?ans=<?php echo $answerstring; ?>" title="Antworten ändern">Antworten ändern</a>
oder die
<a href="multiplier.php?ans=<?php echo $answerstring; ?>" title="Gewichtung ändern">Gewichtung anpassen</a>.<br />
Außerdem haben wir auch eine <a href="faq.php?from=result-bars.php?ans=<?php echo $answerstring; ?>" title="FAQ">FAQ-Seite</a>.
</small>
</div>
</div>
</div>
<script type="text/javascript">
$('#resultlink').click(function() {
var $this = $(this);
$this.select();
});
$('#resultlink').val(window.location.href);
/*$('.sharecontrols').hide();
function displayshare(){
$('.sharecontrols').toggle();
}*/
</script>
</body>
</html>

View File

@@ -1,9 +1,10 @@
<?php <?php
include 'includes/funcs.php'; include 'includes/funcs.php';
include 'includes/theses.php'; include 'includes/theses.php';
include 'includes/hsg.php'; include 'includes/hsg.php';
$theses = get_theses_array(); $theses = get_theses_array();
$theses_count = sizeof($theses['s']); $theses_count = sizeof($theses['s']);
@@ -13,17 +14,22 @@
$answerstring = ''; $answerstring = '';
$warning = false; $warning = false;
if(!isset($_GET['ans'])){ if(isset($_POST['ans'])){
$warning = true; $answerstring = $_POST['ans'];
for($i = 0; $i < $theses_count; $i++){ $retval = result_from_string($answerstring, $theses_count);
$ans[$i] = 'skip'; $ans = $retval[0];
$emph[$i] = 1; $emph = $retval[1];
} } elseif(isset($_GET['ans'])){
} else {
$answerstring = $_GET['ans']; $answerstring = $_GET['ans'];
$retval = result_from_string($answerstring, $theses_count); $retval = result_from_string($answerstring, $theses_count);
$ans = $retval[0]; $ans = $retval[0];
$emph = $retval[1]; $emph = $retval[1];
} else {
$warning = true;
for($i = 0; $i < $theses_count; $i++){
$ans[$i] = 'skip';
$emph[$i] = 1;
}
} }
$hsg_array = get_hsg_array(); $hsg_array = get_hsg_array();
@@ -35,16 +41,27 @@
<head> <head>
<title>Mahlowat - Ergebnis</title> <title>Mahlowat - Ergebnis</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta content=""> <meta content="Mahlowat, akut, akut Bonn, SP-Wahl Bonn">
<meta name="image_src" content="img/mahlowat_logo.png"/>
<meta name="description" content="Mein Mahlowat-Ergebnis"/>
<meta property="og:title" content="Mahlowat"/>
<meta property="og:type" content="website"/>
<meta property="og:image" content="img/mahlowat_logo.png"/>
<meta property="og:url" content=""/>
<meta property="og:site-name" content="akut-bonn.de"/>
<meta property="og:description" content="Mein Mahlowat-Ergebnis"/>
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen"> <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="css/bootstrap-responsive.min.css" rel="stylesheet"> <link href="css/bootstrap-responsive.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/style.css"> <link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/jquery-2.0.2.min.js"></script> <script src="js/jquery-2.0.2.min.js"></script>
<script src="js/bootstrap.min.js"></script> <script src="js/bootstrap.min.js"></script>
<script src="js/mahlowat-rt.js"></script> <script src="js/mahlowat-rb.js"></script>
<link href="css/socialshareprivacy-min.css" rel="stylesheet"> <link href="css/socialshareprivacy-min.css" rel="stylesheet">
@@ -101,17 +118,33 @@
}, },
"info_link":"http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html", "info_link":"http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html",
"display_infobox":"off", "display_infobox":"off",
'cookie_domain' : '//ToDo', 'cookie_domain' : 'akut-bonn.de',
'uri' : '//ToDo' 'uri' : ''
});} });}
}); });
</script> </script>
</head> </head>
<body> <body>
<?php if($warning){ ?> <div class="container" style="margin-top: 20px;">
<div id="warning" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"> <img src="img/mahlowat_logo.png" title="Mahlowat Logo" class="pull-right" onclick="changeText()"/>
<p id="spruch" class="pull-right"></p>
<div class="bottom-buffer top-buffer">
<h1>Ergebnisse</h1>
<ul class="pagination">
<!--<li class="active"><a href="result-bars.php?ans=<?php echo $answerstring; ?>">Übersicht</a></li>
<li class=""><a href="result-table.php?ans=<?php echo $answerstring; ?>">Detailansicht</a></li>-->
<li id="navi_overview" class="active"><a href="#" onclick="toggleView()">Übersicht</a></li>
<li id="navi_detail" class=""><a href="#" onclick="toggleView()">Detailansicht</a></li>
</ul>
<?php if($warning && !isset($_GET['ans'])){ ?>
<div id="warning" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@@ -139,18 +172,24 @@
}); });
</script> </script>
<?php } ?> <?php } ?>
<div class="container" style="margin-top: 20px;"> <p><small>Nicht zufrieden mit dem Ergebnis? Vielleicht willst du die Thesen <a href="multiplier.php?ans=<?php echo $answerstring; ?>" title="Gewichtung ändern">anders gewichten</a>.</small></p>
<img src="img/mahlowat_logo.png" title="Mahlowat Logo" class="pull-right" onclick="changeText()"/>
<p id="spruch" class="pull-right"></p> <div id="result-bars">
<div class="bottom-buffer top-buffer"> <table class="table table-bordered table-hover">
<tr><th style="width: 200px;">Liste</th><th style="width:100px">Punkte</th><th style="width:640px;">Punkte</th></tr>
<?php
$top = calculate_points($ans, $hsg_array[0]['answers'], $emph);
for($i = 0; $i < sizeof($hsg_array); $i++){
(calculate_points($ans, $hsg_array[$i]['answers'], $emph) == $top) ? $class = "success" : $class = "";
html_hsg_bar($hsg_array[$i], $ans, $emph, $class);
echo "\n";
}
?>
</table>
</div>
<h1>Ergebnisse</h1>
<ul class="pagination">
<li class=""><a href="result-bars.php?ans=<?php echo $answerstring; ?>">Übersicht</a></li>
<li class="active"><a href="result-table.php?ans=<?php echo $answerstring; ?>">Detailansicht</a></li>
</ul>
<div id="result-table"> <div id="result-table">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
@@ -200,8 +239,16 @@
<hr /> <hr />
<div id="socialshareprivacy" class="social_share_privacy clearfix 1.6.2 locale-de_DE sprite-de_DE" style="width: 330px; height: 50px;"></div> <div class="control-group alert alert-info">
<p><strong>Ergebnis teilen:</strong></p>
<div class="controls sharecontrols">
<input type="text" class="col-md-5 form-control" id="resultlink" placeholder="" value="result-bars.php?ans=<?php echo result_to_string($ans, $emph); ?>">
</div>
<p><strong>Achtung!</strong> Aus diesem Link kann man ablesen, welche Antworten du ausgewählt und wie du die Thesen gewichtet hast!</p>
</div>
<div id="socialshareprivacy" class="social_share_privacy clearfix 1.6.2 locale-de_DE sprite-de_DE" style="width: 330px; height: 50px;"></div>
<div class="text-right"> <div class="text-right">
<small>Du kannst die Befragung <small>Du kannst die Befragung
<a href="index.php" title="Von vorn beginnen">neu starten</a>, <a href="index.php" title="Von vorn beginnen">neu starten</a>,
@@ -209,14 +256,28 @@
<a href="mahlowat.php?ans=<?php echo $answerstring; ?>" title="Antworten ändern">Antworten ändern</a> <a href="mahlowat.php?ans=<?php echo $answerstring; ?>" title="Antworten ändern">Antworten ändern</a>
oder die oder die
<a href="multiplier.php?ans=<?php echo $answerstring; ?>" title="Gewichtung ändern">Gewichtung anpassen</a>.<br /> <a href="multiplier.php?ans=<?php echo $answerstring; ?>" title="Gewichtung ändern">Gewichtung anpassen</a>.<br />
Außerdem haben wir auch eine <a href="faq.php?from=result-table.php?ans=<?php echo $answerstring; ?>" title="FAQ">FAQ-Seite</a>. Außerdem haben wir auch eine <a href="faq.php?from=result-bars.php?ans=<?php echo $answerstring; ?>" title="FAQ">FAQ-Seite</a>.
</small> </small>
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$('[id^="thesis"]').popover(); $('#resultlink').click(function() {
var $this = $(this);
$this.select();
});
//$('#resultlink').val(window.location.href);
$('#resultlink').val(location.protocol + '//' + location.host + location.pathname + "?ans=<?php echo $answerstring; ?>");
/*$('.sharecontrols').hide();
function displayshare(){
$('.sharecontrols').toggle();
}*/
$('#result-table').hide();
$('[id^="thesis"]').popover();
$('.hsganswer').tooltip(); $('.hsganswer').tooltip();
$('.multheseslong').hide(); $('.multheseslong').hide();
$('.tt').tooltip(); $('.tt').tooltip();
@@ -228,9 +289,14 @@
$('.hsg-'+hsgname).toggle(500); $('.hsg-'+hsgname).toggle(500);
$('.hsgbtn-'+hsgname).toggleClass('btn-primary'); $('.hsgbtn-'+hsgname).toggleClass('btn-primary');
} }
function toggleView(){
$('#result-bars').toggle();
$('#result-table').toggle();
$('#navi_overview').toggleClass('active');
$('#navi_detail').toggleClass('active');
}
</script> </script>
</body> </body>
</html> </html>

4
ui-todo.txt Normal file
View File

@@ -0,0 +1,4 @@
* Es ist nicht klar, dass der "Antworten speichern"-Knopf ALLE Antworten speichert und
theoretisch nicht zwischendurch noch gespeichert werden muss.
* Eine Rückmeldung, dass das Speichern geklappt hat, wäre hilfreich.
* Wörter bei Eingabe zählen.