From 19985dbb8c0aa66dc4bf7905abc1148de909097d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Tue, 11 Jan 2022 12:35:47 +0100 Subject: prvi-commit --- .../export/xmlClasses/Vprasanja/BesediloXml.php | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 admin/survey/export/xmlClasses/Vprasanja/BesediloXml.php (limited to 'admin/survey/export/xmlClasses/Vprasanja/BesediloXml.php') diff --git a/admin/survey/export/xmlClasses/Vprasanja/BesediloXml.php b/admin/survey/export/xmlClasses/Vprasanja/BesediloXml.php new file mode 100644 index 0000000..3a429cb --- /dev/null +++ b/admin/survey/export/xmlClasses/Vprasanja/BesediloXml.php @@ -0,0 +1,94 @@ +loop_id = $loop_id; + $this->xml = $xml; + + // iz baze preberemo vse moznosti - ko nimamo izpisa z odgovori respondenta + $sqlVrednostiString = "SELECT id, naslov, naslov2, variable, other FROM srv_vrednost WHERE spr_id='".$spremenljivke['id']."' ORDER BY vrstni_red"; + $sqlVrednosti = sisplet_query($sqlVrednostiString); + + //$numRowsSql = mysqli_num_rows($sqlVrednosti); + + //Zacetek elementa var + xmlwriter_start_element($this->xml, 'var'); + + //izpis ID in name + $attribute = 'ID'; + $element = $spremenljivke['variable']; + $this->writeXmlAttr4Element($this->xml, $attribute, $element); + + $attribute = 'name'; + $this->writeXmlAttr4Element($this->xml, $attribute, $element); + //izpis ID in name - konec + + //Element labl + if($spremenljivke['label']){ //ce je Labela pod Napredno, jo dodamo + $element = 'labl'; + $text = $spremenljivke['label']; + $this->writeXmlElement($this->xml, $text, $element); + } + //Element labl - konec + + + //Priprava besedila vprasanja in njen izpis ################################################################# + $rowl = $this->srv_language_spremenljivka($spremenljivke); + if (strip_tags($rowl['naslov']) != '') $spremenljivke['naslov'] = $rowl['naslov']; + if (strip_tags($rowl['info']) != '') $spremenljivke['info'] = $rowl['info']; + + //Element qstn + xmlwriter_start_element($this->xml, 'qstn'); + $element = 'qstnLit'; + $text = strip_tags($spremenljivke['naslov'], '