-- MySQL dump 10.16  Distrib 10.1.44-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost    Database: Warpit_Webcati
-- ------------------------------------------------------
-- Server version	10.1.44-MariaDB-0+deb9u1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `HFCS11_Einschaetzung_script`
--

DROP TABLE IF EXISTS `HFCS11_Einschaetzung_script`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `HFCS11_Einschaetzung_script` (
  `id_question` int(11) NOT NULL,
  `id_event` int(11) NOT NULL,
  `script` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id_question`,`id_event`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `HFCS11_Einschaetzung_script`
--

LOCK TABLES `HFCS11_Einschaetzung_script` WRITE;
/*!40000 ALTER TABLE `HFCS11_Einschaetzung_script` DISABLE KEYS */;
INSERT INTO `HFCS11_Einschaetzung_script` VALUES (7,1,'$AHL0110 = reset(getVar(\"AHL0110\"));\n\n$address =  getAddress(\"HFCS_Base\");\n$questTxt = \"Können Sie mir bestätigen, dass \";\n$questTxt .= \"<b>\".$address[\"street\"].\", \".$address[\"plz\"].\" \".$address[\"ort\"].\"</b>\";\n$questTxt .= \" die korrekte Adresse des Haushalts ist?\";\n\nsaveVar(\"questtxt_1 = \'\".$questTxt.\"\'\");\n\n$instxt = \"\";\nif ($AHL0110 == 2) {\n    $instxt = \"Abweichung klären und gegebenenfalls Feldleitung informieren!\";\n}\nsetInstruction($instxt);\n'),(9,1,'\n'),(9,2,'$AHL0121 = reset(getVar(\"AHL0121\"));\n\n$instxt = \"Interviewer: Bitte bestätigen Sie, das jener Haushalt ausgewählt wurde, dem die Person angehört, \n    die das Infromationsschreiben erhalten hat (Interviewer führt eine Kopie mit sich).\";\nif ($AHL0121 == 2) {\n    $instxt .= \"<br><br>Interviewer: Suchen Sie den Haushalt auf, dem die Person angehört die das Infromationsschreiben erhalten hat.\";\n}\nsetInstruction($instxt);'),(19,1,'\n'),(19,2,'getQuestData();'),(20,2,'\ngetQuestData();\necho \"TEST\";\n'),(51,2,'\n'),(51,1,'if(!isProxy()) {\n    saveVar(\"refPers_1=\'\".reset(getVar(\"AHL0130_opn\")).\"\'\");\n}\n\n'),(38,2,'\n'),(130,1,'makePersList();'),(28,2,'        $anzPers = anzPers();\n        $questtxt = \"Sie haben folgende Haushaltsmitglieder angegeben. Ist dieser Auflistung korrekt?<br><br>\";\n        for ($pers=1;$pers<=$anzPers;$pers++) {\n            $questtxt .= reset(getVar(\"dumPers_\".$pers)).\"<br>\";\n        }\n        $questtxt .= \"<br>\";\nsetQuestion($questtxt);'),(131,1,'\n'),(131,2,'getQuestData();'),(38,3,'\nvar anzpers = document.getElementById(\"anzpers\").value;\nvar start = parseInt(anzpers)+1;\n//alert(start);\n\nvar it;\n    document.getElementById(\"ct_RA010x1\").disabled = true;\n    document.getElementById(\"ct_ARA091x1\").disabled = true;\n         \n\nfor (it=1;it<=15;it=it+1) {\n        //alert(\"ct_RA000x\"+it+\"_1\");\n    document.getElementById(\"ct_ARA092x\"+it+\"\")\n         .parentNode.parentNode.parentNode.parentNode.parentNode.style.display=\"none\";\n    \n    document.getElementById(\"ct_ARA091x\"+it+\"\").addEventListener(\n         \'change\',\n        function(){\n            if(this.value==2) {\n                var res = this.id.substring(10, 12);\n            //alert(\"Wert: \"+this.value+\"<br>it: \"+res);\n                document.getElementById(\"ct_ARA092x\"+res+\"\")\n                 .parentNode.parentNode.parentNode.parentNode.parentNode.style.display=\"block\";\n                }\n            if(this.value==1) {\n                var res = this.id.substring(10, 12);\n            //alert(\"Wert: \"+this.value+\"<br>it: \"+res);\n                document.getElementById(\"ct_ARA092x\"+res+\"\")\n                 .parentNode.parentNode.parentNode.parentNode.parentNode.style.display=\"none\";\n                }\n        },\n         false\n    );\n}\n\nfor (it=start;it<=15;it=it+1) {\n        //alert(\"ct_RA000x\"+it+\"_1\");\n document.getElementById(\"ct_RA000x\"+it+\"_1\")\n     .parentNode.parentNode.parentNode.parentNode.parentNode\n     .parentNode.parentNode.parentNode.parentNode.parentNode\n     .parentNode.parentNode.parentNode.parentNode.parentNode\n     .parentNode.parentNode.parentNode.parentNode.parentNode.style.display=\"none\";\n    }\n\n'),(38,1,'$anzpers = reset(getVar(\"AHL0210_1\"));\nsaveVar(\"RA010x1=1\");\necho \'<input id=projname type=\"hidden\" name=\"for Ajax1\" value=\"\'.$_SESSION[\'projname\'].\'\">\';\necho \'<input id=idrecord type=\"hidden\" name=\"for Ajax2\" value=\"\'.$_SESSION[\'id_record\'].\'\">\';\necho \'<input id=anzpers type=\"hidden\" name=\"for Ajax3\" value=\"\'.$anzpers.\'\">\';\n\n'),(16,3,'/*\nbutton = document.getElementById(\"submitCallStatus\");\n\n\nbutton.onclick = function() {\n    window.close();\n}\n*/\n\n'),(140,1,'\n'),(14,1,'saveId();'),(143,1,'\n'),(144,1,'\n'),(145,1,'\n'),(140,2,'getQuestData();\n'),(143,2,'\n'),(144,2,'\n'),(145,2,'\n'),(153,1,'getQuestData(\"hfcs01xdummy\");'),(154,2,'getQuestData(\"Treatment\");'),(16,2,'getQuestData(\"ENDIV\");'),(0,3,'setCustomDesignerText(\'custTitle\', \'HFCS 2020 - Einschätzungen\');'),(162,2,'getQuestData();'),(146,1,'getQuestData(\"AHA1100\");'),(135,2,'getQuestData();'),(162,3,'for (var inp=1;inp<=5;inp++) {\n    $(\"#ct_AHA1410_\"+inp).hide();\n    $(\"#test\"+inp).detach().appendTo($(\"#op_AHA1410_\"+inp).parent());\n}\n$( document ).ready(function() {\n    console.log( \"ready!\" );\n    var summe = 0;\n    for (var inp=1;inp<=5;inp++) {\n        var posvalue=0;\n        if (isNaN(parseInt($(\"#op_AHA1410_\"+inp).val()))) { \n        } else {\n            posvalue = parseInt($(\"#op_AHA1410_\"+inp).val());\n        }\n        summe = summe +posvalue;\n    }\n    var rest = 100-summe;\n    $(\"#rest\").html(rest);\n    $(\"#rest\").css(\"color\", \"black\");\n    if (rest<0) $(\"#rest\").css(\"color\", \"red\");\n});\n\n$( \"input\" ).on(\n    \"change\", // Bind handlers for multiple events\n    function() {\n        var summe = 0;\n        for (var inp=1;inp<=5;inp++) {\n            var posvalue=0;\n            if (isNaN(parseInt($(\"#op_AHA1410_\"+inp).val()))) { \n                $(\"#op_AHA1410_\"+inp).val(\"\");\n            } else {\n                $(\"#op_AHA1410_\"+inp).val(parseInt($(\"#op_AHA1410_\"+inp).val()));\n                posvalue = parseInt($(\"#op_AHA1410_\"+inp).val());\n            }\n            summe = summe +posvalue;\n        }\n        var rest = 100-summe;\n        $(\"#rest\").html(rest);\n        $(\"#rest\").css(\"color\", \"black\");\n    if (rest<0) {\n        $(\"#rest\").css(\"color\", \"red\");\n        alert(\"Es sollen (maximal) 100 Punkte verteilt werden!\");\n    }\n    }\n);'),(164,2,'getQuestData();');
/*!40000 ALTER TABLE `HFCS11_Einschaetzung_script` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2020-05-28 17:23:12
