<?php
/**
 * Created by PhpStorm.
 * User: pejot
 * Date: 2015-03-09
 * Time: 00:19
 */
global $ankieta;

//print_r($_POST);
//print_r($ankieta->getNextSubmitParameters());


$varName=$ankieta->getNextSubmitParameters()['screenout'];
$description=$ankieta->getNextSubmitParameters()['screendoutdescription'];
$labs=$ankieta->getLabels($varName);
$value=$ankieta->getValue($varName);


$text="Niespełnione kryteria na zmiennej ".$varName;
if ($value) {$text.=", wybrano odpowiedź ".$labs[$value];}
if (!$varName) {$text="";}
$textDescription=$description;
if (!$description) {$textDescription="";}

?>
<div style="width: 100%;text-align: center;">
    <h2 style="color:red"><?print $text;?></h2>
    <h2 style="color:red"><?print $textDescription;?></h2>
    <h2>Dziękujemy za udział w badaniu</h2>
</div>
<div style="width: 100%;text-align: center;">
    <input id="NewButton" type="button" onClick="newSurvey()"  value="NOWA ANKIETA" />
</div>


<script type="text/javascript">

    function newSurvey() {
        window.location.href="survey.php?new=1";
    }


</script>