'Austria', 'drzava'=>'Avstrija', 'name'=>'Andrea Jelinek', 'title'=>'Director, Austrian Data Protection Authority', 'email'=>'dsb@dsb.gv.at', 'phone'=>'+43 1 531 15 202525', 'fax'=>'+43 1 531 15 202690'), array('country'=>'Austria', 'drzava'=>'Avstrija', 'name'=>'Dietmar Wagner', 'title'=>'Compliance-Officer of the FMA', 'email'=>'compliance@fma.gv.at', 'phone'=>'+43 1 249 59-6112', 'fax'=>''), array('country'=>'Belgium', 'drzava'=>'Belgija', 'name'=>'', 'title'=>'', 'email'=>'commission@privacycommission.be', 'phone'=>'+32 2 274 48 00', 'fax'=>'+32 2 274 48 10'), array('country'=>'Bulgaria', 'drzava'=>'Bolgarija', 'name'=>'Ventsislav Karadjov', 'title'=>'Chairman of the Commission for Personal Data Protection', 'email'=>'kzld@cpdp.bg', 'phone'=>'+359 2 915 3523', 'fax'=>'+359 2 915 3525'), array('country'=>'Croatia', 'drzava'=>'Hrvaška', 'name'=>'Anto RAJKOVAČA', 'title'=>'Director of the Croatian Data Protection Agency', 'email'=>'azop@azop.hr', 'phone'=>'+385 1 4609 000', 'fax'=>'+385 1 4609 099'), array('country'=>'Cyprus', 'drzava'=>'Ciper', 'name'=>'Irene LOIZIDOU NIKOLAIDOU', 'title'=>'', 'email'=>'commissioner@dataprotection.gov.cy', 'phone'=>'+357 22 818 456', 'fax'=>'+357 22 304 565'), array('country'=>'Czech Republic', 'drzava'=>'Češka republika', 'name'=>'Ivana JANŮ', 'title'=>'President of the Office for Personal Data Protection', 'email'=>'posta@uoou.cz', 'phone'=>'+420 234 665 111', 'fax'=>'+420 234 665 444'), array('country'=>'Denmark', 'drzava'=>'Danska', 'name'=>'Cristina Angela GULISANO', 'title'=>'Director, Danish Data Protection Agency', 'email'=>'dt@datatilsynet.dk', 'phone'=>'+45 33 1932 00', 'fax'=>'+45 33 19 32 18'), array('country'=>'Estonia', 'drzava'=>'Estonija', 'name'=>'Viljar PEEP', 'title'=>'Director General, Estonian Data Protection Inspectorate', 'email'=>'info@aki.ee', 'phone'=>'+372 6274 135', 'fax'=>'+372 6274 137'), array('country'=>'Finland', 'drzava'=>'Finska', 'name'=>'Reijo AARNIO', 'title'=>'Ombudsman of the Finnish Data Protection Authority', 'email'=>'tietosuoja@om.fi', 'phone'=>'+358 10 3666 700', 'fax'=>'+358 10 3666 735'), array('country'=>'France', 'drzava'=>'Francija', 'name'=>'Isabelle FALQUE-PIERROTIN', 'title'=>'President of CNIL', 'email'=>'', 'phone'=>'01 47 22 43 34', 'fax'=>'01 47 38 72 43'), array('country'=>'Germany', 'drzava'=>'Nemčija', 'name'=>'Andrea VOSSHOFF', 'title'=>'Federal Commissioner for Freedom of Information', 'email'=>'poststelle@bfdi.bund.de', 'phone'=>'+49 228 997799 0', 'fax'=>'+49 228 997799 550'), array('country'=>'Greece', 'drzava'=>'Grčija', 'name'=>'Petros CHRISTOFOROS', 'title'=>'President of the Hellenic Data Protection Authority', 'email'=>'contact@dpa.gr', 'phone'=>'+30 210 6475 600', 'fax'=>'+30 210 6475 628'), array('country'=>'Hungary', 'drzava'=>'Madžarska', 'name'=>'Attila PÉTERFALVI', 'title'=>'President of the National Authority for Data Protection and Freedom of Information', 'email'=>'peterfalvi.attila@naih.hu', 'phone'=>'+36 1 3911 400', 'fax'=>''), array('country'=>'Ireland', 'drzava'=>'Irska', 'name'=>'Helen DIXON', 'title'=>'Data Protection Commissioner', 'email'=>'info@dataprotection.ie', 'phone'=>'+353 57 868 4800', 'fax'=>'+353 57 868 4757'), array('country'=>'Italy', 'drzava'=>'Italija', 'name'=>'Antonello SORO', 'title'=>'President of Garante per la protezione dei dati personali', 'email'=>'garante@garanteprivacy.it', 'phone'=>'+39 06 69677 1', 'fax'=>'+39 06 69677 785'), array('country'=>'Latvia', 'drzava'=>'Latvija', 'name'=>'Signe PLUMINA', 'title'=>'Director of Data State Inspectorate', 'email'=>'info@dvi.gov.lv', 'phone'=>'+371 6722 3131', 'fax'=>'+371 6722 3556'), array('country'=>'Lithuania', 'drzava'=>'Litva', 'name'=>'Algirdas KUNČINAS', 'title'=>'Director of the State Data Protection Inspectorate', 'email'=>'ada@ada.lt', 'phone'=>'+370 5 279 14 45', 'fax'=>'+370 5 261 94 94'), array('country'=>'Luxembourg', 'drzava'=>'Luksemburg', 'name'=>'Tine A. LARSEN', 'title'=>'President of the Commission Nationale pour la Protection des Données', 'email'=>'info@cnpd.lu', 'phone'=>'+352 2610 60 1', 'fax'=>'+352 2610 60 29'), array('country'=>'Malta', 'drzava'=>'Malta', 'name'=>'Saviour CACHIA', 'title'=>'Information and Data Protection Commissioner', 'email'=>'commissioner.dataprotection@gov.mt', 'phone'=>'+356 2328 7100', 'fax'=>'+356 2328 7198'), array('country'=>'Netherlands', 'drzava'=>'Nizozemska', 'name'=>'Aleid WOLFSEN', 'title'=>'Chairman of Autoriteit Persoonsgegevens', 'email'=>'info@autoriteitpersoonsgegevens.nl', 'phone'=>'+31 70 888 8500', 'fax'=>'+31 70 888 8501'), array('country'=>'Poland', 'drzava'=>'Poljska', 'name'=>'Edyta BIELAK-JOMAA', 'title'=>'Inspector General for the Protection of Personal Data', 'email'=>'kancelaria@giodo.gov.pl', 'phone'=>'+48 22 53 10 440', 'fax'=>'+48 22 53 10 441'), array('country'=>'Portugal', 'drzava'=>'Portugalska', 'name'=>'Filipa CALVÃO', 'title'=>'President, Comissão Nacional de Protecção de Dados', 'email'=>'geral@cnpd.pt', 'phone'=>'+351 21 392 84 00', 'fax'=>'+351 21 397 68 32'), array('country'=>'Romania', 'drzava'=>'Romunija', 'name'=>'Ancuţa Gianina OPRE', 'title'=>'President of the National Supervisory Authority for Personal Data Processing', 'email'=>'anspdcp@dataprotection.ro', 'phone'=>'+40 21 252 5599', 'fax'=>'+40 21 252 5757'), array('country'=>'Slovakia', 'drzava'=>'Slovaška', 'name'=>'Soňa PŐTHEOVÁ', 'title'=>'President of the Office for Personal Data Protection of the Slovak Republic', 'email'=>'statny.dozor@pdp.gov.sk', 'phone'=>'+ 421 2 32 31 32 14', 'fax'=>'+ 421 2 32 31 32 34'), array('country'=>'Slovenia', 'drzava'=>'Slovenija', 'name'=>'Mojca PRELESNIK', 'title'=>'Informacijska pooblaščenka Republike Slovenije', 'email'=>'gp.ip@ip-rs.si', 'phone'=>'+386 1 230 9730', 'fax'=>'+386 1 230 9778'), array('country'=>'Spain', 'drzava'=>'Španija', 'name'=>'María del Mar España Martí', 'title'=>'Director of the Spanish Data Protection Agency', 'email'=>'internacional@agpd.es', 'phone'=>'+34 91399 6200', 'fax'=>'+34 91455 5699'), array('country'=>'Sweden', 'drzava'=>'Švedska', 'name'=>'Kristina SVAHN STARRSJÖ', 'title'=>'Director General of the Data Inspection Board', 'email'=>'datainspektionen@datainspektionen.se', 'phone'=>'+46 8 657 6100', 'fax'=>'+46 8 652 8652'), array('country'=>'United Kingdom', 'drzava'=>'Velika Britanija', 'name'=>'Elizabeth DENHAM', 'title'=>'Information Commissioner', 'email'=>'international.team@ico.org.uk', 'phone'=>'+44 1625 545 745', 'fax'=>''), ); function __construct(){ global $site_url; } // Prikazemo vsebino zavihka gdpr - seznam anket public function displayGDPRSurveyList(){ global $site_url; global $lang; // Dobimo seznam vseh anket in stevilke list($survey_list, $survey_count) = $this->getUserSurveys(); // 3 boxi na vrhu za filtriranje tabele (gdpr ankete, ne-gdpr ankete, potencialno gdpr ankete) echo '
'; // Box 1 - gdpr ankete echo '
'; echo '
'; echo ' '; echo '
'.$lang['srv_gdpr_survey_list_gdpr_surveys'].'
'; echo '
'; echo '
'; echo '

'.$survey_count['gdpr'].' '.$lang['srv_gdpr_survey_list_gdpr_surveys_note'].'

'; echo '
'; echo '
'; // Box 2 - gdpr ankete echo '
'; echo '
'; echo ' '; echo '
'.$lang['srv_gdpr_survey_list_potenc_gdpr_surveys'].'
'; echo '
'; echo '
'; echo '

'.$survey_count['potential_gdpr'].' '.$lang['srv_gdpr_survey_list_potenc_gdpr_surveys_note'].'

'; echo '
'; echo '
'; // Box 3 - gdpr ankete echo '
'; echo '
'; echo ' '; echo '
'.$lang['srv_gdpr_survey_list_no_gdpr_surveys'].'
'; echo '
'; echo '
'; echo '

