loop_id = $loop_id; $loop_id = $loop_id_raw == null ? " IS NULL" : " = '".$loop_id_raw."'"; if($export_subtype=='q_empty'||$export_subtype=='q_comment'){ //ce je prazen vprasalnik ali komentarji $steviloOkvirjev = 5; for($i=0; $i<$steviloOkvirjev;$i++){ array_push($textVOkvirju, ''); } }elseif($export_subtype=='q_data'||$export_subtype=='q_data_all'){ if ($usr_id){ $sqlUserAnswerString = "SELECT text FROM srv_data_text".$db_table." WHERE spr_id='".$spremenljivke['id']."' AND usr_id='".$usr_id."' AND loop_id $loop_id "; $sqlUserAnswer = sisplet_query($sqlUserAnswerString); while($userAnswer = mysqli_fetch_array($sqlUserAnswer)){ array_push($textVOkvirju, LatexDocument::encodeText($userAnswer['text'])); } $steviloOkvirjev=count($textVOkvirju); } } foreach($textVOkvirju AS $textOkvir){ //izpis latex kode za okvir z odgovorom if($export_format == 'pdf'){ //ce je pdf $textOkvir = '\\textcolor{crta}{'.$textOkvir.'}'; $tex .= $this->LatexTextBox($export_format, $textboxHeightL, $textboxWidthL, $textOkvir, $textboxAllignmentL, $noBorders); $tex .= $texNewLine; }elseif($export_format == 'rtf'){ $tex .= '\begin{tabular}{l} '; //izris s tabelo brez obrob //izpis latex kode za okvir brez besedila oz. z odgovorom respondenta $tex .= $this->LatexTextBox($export_format, $textboxHeightL, $textboxWidthL, $textOkvir, $textboxAllignmentL, $noBorders); $tex .= ' \end{tabular}'; //za zakljuciti izris v tabeli } } $tex .= $texNewLine; $tex .= $this->texBigSkip; $tex .= $this->texBigSkip; if($export_format == 'pdf'){ //ce je pdf $tex .= '\\end{absolutelynopagebreak}'; //zakljucimo environment, da med vprasanji ne bo prelomov strani }else{ //ce je rtf } return $tex; } }