navaden, 1->iz prve strani, 2->s komentarji protected $showIf = 0; // izpis if-ov var $skipEmpty = 0; // izpusti vprasanja brez odgovora var $skipEmptySub = 0; // izpusti podvprasanja brez odgovora protected $recnum = 0; protected $usr_id = 0; protected $texBigSkip = '\bigskip'; protected $grupa = 0; protected $currentHeight = 0; protected $variableName = ''; protected $admin_type; protected $path2UploadedImages; protected $language = -1; // Katero verzijo prevoda izvazamo public static $spremenljivka; function __construct($anketa=null, $export_format='', $export_show_intro=null, $export_show_if=null, $export_data_skip_empty=null, $export_data_skip_empty_sub=null){ global $site_path, $global_user_id, $admin_type, $lang; $this->anketa = $anketa; $this->export_format = $export_format; $this->admin_type = $admin_type; $this->usr_id = isset($_GET['usr_id']) ? $_GET['usr_id'] : ''; $this->showIntro = $export_show_intro; $this->showIf = $export_show_if; $this->skipEmpty = $export_data_skip_empty; $this->skipEmptySub = $export_data_skip_empty_sub; $this->path2Images = $site_path.'admin/survey/export/latexclasses/textemp/images/'; //Prikazi GDPR v uvodu $gdpr = new GDPR(); $this->showGDPRIntro = $gdpr->isGDPRSurveyTemplate($this->anketa); if($this->showGDPRIntro){ $this->GDPRIntro = $gdpr->getSurveyIntro($this->anketa); } if ($this->usr_id != '') { $sqlR = sisplet_query("SELECT recnum FROM srv_user WHERE id = '$this->usr_id '"); $rowR = mysqli_fetch_array($sqlR); $this->recnum = $rowR['recnum']; } //pridobitev nastavitev izvoza SurveySetting::getInstance()->Init($this->anketa); $this->export_data_show_recnum = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_show_recnum'); //ali je potrebno pokazati recnum ob vsakem respondentu $this->exportDataPageBreak = (int)SurveySetting::getInstance()->getSurveyMiscSetting('export_data_PB'); //ali mora vsak izpis odgovorov respondenta zaceti na svoji strani SurveyStatusProfiles::Init($this->anketa); //if ( SurveyInfo::getInstance()->SurveyInit($this->anketa['id']) && $this->init()) if ( SurveyInfo::getInstance()->SurveyInit($this->anketa) ) { $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); } else{ return false; } } #funkcija, ki skrbi za izpis praznega vprasalnika in vprasalnika z odgovori enega respondenta public function displaySurvey($export_subtype='', $export_data_type='', $language=null){ global $lang, $site_url; $this->language = $language; if($this->language!=-1){ // Naložimo jezikovno datoteko $file = '../../lang/'.$this->language.'.php'; include($file); $_SESSION['langX'] = $site_url .'lang/'.$this->language.'.php'; } $surveyExpanded = SurveyInfo::getInstance()->getSurveyColumn('expanded'); // filtriramo spremenljivke glede na profil SurveyVariablesProfiles :: Init($this->anketa); $dvp = SurveyUserSetting :: getInstance()->getSettings('default_variable_profile'); $_currentVariableProfile = SurveyVariablesProfiles :: checkDefaultProfile($dvp); $tmp_svp_pv = SurveyVariablesProfiles :: getProfileVariables($_currentVariableProfile); foreach ( $tmp_svp_pv as $vid => $variable) { $tmp_svp_pv[$vid] = substr($vid, 0, strpos($vid, '_')); } $tex = ''; if($export_subtype=='q_data'){ //ce je vprasalnik za enega respondenta //pridobitev podatkov trenutnega respondenta za izpis Recnum $izbranStatusProfile = SurveyStatusProfiles :: getStatusAsQueryString(); $sqluString = "SELECT id, last_status, lurker, recnum FROM srv_user WHERE ank_id = '".$this->anketa."' ".$izbranStatusProfile." AND deleted='0' AND preview='0' AND id='".$this->usr_id."' ORDER BY recnum"; $sqlu = sisplet_query($sqluString); $rowu = mysqli_fetch_array($sqlu); $recnum = $rowu['recnum']; if($recnum && $this->export_data_show_recnum){ $recnumBesedilo = "(Recnum $recnum)"; }else{ $recnumBesedilo = ""; } //pridobitev podatkov trenutnega respondenta za izpis Recnum - konec $tex .= '\MakeUppercase{\huge \textbf{'./* $lang['srv_respondent_answer']. */' '.$recnumBesedilo.'}}'; //izpisi "Odgovori respondenta" $tex .= $this->texNewLine; $tex .= $this->texNewLine; } //ce je potrebno izpisati GDPR besedilo v intro if($this->showGDPRIntro == 1){ $GDPRintro = strip_tags($this->GDPRIntro, '