'.$survey_count['no_gdpr'].' '.$lang['srv_gdpr_survey_list_no_gdpr_surveys_note'].'

'; echo '
'; echo '
'; echo '
'; // Text med nastavitvami in tabelo echo '

'.$lang['srv_gdpr_survey_list_text'].'

'; echo '

'.$lang['srv_gdpr_survey_list_text3'].'

'; // Tabela anket echo ''; // Naslovna vrstica echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; foreach($survey_list as $anketa){ // Nastavimo barvo vrstice if($anketa['gdpr'] == 1) $color = 'green_row'; elseif($anketa['potential_gdpr'] == 1) $color = 'red_row'; else $color = 'grey_row'; echo ''; if($anketa['active']==1) $anketa_active = $lang['yes']; else $anketa_active = $lang['no']; if($anketa['potential_gdpr']==1) $anketa_potential_gdpr = $lang['yes']; else $anketa_potential_gdpr = $lang['no']; echo ' '; echo ' '; echo ' '; echo ' '; echo ''; } echo '
GDPR'.$lang['srv_gdpr_survey_list_survey'].''.$lang['srv_gdpr_survey_list_activity'].''.$lang['srv_gdpr_survey_list_pot_gdpr'].'
'.$anketa['naslov'].''.$anketa_active.''.$anketa_potential_gdpr.'
'; } // Prikazemo vsebino zavihka gdpr - nastavitve uporabnika public function displayGDPRUser($error=array()){ global $site_url; global $lang; $user_settings = self::getUserSettings(); $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/"); $preklici_url = "'". $site_url . $preklici_url . "'"; echo '
'; echo ' '; echo '
'.$lang['srv_gdpr_user_settings_title'].''; echo '

'.$lang['srv_gdpr_user_settings_desc1'].'

'; echo '

'.$lang['srv_gdpr_user_settings_desc2'].'

'; echo '

'.$lang['srv_gdpr_user_settings_desc3'].'

'; // PODATKI AVTORJA // Opozorilo za obvezna polja echo '

'.$lang['srv_gdpr_user_settings_err'].'

'; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo '
'; $email = ($user_settings['email'] == '') ? User::getInstance()->primaryEmail() : $user_settings['email']; echo '
'; echo ''; echo ' '.(isset($error['email']) ? ''.$lang['srv_remind_email_hard'].'' : ''); echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo '
'; // Naslov in drzava echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; // ORGANIZACIJA ALI ZASEBNIK echo '
'; echo ''.$lang['srv_gdpr_user_settings_type'].': '; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; // PODATKI PODJETJA echo '
'; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo '
'; // IMA DPO echo '
'; echo '
'; echo ''.$lang['srv_gdpr_user_settings_has_dpo'].':'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo '
'; // DPO echo '
'; echo '

'.$lang['srv_gdpr_user_settings_dpo'].':

'; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo '
'; echo '
'; echo ''; echo ' '.(isset($error['dpo_email']) ? ''.$lang['srv_remind_email_hard'].'' : ''); echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo '
'; // Podatki trenutne avtoritete echo '
'; self::displayGDPRAuthority($user_settings['country']); echo '
'; echo '
'; // Gumb shrani echo '
'; echo ''; echo ''; echo '
'; // div za prikaz uspešnosti shranjevanja if (isset($_GET['s']) && $_GET['s'] == '1') { echo ''; echo '
'; echo ''; } echo '
'; echo ''; } // Prikazemo GDPR avtoriteto za izbrano drzavo public function displayGDPRAuthority($country){ global $lang; if($country != ''){ $current_authorities = array(); // Dobimo vse avtoritete za drzavo foreach(self::$authorities as $authority){ // Ce je ta avtoriteta izbrana if($country == $authority['drzava'] || $country == $authority['country']) $current_authorities[] = $authority; } echo '

'.$lang['srv_gdpr_user_settings_authority'].':

'; // Prikazemo podatke za vse avtoritete (lahko jih je vec na drzavo) foreach ($current_authorities as $authority) { echo '
'; if($authority['name'] != '') echo ''.$authority['name'].'
'; if($authority['title'] != '') echo ''.$authority['title'].'
'; if($authority['email'] != '') echo ''.$lang['srv_gdpr_user_settings_email'].':
'.$authority['email'].'
'; if($authority['phone'] != '') echo ''.$lang['srv_gdpr_user_settings_phone'].':
'.$authority['phone'].'
'; if($authority['fax'] != '') echo 'Fax:
'.$authority['fax'].'

'; echo '
'; } } } // Prikazemo vsebino zavihka gdpr - zahteve za izbris public function displayGDPRRequests(){ global $site_url; global $lang; echo '

'.$lang['srv_gdpr_requests_desc'].'

'; // Seznam cakajocih zahtevkov $request_list = array(); $request_list = $this->getUserRequests($ank_id=0, $status=0); // Seznam opravljenih zahtevkov $request_list_done = array(); $request_list_done = $this->getUserRequests($ank_id=0, $status=1); // Nimamo zahtevkov if(count($request_list) == 0 &&count($request_list_done) == 0){ echo '
'.$lang['srv_gdpr_requests_none'].'
'; return; } // Tabela neizvrsenih zahtevkov if(count($request_list) > 0){ echo '
'.$lang['srv_gdpr_requests_list_unresolved'].'
'; echo '
'; echo '
'; echo ''; echo ''; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ''; foreach($request_list as $request_id => $request){ echo ''; // Checkbox ce je zahteva opravljena echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; // Komentar avtorja echo ' '; echo ''; } echo '
'.$lang['srv_gdpr_requests_resolved'].''.$lang['srv_gdpr_requests_survey'].''.$lang['srv_gdpr_requests_text'].''.$lang['srv_gdpr_requests_email'].''.$lang['srv_gdpr_requests_type'].''.$lang['srv_gdpr_requests_date_sent'].''.$lang['srv_gdpr_requests_comment'].'
'; echo ' '; echo ' '.$request['email'].''; echo '
'.$lang['srv_gdpr_requests_type_'.$request['type']].'
'; echo '
'.date('j.n.Y', strtotime($request['datum'])).''; echo ' '; echo '
'; echo '
'; echo '
'; } // Tabela opravljenih zahtevkov if(count($request_list_done) > 0){ echo '
'.$lang['srv_gdpr_requests_list_resolved'].'
'; echo '
'; echo '
'; echo ''; echo ''; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ''; foreach($request_list_done as $request_id => $request){ echo ''; // Checkbox ce je zahteva opravljena echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; // Komentar avtorja echo ' '; echo ''; } echo '
'.$lang['srv_gdpr_requests_resolved'].''.$lang['srv_gdpr_requests_survey'].''.$lang['srv_gdpr_requests_text'].''.$lang['srv_gdpr_requests_email'].''.$lang['srv_gdpr_requests_type'].''.$lang['srv_gdpr_requests_date_sent'].''.$lang['srv_gdpr_requests_comment'].'
'.$request['email'].''; echo '
'.$lang['srv_gdpr_requests_type_'.$request['type']].'
'; echo '
'.date('j.n.Y', strtotime($request['datum'])).''; echo ' '; echo '
'; echo '
'; echo '
'; } } // Prikazemo vsebino zavihka gdpr - VSE zahteve za izbris (samo admini) public function displayGDPRRequestsAll(){ global $site_url; global $lang; $sql = sisplet_query("SELECT r.*, a.naslov, u.email AS u_email, u.name AS u_name, u.surname AS u_surname, gu.type AS gu_type, gu.organization AS gu_organization, gu.dpo_firstname AS gu_dpo_firstname, gu.dpo_lastname AS gu_dpo_lastname, gu.dpo_email AS gu_dpo_email, gu.dpo_phone AS gu_dpo_phone, gu.email AS gu_email, gu.firstname AS gu_firstname, gu.lastname AS gu_lastname, gu.phone AS gu_phone, gu.address AS gu_address, gu.country AS gu_country FROM srv_gdpr_requests AS r LEFT JOIN srv_anketa AS a ON (r.ank_id=a.id) LEFT JOIN users AS u ON (r.usr_id=u.id) LEFT JOIN srv_gdpr_user AS gu ON (r.usr_id=gu.usr_id) WHERE r.status='0' ORDER BY date(r.datum) ASC"); if(mysqli_num_rows($sql) > 0){ echo '
'; echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; //echo ''; //echo ''; echo ''; echo ''; //echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; while($row = mysqli_fetch_array($sql)){ echo ''; // Avtor echo ''; // Odgovorna oseba echo ''; // Organizacija echo ''; // Anketa echo ''; //echo ''; //echo ''; echo ''; echo ''; //echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } echo '
'.$lang['srv_gdpr_requests_author'].''.$lang['srv_gdpr_requests_responsible'].''.$lang['srv_gdpr_requests_organization'].''.$lang['srv_gdpr_requests_survey'].''.$lang['srv_gdpr_requests_recnum'].''.$lang['srv_gdpr_requests_ip'].''.$lang['srv_gdpr_requests_url'].''.$lang['srv_gdpr_requests_email'].''.$lang['srv_gdpr_requests_date'].''.$lang['srv_gdpr_requests_text'].''.$lang['srv_gdpr_requests_type'].''.$lang['srv_gdpr_requests_date_sent'].''.$lang['srv_gdpr_requests_status'].''.$lang['srv_gdpr_requests_comment'].'
'.$row['u_name'].' '.$row['u_surname'].'
('.$row['u_email'].')
'; if($row['gu_firstname'] != '' || $row['gu_lastname'] != '' || $row['gu_email'] != '') echo ''.$lang['srv_gdpr_user_settings_firstname'].': '.$row['gu_firstname'].' '.$row['gu_lastname'].($row['gu_email'] != '' ? ' ('.$row['gu_email'].')' : '').'
'; if($row['gu_phone'] != '') echo ''.$lang['srv_gdpr_user_settings_phone'].': '.$row['gu_phone'].'
'; if($row['gu_address'] != '' || $row['gu_country'] != '') echo ''.$lang['srv_gdpr_user_settings_address'].': '.$row['gu_address'].($row['gu_country'] != '' ? ', '.$row['gu_country'] : ''); echo '
'; if($row['gu_type'] == '1'){ if($row['gu_organization'] != '') echo ''.$lang['srv_gdpr_user_settings_organization'].': '.$row['gu_organization'].'
'; if($row['gu_dpo_firstname'] != '' || $row['gu_dpo_lastname'] != '' || $row['gu_dpo_email'] != '') echo 'DPO: '.$row['gu_dpo_firstname'].' '.$row['gu_dpo_lastname'].($row['gu_dpo_email'] != '' ? ' ('.$row['gu_dpo_email'].')' : '').'
'; if($row['gu_dpo_phone'] != '') echo ''.$lang['srv_gdpr_user_settings_phone'].': '.$row['gu_dpo_phone'].'
'; } else{ echo '/'; } echo '
'.$row['naslov'].''.$row['recnum'].''.$row['ip'].''.$row['url'].''.$row['email'].''.$row['date'].''.$row['text'].''.$lang['srv_gdpr_requests_type_'.$row['type']].''.date('j.n.Y', strtotime($row['datum'])).''.($row['status'] == '1' ? $lang['srv_gdpr_requests_status_1'] : $lang['srv_gdpr_requests_status_0']).''.$row['comment'].'
'; echo '
'; echo '
'; } else{ echo '

