diff --git a/admin/survey/BranchingAjax.php b/admin/survey/BranchingAjax.php index 0f50220a6..723f355c4 100644 --- a/admin/survey/BranchingAjax.php +++ b/admin/survey/BranchingAjax.php @@ -182,7 +182,7 @@ class BranchingAjax { $b->repare_vrstni_red(); - Common::getInstance()->prestevilci($spremenljivka, $all); + Common::getInstance()->prestevilci($spremenljivka, $all=true); // Zacasno shranimo zadnji ustvarjen if, da vemo katerega odpreti echo ''; diff --git a/admin/survey/SurveyAdmin.php b/admin/survey/SurveyAdmin.php index 98a31edc4..9cf037a1e 100644 --- a/admin/survey/SurveyAdmin.php +++ b/admin/survey/SurveyAdmin.php @@ -720,13 +720,16 @@ class SurveyAdmin // Preverimo trenuten paket uporabnika $userAccess = UserAccess::getInstance($global_user_id); - if($userAccess->getPackage() != '3'){ + $current_package = $userAccess->getPackage(); + if($current_package != '3' && !$userAccess->userNotAuthor()){ $drupal_url = ($lang['id'] == '2') ? $site_url.'d/en/' : $site_url.'d/'; $upgrade_url = $drupal_url.'izvedi-nakup/3/podatki'; + $button_text = ($current_package == '2') ? $lang['srv_access_upgrade2'] : $lang['srv_access_upgrade']; + echo '
'; - echo '
'.$lang['srv_access_upgrade'].'
'; + echo '
'.$button_text.'
'; echo '
'; } } diff --git a/admin/survey/classes/class.Common.php b/admin/survey/classes/class.Common.php index 84f8db941..a901453f9 100644 --- a/admin/survey/classes/class.Common.php +++ b/admin/survey/classes/class.Common.php @@ -55,7 +55,8 @@ class Common { static function prestevilci ($spremenljivka = 0, $all = false, $force = false) { // Preverimo ce imamo izklopljeno atomatsko prestevilcevanje - SurveySetting::getInstance()->Init(self::$anketa); + SurveySetting::getInstance()->Init(self::$anketa); + $enumerate = SurveySetting::getInstance()->getSurveyMiscSetting('enumerate'); if ($enumerate == '') $enumerate = 1; if($enumerate == 0 && $all != true) return; @@ -66,7 +67,6 @@ class Common { $i = 1; - //sisplet_query("BEGIN"); $sql = sisplet_query("SELECT s.id, variable, variable_custom, s.tip AS tip FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='".self::$anketa."' AND s.tip!='9' ORDER BY g.vrstni_red, s.vrstni_red"); // ce je vec kot 50 spremenljivk nimamo avtomatskega prestevilcevanja @@ -107,8 +107,6 @@ class Common { $variable_array2 = $variable_array; // Loop cez vsa vprasanja v anketi po vrstnem redu - //mysqli_data_seek($sql, 0); - //while ($row = mysqli_fetch_array($sql)) { foreach($variable_array2 as $row) { // Ce vprasanje nima custom variable jo lahko prestevilcimo @@ -141,8 +139,6 @@ class Common { array_push($val_array, $row['id']); } - //sisplet_query("COMMIT"); - // prestevilcimo se variable znotraj posameznih vprasanja - prestevilci moramo poklicati sele za zgornjim INSERTom! foreach ($val_array AS $key => $val) { self::prestevilci($val); diff --git a/admin/survey/classes/class.SurveyAktivnost.php b/admin/survey/classes/class.SurveyAktivnost.php index a765af926..a0b0405e2 100644 --- a/admin/survey/classes/class.SurveyAktivnost.php +++ b/admin/survey/classes/class.SurveyAktivnost.php @@ -15,8 +15,7 @@ class SurveyAktivnost{ * @desc prikaze diagnostiko anket */ public function diagnostics() { - global $lang; - global $global_user_id, $admin_type; + global $lang, $global_user_id, $admin_type, $app_settings; $sum = 0; $sum_survey = 0; @@ -42,7 +41,7 @@ class SurveyAktivnost{ echo '
'; echo ''; - + $testdata = (isset($_GET['testdata']) && $_GET['testdata']=='1') ? 1 : 0; $testdataauto = (isset($_GET['testdataauto']) && $_GET['testdataauto']=='1') ? 1 : 0; $uvoz = (isset($_GET['uvoz']) && $_GET['uvoz']=='1') ? 1 : 0; @@ -53,7 +52,25 @@ class SurveyAktivnost{ $mailsent = (isset($_GET['mailsent']) && $_GET['mailsent']=='1') ? 1 : 0; $language = (isset($_GET['language'])) ? $_GET['language'] : 0; - + + if(isset($app_settings['commercial_packages']) && $app_settings['commercial_packages'] == true){ + + $package_1ka = (isset($_GET['package_1ka']) && $_GET['package_1ka']=='0') ? 0 : 1; + $package_2ka = (isset($_GET['package_2ka']) && $_GET['package_2ka']=='0') ? 0 : 1; + $package_3ka = (isset($_GET['package_3ka']) && $_GET['package_3ka']=='0') ? 0 : 1; + + echo ''.$lang['srv_narocilo_paket'].':'; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + echo '|'; + } + echo ''; echo ''; echo ''; @@ -163,25 +180,28 @@ class SurveyAktivnost{ $interval ) AS grupe, srv_anketa WHERE grupe.ank_id=srv_anketa.id - AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN - (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) + AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN + (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) GROUP BY grupe.ank_id ORDER BY responses DESC "); } elseif ($type == 'users') { - $filter = $this->diagnostics_get_user_settings(); + $filter = $this->diagnostics_get_user_settings(); + $filter_package = $this->diagnostics_get_user_package(); $filter_lang = $this->diagnostics_get_lang_filter(); $sql = sisplet_query(" - SELECT COUNT(srv_user.id) AS responses, users.email, srv_user.ank_id, srv_anketa.naslov - FROM srv_user, srv_anketa, users - WHERE ".$filter." AND ".$filter_lang." srv_user.ank_id > '0' - AND srv_anketa.id=srv_user.ank_id - AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN - (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) - $interval - AND srv_anketa.insert_uid = users.id + SELECT COUNT(srv_user.id) AS responses, users.email, srv_user.ank_id, srv_anketa.naslov, user_access.package_id + FROM srv_user, srv_anketa, users + LEFT JOIN user_access + ON user_access.usr_id=users.id + WHERE ".$filter." AND ".$filter_lang." ".$filter_package." srv_user.ank_id > '0' + AND srv_anketa.id=srv_user.ank_id + AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN + (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) + $interval + AND srv_anketa.insert_uid = users.id GROUP BY ank_id ORDER BY responses DESC "); @@ -191,11 +211,11 @@ class SurveyAktivnost{ SELECT COUNT(srv_tracking_active.ank_id) AS responses, srv_tracking_active.ank_id, srv_anketa.naslov FROM srv_tracking_active, srv_anketa WHERE srv_anketa.id = srv_tracking_active.ank_id - AND (`get` LIKE '%analiza%' OR `get` LIKE '%analysis%' ) - AND NOT (`get` LIKE '%charts%') - AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN - (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) - $interval + AND (`get` LIKE '%analiza%' OR `get` LIKE '%analysis%' ) + AND NOT (`get` LIKE '%charts%') + AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN + (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) + $interval GROUP BY ank_id ORDER BY responses DESC "); @@ -206,11 +226,11 @@ class SurveyAktivnost{ SELECT COUNT(srv_tracking_active.ank_id) AS responses, srv_tracking_active.ank_id, srv_anketa.naslov FROM srv_tracking_active, srv_anketa WHERE srv_anketa.id = srv_tracking_active.ank_id - AND (`get` LIKE '%analiza%' OR `get` LIKE '%analysis%' ) - AND (`get` LIKE '%charts%') - AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN - (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) - $interval + AND (`get` LIKE '%analiza%' OR `get` LIKE '%analysis%' ) + AND (`get` LIKE '%charts%') + AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN + (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) + $interval GROUP BY ank_id ORDER BY responses DESC "); @@ -221,9 +241,9 @@ class SurveyAktivnost{ SELECT COUNT(srv_tracking_active.ank_id) AS responses, srv_tracking_active.ank_id, srv_anketa.naslov FROM srv_tracking_active, srv_anketa WHERE srv_anketa.id = srv_tracking_active.ank_id - AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN - (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) - $interval + AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN + (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) + $interval GROUP BY ank_id ORDER BY responses DESC "); @@ -234,9 +254,9 @@ class SurveyAktivnost{ SELECT COUNT(srv_invitations_recipients.id) AS responses, srv_invitations_recipients.ank_id, srv_anketa.naslov FROM srv_invitations_recipients, srv_anketa WHERE srv_anketa.id = srv_invitations_recipients.ank_id AND srv_invitations_recipients.sent = '1' - AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN - (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) - $interval + AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN + (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) + $interval GROUP BY ank_id ORDER BY responses DESC "); @@ -255,7 +275,7 @@ class SurveyAktivnost{ while ($row = mysqli_fetch_array($sql)) { if ($max == -1) - $max = max($row['responses'], $max)*1.3; + $max = max($row['responses'], $max)*1.3; echo ''; echo '' . $row['naslov'] . ''; @@ -263,9 +283,7 @@ class SurveyAktivnost{ $sum = $sum + $row['responses']; $sum_survey = $sum_survey + 1; echo '
 
 '.$row['responses'].'
'; - echo ' - '; - //$sum_survey = sizeof($row); + echo ''; } echo ''; -*/ } function saveRecProfile() { - global $lang,$site_url, $global_user_id; + global $lang, $site_url, $global_user_id; $return = array('error'=>'0'); $profile_id = isset($_POST['profile_id'])? (int)$_POST['profile_id'] : -1; @@ -5930,33 +5916,31 @@ class SurveyInvitationsNew { # updejtamo userja da mu je bilo poslano if ( count($send_ok_ids) > 0) { - $sqlString = "UPDATE srv_invitations_recipients SET sent = '1', date_sent = '".$date_sent."' WHERE id IN (".implode(',',$send_ok_ids).")"; + + $sqlString = "UPDATE srv_invitations_recipients SET sent = '1', date_sent = '".$date_sent."' WHERE id IN (".implode(',',$send_ok_ids).")"; $sqlQuery = sisplet_query($sqlString); - if (!$sqlQuery) { + + if (!$sqlQuery) { $error = mysqli_error($GLOBALS['connect_db']); - } + } + $sqlString = "UPDATE srv_invitations_recipients SET last_status = '1' WHERE id IN (".implode(',',$send_ok_ids).") AND last_status IN ('0','2')"; $sqlQuery = sisplet_query($sqlString); - if (!$sqlQuery) { + + if (!$sqlQuery) { $error = mysqli_error($GLOBALS['connect_db']); } - } - # updejtamo še tabelo arhivov - #$sqlString = "INSERT INTO srv_invitations_archive (id, ank_id, date_send, subject_text,body_text,cnt_succsess,cnt_error)" - #." VALUES (NULL , '$this->sid', '$date_sent', '$subject_text', '$body_text','".count($send_ok_ids)."','".count($send_error_ids)."')"; - #$sqlQuery = sisplet_query($sqlString); - - #$arch_id = mysqli_insert_id($GLOBALS['connect_db']); - $msg = array($lang['srv_inv_activate_respondents']. count($send_ok_ids)); - if (count($send_error_ids) > 0) { + + if (count($send_error_ids) > 0) { print_r("
");
 			print_r($lang['srv_inv_error0']);
 			print_r($send_error_ids);
 			print_r("
"); - } + } + # popravimo timestamp za regeneracijo dashboarda Common::getInstance()->Init($anketa); Common::getInstance()->updateEditStamp(); @@ -8858,10 +8842,7 @@ class SurveyInvitationsNew { } # pri personaliziranih aporočilih je e-mail obvezno polje - //if (!in_array('inv_field_email',$fields)) { - array_push($fields, 'inv_field_email'); - #} - + array_push($fields, 'inv_field_email'); # skreiramo nov vrstni red polj if (count($fields) > 0) { diff --git a/admin/survey/classes/class.SurveyMissingProfiles.php b/admin/survey/classes/class.SurveyMissingProfiles.php index 2e2a81002..d8aa97840 100644 --- a/admin/survey/classes/class.SurveyMissingProfiles.php +++ b/admin/survey/classes/class.SurveyMissingProfiles.php @@ -52,7 +52,7 @@ class SurveyMissingProfiles self :: addSystemProfiles(); # preberemo podatke vseh porfilov ki so na voljo in jih dodamo v array - $stringSelect = "SELECT * FROM srv_missing_profiles WHERE uid = '".self::getGlobalUserId()."' OR (uid = '0' AND system = 1) ORDER BY id"; + $stringSelect = "SELECT * FROM srv_missing_profiles WHERE uid = '".self::getGlobalUserId()."' OR (uid = '0' AND `system` = 1) ORDER BY id"; $querySelect = sisplet_query($stringSelect); if (mysqli_num_rows($querySelect)) { @@ -392,7 +392,7 @@ class SurveyMissingProfiles if (isset($pid) && $pid != null) { # ce mamo sistemski profil ga ne shranjujemo - $checkSelect = "SELECT * as cnt FROM srv_missing_profiles WHERE id = '".$pid."' and system = 1"; + $checkSelect = "SELECT * as cnt FROM srv_missing_profiles WHERE id = '".$pid."' and `system` = 1"; $checkQry = sisplet_query($checkSelect); if (mysqli_num_rows($checkQry) > 0) { return $pid; @@ -419,7 +419,7 @@ class SurveyMissingProfiles # imamo podatke, updejtamo profil v bazi (profili z id 1,2,3 so sitemski) if ($pid > 3) { # shranimo morebitno spremembo nastavitve display_mv_type - $updateString = "UPDATE srv_missing_profiles SET display_mv_type='".$display_mv_type."', show_zerro='".$show_zerro."', merge_missing='".$merge_missing."' WHERE id='".$pid."' AND system = 0"; + $updateString = "UPDATE srv_missing_profiles SET display_mv_type='".$display_mv_type."', show_zerro='".$show_zerro."', merge_missing='".$merge_missing."' WHERE id='".$pid."' AND `system` = 0"; $updatequery = sisplet_query($updateString); # najprej pobrišemo stare podatke za ta profil @@ -526,7 +526,7 @@ class SurveyMissingProfiles # izbrišemo lahko samo nesistemske profile if (self::$profiles[$pid]['system'] != 1) { # zaradi ključev se avtomatsko pobriše tudi: srv_missing_profiles_values - $sqlDelete = sisplet_query("DELETE FROM srv_missing_profiles WHERE id = '$pid' AND system != '1'"); + $sqlDelete = sisplet_query("DELETE FROM srv_missing_profiles WHERE id = '$pid' AND `system` != '1'"); } } diff --git a/admin/survey/classes/class.SurveyStatusCasi.php b/admin/survey/classes/class.SurveyStatusCasi.php index 930b47fd6..9c44e0201 100644 --- a/admin/survey/classes/class.SurveyStatusCasi.php +++ b/admin/survey/classes/class.SurveyStatusCasi.php @@ -28,7 +28,7 @@ class SurveyStatusCasi static function RefreshData() { # preberemo podatke vseh porfilov ki so na voljo in jih dodamo v array - $stringSelect = "SELECT * FROM srv_status_casi WHERE uid = '".self::getGlobalUserId()."' OR (uid = '0' AND system =1) ORDER BY id"; + $stringSelect = "SELECT * FROM srv_status_casi WHERE uid = '".self::getGlobalUserId()."' OR (uid = '0' AND `system` =1) ORDER BY id"; $querySelect = sisplet_query($stringSelect); while ( $rowSelect = mysqli_fetch_assoc($querySelect) ) { @@ -330,8 +330,8 @@ class SurveyStatusCasi static function Delete($pid) { if ($pid != 1) { - $sqlDelete = sisplet_query("DELETE FROM srv_status_casi WHERE id = '$pid' AND system != '1'"); - print_r("DELETE FROM srv_status_casi WHERE id = '$pid' AND system != '1'"); + $sqlDelete = sisplet_query("DELETE FROM srv_status_casi WHERE id = '$pid' AND `system` != '1'"); + print_r("DELETE FROM srv_status_casi WHERE id = '$pid' AND `system` != '1'"); } } diff --git a/admin/survey/classes/class.SurveyStatusProfiles.php b/admin/survey/classes/class.SurveyStatusProfiles.php index 1af212941..383258571 100644 --- a/admin/survey/classes/class.SurveyStatusProfiles.php +++ b/admin/survey/classes/class.SurveyStatusProfiles.php @@ -79,7 +79,7 @@ class SurveyStatusProfiles self::$profiles[$_SESSION['statusProfile']['id']] = $_SESSION['statusProfile']; } # preberemo podatke vseh porfilov ki so na voljo in jih dodamo v array - $stringSelect = "SELECT * FROM srv_status_profile WHERE uid='".self::getGlobalUserId()."' OR ank_id = '".self::$sid."' OR (uid = '0' AND system =1) ORDER BY id"; + $stringSelect = "SELECT * FROM srv_status_profile WHERE uid='".self::getGlobalUserId()."' OR ank_id = '".self::$sid."' OR (uid = '0' AND `system`=1) ORDER BY id"; $querySelect = sisplet_query($stringSelect); while ( $rowSelect = mysqli_fetch_assoc($querySelect) ) { @@ -923,7 +923,7 @@ class SurveyStatusProfiles } # izbrišemo lahko samo nesistemske profile if (self::$profiles[$pid]['system'] != 1) { - $sqlDelete = sisplet_query("DELETE FROM srv_status_profile WHERE id = '$pid' AND system != '1'"); + $sqlDelete = sisplet_query("DELETE FROM srv_status_profile WHERE id = '$pid' AND `system` != '1'"); } self::setDefaultProfileId(); @@ -945,7 +945,7 @@ class SurveyStatusProfiles # preimenujemo lahko samo nesistemske profile if (self::$profiles[$pid]['system'] != 1) { - $sqlRename = sisplet_query("UPDATE srv_status_profile SET name='$name' WHERE id = '$pid' AND system != '1'"); + $sqlRename = sisplet_query("UPDATE srv_status_profile SET name='$name' WHERE id = '$pid' AND `system` != '1'"); } } } diff --git a/admin/survey/classes/class.Vprasanje.php b/admin/survey/classes/class.Vprasanje.php index 762c711fb..99363b201 100644 --- a/admin/survey/classes/class.Vprasanje.php +++ b/admin/survey/classes/class.Vprasanje.php @@ -3369,7 +3369,7 @@ class Vprasanje { echo '

'; echo ''.$lang['srv_orientacija'].': '; - echo ''; echo ''; echo ''; echo ''; diff --git a/admin/survey/export/latexclasses/class.LatexDocument.php b/admin/survey/export/latexclasses/class.LatexDocument.php index 091536e16..7dd3f0006 100644 --- a/admin/survey/export/latexclasses/class.LatexDocument.php +++ b/admin/survey/export/latexclasses/class.LatexDocument.php @@ -224,13 +224,16 @@ class LatexDocument{ $datumGeneriranjaIzvoza = date("d. m. Y"); $anketaUstvarjena = SurveyInfo::getInstance()->getSurveyInsertDate(); - $dolgoImeAnkete = SurveyInfo::getSurveyColumn('akronim'); + $dolgoImeAnkete = $this->encodeText(SurveyInfo::getSurveyColumn('akronim')); + if($this->language!=-1){ //ce ni default jezik, ampak je prevod $_lang = '_'.$this->language; $kratkoImeAnkete = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_novaanketa_kratkoime'.$_lang); }else{ $kratkoImeAnkete = SurveyInfo::getSurveyColumn('naslov'); - } + } + $kratkoImeAnkete = $this->encodeText($kratkoImeAnkete); + $steviloVprasanj = SurveyInfo::getSurveyQuestionCount(); $anketaSpremenjena = SurveyInfo::getSurveyEditDate(); $avtorAnkete = SurveyInfo::getSurveyInsertName(); @@ -785,6 +788,8 @@ class LatexDocument{ //echo "stevilo spremenljivk: ".(SurveyInfo::getSurveyVariableCount()); $steviloSpremenljivk = SurveyInfo::getSurveyVariableCount(); + + if($export_format == 'pdf'){ #################################### //klicanje latex funkcije za generiranje naslovnice @@ -1336,4 +1341,74 @@ class LatexDocument{ $recnum = $rowu['recnum']; return $recnum; } + + #funkcija ki skrbi za encode dolocenih spornih delov besedila v latex-u prijazno + function encodeText($text=''){ + global $site_path, $lang; + //$text = str_replace(' ','X',$text); //nadomesti presledke + //echo "Encoding ".$text."
"; + + $this->path2UploadedImages = $site_path.'uploadi/editor/'; + if($text == ''){ //ce ni teksta, vrni se + return; + } + + //ureditev posebnih karakterjev za Latex http://www.cespedes.org/blog/85/how-to-escape-latex-special-characters, https://en.wikibooks.org/wiki/LaTeX/Special_Characters#Other_symbols + $text = str_replace('\\','\textbackslash{} ',$text); + //$text = str_replace('{','\{',$text); + //$text = str_replace('}','\}',$text); + $text = str_replace('$','\$ ',$text); + $text = str_replace('#','\# ',$text); + $text = str_replace('%','\% ',$text); + $text = str_replace('€','\euro',$text); + $text = str_replace('^','\textasciicircum{} ',$text); + $text = str_replace('_','\_ ',$text); + $text = str_replace('~','\textasciitilde{} ',$text); + $text = str_replace('&','\&',$text); + $text = str_replace('&','\&',$text); + $text = str_replace(' ','~',$text); + //$text = str_replace('<','\textless ',$text); + $text = str_replace('<',' \textless ',$text); + //$text = str_replace('>','\textgreater ',$text); + $text = str_replace('>',' \textgreater ',$text); + //ureditev posebnih karakterjev za Latex - konec + + //ureditev grskih crk + $text = str_replace('α','\textalpha ',$text); + $text = str_replace('β','\textbeta ',$text); + $text = str_replace('γ','\textgamma ',$text); + $text = str_replace('δ','\textdelta ',$text); + $text = str_replace('ε','\textepsilon ',$text); + $text = str_replace('ζ','\textzeta ',$text); + $text = str_replace('η','\texteta ',$text); + $text = str_replace('θ','\texttheta ',$text); + $text = str_replace('ι','\textiota ',$text); + $text = str_replace('κ','\textkappa ',$text); + $text = str_replace('λ','\textlambda ',$text); + $text = str_replace('μ','\textmugreek ',$text); + $text = str_replace('ν','\textnu ',$text); + $text = str_replace('ξ','\textxi ',$text); + //$text = str_replace('ο','\textomikron ',$text); + $text = str_replace('π','\textpi ',$text); + $text = str_replace('ρ','\textrho ',$text); + $text = str_replace('σ','\textsigma ',$text); + $text = str_replace('τ','\texttau ',$text); + $text = str_replace('υ','\textupsilon ',$text); + $text = str_replace('φ','\textphi ',$text); + $text = str_replace('χ','\textchi ',$text); + $text = str_replace('ψ','\textpsi ',$text); + $text = str_replace('ω','\textomega ',$text); + //ureditev grskih crk - konec + + + //RESEVANJE BESEDILA V CIRILICI + $contains_cyrillic = (bool) preg_match('/[\p{Cyrillic}]/u', $text); //ali je v besedilu cirilica? + if($contains_cyrillic){ // ce je cirilica v besedilu + $text = '\foreignlanguage{russian}{'.$text.'}'; + } + //RESEVANJE BESEDILA V CIRILICI - konec + + return $text; + } + #funkcija ki skrbi za encode dolocenih spornih delov besedila v latex-u prijazno - konec } \ No newline at end of file diff --git a/admin/survey/index.php b/admin/survey/index.php index ef63d341f..2a581d5a2 100644 --- a/admin/survey/index.php +++ b/admin/survey/index.php @@ -98,7 +98,7 @@ echo ''; // END CKEDITOR diff --git a/admin/survey/modules/Evalvacija/class.GC.php b/admin/survey/modules/Evalvacija/class.GC.php index 1424d2017..2f3b189da 100644 --- a/admin/survey/modules/Evalvacija/class.GC.php +++ b/admin/survey/modules/Evalvacija/class.GC.php @@ -183,15 +183,15 @@ class GC{ '4_1' => 'predmeti' ); - $reports_id = '30102020'; - $report_type = '3_1'; - $fak_id = '3000043'; + $reports_id = '11112020'; + $report_type = '2_2'; + $fak_id = '3000027'; $zip_name = ''; // Nastavimo pot do pdf-jev - //$this->pdf_path = 'modules/Evalvacija/pdf/unzipped/'; + $this->pdf_path = 'modules/Evalvacija/pdf/unzipped/'; //$this->pdf_path = 'modules/Evalvacija/pdf/unzipped/'.$fakultete[$fak_id]['kratica'].'/'; - $this->pdf_path = 'modules/Evalvacija/pdf/unzipped/'.$fakultete[$fak_id]['kratica'].'/'.$report_type_array[$report_type].'/'; + //$this->pdf_path = 'modules/Evalvacija/pdf/unzipped/'.$fakultete[$fak_id]['kratica'].'/'.$report_type_array[$report_type].'/'; echo 'Parametri:'; echo '