-- 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 `HFCS01_Screener_script`
--

DROP TABLE IF EXISTS `HFCS01_Screener_script`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `HFCS01_Screener_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 `HFCS01_Screener_script`
--

LOCK TABLES `HFCS01_Screener_script` WRITE;
/*!40000 ALTER TABLE `HFCS01_Screener_script` DISABLE KEYS */;
INSERT INTO `HFCS01_Screener_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(\"questtext_1 = \'\".$questTxt.\"\'\");\n\n$instxt = \"\";\nif ($AHL0110 == 2) {\n    $instxt = \"Abweichung klären und gegebenenfalls Feldleitung informieren!\";\n}\nsetInstruction($instxt);\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);'),(130,1,'makePersList(\"all\");'),(28,2,'getQuestData();\n'),(131,2,'getQuestData();'),(20,2,'getQuestData();'),(51,2,'if(!isProxy()) {\n    saveVar(\"refPers_1=\'\".reset(getVar(\"AHL0130_opn\")).\"\'\");\n}'),(38,2,'$AHL0130 = reset(getVar(\"AHL0130\"));\n$AHL0130_opn = reset(getVar(\"AHL0130_opn\"));\n$refPers_1 = reset(getVar(\"refPers_1\"));\n\nif ($AHL0130 == 1) {\n    saveVar(\"RA000x1_1=\'\".$AHL0130_opn.\"\'\");\n    } else {\n    saveVar(\"RA000x1_1=\'\".$refPers_1.\"\'\");\n    }\n$anzpers1=0;\nif (reset(getVar(\"AHL0210_1\"))!=NULL) {\n    $anzpers1 = reset(getVar(\"AHL0210_1\"));\n}\n$anzpers2=0;\nif (reset(getVar(\"AHL0240_1\"))!=NULL) {\n    $anzpers2 = reset(getVar(\"AHL0240_1\"));\n}\n$anzpers = $anzpers1 + $anzpers2;\n\nsaveVar(\"RA010x1=1\");\nsaveVar(\"ARA091x1=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'),(38,1,'$AHL0130 = reset(getVar(\"AHL0130\"));\n$AHL0130_opn = reset(getVar(\"AHL0130_opn\"));\n$refPers_1 = reset(getVar(\"refPers_1\"));\n\nif ($AHL0130 == 1) {\n    saveVar(\"RA000x1_1=\'\".$AHL0130_opn.\"\'\");\n    } else {\n    saveVar(\"RA000x1_1=\'\".$refPers_1.\"\'\");\n    }\n$anzpers1=0;\nif (reset(getVar(\"AHL0210_1\"))!=NULL) {\n    $anzpers1 = reset(getVar(\"AHL0210_1\"));\n}\n$anzpers2=0;\nif (reset(getVar(\"AHL0240_1\"))!=NULL) {\n    $anzpers2 = reset(getVar(\"AHL0240_1\"));\n}\n$anzpers = $anzpers1 + $anzpers2;\n\nsaveVar(\"RA010x1=1\");\nsaveVar(\"ARA091x1=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.\'\">\';'),(38,3,'var 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\nfor (it=1;it<=15;it=it+1) {\n        console.log(\"ct_RA000x\"+it+\"_1\");\n        //alert(\"ct_RA000x\"+it+\"_1\");\n    if (document.getElementById(\"ct_ARA091x\"+it+\"\").value!=2) {\n        document.getElementById(\"ct_ARA092x\"+it+\"\")\n         .parentNode.parentNode.parentNode.parentNode.parentNode.style.display=\"none\";\n    }\n    $(\"#ct_RA000x\"+it+\"_1\").width(\"300px\");\n    //document.getElementById(\"ct_RA020x\"+it+\"\").style[\"width\"] = \"90px\";\n    //document.getElementById(\"ct_RA030x\"+it+\"\").style[\"width\"] = \"70px\";\n    //document.getElementById(\"ct_RA010x\"+it+\"\").style[\"width\"] = \"220px\";\n    //document.getElementById(\"ct_ARA091x\"+it+\"\").style[\"width\"] = \"60px\";\n    //document.getElementById(\"ct_ARA092x\"+it+\"\").style[\"width\"] = \"50px\";\n        console.log(\"Bis hier her\");\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    \nvar textboxes = document.querySelectorAll(\'input[typ=\"text\"]\');\nvar num = textboxes.length;\n\n'),(16,1,'saveVar(\"ENDIV=1\");'),(16,2,'getQuestData(\"ENDIV\");'),(33,2,'getQuestData();\n'),(16,3,'/*\nbutton = document.getElementById(\"submitCallStatus\");\n\n\nbutton.onclick = function() {\n    window.close();\n}\n*/\n\n'),(14,1,'saveId();\n\ngetVarFromHFCS(\"HFCS01_Screener\",\"d_start\");'),(19,2,'getQuestData();'),(29,2,'saveVar(\"AHL0240_1=NULL\");'),(32,2,'makePersList(\"all\");\ngetQuestData();\n'),(34,2,'getQuestData();'),(35,2,'getQuestData();'),(0,3,'setCustomDesignerText(\'custTitle\', \'HFCS 2020 - Screener\');'),(135,1,'getQuestData(\"linkxScreener\");'),(138,2,'getQuestData();'),(5,2,'getQuestData();'),(140,2,'getQuestData();'),(8,1,'saveVar(\"ENDIV=NULL\");'),(11,1,'saveVar(\"ENDIV=NULL\");');
/*!40000 ALTER TABLE `HFCS01_Screener_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:08