'.$lang['srv_gdpr_requests_none'].'

'; } // Opravljeni zahtevki $sql = sisplet_query("SELECT r.*, a.naslov, u.email AS u_email, u.name AS u_name, u.surname AS u_surname, gu.type AS gu_type, gu.organization AS gu_organization, gu.dpo_firstname AS gu_dpo_firstname, gu.dpo_lastname AS gu_dpo_lastname, gu.dpo_email AS gu_dpo_email, gu.dpo_phone AS gu_dpo_phone, gu.email AS gu_email, gu.firstname AS gu_firstname, gu.lastname AS gu_lastname, gu.phone AS gu_phone, gu.address AS gu_address, gu.country AS gu_country FROM srv_gdpr_requests AS r LEFT JOIN srv_anketa AS a ON (r.ank_id=a.id) LEFT JOIN users AS u ON (r.usr_id=u.id) LEFT JOIN srv_gdpr_user AS gu ON (r.usr_id=gu.usr_id) WHERE r.status='1' ORDER BY date(r.datum) DESC"); if(mysqli_num_rows($sql) > 0){ echo '
'; echo ' '; echo '
'; echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; //echo ''; //echo ''; echo ''; echo ''; //echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; while($row = mysqli_fetch_array($sql)){ echo ''; // Avtor echo ''; // Odgovorna oseba echo ''; // Organizacija echo ''; // Anketa echo ''; //echo ''; //echo ''; echo ''; echo ''; //echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } echo ''; echo '
'; echo '
'; } } // Prikazemo vsebino zavihka gdpr - nastavitve posamezne ankete public function displayGDPRSurvey($ank_id){ global $site_url; global $lang; global $admin_languages; global $global_user_id; $gdpr_settings = self::getSurveySettings($ank_id); // Prikaz naprednih nastavitev if($gdpr_settings != 0 && ($gdpr_settings['name'] == 1 || $gdpr_settings['email'] == 1 || $gdpr_settings['location'] == 1 || $gdpr_settings['phone'] == 1 || $gdpr_settings['web'] == 1 || $gdpr_settings['other'] == 1)) $gdpr_show_advanced = true; else $gdpr_show_advanced = false; // Preverimo, če imamo anketo v večih jezikih $survey_settings = SurveyInfo::getInstance()->getSurveyRow(); $language_slo = ($survey_settings['lang_resp'] == 1) ? true : false; $language_eng = ($survey_settings['lang_resp'] > 1) ? true : false; $sqlLang = sisplet_query("SELECT lang_id FROM srv_language WHERE ank_id='".$ank_id."' ORDER BY lang_id ASC"); while ($rowLang = mysqli_fetch_array($sqlLang)) { if($rowLang['lang_id'] == '1'){ $language_slo = true; } else{ $language_eng = true; break; } } // GDPR nastavitve ankete echo '
'; echo ''.$lang['srv_gdpr_survey_settings'].''; // Besedilo na vrhu echo '

'.$lang['srv_gdpr_survey_settings_desc1'].'

'; echo '

'.$lang['srv_gdpr_survey_settings_desc2'].' '.$lang['srv_here'].' >>

'; echo '

'.$lang['srv_gdpr_survey_settings_desc3'].'

'; // Ali gre za gdpr anketo echo '
'; echo '
'; echo ''.$lang['srv_gdpr_survey_gdpr_data'].':'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo '
'; // Oznacena kot GDPR - prikazemo identifikatorje echo ''; // Oznacena kot GDPR - prikazemo dodatne nastavitve gdpr echo ''; echo '



';*/ // Podrobnosti o zbiranju podatkov (popup v uvodu) /*if($gdpr_settings['about'] == ''){ $about_array = self::getGDPRInfoArray($ank_id); $about_text = self::getGDPRTextFromArray($about_array, $type='textarea'); } else{ $about_text = $gdpr_settings['about']; } echo ' '.$lang['srv_gdpr_survey_gdpr_about'].':

'.$lang['srv_gdpr_survey_gdpr_about_note'].'
'; echo ' ';*/ echo '

'.$lang['srv_gdpr_survey_gdpr_about'].':

'; echo '

'.$lang['srv_gdpr_survey_gdpr_about_note'].'

'; if($language_slo){ $about_array = self::getGDPRInfoArray($ank_id, $language_id='1'); $about_text = self::getGDPRTextFromArray($about_array, $type='textarea'); echo '

'.$admin_languages['1'].'

'; echo ' '; } if($language_eng){ $about_array = self::getGDPRInfoArray($ank_id, $language_id='2'); $about_text = self::getGDPRTextFromArray($about_array, $type='textarea'); echo '

'.$admin_languages['2'].'

'; echo ' '; } // Povezava na splosne gdpr nastavitve - ce ni izpolnil osebnih podatkov, je rdec warning if(!self::checkUserSettings()) echo '

'.$lang['srv_gdpr_general_settings_warninga'].''.$lang['srv_gdpr_general_settings_warningb'].'!

'; echo ''; echo '
'; // Dodatne informacije echo ''; // Gumb shrani spremembe echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo '
'; // Export - informacije dane posamezniku echo ''; echo '
'; #left echo '
'; // Export - evidenca dejavnosti obdelav echo ''; echo '
'; #right echo '
'; #wrap } // Prikazemo vsebino zavihka gdpr - nastavitve posamezne ankete public function displayGDPRSurveyRequests($ank_id){ global $site_url; global $lang; echo '
'; echo '

'.$lang['srv_gdpr_requests_desc'].'

'; echo '
'; $request_list = array(); $request_list = self::getUserRequests($ank_id, $status=0); $request_list_done = array(); $request_list_done = self::getUserRequests($ank_id, $status=1); if(count($request_list) > 0){ echo ''; echo ''; //echo ''; //echo ''; echo ''; echo ''; //echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; foreach($request_list as $request_id => $request){ echo ''; //echo ''; //echo ''; echo ''; echo ''; //echo ''; echo ''; echo ''; echo ''; //echo ''; echo ''; echo ''; } echo '
'.$lang['srv_gdpr_requests_recnum'].''.$lang['srv_gdpr_requests_ip'].''.$lang['srv_gdpr_requests_url'].''.$lang['srv_gdpr_requests_email'].''.$lang['srv_gdpr_requests_date'].''.$lang['srv_gdpr_requests_text'].''.$lang['srv_gdpr_requests_type'].''.$lang['srv_gdpr_requests_date_sent'].''.$lang['srv_gdpr_requests_done'].''.$lang['srv_gdpr_requests_comment'].'
'.$request['recnum'].''.$request['ip'].''.$request['url'].''.$request['email'].''.$request['date'].''.$request['text'].''.$lang['srv_gdpr_requests_type_'.$request['type']].''.date('j.n.Y', strtotime($request['datum'])).''.($request['status'] == '1' ? $lang['srv_gdpr_requests_status_1'] : $lang['srv_gdpr_requests_status_0']).''; echo '
'; } else{ echo '

'.$lang['srv_gdpr_requests_none'].'

'; } // Tabela opravljenih zahtevkov if(count($request_list_done) > 0){ //echo '
'.$lang['srv_gdpr_requests_done'].''; echo '
'.$lang['srv_gdpr_requests_done'].'
'; echo ''; echo ''; //echo ''; //echo ''; echo ''; echo ''; //echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; foreach($request_list_done as $request_id => $request){ echo ''; //echo ''; //echo ''; echo ''; echo ''; //echo ''; echo ''; echo ''; echo ''; //echo ''; echo ''; echo ''; } echo '
'.$lang['srv_gdpr_requests_recnum'].''.$lang['srv_gdpr_requests_ip'].''.$lang['srv_gdpr_requests_url'].''.$lang['srv_gdpr_requests_email'].''.$lang['srv_gdpr_requests_date'].''.$lang['srv_gdpr_requests_text'].''.$lang['srv_gdpr_requests_type'].''.$lang['srv_gdpr_requests_date_sent'].''.$lang['srv_gdpr_requests_done'].''.$lang['srv_gdpr_requests_comment'].'
'.$request['recnum'].''.$request['ip'].''.$request['url'].''.$request['email'].''.$request['date'].''.$request['text'].''.$lang['srv_gdpr_requests_type_'.$request['type']].''.date('j.n.Y', strtotime($request['datum'])).''.($request['status'] == '1' ? $lang['srv_gdpr_requests_status_1'] : $lang['srv_gdpr_requests_status_0']).''; echo '
'; } } // Prikaze DPA zavihek public static function displayGDPRDPA(){ global $lang; global $site_url; echo '
DPA'; echo '

'.$lang['srv_gdpr_dpa_text'].'

'; echo ''; echo '

'.$lang['srv_gdpr_dpa_info'].'

