    select($(this).attr(\'id\'));
});
function select(xx) {
    var label=xx.substring(3,9);
    var item=xx.substring(10,11);
    console.log(label+\"-\"+item);
    if (item==1 || item==2) { uncheck(label,3); uncheck(label,4);}
    if (item==3) { uncheck(label,1); uncheck(label,2); uncheck(label,4);}
    if (item==4) { uncheck(label,1); uncheck(label,2); uncheck(label,3);}
}
function uncheck(label,item) {
    $(\"#ct_\"+label+\"_\"+item).removeAttr(\'checked\');
    $(\"#img_\"+label+\"_\"+item).attr(\"src\",\"../../webIfesProjects/IFESdesign/checkbox-unchecked.png\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '123',id_event = '2',script = '//echo \"<br><br><br><br><br><br><br><pre>\".var_export($_SESSION[\'questionnairePath\'],true);
$aktuelleWelle = 2;
$i10ww = reset(getVar(\"w\'.$aktuelleWelle.\'i10ww\"));

if ($i10ww==1) $ww_complete=1;
else  $ww_complete=2;

echo \'<input id=\"wwcomplete\" type=\"hidden\" name=\"forWordWrap\" value=\"\'.$ww_complete.\'\">\';';
<stat>INSERT INTO p26604009_script SET id_question = '123',id_event = '3',script = '
$( document ).ready(function() {
    //$(\"#tr_w2i10ww_1\").hide();
    $(\"[type=\'radio\']\").parent().parent().hide();
    var ww_complete = $(\'#wwcomplete\').val();
    console.log($(\'#wwcomplete\').val());
    function mycode() {
        console.log(count);
        count=count+1;
          if (count==1) $(\"#wordwrap\").text(\"Butter\");
          if (count==2) $(\"#wordwrap\").text(\"Arm\");
          if (count==3) $(\"#wordwrap\").text(\"Brief\");
          if (count==4) $(\"#wordwrap\").text(\"Königin\");
          if (count==5) $(\"#wordwrap\").text(\"Karte\");
          if (count==6) $(\"#wordwrap\").text(\"Graz\");
          if (count==7) $(\"#wordwrap\").text(\"Ecke\");
          if (count==8) $(\"#wordwrap\").text(\"Stein\");
          if (count==9) $(\"#wordwrap\").text(\"Buch\");
          if (count==10) $(\"#wordwrap\").text(\"Stock\");
   
        
        if (count<=10) tid = setTimeout(mycode, 2500); // repeat myself
        else {
        $(\"#wordwrap\").text(\"\");  
        $(\'[name=\"questSubmit\"]\').parent().show();
        $(\'#wwcomplete\').val(1);
        }
    }
    if (ww_complete ==\"2\") {
        $(\'[name=\"questBack\"]\').parent().hide(); 
        $(\'[name=\"questSubmit\"]\').parent().hide(); 
        
        var append1 =\'<tr><td id=\"wordwrap\" style=\"height:40px;text-align:center;vertical-align:middle;width:100%;font-size:xx-large\">Butter</td></tr>\';
        var bas = $(\"#desElementId_32\").find(\"tbody\");
        bas.append(append1);
        
        var count=1;
        var tid = setTimeout(mycode, 2500);
        
    }
});';
<stat>INSERT INTO p26604009_script SET id_question = '139',id_event = '1',script = '//echo \"<br><br><br><br><br><br><br><pre>\".var_export($_SESSION,true).\"</pre>\";
$aktuelleWelle = 2;
$i_userid = reset(getVar(\"user_id\"));
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");

if (count($i_info) == 1) $intnr = $i_info[0][\"username\"];
else $intnr=99999;
saveVar(\"w\".$aktuelleWelle.\"intnr_1=\'\" . $intnr . \"\'\");

$respid=reset(getVar(\"sample_1\"));
saveVar(\"w\".$aktuelleWelle.\"respid_1=\'\".$respid.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '145',id_event = '1',script = '
$aktuelleWelle = 2;

$statusnxt=reset(getVar(\"w\".($aktuelleWelle+1).\"complete\"));
$savedstatus=reset(getVar(\"w\".$aktuelleWelle.\"StatNxtWave\"));
$complete = reset(getVar(\"w\".$aktuelleWelle.\"complete\"));
define(\'C_DATE_FORMAT\', \'d.m.Y\');
if ($complete==1) {
    $date = reset(getVar(\"w\".$aktuelleWelle.\"tmende\"));
    $datetime = strtotime($date);
    $date = date(\"d.m.Y\", $datetime);

} else {
   $date = reset(getVar(\"timeslotstart_\".($aktuelleWelle)));
   $date = new DateTime($date);   
   $date->add(new DateInterval(\'P7D\'));
   $date = $date->format(C_DATE_FORMAT);
   echo \"<br>\".$date;
}
$date0 = new DateTime();

//Datum setzen
$date1 = new DateTime($date);
$date1->add(new DateInterval(\'P7D\'));
$date2 = new DateTime($date);
$date2->add(new DateInterval(\'P21D\'));

saveVar(\"timeslotstart_\".($aktuelleWelle+1).\"=\'\".$date1->format(C_DATE_FORMAT).\"\'\");
saveVar(\"timeslotende_\".($aktuelleWelle+1).\"=\'\".$date2->format(C_DATE_FORMAT).\"\'\");


if($date0<$date1) {
    if (!($statusnxt==1 || $statusnxt==2) && $savedstatus<=1) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=1\");
} else if ($date0<$date2 || $statusnxt==1) {
    if (!($statusnxt==1 || $statusnxt==2) && $savedstatus<=2) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=2\");
} else {
    if (!($statusnxt==1 || $statusnxt==2)) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=3\");
}

';
<stat>INSERT INTO p26604009_script SET id_question = '148',id_event = '2',script = '//var_dump($_SESSION);
$aktuelleWelle=2;
$txtchck = sprintf(\'sample_1,Projektdaten_1,Projektdaten_3,Projektdaten_4,Projektdaten_5,kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6\');
    $checkvar = getVar($txtchck);
    $allvars = $txtchck;
    foreach (explode(\",\",$allvars) as $itemvar) {
           $$itemvar = $checkvar[$itemvar] ;
    }


$i_userid = reset(getVar(\"user_id\"));
if ($i_userid == 0 ) {$i_userid = 10;}
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");
if (count($i_info) == 1) {$intnr = $i_info[0][\"username\"];}
//else $intnr=\"99999\";
    

$respGeschl = $sample_1;
$projNum = $_SESSION[\'proj_name\'];
$projName  = $Projektdaten_1;
$projTxt  = $projName . \' (\' . $projNum .\')\';


saveVar(\'structureid_1=\'.($_SESSION[\'id_record\']));
saveVar(\'user_id=\'.($_SESSION[\'id_user\']));
saveVar(\'source_2=\'.($_SESSION[\'id_record\']));
saveVar(\'source_1=\"\'.$projTxt.\'\"\');


    echo \'<input id=respGeschl  type=\"hidden\"    name=\"forCorona\" value=\"\'.$respGeschl.\'\">\';
    echo \'<input id=respName    type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_1.\'\">\';
    echo \'<input id=respPLZ     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_2.\'\">\';
    echo \'<input id=respStreet  type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_3.\'\">\';
    echo \'<input id=respHNr     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_4.\'\">\';
    echo \'<input id=respCity    type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_5.\'\">\';
    echo \'<input id=respTel     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_6.\'\">\';
    
    echo \'<input id=listNr      type=\"hidden\"    name=\"forCorona\" value=\"\'.$Projektdaten_4.\'\">\';
    echo \'<input id=lfdNr       type=\"hidden\"    name=\"forCorona\" value=\"\'.$Projektdaten_5.\'\">\'; 
    
    echo \'<input id=projNr      type=\"hidden\"    name=\"forCorona\" value=\"\'.$projNum.\'\">\'; 
    echo \'<input id=intNr       type=\"hidden\"    name=\"forCorona\" value=\"\'.$intnr.\'\">\'; 

';
<stat>INSERT INTO p26604009_script SET id_question = '148',id_event = '3',script = '
</script>

<link rel=\"stylesheet\" href=\"/../webIfesProjects/IchWarDaFormular/datepicker.min.css\">
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/signature_pad.min.js\"></script>
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/datepicker.min.js\"></script>
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/jspdf.min.js\"></script>

<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.0.272/jspdf.debug.js\"></script>

<script type=\"text/javascript\">




function touchHandler(event) {
    var touch = event.changedTouches[0];

    var simulatedEvent = document.createEvent(\"MouseEvent\");
    simulatedEvent.initMouseEvent({
            touchstart: \"mousedown\",
            touchmove: \"mousemove\",
            touchend: \"mouseup\"
        }[event.type], true, true, window, 1,
        touch.screenX, touch.screenY,
        touch.clientX, touch.clientY, false,
        false, false, false, 0, null);

    touch.target.dispatchEvent(simulatedEvent);
   // event.preventDefault();// you can remove preventDefault if it creates problem with other functionalities
}


function init() {
    document.addEventListener(\"touchstart\", touchHandler, true);
    document.addEventListener(\"touchmove\", touchHandler, true);
    document.addEventListener(\"touchend\", touchHandler, true);
    document.addEventListener(\"touchcancel\", touchHandler, true);
}    

init();
  

var canv1 = document.getElementById(\'canvas1\');
var signaturePad1 = new SignaturePad(canv1);
signaturePad1.id = \'sigPad1\';
$(\"canvas1\").append(signaturePad1);

clearButton = document.getElementById(\'clear1\');
clearButton.addEventListener(\'click\', function(event) {
    //console.log(document.getElementsByClassName(\'SignaturePad\'));
    $(\'#wrapper1 canvas\').each(function(idx, item) {
        var context = item.getContext(\"2d\");
        context.clearRect(0, 0, item.width, item.height);
        context.beginPath();        
    });
});



var signaturedialog = document.createElement(\'table\');
signaturedialog.id = \'signaturedialog\';

var canv2 = document.getElementById(\'canvas2\')
var signaturePad2 = new SignaturePad(canv2);
signaturePad2.id= \'sigPad2\';
$(\"canvas2\").append(signaturePad2);


document.body.appendChild(signaturedialog);

popupButton = document.getElementById(\'signpopup\');
popupButton.addEventListener(\'click\', function(event) {
    $(\"#canvas1\").hide();
    $(\"#canvas2\").appendTo(\"#signaturedialog\");

    $(\"#canvas2\").show();  
    $( \"#signaturedialog\" ).dialog({
        \'width\':\'auto\',
        \'title\':\'Bitte unterschreiben Sie hier!\',
            \'buttons\': {
        \'Unterschrift bestätigen\': function(event) {
            $(\"#canvas1\").replaceWith($(\'#canvas2\'));
            $(\"#canvas2\").clone().appendTo(\"#wrapper2\");
           document.getElementById(\'wrapper1\').firstChild.id = \'canvas1\';        
           //console.log(document.getElementById(\'wrapper1\').firstChild);
            
            var canv2 = document.getElementById(\'canvas2\')
            var signaturePad2 = new SignaturePad(canv2);
            signaturePad2.id = \'sigPad2\';
            $(\"canvas2\").append(signaturePad2);
            $(\"#canvas2\").hide();
            $(\"#signaturedialog\").dialog(\'close\');
            
            }
                }
    });
 
    });


//ENTFERNEN WENN FERTIG EINGERICHTET!
function getCookieValue(a) {
   const b = document.cookie.match(\'(^|;)\\\\s*\' + a + \'\\\\s*=\\\\s*([^;]+)\');
   return b ? b.pop() : \'\';
}


//console.log (\"respstreet \" + getCookieValue(\"respstreet\"));
var txtGeschl = \'\';
var respGeschl = document.getElementById(\'respGeschl\').value;
console.log(respGeschl);
if (respGeschl == \'1\') {txtGeschl = \'Herr \';}
if (respGeschl == \'2\') {txtGeschl = \'Frau \';}

document.getElementById(\'resp_adresse\').value=document.getElementById(\"respStreet\").value+ \" \"+document.getElementById(\"respHNr\").value+ \" \"+document.getElementById(\"respPLZ\").value+ \" \"+document.getElementById(\"respCity\").value;
document.getElementById(\'resp_name\').value=txtGeschl+\"\"+document.getElementById(\"respName\").value;
document.getElementById(\'resp_telnr\').value=document.getElementById(\"respTel\").value;

/* NACH EINRICHTEN LÖSCHEN
//console.log(document.cookie);
document.getElementById(\'desElementId_1041\').style.background = \'white\';
document.getElementById(\'desElementId_148\').remove();
document.getElementById(\'desElementId_150\').remove();
//document.getElementById(\'desElementId_153\').remove();
*/


$(\"submitCallStatus\").prop(\"onclick\", null).off(\"click\");

var eventListener = document.getElementById(\'submitCallStatus\');
   eventListener.removeAttribute(\"onclick\");
                                
const picker1 = datepicker(document.querySelector(\'#datum1\'),{startDay: 1});

var today = new Date();
var dd = String(today.getDate()).padStart(2, \'0\');
dd = parseInt(dd);
var mm = String(today.getMonth() + 1).padStart(2, \'0\');
mm = parseInt(mm);
var yyyy = today.getFullYear();

today = dd + \'.\' + mm + \'.\' + yyyy;

document.getElementById(\'datum1\').value = today;

submitAll = document.getElementById(\'submitCallStatus\');



submitAll.addEventListener(\'click\', function(event) {

    var welle = 2;
    var structureId = document.getElementById(\'structureid\').value;
    var respName    = document.getElementById(\'resp_name\').value;
    var respAdresse = document.getElementById(\'resp_adresse\').value;
    var respTelnr   = document.getElementById(\'resp_telnr\').value;
    var respDatum   = document.getElementById(\'datum1\').value;
    var projName    = document.getElementById(\'projNr\').value;
    var intNr      = document.getElementById(\'intNr\').value;

    var listNr      = document.getElementById(\'listNr\').value;
    var lfdNr       = document.getElementById(\'lfdNr\').value;
    var respNameU = respName.split(\" \").join(\"_\");
    var w = window.open(\'about:blank\',\'pdfForm\');
    var c = document.getElementById(\"canvas1\");
    var d = c.toDataURL(\"image/png\"); 
    var htmldoc     = w.document.getElementById(\"htmldoc\");
	var htmltitle   = String(\'CoVid-Formular_\'+projName+\'_\'+listNr+\'_\'+lfdNr+\'_\'+welle+\'_\'+intNr+\'_\'+respNameU+\'_\'+structureId);
    var htmlcontent;
    
        
  $.ajax({
         data: { structureId:structureId,respName:respName,respAdresse:respAdresse,respTelnr:respTelnr,respDatum:respDatum,projName:projName,intNr:intNr},
         type: \"post\",
         url: \"/../webIfesProjects/IchWarDaFormular/updatedata.php\",
         
            success: function(data){

         htmlcontent = \'<style type=\"text/css\" media=\"print\"> @page {size:  auto;margin: 0mm;} html {background-color: #FFFFFF; margin: 0px;} body {border: solid 1px white ; margin: 10mm 15mm 10mm 15mm; } </style><title>\'+htmltitle+\'</title><img src=\"../covid_sticker.PNG\"><style> ul { list-style-type: none; margin: 0; padding: 0; } </style><div style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:32px\">Bitte kontrollieren Sie Ihre eingeblendeten Kontaktdaten und bestätigen Sie die angeführten Angaben mit Ihrer Unterschrift.</div><br><br><p style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:24px;line-height:0%\">Ihre Daten - Angaben zur befragten Person</p><p style=\"font-family:calibri;font-size:18px;\">HINWEIS: Wird ausschließlich für das für Contact Tracing verwendet.</p><br><table style=\"margin-right:auto;margin-left:0px\"><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Name (Vor-, Zuname)</b> </p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respName+\'</u></p></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Adresse</b></p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respAdresse+\'</u></p></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Telefonnummer</b></p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respTelnr+\'</u></p></td></tr></table><p style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:24px;\">Allgemeine Informationen</p><table style=\"font-family:calibri;font-size:18px\"><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich habe das IFES-Schreiben \"Vielen herzlichen Dank für Ihre Unterstützung\" mit den Kontaktdaten des IFES (Adresse, Telefonnummer und E-Mail-Adresse) erhalten.</td></tr><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich bestätige hiermit, dass während der Befragung durch IFES alle gesetzlichen Vorgaben im Rahmen der COVID-19-Sicherheitsmaßnahmen eingehalten wurden.</td></tr><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich habe den Namen und die Interviewer-Nummer der IFES Feld Interviewerin/des IFES Feld Interviewers erhalten.</td></tr></table><table width=\"100%\"><tr><td><img src=\"\'+d+\'\"/></td> <td><br><br><br><br><br><div vertical-align=\"middle\"><p style=\"font-family:calibri;font-size:18px;\"><b>\'+respDatum+\'</b></p></div></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><span style=\"text-decoration:overline\">Unterschrift der befragten Person</span></p></td><td><p style=\"font-family:calibri;font-size:18px\"><span style=\"text-decoration:overline\">Datum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p></td></td></table><br><br><br><div style=\"font-family:calibri;font-size:18px\"><div>IFES Intern:</div><br><div>Projektnummer: \'+projName+\'</div><div>Listennummer: \'+listNr+\'</div><div>Laufnummer: \'+lfdNr+\'</div><div>Welle: \'+welle+\'</div><div>Interviewer-Nummer: \'+intNr+\'</div><div id=\"statustxt\">Status: vom Respondent unterschrieben</div></div>\';
         w.document.write(htmlcontent);
         //w.print(); 
         w.close();
         htmlcontent = htmlcontent + \'<<<|||>>>\' + htmltitle;
         var data = new FormData();
         data.append(\"html\" , htmlcontent);
         data.append(\"projname\" , projName);
         var xhr = new XMLHttpRequest();
         xhr.open( \'POST\', \'/../webIfesProjects/IchWarDaFormular/writeform.php\', true );
         xhr.send(data);
         
            },
            
          failure: function(data){
              alert(\"FEHLER!\");
         },
      });


alert(\"Daten erfasst!\");       
recodeClickEvents(this,3); 
    
});


';
<stat>INSERT INTO p26604009_script SET id_question = '153',id_event = '3',script = '//document.getElementById(\'questBack\').style.visibility=\'hidden\';';
<stat>INSERT INTO p26604009_script SET id_question = '154',id_event = '1',script = '$aktuelleWelle=2;
$formdata   = reset(getVar(\'formdata_1\'));
$checkq     = reset(getVar(\'w\'.$aktuelleWelle.\'checkq\'));
$status1 = \'vom Respondent unterschrieben\';
$status2 = \'Respondent verweigert Unterschrift\';
$status3 = \'Unterschrift technisch nicht möglich\';

if ($checkq == 1) {
    $formdata = str_replace($status2,$status1, $formdata);
    $formdata = str_replace($status3,$status1, $formdata);
}
if ($checkq == 2) {
    $formdata = str_replace($status1,$status2, $formdata);
    $formdata = str_replace($status3,$status2, $formdata);
}
if ($checkq == 3) {
    $formdata = str_replace($status1,$status3, $formdata);
    $formdata = str_replace($status2,$status3, $formdata);
}

saveVar(\"formdata_1=\'\".$formdata.\"\'\");
saveVar(\'w\'.$aktuelleWelle.\'checkdummy=2\');
if (strlen($formdata) > 4000) saveVar(\'w\'.$aktuelleWelle.\'checkdummy=1\');';
<stat>INSERT INTO p26604009_script SET id_question = '109',id_event = '1',script = '$aktuelleWelle = 2;
saveVar(\"w\".$aktuelleWelle.\"complete=1\");
$status=reset(getVar(\"sample_5\"));
$stat_array=explode(\";\",$status);

saveVar(\"sample_5=\'\".($aktuelleWelle+1).\";\".$stat_array[1].\"\'\");';
<stat>INSERT INTO p26604009_script SET id_question = '102',id_event = '1',script = 'saveVar(\"armband=\".reset(getVar(\"methode\")));
';
<stat>INSERT INTO p26604009_script SET id_question = '159',id_event = '1',script = 'saveVar(\"w3complete=2\");';
<stat>INSERT INTO p26604009_script SET id_question = '160',id_event = '1',script = 'saveVar(\"w2=2\");';
<stat>INSERT INTO p26604009_script SET id_question = '114',id_event = '1',script = '
$aktuelleWelle = 2;
//echo \"<br><br><br><br><br><br><br>TEST\";
$string= reset(getVar(\"sample_4\"));
$array=explode(\";<>;\",$string);
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$iter=0;
foreach (explode(\",\",$txtchck) as $itemvar) {
       saveVar($itemvar.\"=\'\".$array[$iter].\"\'\");
       $iter++;
}

';
<stat>INSERT INTO p26604009_script SET id_question = '168',id_event = '1',script = '$aktuelleWelle = \"aus\";
$i_userid = reset(getVar(\"user_id\"));
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");

if (count($i_info) == 1) $intnr = $i_info[0][\"username\"];
else $intnr=99999;
saveVar($aktuelleWelle.\"intnr_1=\'\" . $intnr . \"\'\");
    ';
<stat>INSERT INTO p26604009_script SET id_question = '170',id_event = '1',script = '$aktuelleWelle = \"aus\";
saveVar(\"auscomplete=1\");';
<stat>INSERT INTO p26604009_script SET id_question = '176',id_event = '1',script = 'saveVar(\"w4complete=1\");';
<stat>INSERT INTO p26604009_script SET id_question = '177',id_event = '1',script = 'saveVar(\"w5complete=2\");';
<stat>INSERT INTO p26604009_script SET id_question = '178',id_event = '1',script = 'saveVar(\"w6complete=2\");';
<stat>INSERT INTO p26604009_script SET id_question = '179',id_event = '1',script = 'saveVar(\"w7complete=2\");';
<stat>INSERT INTO p26604009_script SET id_question = '145',id_event = '2',script = '$methode = reset(getVar(\"sample_2\"));
if ($methode==1) $methodetxt= \"persönliche\"; else $methodetxt= \"telefonische\";

$aktuelleWelle = 2;
$savedstatus=reset(getVar(\"w\".$aktuelleWelle.\"StatNxtWave\"));

$nxtwavestart=reset(getVar(\"timeslotstart_\".($aktuelleWelle+1).\"\"));
$nxtwaveende=reset(getVar(\"timeslotende_\".($aktuelleWelle+1).\"\"));
define(\'C_DATE_FORMAT\', \'d.m.Y\');
$nxtwavestart=reset(getVar(\"timeslotstart_\".($aktuelleWelle+1).\"\"));
$nxtwaveende=reset(getVar(\"timeslotende_\".($aktuelleWelle+1).\"\"));
$nxtwavebest = new DateTime($nxtwavestart);
$nxtwavebeststart=$nxtwavebest->add(new DateInterval(\'P7D\'))->format(C_DATE_FORMAT);

$txtchck = sprintf(\'kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6,kondata_7,kondata_8,sample_7,w\'.$aktuelleWelle.\'f23_1,w\'.$aktuelleWelle.\'f23_2,w\'.$aktuelleWelle.\'f23_3,w\'.$aktuelleWelle.\'f23_4,w\'.$aktuelleWelle.\'f23_opn2,w\'.$aktuelleWelle.\'f23_opn3,w\'.$aktuelleWelle.\'f23_opn4,w\'.$aktuelleWelle.\'f24_1,w\'.$aktuelleWelle.\'f24_2\');
$checkvar = getVar($txtchck);
$allvars = $txtchck;
foreach (explode(\",\",$allvars) as $itemvar) {
       $$itemvar = $checkvar[$itemvar] ;
}
$scb=explode(\";<>;\",$sample_7);
$kondata=
\"Name: \".$kondata_1.\"<br>\".
\"Adresse: \".$kondata_3.\" \".$kondata_4.\", \".$kondata_2.\" \".$kondata_5.\"<br>\".
\"Kommentar: \".$kondata_7.\"<br>\".
\"<br>\".
\"Festnetz-Telefon: \".$scb[0].\"<br>\".
\"Mobil-Telefon: \".$scb[1].\"<br>\".
\"Emailadresse: \".$scb[2].\"<br>\".
\"<br>\";
$erreichbarkeit=\"\";
if($w2f23_1==1) $erreichbarkeit = \"Nächsten Wochen erreichbar (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$ww2f24_2.\"-)\";
if($w2f23_2==2) $erreichbarkeit = \"Nächsten Wochen im Urlaub/Ausland (\".$w2f23_opn2.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";
if($w2f23_3==3) $erreichbarkeit = \"Nächsten Wochen im Krankenhaus (\".$w2f23_opn3.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";
if($w2f23_4==4) $erreichbarkeit = \"Nächsten Wochen abwesend (\".$w2f23_opn4.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";

if($savedstatus==1) {
    $text =\"Die nächste <u>\".$methodetxt.\"</u> Befragung soll zwischen dem \".$nxtwavebeststart.\" und \".$nxtwaveende.\" stattfinden.<br>\".
    \"(Die Durchführung ist bereits ab dem  \".$nxtwavestart.\" möglich.)<br>\".
    \"<br>\".
    \"Vereinbaren Sie am besten gleich einen Termin. Bestätigen Sie den Termin mindesten einen Tag vorher!<br>\".
    \"<br>\".
    $kondata.
    $erreichbarkeit.\"<br>\".
    \"<br>\".
    \"Unterbrechen Sie das Interview mit \\\"make appointment\\\".\";
} else if ($savedstatus==2) {
    $text=\"Sie können jetzt (bis \".$nxtwaveende.\") mit der nächsten <u>(\".$methodetxt.\"n)</u> Welle fortfahren! Bestätigen Sie den Termin mindesten einen Tag vorher!<br>\".
    \"<br>\".
    $kondata.
    $erreichbarkeit.\"<br>\".
    \"<br>\";
} else {
    $text=\"Das Zeitfenster für diese Welle (\".$nxtwavestart.\" bis \".$nxtwaveende.\") ist bereits abgelaufen. Wenn möglich fahren Sie mit der nächsten Welle fort!\".
    \"<br>\";
}

if(reset(getVar(\"auscomplete\"))==1) {
    $bez=reset(getVar(\"sample_6\"));
    $bez_array=explode(\";<>;\",$bez);

    $txtchck = sprintf(\'sample_6,austmende,ausf1,ausf2_1,ausf2_2,ausf3,ausf3_opn,ausf4_1\');
    $checkvar = getVar($txtchck);
    $allvars = $txtchck;
    foreach (explode(\",\",$allvars) as $itemvar) {
           $$itemvar = $checkvar[$itemvar] ;
    }
    $text.= \"Auskunft der Bezugsperson (\".$bez_array[0].\") vom \".$austmende.\"):<br>\".
    \"Status bzw. Aufenthalt:\" .getAnswerText2(\"ausf1\",$ausf1).\"<br>\";
    if($ausf3==1)  $text .= \"retour ab: \".$ausf3_opn.\"<br>\";
    else if ($ausf3==2 || $ausf3==3)  $text .= \"retour ab: \".getAnswerText2(\"ausf3\",$ausf3).\"<br>\";
    $text .=    \"sonstige Infromationen: \".$ausf4_1;
}

setQuestion($text);

';
<stat>INSERT INTO p26604009_script SET id_question = '39',id_event = '1',script = '$armband=reset(getVar(\"w1ft_3\"));
$akzid=reset(getVar(\"w1ft_3\"));
define(\'C_DATE_FORMAT\', \'d.m.Y\');
if ($armband==3) saveVar(\"sample_2=2\");
else {
    saveVar(\"sample_2=1\");
    $date = new DateTime();
    $akz[0]=reset(getVar(\"w1ft_opn1\"));
    $akz[1]=$date->format(C_DATE_FORMAT);
    $akz[2]=1;
    $akz=implode(\";\",$akz);
    saveVar(\"sample_8=\'\".$akz.\"\'\");
}

$txtchck = sprintf(\'w1f44,kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6,kondata_7,kondata_8\');
$checkvar = getVar($txtchck);
$allvars = $txtchck;
foreach (explode(\",\",$allvars) as $itemvar) {
       $$itemvar = $checkvar[$itemvar] ;
}

$string = implode(\";<>;\",$checkvar);
saveVar(\"sample_9=\'\".$string.\"\'\");
$txtchck = sprintf(\'scb_1,scb_2,scb_3\');
$checkvar = getVar($txtchck);
$string = implode(\";<>;\",$checkvar);
saveVar(\"sample_7=\'\".$string.\"\'\");
// im IFES über skrip kondata ins sample spielen für Umverteilung
$i_userid = reset(getVar(\"user_id\"));
if ($i_userid != 0 || $i_userid != -1) {
    $i_table_id = reset(getVar(\"id_capi_table\"));
    $i_address_id = reset(getVar(\"id_capi_address\"));
    $i_sample_id = reset(getVar(\"id_capi_sample\"));
/*
    if ($i_table_id != null) {
        $i_table_name = getVarFromTable(\"_CapiTables\", \"name\", \"WHERE id = \".$i_table_id);
        if (count($i_table_name) == 1) {    
            $i_sample_table = \"capi___\" . $i_table_name[0][\"name\"];
            //$i_address = getVarFromTable($i_sample_table, \"id, id_municipality, municipality, id_settlement, id_street, capi_BL, capi_PB, capi_OG, capi_ID_POST, name, street, addon_address, zip, town, capi_hnr\", \"WHERE id = \".$i_address_id);
            if (count($i_address) == 1)  {
            }
        }
    }
    */
}

';
<stat>INSERT INTO p26604009_script SET id_question = '66',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '64',id_event = '3',script = 'if( $(\"#ct_w1f27_2\").is(\':checked\')) {
console.log(\"OFFESN AUF NULL\");
$(\"#op_w1f27_1\").val(\"\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '66',id_event = '2',script = 'saveVar(\"w1i28ww=1\");';
<stat>INSERT INTO p26604009_script SET id_question = '65',id_event = '1',script = 'saveVar(\"w1i28ww=0\");';
<stat>INSERT INTO p26604009_script SET id_question = '63',id_event = '3',script = 'if( $(\"#ct_w1f26_2\").is(\':checked\') ) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_w1f26_1\").val(\"\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '73',id_event = '3',script = '$(document).ready(function() {
   // $(\'div[name=\"erg2\"]\').hide();
   // $(\'span[name=\"erg2\"]\').parent().parent().hide();
   $(\'[name=\"questSubmit\"]\').parent().hide();
   design(1);
});

$($(\'[id^=\"td_w1f35_\"]\')).on(\'click\', function () {
    console.log($(this).attr(\'id\'));
    var name=$(this).attr(\'id\');
    console.log(name.substring(9,10));
    var item=parseInt(name.substring(9,10));
    design(item+1);
});
function design(xx) {
    console.log(xx);
    for ( let iter=1; iter<=5; iter++ ) {
        if(iter==xx) {
            console.log(iter+\" anzeigen\");
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:30px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"30px\");
        } else if (iter>xx){
            console.log(iter+\" ausblenden\");
            $(\'div[name=\"erg\'+iter+\'\"]\').hide();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().hide();
        } else {
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:18px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"16px\");
            if (xx==6) $(\'[name=\"questSubmit\"]\').parent().show(); 
        }
    }
        
}
';
<stat>INSERT INTO p26604009_script SET id_question = '74',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '93',id_event = '2',script = '$methode = reset(getVar(\"sample_2\"));
if ($methode==1) $methodetxt= \"persönliche\"; else $methodetxt= \"telefonische\";

$savedstatusw2=reset(getVar(\"w1StatNxtWave\"));

define(\'C_DATE_FORMAT\', \'d.m.Y\');
$nxtwavestart=reset(getVar(\"timeslotstart_2\"));
$nxtwaveende=reset(getVar(\"timeslotende_2\"));
$nxtwavebest = new DateTime($nxtwavestart);
$nxtwavebeststart=$nxtwavebest->add(new DateInterval(\'P7D\'))->format(C_DATE_FORMAT);

$txtchck = sprintf(\'kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6,kondata_7,kondata_8,scb_1,scb_2,scb_3,w1f49_1,w1f49_2,w1f49_3,w1f49_4,w1f49_opn2,w1f49_opn3,w1f49_opn4,w1f50_1,w1f50_2\');
$checkvar = getVar($txtchck);
$allvars = $txtchck;
foreach (explode(\",\",$allvars) as $itemvar) {
       $$itemvar = $checkvar[$itemvar] ;
}

$kondata=
\"Name: \".$kondata_1.\"<br>\".
\"Adresse: \".$kondata_3.\" \".$kondata_4.\", \".$kondata_2.\" \".$kondata_5.\"<br>\".
\"Kommentar: \".$kondata_7.\"<br>\".
\"<br>\".
\"Festnetz-Telefon: \".$scb_1.\"<br>\".
\"Mobil-Telefon: \".$scb_2.\"<br>\".
\"Emailadresse: \".$scb_3.\"<br>\".
\"<br>\";
$erreichbarkeit=\"\";
if($w1f49_1==1) $erreichbarkeit = \"Nächsten Wochen erreichbar (Abwesend/schlecht erreichbar von -\".$w1f50_1.\"- bis -\".$w1f50_2.\"-)\";
if($w1f49_2==2) $erreichbarkeit = \"Nächsten Wochen im Urlaub/Ausland (\".$w1f49_opn2.\") (Abwesend/schlecht erreichbar von -\".$w1f50_1.\"- bis -\".$w1f50_2.\"-)\";
if($w1f49_3==3) $erreichbarkeit = \"Nächsten Wochen im Krankenhaus (\".$w1f49_opn3.\") (Abwesend/schlecht erreichbar von -\".$w1f50_1.\"- bis -\".$w1f50_2.\"-)\";
if($w1f49_4==4) $erreichbarkeit = \"Nächsten Wochen abwesend (\".$w1f49_opn4.\") (Abwesend/schlecht erreichbar von -\".$w1f50_1.\"- bis -\".$w1f50_2.\"-)\";

if($savedstatusw2==1) {
    $text =\"Die nächste <u>\".$methodetxt.\"</u> Befragung soll zwischen dem \".$nxtwavebeststart.\" und \".$nxtwaveende.\" stattfinden.<br>\".
    \"(Die Durchführung ist bereits ab dem  \".$nxtwavestart.\" möglich.)<br>\".
    \"<br>\".
    \"Vereinbaren Sie am besten gleich einen Termin. Bestätigen Sie den Termin mindesten einen Tag vorher!<br>\".
    \"<br>\".
    $kondata.
    $erreichbarkeit.\"<br>\".
    \"<br>\".
    \"Unterbrechen Sie das Interview mit \\\"make appointment\\\"<br><br>\";
} else if ($savedstatusw2==2) {
    $text=\"Sie können jetzt (bis \".$nxtwaveende.\") mit der nächsten <u>(\".$methodetxt.\"n)</u> Welle fortfahren! Bestätigen Sie den Termin mindesten einen Tag vorher!<br>\".
    \"<br>\".
    $kondata.
    $erreichbarkeit.\"<br>\".
    \"<br>\";
} else {
    $text=\"Das Zeitfenster für diese Welle (\".$nxtwavestart.\" bis \".$nxtwaveende.\") ist bereits abgelaufen. Wenn möglich fahren Sie mit der nächsten Welle fort!\".\"<br>\".
    \"<br>\";
}

if(reset(getVar(\"auscomplete\"))==1) {
    $bez=reset(getVar(\"sample_6\"));
    $bez_array=explode(\";<>;\",$bez);

    $txtchck = sprintf(\'sample_6,austmende,ausf1,ausf2_1,ausf2_2,ausf3,ausf3_opn,ausf4_1\');
    $checkvar = getVar($txtchck);
    $allvars = $txtchck;
    foreach (explode(\",\",$allvars) as $itemvar) {
           $$itemvar = $checkvar[$itemvar] ;
    }
    $text.= \"Auskunft der Bezugsperson (\".$bez_array[0].\") vom \".$austmende.\"):<br>\".
    \"Status bzw. Aufenthalt:\" .getAnswerText2(\"ausf1\",$ausf1).\"<br>\";
    if($ausf3==1)  $text .= \"retour ab: \".$ausf3_opn.\"<br>\";
    else if ($ausf3==2 || $ausf3==3)  $text .= \"retour ab: \".getAnswerText2(\"ausf3\",$ausf3).\"<br>\";
    $text .=    \"sonstige Infromationen: \".$ausf4_1;
}

setQuestion($text);


';
<stat>INSERT INTO p26604009_script SET id_question = '122',id_event = '1',script = '$aktuelleWelle = 2;
saveVar(\'w\'.$aktuelleWelle.\'i10ww=0\');';
<stat>INSERT INTO p26604009_script SET id_question = '87',id_event = '3',script = 'if( $(\"#ct_w1f47_2\").is(\':checked\') || $(\"#ct_w1f47_3\").is(\':checked\')) {
console.log(\"OFFESN AUF NULL\");
$(\"#op_w1f47_1\").val(\"\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '124',id_event = '2',script = '$aktuelleWelle = 2;
saveVar(\'w\'.$aktuelleWelle.\'i10ww=1\');';
<stat>INSERT INTO p26604009_script SET id_question = '124',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '131',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '130',id_event = '3',script = '$(document).ready(function() {
   // $(\'div[name=\"erg2\"]\').hide();
   // $(\'span[name=\"erg2\"]\').parent().parent().hide();
   $(\'[name=\"questSubmit\"]\').parent().hide();
   design(1);
});

$($(\'[id^=\"td_w2f16_\"]\')).on(\'click\', function () {
    console.log($(this).attr(\'id\'));
    var name=$(this).attr(\'id\');
    console.log(name.substring(9,10));
    var item=parseInt(name.substring(9,10));
    design(item+1);
});
function design(xx) {
    console.log(xx);
    for ( let iter=1; iter<=5; iter++ ) {
        if(iter==xx) {
            console.log(iter+\" anzeigen\");
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:30px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"30px\");
        } else if (iter>xx){
            console.log(iter+\" ausblenden\");
            $(\'div[name=\"erg\'+iter+\'\"]\').hide();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().hide();
        } else {
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:18px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"16px\");
            if (xx==6) $(\'[name=\"questSubmit\"]\').parent().show(); 
        }
    }
        
}
';
<stat>INSERT INTO p26604009_script SET id_question = '49',id_event = '1',script = '$txtchck = sprintf(\'w1f11_1,w1f11_2,w1f11_3,w1f11_4,w1f11_5,w1f11_6,w1f11_7,w1f11_8,w1f11_9,w1f11_10,w1f11_11,w1f11_12,w1f11_opn11\');
$checkvar = getVar($txtchck);
$string = implode(\";<>;\",$checkvar);
saveVar(\"sample_4=\'\".$string.\"\'\");';
<stat>INSERT INTO p26604009_script SET id_question = '115',id_event = '1',script = '
$aktuelleWelle = 2;
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$checkvar = getVar($txtchck);
$string = implode(\";<>;\",$checkvar);
saveVar(\"sample_4=\'\".$string.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '84',id_event = '3',script = 'var quest=\'w1f45\';
if( $(\"#ct_\"+quest+\"_5\").is(\':checked\') || $(\"#ct_\"+quest+\"_6\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_1\").val(\"\");
$(\"#op_\"+quest+\"_3\").val(\"\");
}
if( $(\"#ct_\"+quest+\"_7\").is(\':checked\') || $(\"#ct_\"+quest+\"_8\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_2\").val(\"\");
$(\"#op_\"+quest+\"_4\").val(\"\");
}


$(\"td [id^=tr_\"+quest+\"]\").on(\'click\', function () {
    select($(this).attr(\'id\'));
});
function select(xx) {
    var label=xx.substring(3,8);
    var item=xx.substring(9,10);
    console.log(label+\"-\"+item);
    if (item==1 || item==3) { uncheck(label,5); uncheck(label,6);}
    if (item==2 || item==4) { uncheck(label,7); uncheck(label,8);}
    if (item==5) { uncheck(label,1); uncheck(label,3); uncheck(label,6);}
    if (item==6) { uncheck(label,1); uncheck(label,3); uncheck(label,5);}
    if (item==7) { uncheck(label,2); uncheck(label,4); uncheck(label,8);}
    if (item==8) { uncheck(label,2); uncheck(label,4); uncheck(label,7);}
}
function uncheck(label,item) {
    $(\"#ct_\"+label+\"_\"+item).removeAttr(\'checked\');
    $(\"#img_\"+label+\"_\"+item).attr(\"src\",\"../../webIfesProjects/IFESdesign/checkbox-unchecked.png\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '86',id_event = '3',script = 'if( $(\"#ct_w1f46_3\").is(\':checked\') || $(\"#ct_w1f46_4\").is(\':checked\')) {
console.log(\"OFFESN AUF NULL\");
$(\"#op_w1f46_1\").val(\"\");
$(\"#op_w1f46_2\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '135',id_event = '3',script = 'if( $(\"#ct_w2f19_3\").is(\':checked\') || $(\"#ct_w2f19_4\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_w2f19_1\").val(\"\");
$(\"#op_w2f19_2\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '136',id_event = '3',script = 'if( $(\"#ct_w2f20_2\").is(\':checked\') || $(\"#ct_w2f20_3\").is(\':checked\')) {
console.log(\"OFFESN AUF NULL\");
$(\"#op_w2f20_1\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '235',id_event = '3',script = 'var quest=\'w7f18\';
if( $(\"#ct_\"+quest+\"_5\").is(\':checked\') || $(\"#ct_\"+quest+\"_6\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_1\").val(\"\");
$(\"#op_\"+quest+\"_3\").val(\"\");
}
if( $(\"#ct_\"+quest+\"_7\").is(\':checked\') || $(\"#ct_\"+quest+\"_8\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_2\").val(\"\");
$(\"#op_\"+quest+\"_4\").val(\"\");
}


$(\"td [id^=tr_\"+quest+\"]\").on(\'click\', function () {
    select($(this).attr(\'id\'));
});
function select(xx) {
    var label=xx.substring(3,8);
    var item=xx.substring(9,10);
    console.log(label+\"-\"+item);
    if (item==1 || item==3) { uncheck(label,5); uncheck(label,6);}
    if (item==2 || item==4) { uncheck(label,7); uncheck(label,8);}
    if (item==5) { uncheck(label,1); uncheck(label,3); uncheck(label,6);}
    if (item==6) { uncheck(label,1); uncheck(label,3); uncheck(label,5);}
    if (item==7) { uncheck(label,2); uncheck(label,4); uncheck(label,8);}
    if (item==8) { uncheck(label,2); uncheck(label,4); uncheck(label,7);}
}
function uncheck(label,item) {
    $(\"#ct_\"+label+\"_\"+item).removeAttr(\'checked\');
    $(\"#img_\"+label+\"_\"+item).attr(\"src\",\"../../webIfesProjects/IFESdesign/checkbox-unchecked.png\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '187',id_event = '1',script = '
$aktuelleWelle = 7;
$i_userid = reset(getVar(\"user_id\"));
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");

if (count($i_info) == 1) $intnr = $i_info[0][\"username\"];
else $intnr=99999;
saveVar(\"w\".$aktuelleWelle.\"intnr_1=\'\" . $intnr . \"\'\");

$respid=reset(getVar(\"sample_1\"));
saveVar(\"w\".$aktuelleWelle.\"respid_1=\'\".$respid.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '195',id_event = '1',script = '
$aktuelleWelle = 7;
//echo \"<br><br><br><br><br><br><br>TEST\";
$string= reset(getVar(\"sample_4\"));
$array=explode(\";<>;\",$string);
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$iter=0;
foreach (explode(\",\",$txtchck) as $itemvar) {
       saveVar($itemvar.\"=\'\".$array[$iter].\"\'\");
       $iter++;
}

';
<stat>INSERT INTO p26604009_script SET id_question = '196',id_event = '1',script = '
$aktuelleWelle = 7;
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$checkvar = getVar($txtchck);
$string = implode(\";<>;\",$checkvar);
saveVar(\"sample_4=\'\".$string.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '203',id_event = '1',script = 'saveVar(\"w7i10ww=0\");';
<stat>INSERT INTO p26604009_script SET id_question = '204',id_event = '2',script = '//echo \"<br><br><br><br><br><br><br><pre>\".var_export($_SESSION[\'questionnairePath\'],true);
$w7i10ww = reset(getVar(\"w7i10ww\"));

if ($w7i10ww==1) $ww_complete=1;
else  $ww_complete=2;

echo \'<input id=\"wwcomplete\" type=\"hidden\" name=\"forWordWrap\" value=\"\'.$ww_complete.\'\">\';';
<stat>INSERT INTO p26604009_script SET id_question = '204',id_event = '3',script = '
$( document ).ready(function() {
    //$(\"#tr_w2i10ww_1\").hide();
    $(\"[type=\'radio\']\").parent().parent().hide();
    var ww_complete = $(\'#wwcomplete\').val();
    console.log($(\'#wwcomplete\').val());
    function mycode() {
        console.log(count);
        count=count+1;
          if (count==1) $(\"#wordwrap\").text(\"Auto\");
          if (count==2) $(\"#wordwrap\").text(\"Kuchen\");
          if (count==3) $(\"#wordwrap\").text(\"Kasten\");
          if (count==4) $(\"#wordwrap\").text(\"Bürste\");
          if (count==5) $(\"#wordwrap\").text(\"Schaf\");
          if (count==6) $(\"#wordwrap\").text(\"Vase\");
          if (count==7) $(\"#wordwrap\").text(\"Zirkus\");
          if (count==8) $(\"#wordwrap\").text(\"Hut\");
          if (count==9) $(\"#wordwrap\").text(\"Schild\");
          if (count==10) $(\"#wordwrap\").text(\"Gürtel\");
   
        
        if (count<=10) tid = setTimeout(mycode, 2500); // repeat myself
        else {
        $(\"#wordwrap\").text(\"\");  
        $(\'[name=\"questSubmit\"]\').parent().show();
        $(\'#wwcomplete\').val(1);
        }
    }
    if (ww_complete ==\"2\") {
        $(\'[name=\"questBack\"]\').parent().hide(); 
        $(\'[name=\"questSubmit\"]\').parent().hide(); 
        
        var append1 =\'<tr><td id=\"wordwrap\" style=\"height:40px;text-align:center;vertical-align:middle;width:100%;font-size:xx-large\">Auto</td></tr>\';
        var bas = $(\"#desElementId_32\").find(\"tbody\");
        bas.append(append1);
        
        var count=1;
        var tid = setTimeout(mycode, 2500);
        
    }
});';
<stat>INSERT INTO p26604009_script SET id_question = '162',id_event = '2',script = '$bez=reset(getVar(\"sample_6\"));
$bez_array=explode(\";<>;\",$bez);

$txtchck = sprintf(\'kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6,kondata_7,kondata_8,scb_1,scb_2,scb_3,w1f49_1,w1f49_2,w1f49_3,w1f49_4,w1f49_opn2,w1f49_opn3,w1f49_opn4,w1f50_1,w1f50_2\');
$checkvar = getVar($txtchck);
$allvars = $txtchck;
foreach (explode(\",\",$allvars) as $itemvar) {
       $$itemvar = $checkvar[$itemvar] ;
}

$kondata=
\"Name: \".$kondata_1.\"<br>\".
\"Adresse: \".$kondata_3.\" \".$kondata_4.\", \".$kondata_2.\" \".$kondata_5.\"<br>\".
\"Kommentar: \".$kondata_7.\"<br>\".
\"<br>\".
\"Festnetz-Telefon: \".$scb_1.\"<br>\".
\"Mobil-Telefon: \".$scb_2.\"<br>\".
\"Emailadresse: \".$scb_3.\"<br>\".
\"<br>\";

$text = 
    \"<u>Kontaktdaten Bezugsperson:</u><br>\".
    \"Name: \".$bez_array[0].\"<br>\".
    \"Telefon: \".$bez_array[1].\"<br><br>\".
    \"Guten Tag, mein Name ist … vom Institut für empirische Sozialforschung.<br>\".
    \"Frau / Herr \".$kondata_1.\" hat bis vor einiger Zeit bei einer Gesundheitserhebung mitgemacht, die noch weiterläuft. <br>\".
    \"Für den Fall, dass wir Frau/Herr \".$kondata_1.\" nicht mehr erreichen, hat sie/er uns Ihre Kontaktnummer gegeben, um bei Ihnen nachzufragen.<br>\".
    \"Darf ich Sie kurz fragen, ob Sie wissen, wie es Frau/Herrn \".$kondata_1.\" geht bzw. wo sie/er sich befindet?<br><br>\".
    \"<u>Kontaktdaten Zielperson:</u><br>\".
    $kondata;

setQuestion($text);';
<stat>INSERT INTO p26604009_script SET id_question = '205',id_event = '2',script = 'saveVar(\"w7i10ww=1\");';
<stat>INSERT INTO p26604009_script SET id_question = '205',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '211',id_event = '3',script = '$(document).ready(function() {
   // $(\'div[name=\"erg2\"]\').hide();
   // $(\'span[name=\"erg2\"]\').parent().parent().hide();
   $(\'[name=\"questSubmit\"]\').parent().hide();
   design(1);
});

$($(\'[id^=\"td_w7f16_\"]\')).on(\'click\', function () {
    console.log($(this).attr(\'id\'));
    var name=$(this).attr(\'id\');
    console.log(name.substring(9,10));
    var item=parseInt(name.substring(9,10));
    design(item+1);
});
function design(xx) {
    console.log(xx);
    for ( let iter=1; iter<=5; iter++ ) {
        if(iter==xx) {
            console.log(iter+\" anzeigen\");
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:30px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"30px\");
        } else if (iter>xx){
            console.log(iter+\" ausblenden\");
            $(\'div[name=\"erg\'+iter+\'\"]\').hide();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().hide();
        } else {
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:18px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"16px\");
            if (xx==6) $(\'[name=\"questSubmit\"]\').parent().show(); 
        }
    }
        
}
';
<stat>INSERT INTO p26604009_script SET id_question = '212',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '214',id_event = '3',script = 'if( $(\"#ct_w2f19_3\").is(\':checked\') || $(\"#ct_w2f19_4\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_w2f19_1\").val(\"\");
$(\"#op_w2f19_2\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '215',id_event = '3',script = 'if( $(\"#ct_w2f20_2\").is(\':checked\') || $(\"#ct_w2f20_3\").is(\':checked\')) {
console.log(\"OFFESN AUF NULL\");
$(\"#op_w2f20_1\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '220',id_event = '1',script = '$aktuelleWelle = 2;
saveVar(\"w\".$aktuelleWelle.\"complete=1\");
$status=reset(getVar(\"sample_5\"));
$stat_array=explode(\";\",$status);

saveVar(\"sample_5=\'\".($aktuelleWelle+1).\";\".$stat_array[1].\"\'\");';
<stat>INSERT INTO p26604009_script SET id_question = '222',id_event = '2',script = '//var_dump($_SESSION);
$aktuelleWelle=7;
$txtchck = sprintf(\'sample_1,Projektdaten_1,Projektdaten_3,Projektdaten_4,Projektdaten_5,kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6\');
    $checkvar = getVar($txtchck);
    $allvars = $txtchck;
    foreach (explode(\",\",$allvars) as $itemvar) {
           $$itemvar = $checkvar[$itemvar] ;
    }


$i_userid = reset(getVar(\"user_id\"));
if ($i_userid == 0 ) {$i_userid = 10;}
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");
if (count($i_info) == 1) {$intnr = $i_info[0][\"username\"];}
//else $intnr=\"99999\";
    

$respGeschl = $sample_1;
$projNum = $_SESSION[\'proj_name\'];
$projName  = $Projektdaten_1;
$projTxt  = $projName . \' (\' . $projNum .\')\';


saveVar(\'structureid_1=\'.($_SESSION[\'id_record\']));
saveVar(\'user_id=\'.($_SESSION[\'id_user\']));
saveVar(\'source_2=\'.($_SESSION[\'id_record\']));
saveVar(\'source_1=\"\'.$projTxt.\'\"\');


    echo \'<input id=respGeschl  type=\"hidden\"    name=\"forCorona\" value=\"\'.$respGeschl.\'\">\';
    echo \'<input id=respName    type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_1.\'\">\';
    echo \'<input id=respPLZ     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_2.\'\">\';
    echo \'<input id=respStreet  type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_3.\'\">\';
    echo \'<input id=respHNr     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_4.\'\">\';
    echo \'<input id=respCity    type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_5.\'\">\';
    echo \'<input id=respTel     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_6.\'\">\';
    
    echo \'<input id=listNr      type=\"hidden\"    name=\"forCorona\" value=\"\'.$Projektdaten_4.\'\">\';
    echo \'<input id=lfdNr       type=\"hidden\"    name=\"forCorona\" value=\"\'.$Projektdaten_5.\'\">\'; 
    
    echo \'<input id=projNr      type=\"hidden\"    name=\"forCorona\" value=\"\'.$projNum.\'\">\'; 
    echo \'<input id=intNr       type=\"hidden\"    name=\"forCorona\" value=\"\'.$intnr.\'\">\'; 

';
<stat>INSERT INTO p26604009_script SET id_question = '222',id_event = '3',script = '
</script>

<link rel=\"stylesheet\" href=\"/../webIfesProjects/IchWarDaFormular/datepicker.min.css\">
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/signature_pad.min.js\"></script>
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/datepicker.min.js\"></script>
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/jspdf.min.js\"></script>

<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.0.272/jspdf.debug.js\"></script>

<script type=\"text/javascript\">




function touchHandler(event) {
    var touch = event.changedTouches[0];

    var simulatedEvent = document.createEvent(\"MouseEvent\");
    simulatedEvent.initMouseEvent({
            touchstart: \"mousedown\",
            touchmove: \"mousemove\",
            touchend: \"mouseup\"
        }[event.type], true, true, window, 1,
        touch.screenX, touch.screenY,
        touch.clientX, touch.clientY, false,
        false, false, false, 0, null);

    touch.target.dispatchEvent(simulatedEvent);
   // event.preventDefault();// you can remove preventDefault if it creates problem with other functionalities
}


function init() {
    document.addEventListener(\"touchstart\", touchHandler, true);
    document.addEventListener(\"touchmove\", touchHandler, true);
    document.addEventListener(\"touchend\", touchHandler, true);
    document.addEventListener(\"touchcancel\", touchHandler, true);
}    

init();
  

var canv1 = document.getElementById(\'canvas1\');
var signaturePad1 = new SignaturePad(canv1);
signaturePad1.id = \'sigPad1\';
$(\"canvas1\").append(signaturePad1);

clearButton = document.getElementById(\'clear1\');
clearButton.addEventListener(\'click\', function(event) {
    //console.log(document.getElementsByClassName(\'SignaturePad\'));
    $(\'#wrapper1 canvas\').each(function(idx, item) {
        var context = item.getContext(\"2d\");
        context.clearRect(0, 0, item.width, item.height);
        context.beginPath();        
    });
});



var signaturedialog = document.createElement(\'table\');
signaturedialog.id = \'signaturedialog\';

var canv2 = document.getElementById(\'canvas2\')
var signaturePad2 = new SignaturePad(canv2);
signaturePad2.id= \'sigPad2\';
$(\"canvas2\").append(signaturePad2);


document.body.appendChild(signaturedialog);

popupButton = document.getElementById(\'signpopup\');
popupButton.addEventListener(\'click\', function(event) {
    $(\"#canvas1\").hide();
    $(\"#canvas2\").appendTo(\"#signaturedialog\");

    $(\"#canvas2\").show();  
    $( \"#signaturedialog\" ).dialog({
        \'width\':\'auto\',
        \'title\':\'Bitte unterschreiben Sie hier!\',
            \'buttons\': {
        \'Unterschrift bestätigen\': function(event) {
            $(\"#canvas1\").replaceWith($(\'#canvas2\'));
            $(\"#canvas2\").clone().appendTo(\"#wrapper2\");
           document.getElementById(\'wrapper1\').firstChild.id = \'canvas1\';        
           //console.log(document.getElementById(\'wrapper1\').firstChild);
            
            var canv2 = document.getElementById(\'canvas2\')
            var signaturePad2 = new SignaturePad(canv2);
            signaturePad2.id = \'sigPad2\';
            $(\"canvas2\").append(signaturePad2);
            $(\"#canvas2\").hide();
            $(\"#signaturedialog\").dialog(\'close\');
            
            }
                }
    });
 
    });


//ENTFERNEN WENN FERTIG EINGERICHTET!
function getCookieValue(a) {
   const b = document.cookie.match(\'(^|;)\\\\s*\' + a + \'\\\\s*=\\\\s*([^;]+)\');
   return b ? b.pop() : \'\';
}


//console.log (\"respstreet \" + getCookieValue(\"respstreet\"));
var txtGeschl = \'\';
var respGeschl = document.getElementById(\'respGeschl\').value;
console.log(respGeschl);
if (respGeschl == \'1\') {txtGeschl = \'Herr \';}
if (respGeschl == \'2\') {txtGeschl = \'Frau \';}

document.getElementById(\'resp_adresse\').value=document.getElementById(\"respStreet\").value+ \" \"+document.getElementById(\"respHNr\").value+ \" \"+document.getElementById(\"respPLZ\").value+ \" \"+document.getElementById(\"respCity\").value;
document.getElementById(\'resp_name\').value=txtGeschl+\"\"+document.getElementById(\"respName\").value;
document.getElementById(\'resp_telnr\').value=document.getElementById(\"respTel\").value;

/* NACH EINRICHTEN LÖSCHEN
//console.log(document.cookie);
document.getElementById(\'desElementId_1041\').style.background = \'white\';
document.getElementById(\'desElementId_148\').remove();
document.getElementById(\'desElementId_150\').remove();
//document.getElementById(\'desElementId_153\').remove();
*/


$(\"submitCallStatus\").prop(\"onclick\", null).off(\"click\");

var eventListener = document.getElementById(\'submitCallStatus\');
   eventListener.removeAttribute(\"onclick\");
                                
const picker1 = datepicker(document.querySelector(\'#datum1\'),{startDay: 1});

var today = new Date();
var dd = String(today.getDate()).padStart(2, \'0\');
dd = parseInt(dd);
var mm = String(today.getMonth() + 1).padStart(2, \'0\');
mm = parseInt(mm);
var yyyy = today.getFullYear();

today = dd + \'.\' + mm + \'.\' + yyyy;

document.getElementById(\'datum1\').value = today;

submitAll = document.getElementById(\'submitCallStatus\');



submitAll.addEventListener(\'click\', function(event) {

    var welle = 2;
    var structureId = document.getElementById(\'structureid\').value;
    var respName    = document.getElementById(\'resp_name\').value;
    var respAdresse = document.getElementById(\'resp_adresse\').value;
    var respTelnr   = document.getElementById(\'resp_telnr\').value;
    var respDatum   = document.getElementById(\'datum1\').value;
    var projName    = document.getElementById(\'projNr\').value;
    var intNr      = document.getElementById(\'intNr\').value;

    var listNr      = document.getElementById(\'listNr\').value;
    var lfdNr       = document.getElementById(\'lfdNr\').value;
    var respNameU = respName.split(\" \").join(\"_\");
    var w = window.open(\'about:blank\',\'pdfForm\');
    var c = document.getElementById(\"canvas1\");
    var d = c.toDataURL(\"image/png\"); 
    var htmldoc     = w.document.getElementById(\"htmldoc\");
	var htmltitle   = String(\'CoVid-Formular_\'+projName+\'_\'+listNr+\'_\'+lfdNr+\'_\'+welle+\'_\'+intNr+\'_\'+respNameU+\'_\'+structureId);
    var htmlcontent;
    
        
  $.ajax({
         data: { structureId:structureId,respName:respName,respAdresse:respAdresse,respTelnr:respTelnr,respDatum:respDatum,projName:projName,intNr:intNr},
         type: \"post\",
         url: \"/../webIfesProjects/IchWarDaFormular/updatedata.php\",
         
            success: function(data){

         htmlcontent = \'<style type=\"text/css\" media=\"print\"> @page {size:  auto;margin: 0mm;} html {background-color: #FFFFFF; margin: 0px;} body {border: solid 1px white ; margin: 10mm 15mm 10mm 15mm; } </style><title>\'+htmltitle+\'</title><img src=\"../covid_sticker.PNG\"><style> ul { list-style-type: none; margin: 0; padding: 0; } </style><div style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:32px\">Bitte kontrollieren Sie Ihre eingeblendeten Kontaktdaten und bestätigen Sie die angeführten Angaben mit Ihrer Unterschrift.</div><br><br><p style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:24px;line-height:0%\">Ihre Daten - Angaben zur befragten Person</p><p style=\"font-family:calibri;font-size:18px;\">HINWEIS: Wird ausschließlich für das für Contact Tracing verwendet.</p><br><table style=\"margin-right:auto;margin-left:0px\"><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Name (Vor-, Zuname)</b> </p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respName+\'</u></p></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Adresse</b></p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respAdresse+\'</u></p></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Telefonnummer</b></p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respTelnr+\'</u></p></td></tr></table><p style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:24px;\">Allgemeine Informationen</p><table style=\"font-family:calibri;font-size:18px\"><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich habe das IFES-Schreiben \"Vielen herzlichen Dank für Ihre Unterstützung\" mit den Kontaktdaten des IFES (Adresse, Telefonnummer und E-Mail-Adresse) erhalten.</td></tr><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich bestätige hiermit, dass während der Befragung durch IFES alle gesetzlichen Vorgaben im Rahmen der COVID-19-Sicherheitsmaßnahmen eingehalten wurden.</td></tr><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich habe den Namen und die Interviewer-Nummer der IFES Feld Interviewerin/des IFES Feld Interviewers erhalten.</td></tr></table><table width=\"100%\"><tr><td><img src=\"\'+d+\'\"/></td> <td><br><br><br><br><br><div vertical-align=\"middle\"><p style=\"font-family:calibri;font-size:18px;\"><b>\'+respDatum+\'</b></p></div></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><span style=\"text-decoration:overline\">Unterschrift der befragten Person</span></p></td><td><p style=\"font-family:calibri;font-size:18px\"><span style=\"text-decoration:overline\">Datum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p></td></td></table><br><br><br><div style=\"font-family:calibri;font-size:18px\"><div>IFES Intern:</div><br><div>Projektnummer: \'+projName+\'</div><div>Listennummer: \'+listNr+\'</div><div>Laufnummer: \'+lfdNr+\'</div><div>Welle: \'+welle+\'</div><div>Interviewer-Nummer: \'+intNr+\'</div><div id=\"statustxt\">Status: vom Respondent unterschrieben</div></div>\';
         w.document.write(htmlcontent);
         //w.print(); 
         w.close();
         htmlcontent = htmlcontent + \'<<<|||>>>\' + htmltitle;
         var data = new FormData();
         data.append(\"html\" , htmlcontent);
         data.append(\"projname\" , projName);
         var xhr = new XMLHttpRequest();
         xhr.open( \'POST\', \'/../webIfesProjects/IchWarDaFormular/writeform.php\', true );
         xhr.send(data);
         
            },
            
          failure: function(data){
              alert(\"FEHLER!\");
         },
      });


alert(\"Daten erfasst!\");       
recodeClickEvents(this,3); 
    
});


';
<stat>INSERT INTO p26604009_script SET id_question = '223',id_event = '3',script = '//document.getElementById(\'questBack\').style.visibility=\'hidden\';';
<stat>INSERT INTO p26604009_script SET id_question = '224',id_event = '1',script = '$aktuelleWelle=7;
$formdata   = reset(getVar(\'formdata_1\'));
$checkq     = reset(getVar(\'w\'.$aktuelleWelle.\'checkq\'));
$status1 = \'vom Respondent unterschrieben\';
$status2 = \'Respondent verweigert Unterschrift\';
$status3 = \'Unterschrift technisch nicht möglich\';

if ($checkq == 1) {
    $formdata = str_replace($status2,$status1, $formdata);
    $formdata = str_replace($status3,$status1, $formdata);
}
if ($checkq == 2) {
    $formdata = str_replace($status1,$status2, $formdata);
    $formdata = str_replace($status3,$status2, $formdata);
}
if ($checkq == 3) {
    $formdata = str_replace($status1,$status3, $formdata);
    $formdata = str_replace($status2,$status3, $formdata);
}

saveVar(\"formdata_1=\'\".$formdata.\"\'\");
saveVar(\'w\'.$aktuelleWelle.\'checkdummy=2\');
if (strlen($formdata) > 4000) saveVar(\'w\'.$aktuelleWelle.\'checkdummy=1\');';
<stat>INSERT INTO p26604009_script SET id_question = '228',id_event = '1',script = '$aktuelleWelle =7;

saveVar(\"w\".$aktuelleWelle.\"formdata_1=\'\".reset(getVar(\"formdata_1\")).\"\'\");

$status=0;
//$status=reset(getVar(\"w\".($aktuelleWelle-1).\"danke\"));

if ($status!=1) saveVar(\"w\".$aktuelleWelle.\"complete=2\"); 

$w7complete = reset(getVar(\"w7complete\"));
$methode = reset(getVar(\"sample_2\"));
if ($w7complete==1 && $methode==1)  saveVar(\"w7StatNxtWave=2\");
else if ($w7complete==1 && $methode==2)  saveVar(\"w7StatNxtWave=1\");
else if ($w7complete!=1 && $methode==1)  saveVar(\"w7StatNxtWave=3\");

$txtchck = sprintf(\'w1complete,w2complete,w3complete,w4complete,w5complete,w6complete,w7complete\');
$checkvar = getVar($txtchck);
$allvars = $txtchck;
$missing = 0;
foreach (explode(\",\",$allvars) as $itemvar) {
       if ($checkvar[$itemvar]==2) $missing++;
}
$status=reset(getVar(\"sample_5\"));
$stat_array=explode(\";\",$status);
saveVar(\"sample_5=\'\".$stat_array[0].\";\".$missing.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '229',id_event = '1',script = '$Armband=reset(getVar(\"Armband\"));
if (!($armband>=1)) {
    $akz=reset(getVar(\"sample_8\"));
    $akz=explode(\";\",$akz);
    if($akz[2]==1) saveVar(\"Armband=3\");
    if($akz[2]==9) saveVar(\"Armband=4\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '228',id_event = '2',script = '
$aktuelleWelle = 7;
$savedstatus=reset(getVar(\"w\".$aktuelleWelle.\"StatNxtWave\"));

$txtchck = sprintf(\'kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6,kondata_7,kondata_8,sample_7\');
$checkvar = getVar($txtchck);
$allvars = $txtchck;
foreach (explode(\",\",$allvars) as $itemvar) {
       $$itemvar = $checkvar[$itemvar] ;
}
$scb=explode(\";<>;\",$sample_7);
$kondata=
\"Name: \".$kondata_1.\"<br>\".
\"Adresse: \".$kondata_3.\" \".$kondata_4.\", \".$kondata_2.\" \".$kondata_5.\"<br>\".
\"Kommentar: \".$kondata_7.\"<br>\".
\"<br>\".
\"Festnetz-Telefon: \".$scb[0].\"<br>\".
\"Mobil-Telefon: \".$scb[1].\"<br>\".
\"Emailadresse: \".$scb[2].\"<br>\".
\"<br>\";

if($savedstatus==1) {
    $text =\"Vielen Dank, dass war das letzte Telefonat zu dieser Studie für heuer. Hoffentlich hören wir uns spätestens in 12 Monaten wieder.\";
}
else if($savedstatus==2) {
    $text =\"Vielen Dank, dass war der letzte Besuch zu dieser Studie für heuer. Hoffentlich sehen wir uns spätestens in 12 Monaten wieder.\";
} else if ($savedstatus==3) {
    $text=\"Die Erhebung ist beendet!<br>\".
    \"<br>Machen Sie sich einen Termin zur Rückholung des Uhr aus. Sollte es Ihnen nicht möglich sein, den Haushalt zu erreichen kontaktieren Sie IFES<br><br>\".
    $kondata.\"<br>\".
    \"<br>\";
} 
setQuestion($text);

';
<stat>INSERT INTO p26604009_script SET id_question = '141',id_event = '1',script = '$aktuelleWelle = 2;
$akz=reset(getVar(\"sample_8\"));
$akz=explode(\";\",$akz);
//Datumskontrolle fehlt


$date = $akz[1];
$date = new DateTime($date);   
$date0 = new DateTime();  
$interval = date_diff($date, $date0);
$interval = $interval->format(\'%a\');   

if ($akz[2]==1 && $interval>=42) {
    saveVar(\"w\".$aktuelleWelle.\"ft_3=1\");
    $akz[2]=2;
    $akz=implode(\";\",$akz);
    saveVar(\"sample_8=\'\".$akz.\"\'\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '193',id_event = '1',script = '$aktuelleWelle = 7;
$akz=reset(getVar(\"sample_8\"));
$akz=explode(\";\",$akz);
//Datumskontrolle fehlt

$date = $akz[1];
$date = new DateTime($date);   
$date0 = new DateTime();  

$interval = date_diff($datetime1, $datetime2);
$interval = $interval->format(\'%a\');   
if ($akz[2]==1 && $interval>=42) {
    saveVar(\"w\".$aktuelleWelle.\"ft_3=1\");
    $akz[2]=2;
    $akz=implode(\";\",$akz);
    saveVar(\"sample_8=\'\".$akz.\"\'\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '232',id_event = '3',script = 'if( $(\"#ct_w2f18a_3\").is(\':checked\') || $(\"#ct_w2f18a_4\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_w2f18a_1\").val(\"\");
$(\"#op_w2f18a_2\").val(\"\");
}
if( $(\"#ct_w2f18b_3\").is(\':checked\') || $(\"#ct_w2f18b_4\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_w2f18b_1\").val(\"\");
$(\"#op_w2f18b_2\").val(\"\");
}

$(\"td [id^=tr_w2f18]\").on(\'click\', function () {
    select($(this).attr(\'id\'));
});
function select(xx) {
    var label=xx.substring(3,9);
    var item=xx.substring(10,11);
    console.log(label+\"-\"+item);
    if (item==1 || item==2) { uncheck(label,3); uncheck(label,4);}
    if (item==3) { uncheck(label,1); uncheck(label,2); uncheck(label,4);}
    if (item==4) { uncheck(label,1); uncheck(label,2); uncheck(label,3);}
}
function uncheck(label,item) {
    $(\"#ct_\"+label+\"_\"+item).removeAttr(\'checked\');
    $(\"#img_\"+label+\"_\"+item).attr(\"src\",\"../../webIfesProjects/IFESdesign/checkbox-unchecked.png\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '234',id_event = '3',script = 'var quest=\'w2f18\';
if( $(\"#ct_\"+quest+\"_5\").is(\':checked\') || $(\"#ct_\"+quest+\"_6\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_1\").val(\"\");
$(\"#op_\"+quest+\"_3\").val(\"\");
}
if( $(\"#ct_\"+quest+\"_7\").is(\':checked\') || $(\"#ct_\"+quest+\"_8\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_2\").val(\"\");
$(\"#op_\"+quest+\"_4\").val(\"\");
}


$(\"td [id^=tr_\"+quest+\"]\").on(\'click\', function () {
    select($(this).attr(\'id\'));
});
function select(xx) {
    var label=xx.substring(3,8);
    var item=xx.substring(9,10);
    console.log(label+\"-\"+item);
    if (item==1 || item==3) { uncheck(label,5); uncheck(label,6);}
    if (item==2 || item==4) { uncheck(label,7); uncheck(label,8);}
    if (item==5) { uncheck(label,1); uncheck(label,3); uncheck(label,6);}
    if (item==6) { uncheck(label,1); uncheck(label,3); uncheck(label,5);}
    if (item==7) { uncheck(label,2); uncheck(label,4); uncheck(label,8);}
    if (item==8) { uncheck(label,2); uncheck(label,4); uncheck(label,7);}
}
function uncheck(label,item) {
    $(\"#ct_\"+label+\"_\"+item).removeAttr(\'checked\');
    $(\"#img_\"+label+\"_\"+item).attr(\"src\",\"../../webIfesProjects/IFESdesign/checkbox-unchecked.png\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '236',id_event = '1',script = '//echo \"<br><br><br><br><br><br><br><pre>\".var_export($_SESSION,true).\"</pre>\";
$aktuelleWelle = 3;
$i_userid = reset(getVar(\"user_id\"));
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");

if (count($i_info) == 1) $intnr = $i_info[0][\"username\"];
else $intnr=99999;
saveVar(\"w\".$aktuelleWelle.\"intnr_1=\'\" . $intnr . \"\'\");

$respid=reset(getVar(\"sample_1\"));
saveVar(\"w\".$aktuelleWelle.\"respid_1=\'\".$respid.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '242',id_event = '1',script = '$aktuelleWelle = 3;
$akz=reset(getVar(\"sample_8\"));
$akz=explode(\";\",$akz);
//Datumskontrolle fehlt


$date = $akz[1];
$date = new DateTime($date);   
$date0 = new DateTime();  
$interval = date_diff($date, $date0);
$interval = $interval->format(\'%a\');   

if ($akz[2]==1 && $interval>=42) {
    saveVar(\"w\".$aktuelleWelle.\"ft_3=1\");
    $akz[2]=2;
    $akz=implode(\";\",$akz);
    saveVar(\"sample_8=\'\".$akz.\"\'\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '244',id_event = '1',script = '
$aktuelleWelle = 3;
//echo \"<br><br><br><br><br><br><br>TEST\";
$string= reset(getVar(\"sample_4\"));
$array=explode(\";<>;\",$string);
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$iter=0;
foreach (explode(\",\",$txtchck) as $itemvar) {
       saveVar($itemvar.\"=\'\".$array[$iter].\"\'\");
       $iter++;
}

';
<stat>INSERT INTO p26604009_script SET id_question = '245',id_event = '1',script = '
$aktuelleWelle = 3;
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$checkvar = getVar($txtchck);
$string = implode(\";<>;\",$checkvar);
saveVar(\"sample_4=\'\".$string.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '252',id_event = '1',script = '$aktuelleWelle = 3;
saveVar(\'w\'.$aktuelleWelle.\'i10ww=0\');';
<stat>INSERT INTO p26604009_script SET id_question = '253',id_event = '2',script = '//echo \"<br><br><br><br><br><br><br><pre>\".var_export($_SESSION[\'questionnairePath\'],true);
$aktuelleWelle = 3;
$i10ww = reset(getVar(\"w\'.$aktuelleWelle.\'i10ww\"));

if ($i10ww==1) $ww_complete=1;
else  $ww_complete=2;

echo \'<input id=\"wwcomplete\" type=\"hidden\" name=\"forWordWrap\" value=\"\'.$ww_complete.\'\">\';';
<stat>INSERT INTO p26604009_script SET id_question = '253',id_event = '3',script = '
$( document ).ready(function() {
    //$(\"#tr_w2i10ww_1\").hide();
    $(\"[type=\'radio\']\").parent().parent().hide();
    var ww_complete = $(\'#wwcomplete\').val();
    console.log($(\'#wwcomplete\').val());
    function mycode() {
        console.log(count);
        count=count+1;
          if (count==1) $(\"#wordwrap\").text(\"Himmel\");
          if (count==2) $(\"#wordwrap\").text(\"Ozean\");
          if (count==3) $(\"#wordwrap\").text(\"Fahne\");
          if (count==4) $(\"#wordwrap\").text(\"Dollar\");
          if (count==5) $(\"#wordwrap\").text(\"Frau\");
          if (count==6) $(\"#wordwrap\").text(\"Maschine\");
          if (count==7) $(\"#wordwrap\").text(\"Zuhause\");
          if (count==8) $(\"#wordwrap\").text(\"Erde\");
          if (count==9) $(\"#wordwrap\").text(\"Schule\");
          if (count==10) $(\"#wordwrap\").text(\"Butter\");

        if (count<=10) tid = setTimeout(mycode, 2500); // repeat myself
        else {
        $(\"#wordwrap\").text(\"\");  
        $(\'[name=\"questSubmit\"]\').parent().show();
        $(\'#wwcomplete\').val(1);
        }
    }
    if (ww_complete ==\"2\") {
        $(\'[name=\"questBack\"]\').parent().hide(); 
        $(\'[name=\"questSubmit\"]\').parent().hide(); 
        
        var append1 =\'<tr><td id=\"wordwrap\" style=\"height:40px;text-align:center;vertical-align:middle;width:100%;font-size:xx-large\">Himmel</td></tr>\';
        var bas = $(\"#desElementId_32\").find(\"tbody\");
        bas.append(append1);
        
        var count=1;
        var tid = setTimeout(mycode, 2500);
        
    }
});';
<stat>INSERT INTO p26604009_script SET id_question = '254',id_event = '2',script = '$aktuelleWelle = 3;
saveVar(\'w\'.$aktuelleWelle.\'i10ww=1\');';
<stat>INSERT INTO p26604009_script SET id_question = '254',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '260',id_event = '3',script = '$(document).ready(function() {
   // $(\'div[name=\"erg2\"]\').hide();
   // $(\'span[name=\"erg2\"]\').parent().parent().hide();
   $(\'[name=\"questSubmit\"]\').parent().hide();
   design(1);
});

$($(\'[id^=\"td_w3f16_\"]\')).on(\'click\', function () {
    console.log($(this).attr(\'id\'));
    var name=$(this).attr(\'id\');
    console.log(name.substring(9,10));
    var item=parseInt(name.substring(9,10));
    design(item+1);
});
function design(xx) {
    console.log(xx);
    for ( let iter=1; iter<=5; iter++ ) {
        if(iter==xx) {
            console.log(iter+\" anzeigen\");
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:30px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"30px\");
        } else if (iter>xx){
            console.log(iter+\" ausblenden\");
            $(\'div[name=\"erg\'+iter+\'\"]\').hide();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().hide();
        } else {
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:18px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"16px\");
            if (xx==6) $(\'[name=\"questSubmit\"]\').parent().show(); 
        }
    }
        
}
';
<stat>INSERT INTO p26604009_script SET id_question = '261',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '263',id_event = '3',script = 'var quest=\'w3f18\';
if( $(\"#ct_\"+quest+\"_5\").is(\':checked\') || $(\"#ct_\"+quest+\"_6\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_1\").val(\"\");
$(\"#op_\"+quest+\"_3\").val(\"\");
}
if( $(\"#ct_\"+quest+\"_7\").is(\':checked\') || $(\"#ct_\"+quest+\"_8\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_2\").val(\"\");
$(\"#op_\"+quest+\"_4\").val(\"\");
}


$(\"td [id^=tr_\"+quest+\"]\").on(\'click\', function () {
    select($(this).attr(\'id\'));
});
function select(xx) {
    var label=xx.substring(3,8);
    var item=xx.substring(9,10);
    console.log(label+\"-\"+item);
    if (item==1 || item==3) { uncheck(label,5); uncheck(label,6);}
    if (item==2 || item==4) { uncheck(label,7); uncheck(label,8);}
    if (item==5) { uncheck(label,1); uncheck(label,3); uncheck(label,6);}
    if (item==6) { uncheck(label,1); uncheck(label,3); uncheck(label,5);}
    if (item==7) { uncheck(label,2); uncheck(label,4); uncheck(label,8);}
    if (item==8) { uncheck(label,2); uncheck(label,4); uncheck(label,7);}
}
function uncheck(label,item) {
    $(\"#ct_\"+label+\"_\"+item).removeAttr(\'checked\');
    $(\"#img_\"+label+\"_\"+item).attr(\"src\",\"../../webIfesProjects/IFESdesign/checkbox-unchecked.png\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '264',id_event = '3',script = 'if( $(\"#ct_w3f19_3\").is(\':checked\') || $(\"#ct_w3f19_4\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_w3f19_1\").val(\"\");
$(\"#op_w3f19_2\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '265',id_event = '3',script = 'if( $(\"#ct_w2f20_2\").is(\':checked\') || $(\"#ct_w2f20_3\").is(\':checked\')) {
console.log(\"OFFESN AUF NULL\");
$(\"#op_w2f20_1\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '270',id_event = '1',script = '$aktuelleWelle = 3;
saveVar(\"w\".$aktuelleWelle.\"complete=1\");
$status=reset(getVar(\"sample_5\"));
$stat_array=explode(\";\",$status);

saveVar(\"sample_5=\'\".($aktuelleWelle+1).\";\".$stat_array[1].\"\'\");';
<stat>INSERT INTO p26604009_script SET id_question = '272',id_event = '2',script = '//var_dump($_SESSION);
$aktuelleWelle=3;
$txtchck = sprintf(\'sample_1,Projektdaten_1,Projektdaten_3,Projektdaten_4,Projektdaten_5,kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6\');
    $checkvar = getVar($txtchck);
    $allvars = $txtchck;
    foreach (explode(\",\",$allvars) as $itemvar) {
           $$itemvar = $checkvar[$itemvar] ;
    }


$i_userid = reset(getVar(\"user_id\"));
if ($i_userid == 0 ) {$i_userid = 10;}
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");
if (count($i_info) == 1) {$intnr = $i_info[0][\"username\"];}
//else $intnr=\"99999\";
    

$respGeschl = $sample_1;
$projNum = $_SESSION[\'proj_name\'];
$projName  = $Projektdaten_1;
$projTxt  = $projName . \' (\' . $projNum .\')\';


saveVar(\'structureid_1=\'.($_SESSION[\'id_record\']));
saveVar(\'user_id=\'.($_SESSION[\'id_user\']));
saveVar(\'source_2=\'.($_SESSION[\'id_record\']));
saveVar(\'source_1=\"\'.$projTxt.\'\"\');


    echo \'<input id=respGeschl  type=\"hidden\"    name=\"forCorona\" value=\"\'.$respGeschl.\'\">\';
    echo \'<input id=respName    type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_1.\'\">\';
    echo \'<input id=respPLZ     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_2.\'\">\';
    echo \'<input id=respStreet  type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_3.\'\">\';
    echo \'<input id=respHNr     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_4.\'\">\';
    echo \'<input id=respCity    type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_5.\'\">\';
    echo \'<input id=respTel     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_6.\'\">\';
    
    echo \'<input id=listNr      type=\"hidden\"    name=\"forCorona\" value=\"\'.$Projektdaten_4.\'\">\';
    echo \'<input id=lfdNr       type=\"hidden\"    name=\"forCorona\" value=\"\'.$Projektdaten_5.\'\">\'; 
    
    echo \'<input id=projNr      type=\"hidden\"    name=\"forCorona\" value=\"\'.$projNum.\'\">\'; 
    echo \'<input id=intNr       type=\"hidden\"    name=\"forCorona\" value=\"\'.$intnr.\'\">\'; 

';
<stat>INSERT INTO p26604009_script SET id_question = '272',id_event = '3',script = '
</script>

<link rel=\"stylesheet\" href=\"/../webIfesProjects/IchWarDaFormular/datepicker.min.css\">
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/signature_pad.min.js\"></script>
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/datepicker.min.js\"></script>
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/jspdf.min.js\"></script>

<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.0.272/jspdf.debug.js\"></script>

<script type=\"text/javascript\">




function touchHandler(event) {
    var touch = event.changedTouches[0];

    var simulatedEvent = document.createEvent(\"MouseEvent\");
    simulatedEvent.initMouseEvent({
            touchstart: \"mousedown\",
            touchmove: \"mousemove\",
            touchend: \"mouseup\"
        }[event.type], true, true, window, 1,
        touch.screenX, touch.screenY,
        touch.clientX, touch.clientY, false,
        false, false, false, 0, null);

    touch.target.dispatchEvent(simulatedEvent);
   // event.preventDefault();// you can remove preventDefault if it creates problem with other functionalities
}


function init() {
    document.addEventListener(\"touchstart\", touchHandler, true);
    document.addEventListener(\"touchmove\", touchHandler, true);
    document.addEventListener(\"touchend\", touchHandler, true);
    document.addEventListener(\"touchcancel\", touchHandler, true);
}    

init();
  

var canv1 = document.getElementById(\'canvas1\');
var signaturePad1 = new SignaturePad(canv1);
signaturePad1.id = \'sigPad1\';
$(\"canvas1\").append(signaturePad1);

clearButton = document.getElementById(\'clear1\');
clearButton.addEventListener(\'click\', function(event) {
    //console.log(document.getElementsByClassName(\'SignaturePad\'));
    $(\'#wrapper1 canvas\').each(function(idx, item) {
        var context = item.getContext(\"2d\");
        context.clearRect(0, 0, item.width, item.height);
        context.beginPath();        
    });
});



var signaturedialog = document.createElement(\'table\');
signaturedialog.id = \'signaturedialog\';

var canv2 = document.getElementById(\'canvas2\')
var signaturePad2 = new SignaturePad(canv2);
signaturePad2.id= \'sigPad2\';
$(\"canvas2\").append(signaturePad2);


document.body.appendChild(signaturedialog);

popupButton = document.getElementById(\'signpopup\');
popupButton.addEventListener(\'click\', function(event) {
    $(\"#canvas1\").hide();
    $(\"#canvas2\").appendTo(\"#signaturedialog\");

    $(\"#canvas2\").show();  
    $( \"#signaturedialog\" ).dialog({
        \'width\':\'auto\',
        \'title\':\'Bitte unterschreiben Sie hier!\',
            \'buttons\': {
        \'Unterschrift bestätigen\': function(event) {
            $(\"#canvas1\").replaceWith($(\'#canvas2\'));
            $(\"#canvas2\").clone().appendTo(\"#wrapper2\");
           document.getElementById(\'wrapper1\').firstChild.id = \'canvas1\';        
           //console.log(document.getElementById(\'wrapper1\').firstChild);
            
            var canv2 = document.getElementById(\'canvas2\')
            var signaturePad2 = new SignaturePad(canv2);
            signaturePad2.id = \'sigPad2\';
            $(\"canvas2\").append(signaturePad2);
            $(\"#canvas2\").hide();
            $(\"#signaturedialog\").dialog(\'close\');
            
            }
                }
    });
 
    });


//ENTFERNEN WENN FERTIG EINGERICHTET!
function getCookieValue(a) {
   const b = document.cookie.match(\'(^|;)\\\\s*\' + a + \'\\\\s*=\\\\s*([^;]+)\');
   return b ? b.pop() : \'\';
}


//console.log (\"respstreet \" + getCookieValue(\"respstreet\"));
var txtGeschl = \'\';
var respGeschl = document.getElementById(\'respGeschl\').value;
console.log(respGeschl);
if (respGeschl == \'1\') {txtGeschl = \'Herr \';}
if (respGeschl == \'2\') {txtGeschl = \'Frau \';}

document.getElementById(\'resp_adresse\').value=document.getElementById(\"respStreet\").value+ \" \"+document.getElementById(\"respHNr\").value+ \" \"+document.getElementById(\"respPLZ\").value+ \" \"+document.getElementById(\"respCity\").value;
document.getElementById(\'resp_name\').value=txtGeschl+\"\"+document.getElementById(\"respName\").value;
document.getElementById(\'resp_telnr\').value=document.getElementById(\"respTel\").value;

/* NACH EINRICHTEN LÖSCHEN
//console.log(document.cookie);
document.getElementById(\'desElementId_1041\').style.background = \'white\';
document.getElementById(\'desElementId_148\').remove();
document.getElementById(\'desElementId_150\').remove();
//document.getElementById(\'desElementId_153\').remove();
*/


$(\"submitCallStatus\").prop(\"onclick\", null).off(\"click\");

var eventListener = document.getElementById(\'submitCallStatus\');
   eventListener.removeAttribute(\"onclick\");
                                
const picker1 = datepicker(document.querySelector(\'#datum1\'),{startDay: 1});

var today = new Date();
var dd = String(today.getDate()).padStart(2, \'0\');
dd = parseInt(dd);
var mm = String(today.getMonth() + 1).padStart(2, \'0\');
mm = parseInt(mm);
var yyyy = today.getFullYear();

today = dd + \'.\' + mm + \'.\' + yyyy;

document.getElementById(\'datum1\').value = today;

submitAll = document.getElementById(\'submitCallStatus\');



submitAll.addEventListener(\'click\', function(event) {

    var welle = 2;
    var structureId = document.getElementById(\'structureid\').value;
    var respName    = document.getElementById(\'resp_name\').value;
    var respAdresse = document.getElementById(\'resp_adresse\').value;
    var respTelnr   = document.getElementById(\'resp_telnr\').value;
    var respDatum   = document.getElementById(\'datum1\').value;
    var projName    = document.getElementById(\'projNr\').value;
    var intNr      = document.getElementById(\'intNr\').value;

    var listNr      = document.getElementById(\'listNr\').value;
    var lfdNr       = document.getElementById(\'lfdNr\').value;
    var respNameU = respName.split(\" \").join(\"_\");
    var w = window.open(\'about:blank\',\'pdfForm\');
    var c = document.getElementById(\"canvas1\");
    var d = c.toDataURL(\"image/png\"); 
    var htmldoc     = w.document.getElementById(\"htmldoc\");
	var htmltitle   = String(\'CoVid-Formular_\'+projName+\'_\'+listNr+\'_\'+lfdNr+\'_\'+welle+\'_\'+intNr+\'_\'+respNameU+\'_\'+structureId);
    var htmlcontent;
    
        
  $.ajax({
         data: { structureId:structureId,respName:respName,respAdresse:respAdresse,respTelnr:respTelnr,respDatum:respDatum,projName:projName,intNr:intNr},
         type: \"post\",
         url: \"/../webIfesProjects/IchWarDaFormular/updatedata.php\",
         
            success: function(data){

         htmlcontent = \'<style type=\"text/css\" media=\"print\"> @page {size:  auto;margin: 0mm;} html {background-color: #FFFFFF; margin: 0px;} body {border: solid 1px white ; margin: 10mm 15mm 10mm 15mm; } </style><title>\'+htmltitle+\'</title><img src=\"../covid_sticker.PNG\"><style> ul { list-style-type: none; margin: 0; padding: 0; } </style><div style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:32px\">Bitte kontrollieren Sie Ihre eingeblendeten Kontaktdaten und bestätigen Sie die angeführten Angaben mit Ihrer Unterschrift.</div><br><br><p style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:24px;line-height:0%\">Ihre Daten - Angaben zur befragten Person</p><p style=\"font-family:calibri;font-size:18px;\">HINWEIS: Wird ausschließlich für das für Contact Tracing verwendet.</p><br><table style=\"margin-right:auto;margin-left:0px\"><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Name (Vor-, Zuname)</b> </p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respName+\'</u></p></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Adresse</b></p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respAdresse+\'</u></p></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Telefonnummer</b></p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respTelnr+\'</u></p></td></tr></table><p style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:24px;\">Allgemeine Informationen</p><table style=\"font-family:calibri;font-size:18px\"><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich habe das IFES-Schreiben \"Vielen herzlichen Dank für Ihre Unterstützung\" mit den Kontaktdaten des IFES (Adresse, Telefonnummer und E-Mail-Adresse) erhalten.</td></tr><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich bestätige hiermit, dass während der Befragung durch IFES alle gesetzlichen Vorgaben im Rahmen der COVID-19-Sicherheitsmaßnahmen eingehalten wurden.</td></tr><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich habe den Namen und die Interviewer-Nummer der IFES Feld Interviewerin/des IFES Feld Interviewers erhalten.</td></tr></table><table width=\"100%\"><tr><td><img src=\"\'+d+\'\"/></td> <td><br><br><br><br><br><div vertical-align=\"middle\"><p style=\"font-family:calibri;font-size:18px;\"><b>\'+respDatum+\'</b></p></div></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><span style=\"text-decoration:overline\">Unterschrift der befragten Person</span></p></td><td><p style=\"font-family:calibri;font-size:18px\"><span style=\"text-decoration:overline\">Datum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p></td></td></table><br><br><br><div style=\"font-family:calibri;font-size:18px\"><div>IFES Intern:</div><br><div>Projektnummer: \'+projName+\'</div><div>Listennummer: \'+listNr+\'</div><div>Laufnummer: \'+lfdNr+\'</div><div>Welle: \'+welle+\'</div><div>Interviewer-Nummer: \'+intNr+\'</div><div id=\"statustxt\">Status: vom Respondent unterschrieben</div></div>\';
         w.document.write(htmlcontent);
         //w.print(); 
         w.close();
         htmlcontent = htmlcontent + \'<<<|||>>>\' + htmltitle;
         var data = new FormData();
         data.append(\"html\" , htmlcontent);
         data.append(\"projname\" , projName);
         var xhr = new XMLHttpRequest();
         xhr.open( \'POST\', \'/../webIfesProjects/IchWarDaFormular/writeform.php\', true );
         xhr.send(data);
         
            },
            
          failure: function(data){
              alert(\"FEHLER!\");
         },
      });


alert(\"Daten erfasst!\");       
recodeClickEvents(this,3); 
    
});


';
<stat>INSERT INTO p26604009_script SET id_question = '273',id_event = '3',script = '//document.getElementById(\'questBack\').style.visibility=\'hidden\';';
<stat>INSERT INTO p26604009_script SET id_question = '274',id_event = '1',script = '$aktuelleWelle=3;
$formdata   = reset(getVar(\'formdata_1\'));
$checkq     = reset(getVar(\'w\'.$aktuelleWelle.\'checkq\'));
$status1 = \'vom Respondent unterschrieben\';
$status2 = \'Respondent verweigert Unterschrift\';
$status3 = \'Unterschrift technisch nicht möglich\';

if ($checkq == 1) {
    $formdata = str_replace($status2,$status1, $formdata);
    $formdata = str_replace($status3,$status1, $formdata);
}
if ($checkq == 2) {
    $formdata = str_replace($status1,$status2, $formdata);
    $formdata = str_replace($status3,$status2, $formdata);
}
if ($checkq == 3) {
    $formdata = str_replace($status1,$status3, $formdata);
    $formdata = str_replace($status2,$status3, $formdata);
}

saveVar(\"formdata_1=\'\".$formdata.\"\'\");
saveVar(\'w\'.$aktuelleWelle.\'checkdummy=2\');
if (strlen($formdata) > 4000) saveVar(\'w\'.$aktuelleWelle.\'checkdummy=1\');';
<stat>INSERT INTO p26604009_script SET id_question = '278',id_event = '1',script = '
$aktuelleWelle = 3;

$statusnxt=reset(getVar(\"w\".($aktuelleWelle+1).\"complete\"));
$savedstatus=reset(getVar(\"w\".$aktuelleWelle.\"StatNxtWave\"));
$complete = reset(getVar(\"w\".$aktuelleWelle.\"complete\"));
define(\'C_DATE_FORMAT\', \'d.m.Y\');
if ($complete==1) {
    $date = reset(getVar(\"w\".$aktuelleWelle.\"tmende\"));
    $datetime = strtotime($date);
    $date = date(\"d.m.Y\", $datetime);

} else {
   $date = reset(getVar(\"timeslotstart_\".($aktuelleWelle)));
   $date = new DateTime($date);   
   $date->add(new DateInterval(\'P7D\'));
   $date = $date->format(C_DATE_FORMAT);
   echo \"<br>\".$date;
}
$date0 = new DateTime();

//Datum setzen
$date1 = new DateTime($date);
$date1->add(new DateInterval(\'P7D\'));
$date2 = new DateTime($date);
$date2->add(new DateInterval(\'P21D\'));

saveVar(\"timeslotstart_\".($aktuelleWelle+1).\"=\'\".$date1->format(C_DATE_FORMAT).\"\'\");
saveVar(\"timeslotende_\".($aktuelleWelle+1).\"=\'\".$date2->format(C_DATE_FORMAT).\"\'\");


if($date0<$date1) {
    if (!($statusnxt==1 || $statusnxt==2) && $savedstatus<=1) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=1\");
} else if ($date0<$date2 || $statusnxt==1) {
    if (!($statusnxt==1 || $statusnxt==2) && $savedstatus<=2) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=2\");
} else {
    if (!($statusnxt==1 || $statusnxt==2)) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=3\");
}

';
<stat>INSERT INTO p26604009_script SET id_question = '278',id_event = '2',script = '$methode = reset(getVar(\"sample_2\"));
if ($methode==1) $methodetxt= \"persönliche\"; else $methodetxt= \"telefonische\";

$aktuelleWelle = 3;
$savedstatus=reset(getVar(\"w\".$aktuelleWelle.\"StatNxtWave\"));

$nxtwavestart=reset(getVar(\"timeslotstart_\".($aktuelleWelle+1).\"\"));
$nxtwaveende=reset(getVar(\"timeslotende_\".($aktuelleWelle+1).\"\"));
define(\'C_DATE_FORMAT\', \'d.m.Y\');
$nxtwavestart=reset(getVar(\"timeslotstart_\".($aktuelleWelle+1).\"\"));
$nxtwaveende=reset(getVar(\"timeslotende_\".($aktuelleWelle+1).\"\"));
$nxtwavebest = new DateTime($nxtwavestart);
$nxtwavebeststart=$nxtwavebest->add(new DateInterval(\'P7D\'))->format(C_DATE_FORMAT);

$txtchck = sprintf(\'kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6,kondata_7,kondata_8,sample_7,w\'.$aktuelleWelle.\'f23_1,w\'.$aktuelleWelle.\'f23_2,w\'.$aktuelleWelle.\'f23_3,w\'.$aktuelleWelle.\'f23_4,w\'.$aktuelleWelle.\'f23_opn2,w\'.$aktuelleWelle.\'f23_opn3,w\'.$aktuelleWelle.\'f23_opn4,w\'.$aktuelleWelle.\'f24_1,w\'.$aktuelleWelle.\'f24_2\');
$checkvar = getVar($txtchck);
$allvars = $txtchck;
foreach (explode(\",\",$allvars) as $itemvar) {
       $$itemvar = $checkvar[$itemvar] ;
}
$scb=explode(\";<>;\",$sample_7);
$kondata=
\"Name: \".$kondata_1.\"<br>\".
\"Adresse: \".$kondata_3.\" \".$kondata_4.\", \".$kondata_2.\" \".$kondata_5.\"<br>\".
\"Kommentar: \".$kondata_7.\"<br>\".
\"<br>\".
\"Festnetz-Telefon: \".$scb[0].\"<br>\".
\"Mobil-Telefon: \".$scb[1].\"<br>\".
\"Emailadresse: \".$scb[2].\"<br>\".
\"<br>\";
$erreichbarkeit=\"\";
if($w2f23_1==1) $erreichbarkeit = \"Nächsten Wochen erreichbar (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$ww2f24_2.\"-)\";
if($w2f23_2==2) $erreichbarkeit = \"Nächsten Wochen im Urlaub/Ausland (\".$w2f23_opn2.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";
if($w2f23_3==3) $erreichbarkeit = \"Nächsten Wochen im Krankenhaus (\".$w2f23_opn3.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";
if($w2f23_4==4) $erreichbarkeit = \"Nächsten Wochen abwesend (\".$w2f23_opn4.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";

if($savedstatus==1) {
    $text =\"Die nächste <u>\".$methodetxt.\"</u> Befragung soll zwischen dem \".$nxtwavebeststart.\" und \".$nxtwaveende.\" stattfinden.<br>\".
    \"(Die Durchführung ist bereits ab dem  \".$nxtwavestart.\" möglich.)<br>\".
    \"<br>\".
    \"Vereinbaren Sie am besten gleich einen Termin. Bestätigen Sie den Termin mindesten einen Tag vorher!<br>\".
    \"<br>\".
    $kondata.
    $erreichbarkeit.\"<br>\".
    \"<br>\".
    \"Unterbrechen Sie das Interview mit \\\"make appointment\\\".\";
} else if ($savedstatus==2) {
    $text=\"Sie können jetzt (bis \".$nxtwaveende.\") mit der nächsten <u>(\".$methodetxt.\"n)</u> Welle fortfahren! Bestätigen Sie den Termin mindesten einen Tag vorher!<br>\".
    \"<br>\".
    $kondata.
    $erreichbarkeit.\"<br>\".
    \"<br>\";
} else {
    $text=\"Das Zeitfenster für diese Welle (\".$nxtwavestart.\" bis \".$nxtwaveende.\") ist bereits abgelaufen. Wenn möglich fahren Sie mit der nächsten Welle fort!\".
    \"<br>\";
}

if(reset(getVar(\"auscomplete\"))==1) {
    $bez=reset(getVar(\"sample_6\"));
    $bez_array=explode(\";<>;\",$bez);

    $txtchck = sprintf(\'sample_6,austmende,ausf1,ausf2_1,ausf2_2,ausf3,ausf3_opn,ausf4_1\');
    $checkvar = getVar($txtchck);
    $allvars = $txtchck;
    foreach (explode(\",\",$allvars) as $itemvar) {
           $$itemvar = $checkvar[$itemvar] ;
    }
    $text.= \"Auskunft der Bezugsperson (\".$bez_array[0].\") vom \".$austmende.\"):<br>\".
    \"Status bzw. Aufenthalt:\" .getAnswerText2(\"ausf1\",$ausf1).\"<br>\";
    if($ausf3==1)  $text .= \"retour ab: \".$ausf3_opn.\"<br>\";
    else if ($ausf3==2 || $ausf3==3)  $text .= \"retour ab: \".getAnswerText2(\"ausf3\",$ausf3).\"<br>\";
    $text .=    \"sonstige Infromationen: \".$ausf4_1;
}

setQuestion($text);

';
<stat>INSERT INTO p26604009_script SET id_question = '279',id_event = '1',script = '//echo \"<br><br><br><br><br><br><br><pre>\".var_export($_SESSION,true).\"</pre>\";
$aktuelleWelle = 2;
$i_userid = reset(getVar(\"user_id\"));
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");

if (count($i_info) == 1) $intnr = $i_info[0][\"username\"];
else $intnr=99999;
saveVar(\"w\".$aktuelleWelle.\"intnr_1=\'\" . $intnr . \"\'\");

$respid=reset(getVar(\"sample_1\"));
saveVar(\"w\".$aktuelleWelle.\"respid_1=\'\".$respid.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '285',id_event = '1',script = '$aktuelleWelle = 2;
$akz=reset(getVar(\"sample_8\"));
$akz=explode(\";\",$akz);
//Datumskontrolle fehlt


$date = $akz[1];
$date = new DateTime($date);   
$date0 = new DateTime();  
$interval = date_diff($date, $date0);
$interval = $interval->format(\'%a\');   

if ($akz[2]==1 && $interval>=42) {
    saveVar(\"w\".$aktuelleWelle.\"ft_3=1\");
    $akz[2]=2;
    $akz=implode(\";\",$akz);
    saveVar(\"sample_8=\'\".$akz.\"\'\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '287',id_event = '1',script = '
$aktuelleWelle = 2;
//echo \"<br><br><br><br><br><br><br>TEST\";
$string= reset(getVar(\"sample_4\"));
$array=explode(\";<>;\",$string);
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$iter=0;
foreach (explode(\",\",$txtchck) as $itemvar) {
       saveVar($itemvar.\"=\'\".$array[$iter].\"\'\");
       $iter++;
}

';
<stat>INSERT INTO p26604009_script SET id_question = '288',id_event = '1',script = '
$aktuelleWelle = 2;
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$checkvar = getVar($txtchck);
$string = implode(\";<>;\",$checkvar);
saveVar(\"sample_4=\'\".$string.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '295',id_event = '1',script = '$aktuelleWelle = 2;
saveVar(\'w\'.$aktuelleWelle.\'i10ww=0\');';
<stat>INSERT INTO p26604009_script SET id_question = '296',id_event = '2',script = '//echo \"<br><br><br><br><br><br><br><pre>\".var_export($_SESSION[\'questionnairePath\'],true);
$aktuelleWelle = 2;
$i10ww = reset(getVar(\"w\'.$aktuelleWelle.\'i10ww\"));

if ($i10ww==1) $ww_complete=1;
else  $ww_complete=2;

echo \'<input id=\"wwcomplete\" type=\"hidden\" name=\"forWordWrap\" value=\"\'.$ww_complete.\'\">\';';
<stat>INSERT INTO p26604009_script SET id_question = '296',id_event = '3',script = '
$( document ).ready(function() {
    //$(\"#tr_w2i10ww_1\").hide();
    $(\"[type=\'radio\']\").parent().parent().hide();
    var ww_complete = $(\'#wwcomplete\').val();
    console.log($(\'#wwcomplete\').val());
    function mycode() {
        console.log(count);
        count=count+1;
          if (count==1) $(\"#wordwrap\").text(\"Butter\");
          if (count==2) $(\"#wordwrap\").text(\"Arm\");
          if (count==3) $(\"#wordwrap\").text(\"Brief\");
          if (count==4) $(\"#wordwrap\").text(\"Königin\");
          if (count==5) $(\"#wordwrap\").text(\"Karte\");
          if (count==6) $(\"#wordwrap\").text(\"Graz\");
          if (count==7) $(\"#wordwrap\").text(\"Ecke\");
          if (count==8) $(\"#wordwrap\").text(\"Stein\");
          if (count==9) $(\"#wordwrap\").text(\"Buch\");
          if (count==10) $(\"#wordwrap\").text(\"Stock\");
   
        
        if (count<=10) tid = setTimeout(mycode, 2500); // repeat myself
        else {
        $(\"#wordwrap\").text(\"\");  
        $(\'[name=\"questSubmit\"]\').parent().show();
        $(\'#wwcomplete\').val(1);
        }
    }
    if (ww_complete ==\"2\") {
        $(\'[name=\"questBack\"]\').parent().hide(); 
        $(\'[name=\"questSubmit\"]\').parent().hide(); 
        
        var append1 =\'<tr><td id=\"wordwrap\" style=\"height:40px;text-align:center;vertical-align:middle;width:100%;font-size:xx-large\">Butter</td></tr>\';
        var bas = $(\"#desElementId_32\").find(\"tbody\");
        bas.append(append1);
        
        var count=1;
        var tid = setTimeout(mycode, 2500);
        
    }
});';
<stat>INSERT INTO p26604009_script SET id_question = '297',id_event = '2',script = '$aktuelleWelle = 2;
saveVar(\'w\'.$aktuelleWelle.\'i10ww=1\');';
<stat>INSERT INTO p26604009_script SET id_question = '297',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '303',id_event = '3',script = '$(document).ready(function() {
   // $(\'div[name=\"erg2\"]\').hide();
   // $(\'span[name=\"erg2\"]\').parent().parent().hide();
   $(\'[name=\"questSubmit\"]\').parent().hide();
   design(1);
});

$($(\'[id^=\"td_w2f16_\"]\')).on(\'click\', function () {
    console.log($(this).attr(\'id\'));
    var name=$(this).attr(\'id\');
    console.log(name.substring(9,10));
    var item=parseInt(name.substring(9,10));
    design(item+1);
});
function design(xx) {
    console.log(xx);
    for ( let iter=1; iter<=5; iter++ ) {
        if(iter==xx) {
            console.log(iter+\" anzeigen\");
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:30px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"30px\");
        } else if (iter>xx){
            console.log(iter+\" ausblenden\");
            $(\'div[name=\"erg\'+iter+\'\"]\').hide();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().hide();
        } else {
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:18px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"16px\");
            if (xx==6) $(\'[name=\"questSubmit\"]\').parent().show(); 
        }
    }
        
}
';
<stat>INSERT INTO p26604009_script SET id_question = '304',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '306',id_event = '3',script = 'var quest=\'w2f18\';
if( $(\"#ct_\"+quest+\"_5\").is(\':checked\') || $(\"#ct_\"+quest+\"_6\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_1\").val(\"\");
$(\"#op_\"+quest+\"_3\").val(\"\");
}
if( $(\"#ct_\"+quest+\"_7\").is(\':checked\') || $(\"#ct_\"+quest+\"_8\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_2\").val(\"\");
$(\"#op_\"+quest+\"_4\").val(\"\");
}


$(\"td [id^=tr_\"+quest+\"]\").on(\'click\', function () {
    select($(this).attr(\'id\'));
});
function select(xx) {
    var label=xx.substring(3,8);
    var item=xx.substring(9,10);
    console.log(label+\"-\"+item);
    if (item==1 || item==3) { uncheck(label,5); uncheck(label,6);}
    if (item==2 || item==4) { uncheck(label,7); uncheck(label,8);}
    if (item==5) { uncheck(label,1); uncheck(label,3); uncheck(label,6);}
    if (item==6) { uncheck(label,1); uncheck(label,3); uncheck(label,5);}
    if (item==7) { uncheck(label,2); uncheck(label,4); uncheck(label,8);}
    if (item==8) { uncheck(label,2); uncheck(label,4); uncheck(label,7);}
}
function uncheck(label,item) {
    $(\"#ct_\"+label+\"_\"+item).removeAttr(\'checked\');
    $(\"#img_\"+label+\"_\"+item).attr(\"src\",\"../../webIfesProjects/IFESdesign/checkbox-unchecked.png\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '307',id_event = '3',script = 'if( $(\"#ct_w2f19_3\").is(\':checked\') || $(\"#ct_w2f19_4\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_w2f19_1\").val(\"\");
$(\"#op_w2f19_2\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '308',id_event = '3',script = 'if( $(\"#ct_w2f20_2\").is(\':checked\') || $(\"#ct_w2f20_3\").is(\':checked\')) {
console.log(\"OFFESN AUF NULL\");
$(\"#op_w2f20_1\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '312',id_event = '1',script = '//echo \"<br><br><br><br><br><br><br><pre>\".var_export($_SESSION,true).\"</pre>\";
$aktuelleWelle = 4;
$i_userid = reset(getVar(\"user_id\"));
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");

if (count($i_info) == 1) $intnr = $i_info[0][\"username\"];
else $intnr=99999;
saveVar(\"w\".$aktuelleWelle.\"intnr_1=\'\" . $intnr . \"\'\");

$respid=reset(getVar(\"sample_1\"));
saveVar(\"w\".$aktuelleWelle.\"respid_1=\'\".$respid.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '318',id_event = '1',script = '$aktuelleWelle = 4;
$akz=reset(getVar(\"sample_8\"));
$akz=explode(\";\",$akz);
//Datumskontrolle fehlt


$date = $akz[1];
$date = new DateTime($date);   
$date0 = new DateTime();  
$interval = date_diff($date, $date0);
$interval = $interval->format(\'%a\');   

if ($akz[2]==1 && $interval>=42) {
    saveVar(\"w\".$aktuelleWelle.\"ft_3=1\");
    $akz[2]=2;
    $akz=implode(\";\",$akz);
    saveVar(\"sample_8=\'\".$akz.\"\'\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '320',id_event = '1',script = '
$aktuelleWelle = 4;
//echo \"<br><br><br><br><br><br><br>TEST\";
$string= reset(getVar(\"sample_4\"));
$array=explode(\";<>;\",$string);
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$iter=0;
foreach (explode(\",\",$txtchck) as $itemvar) {
       saveVar($itemvar.\"=\'\".$array[$iter].\"\'\");
       $iter++;
}

';
<stat>INSERT INTO p26604009_script SET id_question = '321',id_event = '1',script = '
$aktuelleWelle = 4;
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$checkvar = getVar($txtchck);
$string = implode(\";<>;\",$checkvar);
saveVar(\"sample_4=\'\".$string.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '328',id_event = '1',script = '$aktuelleWelle = 4;
saveVar(\'w\'.$aktuelleWelle.\'i10ww=0\');';
<stat>INSERT INTO p26604009_script SET id_question = '329',id_event = '2',script = '//echo \"<br><br><br><br><br><br><br><pre>\".var_export($_SESSION[\'questionnairePath\'],true);
$aktuelleWelle = 4;
$i10ww = reset(getVar(\"w\'.$aktuelleWelle.\'i10ww\"));

if ($i10ww==1) $ww_complete=1;
else  $ww_complete=2;

echo \'<input id=\"wwcomplete\" type=\"hidden\" name=\"forWordWrap\" value=\"\'.$ww_complete.\'\">\';';
<stat>INSERT INTO p26604009_script SET id_question = '329',id_event = '3',script = '
$( document ).ready(function() {
    //$(\"#tr_w2i10ww_1\").hide();
    $(\"[type=\'radio\']\").parent().parent().hide();
    var ww_complete = $(\'#wwcomplete\').val();
    console.log($(\'#wwcomplete\').val());
    function mycode() {
        console.log(count);
        count=count+1;
          if (count==1) $(\"#wordwrap\").text(\"Frau\");
          if (count==2) $(\"#wordwrap\").text(\"Stein\");
          if (count==3) $(\"#wordwrap\").text(\"Blut\");
          if (count==4) $(\"#wordwrap\").text(\"Ecke\");
          if (count==5) $(\"#wordwrap\").text(\"Schuhe\");
          if (count==6) $(\"#wordwrap\").text(\"Brief\");
          if (count==7) $(\"#wordwrap\").text(\"Mädchen\");
          if (count==8) $(\"#wordwrap\").text(\"Haus\");
          if (count==9) $(\"#wordwrap\").text(\"Tal\");
          if (count==10) $(\"#wordwrap\").text(\"Motor\");

        if (count<=10) tid = setTimeout(mycode, 2500); // repeat myself
        else {
        $(\"#wordwrap\").text(\"\");  
        $(\'[name=\"questSubmit\"]\').parent().show();
        $(\'#wwcomplete\').val(1);
        }
    }
    if (ww_complete ==\"2\") {
        $(\'[name=\"questBack\"]\').parent().hide(); 
        $(\'[name=\"questSubmit\"]\').parent().hide(); 
        
        var append1 =\'<tr><td id=\"wordwrap\" style=\"height:40px;text-align:center;vertical-align:middle;width:100%;font-size:xx-large\">Frau</td></tr>\';
        var bas = $(\"#desElementId_32\").find(\"tbody\");
        bas.append(append1);
        
        var count=1;
        var tid = setTimeout(mycode, 2500);
        
    }
});';
<stat>INSERT INTO p26604009_script SET id_question = '330',id_event = '2',script = '$aktuelleWelle = 4;
saveVar(\'w\'.$aktuelleWelle.\'i10ww=1\');';
<stat>INSERT INTO p26604009_script SET id_question = '330',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '336',id_event = '3',script = '$(document).ready(function() {
   // $(\'div[name=\"erg2\"]\').hide();
   // $(\'span[name=\"erg2\"]\').parent().parent().hide();
   $(\'[name=\"questSubmit\"]\').parent().hide();
   design(1);
});

$($(\'[id^=\"td_w4f16_\"]\')).on(\'click\', function () {
    console.log($(this).attr(\'id\'));
    var name=$(this).attr(\'id\');
    console.log(name.substring(9,10));
    var item=parseInt(name.substring(9,10));
    design(item+1);
});
function design(xx) {
    console.log(xx);
    for ( let iter=1; iter<=5; iter++ ) {
        if(iter==xx) {
            console.log(iter+\" anzeigen\");
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:30px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"30px\");
        } else if (iter>xx){
            console.log(iter+\" ausblenden\");
            $(\'div[name=\"erg\'+iter+\'\"]\').hide();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().hide();
        } else {
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:18px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"16px\");
            if (xx==6) $(\'[name=\"questSubmit\"]\').parent().show(); 
        }
    }
        
}
';
<stat>INSERT INTO p26604009_script SET id_question = '337',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '339',id_event = '3',script = 'var quest=\'w4f18\';
if( $(\"#ct_\"+quest+\"_5\").is(\':checked\') || $(\"#ct_\"+quest+\"_6\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_1\").val(\"\");
$(\"#op_\"+quest+\"_3\").val(\"\");
}
if( $(\"#ct_\"+quest+\"_7\").is(\':checked\') || $(\"#ct_\"+quest+\"_8\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_2\").val(\"\");
$(\"#op_\"+quest+\"_4\").val(\"\");
}


$(\"td [id^=tr_\"+quest+\"]\").on(\'click\', function () {
    select($(this).attr(\'id\'));
});
function select(xx) {
    var label=xx.substring(3,8);
    var item=xx.substring(9,10);
    console.log(label+\"-\"+item);
    if (item==1 || item==3) { uncheck(label,5); uncheck(label,6);}
    if (item==2 || item==4) { uncheck(label,7); uncheck(label,8);}
    if (item==5) { uncheck(label,1); uncheck(label,3); uncheck(label,6);}
    if (item==6) { uncheck(label,1); uncheck(label,3); uncheck(label,5);}
    if (item==7) { uncheck(label,2); uncheck(label,4); uncheck(label,8);}
    if (item==8) { uncheck(label,2); uncheck(label,4); uncheck(label,7);}
}
function uncheck(label,item) {
    $(\"#ct_\"+label+\"_\"+item).removeAttr(\'checked\');
    $(\"#img_\"+label+\"_\"+item).attr(\"src\",\"../../webIfesProjects/IFESdesign/checkbox-unchecked.png\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '340',id_event = '3',script = 'if( $(\"#ct_w4f19_3\").is(\':checked\') || $(\"#ct_w4f19_4\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_w4f19_1\").val(\"\");
$(\"#op_w4f19_2\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '341',id_event = '3',script = 'if( $(\"#ct_w4f20_2\").is(\':checked\') || $(\"#ct_w4f20_3\").is(\':checked\')) {
console.log(\"OFFESN AUF NULL\");
$(\"#op_w4f20_1\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '346',id_event = '1',script = '$aktuelleWelle = 4;
saveVar(\"w\".$aktuelleWelle.\"complete=1\");
$status=reset(getVar(\"sample_5\"));
$stat_array=explode(\";\",$status);

saveVar(\"sample_5=\'\".($aktuelleWelle+1).\";\".$stat_array[1].\"\'\");';
<stat>INSERT INTO p26604009_script SET id_question = '348',id_event = '2',script = '//var_dump($_SESSION);
$aktuelleWelle=4;
$txtchck = sprintf(\'sample_1,Projektdaten_1,Projektdaten_3,Projektdaten_4,Projektdaten_5,kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6\');
    $checkvar = getVar($txtchck);
    $allvars = $txtchck;
    foreach (explode(\",\",$allvars) as $itemvar) {
           $$itemvar = $checkvar[$itemvar] ;
    }


$i_userid = reset(getVar(\"user_id\"));
if ($i_userid == 0 ) {$i_userid = 10;}
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");
if (count($i_info) == 1) {$intnr = $i_info[0][\"username\"];}
//else $intnr=\"99999\";
    

$respGeschl = $sample_1;
$projNum = $_SESSION[\'proj_name\'];
$projName  = $Projektdaten_1;
$projTxt  = $projName . \' (\' . $projNum .\')\';


saveVar(\'structureid_1=\'.($_SESSION[\'id_record\']));
saveVar(\'user_id=\'.($_SESSION[\'id_user\']));
saveVar(\'source_2=\'.($_SESSION[\'id_record\']));
saveVar(\'source_1=\"\'.$projTxt.\'\"\');


    echo \'<input id=respGeschl  type=\"hidden\"    name=\"forCorona\" value=\"\'.$respGeschl.\'\">\';
    echo \'<input id=respName    type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_1.\'\">\';
    echo \'<input id=respPLZ     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_2.\'\">\';
    echo \'<input id=respStreet  type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_3.\'\">\';
    echo \'<input id=respHNr     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_4.\'\">\';
    echo \'<input id=respCity    type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_5.\'\">\';
    echo \'<input id=respTel     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_6.\'\">\';
    
    echo \'<input id=listNr      type=\"hidden\"    name=\"forCorona\" value=\"\'.$Projektdaten_4.\'\">\';
    echo \'<input id=lfdNr       type=\"hidden\"    name=\"forCorona\" value=\"\'.$Projektdaten_5.\'\">\'; 
    
    echo \'<input id=projNr      type=\"hidden\"    name=\"forCorona\" value=\"\'.$projNum.\'\">\'; 
    echo \'<input id=intNr       type=\"hidden\"    name=\"forCorona\" value=\"\'.$intnr.\'\">\'; 

';
<stat>INSERT INTO p26604009_script SET id_question = '348',id_event = '3',script = '
</script>

<link rel=\"stylesheet\" href=\"/../webIfesProjects/IchWarDaFormular/datepicker.min.css\">
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/signature_pad.min.js\"></script>
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/datepicker.min.js\"></script>
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/jspdf.min.js\"></script>

<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.0.272/jspdf.debug.js\"></script>

<script type=\"text/javascript\">




function touchHandler(event) {
    var touch = event.changedTouches[0];

    var simulatedEvent = document.createEvent(\"MouseEvent\");
    simulatedEvent.initMouseEvent({
            touchstart: \"mousedown\",
            touchmove: \"mousemove\",
            touchend: \"mouseup\"
        }[event.type], true, true, window, 1,
        touch.screenX, touch.screenY,
        touch.clientX, touch.clientY, false,
        false, false, false, 0, null);

    touch.target.dispatchEvent(simulatedEvent);
   // event.preventDefault();// you can remove preventDefault if it creates problem with other functionalities
}


function init() {
    document.addEventListener(\"touchstart\", touchHandler, true);
    document.addEventListener(\"touchmove\", touchHandler, true);
    document.addEventListener(\"touchend\", touchHandler, true);
    document.addEventListener(\"touchcancel\", touchHandler, true);
}    

init();
  

var canv1 = document.getElementById(\'canvas1\');
var signaturePad1 = new SignaturePad(canv1);
signaturePad1.id = \'sigPad1\';
$(\"canvas1\").append(signaturePad1);

clearButton = document.getElementById(\'clear1\');
clearButton.addEventListener(\'click\', function(event) {
    //console.log(document.getElementsByClassName(\'SignaturePad\'));
    $(\'#wrapper1 canvas\').each(function(idx, item) {
        var context = item.getContext(\"2d\");
        context.clearRect(0, 0, item.width, item.height);
        context.beginPath();        
    });
});



var signaturedialog = document.createElement(\'table\');
signaturedialog.id = \'signaturedialog\';

var canv2 = document.getElementById(\'canvas2\')
var signaturePad2 = new SignaturePad(canv2);
signaturePad2.id= \'sigPad2\';
$(\"canvas2\").append(signaturePad2);


document.body.appendChild(signaturedialog);

popupButton = document.getElementById(\'signpopup\');
popupButton.addEventListener(\'click\', function(event) {
    $(\"#canvas1\").hide();
    $(\"#canvas2\").appendTo(\"#signaturedialog\");

    $(\"#canvas2\").show();  
    $( \"#signaturedialog\" ).dialog({
        \'width\':\'auto\',
        \'title\':\'Bitte unterschreiben Sie hier!\',
            \'buttons\': {
        \'Unterschrift bestätigen\': function(event) {
            $(\"#canvas1\").replaceWith($(\'#canvas2\'));
            $(\"#canvas2\").clone().appendTo(\"#wrapper2\");
           document.getElementById(\'wrapper1\').firstChild.id = \'canvas1\';        
           //console.log(document.getElementById(\'wrapper1\').firstChild);
            
            var canv2 = document.getElementById(\'canvas2\')
            var signaturePad2 = new SignaturePad(canv2);
            signaturePad2.id = \'sigPad2\';
            $(\"canvas2\").append(signaturePad2);
            $(\"#canvas2\").hide();
            $(\"#signaturedialog\").dialog(\'close\');
            
            }
                }
    });
 
    });


//ENTFERNEN WENN FERTIG EINGERICHTET!
function getCookieValue(a) {
   const b = document.cookie.match(\'(^|;)\\\\s*\' + a + \'\\\\s*=\\\\s*([^;]+)\');
   return b ? b.pop() : \'\';
}


//console.log (\"respstreet \" + getCookieValue(\"respstreet\"));
var txtGeschl = \'\';
var respGeschl = document.getElementById(\'respGeschl\').value;
console.log(respGeschl);
if (respGeschl == \'1\') {txtGeschl = \'Herr \';}
if (respGeschl == \'2\') {txtGeschl = \'Frau \';}

document.getElementById(\'resp_adresse\').value=document.getElementById(\"respStreet\").value+ \" \"+document.getElementById(\"respHNr\").value+ \" \"+document.getElementById(\"respPLZ\").value+ \" \"+document.getElementById(\"respCity\").value;
document.getElementById(\'resp_name\').value=txtGeschl+\"\"+document.getElementById(\"respName\").value;
document.getElementById(\'resp_telnr\').value=document.getElementById(\"respTel\").value;

/* NACH EINRICHTEN LÖSCHEN
//console.log(document.cookie);
document.getElementById(\'desElementId_1041\').style.background = \'white\';
document.getElementById(\'desElementId_148\').remove();
document.getElementById(\'desElementId_150\').remove();
//document.getElementById(\'desElementId_153\').remove();
*/


$(\"submitCallStatus\").prop(\"onclick\", null).off(\"click\");

var eventListener = document.getElementById(\'submitCallStatus\');
   eventListener.removeAttribute(\"onclick\");
                                
const picker1 = datepicker(document.querySelector(\'#datum1\'),{startDay: 1});

var today = new Date();
var dd = String(today.getDate()).padStart(2, \'0\');
dd = parseInt(dd);
var mm = String(today.getMonth() + 1).padStart(2, \'0\');
mm = parseInt(mm);
var yyyy = today.getFullYear();

today = dd + \'.\' + mm + \'.\' + yyyy;

document.getElementById(\'datum1\').value = today;

submitAll = document.getElementById(\'submitCallStatus\');



submitAll.addEventListener(\'click\', function(event) {

    var welle = 2;
    var structureId = document.getElementById(\'structureid\').value;
    var respName    = document.getElementById(\'resp_name\').value;
    var respAdresse = document.getElementById(\'resp_adresse\').value;
    var respTelnr   = document.getElementById(\'resp_telnr\').value;
    var respDatum   = document.getElementById(\'datum1\').value;
    var projName    = document.getElementById(\'projNr\').value;
    var intNr      = document.getElementById(\'intNr\').value;

    var listNr      = document.getElementById(\'listNr\').value;
    var lfdNr       = document.getElementById(\'lfdNr\').value;
    var respNameU = respName.split(\" \").join(\"_\");
    var w = window.open(\'about:blank\',\'pdfForm\');
    var c = document.getElementById(\"canvas1\");
    var d = c.toDataURL(\"image/png\"); 
    var htmldoc     = w.document.getElementById(\"htmldoc\");
	var htmltitle   = String(\'CoVid-Formular_\'+projName+\'_\'+listNr+\'_\'+lfdNr+\'_\'+welle+\'_\'+intNr+\'_\'+respNameU+\'_\'+structureId);
    var htmlcontent;
    
        
  $.ajax({
         data: { structureId:structureId,respName:respName,respAdresse:respAdresse,respTelnr:respTelnr,respDatum:respDatum,projName:projName,intNr:intNr},
         type: \"post\",
         url: \"/../webIfesProjects/IchWarDaFormular/updatedata.php\",
         
            success: function(data){

         htmlcontent = \'<style type=\"text/css\" media=\"print\"> @page {size:  auto;margin: 0mm;} html {background-color: #FFFFFF; margin: 0px;} body {border: solid 1px white ; margin: 10mm 15mm 10mm 15mm; } </style><title>\'+htmltitle+\'</title><img src=\"../covid_sticker.PNG\"><style> ul { list-style-type: none; margin: 0; padding: 0; } </style><div style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:32px\">Bitte kontrollieren Sie Ihre eingeblendeten Kontaktdaten und bestätigen Sie die angeführten Angaben mit Ihrer Unterschrift.</div><br><br><p style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:24px;line-height:0%\">Ihre Daten - Angaben zur befragten Person</p><p style=\"font-family:calibri;font-size:18px;\">HINWEIS: Wird ausschließlich für das für Contact Tracing verwendet.</p><br><table style=\"margin-right:auto;margin-left:0px\"><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Name (Vor-, Zuname)</b> </p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respName+\'</u></p></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Adresse</b></p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respAdresse+\'</u></p></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Telefonnummer</b></p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respTelnr+\'</u></p></td></tr></table><p style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:24px;\">Allgemeine Informationen</p><table style=\"font-family:calibri;font-size:18px\"><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich habe das IFES-Schreiben \"Vielen herzlichen Dank für Ihre Unterstützung\" mit den Kontaktdaten des IFES (Adresse, Telefonnummer und E-Mail-Adresse) erhalten.</td></tr><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich bestätige hiermit, dass während der Befragung durch IFES alle gesetzlichen Vorgaben im Rahmen der COVID-19-Sicherheitsmaßnahmen eingehalten wurden.</td></tr><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich habe den Namen und die Interviewer-Nummer der IFES Feld Interviewerin/des IFES Feld Interviewers erhalten.</td></tr></table><table width=\"100%\"><tr><td><img src=\"\'+d+\'\"/></td> <td><br><br><br><br><br><div vertical-align=\"middle\"><p style=\"font-family:calibri;font-size:18px;\"><b>\'+respDatum+\'</b></p></div></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><span style=\"text-decoration:overline\">Unterschrift der befragten Person</span></p></td><td><p style=\"font-family:calibri;font-size:18px\"><span style=\"text-decoration:overline\">Datum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p></td></td></table><br><br><br><div style=\"font-family:calibri;font-size:18px\"><div>IFES Intern:</div><br><div>Projektnummer: \'+projName+\'</div><div>Listennummer: \'+listNr+\'</div><div>Laufnummer: \'+lfdNr+\'</div><div>Welle: \'+welle+\'</div><div>Interviewer-Nummer: \'+intNr+\'</div><div id=\"statustxt\">Status: vom Respondent unterschrieben</div></div>\';
         w.document.write(htmlcontent);
         //w.print(); 
         w.close();
         htmlcontent = htmlcontent + \'<<<|||>>>\' + htmltitle;
         var data = new FormData();
         data.append(\"html\" , htmlcontent);
         data.append(\"projname\" , projName);
         var xhr = new XMLHttpRequest();
         xhr.open( \'POST\', \'/../webIfesProjects/IchWarDaFormular/writeform.php\', true );
         xhr.send(data);
         
            },
            
          failure: function(data){
              alert(\"FEHLER!\");
         },
      });


alert(\"Daten erfasst!\");       
recodeClickEvents(this,3); 
    
});


';
<stat>INSERT INTO p26604009_script SET id_question = '349',id_event = '3',script = '//document.getElementById(\'questBack\').style.visibility=\'hidden\';';
<stat>INSERT INTO p26604009_script SET id_question = '350',id_event = '1',script = '$aktuelleWelle=4;
$formdata   = reset(getVar(\'formdata_1\'));
$checkq     = reset(getVar(\'w\'.$aktuelleWelle.\'checkq\'));
$status1 = \'vom Respondent unterschrieben\';
$status2 = \'Respondent verweigert Unterschrift\';
$status3 = \'Unterschrift technisch nicht möglich\';

if ($checkq == 1) {
    $formdata = str_replace($status2,$status1, $formdata);
    $formdata = str_replace($status3,$status1, $formdata);
}
if ($checkq == 2) {
    $formdata = str_replace($status1,$status2, $formdata);
    $formdata = str_replace($status3,$status2, $formdata);
}
if ($checkq == 3) {
    $formdata = str_replace($status1,$status3, $formdata);
    $formdata = str_replace($status2,$status3, $formdata);
}

saveVar(\"formdata_1=\'\".$formdata.\"\'\");
saveVar(\'w\'.$aktuelleWelle.\'checkdummy=2\');
if (strlen($formdata) > 4000) saveVar(\'w\'.$aktuelleWelle.\'checkdummy=1\');';
<stat>INSERT INTO p26604009_script SET id_question = '354',id_event = '1',script = '
$aktuelleWelle = 4;

$statusnxt=reset(getVar(\"w\".($aktuelleWelle+1).\"complete\"));
$savedstatus=reset(getVar(\"w\".$aktuelleWelle.\"StatNxtWave\"));
$complete = reset(getVar(\"w\".$aktuelleWelle.\"complete\"));
define(\'C_DATE_FORMAT\', \'d.m.Y\');
if ($complete==1) {
    $date = reset(getVar(\"w\".$aktuelleWelle.\"tmende\"));
    $datetime = strtotime($date);
    $date = date(\"d.m.Y\", $datetime);

} else {
   $date = reset(getVar(\"timeslotstart_\".($aktuelleWelle)));
   $date = new DateTime($date);   
   $date->add(new DateInterval(\'P7D\'));
   $date = $date->format(C_DATE_FORMAT);
   echo \"<br>\".$date;
}
$date0 = new DateTime();

//Datum setzen
$date1 = new DateTime($date);
$date1->add(new DateInterval(\'P7D\'));
$date2 = new DateTime($date);
$date2->add(new DateInterval(\'P21D\'));

saveVar(\"timeslotstart_\".($aktuelleWelle+1).\"=\'\".$date1->format(C_DATE_FORMAT).\"\'\");
saveVar(\"timeslotende_\".($aktuelleWelle+1).\"=\'\".$date2->format(C_DATE_FORMAT).\"\'\");


if($date0<$date1) {
    if (!($statusnxt==1 || $statusnxt==2) && $savedstatus<=1) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=1\");
} else if ($date0<$date2 || $statusnxt==1) {
    if (!($statusnxt==1 || $statusnxt==2) && $savedstatus<=2) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=2\");
} else {
    if (!($statusnxt==1 || $statusnxt==2)) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=3\");
}

';
<stat>INSERT INTO p26604009_script SET id_question = '354',id_event = '2',script = '$methode = reset(getVar(\"sample_2\"));
if ($methode==1) $methodetxt= \"persönliche\"; else $methodetxt= \"telefonische\";

$aktuelleWelle = 4;
$savedstatus=reset(getVar(\"w\".$aktuelleWelle.\"StatNxtWave\"));

$nxtwavestart=reset(getVar(\"timeslotstart_\".($aktuelleWelle+1).\"\"));
$nxtwaveende=reset(getVar(\"timeslotende_\".($aktuelleWelle+1).\"\"));
define(\'C_DATE_FORMAT\', \'d.m.Y\');
$nxtwavestart=reset(getVar(\"timeslotstart_\".($aktuelleWelle+1).\"\"));
$nxtwaveende=reset(getVar(\"timeslotende_\".($aktuelleWelle+1).\"\"));
$nxtwavebest = new DateTime($nxtwavestart);
$nxtwavebeststart=$nxtwavebest->add(new DateInterval(\'P7D\'))->format(C_DATE_FORMAT);

$txtchck = sprintf(\'kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6,kondata_7,kondata_8,sample_7,w\'.$aktuelleWelle.\'f23_1,w\'.$aktuelleWelle.\'f23_2,w\'.$aktuelleWelle.\'f23_3,w\'.$aktuelleWelle.\'f23_4,w\'.$aktuelleWelle.\'f23_opn2,w\'.$aktuelleWelle.\'f23_opn3,w\'.$aktuelleWelle.\'f23_opn4,w\'.$aktuelleWelle.\'f24_1,w\'.$aktuelleWelle.\'f24_2\');
$checkvar = getVar($txtchck);
$allvars = $txtchck;
foreach (explode(\",\",$allvars) as $itemvar) {
       $$itemvar = $checkvar[$itemvar] ;
}
$scb=explode(\";<>;\",$sample_7);
$kondata=
\"Name: \".$kondata_1.\"<br>\".
\"Adresse: \".$kondata_3.\" \".$kondata_4.\", \".$kondata_2.\" \".$kondata_5.\"<br>\".
\"Kommentar: \".$kondata_7.\"<br>\".
\"<br>\".
\"Festnetz-Telefon: \".$scb[0].\"<br>\".
\"Mobil-Telefon: \".$scb[1].\"<br>\".
\"Emailadresse: \".$scb[2].\"<br>\".
\"<br>\";
$erreichbarkeit=\"\";
if($w2f23_1==1) $erreichbarkeit = \"Nächsten Wochen erreichbar (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$ww2f24_2.\"-)\";
if($w2f23_2==2) $erreichbarkeit = \"Nächsten Wochen im Urlaub/Ausland (\".$w2f23_opn2.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";
if($w2f23_3==3) $erreichbarkeit = \"Nächsten Wochen im Krankenhaus (\".$w2f23_opn3.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";
if($w2f23_4==4) $erreichbarkeit = \"Nächsten Wochen abwesend (\".$w2f23_opn4.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";

if($savedstatus==1) {
    $text =\"Die nächste <u>\".$methodetxt.\"</u> Befragung soll zwischen dem \".$nxtwavebeststart.\" und \".$nxtwaveende.\" stattfinden.<br>\".
    \"(Die Durchführung ist bereits ab dem  \".$nxtwavestart.\" möglich.)<br>\".
    \"<br>\".
    \"Vereinbaren Sie am besten gleich einen Termin. Bestätigen Sie den Termin mindesten einen Tag vorher!<br>\".
    \"<br>\".
    $kondata.
    $erreichbarkeit.\"<br>\".
    \"<br>\".
    \"Unterbrechen Sie das Interview mit \\\"make appointment\\\".\";
} else if ($savedstatus==2) {
    $text=\"Sie können jetzt (bis \".$nxtwaveende.\") mit der nächsten <u>(\".$methodetxt.\"n)</u> Welle fortfahren! Bestätigen Sie den Termin mindesten einen Tag vorher!<br>\".
    \"<br>\".
    $kondata.
    $erreichbarkeit.\"<br>\".
    \"<br>\";
} else {
    $text=\"Das Zeitfenster für diese Welle (\".$nxtwavestart.\" bis \".$nxtwaveende.\") ist bereits abgelaufen. Wenn möglich fahren Sie mit der nächsten Welle fort!\".
    \"<br>\";
}

if(reset(getVar(\"auscomplete\"))==1) {
    $bez=reset(getVar(\"sample_6\"));
    $bez_array=explode(\";<>;\",$bez);

    $txtchck = sprintf(\'sample_6,austmende,ausf1,ausf2_1,ausf2_2,ausf3,ausf3_opn,ausf4_1\');
    $checkvar = getVar($txtchck);
    $allvars = $txtchck;
    foreach (explode(\",\",$allvars) as $itemvar) {
           $$itemvar = $checkvar[$itemvar] ;
    }
    $text.= \"Auskunft der Bezugsperson (\".$bez_array[0].\") vom \".$austmende.\"):<br>\".
    \"Status bzw. Aufenthalt:\" .getAnswerText2(\"ausf1\",$ausf1).\"<br>\";
    if($ausf3==1)  $text .= \"retour ab: \".$ausf3_opn.\"<br>\";
    else if ($ausf3==2 || $ausf3==3)  $text .= \"retour ab: \".getAnswerText2(\"ausf3\",$ausf3).\"<br>\";
    $text .=    \"sonstige Infromationen: \".$ausf4_1;
}

setQuestion($text);

';
<stat>INSERT INTO p26604009_script SET id_question = '355',id_event = '1',script = '//echo \"<br><br><br><br><br><br><br><pre>\".var_export($_SESSION,true).\"</pre>\";
$aktuelleWelle = 5;
$i_userid = reset(getVar(\"user_id\"));
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");

if (count($i_info) == 1) $intnr = $i_info[0][\"username\"];
else $intnr=99999;
saveVar(\"w\".$aktuelleWelle.\"intnr_1=\'\" . $intnr . \"\'\");

$respid=reset(getVar(\"sample_1\"));
saveVar(\"w\".$aktuelleWelle.\"respid_1=\'\".$respid.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '361',id_event = '1',script = '$aktuelleWelle = 5;
$akz=reset(getVar(\"sample_8\"));
$akz=explode(\";\",$akz);
//Datumskontrolle fehlt


$date = $akz[1];
$date = new DateTime($date);   
$date0 = new DateTime();  
$interval = date_diff($date, $date0);
$interval = $interval->format(\'%a\');   

if ($akz[2]==1 && $interval>=42) {
    saveVar(\"w\".$aktuelleWelle.\"ft_3=1\");
    $akz[2]=2;
    $akz=implode(\";\",$akz);
    saveVar(\"sample_8=\'\".$akz.\"\'\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '363',id_event = '1',script = '
$aktuelleWelle = 5;
//echo \"<br><br><br><br><br><br><br>TEST\";
$string= reset(getVar(\"sample_4\"));
$array=explode(\";<>;\",$string);
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$iter=0;
foreach (explode(\",\",$txtchck) as $itemvar) {
       saveVar($itemvar.\"=\'\".$array[$iter].\"\'\");
       $iter++;
}

';
<stat>INSERT INTO p26604009_script SET id_question = '364',id_event = '1',script = '
$aktuelleWelle = 5;
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$checkvar = getVar($txtchck);
$string = implode(\";<>;\",$checkvar);
saveVar(\"sample_4=\'\".$string.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '371',id_event = '1',script = '$aktuelleWelle = 5;
saveVar(\'w\'.$aktuelleWelle.\'i10ww=0\');';
<stat>INSERT INTO p26604009_script SET id_question = '372',id_event = '2',script = '//echo \"<br><br><br><br><br><br><br><pre>\".var_export($_SESSION[\'questionnairePath\'],true);
$aktuelleWelle = 5;
$i10ww = reset(getVar(\"w\'.$aktuelleWelle.\'i10ww\"));

if ($i10ww==1) $ww_complete=1;
else  $ww_complete=2;

echo \'<input id=\"wwcomplete\" type=\"hidden\" name=\"forWordWrap\" value=\"\'.$ww_complete.\'\">\';';
<stat>INSERT INTO p26604009_script SET id_question = '372',id_event = '3',script = '
$( document ).ready(function() {
    //$(\"#tr_w2i10ww_1\").hide();
    $(\"[type=\'radio\']\").parent().parent().hide();
    var ww_complete = $(\'#wwcomplete\').val();
    console.log($(\'#wwcomplete\').val());
    function mycode() {
        console.log(count);
        count=count+1;
          if (count==1) $(\"#wordwrap\").text(\"Wasser\");
          if (count==2) $(\"#wordwrap\").text(\"Kirche\");
          if (count==3) $(\"#wordwrap\").text(\"Doktor\");
          if (count==4) $(\"#wordwrap\").text(\"Palast\");
          if (count==5) $(\"#wordwrap\").text(\"Feuer\");
          if (count==6) $(\"#wordwrap\").text(\"Garten\");
          if (count==7) $(\"#wordwrap\").text(\"Meer\");
          if (count==8) $(\"#wordwrap\").text(\"Dorf\");
          if (count==9) $(\"#wordwrap\").text(\"Baby\");
          if (count==10) $(\"#wordwrap\").text(\"Tisch\");

        if (count<=10) tid = setTimeout(mycode, 2500); // repeat myself
        else {
        $(\"#wordwrap\").text(\"\");  
        $(\'[name=\"questSubmit\"]\').parent().show();
        $(\'#wwcomplete\').val(1);
        }
    }
    if (ww_complete ==\"2\") {
        $(\'[name=\"questBack\"]\').parent().hide(); 
        $(\'[name=\"questSubmit\"]\').parent().hide(); 
        
        var append1 =\'<tr><td id=\"wordwrap\" style=\"height:40px;text-align:center;vertical-align:middle;width:100%;font-size:xx-large\">Wasser</td></tr>\';
        var bas = $(\"#desElementId_32\").find(\"tbody\");
        bas.append(append1);
        
        var count=1;
        var tid = setTimeout(mycode, 2500);
        
    }
});';
<stat>INSERT INTO p26604009_script SET id_question = '373',id_event = '2',script = '$aktuelleWelle = 5;
saveVar(\'w\'.$aktuelleWelle.\'i10ww=1\');';
<stat>INSERT INTO p26604009_script SET id_question = '373',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '379',id_event = '3',script = '$(document).ready(function() {
   // $(\'div[name=\"erg2\"]\').hide();
   // $(\'span[name=\"erg2\"]\').parent().parent().hide();
   $(\'[name=\"questSubmit\"]\').parent().hide();
   design(1);
});

$($(\'[id^=\"td_w5f16_\"]\')).on(\'click\', function () {
    console.log($(this).attr(\'id\'));
    var name=$(this).attr(\'id\');
    console.log(name.substring(9,10));
    var item=parseInt(name.substring(9,10));
    design(item+1);
});
function design(xx) {
    console.log(xx);
    for ( let iter=1; iter<=5; iter++ ) {
        if(iter==xx) {
            console.log(iter+\" anzeigen\");
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:30px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"30px\");
        } else if (iter>xx){
            console.log(iter+\" ausblenden\");
            $(\'div[name=\"erg\'+iter+\'\"]\').hide();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().hide();
        } else {
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:18px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"16px\");
            if (xx==6) $(\'[name=\"questSubmit\"]\').parent().show(); 
        }
    }
        
}
';
<stat>INSERT INTO p26604009_script SET id_question = '380',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '382',id_event = '3',script = 'var quest=\'w5f18\';
if( $(\"#ct_\"+quest+\"_5\").is(\':checked\') || $(\"#ct_\"+quest+\"_6\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_1\").val(\"\");
$(\"#op_\"+quest+\"_3\").val(\"\");
}
if( $(\"#ct_\"+quest+\"_7\").is(\':checked\') || $(\"#ct_\"+quest+\"_8\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_2\").val(\"\");
$(\"#op_\"+quest+\"_4\").val(\"\");
}


$(\"td [id^=tr_\"+quest+\"]\").on(\'click\', function () {
    select($(this).attr(\'id\'));
});
function select(xx) {
    var label=xx.substring(3,8);
    var item=xx.substring(9,10);
    console.log(label+\"-\"+item);
    if (item==1 || item==3) { uncheck(label,5); uncheck(label,6);}
    if (item==2 || item==4) { uncheck(label,7); uncheck(label,8);}
    if (item==5) { uncheck(label,1); uncheck(label,3); uncheck(label,6);}
    if (item==6) { uncheck(label,1); uncheck(label,3); uncheck(label,5);}
    if (item==7) { uncheck(label,2); uncheck(label,4); uncheck(label,8);}
    if (item==8) { uncheck(label,2); uncheck(label,4); uncheck(label,7);}
}
function uncheck(label,item) {
    $(\"#ct_\"+label+\"_\"+item).removeAttr(\'checked\');
    $(\"#img_\"+label+\"_\"+item).attr(\"src\",\"../../webIfesProjects/IFESdesign/checkbox-unchecked.png\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '383',id_event = '3',script = 'if( $(\"#ct_w5f19_3\").is(\':checked\') || $(\"#ct_w5f19_4\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_w5f19_1\").val(\"\");
$(\"#op_w5f19_2\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '384',id_event = '3',script = 'if( $(\"#ct_w5f20_2\").is(\':checked\') || $(\"#ct_w5f20_3\").is(\':checked\')) {
console.log(\"OFFESN AUF NULL\");
$(\"#op_w5f20_1\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '389',id_event = '1',script = '$aktuelleWelle = 5;
saveVar(\"w\".$aktuelleWelle.\"complete=1\");
$status=reset(getVar(\"sample_5\"));
$stat_array=explode(\";\",$status);

saveVar(\"sample_5=\'\".($aktuelleWelle+1).\";\".$stat_array[1].\"\'\");';
<stat>INSERT INTO p26604009_script SET id_question = '391',id_event = '2',script = '//var_dump($_SESSION);
$aktuelleWelle=5;
$txtchck = sprintf(\'sample_1,Projektdaten_1,Projektdaten_3,Projektdaten_4,Projektdaten_5,kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6\');
    $checkvar = getVar($txtchck);
    $allvars = $txtchck;
    foreach (explode(\",\",$allvars) as $itemvar) {
           $$itemvar = $checkvar[$itemvar] ;
    }


$i_userid = reset(getVar(\"user_id\"));
if ($i_userid == 0 ) {$i_userid = 10;}
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");
if (count($i_info) == 1) {$intnr = $i_info[0][\"username\"];}
//else $intnr=\"99999\";
    

$respGeschl = $sample_1;
$projNum = $_SESSION[\'proj_name\'];
$projName  = $Projektdaten_1;
$projTxt  = $projName . \' (\' . $projNum .\')\';


saveVar(\'structureid_1=\'.($_SESSION[\'id_record\']));
saveVar(\'user_id=\'.($_SESSION[\'id_user\']));
saveVar(\'source_2=\'.($_SESSION[\'id_record\']));
saveVar(\'source_1=\"\'.$projTxt.\'\"\');


    echo \'<input id=respGeschl  type=\"hidden\"    name=\"forCorona\" value=\"\'.$respGeschl.\'\">\';
    echo \'<input id=respName    type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_1.\'\">\';
    echo \'<input id=respPLZ     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_2.\'\">\';
    echo \'<input id=respStreet  type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_3.\'\">\';
    echo \'<input id=respHNr     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_4.\'\">\';
    echo \'<input id=respCity    type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_5.\'\">\';
    echo \'<input id=respTel     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_6.\'\">\';
    
    echo \'<input id=listNr      type=\"hidden\"    name=\"forCorona\" value=\"\'.$Projektdaten_4.\'\">\';
    echo \'<input id=lfdNr       type=\"hidden\"    name=\"forCorona\" value=\"\'.$Projektdaten_5.\'\">\'; 
    
    echo \'<input id=projNr      type=\"hidden\"    name=\"forCorona\" value=\"\'.$projNum.\'\">\'; 
    echo \'<input id=intNr       type=\"hidden\"    name=\"forCorona\" value=\"\'.$intnr.\'\">\'; 

';
<stat>INSERT INTO p26604009_script SET id_question = '391',id_event = '3',script = '
</script>

<link rel=\"stylesheet\" href=\"/../webIfesProjects/IchWarDaFormular/datepicker.min.css\">
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/signature_pad.min.js\"></script>
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/datepicker.min.js\"></script>
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/jspdf.min.js\"></script>

<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.0.272/jspdf.debug.js\"></script>

<script type=\"text/javascript\">




function touchHandler(event) {
    var touch = event.changedTouches[0];

    var simulatedEvent = document.createEvent(\"MouseEvent\");
    simulatedEvent.initMouseEvent({
            touchstart: \"mousedown\",
            touchmove: \"mousemove\",
            touchend: \"mouseup\"
        }[event.type], true, true, window, 1,
        touch.screenX, touch.screenY,
        touch.clientX, touch.clientY, false,
        false, false, false, 0, null);

    touch.target.dispatchEvent(simulatedEvent);
   // event.preventDefault();// you can remove preventDefault if it creates problem with other functionalities
}


function init() {
    document.addEventListener(\"touchstart\", touchHandler, true);
    document.addEventListener(\"touchmove\", touchHandler, true);
    document.addEventListener(\"touchend\", touchHandler, true);
    document.addEventListener(\"touchcancel\", touchHandler, true);
}    

init();
  

var canv1 = document.getElementById(\'canvas1\');
var signaturePad1 = new SignaturePad(canv1);
signaturePad1.id = \'sigPad1\';
$(\"canvas1\").append(signaturePad1);

clearButton = document.getElementById(\'clear1\');
clearButton.addEventListener(\'click\', function(event) {
    //console.log(document.getElementsByClassName(\'SignaturePad\'));
    $(\'#wrapper1 canvas\').each(function(idx, item) {
        var context = item.getContext(\"2d\");
        context.clearRect(0, 0, item.width, item.height);
        context.beginPath();        
    });
});



var signaturedialog = document.createElement(\'table\');
signaturedialog.id = \'signaturedialog\';

var canv2 = document.getElementById(\'canvas2\')
var signaturePad2 = new SignaturePad(canv2);
signaturePad2.id= \'sigPad2\';
$(\"canvas2\").append(signaturePad2);


document.body.appendChild(signaturedialog);

popupButton = document.getElementById(\'signpopup\');
popupButton.addEventListener(\'click\', function(event) {
    $(\"#canvas1\").hide();
    $(\"#canvas2\").appendTo(\"#signaturedialog\");

    $(\"#canvas2\").show();  
    $( \"#signaturedialog\" ).dialog({
        \'width\':\'auto\',
        \'title\':\'Bitte unterschreiben Sie hier!\',
            \'buttons\': {
        \'Unterschrift bestätigen\': function(event) {
            $(\"#canvas1\").replaceWith($(\'#canvas2\'));
            $(\"#canvas2\").clone().appendTo(\"#wrapper2\");
           document.getElementById(\'wrapper1\').firstChild.id = \'canvas1\';        
           //console.log(document.getElementById(\'wrapper1\').firstChild);
            
            var canv2 = document.getElementById(\'canvas2\')
            var signaturePad2 = new SignaturePad(canv2);
            signaturePad2.id = \'sigPad2\';
            $(\"canvas2\").append(signaturePad2);
            $(\"#canvas2\").hide();
            $(\"#signaturedialog\").dialog(\'close\');
            
            }
                }
    });
 
    });


//ENTFERNEN WENN FERTIG EINGERICHTET!
function getCookieValue(a) {
   const b = document.cookie.match(\'(^|;)\\\\s*\' + a + \'\\\\s*=\\\\s*([^;]+)\');
   return b ? b.pop() : \'\';
}


//console.log (\"respstreet \" + getCookieValue(\"respstreet\"));
var txtGeschl = \'\';
var respGeschl = document.getElementById(\'respGeschl\').value;
console.log(respGeschl);
if (respGeschl == \'1\') {txtGeschl = \'Herr \';}
if (respGeschl == \'2\') {txtGeschl = \'Frau \';}

document.getElementById(\'resp_adresse\').value=document.getElementById(\"respStreet\").value+ \" \"+document.getElementById(\"respHNr\").value+ \" \"+document.getElementById(\"respPLZ\").value+ \" \"+document.getElementById(\"respCity\").value;
document.getElementById(\'resp_name\').value=txtGeschl+\"\"+document.getElementById(\"respName\").value;
document.getElementById(\'resp_telnr\').value=document.getElementById(\"respTel\").value;

/* NACH EINRICHTEN LÖSCHEN
//console.log(document.cookie);
document.getElementById(\'desElementId_1041\').style.background = \'white\';
document.getElementById(\'desElementId_148\').remove();
document.getElementById(\'desElementId_150\').remove();
//document.getElementById(\'desElementId_153\').remove();
*/


$(\"submitCallStatus\").prop(\"onclick\", null).off(\"click\");

var eventListener = document.getElementById(\'submitCallStatus\');
   eventListener.removeAttribute(\"onclick\");
                                
const picker1 = datepicker(document.querySelector(\'#datum1\'),{startDay: 1});

var today = new Date();
var dd = String(today.getDate()).padStart(2, \'0\');
dd = parseInt(dd);
var mm = String(today.getMonth() + 1).padStart(2, \'0\');
mm = parseInt(mm);
var yyyy = today.getFullYear();

today = dd + \'.\' + mm + \'.\' + yyyy;

document.getElementById(\'datum1\').value = today;

submitAll = document.getElementById(\'submitCallStatus\');



submitAll.addEventListener(\'click\', function(event) {

    var welle = 2;
    var structureId = document.getElementById(\'structureid\').value;
    var respName    = document.getElementById(\'resp_name\').value;
    var respAdresse = document.getElementById(\'resp_adresse\').value;
    var respTelnr   = document.getElementById(\'resp_telnr\').value;
    var respDatum   = document.getElementById(\'datum1\').value;
    var projName    = document.getElementById(\'projNr\').value;
    var intNr      = document.getElementById(\'intNr\').value;

    var listNr      = document.getElementById(\'listNr\').value;
    var lfdNr       = document.getElementById(\'lfdNr\').value;
    var respNameU = respName.split(\" \").join(\"_\");
    var w = window.open(\'about:blank\',\'pdfForm\');
    var c = document.getElementById(\"canvas1\");
    var d = c.toDataURL(\"image/png\"); 
    var htmldoc     = w.document.getElementById(\"htmldoc\");
	var htmltitle   = String(\'CoVid-Formular_\'+projName+\'_\'+listNr+\'_\'+lfdNr+\'_\'+welle+\'_\'+intNr+\'_\'+respNameU+\'_\'+structureId);
    var htmlcontent;
    
        
  $.ajax({
         data: { structureId:structureId,respName:respName,respAdresse:respAdresse,respTelnr:respTelnr,respDatum:respDatum,projName:projName,intNr:intNr},
         type: \"post\",
         url: \"/../webIfesProjects/IchWarDaFormular/updatedata.php\",
         
            success: function(data){

         htmlcontent = \'<style type=\"text/css\" media=\"print\"> @page {size:  auto;margin: 0mm;} html {background-color: #FFFFFF; margin: 0px;} body {border: solid 1px white ; margin: 10mm 15mm 10mm 15mm; } </style><title>\'+htmltitle+\'</title><img src=\"../covid_sticker.PNG\"><style> ul { list-style-type: none; margin: 0; padding: 0; } </style><div style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:32px\">Bitte kontrollieren Sie Ihre eingeblendeten Kontaktdaten und bestätigen Sie die angeführten Angaben mit Ihrer Unterschrift.</div><br><br><p style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:24px;line-height:0%\">Ihre Daten - Angaben zur befragten Person</p><p style=\"font-family:calibri;font-size:18px;\">HINWEIS: Wird ausschließlich für das für Contact Tracing verwendet.</p><br><table style=\"margin-right:auto;margin-left:0px\"><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Name (Vor-, Zuname)</b> </p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respName+\'</u></p></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Adresse</b></p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respAdresse+\'</u></p></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Telefonnummer</b></p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respTelnr+\'</u></p></td></tr></table><p style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:24px;\">Allgemeine Informationen</p><table style=\"font-family:calibri;font-size:18px\"><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich habe das IFES-Schreiben \"Vielen herzlichen Dank für Ihre Unterstützung\" mit den Kontaktdaten des IFES (Adresse, Telefonnummer und E-Mail-Adresse) erhalten.</td></tr><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich bestätige hiermit, dass während der Befragung durch IFES alle gesetzlichen Vorgaben im Rahmen der COVID-19-Sicherheitsmaßnahmen eingehalten wurden.</td></tr><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich habe den Namen und die Interviewer-Nummer der IFES Feld Interviewerin/des IFES Feld Interviewers erhalten.</td></tr></table><table width=\"100%\"><tr><td><img src=\"\'+d+\'\"/></td> <td><br><br><br><br><br><div vertical-align=\"middle\"><p style=\"font-family:calibri;font-size:18px;\"><b>\'+respDatum+\'</b></p></div></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><span style=\"text-decoration:overline\">Unterschrift der befragten Person</span></p></td><td><p style=\"font-family:calibri;font-size:18px\"><span style=\"text-decoration:overline\">Datum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p></td></td></table><br><br><br><div style=\"font-family:calibri;font-size:18px\"><div>IFES Intern:</div><br><div>Projektnummer: \'+projName+\'</div><div>Listennummer: \'+listNr+\'</div><div>Laufnummer: \'+lfdNr+\'</div><div>Welle: \'+welle+\'</div><div>Interviewer-Nummer: \'+intNr+\'</div><div id=\"statustxt\">Status: vom Respondent unterschrieben</div></div>\';
         w.document.write(htmlcontent);
         //w.print(); 
         w.close();
         htmlcontent = htmlcontent + \'<<<|||>>>\' + htmltitle;
         var data = new FormData();
         data.append(\"html\" , htmlcontent);
         data.append(\"projname\" , projName);
         var xhr = new XMLHttpRequest();
         xhr.open( \'POST\', \'/../webIfesProjects/IchWarDaFormular/writeform.php\', true );
         xhr.send(data);
         
            },
            
          failure: function(data){
              alert(\"FEHLER!\");
         },
      });


alert(\"Daten erfasst!\");       
recodeClickEvents(this,3); 
    
});


';
<stat>INSERT INTO p26604009_script SET id_question = '392',id_event = '3',script = '//document.getElementById(\'questBack\').style.visibility=\'hidden\';';
<stat>INSERT INTO p26604009_script SET id_question = '393',id_event = '1',script = '$aktuelleWelle=5;
$formdata   = reset(getVar(\'formdata_1\'));
$checkq     = reset(getVar(\'w\'.$aktuelleWelle.\'checkq\'));
$status1 = \'vom Respondent unterschrieben\';
$status2 = \'Respondent verweigert Unterschrift\';
$status3 = \'Unterschrift technisch nicht möglich\';

if ($checkq == 1) {
    $formdata = str_replace($status2,$status1, $formdata);
    $formdata = str_replace($status3,$status1, $formdata);
}
if ($checkq == 2) {
    $formdata = str_replace($status1,$status2, $formdata);
    $formdata = str_replace($status3,$status2, $formdata);
}
if ($checkq == 3) {
    $formdata = str_replace($status1,$status3, $formdata);
    $formdata = str_replace($status2,$status3, $formdata);
}

saveVar(\"formdata_1=\'\".$formdata.\"\'\");
saveVar(\'w\'.$aktuelleWelle.\'checkdummy=2\');
if (strlen($formdata) > 4000) saveVar(\'w\'.$aktuelleWelle.\'checkdummy=1\');';
<stat>INSERT INTO p26604009_script SET id_question = '397',id_event = '1',script = '
$aktuelleWelle = 5;

$statusnxt=reset(getVar(\"w\".($aktuelleWelle+1).\"complete\"));
$savedstatus=reset(getVar(\"w\".$aktuelleWelle.\"StatNxtWave\"));
$complete = reset(getVar(\"w\".$aktuelleWelle.\"complete\"));
define(\'C_DATE_FORMAT\', \'d.m.Y\');
if ($complete==1) {
    $date = reset(getVar(\"w\".$aktuelleWelle.\"tmende\"));
    $datetime = strtotime($date);
    $date = date(\"d.m.Y\", $datetime);

} else {
   $date = reset(getVar(\"timeslotstart_\".($aktuelleWelle)));
   $date = new DateTime($date);   
   $date->add(new DateInterval(\'P7D\'));
   $date = $date->format(C_DATE_FORMAT);
   echo \"<br>\".$date;
}
$date0 = new DateTime();

//Datum setzen
$date1 = new DateTime($date);
$date1->add(new DateInterval(\'P7D\'));
$date2 = new DateTime($date);
$date2->add(new DateInterval(\'P21D\'));

saveVar(\"timeslotstart_\".($aktuelleWelle+1).\"=\'\".$date1->format(C_DATE_FORMAT).\"\'\");
saveVar(\"timeslotende_\".($aktuelleWelle+1).\"=\'\".$date2->format(C_DATE_FORMAT).\"\'\");


if($date0<$date1) {
    if (!($statusnxt==1 || $statusnxt==2) && $savedstatus<=1) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=1\");
} else if ($date0<$date2 || $statusnxt==1) {
    if (!($statusnxt==1 || $statusnxt==2) && $savedstatus<=2) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=2\");
} else {
    if (!($statusnxt==1 || $statusnxt==2)) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=3\");
}

';
<stat>INSERT INTO p26604009_script SET id_question = '397',id_event = '2',script = '$methode = reset(getVar(\"sample_2\"));
if ($methode==1) $methodetxt= \"persönliche\"; else $methodetxt= \"telefonische\";

$aktuelleWelle = 5;
$savedstatus=reset(getVar(\"w\".$aktuelleWelle.\"StatNxtWave\"));

$nxtwavestart=reset(getVar(\"timeslotstart_\".($aktuelleWelle+1).\"\"));
$nxtwaveende=reset(getVar(\"timeslotende_\".($aktuelleWelle+1).\"\"));
define(\'C_DATE_FORMAT\', \'d.m.Y\');
$nxtwavestart=reset(getVar(\"timeslotstart_\".($aktuelleWelle+1).\"\"));
$nxtwaveende=reset(getVar(\"timeslotende_\".($aktuelleWelle+1).\"\"));
$nxtwavebest = new DateTime($nxtwavestart);
$nxtwavebeststart=$nxtwavebest->add(new DateInterval(\'P7D\'))->format(C_DATE_FORMAT);

$txtchck = sprintf(\'kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6,kondata_7,kondata_8,sample_7,w\'.$aktuelleWelle.\'f23_1,w\'.$aktuelleWelle.\'f23_2,w\'.$aktuelleWelle.\'f23_3,w\'.$aktuelleWelle.\'f23_4,w\'.$aktuelleWelle.\'f23_opn2,w\'.$aktuelleWelle.\'f23_opn3,w\'.$aktuelleWelle.\'f23_opn4,w\'.$aktuelleWelle.\'f24_1,w\'.$aktuelleWelle.\'f24_2\');
$checkvar = getVar($txtchck);
$allvars = $txtchck;
foreach (explode(\",\",$allvars) as $itemvar) {
       $$itemvar = $checkvar[$itemvar] ;
}
$scb=explode(\";<>;\",$sample_7);
$kondata=
\"Name: \".$kondata_1.\"<br>\".
\"Adresse: \".$kondata_3.\" \".$kondata_4.\", \".$kondata_2.\" \".$kondata_5.\"<br>\".
\"Kommentar: \".$kondata_7.\"<br>\".
\"<br>\".
\"Festnetz-Telefon: \".$scb[0].\"<br>\".
\"Mobil-Telefon: \".$scb[1].\"<br>\".
\"Emailadresse: \".$scb[2].\"<br>\".
\"<br>\";
$erreichbarkeit=\"\";
if($w2f23_1==1) $erreichbarkeit = \"Nächsten Wochen erreichbar (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$ww2f24_2.\"-)\";
if($w2f23_2==2) $erreichbarkeit = \"Nächsten Wochen im Urlaub/Ausland (\".$w2f23_opn2.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";
if($w2f23_3==3) $erreichbarkeit = \"Nächsten Wochen im Krankenhaus (\".$w2f23_opn3.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";
if($w2f23_4==4) $erreichbarkeit = \"Nächsten Wochen abwesend (\".$w2f23_opn4.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";

if($savedstatus==1) {
    $text =\"Die nächste <u>\".$methodetxt.\"</u> Befragung soll zwischen dem \".$nxtwavebeststart.\" und \".$nxtwaveende.\" stattfinden.<br>\".
    \"(Die Durchführung ist bereits ab dem  \".$nxtwavestart.\" möglich.)<br>\".
    \"<br>\".
    \"Vereinbaren Sie am besten gleich einen Termin. Bestätigen Sie den Termin mindesten einen Tag vorher!<br>\".
    \"<br>\".
    $kondata.
    $erreichbarkeit.\"<br>\".
    \"<br>\".
    \"Unterbrechen Sie das Interview mit \\\"make appointment\\\".\";
} else if ($savedstatus==2) {
    $text=\"Sie können jetzt (bis \".$nxtwaveende.\") mit der nächsten <u>(\".$methodetxt.\"n)</u> Welle fortfahren! Bestätigen Sie den Termin mindesten einen Tag vorher!<br>\".
    \"<br>\".
    $kondata.
    $erreichbarkeit.\"<br>\".
    \"<br>\";
} else {
    $text=\"Das Zeitfenster für diese Welle (\".$nxtwavestart.\" bis \".$nxtwaveende.\") ist bereits abgelaufen. Wenn möglich fahren Sie mit der nächsten Welle fort!\".
    \"<br>\";
}

if(reset(getVar(\"auscomplete\"))==1) {
    $bez=reset(getVar(\"sample_6\"));
    $bez_array=explode(\";<>;\",$bez);

    $txtchck = sprintf(\'sample_6,austmende,ausf1,ausf2_1,ausf2_2,ausf3,ausf3_opn,ausf4_1\');
    $checkvar = getVar($txtchck);
    $allvars = $txtchck;
    foreach (explode(\",\",$allvars) as $itemvar) {
           $$itemvar = $checkvar[$itemvar] ;
    }
    $text.= \"Auskunft der Bezugsperson (\".$bez_array[0].\") vom \".$austmende.\"):<br>\".
    \"Status bzw. Aufenthalt:\" .getAnswerText2(\"ausf1\",$ausf1).\"<br>\";
    if($ausf3==1)  $text .= \"retour ab: \".$ausf3_opn.\"<br>\";
    else if ($ausf3==2 || $ausf3==3)  $text .= \"retour ab: \".getAnswerText2(\"ausf3\",$ausf3).\"<br>\";
    $text .=    \"sonstige Infromationen: \".$ausf4_1;
}

setQuestion($text);

';
<stat>INSERT INTO p26604009_script SET id_question = '398',id_event = '1',script = '//echo \"<br><br><br><br><br><br><br><pre>\".var_export($_SESSION,true).\"</pre>\";
$aktuelleWelle = 6;
$i_userid = reset(getVar(\"user_id\"));
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");

if (count($i_info) == 1) $intnr = $i_info[0][\"username\"];
else $intnr=99999;
saveVar(\"w\".$aktuelleWelle.\"intnr_1=\'\" . $intnr . \"\'\");

$respid=reset(getVar(\"sample_1\"));
saveVar(\"w\".$aktuelleWelle.\"respid_1=\'\".$respid.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '404',id_event = '1',script = '$aktuelleWelle = 6;
$akz=reset(getVar(\"sample_8\"));
$akz=explode(\";\",$akz);
//Datumskontrolle fehlt


$date = $akz[1];
$date = new DateTime($date);   
$date0 = new DateTime();  
$interval = date_diff($date, $date0);
$interval = $interval->format(\'%a\');   

if ($akz[2]==1 && $interval>=42) {
    saveVar(\"w\".$aktuelleWelle.\"ft_3=1\");
    $akz[2]=2;
    $akz=implode(\";\",$akz);
    saveVar(\"sample_8=\'\".$akz.\"\'\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '406',id_event = '1',script = '
$aktuelleWelle = 6;
//echo \"<br><br><br><br><br><br><br>TEST\";
$string= reset(getVar(\"sample_4\"));
$array=explode(\";<>;\",$string);
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$iter=0;
foreach (explode(\",\",$txtchck) as $itemvar) {
       saveVar($itemvar.\"=\'\".$array[$iter].\"\'\");
       $iter++;
}

';
<stat>INSERT INTO p26604009_script SET id_question = '407',id_event = '1',script = '
$aktuelleWelle = 6;
$txtchck = sprintf(\'w\'.$aktuelleWelle.\'f2_1,w\'.$aktuelleWelle.\'f2_2,w\'.$aktuelleWelle.\'f2_3,w\'.$aktuelleWelle.\'f2_4,w\'.$aktuelleWelle.\'f2_5,w\'.$aktuelleWelle.\'f2_6,w\'.$aktuelleWelle.\'f2_7,w\'.$aktuelleWelle.\'f2_8,w\'.$aktuelleWelle.\'f2_9,w\'.$aktuelleWelle.\'f2_10,w\'.$aktuelleWelle.\'f2_11,w\'.$aktuelleWelle.\'f2_12,w\'.$aktuelleWelle.\'f2_opn11\');
$checkvar = getVar($txtchck);
$string = implode(\";<>;\",$checkvar);
saveVar(\"sample_4=\'\".$string.\"\'\");

';
<stat>INSERT INTO p26604009_script SET id_question = '414',id_event = '1',script = '$aktuelleWelle = 6;
saveVar(\'w\'.$aktuelleWelle.\'i10ww=0\');';
<stat>INSERT INTO p26604009_script SET id_question = '415',id_event = '2',script = '//echo \"<br><br><br><br><br><br><br><pre>\".var_export($_SESSION[\'questionnairePath\'],true);
$aktuelleWelle = 6;
$i10ww = reset(getVar(\"w\'.$aktuelleWelle.\'i10ww\"));

if ($i10ww==1) $ww_complete=1;
else  $ww_complete=2;

echo \'<input id=\"wwcomplete\" type=\"hidden\" name=\"forWordWrap\" value=\"\'.$ww_complete.\'\">\';';
<stat>INSERT INTO p26604009_script SET id_question = '415',id_event = '3',script = '
$( document ).ready(function() {
    //$(\"#tr_w2i10ww_1\").hide();
    $(\"[type=\'radio\']\").parent().parent().hide();
    var ww_complete = $(\'#wwcomplete\').val();
    console.log($(\'#wwcomplete\').val());
    function mycode() {
        console.log(count);
        count=count+1;
          if (count==1) $(\"#wordwrap\").text(\"Teller\");
          if (count==2) $(\"#wordwrap\").text(\"Hund\");
          if (count==3) $(\"#wordwrap\").text(\"Lampe\");
          if (count==4) $(\"#wordwrap\").text(\"Brief\");
          if (count==5) $(\"#wordwrap\").text(\"Apfel\");
          if (count==6) $(\"#wordwrap\").text(\"Hose\");
          if (count==7) $(\"#wordwrap\").text(\"Tisch\");
          if (count==8) $(\"#wordwrap\").text(\"Wiese\");
          if (count==9) $(\"#wordwrap\").text(\"Glas\");
          if (count==10) $(\"#wordwrap\").text(\"Baum\");

        if (count<=10) tid = setTimeout(mycode, 2500); // repeat myself
        else {
        $(\"#wordwrap\").text(\"\");  
        $(\'[name=\"questSubmit\"]\').parent().show();
        $(\'#wwcomplete\').val(1);
        }
    }
    if (ww_complete ==\"2\") {
        $(\'[name=\"questBack\"]\').parent().hide(); 
        $(\'[name=\"questSubmit\"]\').parent().hide(); 
        
        var append1 =\'<tr><td id=\"wordwrap\" style=\"height:40px;text-align:center;vertical-align:middle;width:100%;font-size:xx-large\">Teller</td></tr>\';
        var bas = $(\"#desElementId_32\").find(\"tbody\");
        bas.append(append1);
        
        var count=1;
        var tid = setTimeout(mycode, 2500);
        
    }
});';
<stat>INSERT INTO p26604009_script SET id_question = '416',id_event = '2',script = '$aktuelleWelle = 6;
saveVar(\'w\'.$aktuelleWelle.\'i10ww=1\');';
<stat>INSERT INTO p26604009_script SET id_question = '416',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '422',id_event = '3',script = '$(document).ready(function() {
   // $(\'div[name=\"erg2\"]\').hide();
   // $(\'span[name=\"erg2\"]\').parent().parent().hide();
   $(\'[name=\"questSubmit\"]\').parent().hide();
   design(1);
});

$($(\'[id^=\"td_w6f16_\"]\')).on(\'click\', function () {
    console.log($(this).attr(\'id\'));
    var name=$(this).attr(\'id\');
    console.log(name.substring(9,10));
    var item=parseInt(name.substring(9,10));
    design(item+1);
});
function design(xx) {
    console.log(xx);
    for ( let iter=1; iter<=5; iter++ ) {
        if(iter==xx) {
            console.log(iter+\" anzeigen\");
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:30px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"30px\");
        } else if (iter>xx){
            console.log(iter+\" ausblenden\");
            $(\'div[name=\"erg\'+iter+\'\"]\').hide();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().hide();
        } else {
            $(\'div[name=\"erg\'+iter+\'\"]\').show().attr(\"style\", \"font-size:18px\");
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().parent().show();
            $(\'span[name=\"erg\'+iter+\'\"]\').parent().css(\"font-size\",\"16px\");
            if (xx==6) $(\'[name=\"questSubmit\"]\').parent().show(); 
        }
    }
        
}
';
<stat>INSERT INTO p26604009_script SET id_question = '423',id_event = '3',script = '$( document ).ready(function() {
    console.log( \"ready!\" );
    var countStart = 60;

    var x = setInterval(function() {
        countStart = countStart-5;
        document.getElementById(\"uhr\").innerHTML = countStart;

  // If the count down is finished, write some text
  if (countStart <= 0) {
    clearInterval(x);
    document.getElementById(\"uhr\").innerHTML = \'\"ZEIT ABGELAUFEN!\"\';
  }
}, 5000);
});';
<stat>INSERT INTO p26604009_script SET id_question = '425',id_event = '3',script = 'var quest=\'w6f18\';
if( $(\"#ct_\"+quest+\"_5\").is(\':checked\') || $(\"#ct_\"+quest+\"_6\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_1\").val(\"\");
$(\"#op_\"+quest+\"_3\").val(\"\");
}
if( $(\"#ct_\"+quest+\"_7\").is(\':checked\') || $(\"#ct_\"+quest+\"_8\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_\"+quest+\"_2\").val(\"\");
$(\"#op_\"+quest+\"_4\").val(\"\");
}


$(\"td [id^=tr_\"+quest+\"]\").on(\'click\', function () {
    select($(this).attr(\'id\'));
});
function select(xx) {
    var label=xx.substring(3,8);
    var item=xx.substring(9,10);
    console.log(label+\"-\"+item);
    if (item==1 || item==3) { uncheck(label,5); uncheck(label,6);}
    if (item==2 || item==4) { uncheck(label,7); uncheck(label,8);}
    if (item==5) { uncheck(label,1); uncheck(label,3); uncheck(label,6);}
    if (item==6) { uncheck(label,1); uncheck(label,3); uncheck(label,5);}
    if (item==7) { uncheck(label,2); uncheck(label,4); uncheck(label,8);}
    if (item==8) { uncheck(label,2); uncheck(label,4); uncheck(label,7);}
}
function uncheck(label,item) {
    $(\"#ct_\"+label+\"_\"+item).removeAttr(\'checked\');
    $(\"#img_\"+label+\"_\"+item).attr(\"src\",\"../../webIfesProjects/IFESdesign/checkbox-unchecked.png\");
}
';
<stat>INSERT INTO p26604009_script SET id_question = '426',id_event = '3',script = 'if( $(\"#ct_w6f19_3\").is(\':checked\') || $(\"#ct_w6f19_4\").is(\':checked\')) {
console.log(\"OFFENE AUF NULL\");
$(\"#op_w6f19_1\").val(\"\");
$(\"#op_w6f19_2\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '427',id_event = '3',script = 'if( $(\"#ct_w6f20_2\").is(\':checked\') || $(\"#ct_w6f20_3\").is(\':checked\')) {
console.log(\"OFFESN AUF NULL\");
$(\"#op_w6f20_1\").val(\"\");
}';
<stat>INSERT INTO p26604009_script SET id_question = '432',id_event = '1',script = '$aktuelleWelle = 6;
saveVar(\"w\".$aktuelleWelle.\"complete=1\");
$status=reset(getVar(\"sample_5\"));
$stat_array=explode(\";\",$status);

saveVar(\"sample_5=\'\".($aktuelleWelle+1).\";\".$stat_array[1].\"\'\");';
<stat>INSERT INTO p26604009_script SET id_question = '434',id_event = '2',script = '//var_dump($_SESSION);
$aktuelleWelle=6;
$txtchck = sprintf(\'sample_1,Projektdaten_1,Projektdaten_3,Projektdaten_4,Projektdaten_5,kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6\');
    $checkvar = getVar($txtchck);
    $allvars = $txtchck;
    foreach (explode(\",\",$allvars) as $itemvar) {
           $$itemvar = $checkvar[$itemvar] ;
    }


$i_userid = reset(getVar(\"user_id\"));
if ($i_userid == 0 ) {$i_userid = 10;}
$i_info = getVarFromTable(\"_Interviewer\", \"username\", \"WHERE id = $i_userid\");
if (count($i_info) == 1) {$intnr = $i_info[0][\"username\"];}
//else $intnr=\"99999\";
    

$respGeschl = $sample_1;
$projNum = $_SESSION[\'proj_name\'];
$projName  = $Projektdaten_1;
$projTxt  = $projName . \' (\' . $projNum .\')\';


saveVar(\'structureid_1=\'.($_SESSION[\'id_record\']));
saveVar(\'user_id=\'.($_SESSION[\'id_user\']));
saveVar(\'source_2=\'.($_SESSION[\'id_record\']));
saveVar(\'source_1=\"\'.$projTxt.\'\"\');


    echo \'<input id=respGeschl  type=\"hidden\"    name=\"forCorona\" value=\"\'.$respGeschl.\'\">\';
    echo \'<input id=respName    type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_1.\'\">\';
    echo \'<input id=respPLZ     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_2.\'\">\';
    echo \'<input id=respStreet  type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_3.\'\">\';
    echo \'<input id=respHNr     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_4.\'\">\';
    echo \'<input id=respCity    type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_5.\'\">\';
    echo \'<input id=respTel     type=\"hidden\"    name=\"forCorona\" value=\"\'.$kondata_6.\'\">\';
    
    echo \'<input id=listNr      type=\"hidden\"    name=\"forCorona\" value=\"\'.$Projektdaten_4.\'\">\';
    echo \'<input id=lfdNr       type=\"hidden\"    name=\"forCorona\" value=\"\'.$Projektdaten_5.\'\">\'; 
    
    echo \'<input id=projNr      type=\"hidden\"    name=\"forCorona\" value=\"\'.$projNum.\'\">\'; 
    echo \'<input id=intNr       type=\"hidden\"    name=\"forCorona\" value=\"\'.$intnr.\'\">\'; 

';
<stat>INSERT INTO p26604009_script SET id_question = '434',id_event = '3',script = '
</script>

<link rel=\"stylesheet\" href=\"/../webIfesProjects/IchWarDaFormular/datepicker.min.css\">
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/signature_pad.min.js\"></script>
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/datepicker.min.js\"></script>
<script language=\"javascript\" type=\"text/javascript\" src=\"/../webIfesProjects/IchWarDaFormular/jspdf.min.js\"></script>

<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.0.272/jspdf.debug.js\"></script>

<script type=\"text/javascript\">




function touchHandler(event) {
    var touch = event.changedTouches[0];

    var simulatedEvent = document.createEvent(\"MouseEvent\");
    simulatedEvent.initMouseEvent({
            touchstart: \"mousedown\",
            touchmove: \"mousemove\",
            touchend: \"mouseup\"
        }[event.type], true, true, window, 1,
        touch.screenX, touch.screenY,
        touch.clientX, touch.clientY, false,
        false, false, false, 0, null);

    touch.target.dispatchEvent(simulatedEvent);
   // event.preventDefault();// you can remove preventDefault if it creates problem with other functionalities
}


function init() {
    document.addEventListener(\"touchstart\", touchHandler, true);
    document.addEventListener(\"touchmove\", touchHandler, true);
    document.addEventListener(\"touchend\", touchHandler, true);
    document.addEventListener(\"touchcancel\", touchHandler, true);
}    

init();
  

var canv1 = document.getElementById(\'canvas1\');
var signaturePad1 = new SignaturePad(canv1);
signaturePad1.id = \'sigPad1\';
$(\"canvas1\").append(signaturePad1);

clearButton = document.getElementById(\'clear1\');
clearButton.addEventListener(\'click\', function(event) {
    //console.log(document.getElementsByClassName(\'SignaturePad\'));
    $(\'#wrapper1 canvas\').each(function(idx, item) {
        var context = item.getContext(\"2d\");
        context.clearRect(0, 0, item.width, item.height);
        context.beginPath();        
    });
});



var signaturedialog = document.createElement(\'table\');
signaturedialog.id = \'signaturedialog\';

var canv2 = document.getElementById(\'canvas2\')
var signaturePad2 = new SignaturePad(canv2);
signaturePad2.id= \'sigPad2\';
$(\"canvas2\").append(signaturePad2);


document.body.appendChild(signaturedialog);

popupButton = document.getElementById(\'signpopup\');
popupButton.addEventListener(\'click\', function(event) {
    $(\"#canvas1\").hide();
    $(\"#canvas2\").appendTo(\"#signaturedialog\");

    $(\"#canvas2\").show();  
    $( \"#signaturedialog\" ).dialog({
        \'width\':\'auto\',
        \'title\':\'Bitte unterschreiben Sie hier!\',
            \'buttons\': {
        \'Unterschrift bestätigen\': function(event) {
            $(\"#canvas1\").replaceWith($(\'#canvas2\'));
            $(\"#canvas2\").clone().appendTo(\"#wrapper2\");
           document.getElementById(\'wrapper1\').firstChild.id = \'canvas1\';        
           //console.log(document.getElementById(\'wrapper1\').firstChild);
            
            var canv2 = document.getElementById(\'canvas2\')
            var signaturePad2 = new SignaturePad(canv2);
            signaturePad2.id = \'sigPad2\';
            $(\"canvas2\").append(signaturePad2);
            $(\"#canvas2\").hide();
            $(\"#signaturedialog\").dialog(\'close\');
            
            }
                }
    });
 
    });


//ENTFERNEN WENN FERTIG EINGERICHTET!
function getCookieValue(a) {
   const b = document.cookie.match(\'(^|;)\\\\s*\' + a + \'\\\\s*=\\\\s*([^;]+)\');
   return b ? b.pop() : \'\';
}


//console.log (\"respstreet \" + getCookieValue(\"respstreet\"));
var txtGeschl = \'\';
var respGeschl = document.getElementById(\'respGeschl\').value;
console.log(respGeschl);
if (respGeschl == \'1\') {txtGeschl = \'Herr \';}
if (respGeschl == \'2\') {txtGeschl = \'Frau \';}

document.getElementById(\'resp_adresse\').value=document.getElementById(\"respStreet\").value+ \" \"+document.getElementById(\"respHNr\").value+ \" \"+document.getElementById(\"respPLZ\").value+ \" \"+document.getElementById(\"respCity\").value;
document.getElementById(\'resp_name\').value=txtGeschl+\"\"+document.getElementById(\"respName\").value;
document.getElementById(\'resp_telnr\').value=document.getElementById(\"respTel\").value;

/* NACH EINRICHTEN LÖSCHEN
//console.log(document.cookie);
document.getElementById(\'desElementId_1041\').style.background = \'white\';
document.getElementById(\'desElementId_148\').remove();
document.getElementById(\'desElementId_150\').remove();
//document.getElementById(\'desElementId_153\').remove();
*/


$(\"submitCallStatus\").prop(\"onclick\", null).off(\"click\");

var eventListener = document.getElementById(\'submitCallStatus\');
   eventListener.removeAttribute(\"onclick\");
                                
const picker1 = datepicker(document.querySelector(\'#datum1\'),{startDay: 1});

var today = new Date();
var dd = String(today.getDate()).padStart(2, \'0\');
dd = parseInt(dd);
var mm = String(today.getMonth() + 1).padStart(2, \'0\');
mm = parseInt(mm);
var yyyy = today.getFullYear();

today = dd + \'.\' + mm + \'.\' + yyyy;

document.getElementById(\'datum1\').value = today;

submitAll = document.getElementById(\'submitCallStatus\');



submitAll.addEventListener(\'click\', function(event) {

    var welle = 2;
    var structureId = document.getElementById(\'structureid\').value;
    var respName    = document.getElementById(\'resp_name\').value;
    var respAdresse = document.getElementById(\'resp_adresse\').value;
    var respTelnr   = document.getElementById(\'resp_telnr\').value;
    var respDatum   = document.getElementById(\'datum1\').value;
    var projName    = document.getElementById(\'projNr\').value;
    var intNr      = document.getElementById(\'intNr\').value;

    var listNr      = document.getElementById(\'listNr\').value;
    var lfdNr       = document.getElementById(\'lfdNr\').value;
    var respNameU = respName.split(\" \").join(\"_\");
    var w = window.open(\'about:blank\',\'pdfForm\');
    var c = document.getElementById(\"canvas1\");
    var d = c.toDataURL(\"image/png\"); 
    var htmldoc     = w.document.getElementById(\"htmldoc\");
	var htmltitle   = String(\'CoVid-Formular_\'+projName+\'_\'+listNr+\'_\'+lfdNr+\'_\'+welle+\'_\'+intNr+\'_\'+respNameU+\'_\'+structureId);
    var htmlcontent;
    
        
  $.ajax({
         data: { structureId:structureId,respName:respName,respAdresse:respAdresse,respTelnr:respTelnr,respDatum:respDatum,projName:projName,intNr:intNr},
         type: \"post\",
         url: \"/../webIfesProjects/IchWarDaFormular/updatedata.php\",
         
            success: function(data){

         htmlcontent = \'<style type=\"text/css\" media=\"print\"> @page {size:  auto;margin: 0mm;} html {background-color: #FFFFFF; margin: 0px;} body {border: solid 1px white ; margin: 10mm 15mm 10mm 15mm; } </style><title>\'+htmltitle+\'</title><img src=\"../covid_sticker.PNG\"><style> ul { list-style-type: none; margin: 0; padding: 0; } </style><div style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:32px\">Bitte kontrollieren Sie Ihre eingeblendeten Kontaktdaten und bestätigen Sie die angeführten Angaben mit Ihrer Unterschrift.</div><br><br><p style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:24px;line-height:0%\">Ihre Daten - Angaben zur befragten Person</p><p style=\"font-family:calibri;font-size:18px;\">HINWEIS: Wird ausschließlich für das für Contact Tracing verwendet.</p><br><table style=\"margin-right:auto;margin-left:0px\"><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Name (Vor-, Zuname)</b> </p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respName+\'</u></p></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Adresse</b></p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respAdresse+\'</u></p></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><b>Telefonnummer</b></p></td><td><p style=\"font-family:calibri;font-size:18px\"><u>\'+respTelnr+\'</u></p></td></tr></table><p style=\"font-family:calibri;color:rgb(0, 38, 165);font-size:24px;\">Allgemeine Informationen</p><table style=\"font-family:calibri;font-size:18px\"><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich habe das IFES-Schreiben \"Vielen herzlichen Dank für Ihre Unterstützung\" mit den Kontaktdaten des IFES (Adresse, Telefonnummer und E-Mail-Adresse) erhalten.</td></tr><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich bestätige hiermit, dass während der Befragung durch IFES alle gesetzlichen Vorgaben im Rahmen der COVID-19-Sicherheitsmaßnahmen eingehalten wurden.</td></tr><tr><td style=\"vertical-align:top\">&#9745;</td><td>Ja, ich habe den Namen und die Interviewer-Nummer der IFES Feld Interviewerin/des IFES Feld Interviewers erhalten.</td></tr></table><table width=\"100%\"><tr><td><img src=\"\'+d+\'\"/></td> <td><br><br><br><br><br><div vertical-align=\"middle\"><p style=\"font-family:calibri;font-size:18px;\"><b>\'+respDatum+\'</b></p></div></td></tr><tr><td><p style=\"font-family:calibri;font-size:18px\"><span style=\"text-decoration:overline\">Unterschrift der befragten Person</span></p></td><td><p style=\"font-family:calibri;font-size:18px\"><span style=\"text-decoration:overline\">Datum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p></td></td></table><br><br><br><div style=\"font-family:calibri;font-size:18px\"><div>IFES Intern:</div><br><div>Projektnummer: \'+projName+\'</div><div>Listennummer: \'+listNr+\'</div><div>Laufnummer: \'+lfdNr+\'</div><div>Welle: \'+welle+\'</div><div>Interviewer-Nummer: \'+intNr+\'</div><div id=\"statustxt\">Status: vom Respondent unterschrieben</div></div>\';
         w.document.write(htmlcontent);
         //w.print(); 
         w.close();
         htmlcontent = htmlcontent + \'<<<|||>>>\' + htmltitle;
         var data = new FormData();
         data.append(\"html\" , htmlcontent);
         data.append(\"projname\" , projName);
         var xhr = new XMLHttpRequest();
         xhr.open( \'POST\', \'/../webIfesProjects/IchWarDaFormular/writeform.php\', true );
         xhr.send(data);
         
            },
            
          failure: function(data){
              alert(\"FEHLER!\");
         },
      });


alert(\"Daten erfasst!\");       
recodeClickEvents(this,3); 
    
});


';
<stat>INSERT INTO p26604009_script SET id_question = '435',id_event = '3',script = '//document.getElementById(\'questBack\').style.visibility=\'hidden\';';
<stat>INSERT INTO p26604009_script SET id_question = '436',id_event = '1',script = '$aktuelleWelle=6;
$formdata   = reset(getVar(\'formdata_1\'));
$checkq     = reset(getVar(\'w\'.$aktuelleWelle.\'checkq\'));
$status1 = \'vom Respondent unterschrieben\';
$status2 = \'Respondent verweigert Unterschrift\';
$status3 = \'Unterschrift technisch nicht möglich\';

if ($checkq == 1) {
    $formdata = str_replace($status2,$status1, $formdata);
    $formdata = str_replace($status3,$status1, $formdata);
}
if ($checkq == 2) {
    $formdata = str_replace($status1,$status2, $formdata);
    $formdata = str_replace($status3,$status2, $formdata);
}
if ($checkq == 3) {
    $formdata = str_replace($status1,$status3, $formdata);
    $formdata = str_replace($status2,$status3, $formdata);
}

saveVar(\"formdata_1=\'\".$formdata.\"\'\");
saveVar(\'w\'.$aktuelleWelle.\'checkdummy=2\');
if (strlen($formdata) > 4000) saveVar(\'w\'.$aktuelleWelle.\'checkdummy=1\');';
<stat>INSERT INTO p26604009_script SET id_question = '440',id_event = '1',script = '
$aktuelleWelle = 6;

$statusnxt=reset(getVar(\"w\".($aktuelleWelle+1).\"complete\"));
$savedstatus=reset(getVar(\"w\".$aktuelleWelle.\"StatNxtWave\"));
$complete = reset(getVar(\"w\".$aktuelleWelle.\"complete\"));
define(\'C_DATE_FORMAT\', \'d.m.Y\');
if ($complete==1) {
    $date = reset(getVar(\"w\".$aktuelleWelle.\"tmende\"));
    $datetime = strtotime($date);
    $date = date(\"d.m.Y\", $datetime);

} else {
   $date = reset(getVar(\"timeslotstart_\".($aktuelleWelle)));
   $date = new DateTime($date);   
   $date->add(new DateInterval(\'P7D\'));
   $date = $date->format(C_DATE_FORMAT);
   echo \"<br>\".$date;
}
$date0 = new DateTime();

//Datum setzen
$date1 = new DateTime($date);
$date1->add(new DateInterval(\'P7D\'));
$date2 = new DateTime($date);
$date2->add(new DateInterval(\'P21D\'));

saveVar(\"timeslotstart_\".($aktuelleWelle+1).\"=\'\".$date1->format(C_DATE_FORMAT).\"\'\");
saveVar(\"timeslotende_\".($aktuelleWelle+1).\"=\'\".$date2->format(C_DATE_FORMAT).\"\'\");


if($date0<$date1) {
    if (!($statusnxt==1 || $statusnxt==2) && $savedstatus<=1) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=1\");
} else if ($date0<$date2 || $statusnxt==1) {
    if (!($statusnxt==1 || $statusnxt==2) && $savedstatus<=2) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=2\");
} else {
    if (!($statusnxt==1 || $statusnxt==2)) saveVar(\"w\".$aktuelleWelle.\"StatNxtWave=3\");
}

';
<stat>INSERT INTO p26604009_script SET id_question = '440',id_event = '2',script = '$methode = reset(getVar(\"sample_2\"));
if ($methode==1) $methodetxt= \"persönliche\"; else $methodetxt= \"telefonische\";

$aktuelleWelle = 6;
$savedstatus=reset(getVar(\"w\".$aktuelleWelle.\"StatNxtWave\"));

$nxtwavestart=reset(getVar(\"timeslotstart_\".($aktuelleWelle+1).\"\"));
$nxtwaveende=reset(getVar(\"timeslotende_\".($aktuelleWelle+1).\"\"));
define(\'C_DATE_FORMAT\', \'d.m.Y\');
$nxtwavestart=reset(getVar(\"timeslotstart_\".($aktuelleWelle+1).\"\"));
$nxtwaveende=reset(getVar(\"timeslotende_\".($aktuelleWelle+1).\"\"));
$nxtwavebest = new DateTime($nxtwavestart);
$nxtwavebeststart=$nxtwavebest->add(new DateInterval(\'P7D\'))->format(C_DATE_FORMAT);

$txtchck = sprintf(\'kondata_1,kondata_2,kondata_3,kondata_4,kondata_5,kondata_6,kondata_7,kondata_8,sample_7,w\'.$aktuelleWelle.\'f23_1,w\'.$aktuelleWelle.\'f23_2,w\'.$aktuelleWelle.\'f23_3,w\'.$aktuelleWelle.\'f23_4,w\'.$aktuelleWelle.\'f23_opn2,w\'.$aktuelleWelle.\'f23_opn3,w\'.$aktuelleWelle.\'f23_opn4,w\'.$aktuelleWelle.\'f24_1,w\'.$aktuelleWelle.\'f24_2\');
$checkvar = getVar($txtchck);
$allvars = $txtchck;
foreach (explode(\",\",$allvars) as $itemvar) {
       $$itemvar = $checkvar[$itemvar] ;
}
$scb=explode(\";<>;\",$sample_7);
$kondata=
\"Name: \".$kondata_1.\"<br>\".
\"Adresse: \".$kondata_3.\" \".$kondata_4.\", \".$kondata_2.\" \".$kondata_5.\"<br>\".
\"Kommentar: \".$kondata_7.\"<br>\".
\"<br>\".
\"Festnetz-Telefon: \".$scb[0].\"<br>\".
\"Mobil-Telefon: \".$scb[1].\"<br>\".
\"Emailadresse: \".$scb[2].\"<br>\".
\"<br>\";
$erreichbarkeit=\"\";
if($w2f23_1==1) $erreichbarkeit = \"Nächsten Wochen erreichbar (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$ww2f24_2.\"-)\";
if($w2f23_2==2) $erreichbarkeit = \"Nächsten Wochen im Urlaub/Ausland (\".$w2f23_opn2.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";
if($w2f23_3==3) $erreichbarkeit = \"Nächsten Wochen im Krankenhaus (\".$w2f23_opn3.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";
if($w2f23_4==4) $erreichbarkeit = \"Nächsten Wochen abwesend (\".$w2f23_opn4.\") (Abwesend/schlecht erreichbar von -\".$w2f24_1.\"- bis -\".$w2f24_2.\"-)\";

if($savedstatus==1) {
    $text =\"Die nächste <u>\".$methodetxt.\"</u> Befragung soll zwischen dem \".$nxtwavebeststart.\" und \".$nxtwaveende.\" stattfinden.<br>\".
    \"(Die Durchführung ist bereits ab dem  \".$nxtwavestart.\" möglich.)<br>\".
    \"<br>\".
    \"Vereinbaren Sie am besten gleich einen Termin. Bestätigen Sie den Termin mindesten einen Tag vorher!<br>\".
    \"<br>\".
    $kondata.
    $erreichbarkeit.\"<br>\".
    \"<br>\".
    \"Unterbrechen Sie das Interview mit \\\"make appointment\\\".\";
} else if ($savedstatus==2) {
    $text=\"Sie können jetzt (bis \".$nxtwaveende.\") mit der nächsten <u>(\".$methodetxt.\"n)</u> Welle fortfahren! Bestätigen Sie den Termin mindesten einen Tag vorher!<br>\".
    \"<br>\".
    $kondata.
    $erreichbarkeit.\"<br>\".
    \"<br>\";
} else {
    $text=\"Das Zeitfenster für diese Welle (\".$nxtwavestart.\" bis \".$nxtwaveende.\") ist bereits abgelaufen. Wenn möglich fahren Sie mit der nächsten Welle fort!\".
    \"<br>\";
}

if(reset(getVar(\"auscomplete\"))==1) {
    $bez=reset(getVar(\"sample_6\"));
    $bez_array=explode(\";<>;\",$bez);

    $txtchck = sprintf(\'sample_6,austmende,ausf1,ausf2_1,ausf2_2,ausf3,ausf3_opn,ausf4_1\');
    $checkvar = getVar($txtchck);
    $allvars = $txtchck;
    foreach (explode(\",\",$allvars) as $itemvar) {
           $$itemvar = $checkvar[$itemvar] ;
    }
    $text.= \"Auskunft der Bezugsperson (\".$bez_array[0].\") vom \".$austmende.\"):<br>\".
    \"Status bzw. Aufenthalt:\" .getAnswerText2(\"ausf1\",$ausf1).\"<br>\";
    if($ausf3==1)  $text .= \"retour ab: \".$ausf3_opn.\"<br>\";
    else if ($ausf3==2 || $ausf3==3)  $text .= \"retour ab: \".getAnswerText2(\"ausf3\",$ausf3).\"<br>\";
    $text .=    \"sonstige Infromationen: \".$ausf4_1;
}

setQuestion($text);

';
<stat>INSERT INTO p26604009_tree SET id = '6',id_sup = '0',id_question = '0',orderBy = '1',idLab = 'Dummy',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '7',id_sup = '0',id_question = '0',orderBy = '2',idLab = 'Start',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '8',id_sup = '0',id_question = '0',orderBy = '3',idLab = 'VER',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '9',id_sup = '0',id_question = '0',orderBy = '13',idLab = 'END',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '10',id_sup = '6',id_question = '10',orderBy = '1',idLab = 'Projektdaten',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '12',id_sup = '7',id_question = '12',orderBy = '1',idLab = 'TEST',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '16',id_sup = '8',id_question = '16',orderBy = '2',idLab = 'kondata',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '17',id_sup = '8',id_question = '17',orderBy = '3',idLab = 'streetname',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '18',id_sup = '8',id_question = '18',orderBy = '4',idLab = 'vernr',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '19',id_sup = '8',id_question = '19',orderBy = '5',idLab = 'intnr',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '20',id_sup = '8',id_question = '20',orderBy = '6',idLab = 'verng2',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '21',id_sup = '8',id_question = '21',orderBy = '7',idLab = 'verende',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '22',id_sup = '8',id_question = '22',orderBy = '8',idLab = 'verng1',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '23',id_sup = '36',id_question = '0',orderBy = '62',idLab = 'Covid19',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '24',id_sup = '23',id_question = '24',orderBy = '1',idLab = 'structureid',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '25',id_sup = '23',id_question = '25',orderBy = '2',idLab = 'formular',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '26',id_sup = '23',id_question = '26',orderBy = '3',idLab = 'source',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '27',id_sup = '23',id_question = '27',orderBy = '4',idLab = 'resp',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '28',id_sup = '23',id_question = '28',orderBy = '5',idLab = 'iv',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '29',id_sup = '23',id_question = '29',orderBy = '6',idLab = 'formdata',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '30',id_sup = '23',id_question = '30',orderBy = '8',idLab = 'checkq',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '31',id_sup = '23',id_question = '31',orderBy = '9',idLab = 'checkdummy',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '32',id_sup = '23',id_question = '32',orderBy = '10',idLab = 'CoronaTS',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '33',id_sup = '9',id_question = '33',orderBy = '1',idLab = 'BREAK',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '34',id_sup = '9',id_question = '34',orderBy = '2',idLab = 'ENDIV',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '35',id_sup = '9',id_question = '35',orderBy = '3',idLab = 'fbende',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '36',id_sup = '0',id_question = '0',orderBy = '4',idLab = '1.Welle',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '37',id_sup = '36',id_question = '37',orderBy = '3',idLab = 'sca',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '38',id_sup = '36',id_question = '38',orderBy = '4',idLab = 'scb',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '39',id_sup = '36',id_question = '39',orderBy = '7',idLab = 'w1f1',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '40',id_sup = '36',id_question = '40',orderBy = '8',idLab = 'w1f2',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '41',id_sup = '36',id_question = '41',orderBy = '9',idLab = 'w1f3',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '42',id_sup = '36',id_question = '42',orderBy = '10',idLab = 'w1f4',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '43',id_sup = '36',id_question = '43',orderBy = '11',idLab = 'w1f5',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '44',id_sup = '36',id_question = '44',orderBy = '12',idLab = 'w1f6',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '45',id_sup = '36',id_question = '45',orderBy = '14',idLab = 'w1f8',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '46',id_sup = '36',id_question = '46',orderBy = '15',idLab = 'w1f9',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '47',id_sup = '36',id_question = '47',orderBy = '16',idLab = 'w1f10',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '48',id_sup = '36',id_question = '48',orderBy = '17',idLab = 'w1f11',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '49',id_sup = '36',id_question = '49',orderBy = '18',idLab = 'w1f12',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '50',id_sup = '36',id_question = '50',orderBy = '19',idLab = 'w1f13',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '51',id_sup = '36',id_question = '51',orderBy = '20',idLab = 'w1f14',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '52',id_sup = '36',id_question = '52',orderBy = '21',idLab = 'w1f15',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '53',id_sup = '36',id_question = '53',orderBy = '22',idLab = 'w1f16',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '54',id_sup = '36',id_question = '54',orderBy = '23',idLab = 'w1f17',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '55',id_sup = '36',id_question = '55',orderBy = '24',idLab = 'w1f18',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '56',id_sup = '36',id_question = '56',orderBy = '25',idLab = 'w1f19',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '57',id_sup = '36',id_question = '57',orderBy = '26',idLab = 'w1f20',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '58',id_sup = '36',id_question = '58',orderBy = '27',idLab = 'w1f21',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '59',id_sup = '36',id_question = '59',orderBy = '28',idLab = 'w1f22',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '60',id_sup = '36',id_question = '60',orderBy = '29',idLab = 'w1f23',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '61',id_sup = '36',id_question = '61',orderBy = '30',idLab = 'w1f24',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '62',id_sup = '36',id_question = '62',orderBy = '31',idLab = 'w1f25',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '63',id_sup = '36',id_question = '63',orderBy = '32',idLab = 'w1f26',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '64',id_sup = '36',id_question = '64',orderBy = '33',idLab = 'w1f27',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '65',id_sup = '36',id_question = '65',orderBy = '34',idLab = 'w1i28',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '66',id_sup = '36',id_question = '66',orderBy = '36',idLab = 'w1f28',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '67',id_sup = '36',id_question = '67',orderBy = '37',idLab = 'w1f29',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '68',id_sup = '36',id_question = '68',orderBy = '38',idLab = 'w1f30',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '69',id_sup = '36',id_question = '69',orderBy = '39',idLab = 'w1f31',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '70',id_sup = '36',id_question = '70',orderBy = '40',idLab = 'w1f32',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '71',id_sup = '36',id_question = '71',orderBy = '41',idLab = 'w1f33',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '72',id_sup = '36',id_question = '72',orderBy = '42',idLab = 'w1f34',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '73',id_sup = '36',id_question = '73',orderBy = '43',idLab = 'w1f35',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '74',id_sup = '36',id_question = '74',orderBy = '44',idLab = 'w1f36',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '75',id_sup = '36',id_question = '75',orderBy = '45',idLab = 'w1f37',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '76',id_sup = '36',id_question = '76',orderBy = '46',idLab = 'w1f38',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '77',id_sup = '36',id_question = '77',orderBy = '47',idLab = 'w1f39',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '78',id_sup = '36',id_question = '78',orderBy = '48',idLab = 'w1f40',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '79',id_sup = '36',id_question = '79',orderBy = '49',idLab = 'w1f41',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '80',id_sup = '36',id_question = '80',orderBy = '50',idLab = 'w1f42',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '81',id_sup = '36',id_question = '81',orderBy = '51',idLab = 'w1f43',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '82',id_sup = '8',id_question = '82',orderBy = '1',idLab = 'w1f44',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '83',id_sup = '36',id_question = '83',orderBy = '52',idLab = 'w1i45',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '84',id_sup = '36',id_question = '84',orderBy = '53',idLab = 'w1f45',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '86',id_sup = '36',id_question = '86',orderBy = '54',idLab = 'w1f46',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '87',id_sup = '36',id_question = '87',orderBy = '55',idLab = 'w1f47',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '88',id_sup = '36',id_question = '88',orderBy = '56',idLab = 'w1f48',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '89',id_sup = '36',id_question = '89',orderBy = '57',idLab = 'w1f49',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '90',id_sup = '36',id_question = '90',orderBy = '58',idLab = 'w1f50',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '91',id_sup = '36',id_question = '91',orderBy = '59',idLab = 'w1f51',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '92',id_sup = '36',id_question = '92',orderBy = '60',idLab = 'w1complete',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '93',id_sup = '36',id_question = '93',orderBy = '64',idLab = 'w1danke',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '94',id_sup = '36',id_question = '94',orderBy = '1',idLab = 'w1intnr',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '96',id_sup = '36',id_question = '96',orderBy = '2',idLab = 'w1respid',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '97',id_sup = '36',id_question = '97',orderBy = '5',idLab = 'w1ft',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '98',id_sup = '36',id_question = '98',orderBy = '6',idLab = 'w1tmstart',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '99',id_sup = '36',id_question = '99',orderBy = '61',idLab = 'w1tmende',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '100',id_sup = '36',id_question = '100',orderBy = '13',idLab = 'w1f7',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '101',id_sup = '36',id_question = '101',orderBy = '35',idLab = 'w1i28ww',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '105',id_sup = '6',id_question = '105',orderBy = '3',idLab = 'timeslotstart',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '106',id_sup = '6',id_question = '106',orderBy = '4',idLab = 'timeslotende',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '107',id_sup = '36',id_question = '107',orderBy = '63',idLab = 'w1StatNxtWave',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '108',id_sup = '0',id_question = '0',orderBy = '5',idLab = '2.Welle',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '109',id_sup = '108',id_question = '109',orderBy = '35',idLab = 'w2complete',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '110',id_sup = '108',id_question = '110',orderBy = '3',idLab = 'w2catiein',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '111',id_sup = '108',id_question = '111',orderBy = '4',idLab = 'w2catitermin',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '112',id_sup = '108',id_question = '112',orderBy = '6',idLab = 'w2ein',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '113',id_sup = '108',id_question = '113',orderBy = '8',idLab = 'w2f1',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '114',id_sup = '108',id_question = '114',orderBy = '9',idLab = 'w2f2',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '115',id_sup = '108',id_question = '115',orderBy = '10',idLab = 'w2f3',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '116',id_sup = '108',id_question = '116',orderBy = '11',idLab = 'w2f4',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '117',id_sup = '108',id_question = '117',orderBy = '12',idLab = 'w2f5',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '118',id_sup = '108',id_question = '118',orderBy = '13',idLab = 'w2f6',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '119',id_sup = '108',id_question = '119',orderBy = '14',idLab = 'w2f7',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '120',id_sup = '108',id_question = '120',orderBy = '15',idLab = 'w2f8',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '121',id_sup = '108',id_question = '121',orderBy = '16',idLab = 'w2f9',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '122',id_sup = '108',id_question = '122',orderBy = '17',idLab = 'w2i10',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '123',id_sup = '108',id_question = '123',orderBy = '18',idLab = 'w2i10ww',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '124',id_sup = '108',id_question = '124',orderBy = '19',idLab = 'w2f10',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '125',id_sup = '108',id_question = '125',orderBy = '20',idLab = 'w2f11',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '126',id_sup = '108',id_question = '126',orderBy = '21',idLab = 'w2f12',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '127',id_sup = '108',id_question = '127',orderBy = '22',idLab = 'w2f13',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '128',id_sup = '108',id_question = '128',orderBy = '23',idLab = 'w2f14',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '129',id_sup = '108',id_question = '129',orderBy = '24',idLab = 'w2f15',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '130',id_sup = '108',id_question = '130',orderBy = '25',idLab = 'w2f16',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '131',id_sup = '108',id_question = '131',orderBy = '26',idLab = 'w2f17',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '132',id_sup = '108',id_question = '132',orderBy = '27',idLab = 'w2i18',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '135',id_sup = '108',id_question = '135',orderBy = '29',idLab = 'w2f19',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '136',id_sup = '108',id_question = '136',orderBy = '30',idLab = 'w2f20',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '137',id_sup = '108',id_question = '137',orderBy = '31',idLab = 'w2f21',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '138',id_sup = '108',id_question = '138',orderBy = '32',idLab = 'w2f22',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '139',id_sup = '108',id_question = '139',orderBy = '1',idLab = 'w2intnr',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '140',id_sup = '108',id_question = '140',orderBy = '2',idLab = 'w2respid',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '141',id_sup = '108',id_question = '141',orderBy = '7',idLab = 'w2ft',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '142',id_sup = '108',id_question = '142',orderBy = '5',idLab = 'w2tmstart',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '143',id_sup = '108',id_question = '143',orderBy = '36',idLab = 'w2tmende',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '144',id_sup = '108',id_question = '144',orderBy = '42',idLab = 'w2StatNxtWave',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '145',id_sup = '108',id_question = '145',orderBy = '43',idLab = 'w2danke',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '148',id_sup = '108',id_question = '148',orderBy = '37',idLab = 'w2formular',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '152',id_sup = '108',id_question = '152',orderBy = '41',idLab = 'w2formdata',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '153',id_sup = '108',id_question = '153',orderBy = '38',idLab = 'w2checkq',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '154',id_sup = '108',id_question = '154',orderBy = '39',idLab = 'w2checkdummy',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '155',id_sup = '108',id_question = '155',orderBy = '40',idLab = 'w2CoronaTS',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '156',id_sup = '0',id_question = '0',orderBy = '12',idLab = 'Ausfall',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '158',id_sup = '0',id_question = '0',orderBy = '6',idLab = '3.Welle',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '161',id_sup = '6',id_question = '161',orderBy = '2',idLab = 'sample',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '162',id_sup = '156',id_question = '162',orderBy = '2',idLab = 'ausein',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '163',id_sup = '156',id_question = '163',orderBy = '4',idLab = 'ausf1',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '164',id_sup = '156',id_question = '164',orderBy = '5',idLab = 'ausf2',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '165',id_sup = '156',id_question = '165',orderBy = '6',idLab = 'ausf3',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '166',id_sup = '156',id_question = '166',orderBy = '7',idLab = 'ausf4',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '167',id_sup = '156',id_question = '167',orderBy = '10',idLab = 'ausdanke',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '168',id_sup = '156',id_question = '168',orderBy = '1',idLab = 'ausintnr',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '169',id_sup = '156',id_question = '169',orderBy = '3',idLab = 'austmstart',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '170',id_sup = '156',id_question = '170',orderBy = '8',idLab = 'auscomplete',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '171',id_sup = '156',id_question = '171',orderBy = '9',idLab = 'austmende',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '172',id_sup = '0',id_question = '0',orderBy = '7',idLab = '4.Welle',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '173',id_sup = '0',id_question = '0',orderBy = '8',idLab = '5.Welle',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '174',id_sup = '0',id_question = '0',orderBy = '9',idLab = '6.Welle',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '175',id_sup = '0',id_question = '0',orderBy = '10',idLab = '7.Welle',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '180',id_sup = '23',id_question = '180',orderBy = '7',idLab = 'w1formdata',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '183',id_sup = '108',id_question = '183',orderBy = '33',idLab = 'w2f23',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '184',id_sup = '108',id_question = '184',orderBy = '34',idLab = 'w2f24',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '187',id_sup = '175',id_question = '187',orderBy = '1',idLab = 'w7intnr',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '188',id_sup = '175',id_question = '188',orderBy = '2',idLab = 'w7respid',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '189',id_sup = '175',id_question = '189',orderBy = '3',idLab = 'w7catiein',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '190',id_sup = '175',id_question = '190',orderBy = '4',idLab = 'w7catitermin',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '191',id_sup = '175',id_question = '191',orderBy = '5',idLab = 'w7tmstart',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '192',id_sup = '175',id_question = '192',orderBy = '6',idLab = 'w7ein',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '193',id_sup = '175',id_question = '193',orderBy = '7',idLab = 'w7ft',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '194',id_sup = '175',id_question = '194',orderBy = '8',idLab = 'w7f1',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '195',id_sup = '175',id_question = '195',orderBy = '9',idLab = 'w7f2',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '196',id_sup = '175',id_question = '196',orderBy = '10',idLab = 'w7f3',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '197',id_sup = '175',id_question = '197',orderBy = '11',idLab = 'w7f4',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '198',id_sup = '175',id_question = '198',orderBy = '12',idLab = 'w7f5',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '199',id_sup = '175',id_question = '199',orderBy = '13',idLab = 'w7f6',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '200',id_sup = '175',id_question = '200',orderBy = '14',idLab = 'w7f7',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '201',id_sup = '175',id_question = '201',orderBy = '15',idLab = 'w7f8',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '202',id_sup = '175',id_question = '202',orderBy = '16',idLab = 'w7f9',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '203',id_sup = '175',id_question = '203',orderBy = '17',idLab = 'w7i10',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '204',id_sup = '175',id_question = '204',orderBy = '18',idLab = 'w7i10ww',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '205',id_sup = '175',id_question = '205',orderBy = '19',idLab = 'w7f10',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '206',id_sup = '175',id_question = '206',orderBy = '20',idLab = 'w7f11',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '207',id_sup = '175',id_question = '207',orderBy = '21',idLab = 'w7f12',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '208',id_sup = '175',id_question = '208',orderBy = '22',idLab = 'w7f13',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '209',id_sup = '175',id_question = '209',orderBy = '23',idLab = 'w7f14',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '210',id_sup = '175',id_question = '210',orderBy = '24',idLab = 'w7f15',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '211',id_sup = '175',id_question = '211',orderBy = '25',idLab = 'w7f16',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '212',id_sup = '175',id_question = '212',orderBy = '26',idLab = 'w7f17',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '213',id_sup = '175',id_question = '213',orderBy = '27',idLab = 'w7i18',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '214',id_sup = '175',id_question = '214',orderBy = '29',idLab = 'w7f19',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '215',id_sup = '175',id_question = '215',orderBy = '30',idLab = 'w7f20',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '216',id_sup = '175',id_question = '216',orderBy = '31',idLab = 'w7f21',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '217',id_sup = '175',id_question = '217',orderBy = '32',idLab = 'w7f22',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '218',id_sup = '175',id_question = '218',orderBy = '33',idLab = 'w7f23',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '219',id_sup = '175',id_question = '219',orderBy = '34',idLab = 'w7f24',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '220',id_sup = '175',id_question = '220',orderBy = '35',idLab = 'w7complete',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '221',id_sup = '175',id_question = '221',orderBy = '36',idLab = 'w7tmende',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '222',id_sup = '175',id_question = '222',orderBy = '37',idLab = 'w7formular',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '223',id_sup = '175',id_question = '223',orderBy = '38',idLab = 'w7checkq',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '224',id_sup = '175',id_question = '224',orderBy = '39',idLab = 'w7checkdummy',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '225',id_sup = '175',id_question = '225',orderBy = '40',idLab = 'w7CoronaTS',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '226',id_sup = '175',id_question = '226',orderBy = '41',idLab = 'w7formdata',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '227',id_sup = '175',id_question = '227',orderBy = '42',idLab = 'w7StatNxtWave',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '228',id_sup = '175',id_question = '228',orderBy = '43',idLab = 'w7danke',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '229',id_sup = '230',id_question = '229',orderBy = '1',idLab = 'Armband',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '230',id_sup = '0',id_question = '0',orderBy = '11',idLab = 'Armband',node_img = '',is_leaf = '0',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '234',id_sup = '108',id_question = '234',orderBy = '28',idLab = 'w2f18',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '235',id_sup = '175',id_question = '235',orderBy = '28',idLab = 'w7f18',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '236',id_sup = '158',id_question = '236',orderBy = '1',idLab = 'w3intnr',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '237',id_sup = '158',id_question = '237',orderBy = '2',idLab = 'w3respid',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '238',id_sup = '158',id_question = '238',orderBy = '3',idLab = 'w3catiein',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '239',id_sup = '158',id_question = '239',orderBy = '4',idLab = 'w3catitermin',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '240',id_sup = '158',id_question = '240',orderBy = '5',idLab = 'w3tmstart',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '241',id_sup = '158',id_question = '241',orderBy = '6',idLab = 'w3ein',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '242',id_sup = '158',id_question = '242',orderBy = '7',idLab = 'w3ft',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '243',id_sup = '158',id_question = '243',orderBy = '8',idLab = 'w3f1',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '244',id_sup = '158',id_question = '244',orderBy = '9',idLab = 'w3f2',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '245',id_sup = '158',id_question = '245',orderBy = '10',idLab = 'w3f3',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '246',id_sup = '158',id_question = '246',orderBy = '11',idLab = 'w3f4',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '247',id_sup = '158',id_question = '247',orderBy = '12',idLab = 'w3f5',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '248',id_sup = '158',id_question = '248',orderBy = '13',idLab = 'w3f6',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '249',id_sup = '158',id_question = '249',orderBy = '14',idLab = 'w3f7',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '250',id_sup = '158',id_question = '250',orderBy = '15',idLab = 'w3f8',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '251',id_sup = '158',id_question = '251',orderBy = '16',idLab = 'w3f9',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '252',id_sup = '158',id_question = '252',orderBy = '17',idLab = 'w3i10',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '253',id_sup = '158',id_question = '253',orderBy = '18',idLab = 'w3i10ww',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '254',id_sup = '158',id_question = '254',orderBy = '19',idLab = 'w3f10',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '255',id_sup = '158',id_question = '255',orderBy = '20',idLab = 'w3f11',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '256',id_sup = '158',id_question = '256',orderBy = '21',idLab = 'w3f12',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '257',id_sup = '158',id_question = '257',orderBy = '22',idLab = 'w3f13',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '258',id_sup = '158',id_question = '258',orderBy = '23',idLab = 'w3f14',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '259',id_sup = '158',id_question = '259',orderBy = '24',idLab = 'w3f15',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '260',id_sup = '158',id_question = '260',orderBy = '25',idLab = 'w3f16',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '261',id_sup = '158',id_question = '261',orderBy = '26',idLab = 'w3f17',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '262',id_sup = '158',id_question = '262',orderBy = '27',idLab = 'w3i18',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '263',id_sup = '158',id_question = '263',orderBy = '28',idLab = 'w3f18',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '264',id_sup = '158',id_question = '264',orderBy = '29',idLab = 'w3f19',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '265',id_sup = '158',id_question = '265',orderBy = '30',idLab = 'w3f20',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '266',id_sup = '158',id_question = '266',orderBy = '31',idLab = 'w3f21',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '267',id_sup = '158',id_question = '267',orderBy = '32',idLab = 'w3f22',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '268',id_sup = '158',id_question = '268',orderBy = '33',idLab = 'w3f23',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '269',id_sup = '158',id_question = '269',orderBy = '34',idLab = 'w3f24',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '270',id_sup = '158',id_question = '270',orderBy = '35',idLab = 'w3complete',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '271',id_sup = '158',id_question = '271',orderBy = '36',idLab = 'w3tmende',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '272',id_sup = '158',id_question = '272',orderBy = '37',idLab = 'w3formular',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '273',id_sup = '158',id_question = '273',orderBy = '38',idLab = 'w3checkq',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '274',id_sup = '158',id_question = '274',orderBy = '39',idLab = 'w3checkdummy',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '275',id_sup = '158',id_question = '275',orderBy = '40',idLab = 'w3CoronaTS',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '276',id_sup = '158',id_question = '276',orderBy = '41',idLab = 'w3formdata',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '277',id_sup = '158',id_question = '277',orderBy = '42',idLab = 'w3StatNxtWave',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '278',id_sup = '158',id_question = '278',orderBy = '43',idLab = 'w3danke',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '312',id_sup = '172',id_question = '312',orderBy = '1',idLab = 'w4intnr',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '313',id_sup = '172',id_question = '313',orderBy = '2',idLab = 'w4respid',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '314',id_sup = '172',id_question = '314',orderBy = '3',idLab = 'w4catiein',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '315',id_sup = '172',id_question = '315',orderBy = '4',idLab = 'w4catitermin',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '316',id_sup = '172',id_question = '316',orderBy = '5',idLab = 'w4tmstart',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '317',id_sup = '172',id_question = '317',orderBy = '6',idLab = 'w4ein',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '318',id_sup = '172',id_question = '318',orderBy = '7',idLab = 'w4ft',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '319',id_sup = '172',id_question = '319',orderBy = '8',idLab = 'w4f1',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '320',id_sup = '172',id_question = '320',orderBy = '9',idLab = 'w4f2',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '321',id_sup = '172',id_question = '321',orderBy = '10',idLab = 'w4f3',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '322',id_sup = '172',id_question = '322',orderBy = '11',idLab = 'w4f4',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '323',id_sup = '172',id_question = '323',orderBy = '12',idLab = 'w4f5',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '324',id_sup = '172',id_question = '324',orderBy = '13',idLab = 'w4f6',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '325',id_sup = '172',id_question = '325',orderBy = '14',idLab = 'w4f7',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '326',id_sup = '172',id_question = '326',orderBy = '15',idLab = 'w4f8',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '327',id_sup = '172',id_question = '327',orderBy = '16',idLab = 'w4f9',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '328',id_sup = '172',id_question = '328',orderBy = '17',idLab = 'w4i10',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '329',id_sup = '172',id_question = '329',orderBy = '18',idLab = 'w4i10ww',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '330',id_sup = '172',id_question = '330',orderBy = '19',idLab = 'w4f10',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '331',id_sup = '172',id_question = '331',orderBy = '20',idLab = 'w4f11',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '332',id_sup = '172',id_question = '332',orderBy = '21',idLab = 'w4f12',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '333',id_sup = '172',id_question = '333',orderBy = '22',idLab = 'w4f13',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '334',id_sup = '172',id_question = '334',orderBy = '23',idLab = 'w4f14',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '335',id_sup = '172',id_question = '335',orderBy = '24',idLab = 'w4f15',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '336',id_sup = '172',id_question = '336',orderBy = '25',idLab = 'w4f16',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '337',id_sup = '172',id_question = '337',orderBy = '26',idLab = 'w4f17',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '338',id_sup = '172',id_question = '338',orderBy = '27',idLab = 'w4i18',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '339',id_sup = '172',id_question = '339',orderBy = '28',idLab = 'w4f18',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '340',id_sup = '172',id_question = '340',orderBy = '29',idLab = 'w4f19',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '341',id_sup = '172',id_question = '341',orderBy = '30',idLab = 'w4f20',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '342',id_sup = '172',id_question = '342',orderBy = '31',idLab = 'w4f21',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '343',id_sup = '172',id_question = '343',orderBy = '32',idLab = 'w4f22',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '344',id_sup = '172',id_question = '344',orderBy = '33',idLab = 'w4f23',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '345',id_sup = '172',id_question = '345',orderBy = '34',idLab = 'w4f24',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '346',id_sup = '172',id_question = '346',orderBy = '35',idLab = 'w4complete',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '347',id_sup = '172',id_question = '347',orderBy = '36',idLab = 'w4tmende',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '348',id_sup = '172',id_question = '348',orderBy = '37',idLab = 'w4formular',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '349',id_sup = '172',id_question = '349',orderBy = '38',idLab = 'w4checkq',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '350',id_sup = '172',id_question = '350',orderBy = '39',idLab = 'w4checkdummy',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '351',id_sup = '172',id_question = '351',orderBy = '40',idLab = 'w4CoronaTS',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '352',id_sup = '172',id_question = '352',orderBy = '41',idLab = 'w4formdata',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '353',id_sup = '172',id_question = '353',orderBy = '42',idLab = 'w4StatNxtWave',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '354',id_sup = '172',id_question = '354',orderBy = '43',idLab = 'w4danke',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '355',id_sup = '173',id_question = '355',orderBy = '1',idLab = 'w5intnr',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '356',id_sup = '173',id_question = '356',orderBy = '2',idLab = 'w5respid',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '357',id_sup = '173',id_question = '357',orderBy = '3',idLab = 'w5catiein',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '358',id_sup = '173',id_question = '358',orderBy = '4',idLab = 'w5catitermin',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '359',id_sup = '173',id_question = '359',orderBy = '5',idLab = 'w5tmstart',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '360',id_sup = '173',id_question = '360',orderBy = '6',idLab = 'w5ein',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '361',id_sup = '173',id_question = '361',orderBy = '7',idLab = 'w5ft',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '362',id_sup = '173',id_question = '362',orderBy = '8',idLab = 'w5f1',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '363',id_sup = '173',id_question = '363',orderBy = '9',idLab = 'w5f2',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '364',id_sup = '173',id_question = '364',orderBy = '10',idLab = 'w5f3',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '365',id_sup = '173',id_question = '365',orderBy = '11',idLab = 'w5f4',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '366',id_sup = '173',id_question = '366',orderBy = '12',idLab = 'w5f5',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '367',id_sup = '173',id_question = '367',orderBy = '13',idLab = 'w5f6',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '368',id_sup = '173',id_question = '368',orderBy = '14',idLab = 'w5f7',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '369',id_sup = '173',id_question = '369',orderBy = '15',idLab = 'w5f8',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '370',id_sup = '173',id_question = '370',orderBy = '16',idLab = 'w5f9',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '371',id_sup = '173',id_question = '371',orderBy = '17',idLab = 'w5i10',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '372',id_sup = '173',id_question = '372',orderBy = '18',idLab = 'w5i10ww',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '373',id_sup = '173',id_question = '373',orderBy = '19',idLab = 'w5f10',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '374',id_sup = '173',id_question = '374',orderBy = '20',idLab = 'w5f11',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '375',id_sup = '173',id_question = '375',orderBy = '21',idLab = 'w5f12',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '376',id_sup = '173',id_question = '376',orderBy = '22',idLab = 'w5f13',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '377',id_sup = '173',id_question = '377',orderBy = '23',idLab = 'w5f14',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '378',id_sup = '173',id_question = '378',orderBy = '24',idLab = 'w5f15',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '379',id_sup = '173',id_question = '379',orderBy = '25',idLab = 'w5f16',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '380',id_sup = '173',id_question = '380',orderBy = '26',idLab = 'w5f17',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '381',id_sup = '173',id_question = '381',orderBy = '27',idLab = 'w5i18',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '382',id_sup = '173',id_question = '382',orderBy = '28',idLab = 'w5f18',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '383',id_sup = '173',id_question = '383',orderBy = '29',idLab = 'w5f19',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '384',id_sup = '173',id_question = '384',orderBy = '30',idLab = 'w5f20',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '385',id_sup = '173',id_question = '385',orderBy = '31',idLab = 'w5f21',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '386',id_sup = '173',id_question = '386',orderBy = '32',idLab = 'w5f22',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '387',id_sup = '173',id_question = '387',orderBy = '33',idLab = 'w5f23',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '388',id_sup = '173',id_question = '388',orderBy = '34',idLab = 'w5f24',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '389',id_sup = '173',id_question = '389',orderBy = '35',idLab = 'w5complete',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '390',id_sup = '173',id_question = '390',orderBy = '36',idLab = 'w5tmende',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '391',id_sup = '173',id_question = '391',orderBy = '37',idLab = 'w5formular',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '392',id_sup = '173',id_question = '392',orderBy = '38',idLab = 'w5checkq',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '393',id_sup = '173',id_question = '393',orderBy = '39',idLab = 'w5checkdummy',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '394',id_sup = '173',id_question = '394',orderBy = '40',idLab = 'w5CoronaTS',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '395',id_sup = '173',id_question = '395',orderBy = '41',idLab = 'w5formdata',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '396',id_sup = '173',id_question = '396',orderBy = '42',idLab = 'w5StatNxtWave',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '397',id_sup = '173',id_question = '397',orderBy = '43',idLab = 'w5danke',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '398',id_sup = '174',id_question = '398',orderBy = '1',idLab = 'w6intnr',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '399',id_sup = '174',id_question = '399',orderBy = '2',idLab = 'w6respid',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '400',id_sup = '174',id_question = '400',orderBy = '3',idLab = 'w6catiein',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '401',id_sup = '174',id_question = '401',orderBy = '4',idLab = 'w6catitermin',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '402',id_sup = '174',id_question = '402',orderBy = '5',idLab = 'w6tmstart',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '403',id_sup = '174',id_question = '403',orderBy = '6',idLab = 'w6ein',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '404',id_sup = '174',id_question = '404',orderBy = '7',idLab = 'w6ft',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '405',id_sup = '174',id_question = '405',orderBy = '8',idLab = 'w6f1',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '406',id_sup = '174',id_question = '406',orderBy = '9',idLab = 'w6f2',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '407',id_sup = '174',id_question = '407',orderBy = '10',idLab = 'w6f3',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '408',id_sup = '174',id_question = '408',orderBy = '11',idLab = 'w6f4',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '409',id_sup = '174',id_question = '409',orderBy = '12',idLab = 'w6f5',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '410',id_sup = '174',id_question = '410',orderBy = '13',idLab = 'w6f6',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '411',id_sup = '174',id_question = '411',orderBy = '14',idLab = 'w6f7',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '412',id_sup = '174',id_question = '412',orderBy = '15',idLab = 'w6f8',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '413',id_sup = '174',id_question = '413',orderBy = '16',idLab = 'w6f9',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '414',id_sup = '174',id_question = '414',orderBy = '17',idLab = 'w6i10',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '415',id_sup = '174',id_question = '415',orderBy = '18',idLab = 'w6i10ww',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '416',id_sup = '174',id_question = '416',orderBy = '19',idLab = 'w6f10',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '417',id_sup = '174',id_question = '417',orderBy = '20',idLab = 'w6f11',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '418',id_sup = '174',id_question = '418',orderBy = '21',idLab = 'w6f12',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '419',id_sup = '174',id_question = '419',orderBy = '22',idLab = 'w6f13',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '420',id_sup = '174',id_question = '420',orderBy = '23',idLab = 'w6f14',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '421',id_sup = '174',id_question = '421',orderBy = '24',idLab = 'w6f15',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '422',id_sup = '174',id_question = '422',orderBy = '25',idLab = 'w6f16',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '423',id_sup = '174',id_question = '423',orderBy = '26',idLab = 'w6f17',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '424',id_sup = '174',id_question = '424',orderBy = '27',idLab = 'w6i18',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '425',id_sup = '174',id_question = '425',orderBy = '28',idLab = 'w6f18',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '426',id_sup = '174',id_question = '426',orderBy = '29',idLab = 'w6f19',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '427',id_sup = '174',id_question = '427',orderBy = '30',idLab = 'w6f20',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '428',id_sup = '174',id_question = '428',orderBy = '31',idLab = 'w6f21',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '429',id_sup = '174',id_question = '429',orderBy = '32',idLab = 'w6f22',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '430',id_sup = '174',id_question = '430',orderBy = '33',idLab = 'w6f23',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '431',id_sup = '174',id_question = '431',orderBy = '34',idLab = 'w6f24',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '432',id_sup = '174',id_question = '432',orderBy = '35',idLab = 'w6complete',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '433',id_sup = '174',id_question = '433',orderBy = '36',idLab = 'w6tmende',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '434',id_sup = '174',id_question = '434',orderBy = '37',idLab = 'w6formular',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '435',id_sup = '174',id_question = '435',orderBy = '38',idLab = 'w6checkq',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '436',id_sup = '174',id_question = '436',orderBy = '39',idLab = 'w6checkdummy',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '437',id_sup = '174',id_question = '437',orderBy = '40',idLab = 'w6CoronaTS',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '438',id_sup = '174',id_question = '438',orderBy = '41',idLab = 'w6formdata',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '439',id_sup = '174',id_question = '439',orderBy = '42',idLab = 'w6StatNxtWave',node_img = '',is_leaf = '1',showTogether = '0';
<stat>INSERT INTO p26604009_tree SET id = '440',id_sup = '174',id_question = '440',orderBy = '43',idLab = 'w6danke',node_img = '',is_leaf = '1',showTogether = '0';