'; echo '
'; } // Pridobimo vse ankete userja in za vsako preverimo ce je GDPR private function getUserSurveys(){ $survey_list = array(); // Pridobimo seznam vseh anket uporabnika $SL = new SurveyList(); $surveys = $SL->getSurveysSimple(); $temp_gdpr = array(); $temp_gdpr_p = array(); $temp_naslov = array(); $temp_active = array(); $count_gdpr = 0; $count_potential_gdpr = 0; $count_no_gdpr = 0; $key = 0; foreach($surveys as $anketa){ $potential_gdpr = $this->potentialGDPRSurvey($anketa['id']); $gdpr = $this->isGDPRSurvey($anketa['id']); // Prestejemo ankete v posamezni skupini if($gdpr == '1') $count_gdpr++; elseif($potential_gdpr == '1') $count_potential_gdpr++; else $count_no_gdpr++; $temp_gdpr[$key] = $gdpr; $temp_gdpr_p[$key] = $potential_gdpr; $temp_naslov[$key] = $anketa['naslov']; $temp_active[$key] = $anketa['active']; $survey_list[$key] = array( 'id' => $anketa['id'], 'naslov' => $anketa['naslov'], 'active' => $anketa['active'], 'potential_gdpr' => $potential_gdpr, 'gdpr' => $gdpr ); $key++; } array_multisort($temp_gdpr, SORT_DESC, $temp_gdpr_p, SORT_DESC, $temp_active, SORT_DESC, $temp_naslov, SORT_DESC, $survey_list); $survey_count = array( 'gdpr' => $count_gdpr, 'potential_gdpr' => $count_potential_gdpr, 'no_gdpr' => $count_no_gdpr ); return array($survey_list, $survey_count); } // Pridobimo vse zahteve za izbris za userja (za vse ankete ali samo za doloceno anketo) private function getUserRequests($ank_id=0, $status=0){ global $global_user_id; $requests = array(); $anketa_query = ''; if($ank_id != 0) $anketa_query = " AND r.ank_id='".$ank_id."'"; $status_query = " AND r.status='".$status."'"; $order_by = ($status == 0) ? 'ASC' : 'DESC'; $sql = sisplet_query("SELECT r.*, a.naslov FROM srv_gdpr_requests r, srv_anketa a WHERE r.usr_id='".$global_user_id."' AND r.ank_id=a.id ".$anketa_query." ".$status_query." ORDER BY date(datum) ".$order_by.""); while($row = mysqli_fetch_array($sql)){ $requests[$row['id']] = $row; } return $requests; } // Pridobimo vse zahteve za izbris za userja (za vse ankete ali samo za doloceno anketo) public static function countUserUnfinishedRequests(){ global $global_user_id; $sql = sisplet_query("SELECT COUNT(id) FROM srv_gdpr_requests WHERE usr_id='".$global_user_id."' AND status!='1'"); $row = mysqli_fetch_array($sql); return $row['COUNT(id)']; } // Pridobimo vse gdpr nastavitve userja private static function getUserSettings(){ global $global_user_id; global $lang; $sql = sisplet_query("SELECT * FROM srv_gdpr_user WHERE usr_id='".$global_user_id."'"); if(mysqli_num_rows($sql) > 0){ $row = mysqli_fetch_array($sql); $gdpr_settings = $row; if($gdpr_settings['country'] == ''){ $gdpr_settings['country'] = ($lang['id'] == '1') ? 'Slovenija' : 'Slovenia'; } } else{ $gdpr_settings = array( 'usr_id' => '', 'type' => '', 'has_dpo' => '', 'organization' => '', 'organization_maticna' => '', 'organization_davcna' => '', 'dpo_phone' => '', 'dpo_email' => '', 'dpo_lastname' => '', 'dpo_firstname' => '', 'firstname' => '', 'lastname' => '', 'email' => '', 'phone' => '', 'address' => '', 'country' => '', ); } return $gdpr_settings; } // Preverimo ce je uporabnik izpolnil gdpr profil private function checkUserSettings(){ global $global_user_id; global $lang; $sql = sisplet_query("SELECT * FROM srv_gdpr_user WHERE usr_id='".$global_user_id."'"); $row = mysqli_fetch_array($sql); if($row === null || $row['firstname'] == '' || $row['lastname'] == '' || $row['email'] == '') return false; // Ce ima dpo so obvezni ime, priimek in posta if($row === null || ($row['type'] == '1' || $row['has_dpo'] == '1') && ($row['dpo_firstname'] == '' || $row['dpo_lastname'] == '' || $row['dpo_email'] == '')) return false; // Za podjetje sta obvezni ime in maticna if($row === null || $row['type'] == '1' && ($row['organization'] == '' || $row['organization_maticna'] == '')) return false; return true; } // Pridobimo vse gdpr nastavitve za anketo public static function getSurveySettings($ank_id){ $sql = sisplet_query("SELECT * FROM srv_gdpr_anketa WHERE ank_id='".$ank_id."'"); if(mysqli_num_rows($sql) > 0){ $row = mysqli_fetch_array($sql); $row += array('is_gdpr' => '1'); return $row; } else{ $data = array( 'is_gdpr' => '0', '1ka_template' => '0', 'name' => '0', 'email' => '0', 'location' => '0', 'phone' => '0', 'web' => '0', 'other' => '0', 'other_text_slo' => '', 'other_text_eng' => '', 'about' => '', 'expire' => '0', 'expire_text_slo' => '', 'expire_text_eng' => '', 'other_users' => '0', 'other_users_text_slo' => '', 'other_users_text_eng' => '', 'export' => '0', 'export_country_slo' => '', 'export_country_eng' => '', 'export_user_slo' => '', 'export_user_eng' => '', 'export_legal_slo' => '', 'export_legal_eng' => '', 'authorized' => '', 'contact_email' => '', 'note_slo' => '', 'note_eng' => '' ); return $data; } } // Vrne text za gdpr preduvod glede na to kaj je oznaceno da se zbira public static function getSurveyIntro($ank_id){ global $lang; global $site_url; // Poseben GDPR text za gorenje if (Common::checkModule('gorenje')){ $naslov = '

'.$lang['gorenje_gdpr_1_naslov'].'

'; $naslov .= '

'.sprintf($lang['gorenje_gdpr_1_1'], $site_url, $site_url).'

'; $naslov .= '

'.$lang['gorenje_gdpr_1_2'].'

'; $naslov .= '
'; $naslov .= '

'.$lang['gorenje_gdpr_2_naslov'].'

'; $naslov .= '

'.$lang['gorenje_gdpr_2'].'

'; $naslov .= '
'; $naslov .= '

'.$lang['gorenje_gdpr_3_naslov'].'

'; $naslov .= '

'.$lang['gorenje_gdpr_3'].'

'; $naslov .= '
'; $naslov .= '

'.$lang['gorenje_gdpr_4_naslov'].'

'; $naslov .= '

'.$lang['gorenje_gdpr_4'].'

'; $naslov .= '
'; $naslov .= '

'.$lang['gorenje_gdpr_5_naslov'].'

'; $naslov .= '

'.$lang['gorenje_gdpr_5'].'

'; $naslov .= '
'; $naslov .= '

'.$lang['gorenje_gdpr_6_naslov'].'

'; $naslov .= '

'.$lang['gorenje_gdpr_6'].'

'; $naslov .= '
'; $naslov .= '

'.$lang['gorenje_gdpr_7_naslov'].'

'; $naslov .= '

'.$lang['gorenje_gdpr_7'].'

'; $naslov .= '
'; $naslov .= '

'.$lang['gorenje_gdpr_8_naslov'].'

'; $naslov .= '

'.$lang['gorenje_gdpr_8'].'

'; $naslov .= '
'; $naslov .= '

'.$lang['gorenje_gdpr_9_naslov'].'

'; $naslov .= '

'.$lang['gorenje_gdpr_9'].'

'; $naslov .= '
'; $naslov .= '

'.$lang['gorenje_gdpr_10_naslov'].'

'; $naslov .= '

'.$lang['gorenje_gdpr_10'].'

'; } else{ $user_settings = GDPR::getSurveySettings($ank_id); $translation = ($lang['id'] == '1') ? '_slo' : '_eng'; $naslov = '

'.$lang['srv_gdpr_intro_title'].'

'; $naslov .= '

'.$lang['srv_gdpr_intro'].':

'; $naslov .= ' '; $naslov .= '

'.$lang['srv_gdpr_intro2']; $naslov .= ' '.$lang['srv_gdpr_intro3'].'

'; } $naslov .= '
'; $naslov .= '

'.$lang['srv_gdpr_intro4'].'

'; return $naslov; } // Preverimo ce je anketa potrjena s strani urednika, da je gdpr public static function isGDPRSurvey($ank_id){ $sql = sisplet_query("SELECT * FROM srv_gdpr_anketa WHERE ank_id='".$ank_id."'"); if(mysqli_num_rows($sql) > 0){ return 1; } else return 0; } // Preverimo ce je anketa gdpr in ima vklopljen gdpr 1ka template uvod public static function isGDPRSurveyTemplate($ank_id){ $sql = sisplet_query("SELECT * FROM srv_gdpr_anketa WHERE ank_id='".$ank_id."' AND 1ka_template='1'"); if(mysqli_num_rows($sql) > 0){ return 1; } else return 0; } /* * Preverimo ce ima anketa kaksne nastavitve, ki lahko padejo pod gdpr * - preverjamo imena spremenljivk "ime", "priimek", "firstname", "lastname", "email" (za tipe text) in tip vprasanja lokacija * - preverjamo ce ima vklopljena vabila * - preverjamo ce je tel. anketa */ public function potentialGDPRSurvey($ank_id){ $gdpr = 0; // Preverimo ce obstaja kaksno vprasanje za ime, priimek, email, lokacijo $gdpr_questions = $this->getGDPRSurveyQuestions($ank_id); if(count($gdpr_questions) > 0) $gdpr = 1; // Preverimo ce ima vklopljena vabila if($this->checkSurveyInvitations($ank_id)) $gdpr = 1; // Preverimo ce je telefonska anketa if($this->checkSurveyTelephone($ank_id)) $gdpr = 1; return $gdpr; } // Preverimo ce obstaja v anketi kaksno vprasanje za ime, priimek, email, lokacijo - vrnemo array vprasanj, ki so problematicna private function getGDPRSurveyQuestions($ank_id){ $gdpr_questions = array(); // Loop cez vsa vprasanja $sql = sisplet_query("SELECT s.id, s.variable, s.variable_custom, s.sistem, s.tip FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='".$ank_id."' AND ((s.variable IN ('ime', 'priimek', 'email', 'firstname', 'lastname') AND s.tip='21' /*AND s.sistem='1'*/) OR s.tip='26')"); while($row = mysqli_fetch_array($sql)){ $gdpr_questions[] = $row; } return $gdpr_questions; } // Preverimo ce ima anketa vklopljena email vabila private function checkSurveyInvitations($ank_id){ $gdpr_email = SurveyInfo::getInstance()->checkSurveyModule('email'); return $gdpr_email; } // Preverimo ce je telefonska anketa private function checkSurveyTelephone($ank_id){ $gdpr_phone = SurveyInfo::getInstance()->checkSurveyModule('phone'); return $gdpr_phone; } // Poskrbi za vse potrebno ko respondent zahteva izbris oz. vpogled v podatke public function sendGDPRRequest($request_data){ global $lang; $errors = array(); // Natavimo angleski jezik if((!empty($_POST['drupal_lang']) && $_POST['drupal_lang'] == 2) || (!empty($_POST['lang_id']) && $_POST['lang_id'] == 2)){ $file = '../lang/2.php'; include($file); } // Preverimo email if(!isset($request_data['email']) || $request_data['email'] == '') $errors['email'] = '1'; elseif(!validEmail($request_data['email'])) $errors['email'] = $lang['srv_remind_email_hard']; else $email = $request_data['email']; // Preverimo naslov ankete - naslov ni obvezen $survey_name = (isset($request_data['srv-name'])) ? $request_data['srv-name'] : ''; // Preverimo url ankete if(!isset($request_data['srv-url']) || $request_data['srv-url'] == '') $errors['srv-url'] = '1'; else{ $survey_url = $request_data['srv-url']; // Preverimo url ankete in pridobimo podatke za anketo (avtor, id...) $survey_data = self::getSurveyFromURL($survey_url); if(!$survey_data || empty($survey_data)) { if((!empty($_POST['drupal_lang']) && $_POST['drupal_lang'] == 2) || (!empty($_POST['lang_id']) && $_POST['lang_id'] == 2)) { $errors['srv-url'] = 'Invalid survey URL. Enter the correct URL for the 1KA survey. If you have any problems, please contact 1KA helpdesk (help@1ka.si).'; } else{ $errors['srv-url'] = 'Nepravilen URL ankete. Vpišite pravilen URL 1KA ankete. V primeru težav kontaktirajte Center za pomoč uporabnikom 1KA (help@1ka.si).'; } } } // Preverimo ce imamo action if(!isset($request_data['gdpr-action'])) $errors['gdpr-action'] = '1'; else{ $action = $request_data['gdpr-action']; // Nastavimo jezik vmesnika if(!empty($_POST['drupal_lang'])) $jezik = $_POST['drupal_lang']; elseif(!empty($_POST['lang_id'])) $jezik = $_POST['lang_id']; else $jezik = $survey_data['usr_lang']; if($jezik == '2'){ if($action == '1') $action_text = 'Delete personal and survey data for a specific survey.'; elseif($action == '2') $action_text = 'Gain insight into personal and survey data for a specific survey.'; elseif($action == '3') $action_text = 'Change personal data in a specific survey.'; elseif($action == '4') $action_text = 'Transmission of personal data from a specific survey.'; elseif($action == '5') $action_text = 'Restriction of processing of personal data in a specific survey.'; elseif($action == '6') $action_text = 'Withdrawal of consent of processing of personal data in a specific survey.'; else $errors['gdpr-action'] = '1'; } else{ if($action == '1') $action_text = 'izbris osebnih in anketnih podatkov iz omenjene ankete.'; elseif($action == '2') $action_text = 'vpogled v osebne in anketne podatke iz omenjene ankete.'; elseif($action == '3') $action_text = 'spremembo osebnih in anketnih podatkov iz omenjene ankete.'; elseif($action == '4') $action_text = 'Prenos osebnih podatkov iz omenjene ankete.'; elseif($action == '5') $action_text = 'Omejitev obdelave osebnih podatkov v omenjeni anketi.'; elseif($action == '6') $action_text = 'Preklic privolitve v obdelavo osebnih podatkov v omenjeni anketi.'; else $errors['gdpr-action'] = '1'; } } // Preverimo opis //$note = (isset($request_data['gdpr-note'])) ? $request_data['gdpr-note'] : ''; if(!isset($request_data['gdpr-note']) || $request_data['gdpr-note'] == '') $errors['gdpr-note'] = '1'; else $note = $request_data['gdpr-note']; // Ce imamo vse potrebne podatke posredujemo zahtevo if(empty($errors)){ // Zabelezimo zahtevo v bazo $sql = sisplet_query("INSERT INTO srv_gdpr_requests (usr_id, ank_id, email, url, datum, text, type) VALUES ('".$survey_data['usr_id']."', '".$survey_data['ank_id']."', '".$email."', '".$survey_url."', NOW(), '".$note."', '".$action."')"); // Nastavimo podatke maila (text) // ANG if($jezik == '2'){ $subject = 'Request for deletion/insight or change of personal survey data'; $content = 'Dear 1KA user,
'; $content .= '

As an author of the survey '.$survey_data['title'].' ('.$survey_data['url'].'), in which you collected personal data (GDPR), we would like to inform you that the respondent with e-mail '.$email.' submitted a request for:
'; $content .= '   - '.$action_text.'

'; $content .= '

'; $content .= 'Respondent’s email:
'.$email.'

'; $content .= 'Survey URL:
'.$survey_url.'

'; $content .= 'The submitted request relates to the following personal data:
'.$note.''; $content .= '

'; $content .= '

Please process the request within one month and inform the respondent to the above email address of the (Article 19 of the GDPR Regulation).

'; $content .= '

If you do not execute the request after one month, we will notify you again. If the request is not executed, we reserve the right to delete this survey.

'; // Podpis $signature = Common::getEmailSignature(); $content .= $signature; } // SLO else{ $subject = 'Obvestilo o zahtevi za izbris/vpogled ali spremembo osebnih oziroma anketnih podatkov'; $content = 'Pozdravljeni,
'; $content .= '

Kot avtorja ankete '.$survey_data['title'].' ('.$survey_data['url'].'), v kateri ste zbirali osebne podatke (GDPR), vas želimo obvestiti, da je respondent z elektronskim naslovom '.$email.' oddal prošnjo za:
'; $content .= '   - '.$action_text.'

'; $content .= '

'; $content .= 'Email respondenta:
'.$email.'

'; $content .= 'URL ankete:
'.$survey_url.'

'; $content .= 'Oddana prošnja se nanaša na naslednje osebne podatke:
'.$note.''; $content .= '

'; $content .= '

Prosimo, da v roku enega meseca izvršite zahtevo in o tem obvestite respondenta na zgoraj navedeni elektronski naslov respondenta (Člen 19 uredbe GDPR).

'; $content .= '

V primeru, da tega po enem mesecu ne boste izvršili, vas bomo ponovno obvestili. Če se zahteva ne izvrši, si pridržujemo pravico, da anketo izbrišemo.

'; // Podpis $signature = Common::getEmailSignature(); $content .= $signature; } // Posljemo mail avtorju ankete in na help@1ka.si za obvestilo adminu try{ $MA = new MailAdapter(); $MA->addRecipients($survey_data['author_email']); if(Common::checkModule('gorenje')){ //$MA->addRecipients('dusan.rutnik@gorenje.com'); $MA->addRecipients('gdpr@gorenje.com'); } elseif(AppSettings::getInstance()->getSetting('gdpr_admin_email') !== false){ $MA->addRecipients($gdpr_admin_email); } else{ $MA->addRecipients('help@1ka.si'); $MA->addRecipients('enklikanketa@gmail.com'); } $resultX = $MA->sendMail($content, $subject); } catch (Exception $e){ } // Vrnemo vse ok if($jezik == '2'){ $success_text = 'Your request for the deletion, change or insight into your personal information for a particular survey is submitted to the author of the survey.
The author of the survey must, within a month since you submitted the request, execute your request and inform you about it.
If the author fails to do so within 30 days, we will delete the survey, including your information.'; } else { $success_text = 'Prošnja za izbris, spremembo ali vpogled do vaših osebnih podatkov iz določene ankete je posredovana avtorju ankete.
Avtor ankete mora v roku meseca dni od oddane zahteve urediti vašo zahtevo in vas o tem obvestiti.
Če v roku 30 dni avtor tega ne izvede, bomo anketo izbrisali, vključno z vašimi podatki.'; } $response = json_encode(array('success' => $success_text), true); } else{ // Vrnemo errorje //$response = json_encode(array('error' => $errors), true); $response = json_encode(array('error' => $errors, 'posted' => $request_data), true); } echo $response; } // Poiscemo anketo na podlagi vnesenega url-ja private function getSurveyFromURL($url){ global $site_url; $data = array(); $url_data = parse_url($url); $path = $url_data['path']; $host = $url_data['host']; // Preverimo ce gre za pravo domeno if($host == parse_url($site_url, PHP_URL_HOST)){ $arr = explode("/", $path); // Pridobimo id ankete iz url-ja if($arr[1] == 'a'){ $data['hash'] = $arr[2]; // Dobimo id ankete iz hasha $sql = sisplet_query("SELECT a.id AS ank_id, a.naslov, u.id AS usr_id, u.lang, u.email FROM srv_anketa a, users u WHERE a.hash='".$data['hash']."' AND u.id=a.insert_uid "); // Anekta ne obstaja - nepravilen url if(mysqli_num_rows($sql) == 0) return false; $row = mysqli_fetch_array($sql); $data['url'] = $site_url.'a/'.$data['hash']; $data['ank_id'] = $row['ank_id']; $data['title'] = $row['naslov']; $data['usr_id'] = $row['usr_id']; $data['usr_lang'] = $row['lang']; $data['author_email'] = $row['email']; } else{ // Preverimo ce imamo mogoce lep url $nice_url = $arr[1]; $sql = sisplet_query("SELECT a.id AS ank_id, a.hash, a.naslov, u.id AS usr_id, u.lang, u.email FROM srv_anketa a, srv_nice_links nl, users u WHERE nl.link='".$nice_url."' AND nl.ank_id=a.id AND u.id=a.insert_uid "); // Anekta ne obstaja - nepravilen url if(mysqli_num_rows($sql) == 0) return false; $row = mysqli_fetch_array($sql); $data['url'] = $site_url.'/'.$nice_url; $data['ank_id'] = $row['ank_id']; $data['hash'] = $row['hash']; $data['title'] = $row['naslov']; $data['usr_id'] = $row['usr_id']; $data['usr_lang'] = $row['lang']; $data['author_email'] = $row['email']; } } else return false; if(isset($data['ank_id']) && isset($data['usr_id']) && isset($data['title']) && isset($data['url']) && isset($data['author_email'])) return $data; else return false; } // Prikaze obrazec za zahteve za izbris (v simple frontend) public static function displayGDPRRequestForm($status=array()){ global $lang; global $site_url; // Uspesno poslan zahtevek if(isset($status['success'])){ echo $status['success']; } else{ // Ce imamo errorje $error = (isset($status['error'])) ? $status['error'] : array(); // Kar smo predhodno poslali $posted = (isset($status['posted'])) ? $status['posted'] : array(); // Nastavimo se jezik ob napakah if(isset($posted['lang_id'])){ $file = '../../lang/'.$posted['lang_id'].'.php'; include($file); } echo '

'.$lang['srv_gdpr_drupal_title'].'

'; echo '

'.$lang['srv_gdpr_drupal_intro1'].'

'; echo '

'.$lang['srv_gdpr_drupal_intro2'].'

'; echo '
'; // Jezik vmesnika echo ' '; // Email echo '
'; echo ' '; if(isset($error['email']) && $error['email'] != '1') echo ''.$error['email'].''; echo '
'; // Ime ankete echo '
'; echo ' '; if(isset($error['srv-name']) && $error['srv-name'] != '1') echo ''.$error['srv-name'].''; echo '
'; // URL ankete echo '
'; echo ' '; if(isset($error['srv-url']) && $error['srv-url'] != '1') echo ''.$error['srv-url'].''; echo '
'; // echo '
'; // Tip zahteve echo '

'.$lang['srv_gdpr_drupal_q1_title'].'

'; echo '
'; echo '
'; echo '
'; echo '
'; // echo '
'; echo '
'; // echo '
'; // Opomba echo '

'.$lang['srv_gdpr_drupal_q2_note'].'

'; echo '

Opis:

'; echo ' '; // echo '

'; // Poslji prosnjo echo '

'.$lang['srv_gdpr_drupal_end'].'

'; echo ' '; echo '
'; } } // Vrnemo celoten gdpr text za respondenta (pravice...) v obliki array-a public static function getGDPRInfoArray($ank_id, $language_id=''){ global $global_user_id; global $lang; $gdpr_settings = self::getUserSettings(); $gdpr_survey_settings = self::getSurveySettings($ank_id); // Force language $language_id_bck = ''; if($language_id != '' && $lang['id'] != $language_id){ // Shranimo star jezik da lahko preklopimo nazaj $language_id_bck = $lang['id']; $file = '../../lang/'.$language_id.'.php'; include($file); $translation = ($language_id == '1') ? '_slo' : '_eng'; } else{ $translation = ($lang['id'] == '1') ? '_slo' : '_eng'; } $result = array(); // OSEBNI PODATKI $result[0]['heading'] = $lang['srv_gdpr_survey_gdpr_about_text1_1']; $result[0]['text'][0] = $lang['srv_gdpr_survey_gdpr_about_text1_2']; // Avtor raziskave $research_author = self::getResearchAuthor($ank_id, $gdpr_settings, $gdpr_survey_settings); if($research_author != '') $result[0]['text'][1] = $lang['srv_gdpr_survey_gdpr_about_text1_3'].' '.$research_author.''; $result[0]['text'][2] = $lang['srv_gdpr_survey_gdpr_about_text1_4'].':'; $temp_text = ''; if($gdpr_survey_settings['name']) $temp_text .= $lang['srv_gdpr_intro_name'].', '; if($gdpr_survey_settings['email']) $temp_text .= $lang['srv_gdpr_intro_email'].', '; if($gdpr_survey_settings['location']) $temp_text .= $lang['srv_gdpr_intro_location'].', '; if($gdpr_survey_settings['phone']) $temp_text .= $lang['srv_gdpr_intro_phone'].', '; if($gdpr_survey_settings['web']) $temp_text .= $lang['srv_gdpr_intro_web'].', '; if($gdpr_survey_settings['other']) $temp_text .= $lang['srv_gdpr_intro_other'].' - '.$gdpr_survey_settings['other_text'.$translation].', '; $result[0]['text'][2] .= ' '.substr(ucfirst(strtolower($temp_text)), 0,-2).''; // UPORABA IN HRAMBA PODATKOV $result[1]['heading'] = $lang['srv_gdpr_survey_gdpr_about_text2_1']; $result[1]['text'][0] = $lang['srv_gdpr_survey_gdpr_about_text2_2']; $result[1]['text'][1] = $lang['srv_gdpr_survey_gdpr_about_text2_3']; $result[1]['text'][2] = $lang['srv_gdpr_survey_gdpr_about_text2_4']; if($gdpr_survey_settings['expire'] == '1' && $gdpr_survey_settings['expire_text'.$translation] != '') $result[1]['text'][2] .= ' '.$gdpr_survey_settings['expire_text'.$translation].'.'; //text already included in srv_gdpr_survey_gdpr_evidenca_text7_2, so it can duplicate /* else $result[1]['text'][2] .= ' '.$lang['srv_gdpr_survey_gdpr_about_text2_5'].''; */ // UPORABNIKI OSEBNI PODATKOV $result[2]['heading'] = $lang['srv_gdpr_survey_gdpr_about_text3_1']; $result[2]['text'][0] = $lang['srv_gdpr_survey_gdpr_about_text3_2']; if($gdpr_survey_settings['other_users'] == '1' && $gdpr_survey_settings['other_users_text'.$translation] != '') $result[2]['text'][1] = $lang['srv_gdpr_survey_gdpr_about_text3_32'].' '.$gdpr_survey_settings['other_users_text'.$translation].'. '; else $result[2]['text'][1] = ''.$lang['srv_gdpr_survey_gdpr_about_text3_31'].'.'; $result[2]['text'][2] = $lang['srv_gdpr_survey_gdpr_about_text3_4']; // IZNOS PODATKOV V TRETJE DRŽAVE $result[3]['heading'] = $lang['srv_gdpr_survey_gdpr_about_text4_1']; if($gdpr_survey_settings['export'] == '1'){ $result[3]['text'][0] = $lang['srv_gdpr_survey_gdpr_about_text4_22'].' '.$lang['srv_gdpr_survey_gdpr_about_text4_22_2'].' '.$gdpr_survey_settings['export_country'.$translation].' '.$lang['srv_gdpr_survey_gdpr_about_text4_22_3']; $result[3]['text'][1] = $lang['srv_gdpr_survey_gdpr_about_text4_22_4'].' '.$gdpr_survey_settings['export_user'.$translation].''; $result[3]['text'][1] = ' '.$lang['srv_gdpr_survey_gdpr_about_text4_22_5'].' '.$gdpr_survey_settings['export_legal'.$translation].'.'; } else{ $result[3]['text'][0] = ''.$lang['srv_gdpr_survey_gdpr_about_text4_21'].''; } // PODATKI O POOBLAŠČENI OSEBI ZA VARSTVO OSEBNIH PODATKOV $result[4]['heading'] = $lang['srv_gdpr_survey_gdpr_about_text5_1']; // DPO if($gdpr_survey_settings['authorized'] == ''){ // Zasebnik brez DPO if($gdpr_settings['type'] == '0' && $gdpr_settings['has_dpo'] == '0'){ // DPO mail je enak navadnemu mailu, ki ga je vnesel v splosnih nastavitvah if($gdpr_settings['email'] != ''){ $gdpr_authorized = $gdpr_settings['email']; } // Ce ga ni vnesel, je DPO mail enak mailu avtorja ankete else{ $gdpr_authorized = User::getInstance()->primaryEmail(); } } // Zasebnik z DPO ali organizacija else{ // DPO mail je enak DPO mailu, ki ga je vnesel v splosnih nastavitvah if($gdpr_settings['dpo_email'] != ''){ $gdpr_authorized = $gdpr_settings['dpo_email']; } // Ce ga ni vnesel, je DPO mail enak splosnemu mailu oz. mailu avtorja ankete else{ if($gdpr_settings['email'] != ''){ $gdpr_authorized = $gdpr_settings['email']; } else{ $gdpr_authorized = User::getInstance()->primaryEmail(); } } } } else{ $gdpr_authorized = $gdpr_survey_settings['authorized']; } // Kontaktni email if($gdpr_survey_settings['contact_email'] == ''){ $user_settings = self::getUserSettings(); // Kontaktni mail je enak mailu, ki ga je vnesel v splosnih nastavitvah if($user_settings['email'] != ''){ $gdpr_contact_email = $user_settings['email']; } // Ce ga ni vnesel, je kontaktni mail enak mailu avtorja ankete else{ $gdpr_contact_email = User::getInstance()->primaryEmail(); } } else{ $gdpr_contact_email = $gdpr_survey_settings['contact_email']; } $result[4]['text'][0] = $lang['srv_gdpr_survey_gdpr_about_text5_2'].' '.$gdpr_authorized.''; // Ce mail ni isti izpisemo se avtorja if($gdpr_authorized != $gdpr_contact_email) $result[4]['text'][1] = $lang['srv_gdpr_survey_gdpr_about_text5_2_2'].' '.$gdpr_contact_email.''; // ZAVAROVANJE PODATKOV $result[5]['heading'] = $lang['srv_gdpr_survey_gdpr_about_text6_1']; $result[5]['text'][0] = $lang['srv_gdpr_survey_gdpr_about_text6_2']; // IZBRIS, SPREMEMBA ALI VPOGLED DO OSEBNIH ANKETNIH PODATKOV $result[6]['heading'] = $lang['srv_gdpr_survey_gdpr_about_text7_1']; $result[6]['text'][0] = $lang['srv_gdpr_survey_gdpr_about_text7_2']; $result[6]['text'][1] = $lang['srv_gdpr_survey_gdpr_about_text7_3']; if($gdpr_survey_settings['contact_email'] != ''){ $result[6]['text'][1] .= ' '.$gdpr_survey_settings['contact_email'].'. '; } elseif($gdpr_settings['email'] != ''){ $result[6]['text'][1] .= ' '.$gdpr_settings['email'].'. '; } else{ $sql = sisplet_query("SELECT email FROM users WHERE id = '$global_user_id'"); $row = mysqli_fetch_array($sql); $result[6]['text'][1] .= ' '.$row['email'].'. '; } $result[6]['text'][1] .= $lang['srv_gdpr_survey_gdpr_about_text7_3_2']; $result[6]['text'][2] = $lang['srv_gdpr_survey_gdpr_about_text7_4']; // OPOMBA if($gdpr_survey_settings['note'.$translation] != ''){ $result[7]['heading'] = $lang['note']; $result[7]['text'][0] = ''.$gdpr_survey_settings['note'.$translation].''; } // Preklopimo nazaj jezik if($language_id_bck != '' && $language_id_bck != $lang['id']){ $file = '../../lang/'.$language_id_bck.'.php'; include($file); } return $result; } // Vrnemo celoten gdpr text za evidencov obliki array-a public static function getGDPREvidencaArray($ank_id){ global $global_user_id; global $lang; $gdpr_settings = self::getUserSettings(); $gdpr_survey_settings = self::getSurveySettings($ank_id); $translation = ($lang['id'] == '1') ? '_slo' : '_eng'; $result = array(); $result[0]['heading'] = 'I. '.$lang['srv_gdpr_survey_gdpr_evidenca_text1']; $result[0]['text'][0] = $lang['srv_gdpr_survey_gdpr_evidenca_text1_1']; $result[1]['heading'] = 'II. '.$lang['srv_gdpr_survey_gdpr_evidenca_text2']; if($gdpr_settings['type'] == '1'){ $result[1]['text'][0] = $lang['srv_gdpr_survey_gdpr_evidenca_text2_1'].': '; $result[1]['text'][0] .= ''.$gdpr_settings['organization'].''; $result[1]['text'][1] = $lang['srv_gdpr_survey_gdpr_evidenca_text2_2'].': '; $result[1]['text'][1] .= ''.$gdpr_settings['address'].''; $result[1]['text'][2] = $lang['srv_gdpr_survey_gdpr_evidenca_text2_3'].': '; $result[1]['text'][2] .= ''.$gdpr_settings['organization_maticna'].''; } else{ $result[1]['text'][0] = $lang['srv_gdpr_survey_gdpr_evidenca_text2_1'].': '; $result[1]['text'][0] .= ''.$gdpr_settings['firstname'].' '.$gdpr_settings['lastname'].''; $result[1]['text'][1] = $lang['srv_gdpr_survey_gdpr_evidenca_text2_2'].': '; $result[1]['text'][1] .= ''.$gdpr_settings['address'].''; } $result[2]['heading'] = 'III.'.$lang['srv_gdpr_survey_gdpr_evidenca_text3']; $result[2]['text'][0] = $lang['srv_gdpr_survey_gdpr_evidenca_text3_1']; $result[3]['heading'] = 'IV. '.$lang['srv_gdpr_survey_gdpr_evidenca_text4']; $result[3]['text'][0] = $lang['srv_gdpr_survey_gdpr_evidenca_text4_1']; $result[4]['heading'] = 'V. '.$lang['srv_gdpr_survey_gdpr_evidenca_text5']; $temp_text = ''; if($gdpr_survey_settings['name']) $temp_text .= $lang['srv_gdpr_intro_name'].', '; if($gdpr_survey_settings['email']) $temp_text .= $lang['srv_gdpr_intro_email'].', '; if($gdpr_survey_settings['location']) $temp_text .= $lang['srv_gdpr_intro_location'].', '; if($gdpr_survey_settings['phone']) $temp_text .= $lang['srv_gdpr_intro_phone'].', '; if($gdpr_survey_settings['web']) $temp_text .= $lang['srv_gdpr_intro_web'].', '; if($gdpr_survey_settings['other']) $temp_text .= $lang['srv_gdpr_intro_other'].' - '.$gdpr_survey_settings['other_text'.$translation].', '; $result[4]['text'][0] = ''.substr(ucfirst(strtolower($temp_text)), 0,-2).''; $result[5]['heading'] = 'VI. '.$lang['srv_gdpr_survey_gdpr_evidenca_text6']; $result[5]['text'][0] = $lang['srv_gdpr_survey_gdpr_evidenca_text6_1']; $result[5]['text'][1] = $lang['srv_gdpr_survey_gdpr_evidenca_text6_2']; $result[6]['heading'] = 'VII. '.$lang['srv_gdpr_survey_gdpr_evidenca_text7']; $result[6]['text'][0] = $lang['srv_gdpr_survey_gdpr_evidenca_text7_1'].' '; if($gdpr_survey_settings['expire'] != '1') $result[6]['text'][0] .= ''.$lang['srv_gdpr_survey_gdpr_evidenca_text7_2'].''; else $result[6]['text'][0] .= ''.$gdpr_survey_settings['expire_text'.$translation].'.'; $result[7]['heading'] = 'VIII. '.$lang['srv_gdpr_survey_gdpr_evidenca_text8']; $result[7]['text'][0] = $lang['srv_gdpr_survey_gdpr_evidenca_text8_1']; $result[7]['text'][1] = $lang['srv_gdpr_survey_gdpr_evidenca_text8_2']; if($gdpr_survey_settings['other_users'] == '1') $result[7]['text'][2] = ''.ucfirst($gdpr_survey_settings['other_users_text'.$translation]).''; $result[8]['heading'] = 'IX. '.$lang['srv_gdpr_survey_gdpr_evidenca_text9']; if($gdpr_survey_settings['export'] == '1'){ $result[8]['text'][0] = $lang['srv_gdpr_survey_gdpr_evidenca_text9_22'].' '; $result[8]['text'][0] .= ''.$gdpr_survey_settings['export_country'.$translation].''; $result[8]['text'][0] .= $lang['srv_gdpr_survey_gdpr_evidenca_text9_23'].' '; $result[8]['text'][0] .= ''.$gdpr_survey_settings['export_user'.$translation].''; $result[8]['text'][0] .= $lang['srv_gdpr_survey_gdpr_evidenca_text9_24'].' '; $result[8]['text'][0] .= ''.$gdpr_survey_settings['export_legal'.$translation].'.'; } else{ $result[8]['text'][0] = ''.$lang['srv_gdpr_survey_gdpr_evidenca_text9_21'].''; } $result[9]['heading'] = 'X. '.$lang['srv_gdpr_survey_gdpr_evidenca_text10']; $result[9]['text'][0] = $lang['srv_gdpr_survey_gdpr_evidenca_text10_1']; // OPOMBA if($gdpr_survey_settings['note'.$translation] != ''){ $result[10]['heading'] = 'XI. '.$lang['note']; $result[10]['text'][0] = ''.$gdpr_survey_settings['note'.$translation].'.'; } return $result; } // Pretvorimo array v text za info oz. evidenco (html popup, textarea) public static function getGDPRTextFromArray($text_array, $type='html'){ // Dolocimo line break glede na tip (html, pdf ali textarea) if($type == 'textarea') $br = ' '; else $br = '
'; $text = ''; // Loop po posameznih sklopih foreach($text_array as $sklop){ // Naslov sklopa $text .= ''.$sklop['heading'].''.$br; // Loop po posameznih vrsticah foreach($sklop['text'] as $vrstica){ $text .= $br.$vrstica.$br; } $text .= $br.$br; } if($type == 'textarea'){ $text = str_replace('', '', $text); $text = str_replace('', '', $text); } return $text; } // Pridobimo avtorja raziskave public static function getResearchAuthor($ank_id, $gdpr_settings, $gdpr_survey_settings){ global $global_user_id; $author = ''; // Email avtorja - najprej se pogleda ce je nastavljen GDPR na anketi, potem se povlece splosnega iz GDPR na koncu pa avtor maila if($gdpr_survey_settings['contact_email'] != ''){ $author = ' '.$gdpr_survey_settings['contact_email']; } elseif($gdpr_settings['email'] != ''){ $author = ' '.$gdpr_settings['email']; } else{ $sql = sisplet_query("SELECT email FROM users WHERE id = '$global_user_id'"); $row = mysqli_fetch_array($sql); $author = ' '.$row['email']; } // Podjetje ce je nastavljeno v GDPR nastavitvah if($gdpr_settings['type'] == '1' && $gdpr_settings['organization'] != ''){ $author .= ' ('.$gdpr_settings['organization'].').'; } else{ $author .= '.'; } return $author; } // Funkcije ajaxa public function ajax() { global $lang; global $global_user_id; global $site_url; if (isset ($_POST['ank_id'])) $ank_id = $_POST['ank_id']; if (isset ($_POST['what'])) $what = $_POST['what']; if (isset ($_POST['value'])) $value = $_POST['value']; // Urejanje gdpr nastavitve za userja if($_GET['a'] == 'gdpr_edit_user'){ $error = array(); $firstname = isset($_POST['firstname']) ? $_POST['firstname'] : ''; $lastname = isset($_POST['lastname']) ? $_POST['lastname'] : ''; $email = isset($_POST['email']) ? $_POST['email'] : ''; $phone = isset($_POST['phone']) ? $_POST['phone'] : ''; $type = isset($_POST['type']) ? $_POST['type'] : '0'; $has_dpo = isset($_POST['has_dpo']) ? $_POST['has_dpo'] : '0'; $organization = isset($_POST['organization']) ? $_POST['organization'] : ''; $organization_maticna = isset($_POST['organization_maticna']) ? $_POST['organization_maticna'] : ''; //$organization_davcna = isset($_POST['organization_davcna']) ? $_POST['organization_davcna'] : ''; $dpo_firstname = isset($_POST['dpo_firstname']) ? $_POST['dpo_firstname'] : ''; $dpo_lastname = isset($_POST['dpo_lastname']) ? $_POST['dpo_lastname'] : ''; $dpo_email = isset($_POST['dpo_email']) ? $_POST['dpo_email'] : ''; $dpo_phone = isset($_POST['dpo_phone']) ? $_POST['dpo_phone'] : ''; $address = isset($_POST['address']) ? $_POST['address'] : ''; $country = isset($_POST['country']) ? $_POST['country'] : ''; // Dodatno preverimo ce gre za veljavna maila if($email != '' && !validEmail($email)){ $email = ''; $error['email'] = 1; } if($dpo_email != '' && !validEmail($dpo_email)){ $dpo_email = ''; $error['dpo_email'] = 1; } $sql = sisplet_query("INSERT INTO srv_gdpr_user (usr_id, type, has_dpo, organization, organization_maticna, dpo_firstname, dpo_lastname, dpo_email, dpo_phone, firstname, lastname, email, phone, address, country) VALUES ('".$global_user_id."', '".$type."', '".$has_dpo."', '".$organization."', '".$organization_maticna."', '".$dpo_firstname."', '".$dpo_lastname."', '".$dpo_email."', '".$dpo_phone."', '".$firstname."', '".$lastname."', '".$email."', '".$phone."', '".$address."', '".$country."') ON DUPLICATE KEY UPDATE type='".$type."', has_dpo='".$has_dpo."', organization='".$organization."', organization_maticna='".$organization_maticna."', dpo_firstname='".$dpo_firstname."', dpo_lastname='".$dpo_lastname."', dpo_email='".$dpo_email."', dpo_phone='".$dpo_phone."', firstname='".$firstname."', lastname='".$lastname."', email='".$email."', phone='".$phone."', address='".$address."', country='".$country."'"); if (!$sql) echo mysqli_error($GLOBALS['connect_db']); self::displayGDPRUser($error); } // Prikaz ustrezne gdpr avtoritetec if($_GET['a'] == 'gdpr_edit_authority'){ $country = isset($_POST['country']) ? $_POST['country'] : ''; self::displayGDPRAuthority($country); } // Nastavljanje ankete da je gdpr elseif($_GET['a'] == 'gdpr_add_anketa'){ if($ank_id != '' && $ank_id != '0'){ if($value == '1') $sql = sisplet_query("INSERT INTO srv_gdpr_anketa (ank_id) VALUES ('".$ank_id."')"); else $sql = sisplet_query("DELETE FROM srv_gdpr_anketa WHERE ank_id='".$ank_id."'"); } self::displayGDPRSurveyList(); } // Urejanje gdpr nastavitve za userja if($_GET['a'] == 'gdpr_edit_anketa'){ if($ank_id != '' && $ank_id != '0'){ $is_gdpr = isset($_POST['is_gdpr']) ? $_POST['is_gdpr'] : '0'; // Vklopimo gdpr if($is_gdpr == '1'){ $name = isset($_POST['name']) ? $_POST['name'] : ''; $email = isset($_POST['email']) ? $_POST['email'] : ''; $location = isset($_POST['location']) ? $_POST['location'] : ''; $phone = isset($_POST['phone']) ? $_POST['phone'] : ''; $web = isset($_POST['web']) ? $_POST['web'] : ''; $other = isset($_POST['other']) ? $_POST['other'] : ''; $other_text_slo = isset($_POST['other_text_slo']) ? $_POST['other_text_slo'] : ''; $other_text_eng = isset($_POST['other_text_eng']) ? $_POST['other_text_eng'] : ''; $template_1ka = isset($_POST['1ka_template']) ? $_POST['1ka_template'] : ''; $about = (isset($_POST['about'])) ? $_POST['about'] : ''; $expire = isset($_POST['expire']) ? $_POST['expire'] : ''; $expire_text_slo = isset($_POST['expire_text_slo']) ? $_POST['expire_text_slo'] : ''; $expire_text_eng = isset($_POST['expire_text_eng']) ? $_POST['expire_text_eng'] : ''; $other_users = isset($_POST['other_users']) ? $_POST['other_users'] : ''; $other_users_text_slo = isset($_POST['other_users_text_slo']) ? $_POST['other_users_text_slo'] : ''; $other_users_text_eng = isset($_POST['other_users_text_eng']) ? $_POST['other_users_text_eng'] : ''; $export = isset($_POST['export']) ? $_POST['export'] : ''; $export_country_slo = isset($_POST['export_country_slo']) ? $_POST['export_country_slo'] : ''; $export_country_eng = isset($_POST['export_country_eng']) ? $_POST['export_country_eng'] : ''; $export_user_slo = isset($_POST['export_user_slo']) ? $_POST['export_user_slo'] : ''; $export_user_eng = isset($_POST['export_user_eng']) ? $_POST['export_user_eng'] : ''; $export_legal_slo = isset($_POST['export_legal_slo']) ? $_POST['export_legal_slo'] : ''; $export_legal_eng = isset($_POST['export_legal_eng']) ? $_POST['export_legal_eng'] : ''; $authorized = isset($_POST['authorized']) ? $_POST['authorized'] : ''; $contact_email = isset($_POST['contact_email']) ? $_POST['contact_email'] : ''; $note_slo = isset($_POST['note_slo']) ? $_POST['note_slo'] : ''; $note_eng = isset($_POST['note_eng']) ? $_POST['note_eng'] : ''; $sql = sisplet_query("INSERT INTO srv_gdpr_anketa ( ank_id, 1ka_template, name, email, location, phone, web, other, other_text_slo, other_text_eng, about, expire, expire_text_slo, expire_text_eng, other_users, other_users_text_slo, other_users_text_eng, export, export_user_slo, export_user_eng, export_country_slo, export_country_eng, export_legal_slo, export_legal_eng, authorized, contact_email, note_slo, note_eng ) VALUES ( '".$ank_id."', '".$template_1ka."', '".$name."', '".$email."', '".$location."', '".$phone."', '".$web."', '".$other."', '".$other_text_slo."', '".$other_text_eng."', '".$about."', '".$expire."', '".$expire_text_slo."', '".$expire_text_eng."', '".$other_users."', '".$other_users_text_slo."', '".$other_users_text_eng."', '".$export."', '".$export_user_slo."', '".$export_user_eng."', '".$export_country_slo."', '".$export_country_eng."', '".$export_legal_slo."', '".$export_legal_eng."', '".$authorized."', '".$contact_email."', '".$note_slo."', '".$note_eng."' ) ON DUPLICATE KEY UPDATE 1ka_template='".$template_1ka."', name='".$name."', email='".$email."', location='".$location."', phone='".$phone."', web='".$web."', other='".$other."', other_text_slo='".$other_text_slo."', other_text_eng='".$other_text_eng."', about='".$about."', expire='".$expire."', expire_text_slo='".$expire_text_slo."', expire_text_eng='".$expire_text_eng."', other_users='".$other_users."', other_users_text_slo='".$other_users_text_slo."', other_users_text_eng='".$other_users_text_eng."', export='".$export."', export_user_slo='".$export_user_slo."', export_user_eng='".$export_user_eng."', export_country_slo='".$export_country_slo."', export_country_eng='".$export_country_eng."', export_legal_slo='".$export_legal_slo."', export_legal_eng='".$export_legal_eng."', authorized='".$authorized."', contact_email='".$contact_email."', note_slo='".$note_slo."', note_eng='".$note_eng."'" ); if (!$sql) echo mysqli_error($GLOBALS['connect_db']); // Dodatno prikazemo uvod in zakljucek ce se uporablja 1ka template if($template_1ka == '1'){ $sqlA = sisplet_query("UPDATE srv_anketa SET show_intro='1', show_concl='1' WHERE id='".$ank_id."'"); } } // Izklopimo gdpr - pobrisemo nastavitve else{ $sql = sisplet_query("DELETE FROM srv_gdpr_anketa WHERE ank_id='".$ank_id."'"); if (!$sql) echo mysqli_error($GLOBALS['connect_db']); } } } // Prikaz preview-ja gdpr uvoda if($_GET['a'] == 'gdpr_preview_intro'){ if($ank_id != '' && $ank_id != '0'){ echo '
'; echo ''; echo '
'; // Naslov vprasanja echo '
'; $naslov = self::getSurveyIntro($ank_id); echo $naslov; echo '
'; // Variabli "da" in "ne" echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; // Gumba zapri //echo '
Zapri
'; echo '
'; } } // Prikaz preview-ja gdpr izvoza if($_GET['a'] == 'gdpr_preview_export'){ if($ank_id != '' && $ank_id != '0'){ // Tip izvoza if (isset ($_POST['type'])) $type = $_POST['type']; echo '
'; echo ''; echo '
'; // Informacije dane posamezniku if($type == '1'){ $text_array = self::getGDPRInfoArray($ank_id); $text = self::getGDPRTextFromArray($text_array, $type='html'); // Naslov echo '

'; echo $lang['export_gdpr_individual']; echo '

'; } // Evidenca dejavnosti obdelav else{ $text_array = self::getGDPREvidencaArray($ank_id); $text = self::getGDPRTextFromArray($text_array, $type='html'); // Naslov echo '

'; echo $lang['export_gdpr_activity']; echo '

'; } echo $text; echo '
'; echo '
'; } } // Zahteva je obdelana elseif($_GET['a'] == 'gdpr_request_done'){ if (isset ($_POST['request_id'])){ $request_id = $_POST['request_id']; $sql = sisplet_query("UPDATE srv_gdpr_requests SET status='".$value."' WHERE id='".$request_id."'"); } self::displayGDPRRequests(); } // Zahteva je obdelana - v posamezni anketi elseif($_GET['a'] == 'gdpr_request_done_survey'){ if (isset ($_POST['request_id']) && isset ($_POST['ank_id'])){ $ank_id = $_POST['ank_id']; $request_id = $_POST['request_id']; $sql = sisplet_query("UPDATE srv_gdpr_requests SET status='".$value."' WHERE id='".$request_id."'"); } self::displayGDPRSurveyRequests($ank_id); } // Komentar na zahtevo elseif($_GET['a'] == 'gdpr_request_comment'){ if (isset ($_POST['request_id'])){ $request_id = $_POST['request_id']; $sql = sisplet_query("UPDATE srv_gdpr_requests SET comment='".$value."' WHERE id='".$request_id."'"); } self::displayGDPRRequests(); } // Komentaran zahtevo - v posamezni anketi elseif($_GET['a'] == 'gdpr_request_comment_survey'){ if (isset ($_POST['request_id']) && isset ($_POST['ank_id'])){ $ank_id = $_POST['ank_id']; $request_id = $_POST['request_id']; $sql = sisplet_query("UPDATE srv_gdpr_requests SET comment='".$value."' WHERE id='".$request_id."'"); } self::displayGDPRSurveyRequests($ank_id); } } }