From 75160b12821f7f4299cce7f0b69c83c1502ae071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 27 May 2024 13:08:29 +0200 Subject: 2024-02-19 upstream --- admin/exportclases/class.pdfIzvoz.php | 3 +- admin/exportclases/class.pdfIzvozList.php | 1 + admin/exportclases/class.pdfIzvozResults.php | 3 +- admin/exportclases/class.rtfIzvoz.php | 3 +- admin/exportclases/class.rtfIzvozList.php | 1 + admin/exportclases/class.rtfIzvozResults.php | 3 +- admin/exportclases/class.tcpdf.php | 68 +- admin/exportclases/class.xlsIzvozAnalizaBreak.php | 2 +- .../exportclases/class.xlsIzvozAnalizaCrosstab.php | 2 +- .../class.xlsIzvozAnalizaFrekvenca.php | 2 +- admin/exportclases/class.xlsIzvozAnalizaMean.php | 2 +- .../class.xlsIzvozAnalizaMultiCrosstab.php | 2 +- .../class.xlsIzvozAnalizaStatistics.php | 2 +- admin/exportclases/class.xlsIzvozAnalizaSums.php | 8 +- admin/exportclases/class.xlsIzvozList.php | 1 + admin/survey/Branching.php | 4691 +++++--- admin/survey/BranchingAjax.php | 430 +- admin/survey/Glasovanje.php | 484 +- admin/survey/R/class.SurveyAnalysisR.php | 76 +- admin/survey/SurveyAdmin.php | 4741 ++++---- admin/survey/SurveyAdminAjax.php | 2522 +++-- admin/survey/SurveyAdminSettings.php | 9305 ++++++++-------- admin/survey/ajax.php | 301 +- admin/survey/api/apidoc/index.html | 1338 +-- admin/survey/api/class.ApiController.php | 3 +- admin/survey/api/class.ApiSurvey.php | 122 +- admin/survey/classes/class.AppSettings.php | 195 + admin/survey/classes/class.ArchiveSurveys.php | 345 + admin/survey/classes/class.Cache.php | 85 +- admin/survey/classes/class.Common.php | 220 +- admin/survey/classes/class.Dostop.php | 450 +- admin/survey/classes/class.Forum.php | 190 +- admin/survey/classes/class.GDPR.php | 1208 ++- admin/survey/classes/class.GlobalMisc.php | 8 +- admin/survey/classes/class.HashUrl.php | 9 +- admin/survey/classes/class.Help.php | 195 + admin/survey/classes/class.Library.php | 722 +- admin/survey/classes/class.LibraryBranching.php | 1193 +++ admin/survey/classes/class.NewSurvey.php | 508 +- admin/survey/classes/class.Notifications.php | 310 +- admin/survey/classes/class.Prevajanje.php | 374 +- admin/survey/classes/class.RecodeValues.php | 96 +- admin/survey/classes/class.Setting.php | 2 +- admin/survey/classes/class.SurveyAapor.php | 2 +- admin/survey/classes/class.SurveyAktivnost.php | 518 +- admin/survey/classes/class.SurveyAppendMerge.php | 937 +- admin/survey/classes/class.SurveyCheck.php | 346 + admin/survey/classes/class.SurveyComments.php | 1866 ++++ admin/survey/classes/class.SurveyCondition.php | 51 +- .../classes/class.SurveyConditionProfiles.php | 218 +- admin/survey/classes/class.SurveyConnect.php | 27 +- admin/survey/classes/class.SurveyCopy.php | 411 +- admin/survey/classes/class.SurveyCustomReport.php | 671 +- .../classes/class.SurveyDataSettingProfiles.php | 900 +- admin/survey/classes/class.SurveyDiagnostics.php | 646 +- admin/survey/classes/class.SurveyExport.php | 387 +- .../survey/classes/class.SurveyExportProfiles.php | 2 +- admin/survey/classes/class.SurveyInfo.php | 216 +- admin/survey/classes/class.SurveyInpect.php | 175 +- admin/survey/classes/class.SurveyList.php | 1561 ++- admin/survey/classes/class.SurveyListFolders.php | 1206 +++ .../survey/classes/class.SurveyMissingProfiles.php | 231 +- admin/survey/classes/class.SurveyMissingValues.php | 75 +- admin/survey/classes/class.SurveyParaAnalysis.php | 496 +- admin/survey/classes/class.SurveyParaGraph.php | 128 +- admin/survey/classes/class.SurveyPostProcess.php | 202 +- admin/survey/classes/class.SurveyQuotas.php | 231 +- admin/survey/classes/class.SurveyRecoding.php | 101 +- .../classes/class.SurveyReminderTracking.php | 5 +- admin/survey/classes/class.SurveyRespondents.php | 6 +- admin/survey/classes/class.SurveySetting.php | 10 +- admin/survey/classes/class.SurveySkupine.php | 143 +- admin/survey/classes/class.SurveyStaticHtml.php | 872 +- admin/survey/classes/class.SurveyStatistic.php | 1361 +-- .../classes/class.SurveyStatisticProfiles.php | 2 +- admin/survey/classes/class.SurveyStatusCasi.php | 57 +- .../survey/classes/class.SurveyStatusProfiles.php | 412 +- admin/survey/classes/class.SurveyTelephone.php | 685 +- admin/survey/classes/class.SurveyTextAnalysis.php | 4 +- admin/survey/classes/class.SurveyTheme.php | 519 +- admin/survey/classes/class.SurveyThemeEditor.php | 227 +- admin/survey/classes/class.SurveyTimeProfiles.php | 209 +- admin/survey/classes/class.SurveyUrlLinks.php | 68 +- admin/survey/classes/class.SurveyUsableResp.php | 27 +- admin/survey/classes/class.SurveyUserSession.php | 13 +- admin/survey/classes/class.SurveyUserSetting.php | 10 +- admin/survey/classes/class.SurveyVariableView.php | 28 +- .../classes/class.SurveyVariablesProfiles.php | 203 +- admin/survey/classes/class.SurveyZankaProfiles.php | 190 +- admin/survey/classes/class.SurveyZoom.php | 354 +- admin/survey/classes/class.User.php | 47 +- admin/survey/classes/class.UserSetting.php | 4 +- admin/survey/classes/class.Vprasanje.php | 6249 ++++++----- admin/survey/classes/class.VprasanjeDeleted.php | 185 + admin/survey/classes/class.VprasanjeInline.php | 55 +- .../library/HTMLPurifier/Encoder.php | 2 +- admin/survey/classes/log/class.SurveyLog.php | 2 +- .../classes/mobile/class.MobileSurveyAdmin.php | 599 +- admin/survey/classes/objects/obj.MailAdapter.php | 160 +- admin/survey/classes/objects/obj.PopUp.php | 39 +- admin/survey/classes/objects/obj.PopUpButton.php | 21 +- .../classes/objects/obj.PopUpCancelButton.php | 1 + .../classes/objects/obj.SpremenljivkaSkala.php | 4 +- admin/survey/classes/phpqrcode/cache/frame_1.dat | 2 + admin/survey/classes/phpqrcode/cache/frame_10.dat | Bin 0 -> 204 bytes admin/survey/classes/phpqrcode/cache/frame_11.dat | Bin 0 -> 210 bytes admin/survey/classes/phpqrcode/cache/frame_12.dat | Bin 0 -> 222 bytes admin/survey/classes/phpqrcode/cache/frame_13.dat | Bin 0 -> 223 bytes admin/survey/classes/phpqrcode/cache/frame_14.dat | Bin 0 -> 227 bytes admin/survey/classes/phpqrcode/cache/frame_15.dat | Bin 0 -> 242 bytes admin/survey/classes/phpqrcode/cache/frame_16.dat | 1 + admin/survey/classes/phpqrcode/cache/frame_17.dat | Bin 0 -> 237 bytes admin/survey/classes/phpqrcode/cache/frame_18.dat | 2 + admin/survey/classes/phpqrcode/cache/frame_19.dat | 3 + admin/survey/classes/phpqrcode/cache/frame_2.dat | 1 + admin/survey/classes/phpqrcode/cache/frame_20.dat | Bin 0 -> 250 bytes admin/survey/classes/phpqrcode/cache/frame_21.dat | 1 + admin/survey/classes/phpqrcode/cache/frame_22.dat | 3 + admin/survey/classes/phpqrcode/cache/frame_23.dat | 3 + admin/survey/classes/phpqrcode/cache/frame_24.dat | 1 + admin/survey/classes/phpqrcode/cache/frame_25.dat | 3 + admin/survey/classes/phpqrcode/cache/frame_26.dat | 2 + admin/survey/classes/phpqrcode/cache/frame_27.dat | Bin 0 -> 284 bytes admin/survey/classes/phpqrcode/cache/frame_28.dat | Bin 0 -> 318 bytes admin/survey/classes/phpqrcode/cache/frame_29.dat | 2 + admin/survey/classes/phpqrcode/cache/frame_3.dat | 1 + admin/survey/classes/phpqrcode/cache/frame_30.dat | Bin 0 -> 324 bytes admin/survey/classes/phpqrcode/cache/frame_31.dat | 1 + admin/survey/classes/phpqrcode/cache/frame_32.dat | 2 + admin/survey/classes/phpqrcode/cache/frame_33.dat | 14 + admin/survey/classes/phpqrcode/cache/frame_34.dat | Bin 0 -> 331 bytes admin/survey/classes/phpqrcode/cache/frame_35.dat | Bin 0 -> 342 bytes admin/survey/classes/phpqrcode/cache/frame_36.dat | Bin 0 -> 370 bytes admin/survey/classes/phpqrcode/cache/frame_37.dat | Bin 0 -> 376 bytes admin/survey/classes/phpqrcode/cache/frame_38.dat | 1 + admin/survey/classes/phpqrcode/cache/frame_39.dat | Bin 0 -> 404 bytes admin/survey/classes/phpqrcode/cache/frame_4.dat | 1 + admin/survey/classes/phpqrcode/cache/frame_40.dat | 2 + admin/survey/classes/phpqrcode/cache/frame_5.dat | 1 + admin/survey/classes/phpqrcode/cache/frame_6.dat | Bin 0 -> 132 bytes admin/survey/classes/phpqrcode/cache/frame_7.dat | Bin 0 -> 196 bytes admin/survey/classes/phpqrcode/cache/frame_8.dat | Bin 0 -> 201 bytes admin/survey/classes/phpqrcode/cache/frame_9.dat | Bin 0 -> 206 bytes .../classes/phpqrcode/cache/mask_0/mask_101_0.dat | Bin 0 -> 157 bytes .../classes/phpqrcode/cache/mask_0/mask_105_0.dat | Bin 0 -> 162 bytes .../classes/phpqrcode/cache/mask_0/mask_109_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_113_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_117_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_121_0.dat | 1 + .../classes/phpqrcode/cache/mask_0/mask_125_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_129_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_133_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_137_0.dat | 1 + .../classes/phpqrcode/cache/mask_0/mask_141_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_145_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_149_0.dat | 3 + .../classes/phpqrcode/cache/mask_0/mask_153_0.dat | 1 + .../classes/phpqrcode/cache/mask_0/mask_157_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_161_0.dat | Bin 0 -> 241 bytes .../classes/phpqrcode/cache/mask_0/mask_165_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_169_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_173_0.dat | 1 + .../classes/phpqrcode/cache/mask_0/mask_177_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_21_0.dat | Bin 0 -> 48 bytes .../classes/phpqrcode/cache/mask_0/mask_25_0.dat | Bin 0 -> 57 bytes .../classes/phpqrcode/cache/mask_0/mask_29_0.dat | Bin 0 -> 59 bytes .../classes/phpqrcode/cache/mask_0/mask_33_0.dat | Bin 0 -> 62 bytes .../classes/phpqrcode/cache/mask_0/mask_37_0.dat | Bin 0 -> 65 bytes .../classes/phpqrcode/cache/mask_0/mask_41_0.dat | Bin 0 -> 68 bytes .../classes/phpqrcode/cache/mask_0/mask_45_0.dat | Bin 0 -> 106 bytes .../classes/phpqrcode/cache/mask_0/mask_49_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_53_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_57_0.dat | 4 + .../classes/phpqrcode/cache/mask_0/mask_61_0.dat | Bin 0 -> 119 bytes .../classes/phpqrcode/cache/mask_0/mask_65_0.dat | Bin 0 -> 123 bytes .../classes/phpqrcode/cache/mask_0/mask_69_0.dat | 1 + .../classes/phpqrcode/cache/mask_0/mask_73_0.dat | 1 + .../classes/phpqrcode/cache/mask_0/mask_77_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_81_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_85_0.dat | 2 + .../classes/phpqrcode/cache/mask_0/mask_89_0.dat | 1 + .../classes/phpqrcode/cache/mask_0/mask_93_0.dat | 3 + .../classes/phpqrcode/cache/mask_0/mask_97_0.dat | Bin 0 -> 150 bytes .../classes/phpqrcode/cache/mask_1/mask_101_1.dat | 2 + .../classes/phpqrcode/cache/mask_1/mask_105_1.dat | 1 + .../classes/phpqrcode/cache/mask_1/mask_109_1.dat | 1 + .../classes/phpqrcode/cache/mask_1/mask_113_1.dat | 1 + .../classes/phpqrcode/cache/mask_1/mask_117_1.dat | 2 + .../classes/phpqrcode/cache/mask_1/mask_121_1.dat | 2 + .../classes/phpqrcode/cache/mask_1/mask_125_1.dat | 2 + .../classes/phpqrcode/cache/mask_1/mask_129_1.dat | Bin 0 -> 164 bytes .../classes/phpqrcode/cache/mask_1/mask_133_1.dat | 1 + .../classes/phpqrcode/cache/mask_1/mask_137_1.dat | 3 + .../classes/phpqrcode/cache/mask_1/mask_141_1.dat | 2 + .../classes/phpqrcode/cache/mask_1/mask_145_1.dat | 1 + .../classes/phpqrcode/cache/mask_1/mask_149_1.dat | 1 + .../classes/phpqrcode/cache/mask_1/mask_153_1.dat | 2 + .../classes/phpqrcode/cache/mask_1/mask_157_1.dat | 2 + .../classes/phpqrcode/cache/mask_1/mask_161_1.dat | 1 + .../classes/phpqrcode/cache/mask_1/mask_165_1.dat | 1 + .../classes/phpqrcode/cache/mask_1/mask_169_1.dat | 1 + .../classes/phpqrcode/cache/mask_1/mask_173_1.dat | 1 + .../classes/phpqrcode/cache/mask_1/mask_177_1.dat | 1 + .../classes/phpqrcode/cache/mask_1/mask_21_1.dat | Bin 0 -> 42 bytes .../classes/phpqrcode/cache/mask_1/mask_25_1.dat | Bin 0 -> 48 bytes .../classes/phpqrcode/cache/mask_1/mask_29_1.dat | Bin 0 -> 50 bytes .../classes/phpqrcode/cache/mask_1/mask_33_1.dat | Bin 0 -> 53 bytes .../classes/phpqrcode/cache/mask_1/mask_37_1.dat | Bin 0 -> 56 bytes .../classes/phpqrcode/cache/mask_1/mask_41_1.dat | Bin 0 -> 58 bytes .../classes/phpqrcode/cache/mask_1/mask_45_1.dat | Bin 0 -> 82 bytes .../classes/phpqrcode/cache/mask_1/mask_49_1.dat | Bin 0 -> 84 bytes .../classes/phpqrcode/cache/mask_1/mask_53_1.dat | Bin 0 -> 87 bytes .../classes/phpqrcode/cache/mask_1/mask_57_1.dat | Bin 0 -> 92 bytes .../classes/phpqrcode/cache/mask_1/mask_61_1.dat | 1 + .../classes/phpqrcode/cache/mask_1/mask_65_1.dat | Bin 0 -> 99 bytes .../classes/phpqrcode/cache/mask_1/mask_69_1.dat | Bin 0 -> 102 bytes .../classes/phpqrcode/cache/mask_1/mask_73_1.dat | Bin 0 -> 104 bytes .../classes/phpqrcode/cache/mask_1/mask_77_1.dat | Bin 0 -> 110 bytes .../classes/phpqrcode/cache/mask_1/mask_81_1.dat | Bin 0 -> 114 bytes .../classes/phpqrcode/cache/mask_1/mask_85_1.dat | 2 + .../classes/phpqrcode/cache/mask_1/mask_89_1.dat | 1 + .../classes/phpqrcode/cache/mask_1/mask_93_1.dat | 2 + .../classes/phpqrcode/cache/mask_1/mask_97_1.dat | 2 + .../classes/phpqrcode/cache/mask_2/mask_101_2.dat | 3 + .../classes/phpqrcode/cache/mask_2/mask_105_2.dat | 1 + .../classes/phpqrcode/cache/mask_2/mask_109_2.dat | 2 + .../classes/phpqrcode/cache/mask_2/mask_113_2.dat | 1 + .../classes/phpqrcode/cache/mask_2/mask_117_2.dat | 2 + .../classes/phpqrcode/cache/mask_2/mask_121_2.dat | Bin 0 -> 127 bytes .../classes/phpqrcode/cache/mask_2/mask_125_2.dat | 1 + .../classes/phpqrcode/cache/mask_2/mask_129_2.dat | 2 + .../classes/phpqrcode/cache/mask_2/mask_133_2.dat | 10 + .../classes/phpqrcode/cache/mask_2/mask_137_2.dat | 2 + .../classes/phpqrcode/cache/mask_2/mask_141_2.dat | 2 + .../classes/phpqrcode/cache/mask_2/mask_145_2.dat | 4 + .../classes/phpqrcode/cache/mask_2/mask_149_2.dat | 1 + .../classes/phpqrcode/cache/mask_2/mask_153_2.dat | 2 + .../classes/phpqrcode/cache/mask_2/mask_157_2.dat | 3 + .../classes/phpqrcode/cache/mask_2/mask_161_2.dat | Bin 0 -> 190 bytes .../classes/phpqrcode/cache/mask_2/mask_165_2.dat | 2 + .../classes/phpqrcode/cache/mask_2/mask_169_2.dat | Bin 0 -> 196 bytes .../classes/phpqrcode/cache/mask_2/mask_173_2.dat | 1 + .../classes/phpqrcode/cache/mask_2/mask_177_2.dat | 2 + .../classes/phpqrcode/cache/mask_2/mask_21_2.dat | Bin 0 -> 35 bytes .../classes/phpqrcode/cache/mask_2/mask_25_2.dat | Bin 0 -> 41 bytes .../classes/phpqrcode/cache/mask_2/mask_29_2.dat | Bin 0 -> 45 bytes .../classes/phpqrcode/cache/mask_2/mask_33_2.dat | Bin 0 -> 47 bytes .../classes/phpqrcode/cache/mask_2/mask_37_2.dat | Bin 0 -> 47 bytes .../classes/phpqrcode/cache/mask_2/mask_41_2.dat | 1 + .../classes/phpqrcode/cache/mask_2/mask_45_2.dat | Bin 0 -> 68 bytes .../classes/phpqrcode/cache/mask_2/mask_49_2.dat | Bin 0 -> 70 bytes .../classes/phpqrcode/cache/mask_2/mask_53_2.dat | Bin 0 -> 73 bytes .../classes/phpqrcode/cache/mask_2/mask_57_2.dat | Bin 0 -> 76 bytes .../classes/phpqrcode/cache/mask_2/mask_61_2.dat | Bin 0 -> 78 bytes .../classes/phpqrcode/cache/mask_2/mask_65_2.dat | Bin 0 -> 89 bytes .../classes/phpqrcode/cache/mask_2/mask_69_2.dat | Bin 0 -> 88 bytes .../classes/phpqrcode/cache/mask_2/mask_73_2.dat | Bin 0 -> 94 bytes .../classes/phpqrcode/cache/mask_2/mask_77_2.dat | 1 + .../classes/phpqrcode/cache/mask_2/mask_81_2.dat | 2 + .../classes/phpqrcode/cache/mask_2/mask_85_2.dat | 2 + .../classes/phpqrcode/cache/mask_2/mask_89_2.dat | 1 + .../classes/phpqrcode/cache/mask_2/mask_93_2.dat | Bin 0 -> 103 bytes .../classes/phpqrcode/cache/mask_2/mask_97_2.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_101_3.dat | 1 + .../classes/phpqrcode/cache/mask_3/mask_105_3.dat | 1 + .../classes/phpqrcode/cache/mask_3/mask_109_3.dat | 1 + .../classes/phpqrcode/cache/mask_3/mask_113_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_117_3.dat | 4 + .../classes/phpqrcode/cache/mask_3/mask_121_3.dat | Bin 0 -> 212 bytes .../classes/phpqrcode/cache/mask_3/mask_125_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_129_3.dat | 8 + .../classes/phpqrcode/cache/mask_3/mask_133_3.dat | Bin 0 -> 216 bytes .../classes/phpqrcode/cache/mask_3/mask_137_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_141_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_145_3.dat | 3 + .../classes/phpqrcode/cache/mask_3/mask_149_3.dat | 1 + .../classes/phpqrcode/cache/mask_3/mask_153_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_157_3.dat | Bin 0 -> 248 bytes .../classes/phpqrcode/cache/mask_3/mask_161_3.dat | 3 + .../classes/phpqrcode/cache/mask_3/mask_165_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_169_3.dat | 1 + .../classes/phpqrcode/cache/mask_3/mask_173_3.dat | 1 + .../classes/phpqrcode/cache/mask_3/mask_177_3.dat | Bin 0 -> 312 bytes .../classes/phpqrcode/cache/mask_3/mask_21_3.dat | Bin 0 -> 60 bytes .../classes/phpqrcode/cache/mask_3/mask_25_3.dat | Bin 0 -> 75 bytes .../classes/phpqrcode/cache/mask_3/mask_29_3.dat | Bin 0 -> 75 bytes .../classes/phpqrcode/cache/mask_3/mask_33_3.dat | Bin 0 -> 79 bytes .../classes/phpqrcode/cache/mask_3/mask_37_3.dat | Bin 0 -> 83 bytes .../classes/phpqrcode/cache/mask_3/mask_41_3.dat | Bin 0 -> 85 bytes .../classes/phpqrcode/cache/mask_3/mask_45_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_49_3.dat | Bin 0 -> 127 bytes .../classes/phpqrcode/cache/mask_3/mask_53_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_57_3.dat | Bin 0 -> 126 bytes .../classes/phpqrcode/cache/mask_3/mask_61_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_65_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_69_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_73_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_77_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_81_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_85_3.dat | Bin 0 -> 160 bytes .../classes/phpqrcode/cache/mask_3/mask_89_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_93_3.dat | 2 + .../classes/phpqrcode/cache/mask_3/mask_97_3.dat | Bin 0 -> 175 bytes .../classes/phpqrcode/cache/mask_4/mask_101_4.dat | 2 + .../classes/phpqrcode/cache/mask_4/mask_105_4.dat | 2 + .../classes/phpqrcode/cache/mask_4/mask_109_4.dat | Bin 0 -> 182 bytes .../classes/phpqrcode/cache/mask_4/mask_113_4.dat | 2 + .../classes/phpqrcode/cache/mask_4/mask_117_4.dat | 2 + .../classes/phpqrcode/cache/mask_4/mask_121_4.dat | Bin 0 -> 208 bytes .../classes/phpqrcode/cache/mask_4/mask_125_4.dat | Bin 0 -> 213 bytes .../classes/phpqrcode/cache/mask_4/mask_129_4.dat | Bin 0 -> 220 bytes .../classes/phpqrcode/cache/mask_4/mask_133_4.dat | 3 + .../classes/phpqrcode/cache/mask_4/mask_137_4.dat | Bin 0 -> 248 bytes .../classes/phpqrcode/cache/mask_4/mask_141_4.dat | Bin 0 -> 254 bytes .../classes/phpqrcode/cache/mask_4/mask_145_4.dat | Bin 0 -> 255 bytes .../classes/phpqrcode/cache/mask_4/mask_149_4.dat | 2 + .../classes/phpqrcode/cache/mask_4/mask_153_4.dat | 2 + .../classes/phpqrcode/cache/mask_4/mask_157_4.dat | 1 + .../classes/phpqrcode/cache/mask_4/mask_161_4.dat | 1 + .../classes/phpqrcode/cache/mask_4/mask_165_4.dat | 3 + .../classes/phpqrcode/cache/mask_4/mask_169_4.dat | Bin 0 -> 297 bytes .../classes/phpqrcode/cache/mask_4/mask_173_4.dat | 2 + .../classes/phpqrcode/cache/mask_4/mask_177_4.dat | 2 + .../classes/phpqrcode/cache/mask_4/mask_21_4.dat | Bin 0 -> 57 bytes .../classes/phpqrcode/cache/mask_4/mask_25_4.dat | Bin 0 -> 76 bytes .../classes/phpqrcode/cache/mask_4/mask_29_4.dat | Bin 0 -> 78 bytes .../classes/phpqrcode/cache/mask_4/mask_33_4.dat | Bin 0 -> 89 bytes .../classes/phpqrcode/cache/mask_4/mask_37_4.dat | Bin 0 -> 86 bytes .../classes/phpqrcode/cache/mask_4/mask_41_4.dat | Bin 0 -> 89 bytes .../classes/phpqrcode/cache/mask_4/mask_45_4.dat | Bin 0 -> 120 bytes .../classes/phpqrcode/cache/mask_4/mask_49_4.dat | Bin 0 -> 124 bytes .../classes/phpqrcode/cache/mask_4/mask_53_4.dat | Bin 0 -> 128 bytes .../classes/phpqrcode/cache/mask_4/mask_57_4.dat | Bin 0 -> 130 bytes .../classes/phpqrcode/cache/mask_4/mask_61_4.dat | Bin 0 -> 132 bytes .../classes/phpqrcode/cache/mask_4/mask_65_4.dat | 2 + .../classes/phpqrcode/cache/mask_4/mask_69_4.dat | 1 + .../classes/phpqrcode/cache/mask_4/mask_73_4.dat | 3 + .../classes/phpqrcode/cache/mask_4/mask_77_4.dat | 2 + .../classes/phpqrcode/cache/mask_4/mask_81_4.dat | 3 + .../classes/phpqrcode/cache/mask_4/mask_85_4.dat | Bin 0 -> 154 bytes .../classes/phpqrcode/cache/mask_4/mask_89_4.dat | 2 + .../classes/phpqrcode/cache/mask_4/mask_93_4.dat | 2 + .../classes/phpqrcode/cache/mask_4/mask_97_4.dat | Bin 0 -> 176 bytes .../classes/phpqrcode/cache/mask_5/mask_101_5.dat | 2 + .../classes/phpqrcode/cache/mask_5/mask_105_5.dat | Bin 0 -> 224 bytes .../classes/phpqrcode/cache/mask_5/mask_109_5.dat | Bin 0 -> 211 bytes .../classes/phpqrcode/cache/mask_5/mask_113_5.dat | 9 + .../classes/phpqrcode/cache/mask_5/mask_117_5.dat | 1 + .../classes/phpqrcode/cache/mask_5/mask_121_5.dat | Bin 0 -> 256 bytes .../classes/phpqrcode/cache/mask_5/mask_125_5.dat | 2 + .../classes/phpqrcode/cache/mask_5/mask_129_5.dat | Bin 0 -> 259 bytes .../classes/phpqrcode/cache/mask_5/mask_133_5.dat | 2 + .../classes/phpqrcode/cache/mask_5/mask_137_5.dat | 3 + .../classes/phpqrcode/cache/mask_5/mask_141_5.dat | Bin 0 -> 297 bytes .../classes/phpqrcode/cache/mask_5/mask_145_5.dat | Bin 0 -> 300 bytes .../classes/phpqrcode/cache/mask_5/mask_149_5.dat | 3 + .../classes/phpqrcode/cache/mask_5/mask_153_5.dat | 2 + .../classes/phpqrcode/cache/mask_5/mask_157_5.dat | 1 + .../classes/phpqrcode/cache/mask_5/mask_161_5.dat | 2 + .../classes/phpqrcode/cache/mask_5/mask_165_5.dat | Bin 0 -> 332 bytes .../classes/phpqrcode/cache/mask_5/mask_169_5.dat | 1 + .../classes/phpqrcode/cache/mask_5/mask_173_5.dat | 4 + .../classes/phpqrcode/cache/mask_5/mask_177_5.dat | 11 + .../classes/phpqrcode/cache/mask_5/mask_21_5.dat | Bin 0 -> 74 bytes .../classes/phpqrcode/cache/mask_5/mask_25_5.dat | 2 + .../classes/phpqrcode/cache/mask_5/mask_29_5.dat | 2 + .../classes/phpqrcode/cache/mask_5/mask_33_5.dat | Bin 0 -> 106 bytes .../classes/phpqrcode/cache/mask_5/mask_37_5.dat | Bin 0 -> 103 bytes .../classes/phpqrcode/cache/mask_5/mask_41_5.dat | 2 + .../classes/phpqrcode/cache/mask_5/mask_45_5.dat | 1 + .../classes/phpqrcode/cache/mask_5/mask_49_5.dat | Bin 0 -> 146 bytes .../classes/phpqrcode/cache/mask_5/mask_53_5.dat | 1 + .../classes/phpqrcode/cache/mask_5/mask_57_5.dat | 2 + .../classes/phpqrcode/cache/mask_5/mask_61_5.dat | 1 + .../classes/phpqrcode/cache/mask_5/mask_65_5.dat | Bin 0 -> 163 bytes .../classes/phpqrcode/cache/mask_5/mask_69_5.dat | Bin 0 -> 167 bytes .../classes/phpqrcode/cache/mask_5/mask_73_5.dat | Bin 0 -> 184 bytes .../classes/phpqrcode/cache/mask_5/mask_77_5.dat | 1 + .../classes/phpqrcode/cache/mask_5/mask_81_5.dat | 3 + .../classes/phpqrcode/cache/mask_5/mask_85_5.dat | Bin 0 -> 186 bytes .../classes/phpqrcode/cache/mask_5/mask_89_5.dat | 2 + .../classes/phpqrcode/cache/mask_5/mask_93_5.dat | 2 + .../classes/phpqrcode/cache/mask_5/mask_97_5.dat | 1 + .../classes/phpqrcode/cache/mask_6/mask_101_6.dat | 2 + .../classes/phpqrcode/cache/mask_6/mask_105_6.dat | 3 + .../classes/phpqrcode/cache/mask_6/mask_109_6.dat | 1 + .../classes/phpqrcode/cache/mask_6/mask_113_6.dat | 3 + .../classes/phpqrcode/cache/mask_6/mask_117_6.dat | 1 + .../classes/phpqrcode/cache/mask_6/mask_121_6.dat | Bin 0 -> 309 bytes .../classes/phpqrcode/cache/mask_6/mask_125_6.dat | 1 + .../classes/phpqrcode/cache/mask_6/mask_129_6.dat | Bin 0 -> 310 bytes .../classes/phpqrcode/cache/mask_6/mask_133_6.dat | Bin 0 -> 296 bytes .../classes/phpqrcode/cache/mask_6/mask_137_6.dat | 2 + .../classes/phpqrcode/cache/mask_6/mask_141_6.dat | 10 + .../classes/phpqrcode/cache/mask_6/mask_145_6.dat | Bin 0 -> 357 bytes .../classes/phpqrcode/cache/mask_6/mask_149_6.dat | 2 + .../classes/phpqrcode/cache/mask_6/mask_153_6.dat | Bin 0 -> 367 bytes .../classes/phpqrcode/cache/mask_6/mask_157_6.dat | 1 + .../classes/phpqrcode/cache/mask_6/mask_161_6.dat | Bin 0 -> 399 bytes .../classes/phpqrcode/cache/mask_6/mask_165_6.dat | Bin 0 -> 400 bytes .../classes/phpqrcode/cache/mask_6/mask_169_6.dat | 1 + .../classes/phpqrcode/cache/mask_6/mask_173_6.dat | 1 + .../classes/phpqrcode/cache/mask_6/mask_177_6.dat | 14 + .../classes/phpqrcode/cache/mask_6/mask_21_6.dat | 1 + .../classes/phpqrcode/cache/mask_6/mask_25_6.dat | 1 + .../classes/phpqrcode/cache/mask_6/mask_29_6.dat | 3 + .../classes/phpqrcode/cache/mask_6/mask_33_6.dat | Bin 0 -> 124 bytes .../classes/phpqrcode/cache/mask_6/mask_37_6.dat | 1 + .../classes/phpqrcode/cache/mask_6/mask_41_6.dat | Bin 0 -> 132 bytes .../classes/phpqrcode/cache/mask_6/mask_45_6.dat | Bin 0 -> 189 bytes .../classes/phpqrcode/cache/mask_6/mask_49_6.dat | 2 + .../classes/phpqrcode/cache/mask_6/mask_53_6.dat | Bin 0 -> 195 bytes .../classes/phpqrcode/cache/mask_6/mask_57_6.dat | 2 + .../classes/phpqrcode/cache/mask_6/mask_61_6.dat | 2 + .../classes/phpqrcode/cache/mask_6/mask_65_6.dat | 1 + .../classes/phpqrcode/cache/mask_6/mask_69_6.dat | 1 + .../classes/phpqrcode/cache/mask_6/mask_73_6.dat | Bin 0 -> 230 bytes .../classes/phpqrcode/cache/mask_6/mask_77_6.dat | 1 + .../classes/phpqrcode/cache/mask_6/mask_81_6.dat | 3 + .../classes/phpqrcode/cache/mask_6/mask_85_6.dat | Bin 0 -> 229 bytes .../classes/phpqrcode/cache/mask_6/mask_89_6.dat | Bin 0 -> 263 bytes .../classes/phpqrcode/cache/mask_6/mask_93_6.dat | Bin 0 -> 276 bytes .../classes/phpqrcode/cache/mask_6/mask_97_6.dat | 2 + .../classes/phpqrcode/cache/mask_7/mask_101_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_105_7.dat | 2 + .../classes/phpqrcode/cache/mask_7/mask_109_7.dat | 2 + .../classes/phpqrcode/cache/mask_7/mask_113_7.dat | 11 + .../classes/phpqrcode/cache/mask_7/mask_117_7.dat | 2 + .../classes/phpqrcode/cache/mask_7/mask_121_7.dat | 2 + .../classes/phpqrcode/cache/mask_7/mask_125_7.dat | Bin 0 -> 288 bytes .../classes/phpqrcode/cache/mask_7/mask_129_7.dat | Bin 0 -> 282 bytes .../classes/phpqrcode/cache/mask_7/mask_133_7.dat | Bin 0 -> 281 bytes .../classes/phpqrcode/cache/mask_7/mask_137_7.dat | 5 + .../classes/phpqrcode/cache/mask_7/mask_141_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_145_7.dat | 2 + .../classes/phpqrcode/cache/mask_7/mask_149_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_153_7.dat | 2 + .../classes/phpqrcode/cache/mask_7/mask_157_7.dat | 2 + .../classes/phpqrcode/cache/mask_7/mask_161_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_165_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_169_7.dat | Bin 0 -> 383 bytes .../classes/phpqrcode/cache/mask_7/mask_173_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_177_7.dat | Bin 0 -> 407 bytes .../classes/phpqrcode/cache/mask_7/mask_21_7.dat | 4 + .../classes/phpqrcode/cache/mask_7/mask_25_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_29_7.dat | 2 + .../classes/phpqrcode/cache/mask_7/mask_33_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_37_7.dat | Bin 0 -> 122 bytes .../classes/phpqrcode/cache/mask_7/mask_41_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_45_7.dat | Bin 0 -> 173 bytes .../classes/phpqrcode/cache/mask_7/mask_49_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_53_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_57_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_61_7.dat | 2 + .../classes/phpqrcode/cache/mask_7/mask_65_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_69_7.dat | Bin 0 -> 202 bytes .../classes/phpqrcode/cache/mask_7/mask_73_7.dat | Bin 0 -> 221 bytes .../classes/phpqrcode/cache/mask_7/mask_77_7.dat | Bin 0 -> 226 bytes .../classes/phpqrcode/cache/mask_7/mask_81_7.dat | 1 + .../classes/phpqrcode/cache/mask_7/mask_85_7.dat | Bin 0 -> 213 bytes .../classes/phpqrcode/cache/mask_7/mask_89_7.dat | Bin 0 -> 244 bytes .../classes/phpqrcode/cache/mask_7/mask_93_7.dat | Bin 0 -> 248 bytes .../classes/phpqrcode/cache/mask_7/mask_97_7.dat | 2 + .../surveyAnalysis/class.SurveyAnalysis.php | 6447 +++++------ .../surveyAnalysis/class.SurveyAnalysisArchive.php | 570 +- .../surveyAnalysis/class.SurveyAnalysisHelper.php | 88 +- .../classes/surveyAnalysis/class.SurveyBreak.php | 783 +- .../classes/surveyAnalysis/class.SurveyChart.php | 1125 +- .../surveyAnalysis/class.SurveyCrosstabs.php | 977 +- .../surveyAnalysis/class.SurveyEditsAnalysis.php | 24 +- .../classes/surveyAnalysis/class.SurveyMeans.php | 368 +- .../surveyAnalysis/class.SurveyMultiCrosstabs.php | 363 +- .../classes/surveyAnalysis/class.SurveyTTest.php | 309 +- .../surveyAnalysis/class.SurveyTableChart.php | 229 +- .../classes/surveyData/class.SurveyDataCollect.php | 490 +- .../classes/surveyData/class.SurveyDataDisplay.php | 2106 ++-- .../classes/surveyData/class.SurveyDataFile.php | 7 +- .../classes/surveyData/class.SurveySNDataFile.php | 20 +- .../classes/surveyEmails/class.SurveyAlert.php | 43 +- .../surveyEmails/class.SurveyInvitationsNew.php | 4567 ++++---- .../surveyEmails/class.SurveyInvitationsOld.php | 10670 +++++++++++++++++++ .../surveyEmails/class.SurveyUnsubscribe.php | 4 +- .../surveyEmails/squalo/class.SqualoApi.php | 9 +- .../squalo/class.SurveyInvitationsSqualo.php | 15 +- admin/survey/classes/tracking/CrossRoad.php | 432 +- admin/survey/classes/tracking/TrackingClass.php | 242 +- .../survey/classes/tracking/UserTrackingClass.php | 20 +- admin/survey/css/print.css | 99 + admin/survey/definition.php | 56 +- admin/survey/export/class.ExportController.php | 8 +- admin/survey/export/export_definitions.php | 37 +- .../export/latexclasses/Analize/AnalizaBreak.php | 219 +- .../export/latexclasses/Analize/AnalizaCReport.php | 62 +- .../export/latexclasses/Analize/AnalizaCharts.php | 22 +- .../latexclasses/Analize/AnalizaCrosstab.php | 293 +- .../export/latexclasses/Analize/AnalizaDesc.php | 46 +- .../export/latexclasses/Analize/AnalizaFreq.php | 85 +- .../export/latexclasses/Analize/AnalizaMean.php | 76 +- .../latexclasses/Analize/AnalizaMultiCrosstab.php | 362 +- .../export/latexclasses/Analize/AnalizaSums.php | 748 +- .../export/latexclasses/Analize/AnalizaTTest.php | 141 +- .../latexclasses/Vprasanja/BesediloLatex.php | 55 +- .../export/latexclasses/Vprasanja/DatumLatex.php | 27 +- .../latexclasses/Vprasanja/GridMultipleLatex.php | 180 +- .../export/latexclasses/Vprasanja/HeatmapLatex.php | 59 +- .../latexclasses/Vprasanja/KalkulacijaLatex.php | 2 +- .../export/latexclasses/Vprasanja/KvotaLatex.php | 4 +- .../latexclasses/Vprasanja/LokacijaLatex.php | 4 +- .../latexclasses/Vprasanja/MultiGridLatex.php | 895 +- .../export/latexclasses/Vprasanja/NagovorLatex.php | 13 +- .../Vprasanja/RadioCheckboxSelectLatex.php | 231 +- .../latexclasses/Vprasanja/RazvrscanjeLatex.php | 132 +- .../export/latexclasses/Vprasanja/SNImena.php | 4 +- .../export/latexclasses/Vprasanja/SteviloLatex.php | 127 +- .../export/latexclasses/Vprasanja/VsotaLatex.php | 41 +- .../export/latexclasses/class.LatexAnalysis.php | 26 +- .../latexclasses/class.LatexAnalysisElement.php | 598 +- .../export/latexclasses/class.LatexDocument.php | 686 +- .../latexclasses/class.LatexEditsAnalysis.php | 263 +- .../export/latexclasses/class.LatexStatus.php | 494 +- .../export/latexclasses/class.LatexSurvey.php | 682 +- .../latexclasses/class.LatexSurveyElement.php | 1416 +-- .../latexTemplatePdfAnalysisAndOtherLandscape.cls | 26 +- .../textemp/latexTemplatePdfAnalysisPortrait.cls | 22 +- .../textemp/latexTemplatePdfSurvey.cls | 155 +- admin/survey/export/xmlClasses/class.XmlSurvey.php | 4 +- .../export/xmlClasses/class.XmlSurveyElement.php | 3 +- admin/survey/img_new/jazvem.png | Bin 0 -> 23099 bytes admin/survey/index.php | 71 +- admin/survey/izvoz.php | 80 +- admin/survey/minify/.htaccess | 26 +- admin/survey/minify/.php_cs | 44 +- admin/survey/minify/.semver | 6 + admin/survey/minify/.travis.yml | 19 +- admin/survey/minify/CHANGELOG.md | 142 +- admin/survey/minify/bootstrap.php | 2 +- admin/survey/minify/builder/.htaccess | 4 + admin/survey/minify/builder/index.php | 2 +- admin/survey/minify/builder/ocCheck.php | 3 +- admin/survey/minify/builder/test.php | 4 +- admin/survey/minify/composer.json | 19 +- admin/survey/minify/config-test.php | 3 +- admin/survey/minify/groupsConfig.php | 13 +- admin/survey/minify/index.php | 4 +- admin/survey/minify/lib/HTTP/ConditionalGet.php | 4 +- admin/survey/minify/lib/HTTP/Encoder.php | 18 +- admin/survey/minify/lib/Minify.php | 7 +- admin/survey/minify/lib/Minify/App.php | 6 + admin/survey/minify/lib/Minify/CSSmin.php | 12 +- admin/survey/minify/lib/Minify/Cache/Null.php | 2 +- admin/survey/minify/lib/Minify/Cache/WinCache.php | 2 +- .../survey/minify/lib/Minify/Controller/Files.php | 1 - .../survey/minify/lib/Minify/Controller/Groups.php | 1 - admin/survey/minify/lib/Minify/Controller/Page.php | 1 - .../minify/lib/Minify/ControllerInterface.php | 2 +- admin/survey/minify/lib/Minify/HTML.php | 59 +- admin/survey/minify/lib/Minify/ImportProcessor.php | 4 +- .../minify/lib/Minify/JS/ClosureCompiler.php | 4 +- .../minify/lib/Minify/NailgunClosureCompiler.php | 2 +- admin/survey/minify/lib/Minify/Source/Factory.php | 2 +- admin/survey/minify/lib/Minify/YUICompressor.php | 1 - admin/survey/minify/lib/MrClay/Cli.php | 1 - admin/survey/minify/phpunit.xml | 4 +- admin/survey/minify/server-info.php | 3 +- admin/survey/minify/static/.htaccess | 80 +- admin/survey/minify/static/gen.php | 4 +- admin/survey/minify/static/lib.php | 12 +- admin/survey/minify/utils.php | 2 +- .../modules/mod_360_1KA/class.Survey3601ka.php | 4 +- admin/survey/modules/mod_MAZA/class.MAZA.php | 13 +- admin/survey/modules/mod_MAZA/js/MAZA.js | 2 +- .../mod_SPEEDINDEX/class.SurveySpeedIndex.php | 4 +- admin/survey/modules/mod_WPN/class.WPN.php | 1 - admin/survey/modules/mod_WPN/frontend/index.html | 392 +- admin/survey/modules/mod_WPN/frontend/index1.html | 720 +- admin/survey/modules/mod_WPN/frontend/ui.html | 208 +- .../class.SurveyAdvancedParadataLog.php | 24 +- .../class.SurveyAdvancedTimestamps.php | 238 + admin/survey/modules/mod_chat/class.SurveyChat.php | 49 +- .../mod_email_access/class.SurveyEmailAccess.php | 280 + .../disposable_email_blocklist.txt | 3474 ++++++ .../survey/modules/mod_geoIP/class.SurveyGeoIP.php | 36 +- .../Ajax/AjaxHierarhijaDostopUporabnikovClass.php | 33 +- .../class/Ajax/AjaxUporabnikiClass.php | 2 +- .../mod_hierarhija/class/HierarhijaAjaxClass.php | 13 +- .../class/HierarhijaAnalysisClass.php | 9 +- .../mod_hierarhija/class/HierarhijaClass.php | 3 +- .../mod_hierarhija/class/HierarhijaHelper.php | 12 +- .../mod_hierarhija/class/HierarhijaIzvoz.php | 3 +- .../mod_hierarhija/css/vendor/datatables.min.css | 2 +- .../mod_hierarhija/js/vendor/hierarhija_analize.js | 10 +- admin/survey/modules/mod_kakovost/R/kakovost.R | 376 +- .../modules/mod_kakovost/class.SurveyKakovost.php | 12 +- .../survey/modules/mod_panel/class.SurveyPanel.php | 108 +- admin/survey/modules/mod_quiz/class.SurveyQuiz.php | 67 +- .../mod_uporabnost/class.SurveyUporabnost.php | 4 +- .../class.SurveyVizualizacija.php | 9 +- .../modules/mod_voting/class.SurveyVoting.php | 14 +- admin/survey/pChart/classes/class.MyHorBar.php | 883 +- admin/survey/pChart/classes/class.pChart.php | 33 +- admin/survey/pChart/classes/class.pData.php | 4 +- admin/survey/parapodatki.php | 28 +- admin/survey/public.php | 112 +- admin/survey/redesign_test.php | 311 + admin/survey/redesign_test_narrow.php | 113 + admin/survey/script/Chartjs.js | 28 + admin/survey/script/Chartjs/chart.js | 13 + admin/survey/script/DragDrop/dragdropInAdmin.js | 16 +- admin/survey/script/GDPR.js | 102 +- admin/survey/script/Maps/VnaprejMarkers.js | 2 +- admin/survey/script/appendMerge.js | 34 +- admin/survey/script/branching.js | 461 +- admin/survey/script/break.js | 36 +- admin/survey/script/cReport.js | 87 +- admin/survey/script/calendar/calendar.js | 2 +- admin/survey/script/charts.js | 8 +- admin/survey/script/collectData.js | 2 +- admin/survey/script/comments.js | 198 + admin/survey/script/conditionProfiles.js | 4 +- admin/survey/script/crosstab.js | 46 +- admin/survey/script/customizeImageView.js | 20 +- admin/survey/script/dataSettingProfiles.js | 6 +- .../script/datatables/jquery.dataTables.min.css | 2 +- admin/survey/script/datepicker.js | 6 +- admin/survey/script/domainChange.js | 28 + admin/survey/script/dostop.js | 2 +- admin/survey/script/folders.js | 4 +- admin/survey/script/inspect.js | 2 +- admin/survey/script/invitations.js | 316 +- .../jquery.selectbox-0.6.1.js | 7 +- admin/survey/script/js-lang.php | 35 +- admin/survey/script/library.js | 490 +- admin/survey/script/means.js | 21 +- admin/survey/script/missingProfiles.js | 4 +- admin/survey/script/missingValues.js | 6 +- admin/survey/script/mobile.js | 104 +- admin/survey/script/multiCrosstabs.js | 6 + admin/survey/script/notifications.js | 63 +- admin/survey/script/postProcess.js | 165 +- admin/survey/script/progressBar.js | 10 +- admin/survey/script/quota.js | 38 +- admin/survey/script/script.js | 1597 ++- admin/survey/script/script_analiza.js | 627 +- admin/survey/script/skupine.js | 12 +- admin/survey/script/slideshow.js | 4 +- admin/survey/script/statistika.js | 4 +- admin/survey/script/statusProfiles.js | 46 +- admin/survey/script/surveyCondition.js | 6 +- admin/survey/script/surveyList.js | 317 +- admin/survey/script/telephone.js | 64 +- admin/survey/script/themes.js | 68 +- admin/survey/script/timeProfiles.js | 4 +- admin/survey/script/ttest.js | 20 +- admin/survey/script/uporabniki_custom.js | 12 +- admin/survey/script/vprasanje.js | 377 +- admin/survey/script/vprasanjeDeleted.js | 86 + admin/survey/script/vprasanjeInline.js | 470 +- admin/survey/script/zankaProfiles.js | 47 +- admin/survey/script/zoom.js | 31 +- admin/survey/unsubscribe.php | 5 +- 660 files changed, 69384 insertions(+), 38441 deletions(-) create mode 100644 admin/survey/classes/class.AppSettings.php create mode 100644 admin/survey/classes/class.ArchiveSurveys.php create mode 100644 admin/survey/classes/class.Help.php create mode 100644 admin/survey/classes/class.LibraryBranching.php create mode 100644 admin/survey/classes/class.SurveyCheck.php create mode 100644 admin/survey/classes/class.SurveyComments.php create mode 100644 admin/survey/classes/class.SurveyListFolders.php create mode 100644 admin/survey/classes/class.VprasanjeDeleted.php create mode 100644 admin/survey/classes/phpqrcode/cache/frame_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_10.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_11.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_12.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_13.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_14.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_15.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_16.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_17.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_18.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_19.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_20.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_21.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_22.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_23.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_24.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_25.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_26.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_27.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_28.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_29.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_30.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_31.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_32.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_33.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_34.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_35.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_36.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_37.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_38.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_39.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_40.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_8.dat create mode 100644 admin/survey/classes/phpqrcode/cache/frame_9.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_101_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_105_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_109_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_113_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_117_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_121_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_125_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_129_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_133_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_137_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_141_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_145_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_149_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_153_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_157_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_161_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_165_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_169_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_173_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_177_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_21_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_25_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_29_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_33_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_37_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_41_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_45_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_49_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_53_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_57_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_61_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_65_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_69_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_73_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_77_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_81_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_85_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_89_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_93_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_0/mask_97_0.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_101_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_105_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_109_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_113_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_117_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_121_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_125_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_129_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_133_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_137_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_141_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_145_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_149_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_153_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_157_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_161_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_165_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_169_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_173_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_177_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_21_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_25_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_29_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_33_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_37_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_41_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_45_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_49_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_53_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_57_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_61_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_65_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_69_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_73_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_77_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_81_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_85_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_89_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_93_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_1/mask_97_1.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_101_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_105_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_109_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_113_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_117_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_121_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_125_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_129_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_133_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_137_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_141_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_145_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_149_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_153_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_157_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_161_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_165_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_169_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_173_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_177_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_21_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_25_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_29_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_33_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_37_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_41_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_45_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_49_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_53_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_57_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_61_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_65_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_69_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_73_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_77_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_81_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_85_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_89_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_93_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_2/mask_97_2.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_101_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_105_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_109_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_113_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_117_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_121_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_125_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_129_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_133_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_137_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_141_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_145_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_149_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_153_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_157_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_161_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_165_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_169_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_173_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_177_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_21_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_25_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_29_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_33_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_37_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_41_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_45_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_49_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_53_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_57_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_61_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_65_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_69_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_73_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_77_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_81_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_85_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_89_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_93_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_3/mask_97_3.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_101_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_105_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_109_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_113_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_117_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_121_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_125_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_129_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_133_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_137_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_141_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_145_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_149_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_153_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_157_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_161_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_165_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_169_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_173_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_177_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_21_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_25_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_29_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_33_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_37_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_41_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_45_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_49_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_53_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_57_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_61_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_65_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_69_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_73_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_77_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_81_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_85_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_89_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_93_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_4/mask_97_4.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_101_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_105_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_109_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_113_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_117_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_121_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_125_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_129_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_133_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_137_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_141_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_145_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_149_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_153_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_157_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_161_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_165_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_169_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_173_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_177_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_21_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_25_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_29_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_33_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_37_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_41_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_45_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_49_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_53_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_57_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_61_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_65_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_69_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_73_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_77_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_81_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_85_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_89_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_93_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_5/mask_97_5.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_101_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_105_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_109_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_113_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_117_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_121_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_125_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_129_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_133_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_137_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_141_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_145_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_149_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_153_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_157_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_161_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_165_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_169_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_173_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_177_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_21_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_25_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_29_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_33_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_37_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_41_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_45_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_49_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_53_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_57_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_61_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_65_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_69_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_73_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_77_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_81_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_85_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_89_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_93_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_6/mask_97_6.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_101_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_105_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_109_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_113_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_117_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_121_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_125_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_129_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_133_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_137_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_141_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_145_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_149_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_153_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_157_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_161_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_165_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_169_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_173_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_177_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_21_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_25_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_29_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_33_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_37_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_41_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_45_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_49_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_53_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_57_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_61_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_65_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_69_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_73_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_77_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_81_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_85_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_89_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_93_7.dat create mode 100644 admin/survey/classes/phpqrcode/cache/mask_7/mask_97_7.dat create mode 100644 admin/survey/classes/surveyEmails/class.SurveyInvitationsOld.php create mode 100644 admin/survey/img_new/jazvem.png create mode 100644 admin/survey/minify/.semver create mode 100644 admin/survey/minify/builder/.htaccess create mode 100644 admin/survey/modules/mod_advanced_timestamps/class.SurveyAdvancedTimestamps.php create mode 100644 admin/survey/modules/mod_email_access/class.SurveyEmailAccess.php create mode 100644 admin/survey/modules/mod_email_access/disposable_email_blocklist.txt create mode 100644 admin/survey/redesign_test.php create mode 100644 admin/survey/redesign_test_narrow.php create mode 100644 admin/survey/script/Chartjs.js create mode 100644 admin/survey/script/Chartjs/chart.js create mode 100644 admin/survey/script/comments.js create mode 100644 admin/survey/script/domainChange.js create mode 100644 admin/survey/script/vprasanjeDeleted.js (limited to 'admin') diff --git a/admin/exportclases/class.pdfIzvoz.php b/admin/exportclases/class.pdfIzvoz.php index 798aff8..4e4e994 100644 --- a/admin/exportclases/class.pdfIzvoz.php +++ b/admin/exportclases/class.pdfIzvoz.php @@ -120,8 +120,7 @@ class PdfIzvoz { $this->anketa['uid'] = $global_user_id; SurveyUserSetting::getInstance()->Init($this->anketa['id'], $this->anketa['uid']); - if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) - $this->db_table = '_active'; + $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); } else return false; diff --git a/admin/exportclases/class.pdfIzvozList.php b/admin/exportclases/class.pdfIzvozList.php index 363e30a..c3eb032 100644 --- a/admin/exportclases/class.pdfIzvozList.php +++ b/admin/exportclases/class.pdfIzvozList.php @@ -212,6 +212,7 @@ class PdfIzvozList { SurveyDataDisplay::$_VARS[VAR_META] = 0; SurveyDataDisplay::$_VARS[VAR_EMAIL] = 0; SurveyDataDisplay::$_VARS[VAR_RELEVANCE] = 0; + SurveyDataDisplay::$_VARS[VAR_STATUS] = 0; SurveyDataDisplay::$_VARS[VAR_EDIT] = 0; SurveyDataDisplay::$_VARS[VAR_PRINT] = 0; SurveyDataDisplay::$_VARS[VAR_MONITORING] = 0; diff --git a/admin/exportclases/class.pdfIzvozResults.php b/admin/exportclases/class.pdfIzvozResults.php index 13eda1c..408a5f9 100644 --- a/admin/exportclases/class.pdfIzvozResults.php +++ b/admin/exportclases/class.pdfIzvozResults.php @@ -146,8 +146,7 @@ class PdfIzvozResults { { SurveyUserSetting::getInstance()->Init($this->anketa['id'], $global_user_id); - if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) - $this->db_table = '_active'; + $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); } else return false; diff --git a/admin/exportclases/class.rtfIzvoz.php b/admin/exportclases/class.rtfIzvoz.php index 31c5442..0fdd316 100644 --- a/admin/exportclases/class.rtfIzvoz.php +++ b/admin/exportclases/class.rtfIzvoz.php @@ -90,8 +90,7 @@ class RtfIzvoz { $this->anketa['uid'] = $global_user_id; SurveyUserSetting::getInstance()->Init($this->anketa['id'], $this->anketa['uid']); - if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) - $this->db_table = '_active'; + $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); } else return false; diff --git a/admin/exportclases/class.rtfIzvozList.php b/admin/exportclases/class.rtfIzvozList.php index b156dd5..fc974c7 100644 --- a/admin/exportclases/class.rtfIzvozList.php +++ b/admin/exportclases/class.rtfIzvozList.php @@ -159,6 +159,7 @@ class RtfIzvozList { SurveyDataDisplay::$_VARS[VAR_META] = 0; SurveyDataDisplay::$_VARS[VAR_EMAIL] = 0; SurveyDataDisplay::$_VARS[VAR_RELEVANCE] = 0; + SurveyDataDisplay::$_VARS[VAR_STATUS] = 0; SurveyDataDisplay::$_VARS[VAR_EDIT] = 0; SurveyDataDisplay::$_VARS[VAR_PRINT] = 0; SurveyDataDisplay::$_VARS[VAR_MONITORING] = 0; diff --git a/admin/exportclases/class.rtfIzvozResults.php b/admin/exportclases/class.rtfIzvozResults.php index 31975bb..3fe4340 100644 --- a/admin/exportclases/class.rtfIzvozResults.php +++ b/admin/exportclases/class.rtfIzvozResults.php @@ -115,8 +115,7 @@ class RtfIzvozResults { { SurveyUserSetting::getInstance()->Init($this->anketa['id'], $global_user_id); - if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) - $this->db_table = '_active'; + $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); } else return false; diff --git a/admin/exportclases/class.tcpdf.php b/admin/exportclases/class.tcpdf.php index 3276560..c461a33 100644 --- a/admin/exportclases/class.tcpdf.php +++ b/admin/exportclases/class.tcpdf.php @@ -67,7 +67,7 @@ // dullus for text Justification. // Bob Vincent (pillarsdotnet@users.sourceforge.net) for
  • value attribute. // Patrick Benny for text stretch suggestion on Cell(). -// Johannes Gntert for JavaScript support. +// Johannes G�ntert for JavaScript support. // Denis Van Nuffelen for Dynamic Form. // Jacek Czekaj for multibyte justification // Anthony Ferrara for the reintroduction of legacy image methods. @@ -78,7 +78,7 @@ // Mohamad Ali Golkar, Saleh AlMatrafe, Charles Abbott for Arabic and Persian support. // Moritz Wagner and Andreas Wurmser for graphic functions. // Andrew Whitehead for core fonts support. -// Esteban Jol Marn for OpenType font conversion. +// Esteban Jo�l Mar�n for OpenType font conversion. // Teus Hagen for several suggestions and fixes. // Yukihiro Nakadaira for CID-0 CJK fonts fixes. // Kosmas Papachristos for some CSS improvements. @@ -5501,12 +5501,12 @@ if (!class_exists('TCPDF', false)) { $font = file_get_contents($fontfile); $compressed = (substr($file, -2) == '.z'); if ((!$compressed) AND (isset($info['length2']))) { - $header = (ord($font{0}) == 128); + $header = (ord($font[0]) == 128); if ($header) { //Strip first binary header $font = substr($font, 6); } - if ($header AND (ord($font{$info['length1']}) == 128)) { + if ($header AND (ord($font[$info['length1']]) == 128)) { //Strip second binary header $font = substr($font, 0, $info['length1']).substr($font, ($info['length1'] + 6)); } @@ -6443,7 +6443,7 @@ if (!class_exists('TCPDF', false)) { $strarr = array(); $strlen = strlen($str); for($i=0; $i < $strlen; ++$i) { - $strarr[] = ord($str{$i}); + $strarr[] = ord($str[$i]); } return $strarr; } @@ -6453,7 +6453,7 @@ if (!class_exists('TCPDF', false)) { $str .= ''; // force $str to be a string $length = strlen($str); for($i = 0; $i < $length; ++$i) { - $char = ord($str{$i}); // get one string character at time + $char = ord($str[$i]); // get one string character at time if (count($bytes) == 0) { // get starting octect if ($char <= 0x7F) { $unicode[] = $char; // use the character "as is" because is ASCII @@ -6689,7 +6689,7 @@ if (!class_exists('TCPDF', false)) { * @access public */ public function addHtmlLink($url, $name, $fill=0, $firstline=false, $color='', $style=-1) { - if (!empty($url) AND ($url{0} == '#')) { + if (!empty($url) AND ($url[0] == '#')) { // convert url to internal link $page = intval(substr($url, 1)); $url = $this->AddLink(); @@ -6833,7 +6833,7 @@ if (!class_exists('TCPDF', false)) { $j = 0; for ($i = 0; $i < 256; ++$i) { $t = $rc4[$i]; - $j = ($j + $t + ord($k{$i})) % 256; + $j = ($j + $t + ord($k[$i])) % 256; $rc4[$i] = $rc4[$j]; $rc4[$j] = $t; } @@ -6853,7 +6853,7 @@ if (!class_exists('TCPDF', false)) { $rc4[$a] = $rc4[$b]; $rc4[$b] = $t; $k = $rc4[($rc4[$a] + $rc4[$b]) % 256]; - $out .= chr(ord($text{$i}) ^ $k); + $out .= chr(ord($text[$i]) ^ $k); } return $out; } @@ -8784,7 +8784,7 @@ if (!class_exists('TCPDF', false)) { /* * Adds a javascript * @access public - * @author Johannes Gntert, Nicola Asuni + * @author Johannes G�ntert, Nicola Asuni * @since 2.1.002 (2008-02-12) */ public function IncludeJS($script) { @@ -8794,7 +8794,7 @@ if (!class_exists('TCPDF', false)) { /* * Create a javascript PDF string. * @access protected - * @author Johannes Gntert, Nicola Asuni + * @author Johannes G�ntert, Nicola Asuni * @since 2.1.002 (2008-02-12) */ protected function _putjavascript() { @@ -9424,7 +9424,7 @@ if (!class_exists('TCPDF', false)) { * @param array $col1 first color (RGB components). * @param array $col2 second color (RGB components). * @param array $coords array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0). - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @access public */ @@ -9442,7 +9442,7 @@ if (!class_exists('TCPDF', false)) { * @param array $col1 first color (RGB components). * @param array $col2 second color (RGB components). * @param array $coords array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined. - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @access public */ @@ -9464,7 +9464,7 @@ if (!class_exists('TCPDF', false)) { * @param array $coords * @param array $coords_min minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0 * @param array $coords_max maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1 - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @access public */ @@ -9544,7 +9544,7 @@ if (!class_exists('TCPDF', false)) { * @param float $y ordinate of the top left corner of the rectangle. * @param float $w width of the rectangle. * @param float $h height of the rectangle. - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @access protected */ @@ -9567,7 +9567,7 @@ if (!class_exists('TCPDF', false)) { * @param array $col1 first color (RGB components). * @param array $col2 second color (RGB components). * @param array $coords array of coordinates. - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @access protected */ @@ -9591,7 +9591,7 @@ if (!class_exists('TCPDF', false)) { /** * Output shaders. - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @access protected */ @@ -9874,7 +9874,7 @@ if (!class_exists('TCPDF', false)) { $cnt = count($lines); for ($i=0; $i < $cnt; ++$i) { $line = $lines[$i]; - if (($line == '') OR ($line{0} == '%')) { + if (($line == '') OR ($line[0] == '%')) { continue; } $len = strlen($line); @@ -9925,7 +9925,7 @@ if (!class_exists('TCPDF', false)) { case 'V': case 'L': case 'C': { - $line{$len-1} = strtolower($cmd); + $line[$len-1] = strtolower($cmd); $this->_out($line); break; } @@ -10468,7 +10468,7 @@ if (!class_exists('TCPDF', false)) { $tagname = strtolower($tag[1]); // check if we are inside a table header if ($tagname == 'thead') { - if ($element{0} == '/') { + if ($element[0] == '/') { $thead = false; } else { $thead = true; @@ -10478,7 +10478,7 @@ if (!class_exists('TCPDF', false)) { } $dom[$key]['tag'] = true; $dom[$key]['value'] = $tagname; - if ($element{0} == '/') { + if ($element[0] == '/') { // closing html tag $dom[$key]['opening'] = false; $dom[$key]['parent'] = end($level); @@ -10621,10 +10621,10 @@ if (!class_exists('TCPDF', false)) { } } // font style - if (isset($dom[$key]['style']['font-weight']) AND (strtolower($dom[$key]['style']['font-weight']{0}) == 'b')) { + if (isset($dom[$key]['style']['font-weight']) AND (strtolower($dom[$key]['style']['font-weight'][0]) == 'b')) { $dom[$key]['fontstyle'] .= 'B'; } - if (isset($dom[$key]['style']['font-style']) AND (strtolower($dom[$key]['style']['font-style']{0}) == 'i')) { + if (isset($dom[$key]['style']['font-style']) AND (strtolower($dom[$key]['style']['font-style'][0]) == 'i')) { $dom[$key]['fontstyle'] .= '"I'; } // font color @@ -10641,9 +10641,9 @@ if (!class_exists('TCPDF', false)) { foreach ($decors as $dec) { $dec = trim($dec); if (!empty($dec)) { - if ($dec{0} == 'u') { + if ($dec[0] == 'u') { $dom[$key]['fontstyle'] .= 'U'; - } elseif ($dec{0} == 'l') { + } elseif ($dec[0] == 'l') { $dom[$key]['fontstyle'] .= 'D'; } } @@ -10659,7 +10659,7 @@ if (!class_exists('TCPDF', false)) { } // check for text alignment if (isset($dom[$key]['style']['text-align'])) { - $dom[$key]['align'] = strtoupper($dom[$key]['style']['text-align']{0}); + $dom[$key]['align'] = strtoupper($dom[$key]['style']['text-align'][0]); } // check for border attribute if (isset($dom[$key]['style']['border'])) { @@ -10682,9 +10682,9 @@ if (!class_exists('TCPDF', false)) { // font size if (isset($dom[$key]['attribute']['size'])) { if ($key > 0) { - if ($dom[$key]['attribute']['size']{0} == '+') { + if ($dom[$key]['attribute']['size'][0] == '+') { $dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] + intval(substr($dom[$key]['attribute']['size'], 1)); - } elseif ($dom[$key]['attribute']['size']{0} == '-') { + } elseif ($dom[$key]['attribute']['size'][0] == '-') { $dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] - intval(substr($dom[$key]['attribute']['size'], 1)); } else { $dom[$key]['fontsize'] = intval($dom[$key]['attribute']['size']); @@ -10721,8 +10721,8 @@ if (!class_exists('TCPDF', false)) { if (($dom[$key]['value'] == 'pre') OR ($dom[$key]['value'] == 'tt')) { $dom[$key]['fontname'] = $this->default_monospaced_font; } - if (($dom[$key]['value']{0} == 'h') AND (intval($dom[$key]['value']{1}) > 0) AND (intval($dom[$key]['value']{1}) < 7)) { - $headsize = (4 - intval($dom[$key]['value']{1})) * 2; + if (($dom[$key]['value'][0] == 'h') AND (intval($dom[$key]['value'][1]) > 0) AND (intval($dom[$key]['value'][1]) < 7)) { + $headsize = (4 - intval($dom[$key]['value'][1])) * 2; $dom[$key]['fontsize'] = $dom[0]['fontsize'] + $headsize; $dom[$key]['fontstyle'] .= 'B'; } @@ -10770,7 +10770,7 @@ if (!class_exists('TCPDF', false)) { } // check for text alignment if (isset($dom[$key]['attribute']['align']) AND (!empty($dom[$key]['attribute']['align'])) AND ($dom[$key]['value'] !== 'img')) { - $dom[$key]['align'] = strtoupper($dom[$key]['attribute']['align']{0}); + $dom[$key]['align'] = strtoupper($dom[$key]['attribute']['align'][0]); } } // end opening tag } else { @@ -11686,9 +11686,9 @@ if (!class_exists('TCPDF', false)) { foreach ($decors as $dec) { $dec = trim($dec); if (!empty($dec)) { - if ($dec{0} == 'u') { + if ($dec[0] == 'u') { $this->HREF['style'] .= 'U'; - } elseif ($dec{0} == 'l') { + } elseif ($dec[0] == 'l') { $this->HREF['style'] .= 'D'; } } @@ -11752,7 +11752,7 @@ if (!class_exists('TCPDF', false)) { $imglink = ''; if (isset($this->HREF['url']) AND !empty($this->HREF['url'])) { $imglink = $this->HREF['url']; - if ($imglink{0} == '#') { + if ($imglink[0] == '#') { // convert url to internal link $page = intval(substr($imglink, 1)); $imglink = $this->AddLink(); diff --git a/admin/exportclases/class.xlsIzvozAnalizaBreak.php b/admin/exportclases/class.xlsIzvozAnalizaBreak.php index 1ad3a87..6573fc8 100644 --- a/admin/exportclases/class.xlsIzvozAnalizaBreak.php +++ b/admin/exportclases/class.xlsIzvozAnalizaBreak.php @@ -107,7 +107,7 @@ class XlsIzvozAnalizaBreak { $output = $convertTypes['BOMchar']; - $output .= '
    '.$lang['export_analisys_break'].'
    '; + $output .= '
    '.$lang['export_analisys_break'].' - '.SurveyInfo::getSurveyTitle().'
    '; $output .= '
    '; diff --git a/admin/exportclases/class.xlsIzvozAnalizaCrosstab.php b/admin/exportclases/class.xlsIzvozAnalizaCrosstab.php index 9acbaaa..da6de63 100644 --- a/admin/exportclases/class.xlsIzvozAnalizaCrosstab.php +++ b/admin/exportclases/class.xlsIzvozAnalizaCrosstab.php @@ -109,7 +109,7 @@ class XlsIzvozAnalizaCrosstab { $output = $convertTypes['BOMchar']; - $output .= '
    '.$lang['export_analisys_crosstabs'].'
    '; + $output .= '
    '.$lang['export_analisys_crosstabs'].' - '.SurveyInfo::getSurveyTitle().'
    '; # polovimo nastavtve missing profila diff --git a/admin/exportclases/class.xlsIzvozAnalizaFrekvenca.php b/admin/exportclases/class.xlsIzvozAnalizaFrekvenca.php index 6fcf638..2377071 100644 --- a/admin/exportclases/class.xlsIzvozAnalizaFrekvenca.php +++ b/admin/exportclases/class.xlsIzvozAnalizaFrekvenca.php @@ -106,7 +106,7 @@ class XlsIzvozAnalizaFrekvenca { $output = $convertTypes['BOMchar']; - $output .= '
    '.$lang['export_analisys_freq'].'
    '; + $output .= '
    '.$lang['export_analisys_freq'].' - '.SurveyInfo::getInstance()->getSurveyTitle().'
    '; # preberemo header if ($this->headFileName !== null) { diff --git a/admin/exportclases/class.xlsIzvozAnalizaMean.php b/admin/exportclases/class.xlsIzvozAnalizaMean.php index c007754..80a4fef 100644 --- a/admin/exportclases/class.xlsIzvozAnalizaMean.php +++ b/admin/exportclases/class.xlsIzvozAnalizaMean.php @@ -112,7 +112,7 @@ class XlsIzvozAnalizaMean { $output = $convertTypes['BOMchar']; - $output .= '
    '.$lang['export_analisys_means'].'
    '; + $output .= '
    '.$lang['export_analisys_means'].' - '.SurveyInfo::getSurveyTitle().'
    '; $means = array(); diff --git a/admin/exportclases/class.xlsIzvozAnalizaMultiCrosstab.php b/admin/exportclases/class.xlsIzvozAnalizaMultiCrosstab.php index cd1f5e7..5951b09 100644 --- a/admin/exportclases/class.xlsIzvozAnalizaMultiCrosstab.php +++ b/admin/exportclases/class.xlsIzvozAnalizaMultiCrosstab.php @@ -94,7 +94,7 @@ class XlsIzvozAnalizaMultiCrosstab { $output = $convertTypes['BOMchar']; - $output .= '
    '.$lang['export_analisys_multicrosstabs'].'
    '; + $output .= '
    '.$lang['export_analisys_multicrosstabs'].' - '.SurveyInfo::getSurveyTitle().'
    '; $output .= '
    '; // Napolnimo variable s katerimi lahko operiramo diff --git a/admin/exportclases/class.xlsIzvozAnalizaStatistics.php b/admin/exportclases/class.xlsIzvozAnalizaStatistics.php index bac91ff..f488a99 100644 --- a/admin/exportclases/class.xlsIzvozAnalizaStatistics.php +++ b/admin/exportclases/class.xlsIzvozAnalizaStatistics.php @@ -105,7 +105,7 @@ class XlsIzvozAnalizaStatistics { $output = $convertTypes['BOMchar']; - $output .= '
    '.$lang['export_analisys_desc'].'
    '; + $output .= '
    '.$lang['export_analisys_desc'].' - '.SurveyInfo::getSurveyTitle().'
    '; $output .= '
    '; if ($this->headFileName !== null ) { diff --git a/admin/exportclases/class.xlsIzvozAnalizaSums.php b/admin/exportclases/class.xlsIzvozAnalizaSums.php index 18c70c5..df61764 100644 --- a/admin/exportclases/class.xlsIzvozAnalizaSums.php +++ b/admin/exportclases/class.xlsIzvozAnalizaSums.php @@ -105,7 +105,7 @@ class XlsIzvozAnalizaSums { $output = $convertTypes['BOMchar']; - $output .= '
    '.$lang['export_analisys_sums'].'
    '; + $output .= '
    '.$lang['export_analisys_sums'].' - '.SurveyInfo::getSurveyTitle().'
    '; # preberemo header if ($this->headFileName !== null) { @@ -1962,8 +1962,9 @@ class XlsIzvozAnalizaSums { $maxAnswer = (SurveyDataSettingProfiles :: getSetting('numOpenAnswers') > 0) ? SurveyDataSettingProfiles :: getSetting('numOpenAnswers') : 30; $counter = 0; $_kumulativa = 0; + //SurveyAnalysis::$_FREQUENCYS[$_sequence] - if (count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'])> 0 ) { + if (is_countable(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) && count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'])> 0 ) { $_valid_answers = SurveyAnalysis :: sortTextValidAnswers($spid,$variable,SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']); @@ -1978,6 +1979,7 @@ class XlsIzvozAnalizaSums { # izpišemo sumo veljavnih $counter = self::outputSumaValidAnswerVertical($counter,$_sequence,$spid,$options); } + if (count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) { foreach (SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) { if ($iAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki nisno 0 @@ -2258,7 +2260,7 @@ class XlsIzvozAnalizaSums { $counter = 1; $_kumulativa = 0; - if (count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'])> 0 ) { + if (is_countable(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) && count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) > 0 ) { foreach (SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'] AS $vkey => $vAnswer) { if ($vAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki nisno 0 $counter = self::outputValidAnswerVertical($counter,$vkey,$vAnswer,$_sequence,$spid,$_kumulativa,array('isOtherAnswer'=>true)); diff --git a/admin/exportclases/class.xlsIzvozList.php b/admin/exportclases/class.xlsIzvozList.php index e3515ab..bcff7ea 100644 --- a/admin/exportclases/class.xlsIzvozList.php +++ b/admin/exportclases/class.xlsIzvozList.php @@ -139,6 +139,7 @@ class XlsIzvozList { SurveyDataDisplay::$_VARS[VAR_META] = 0; SurveyDataDisplay::$_VARS[VAR_EMAIL] = 0; SurveyDataDisplay::$_VARS[VAR_RELEVANCE] = 0; + SurveyDataDisplay::$_VARS[VAR_STATUS] = 0; SurveyDataDisplay::$_VARS[VAR_EDIT] = 0; SurveyDataDisplay::$_VARS[VAR_PRINT] = 0; SurveyDataDisplay::$_VARS[VAR_MONITORING] = 0; diff --git a/admin/survey/Branching.php b/admin/survey/Branching.php index 08ff025..6c48009 100644 --- a/admin/survey/Branching.php +++ b/admin/survey/Branching.php @@ -5,22 +5,8 @@ class Branching { var $anketa; // trenutna anketa var $grupa; // trenutna grupa var $spremenljivka; // trenutna spremenljivka - //var $SurveyAdmin = null; // globalna spremenljivka za SurveyAdmin // SurveyAdmin se nikjer vec ne klice iz Branchinga - - //var $sidebar; // ali prikazemo sidebar: 0-ne, 1-vprasanja, 2-library // sidebara nimamo vec - //var $collapsed_content; // ali prikazujemo vseibno IFa (ce ne se poklice z ajaxom) // to se bo pa mogoce se uporabil, pri skrivanju ifov, zaenkrat se pa ne var $skin = 0; - - // teh nastavitev se ne uporablja vec - // tele nastavitve so tudi v BranchingAjax in jih je treba tudi tam popravit! - - //var $maxIfCount = 0; // koliko ifov je meja za prikaz. Če je 0 prikeže vse - //var $autoRecount = 0; // ce je vec kot 50 spremenljivk nimamo avtomatskega prestevilcevanja - - //var $new = true; // spremenljivka za nov nacin prikaza ifov (s checkboxi), ker bo zihr treba se nazaj dajat... (v Branching.php in branching.js) - //var $full_screen_edit = false; // Ali editiramo v full screen nacinu - var $expanded = false; // ali prikazujemo anketo razsirjeno (prikazan predogled vprasanja) ali skrceno (samo 1 vrstica za vprasanje) var $db_table = ''; @@ -34,7 +20,7 @@ class Branching { var $prevajanje = false; var $imageadded = array(); - //$imageadded[$spremenljivka] = false; + /** * @desc konstruktor @@ -84,8 +70,7 @@ class Branching { SurveyInfo::getInstance()->SurveyInit($this->anketa); - if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) - $this->db_table = '_active'; + $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); UserSetting :: getInstance()->Init($global_user_id); @@ -102,7 +87,7 @@ class Branching { } /** - * @desc inicializacija branchinga (samo prvi�, na za�etku), prepi�e vrstni red iz normalenga urejanja + * @desc inicializacija branchinga (samo prvic, na zacetku), prepise vrstni red iz normalenga urejanja */ function init_branching () { @@ -147,44 +132,39 @@ class Branching { $gl = new Glasovanje($this->anketa); - //div z nastavitvami za glasovanje - echo '
    '; - //$this->display_glasovanje_settings(); + // div z nastavitvami za glasovanje + echo '
    '; + echo '
    '; $gl->display_glasovanje_settings(); - echo '
    '; + echo '
    '; + echo '
    '; echo '
    '; - echo '
    '; - - //$this->branching_struktura(); + echo '
    '; $gl = new Glasovanje($this->anketa); $gl->vprasanja(); + echo '
    '; // #branching - echo '
    '; // #branching - - //$this->vprasanje_float_editing(); - echo '
    '; + echo '
    '; echo '
    '; // #placeholder - - $this->toolbox(); } // Navadna anketa ali forma else{ + + Common::Init($this->anketa); + echo '
    '; - echo '
    '; - - Common::Init($this->anketa); + echo '
    '; echo Common::checkStruktura(); $this->branching_struktura(); + echo '
    '; - echo '
    '; // #branching - - $this->vprasanje_float_editing(); + echo '
    '; echo '
    '; // #placeholder @@ -192,11 +172,11 @@ class Branching { } // forma in glasovanje - hitre nastavitve na desni - ce imamo odprto knjiznico ne prikazemo zaradi prekrivanja - if ( ($this->survey_type == 1 || $this->survey_type == 0) && ($row['toolbox'] < 3) ) { + if ( $this->survey_type == 1 || $this->survey_type == 0 ) { echo '
    survey_type==0 ? ' class="glas_quick_settings"':'').'>'; - echo '
    survey_type==0 ? ' class="glas_quick_settings"':'').'>'; + echo '
    survey_type==0 ? ' class="glas_quick_settings"':'').'>'; $this->toolbox_settings(); - echo '
    '; + echo '
    '; echo '
    '; } @@ -208,32 +188,8 @@ class Branching { } ?>'; - echo 'alert(document.getElementsByTagName("*").length);'; - echo '';*/ - - } - - - function vprasanje_float_editing () { - - echo '
    '; - } - /** - * prikaze zgornji toolbox z nastavitvami - * - */ - /*function toolbox_nastavitve () { - - $row = SurveyInfo::getInstance()->getSurveyRow(); - - echo '
    =3?' class="library"':'').'>'; - $this->display_toolbox_nastavitve(); - echo '
    '; - }*/ /** * prikaze zgornji toolbox z nastavitvami @@ -259,49 +215,6 @@ class Branching { $full_view = (int)$row_query_fv['full_view'] == 1 ? true : false; $full_view = true; - echo '
    '; - # skrčen / razširjen - if ($this->expanded) { - echo ''.$lang['srv_expanded_0_short'].' '; - $sqle = sisplet_query("SELECT count(*) AS c FROM srv_branching WHERE ank_id='$this->anketa'"); - $rowe = mysqli_fetch_array($sqle); - if ($rowe['c'] > 15 && !isset($_COOKIE['expanded'])) - echo ''.$lang['srv_expaned_text'].' '.$lang['srv_zapri'].''; - } else { - echo ''.$lang['srv_expanded_0_short'].' '; - } - echo Help::display('srv_branching_expanded'); - - echo '
    '; - - - echo '
    '; - - # find & replace - if ($row['locked'] == 0) { - echo ''; - } - - if ($row['locked'] == 0 && $full_view == true) { - echo ' '."\n"; - } - - # Hrošč je viden samo če imamo ife in razširjen pogled - if ($row['locked'] == 0 && $full_view == true) { // if ($row['flat'] == 0) - echo ' '."\n"; - } - - if ($row['locked'] == 0 && $full_view == true) { - echo '' . Help :: display('srv_grupe_recount_branching') ."\n"; - } - - if ($has_if == true && $full_view == true || ($has_if == true && $this->expanded == false)) { - echo ''."\n"; - echo ''."\n"; - } - - echo '
    '; - // prikaz blokov kot zavihke echo '
    '; $sql = sisplet_query("SELECT i.* FROM srv_if i, srv_branching b WHERE i.tab='1' AND i.tip='1' AND i.id=b.element_if AND b.ank_id='$this->anketa' ORDER BY b.parent, b.vrstni_red"); @@ -336,20 +249,20 @@ class Branching { * */ function toolbox () { - + $row = SurveyInfo::getInstance()->getSurveyRow(); - if($this->survey_type != 0) - $this->toolbox_basic2(); + echo '
    '; + + $this->toolbox_basic2(); + + echo ''; - if ($row['toolbox'] >= 3) - $this->toolbox_library(); + // Predpregled tipa vprašanj + $this->getTipPreviewHtml(); + + echo '
    '; - ?>anketa); @@ -367,96 +280,134 @@ class Branching { $this->survey_type = SurveyInfo::getInstance()->getSurveyColumn("survey_type"); $hierarhija = SurveyInfo::getInstance()->checkSurveyModule('hierarhija'); - // Toolbox napredne nastavitve (prestevilci, dodaj prelome, debug...) - if($this->survey_type > 1 && !SurveyInfo::getInstance()->checkSurveyModule('hierarhija') ){ - - echo '
    '; - - echo ''; - - $this->toolbox_add_advanced_settings(); - - echo '
    '; - } - - echo '
    survey_type==1?' class="forma"':'').($hierarhija ? ' class="toolbox-hierarhija"' : '').'>'; + echo '
    '; if ($row['locked'] == 1) { - // Ce ima uporabnik prepreceno moznost odklepanja ankete $d = new Dostop(); - if(($hierarhija && SurveyInfo::getSurveyModules('hierarhija') == 2) || $d->checkDostopSub('lock') && ($admin_type != 0 && $admin_type != 1)){ + + // Ce ima uporabnik prepreceno moznost odklepanja ankete + $prevent_unlock = 0; + if(SurveyInfo::getSurveyModules('hierarhija') == 2 || (!$d->checkDostopSub('lock') && $row['locked'] == 1 && $admin_type != 0 && $admin_type != 1)) + $prevent_unlock = 1; + + if($prevent_unlock == 1){ echo '
    '; - echo ''; + echo ' '; echo '
    '; } else{ - //echo '

    '; echo '
    '; - echo ''; + echo ' '; echo '
    '; } if(!$hierarhija) { - echo '

    '; - echo '

    '; + echo '
    '.$lang['srv_vprasanje_radio'].'
    '; + echo '
    '; + + echo '
    '.$lang['srv_vprasanje_checkbox'].'
    '; + echo '
    '; } - echo '

    '; - echo '

    '; + echo '
    '.$lang['srv_vprasanje_multigrid'].'
    '; + echo '
    '; - if(!$hierarhija) - echo '

    '; + echo '
    '.$lang['srv_vprasanje_text'].'
    '; + echo '
    '; - echo '

    '; + if(!$hierarhija){ + echo '
    '.$lang['srv_vprasanje_number'].'
    '; + echo '
    '; + } + + echo '
    '.$lang['srv_vprasanje_label'].'
    '; + echo '
    '; if(!$hierarhija) { - echo '
    '; + echo '
    '.$lang['srv_mobile_add_question'].''; $this->toolbox_add_advanced(); echo '
    '; + + echo '
    '; } + // Knjiznica + echo '
    '.$lang['srv_library'].'
    '; + echo '
    '; + // normalna anketa if ($this->survey_type != 1){ // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik $userAccess = UserAccess::getInstance($global_user_id); - echo '

    '; - echo '

    '; - } + echo '
    '.$lang['srv_condition'].'
    '; + echo '
    '; + + echo '
    '.$lang['srv_block_random_blocks'].'
    '; + } + + // Pobrisana vprasanja + $vd = new VprasanjeDeleted($this->anketa); + $deleted_vrasanja_count = $vd->countDeletedVprasanja(); + echo '
    '; + echo '
    '.$lang['srv_deleted_vprasanja'].' ('.$deleted_vrasanja_count.')
    '; } else { if(!$hierarhija) { - echo '

    '; - echo '

    '; + echo '
    '.$lang['srv_vprasanje_radio'].'
    '; + echo '
    '; + + echo '
    '.$lang['srv_vprasanje_checkbox'].'
    '; + echo '
    '; } - echo '

    '; - echo '

    '; + echo '
    '.$lang['srv_vprasanje_multigrid'].'
    '; + echo '
    '; + + echo '
    '.$lang['srv_vprasanje_text'].'
    '; + echo '
    '; - if(!$hierarhija) - echo '

    '; + if(!$hierarhija){ + echo '
    '.$lang['srv_vprasanje_number'].'
    '; + echo '
    '; + } - echo '

    '; + echo '
    '.$lang['srv_vprasanje_label'].'
    '; + echo '
    '; if(!$hierarhija) { - echo '
    '; + echo '
    '.$lang['srv_mobile_add_question'].''; $this->toolbox_add_advanced(); echo '
    '; + + echo '
    '; } + // Knjiznica + echo '
    '.$lang['srv_library'].'
    '; + echo '
    '; + // normalna anketa if ($this->survey_type != 1){ // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik $userAccess = UserAccess::getInstance($global_user_id); - echo '

    '; - echo '

    '; + echo '
    '.$lang['srv_condition'].'
    '; + echo '
    '; + + echo '
    '.$lang['srv_block_random_blocks'].'
    '; } + + // Pobrisana vprasanja + $vd = new VprasanjeDeleted($this->anketa); + $deleted_vrasanja_count = $vd->countDeletedVprasanja(); + echo '
    '; + echo '
    '.$lang['srv_deleted_vprasanja'].' ('.$deleted_vrasanja_count.')
    '; } echo '
    '; @@ -466,324 +417,1058 @@ class Branching { * prikaze popup z vsemi tipi vprasanj * */ - function toolbox_add_advanced() { + function toolbox_add_advanced($popup=false) { global $lang; global $site_url; global $admin_type; global $global_user_id; - $spr = $_POST['spr']; - $if = $_POST['if']; - $endif = $_POST['endif']; - + // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik $userAccess = UserAccess::getInstance($global_user_id); - echo '
    '; - echo '

    '.$lang['srv_add_question_type'].' '.Help::display('srv_toolbox_add_advanced').'

    '; - echo '

    '.$lang['srv_new_question_text'].'

    '; + echo '
    '; - echo ''; - echo ''; - echo ''; + // Naslov v oknu + echo '
    '; + echo $lang['srv_add_question_type'].' '.Help::display('srv_toolbox_add_advanced'); + echo ''.$lang['srv_new_question_text'].''; + echo '
    '; - echo '
    '; - echo '

    '.$lang['srv_sklop_osnovna2'].'

    '; - echo '
    '; + // Vsebina okna + echo '
    '; - echo '

    '.$lang['srv_vprasanje_tip_1'].'

    '; - echo '

    '.$lang['srv_vprasanje_tip_1'].' - '.$lang['srv_dropdown'].'

    '; - echo '

    '.$lang['srv_vprasanje_tip_2'].'

    '; - echo '
    '; - echo '

    '.$lang['srv_vprasanje_tables'].'

    '; - echo '
    '; + // Segment kategorije + echo '
    '; + echo '

    '.$lang['srv_sklop_osnovna2'].'

    '; - echo '

    '.$lang['srv_classic'].'

    '; - echo '

    '.$lang['srv_diferencial2'].'

    '; - echo '

    '.$lang['srv_table_dropdown'].'

    '; - echo '

    '.$lang['srv_double_grid'].'

    '; + echo '

    '.$lang['srv_vprasanje_tip_1'].'

    '; + echo '

    '.$lang['srv_vprasanje_tip_1'].' - '.$lang['srv_dropdown'].'

    '; + echo '

    '.$lang['srv_vprasanje_tip_2'].'

    '; - echo '
    '; - echo '

    '.$lang['srv_sklop_posebna'].'

    '; - echo '
    '; + echo '
    '; - echo '

    '.$lang['srv_vprasanje_tip_5'].'

    '; - echo '

    '.$lang['srv_vprasanje_tip_26'].'

    '; - - echo '

    '.$lang['srv_vprasanje_heatmap'].'

    '; - - echo '

    '.$lang['srv_vprasanje_tip_8'].'

    '; - echo '

    '.$lang['srv_vprasanje_tip_17'].'

    '; - echo '

    '.$lang['srv_vprasanje_tip_18'].'

    '; + // Segment vnos + echo '
    '; + echo '

    '.$lang['srv_sklop_osnovna_vnos2'].'

    '; - echo '
    '; - echo '
    '; + echo '

    '.$lang['srv_vprasanje_tip_7'].'

    '; + echo '

    '.$lang['srv_vprasanje_tip_21'].'

    '; + echo '

    '.$lang['srv_number_insert_1'].'

    '; - echo '

    '.$lang['srv_sklop_osnovna_vnos2'].'

    '; - echo '
    '; + echo '
    '; - echo '

    '.$lang['srv_vprasanje_tip_7'].'

    '; - echo '

    '.$lang['srv_vprasanje_tip_21'].'

    '; - echo '

    '.$lang['srv_number_insert_1'].'

    '; - echo '
    '; - echo '

    '.$lang['srv_sklop_tabele_ostale'].'

    '; - echo '
    '; + // Segment tabele + echo '
    '; + echo '

    '.$lang['srv_vprasanje_tables'].'

    '; - echo '

    '.$lang['srv_vprasanje_tip_16'].'

    '; - echo '

    '.$lang['srv_vprasanje_tip_20'].'

    '; - echo '

    '.$lang['srv_vprasanje_tip_19'].'

    '; - echo '

    '.$lang['srv_survey_table_multiple'].'

    '; + echo '

    '.$lang['srv_classic'].'

    '; + echo '

    '.$lang['srv_diferencial2'].'

    '; + echo '

    '.$lang['srv_table_dropdown'].'

    '; + echo '

    '.$lang['srv_double_grid'].'

    '; - echo '
    '; - echo '

    '.$lang['srv_standardni_vnosi'].'

    '; - echo '
    '; + echo '
    '; - echo '

    '.$lang['email'].'

    '; - echo '

    '.$lang['url'].'

    '; - echo '

    '.$lang['srv_tip_standard_993'].'

    '; - echo '

    '.$lang['srv_vprasanje_tip_long_21_7'].'

    '; - echo '

    '.$lang['srv_captcha_edit'].'

    '; - echo '

    '.$lang['srv_gdpr'].'

    '; - echo '
    '; + // Segment ostale tabele + echo '
    '; + echo '

    '.$lang['srv_sklop_tabele_ostale'].'

    '; + + echo '

    '.$lang['srv_vprasanje_tip_16'].'

    '; + echo '

    '.$lang['srv_vprasanje_tip_20'].'

    '; + echo '

    '.$lang['srv_vprasanje_tip_19'].'

    '; + + if(!$userAccess->checkUserAccess($what='question_type_multitable')){ + echo '
    '; + } + echo '

    '.$lang['srv_survey_table_multiple'].'

    '; + if(!$userAccess->checkUserAccess($what='question_type_multitable')){ + echo '
    '; + } - echo '
    '; + echo '
    '; - if (($lang['id'] == '1' || $lang['id'] == '2') && ($site_url == 'https://www.1ka.si/' || strpos($site_url, 'localhost') !== false ) ) { - echo '

    '.$lang['srv_demografija'].'

    '; - echo '
    '; + // Segment posebna vprasanja + echo '
    '; + echo '

    '.$lang['srv_sklop_posebna'].'

    '; - if ($lang['id'] == '1') { - echo '

    '.$lang['srv_demografija_spol'].'

    '; - echo '

    '.$lang['srv_demografija_starost'].'

    '; - echo '

    '.$lang['srv_demografija_zakonski_stan'].'

    '; - echo '

    '.$lang['srv_demografija_status'].'

    '; - echo '

    '.$lang['srv_demografija_izobrazba'].'

    '; - echo '

    '.$lang['srv_demografija_lokacija'].'

    '; - } + echo '

    '.$lang['srv_vprasanje_tip_5'].'

    '; + if(!$userAccess->checkUserAccess($what='question_type_location')){ + echo '
    '; + } + echo '

    '.$lang['srv_vprasanje_tip_26'].'

    '; + echo '

    '.$lang['srv_vprasanje_heatmap'].'

    '; + if(!$userAccess->checkUserAccess($what='question_type_multitable')){ + echo '
    '; + } + echo '

    '.$lang['srv_vprasanje_tip_8'].'

    '; - if ($lang['id'] == '2') { - echo '

    '.$lang['srv_demografija_spol'].'

    '; - echo '

    '.$lang['srv_demografija_starost'].'

    '; - echo '

    '.$lang['srv_demografija_zakonski_stan'].'

    '; - echo '

    '.$lang['srv_demografija_status'].'

    '; - echo '

    '.$lang['srv_demografija_izobrazba'].'

    '; - echo '

    '.$lang['srv_demografija_lokacija'].'

    '; - } + if(!$userAccess->checkUserAccess($what='question_type_ranking')){ + echo '
    '; + } + echo '

    '.$lang['srv_vprasanje_tip_17'].'

    '; + echo '

    '.$lang['srv_vprasanje_tip_18'].'

    '; + if(!$userAccess->checkUserAccess($what='question_type_multitable')){ + echo '
    '; } - echo '

    '; - echo '

    '; + echo '
    '; - echo '
    '; - echo '

    '.$lang['srv_advanced_features'].'

    '; - echo '
    '; + + echo '
    '; + echo '

    '.$lang['srv_standardni_vnosi'].'

    '; + + echo '

    '.$lang['email'].'

    '; + echo '

    '.$lang['url'].'

    '; + echo '

    '.$lang['srv_tip_standard_993'].'

    '; + echo '

    '.$lang['srv_vprasanje_tip_long_21_7'].'

    '; + echo '

    '.$lang['srv_captcha_edit'].'

    '; + echo '

    '.$lang['srv_gdpr'].'

    '; + + echo '
    '; + + + echo '
    '; + echo '

    '.$lang['srv_advanced_features'].'

    '; + + if(!$userAccess->checkUserAccess($what='question_type_calculation')){ + echo '
    '; + } // Kalkulacija - echo '

    '.$lang['srv_vprasanje_tip_22'].'

    '; + echo '

    '.$lang['srv_vprasanje_tip_22'].'

    '; // Kvota - echo '

    '.$lang['srv_vprasanje_tip_25'].'

    '; + echo '

    '.$lang['srv_vprasanje_tip_25'].'

    '; // Loop - echo '

    '.$lang['srv_zanka'].'

    '; + echo '

    '.$lang['srv_zanka'].'

    '; // Signature - echo '

    '.$lang['srv_signature_edit'].'

    '; + echo '

    '.$lang['srv_signature_edit'].'

    '; + + // Chat (nagovor z gumbom za vklop chata) - ce je vklopljen modul chat if (SurveyInfo::getInstance()->checkSurveyModule('chat')){ - echo '

    '.$lang['srv_vprasanje_tip_5_2'].'

    '; + echo '

    '.$lang['srv_vprasanje_tip_5_2'].'

    '; } // Socialna omrezja if (SurveyInfo::getInstance()->checkSurveyModule('social_network')){ - echo '

    '.$lang['srv_vprasanje_tip_9'].'

    '; + echo '

    '.$lang['srv_vprasanje_tip_9'].'

    '; } elseif(!$userAccess->checkUserAccess($what='question_type_signature')){ - echo '

    '.$lang['srv_vprasanje_tip_9'].'

    '; + echo '

    '.$lang['srv_vprasanje_tip_9'].'

    '; } else{ - echo '

    checkUserAccess($what='question_type_signature') ? 'class="user_access_locked"' : '').'"> '.$lang['srv_vprasanje_tip_9'].'

    '; + echo '

    checkUserAccess($what='question_type_signature') ? 'class="user_access_locked"' : '').'">'.$lang['srv_vprasanje_tip_9'].'

    '; } - echo '
    '; + if(!$userAccess->checkUserAccess($what='question_type_calculation')){ + echo '
    '; + } - //echo ''.$lang['srv_zapri'].''; + echo '
    '; echo '
    '; - } - /** - * prikaze popup z vsemi tipi vprasanj - * - */ - function toolbox_add_advanced_settings() { - global $lang; - global $admin_type; - global $site_url; - global $global_user_id; - echo '
    '; + if($popup){ + echo '
    '; + echo ' '; + echo '
    '; - echo ''.$lang['srv_advanced_settings_title'].''; + // Klik izven okna - zapremo okno + echo ''; + } - # preverimo ali imamo ife. Če so, izpisujemo vse ikonce - $sql_select = "SELECT count(*) AS if_count FROM srv_branching WHERE element_if > 0 AND ank_id = '".$this->anketa."'"; - $sql_query = sisplet_query($sql_select); - $row_query = mysqli_fetch_array($sql_query); - $has_if = (int)$row_query['if_count'] > 0 ? true : false; - # ali prikazujemo vse ikonice ali samo "simpl" ikonice - $sql_select_fv = "SELECT count(*) AS full_view FROM srv_user_setting_for_survey WHERE sid='".$this->anketa."' AND uid='".$global_user_id."' AND what='display_full_toolbox' AND value='1'"; - $sql_query_fv = sisplet_query($sql_select_fv); - $row_query_fv = mysqli_fetch_array($sql_query_fv); - $full_view = (int)$row_query_fv['full_view'] == 1 ? true : false; - $full_view = true; + echo '
    '; + } - // Razsiri / skrci - if($this->survey_type > 1){ - if($this->expanded) { - echo '

    '; - echo ''; - echo ''; - echo $lang['srv_expand_0']; - echo ''; - echo '

    '; - } - else { - echo '

    '; - echo ''; - echo ''; - echo $lang['srv_expand_1']; - echo ''; - echo '

    '; - } - } + /** + * preview + * + */ + private function getTipPreviewHtml(){ + global $lang; + global $global_user_id; - if ($has_if == true/* && $full_view == true || ($has_if == true && $this->expanded == false)*/) { - echo '

    '; - echo ''.$lang['srv_expand'].''."\n"; - echo ''.$lang['srv_collapse'].''."\n"; - echo '

    '; - } - # find & replace - if ($row['locked'] == 0) { - echo '

    '; - echo ''.$lang['srv_find_replace_words'].''; - echo '

    '; - } + // Predpregled tipa vprašanj - prikazujemo samo kadar smo v urejanju ankete + if (!$this->anketa > 0) + return; - if ($row['locked'] == 0 && $full_view == true) { - echo '

    '; - echo ''.$lang['srv_pagebreak_all'].' '."\n"; - echo '

    '; - } + if ( ($_GET['a'] != '' || !isset($_GET['anketa'])) && $_GET['a'] != 'branching' ) + return; - # Hrošč je viden samo če imamo ife in razširjen pogled - if ($row['locked'] == 0 && $full_view == true) { // if ($row['flat'] == 0) - echo '

    '; - echo ''.$lang['srv_check_pogoji'].' '."\n"; - echo '

    '; - } - if ($row['locked'] == 0 && $full_view == true) { - echo '

    '; - echo ''.$lang['srv_grupe_recount_branching'].'' . Help :: display('srv_grupe_recount_branching') ."\n"; - echo '

    '; - } + echo '
    '; - // Knjiznica na desni - if ($row['locked'] == 0) { - if($row['toolbox'] >= 3){ - echo '

    '; - echo ''.$lang['srv_library_hide'].''; - echo '

    '; - } - else{ - echo '

    '; - echo ''.$lang['srv_library_show'].''; - echo '

    '; - } - } - - echo '
    '; - // prikaz blokov kot zavihke - /*echo '
    '; - $sql = sisplet_query("SELECT i.* FROM srv_if i, srv_branching b WHERE i.tab='1' AND i.tip='1' AND i.id=b.element_if AND b.ank_id='$this->anketa' ORDER BY b.parent, b.vrstni_red"); - if (!$sql) echo mysqli_error($GLOBALS['connect_db']); - $i = 0; - while ($row = mysqli_fetch_array($sql)) { - if ($i++ != 0) echo ' | '; - $label = ($row['label'] == ''?$lang['srv_blok'].' ('.$row['number'].')':$row['label']); - echo '

    '; - echo ''.$label.' '; - echo '

    '; - } - echo '
    ';*/ - } + // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik + $userAccess = UserAccess::getInstance($global_user_id); - /** - * prikaz knjiznice v toolboxu na levi strani - * - */ - function toolbox_library () { - global $lang; + // tip 9999 - IF + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo $lang['srv_toolbox_if']; + echo '
    '; + if(!$userAccess->checkUserAccess($what='if')){ + $userAccess->displayNoAccessText($what='if'); + } + echo '
    '; - $row = SurveyInfo::getInstance()->getSurveyRow(); + // tip 9998 - Block + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo $lang['srv_toolbox_block']; + echo '
    '; + if(!$userAccess->checkUserAccess($what='block')){ + $userAccess->displayNoAccessText($what='block'); + } + echo '
    '; - //glede na to kje smo se nahajali se vrnemo (na osnovne oz napredne moznosti) - //$row['toolbox'] == 3 ? $preklop = 1 : $preklop = 2; + // tip 9997 - Loop + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo $lang['srv_toolbox_loop']; + echo '
    '; + if(!$userAccess->checkUserAccess($what='loop')){ + $userAccess->displayNoAccessText($what='loop'); + } + echo '
    '; - echo '
    '; - //echo '

    '.$lang['srv_nazajnavprasanja'].'

    '; + // tip 1_1 - radio + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t1'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t1_o1'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t1_o2'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t1_o3'] . '
    '; + echo '
    '; + echo '
    '; + + // tip 1_10 - gdpr + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_gdpr_intro_title'] . '

    '; + echo '
    ' . $lang['srv_gdpr_intro'] . '.
    '.$lang['srv_gdpr_intro4'].'
    '; + echo '
    ' . $lang['srv_gdpr_intro_no'] . '
    '; + echo '
    ' . $lang['srv_gdpr_intro_yes'] . '
    '; + echo '
    '; + echo '
    '; + // tip 1 - radio (horizontalno) + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t1'] . ' ' . $lang['srv_tip_sample_t1_o1'] . ' ' . $lang['srv_tip_sample_t1_o2'] . '
    '; + echo '
    '; + echo '
    '; - //zgornja navigacija toolboxa - /*echo ''; - echo ''; - //echo ''; - echo ''; - echo '
    '.$lang['srv_novaspremenljivka'].''.$lang['srv_advanced'].''.$lang['srv_library'].'
    ';*/ + // tip 1_2 - radio (horizontalno - nova vrstica) + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t1'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t1_o1'] . ' ' . $lang['srv_tip_sample_t1_o2'] . ' ' . $lang['srv_tip_sample_t1_o3'] . '
    '; + echo '
    '; + echo '
    '; - if ($row['locked'] == 1) { + // tip 1_5 - radio potrditev + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t1_5'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; - //echo '

    '.$lang['srv_anketa_locked_1'].'

    '; - echo '

    '; - echo ' '.$lang['srv_anketa_locked_1']; - echo '

    '; + // tip 1_6 - select box + echo '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t3'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; - } else { + // tip 1_8 - Drag-drop + echo '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t1'] . '
    '; - echo '
    '; - $l = new Library(); - $l->display(); - echo '
    '; - } + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t1_o1'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t1_o2'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t1_o3'] . '
    '; + echo '
    '; - echo '
    '; - } + echo '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + echo '
    '; + echo '
    '; + + // tip 1_9 - custom radio picture + echo '
    '; + echo '
    '; + + echo '
    ' . $lang['srv_tip_sample_t1'] . '
    '; + // star + echo '
    '; + for ($i = 1; $i < 4; $i++) { + echo '
    '; + } + echo '
    '; + + // thumb + echo '
    '; + for ($i = 1; $i < 4; $i++) { + echo '
    '; + } + echo '
    '; + + //smiley + echo '
    '; + for ($i = 1; $i < 4; $i++) { + echo '
    '; + } + echo '
    '; + + // heart + echo '
    '; + for ($i = 1; $i < 4; $i++) { + echo '
    '; + } + echo '
    '; + + // flag + echo '
    '; + for ($i = 1; $i < 4; $i++) { + echo '
    '; + } + echo '
    '; + + // user + echo '
    '; + for ($i = 1; $i < 4; $i++) { + echo '
    '; + } + echo '
    '; + + echo '
    '; + echo '
    '; + + // tip 1_10 - Image HotSpot + echo '
    '; + echo '
    '; + echo '
    ' . $lang['srv_hotspot_preview_text_radio'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 1_11 - Vizualna anlaogna skala + echo '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t1'] . '
    '; + + echo '
    '; + for ($i = 1; $i < 7; $i++) { + echo '
    + +
    '; + } + echo '
    '; + + echo '
    '; + echo '
    '; + + + // tip 2 - checkbox + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t2'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t2_o1'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t2_o2'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t2_o3'] . '
    '; + echo '
    '; + echo '
    '; + + // tip 2_1 - check(horizontalno) + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t2'] . ' ' . $lang['srv_tip_sample_t2_o2'] . ' ' . $lang['srv_tip_sample_t2_o3'] . '
    '; + echo '
    '; + echo '
    '; + + // tip 2_2 - check (horizontalno - nova vrstica) + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t2'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t2_o1'] . ' ' . $lang['srv_tip_sample_t2_o2'] . ' ' . $lang['srv_tip_sample_t2_o3'] . '
    '; + echo '
    '; + echo '
    '; + + // tip 2_8 - Drag-drop + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t1'] . '
    '; + + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t1_o1'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t1_o2'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t1_o3'] . '
    '; + echo '
    '; + + echo '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + echo '
    '; + echo '
    '; + + // tip 2_10 - Image HotSpot + echo '
    '; + // echo '
    Primer tipa vprašanj: label.
    '; + //echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_hotspot_preview_text_checkbox'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 3 - select + echo '
    '; + // echo '
    Primer tipa vprašanj: select.
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t3'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 21 - besedilo* + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t21'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 21_1 - cpatcha + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t21_1_o1'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 21_2 - email + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    '.$lang['srv_tip_sample_t21_2_o1'].' ('.$lang['srv_email_example'].')
    '; + echo '
    '; + echo '
    ' . $lang['srv_email_example_txt'] . '
    '; + echo '
    '; + echo '
    '; + + // tip 21_3 - url + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t21_3_o1'] . '
    '; + echo '
    (' . $lang['srv_url_example'] . ')
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 21_4 - upload + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t21_4_o1'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 21_5 - textbox box + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t21'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 21_6 - elektronski podpis + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t21_6'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '.$lang['srv_signature_clear'].'
    '; + echo '
    '; + echo ' '.$lang['srv_signature_name'].''; + echo ' '; + echo '
    '; + if(!$userAccess->checkUserAccess($what='question_type_signature')){ + $userAccess->displayNoAccessText($what='question_type_signature'); + } + echo '
    '; + + // tip 21_7 - fotografija + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t21_7'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 5 - label + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t5'] . '
    '; + echo '
    '; + echo '
    '; + + // tip 5_2 - nagovor za aktivacijo chata + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_chat_question_text'] . '
    '; + echo '
    '.$lang['srv_chat_turn_on'].'
    '; + echo '
    '; + echo '
    '; + + // tip 26 - lokacija + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t26_1'] . '
    '; + echo '
    '; + echo '
    '; + if(!$userAccess->checkUserAccess($what='question_type_location')){ + $userAccess->displayNoAccessText($what='question_type_location'); + } + echo '
    '; + + // tip 26_2 - multi lokacija + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t26_2'] . '
    '; + echo '
    '; + echo '
    '; + if(!$userAccess->checkUserAccess($what='question_type_location')){ + $userAccess->displayNoAccessText($what='question_type_location'); + } + echo '
    '; + + // tip 26_1 - moja lokacija + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t26_1'] . '
    '; + echo '
    '; + echo '
    '; + if(!$userAccess->checkUserAccess($what='question_type_location')){ + $userAccess->displayNoAccessText($what='question_type_location'); + } + echo '
    '; + + // tip 6 - multigrid + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + + echo '
    ' . $lang['srv_tip_sample_t6'] . '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t6_o1'] . '' . $lang['srv_tip_sample_t6_o2'] . ' ' . $lang['srv_tip_sample_t6_o3'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_v1'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_v2'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_v3'] . '
    '; + echo '
    '; + + echo '
    '; + echo '
    '; + + // tip 6_1 - multigrid (semanticni diferencial) + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + + echo '
    ' . $lang['srv_tip_sample_t61'] . ':
    '; + echo '
     
    123
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t61_v1x'] . '
    ' . $lang['srv_tip_sample_t61_v1y'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t61_v2x'] . '
    ' . $lang['srv_tip_sample_t61_v2y'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t61_v3x'] . '
    ' . $lang['srv_tip_sample_t61_v3y'] . '
    '; + echo '
    '; + + echo '
    '; + echo '
    '; + + // tip 6_2 - multigrid (dropdown) + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + + echo '
    ' . $lang['srv_tip_sample_t6'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_v1'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_v2'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_v3'] . '
    '; + echo '
    '; + + echo '
    '; + echo '
    '; + + // tip 6_3 - multigrid (double grid) + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + + echo '
    ' . $lang['srv_tip_sample_t6'] . '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t6_v1'] . '' . $lang['srv_tip_sample_t6_v3'] . '
    '; + echo '
    '; + + echo '
     
    ' . $lang['srv_tip_sample_t6_o1'] . '' . $lang['srv_tip_sample_t6_o2'] . '' . $lang['srv_tip_sample_t6_o3'] . ' ' . $lang['srv_tip_sample_t6_o1'] . '' . $lang['srv_tip_sample_t6_o2'] . '' . $lang['srv_tip_sample_t6_o3'] . '
    '; + echo '
    '; + echo '
    www.xxx.si
    '; + echo '
    '; + echo '
    www.yyy.si
    '; + echo '
    '; + echo '
    www.zzz.si
    '; + echo '
    '; + + echo '
    '; + echo '
    '; + + + // tip 6_4 - multigrid (one against another) + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + + echo '
    ' . $lang['srv_tip_sample_t6_4'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_4_v1'] . '
    ' . $lang['srv_tip_sample_t6_4_vmes'] . '' . $lang['srv_tip_sample_t6_4_v2'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_4_v1'] . '
    ' . $lang['srv_tip_sample_t6_4_vmes'] . '' . $lang['srv_tip_sample_t6_4_v3'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_4_v3'] . '
    ' . $lang['srv_tip_sample_t6_4_vmes'] . '' . $lang['srv_tip_sample_t6_4_v2'] . '
    '; + echo '
    '; + + echo '
    '; + echo '
    '; + + // tip 6_5 - multigrid (max diff) + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + + echo '
    ' . $lang['srv_tip_sample_t6_5'] . '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t6_5_c1'] . '
     
    ' . $lang['srv_tip_sample_t6_5_c2'] . '
    '; + echo '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t6_5_v1'] . '
    '; + echo '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t6_5_v2'] . '
    '; + echo '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t6_5_v3'] . '
    '; + echo '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t6_5_v4'] . '
    '; + echo '
    '; + + echo '
    '; + echo '
    '; + + // tip 6_6 - multigrid (select box) + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + + echo '
    ' . $lang['srv_tip_sample_t6_6'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_6_v1'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_6_v2'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_6_v3'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_6_v4'] . '
    '; + echo '
    '; + + echo '
    '; + echo '
    '; + + // tip 6_8 - multigrid (Tabela Da/Ne) + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + + echo '
    ' . $lang['srv_tip_sample_t6'] . '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t6_8_o1'] . '' . $lang['srv_tip_sample_t6_8_o2'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_v1'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_v2'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_v3'] . '
    '; + echo '
    '; + + echo '
    '; + echo '
    '; + + // tip 6_9 - Drag-drop + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + + echo '
    '; + + echo '
    ' . $lang['srv_tip_sample_t6'] . '
    '; + + echo '
    '; + echo '


    '; + echo '
    ' . $lang['srv_tip_sample_t6_v1'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_v2'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t6_v3'] . '
    '; + echo '
    '; + + echo '
    '; + echo '
    '; + echo '
      '; + + echo '
    • +
      ' . $lang['srv_tip_sample_t6_o1'] . '
      +
    • '; //izpis "naslova" okvirja + echo '
    • +
      +
    • ' . "\n"; //izpis okvirja + echo '
    • +
      ' . $lang['srv_tip_sample_t6_o2'] . '
      +
    • '; //izpis "naslova" okvirja + echo '
    • +
      +
    • ' . "\n"; //izpis okvirja + echo '
    • +
      ' . $lang['srv_tip_sample_t6_o3'] . '
      +
    • '; //izpis "naslova" okvirja + echo '
    • +
      +
    • ' . "\n"; //izpis okvirja + echo '
    '; + echo '
    '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo '
    '; + + // tip 6_10 - Image HotSpot + echo '
    '; + echo '
    '; + echo '
    ' . $lang['srv_hotspot_preview_text_radio_grid'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 16 - multicheckbox + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t16'] . '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t16_o1'] . '' . $lang['srv_tip_sample_t16_o2'] . ' ' . $lang['srv_tip_sample_t16_o3'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t16_v1'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t16_v2'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t16_v3'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 19 - multitext + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t19'] . '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t19_o1'] . '' . $lang['srv_tip_sample_t19_o2'] . '' . $lang['srv_tip_sample_t19_o3'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t19_v1'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t19_v2'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 20 - multinumber + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t20'] . '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t20_o1'] . '' . $lang['srv_tip_sample_t20_o2'] . '' . $lang['srv_tip_sample_t20_o3'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t20_v1'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t20_v2'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t20_v3'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 7 - number + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t7'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t7_o1'] . '
    '; + echo '
    '; + echo '
    '; + + // tip 7_2 - slider + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t7_2'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 8 - datum + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t8'] . '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 17 - Razvrščanje prestavljanje (default) + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t17'] . '
    '; + + echo '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t17_o1'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t17_o2'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t17_o3'] . '
    '; + echo '
    '; + + echo '
    '; + echo '
    1.
    '; + echo '
    2.
    '; + echo '
    3.
    '; + echo '
    '; + echo '
    '; + + echo '
    '; + if(!$userAccess->checkUserAccess($what='question_type_ranking')){ + $userAccess->displayNoAccessText($what='question_type_ranking'); + } + echo '
    '; + + // tip 171 - Razvrščanje ostevilcevanje (design = 1) + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t171'] . '
    '; + + echo '
    ' . $lang['srv_tip_sample_t171_o1'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t171_o2'] . '
    '; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t171_o3'] . '
    '; + echo '
    '; + + echo '
    '; + if(!$userAccess->checkUserAccess($what='question_type_ranking')){ + $userAccess->displayNoAccessText($what='question_type_ranking'); + } + echo '
    '; + + // tip 172 - Razvrščanje premikanje (design = 2) + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t172'] . '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t172_o1'] . '
     
    '; + echo '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t172_o2'] . '
     
    '; + echo '
    '; + echo '
     
    ' . $lang['srv_tip_sample_t172_o3'] . '
     
    '; + echo '
    '; + echo '
    '; + if(!$userAccess->checkUserAccess($what='question_type_ranking')){ + $userAccess->displayNoAccessText($what='question_type_ranking'); + } + echo '
    '; + + // tip 18 - vsota + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t18'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t18_o1'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t18_o2'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t18_o3'] . '
    '; + echo '
    ' . $lang['srv_tip_sample_t18_o4'] . '
    '; + echo '
    '; + if(!$userAccess->checkUserAccess($what='question_type_sum')){ + $userAccess->displayNoAccessText($what='question_type_sum'); + } + echo '
    '; + + // tip 24 - Kombinirana tabela + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo $lang['srv_survey_table_multiple']; + echo '
    '; + if(!$userAccess->checkUserAccess($what='question_type_multitable')){ + $userAccess->displayNoAccessText($what='question_type_multitable'); + } + echo '
    '; + + // tip 27 - Heatmap + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo $lang['srv_vprasanje_heatmap']; + echo '
    '; + if(!$userAccess->checkUserAccess($what='question_type_heatmap')){ + $userAccess->displayNoAccessText($what='question_type_heatmap'); + } + echo '
    '; + + // tip 22 - Kalkulacija + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo $lang['srv_vprasanje_tip_long_22']; + echo '
    '; + if(!$userAccess->checkUserAccess($what='question_type_calculation')){ + $userAccess->displayNoAccessText($what='question_type_calculation'); + } + echo '
    '; + + // tip 25 - Kvota + echo '
    '; + echo '' . $lang['srv_new_question_icon'] . ''; + echo '
    '; + echo $lang['srv_vprasanje_tip_long_25']; + echo '
    '; + if(!$userAccess->checkUserAccess($what='question_type_quota')){ + $userAccess->displayNoAccessText($what='question_type_quota'); + } + echo '
    '; + + // tip 9 - SN-imena + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t9'] . ':
    '; + echo '
    '; + echo '
    ' . $lang['srv_add_field'] . '
    '; + echo '
    '; + if(!$userAccess->checkUserAccess($what='social_network')){ + $userAccess->displayNoAccessText($what='social_network'); + } + echo '
    '; + + // tip 9_1 - SN-imena - fiksno st. polj + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t9'] . ':
    '; + echo '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 9_2 - SN-imena - 1 textbox + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t9'] . ':
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + // tip 9_3 - SN-imena - vnos stevila polj + echo '
    '; + echo '' . $lang['srv_new_question'] . ''; + echo '
    '; + echo '
    ' . $lang['srv_tip_sample_t9'] . ':
    '; + echo '
    ' . $lang['srv_design_count'] . ':
    '; + echo '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + echo '
    '; + + echo '
    '; // tip_preview + } /** * hitre nastavitve - na dnu pri formi * */ - function toolbox_settings ($status1='none', $status2='none') { + function toolbox_settings ($status1='none') { global $lang; global $admin_type; - $row = Cache::srv_spremenljivka($row2['spr_id']); $rowA = SurveyInfo::getInstance()->getSurveyRow(); SurveySetting::getInstance()->Init($this->anketa); @@ -791,7 +1476,7 @@ class Branching { $emailDiv = SurveySetting::getInstance()->getSurveyMiscSetting('srvtoolbox_form_email'); - //OBVESCANJE + // OBVESCANJE $sqlAlert = sisplet_query("SELECT * FROM srv_alert WHERE ank_id = '$this->anketa'"); if (!$sqlAlert) echo mysqli_error($GLOBALS['connect_db']); @@ -799,52 +1484,50 @@ class Branching { $rowAlert['finish_other'] == 1 || ($rowAlert['finish_other_emails'] && $rowAlert['finish_other'] != 0) ? $checked = true : $checked = false; - echo '

    '; - $alertDiv == 1 ? $obvescanje = 0 : $obvescanje = 1; - echo ''; + $alertDiv == 1 ? $obvescanje = 0 : $obvescanje = 1; + - $img = ($status1 == 'none') ? ' class="faicon icon-blue plus"' : ' class="faicon icon-blue minus"'; - echo ' '; + echo '

    '; - echo '' . $lang['srv_alert_link_form'] . ''; - echo '

    '; - //echo '
    '; $sas = new SurveyAdminSettings(); echo '
    '; // avtor ankete oz osebe z dostopom - echo '

    '; - echo ''; + echo '

    '; + echo ''; + echo ' '; $sas->display_alert_label('finish_author',($rowAlert['finish_author'] == 1), true); - echo '

    '; + echo ' '; + echo '
    '; // posebej navedeni maili - echo '

    '; - - echo '

    '; - echo ''; - echo ''; - echo '

    '; - - //respondent iz cms - /*echo '

    '; - echo ''; - $sas->display_alert_label('finish_respondent_cms',($rowAlert['finish_respondent_cms'] == 1), true); - echo '

    ';*/ - - //respondent - echo '

    '; - echo ''; - echo ''; + echo '

    '; + echo ' '; + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + + echo '
    '; + + // respondent + echo '
    '; + echo ' '; + echo ' '; $sas->display_alert_label('finish_respondent',($rowAlert['finish_respondent'] == 1), true); - echo '

    '; + echo ' '; + echo '
    '; - echo ''.$lang['srv_detail_settings'].''; + echo ''; - echo '
    '; + echo '
    '; } /** @@ -862,28 +1545,28 @@ class Branching { echo '
    '; if ($lang['id'] == '1') { - echo '

    check_demografija_exists('XSPOL')?'checked':'').' value="XSPOL" id="XSPOL">

    '; - echo '

    check_demografija_exists('XSTAR2a4')?'checked':'').' value="XSTAR2a4" id="XSTAR2a4">

    '; - echo '

    check_demografija_exists('XZST1surs4')?'checked':'').' value="XZST1surs4" id="XZST1surs4">

    '; + echo '

    check_demografija_exists('XSPOL')?'checked':'').' value="XSPOL" id="XSPOL">

    '; + echo '

    check_demografija_exists('XSTAR2a4')?'checked':'').' value="XSTAR2a4" id="XSTAR2a4">

    '; + echo '

    check_demografija_exists('XZST1surs4')?'checked':'').' value="XZST1surs4" id="XZST1surs4">

    '; echo '
    '; - echo '

    check_demografija_exists('XDS2a4')?'checked':'').' value="XDS2a4" id="XDS2a4">

    '; - echo '

    check_demografija_exists('XIZ1a2')?'checked':'').' value="XIZ1a2" id="XIZ1a2">

    '; - echo '

    check_demografija_exists('XLOKACREGk')?'checked':'').' value="XLOKACREGk" id="XLOKACREGk">

    '; + echo '

    check_demografija_exists('XDS2a4')?'checked':'').' value="XDS2a4" id="XDS2a4">

    '; + echo '

    check_demografija_exists('XIZ1a2')?'checked':'').' value="XIZ1a2" id="XIZ1a2">

    '; + echo '

    check_demografija_exists('XLOKACREGk')?'checked':'').' value="XLOKACREGk" id="XLOKACREGk">

    '; //echo '

    '; } if ($lang['id'] == '2') { - echo '

    check_demografija_exists('XSEX')?'checked':'').' value="XSEX" id="XSEX">

    '; - echo '

    check_demografija_exists('XAGE')?'checked':'').' value="XAGE" id="XAGE">

    '; - echo '

    check_demografija_exists('XMRSTS')?'checked':'').' value="XMRSTS" id="XMRSTS">

    '; + echo '

    check_demografija_exists('XSEX')?'checked':'').' value="XSEX" id="XSEX">

    '; + echo '

    check_demografija_exists('XAGE')?'checked':'').' value="XAGE" id="XAGE">

    '; + echo '

    check_demografija_exists('XMRSTS')?'checked':'').' value="XMRSTS" id="XMRSTS">

    '; echo '
    '; - echo '

    check_demografija_exists('XSTS')?'checked':'').' value="XSTS" id="XSTS">

    '; - echo '

    check_demografija_exists('XEDU')?'checked':'').' value="XEDU" id="XEDU">

    '; - echo '

    check_demografija_exists('XLOC')?'checked':'').' value="XLOC" id="XLOC">

    '; //echo '

    '; + echo '

    check_demografija_exists('XSTS')?'checked':'').' value="XSTS" id="XSTS">

    '; + echo '

    check_demografija_exists('XEDU')?'checked':'').' value="XEDU" id="XEDU">

    '; + echo '

    check_demografija_exists('XLOC')?'checked':'').' value="XLOC" id="XLOC">

    '; //echo '

    '; } echo '
    '; @@ -964,6 +1647,7 @@ class Branching { */ function branching_struktura () { global $lang; + global $global_user_id; // naenkrat preberemo vse spremenljivke, da ne delamo queryja vsakic posebej Cache::cache_all_srv_spremenljivka($this->anketa, true); @@ -974,36 +1658,157 @@ class Branching { // cache vseh spremenljivk //$this->find_all_spremenljivka(); - #$this->survey_type = SurveyAdmin::getSurvey_type($this->anketa); - $this->survey_type = SurveyInfo::getInstance()->getSurveyColumn("survey_type"); + #$this->survey_type = SurveyAdmin::getSurvey_type($this->anketa); + $this->survey_type = SurveyInfo::getInstance()->getSurveyColumn("survey_type"); + + //$this->toolbox_nastavitve(); + + + // prikaz blokov kot zavihke + $sqlB = sisplet_query("SELECT i.* FROM srv_if i, srv_branching b WHERE i.tab='1' AND i.tip='1' AND i.id=b.element_if AND b.ank_id='$this->anketa' ORDER BY b.parent, b.vrstni_red"); + if (!$sqlB) echo mysqli_error($GLOBALS['connect_db']); + + if(mysqli_num_rows($sqlB) > 0){ + + echo '
    '; + + // Zavihek VSI + echo '

    '; + echo ''.$lang['srv_vsi'].' '; + echo '

    '; + + // Ostali zavihki + while ($rowB = mysqli_fetch_array($sqlB)) { + echo ' | '; + $label = ($rowB['label'] == '' ? $lang['srv_blok'].' ('.$rowB['number'].')' : $rowB['label']); + echo '

    '; + echo ''.$label.' '; + echo '

    '; + } + + echo '
    '; + } + + // Napredne nastavitve v sredini zgoraj + echo '
    '; + + echo '
    '; + + $url0 = "'" . "index.php?anketa=".$this->anketa."&a=branching&change_mode=1&what=expanded&value=0" . "'"; + $url1 = "'" . "index.php?anketa=".$this->anketa."&a=branching&change_mode=1&what=expanded&value=1" . "'"; + + echo '
    '; + // Razširi + echo '
    '; + //echo ''; + echo ''; + echo ''.$lang['srv_expand'].''; + echo '
    '; + + //echo '
    '; + + //Skrči + echo '
    '; + echo ''.$lang['srv_collapse'].''; + echo '
    '; + + echo '
    ';// settings group + + // Napredne nastavitve dropdown + $row = SurveyInfo::getInstance()->getSurveyRow(); + # preverimo ali imamo ife. Če so, izpisujemo vse ikonce + $sql_select = "SELECT count(*) AS if_count FROM srv_branching WHERE element_if > 0 AND ank_id = '".$this->anketa."'"; + $sql_query = sisplet_query($sql_select); + $row_query = mysqli_fetch_array($sql_query); + $has_if = (int)$row_query['if_count'] > 0 ? true : false; + + # ali prikazujemo vse ikonice ali samo "simpl" ikonice + $sql_select_fv = "SELECT count(*) AS full_view FROM srv_user_setting_for_survey WHERE sid='".$this->anketa."' AND uid='".$global_user_id."' AND what='display_full_toolbox' AND value='1'"; + $sql_query_fv = sisplet_query($sql_select_fv); + $row_query_fv = mysqli_fetch_array($sql_query_fv); + $full_view = (int)$row_query_fv['full_view'] == 1 ? true : false; + $full_view = true; + + #odpri vse - zapri vse bloki + if ($has_if == true && $full_view == true || ($has_if == true && $this->expanded == false)) { + echo '
    '; + //echo ''.$lang['srv_expand_colapse'].': '; + + echo '
    '; + echo ''; + echo ''.$lang['srv_expand_open'].''; + echo '
    '; + + echo '
    '; + echo ''; + echo ''.$lang['srv_collapse_close'].''; + echo '
    '; + echo '
    ';// settings group + } + echo '
    '; + + echo '
    '; - //$this->toolbox_nastavitve(); - - - // prikaz blokov kot zavihke - $sqlB = sisplet_query("SELECT i.* FROM srv_if i, srv_branching b WHERE i.tab='1' AND i.tip='1' AND i.id=b.element_if AND b.ank_id='$this->anketa' ORDER BY b.parent, b.vrstni_red"); - if (!$sqlB) echo mysqli_error($GLOBALS['connect_db']); - - if(mysqli_num_rows($sqlB) > 0){ - - echo '
    '; + echo '
    '; + // Arhiviraj - ENKLIK ARHIV + echo '
    '; + echo ''; + echo ''.$lang['srv_analiza_arhiviraj'].''; + echo '
    '; + + if ($row['locked'] == 0) { + echo '
    '; - // Zavihek VSI - echo '

    '; - echo ''.$lang['srv_vsi'].' '; - echo '

    '; + echo '
    '; + echo ''; + echo '
    '; - // Ostali zavihki - while ($rowB = mysqli_fetch_array($sqlB)) { - echo ' | '; - $label = ($rowB['label'] == '' ? $lang['srv_blok'].' ('.$rowB['number'].')' : $rowB['label']); - echo '

    '; - echo ''.$label.' '; + echo '

    '; + + # find & replace + echo '

    '; + echo ''.$lang['srv_find_replace_words'].''; + echo '

    '; + + if ($full_view == true) { + #prelom strani + echo '

    '; + echo ''.$lang['srv_pagebreak_all'].' '."\n"; + echo '

    '; + + # Hrošč je viden samo če imamo ife in razširjen pogled + //if ($row['flat'] == 0) + echo '

    '; + echo ''.$lang['srv_check_pogoji'].' '."\n"; + echo '

    '; + + #prestevilci + echo '

    '; + echo ''.$lang['srv_grupe_recount_branching'].'' . Help :: display('srv_grupe_recount_branching') ."\n"; echo '

    '; } - + echo '
    '; - } + echo '
    '; + } + + + //Klik izven razprith nastavitev - zapremo okno + echo ''; + + echo '
    '; // settings group + echo '
    '; // left settings + echo '
    '; //top_center_settings echo '
      '; @@ -1019,11 +1824,14 @@ class Branching { // napis uvod na začetku echo '
    • '; - echo ''.$lang['srv_intro_page'].''; + echo '
      '; + echo '
      '.$lang['srv_intro_page'].'
      '; + echo '
      '; + echo '
      '; echo '
    • '; echo '
    • '; - echo ''; + echo '
      '; echo '
    • '; // Ce imamo slucajno GDPR preduvod @@ -1040,7 +1848,7 @@ class Branching { echo ''; echo '
    • '; - echo ''; + echo '
      '; echo '
    • '; } } @@ -1063,13 +1871,14 @@ class Branching { echo '
    • '; - echo '
      '.$lang['srv_new_survey_success2'].'
      '; + echo '
      '.$lang['srv_new_survey_success'].'
      '; - echo '
      '; - printf ($lang['srv_new_survey_success3'], 'index.php?anketa='.$this->anketa.'&a=branching&change_mode=1&what=toolbox&value=3'); - echo '
      '; + echo '
      '; + echo ' '; + echo ' '; + echo '
      '; - MobileSurveyAdmin::displayNoQuestions($this->anketa); + MobileSurveyAdmin::displayNoQuestions($this->anketa); echo '
    • '; } @@ -1077,9 +1886,10 @@ class Branching { if ($first > 0) { + // Uvodni element (pri formi ga ni) if ($this->survey_type != 1) { echo '
    • '; - echo ''; + echo '
      '; echo '
    • '; $first = $this->find_first_spr(); @@ -1087,37 +1897,53 @@ class Branching { // Zaenkrat imamo vedno isti text za strani if ($first > 0){ - /*$gr = $this->getGrupa4Spremenljivka($first);*/ $gr = $this->getGrupa4Spremenljivka($first); $naslov = $lang['srv_stran'].' '.$gr['vrstni_red']; } else $naslov = $lang['srv_stran'].' 1'; - echo ''.$naslov.''; + echo '
      '; + echo '
      '.$naslov.'
      '; + echo '
      '; + echo '
      '; + echo ''; } echo '
    • '; - echo ''; + echo '
      '; echo '
    • '; } + // Dodani elementi v anketi (vprasanja, pogoji...) foreach (Cache::srv_branching_parent($this->anketa, $parent) AS $k => $rowQ) { $this->display_element($rowQ['element_spr'], $rowQ['element_if']); } - // zakljucek - pri formi ga ni + // Gumb za dodajanje vprasanja + if ($first > 0 && !$this->locked) { + echo '
    • '; + echo '
      '; + echo ' '; + echo '
      '; + echo '
    • '; + } + + // Zakljucek - pri formi ga ni if ($this->survey_type != 1) { // napis zakljucek prikazemo tukaj in ne za zadnjo spremenljivko da je lepse echo '
    • '; - echo ''.$lang['srv_end_page'].''; + echo '
      '; + echo '
      '.$lang['srv_end_page'].'
      '; + echo '
      '; + echo '
      '; echo '
    • '; echo '
    • '; - echo ''; + echo '
      '; echo '
    • '; echo '
    • '; @@ -1180,18 +2006,17 @@ class Branching { global $lang; $row = SurveyInfo::getInstance()->getSurveyRow(); - #$this->survey_type = SurveyAdmin::getSurvey_type($this->anketa); $this->survey_type = SurveyInfo::getInstance()->getSurveyColumn("survey_type"); if ($row['flat'] == 0) - $zamik = ( $this->level($spremenljivka,0) > 0 ? ' style="padding-left:'.(10+$this->level($spremenljivka,0)*20).'px"' : '' ); + $zamik = ( $this->level($spremenljivka,0) > 0 ? ' style="padding-left:'.($this->level($spremenljivka,0)*32).'px"' : '' ); else $zamik = ''; $row = Cache::srv_spremenljivka($spremenljivka); $row1 = Cache::srv_branching($spremenljivka, 0); - echo '
    • '; + echo '
    • '; if ($this->expanded) { $this->vprasanje($spremenljivka); } else { @@ -1199,76 +2024,75 @@ class Branching { } echo '
    • '; - //echo '
    • '; if ($this->pagebreak($spremenljivka)) { + $gr = $this->getGrupa4Spremenljivka($this->find_next_spr($spremenljivka)); + if ($gr['id'] > 0) { echo '
    • '; - echo ''; + echo '
      '; echo '
    • '; // ++ zadnji pagebreak prikazan izven ifa // // ce je spremenljivka zadnja v IFu, ne prikazemo PB, ker ga bomo za ENDIFom $rows = Cache::srv_branching($spremenljivka, 0); if ( $this->find_last_in_if($rows['parent']) != $spremenljivka ) { - echo '
    • '; - //echo ''.$gr['naslov'].''; - echo ''.$lang['srv_stran'].' '.$gr['vrstni_red'].''; + + echo '
    • '; + echo '
      '; + echo '
      '.$lang['srv_stran'].' '.$gr['vrstni_red'].'
      '; + echo '
      '.$lang['srv_rem_pagebreak'].'
      '; + echo '
      '; + echo '
      '; echo '
    • '; + echo '
    • '; - echo ''; + echo '
      '; echo '
    • '; } - // -- zadnji pagebreak prikazan izven ifa // - } elseif($this->survey_type != 1) { + + } + // -- zadnji pagebreak prikazan izven ifa // + elseif($this->survey_type != 1) { echo '
    • '; - echo ''; + echo '
      '; echo '
    • '; - - /*echo '
    • '; - echo ''.$lang['srv_end_label'].''; - echo '
    • '; - - echo '
    • '; - echo ''; - echo '
    • ';*/ } - } elseif ($spremenljivka == $this->find_last_spr() && $this->survey_type != 1) { // zadnja spremenljivka - zakljucek + } + elseif ($spremenljivka == $this->find_last_spr() && $this->survey_type != 1) { // zadnja spremenljivka - zakljucek echo '
    • '; - echo ''; + echo '
      '; echo '
    • '; - /*echo '
    • '; - echo ''.$lang['srv_end_label'].''; - echo '
    • '; - - echo '
    • '; - echo ''; - echo '
    • ';*/ - - } elseif ($this->survey_type != 1) { //pri formi ne dovolimo dodajanja page-breakov + } + // pri formi ne dovolimo dodajanja page-breakov + elseif ($this->survey_type != 1) { // tuki pustimo, da se PB lahko dodaja za spremenljivko in za ifom (pol se prikaze za ifom) // -- v zadnji spremenljivki za ifom ne prikazemo dodajanja $rows = Cache::srv_branching($spremenljivka, 0); if ( $this->find_last_in_if($rows['parent']) != $spremenljivka ) { echo '
    • '; - echo ''; + echo '
      '; + echo '
      '.$lang['srv_add_pagebreak'].'
      '; + echo '
      '; + echo '
      '; echo '
    • '; - } else { // zadnji spremenljivki v ifu izpisemo PB izven ifa (da je bolj pregledno in lepse) + } + // zadnji spremenljivki v ifu izpisemo PB izven ifa (da je bolj pregledno in lepse) + else { echo '
    • '; - echo ''; + echo '
      '; echo '
    • '; } - } elseif ($this->survey_type == 1) { // forma + } + // forma + elseif ($this->survey_type == 1) { echo '
    • '; echo '
    • '; } - - //echo ''; - } function display_if_label($if) { @@ -1282,7 +2106,7 @@ class Branching { if ($rowb['tip'] == 0) { $this->conditions_display($if); } elseif ($rowb['tip'] == 1) { - echo 'BLOCK ('.$rowb['number'].')'.($rowb['enabled']==2?' FALSE ':'').($rowb['label']!=''?' ( '.$rowb['label'].' )':'').''; + echo 'BLOCK ('.$rowb['number'].')'.($rowb['enabled']==2?' FALSE ':'').($rowb['label']!=''?' ( '.$rowb['label'].' )':'').''; } elseif ($rowb['tip'] == 2) { $this->loop_display($if); } @@ -1299,7 +2123,7 @@ class Branching { $rowb = Cache::srv_if($if); if ($row['flat'] == 0) - $zamik = ( $this->level(0,$if) > 0 ? ' style="padding-left:'.(10+$this->level(0,$if)*20).'px"' : '' ); + $zamik = ( $this->level(0,$if) > 0 ? ' style="padding-left:'.($this->level(0,$if)*32).'px"' : '' ); else $zamik = ''; @@ -1308,7 +2132,7 @@ class Branching { // plusminus if ($row['flat'] == 0) - echo ''; + echo ''; $this->display_if_label($if); @@ -1333,28 +2157,41 @@ class Branching { $sqle = sisplet_query("SELECT ank_id, parent, element_spr, element_if FROM srv_branching WHERE parent='{$rowi['parent']}' AND vrstni_red>'{$rowi['vrstni_red']}' AND ank_id='$this->anketa'"); - if ($rows['pagebreak'] == 1 AND (mysqli_num_rows($sqle)>0 || $rowi['parent']==0) ) { + if (isset($rows['pagebreak']) && $rows['pagebreak'] == 1 AND (mysqli_num_rows($sqle)>0 || $rowi['parent']==0) ) { $gr = $this->getGrupa4Spremenljivka($this->find_next_spr($spr)); if ($gr['id'] > 0) { - echo '
    • '; - echo ''; + echo '
    • '; + echo '
      '; echo '
    • '; - echo '
    • '; - echo ''.$lang['srv_stran'].' '.$gr['vrstni_red'].''; + + echo '
    • '; + echo '
      '; + echo '
      '.$lang['srv_stran'].' '.$gr['vrstni_red'].'
      '; + echo '
      '.$lang['srv_rem_pagebreak'].'
      '; + echo '
      '; + echo '
      '; echo '
    • '; } - } // zadnji spremenljivki v ifu, tudi dodamo PB izven pagebreaka (da se doda, tam kjer se potem prikaže) - if ($rows['pagebreak'] == 0 AND (mysqli_num_rows($sqle)>0 || $rowi['parent']==0) ) { + // ce gre za zadnji if v anketi ne pustimo dodajanja page breaka + if (isset($rows['pagebreak']) && $rows['pagebreak'] == 0 + && (mysqli_num_rows($sqle) > 0 || $rowi['parent'] == 0) + && ($if != $this->find_last_if_branching()) + ){ + echo '
    • '; - echo ''; + echo '
      '; + echo '
      '.$lang['srv_add_pagebreak'].'
      '; + echo '
      '; + echo '
      '; echo '
    • '; - } else { + } + else { echo '
    • '; echo '
    • '; } @@ -1370,8 +2207,8 @@ class Branching { $rowb = Cache::srv_if($if); if ($row['flat'] == 0) { - $zamik = ($this->level(0, $if) > 0 ? ' style="padding-left:' . (10 + $this->level(0, $if) * 20) . 'px"' : ''); - $zaklepaj = ($this->level(0, $if) > 0 ? 'margin-left:-' . (10 + $this->level(0, $if) * 20) . 'px;width:' . (15 + $this->level(0, $if) * 20) . 'px;' : ''); + $zamik = ($this->level(0, $if) > 0 ? ' style="padding-left:' . ($this->level(0, $if) * 32) . 'px"' : ''); + $zaklepaj = ($this->level(0, $if) > 0 ? 'margin-left:-' . ($this->level(0, $if) * 32) . 'px;width:' . ($this->level(0, $if) * 32) . 'px;' : ''); } else { $zamik = ''; @@ -1386,11 +2223,12 @@ class Branching { } echo '
    • '; - echo ''.($rowb['tip']==0?'ENDIF':($rowb['tip']==1?'ENDBLOCK':'ENDLOOP')).' ('.$rowb['number'].')'."\n\r"; + echo ''.($rowb['tip']==0?'ENDIF':($rowb['tip']==1?'ENDBLOCK':'ENDLOOP')).' ('.$rowb['number'].')'."\n\r"; // Dodajanje komentarjev na if/blok if ($this->displayKomentarji !== false) { - $this->if_komentarji($if, $rowb['tip']); + $sc = new SurveyComments($this->anketa); + $sc->display_if_komentarji($if, $rowb['tip']); } echo '
    • '; @@ -1423,15 +2261,15 @@ class Branching { // Kvota if($tip == 25){ $SQ = new SurveyQuotas($this->anketa); - echo '('.$variable.') '.$SQ->quota_display(-$spremenljivka).' ( '.$lang['srv_vprasanje_tip_long_'.$row['tip']].' )'; + echo '('.$variable.') '.$SQ->quota_display(-$spremenljivka).' ('.$lang['srv_vprasanje_tip_long_'.$row['tip']].')'; } // Kalkulacija else if($tip == 22){ - echo '('.$variable.') '.$this->calculations_display(-$spremenljivka).' ( '.$lang['srv_vprasanje_tip_long_'.$row['tip']].' )'; + echo '('.$variable.') '.$this->calculations_display(-$spremenljivka).' ('.$lang['srv_vprasanje_tip_long_'.$row['tip']].')'; } // Navadne spremenljivke else{ - echo '('.$variable.') '.$spanred.skrajsaj(strip_tags($naslov), 80).($spanred!=''?'':'').' ( '.$lang['srv_vprasanje_tip_long_'.$row['tip']].' )'; + echo '('.$variable.') '.$spanred.skrajsaj(strip_tags($naslov), 80).($spanred!=''?'':'').' ('.$lang['srv_vprasanje_tip_long_'.$row['tip']].')'; } } @@ -1450,6 +2288,13 @@ class Branching { global $site_url; $row = Cache::srv_spremenljivka($spremenljivka); + + // novi missingi - vse tabele razen kombinirane + //dodatne missing vrednosti (ne vem, zavrnil...) + # preberemo iz class.SurveyMissingValues + $smv = new SurveyMissingValues($this->anketa); + # katere missinge imamo na voljo + $missing_values = $smv->GetUnsetValuesForSurvey(); $this->prevajanje = $prevajanje; @@ -1461,9 +2306,10 @@ class Branching { save('lang_id', $this->lang_id); $rowl = \App\Controllers\LanguageController::srv_language_spremenljivka($spremenljivka); - if (strip_tags($rowl['naslov']) != '') $row['naslov'] = $rowl['naslov']; - if (strip_tags($rowl['info']) != '') $row['info'] = $rowl['info']; - if ($rowl['vsota'] != '') $row['vsota'] = $rowl['vsota']; + + if (isset($rowl['naslov']) && strip_tags($rowl['naslov']) != '') $row['naslov'] = $rowl['naslov']; + if (isset($rowl['info']) && strip_tags($rowl['info']) != '') $row['info'] = $rowl['info']; + if (isset($rowl['vsota']) && $rowl['vsota'] != '') $row['vsota'] = $rowl['vsota']; } $this->survey_type = SurveyInfo::getInstance()->getSurveyColumn("survey_type"); @@ -1497,13 +2343,15 @@ class Branching { $string = ''; // statusi: reminder, timer, in še kaj if ($row['sistem'] == 1) - $string = $string . $lang['srv_system_text'] . ' | '; + $string .= ''.$lang['srv_system_text'].''; if ($row['visible'] == 0) - $string .= $lang['srv_hidden_text'] . ' | '; + $string .= ''.$lang['srv_hidden_text'].''; if ($row['dostop'] != 4) { - $string = $string . $lang['srv_visible_dostop'].' '; + + $string .= ''.$lang['srv_visible_dostop'].' '; + switch ($row['dostop']) { case 3: $string .= strtolower($lang['see_registered']); break; @@ -1514,65 +2362,62 @@ class Branching { case 0; $string .= strtolower($lang['see_admin']); break; } - $string .= ' | '; + $string .= ''; } if ($row['reminder'] > 0) { if ($row['reminder'] == 1) { - // echo ''.$lang['srv_reminder_soft'].''; - $string = $string . $lang['srv_reminder_soft']; - } else { - // echo ''.$lang['srv_reminder_hard'].''; - $string = $string . $lang['srv_reminder_hard']; + $string .= ''.$lang['srv_reminder_soft'].''; + } + else { + $string .= ''.$lang['srv_reminder_hard'].''; } - $string = $string . ' | '; } $sqlv = sisplet_query("SELECT spr_id, if_id FROM srv_validation WHERE spr_id = '$spremenljivka'"); if (mysqli_num_rows($sqlv) > 0) { - $string = $string . $lang['srv_validation']; - $string = $string . ' | '; + $string .= ''.$lang['srv_validation'].''; } if ($row['timer'] > 0) { - $string = $string . $lang['srv_timer_on_time']; - $string = $string . (substr(bcdiv($row['timer'], 60), 0, 4)) . '' . $lang['srv_minutes'] . ' '; - $string = $string . (bcmod($row['timer'], 60)) . '' . $lang['srv_seconds'] . ''; - $string = $string . ' | '; + $string .= ''.$lang['srv_timer_on_time']; + $string .= (substr(bcdiv($row['timer'], 60), 0, 4)) . '' . $lang['srv_minutes'] . ' '; + $string .= (bcmod($row['timer'], 60)) . '' . $lang['srv_seconds'] . ''; + $string .= ''; } //izrišemo še ostale statuse: statistika, orientacija, sortiranje if ($row['tip'] <= 3 && $row['stat'] && $this->survey_type != 0) { - $string = $string . $lang['srv_stat_on'] . ' | '; + $string .= ''.$lang['srv_stat_on'].''; } // Status orentacije - navadna vprasanja if((in_array($row['tip'], array('1', '2', '21', '7', '8')) && $row['orientation'] != '1') || ($row['tip'] == '3' && $row['orientation'] == '1')){ - $string .= $this->getVprasanjeOrientationString($row['tip'], $row['orientation']) . ' | '; + $string .= ''.$this->getVprasanjeOrientationString($row['tip'], $row['orientation']) . ''; } // Status orentacije - tabele elseif(in_array($row['tip'], array('6', '16')) && $row['enota'] != '0'){ - $string .= $this->getVprasanjeOrientationString($row['tip'], $row['enota']) . ' | '; + $string .= ''.$this->getVprasanjeOrientationString($row['tip'], $row['enota']) . ''; } if ($row['tip'] == 1 && $row['hidden_default'] == 1) { - $string = $string . $lang['srv_potrditev'] . ' | '; + $string .= ''.$lang['srv_potrditev'].''; } if ($row['random']) { $arrayRandomText = array ( - 0 => $lang['srv_random_off'], - 1 => $lang['srv_random_on'], - 2 => $lang['srv_sort_asc'], - 3 => $lang['srv_sort_desc'] + 0 => $lang['srv_random_off'], + 1 => $lang['srv_random_on'], + 2 => $lang['srv_sort_asc'], + 3 => $lang['srv_sort_desc'] ); - $string = $string . $arrayRandomText[$row['random']] . ' | '; + $string .= ''.$arrayRandomText[$row['random']].''; } //skriti checkboxi if ($row['checkboxhide'] != 0) - $string = $string . $lang['srv_checkboxhide_disabled'] . ' | '; + $string .= ''.$lang['srv_checkboxhide_disabled'].''; // Kljucavnica ce je vprasanje zaklenjeno if($question_locked){ @@ -1580,22 +2425,20 @@ class Branching { } // Ce je zaklenjeno ampak ga lahko ureja ker je admin ali avtor elseif($row['locked']){ - $string = $string . $lang['srv_locked_text'] . ' | '; + $string .= ''.$lang['srv_locked_text'].''; } // Ce je onemogoceno vprasanje $disabled_vprasanje = $spremenljivkaParams->get('disabled_vprasanje') ? $spremenljivkaParams->get('disabled_vprasanje') : 0; if($disabled_vprasanje){ - $string = $string . $lang['srv_disabled_text'] . ' | '; + $string .= ''.$lang['srv_disabled_text'].''; } - //zbrisemo zadnji "|" iz niza - $string = substr($string, 0, -7); - $string = '' . $string . ''; echo $string; echo '
    '; + echo '
    '; // - spremenljivka_settings // --- Zgornja vrstica pri editiranju vprasanj --> @@ -1614,12 +2457,12 @@ class Branching { // kalkulacija if ($row['tip'] == 22) { - $row['naslov'] = ''.$this->calculations_display(-$spremenljivka).' ( '.$lang['srv_vprasanje_tip_long_'.$row['tip']].' )'; + $row['naslov'] = ''.$this->calculations_display(-$spremenljivka).' ('.$lang['srv_vprasanje_tip_long_'.$row['tip']].')'; } // Kvota else if($row['tip'] == 25){ $SQ = new SurveyQuotas($this->anketa); - $row['naslov'] = ''.$SQ->quota_display(-$spremenljivka).' ( '.$lang['srv_vprasanje_tip_long_'.$row['tip']].' )'; + $row['naslov'] = ''.$SQ->quota_display(-$spremenljivka).' ('.$lang['srv_vprasanje_tip_long_'.$row['tip']].')'; } // Inline ifi so disablani ce nimamo ustreznega paketa @@ -1627,14 +2470,6 @@ class Branching { echo '
    '; - if ( in_array($row['tip'], array(1,2,6,16,19,20)) ) { - if ($row['enota'] != 10 && $row['orientation'] != 10){ - echo ''; - - MobileSurveyAdmin::displayAddQuestionCategory($this->anketa, $spremenljivka, $row['tip']); - } - } - // kalkulacija if ($row['tip'] == 22) { echo '
    '; @@ -1666,13 +2501,13 @@ class Branching { @include($file); } else{ - echo '
    lang_id!=null ? ' default="1"':'').'>'; + echo '
    lang_id!=null ? ' default="1"':'').'>'; echo $row['naslov']; echo '
    '; } if ($row['info'] != '') - echo '
    lang_id!=null ? ' default="1"':'').'>' . $row['info'] . '
    '; + echo '
    lang_id!=null ? ' default="1"':'').'>' . $row['info'] . '
    '; echo ''; @@ -1696,7 +2531,7 @@ class Branching { else{ echo' '; } @@ -1716,7 +2551,7 @@ class Branching { else{ echo' '; } @@ -1737,7 +2572,7 @@ class Branching { else{ echo' '; } @@ -1757,7 +2592,7 @@ class Branching { else{ echo' '; } @@ -1766,11 +2601,14 @@ class Branching { } - echo '
    '; + $leftmargin = (($row['tip'] <= 2 && $row['orientation'] == 10) || ($row['tip'] == 1 && ($row['orientation'] == 9 || $row['orientation'] == 11))) + ? ' left11' : ''; + + echo '
    '; // radio, checkbox, select if ($row['tip'] <= 3) { - + if ($row['tip'] == 3 || $row['orientation'] == 6) echo '
    '; @@ -1829,6 +2667,8 @@ class Branching { $num = mysqli_num_rows($sql1); $size = $num * 50; + echo '
    '; + //zaslon razdelimo na dva dela - izris leve strani echo '
    '; @@ -1865,47 +2705,57 @@ class Branching { //echo '
    '; echo '
    '; // Ikona za upload slike - echo ' '; + echo ' '; echo ''; - echo ' '; - echo ' '; - echo ' '; - echo ' '; + echo '
    lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'
    '; //koda za notranji IF if ($row1['if_id'] > 0) { echo ' *'; - echo ' '; + echo ' '; $this->conditions_display($row1['if_id']); echo ''; if ($this->condition_check($row1['if_id']) != 0) echo ' '; } + + echo '
    '; + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo '
    '; + } else{ if ($length > 30) $class = 'ranking_long'; $class = 'ranking'; - //echo '
    '; + echo '
    '; echo ''; - echo ' '; - echo ' '; - echo ' '; - echo ' '; + echo '
    lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'
    '; - //koda za notranji IF + + // koda za notranji IF if ($row1['if_id'] > 0) { echo ' *'; - echo ' '; + echo ' '; $this->conditions_display($row1['if_id']); echo ''; if ($this->condition_check($row1['if_id']) != 0) echo ' '; - } + } + + echo '
    '; + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo '
    '; } @@ -1924,8 +2774,7 @@ class Branching { echo '
    '; - echo '
    '; - + echo '
    '; } //Image hot spot @ radio ******************************************************************************************************** @@ -1968,20 +2817,24 @@ class Branching { // Ce je variabla ne vem in imamo vklopljen prikaz ob opozorilu -> rdec $missing_warning = ''; - if(($row1['other'] == '-97' && $row['alert_show_97'] > 0) + if(($row1['other'] == '-96' && $row['alert_show_96'] > 0) + || ($row1['other'] == '-97' && $row['alert_show_97'] > 0) || ($row1['other'] == '-98' && $row['alert_show_98'] > 0) || ($row1['other'] == '-99' && $row['alert_show_99'] > 0)){ $missing_warning = ' red'; } if ($row['tip'] == 1 && $row['orientation'] != 8 && $row['orientation'] != 10) { - //echo '
    '; + if($row['orientation'] == 6){ - echo '
    '.$row1['variable'].'
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; + echo '
    + +
    '.$row1['variable'].'
    +
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; } elseif($row['orientation'] == 7){ - //echo '
    '.$row1['variable'].'
    ' . $row1['naslov'] . '
    '; - echo '
    '.$row1['variable'].'
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; + + echo '
    '.$row1['variable'].'
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; if ($row1['other'] == 1){ $otherWidth = ($spremenljivkaParams->get('otherWidth') ? $spremenljivkaParams->get('otherWidth') : -1); @@ -1997,44 +2850,62 @@ class Branching { echo ' *'; - echo ' '; + echo ' '; $this->conditions_display($row1['if_id']); echo ''; if ($this->condition_check($row1['if_id']) != 0) echo ' '; } + + if($row1['other'] != 0 && $row1['other'] != 1){ + echo '
    +
    + '.$lang['srv_other_system'].$missing_values[$row1['other']].' +
    +
    0)?'':' style="display:none;"').'> +
    + + + +
    +
    +
    '; + } - echo ' '; - echo ' '; + echo '
    '; + echo ' '; + echo ' '; if($row['tip'] == 1) - echo ' '; - echo ' '; - echo ' '; - + echo ' '; + echo ' '; + echo ' '; + echo '
    '; echo ''; echo ''; - echo'
    '; + echo '
    '; } elseif($row['orientation'] == 9){ echo '
    -
    '; } elseif( $row['orientation'] == 11){ - + //ali so smeskoti pobarvani ali samo sivi + $colored = ($spremenljivkaParams->get('visual_type') == 1 ? 'colored' : ''); $stVsehEnot = mysqli_num_rows($sql1); // echo '
    '; @@ -2048,27 +2919,27 @@ class Branching { echo '
    '.$row1['variable'].'
    '; // Ikona za upload slike - echo ' '; + echo ' '; // Slika oz. text (brez moznosti editiranja) - samo če je vnesen kaksen text ali slika - echo '
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; + echo '
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; } else{ echo '
    '; echo ' '; echo '
    '.$row1['variable'].'
    '; - echo '
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; + echo '
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; } } } elseif ($row['tip'] == 2 && $row['orientation'] != 10) { if($row['orientation'] == 6){ - echo '
    '.$row1['variable'].'
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; + echo '
    '.$row1['variable'].'
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; } elseif($row['orientation'] == 7){ //echo '
    '.$row1['variable'].'
    ' . $row1['naslov'] . '
    '; - echo '
    '.$row1['variable'].'
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; + echo '
    '.$row1['variable'].'
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; if ($row1['other'] == 1){ $otherWidth = ($spremenljivkaParams->get('otherWidth') ? $spremenljivkaParams->get('otherWidth') : -1); @@ -2084,7 +2955,7 @@ class Branching { echo ' *'; - echo ' '; + echo ' '; $this->conditions_display($row1['if_id']); echo ''; @@ -2092,13 +2963,32 @@ class Branching { echo ' '; } + if($row1['other'] != 0 && $row1['other'] != 1){ + echo '
    +
    + '.$lang['srv_other_system'].$missing_values[$row1['other']].' +
    +
    0)?'':' style="display:none;"').'> +
    + + + +
    +
    +
    '; + } + + echo '
    '; + echo ' '; echo ' '; if($row['tip'] == 1) - echo ' '; + echo ' '; echo ' '; echo ' '; - + echo '
    '; echo''; echo ''; @@ -2113,19 +3003,19 @@ class Branching { echo '
    '.$row1['variable'].'
    '; // Ikona za upload slike - echo ' '; + echo ' '; // Slika oz. text (brez moznosti editiranja) - samo če je vnesen kaksen text ali slika - echo '
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; + echo '
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; } else{ - echo '
    '.$row1['variable'].'
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; + echo '
    '.$row1['variable'].'
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; } } } elseif ($row['tip'] == 3) { //echo ' '; - echo '
    '.$row1['variable'].'
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; + echo '
    '.$row1['variable'].'
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '
    '; } @@ -2144,28 +3034,53 @@ class Branching { echo ' *'; - echo ' '; + echo ' '; $this->conditions_display($row1['if_id']); echo ''; if ($this->condition_check($row1['if_id']) != 0) echo ' '; } + + if($row1['other'] != 0 && $row1['other'] != 1){ + echo '
    +
    + '.$lang['srv_other_system'].$missing_values[$row1['other']].' +
    '; + + //if($row['tip'] != 3) { + echo '
    0)?'':' style="display:none;"').'> +
    + + + +
    +
    '; + //} + + echo '
    '; + } + + + echo '
    '; echo ' '; // Kljukica za kviz if(SurveyInfo::getInstance()->checkSurveyModule('quiz')){ - $sqlQ = sisplet_query("SELECT * FROM srv_quiz_vrednost WHERE spr_id='".$row['id']."' AND vre_id='".$row1['id']."'"); + $sqlQ = sisplet_query("SELECT * FROM srv_quiz_vrednost WHERE spr_id='".$row['id']."' AND vre_id='".$row1['id']."'"); echo ' '; } echo ' '; - - if($row['tip'] == 1 || $row['tip'] == 2 || $row['tip'] == 3) - echo ' '; + + if($row['tip'] == 1 || $row['tip'] == 2 || $row['tip'] == 3) + echo ' '; echo ' '; echo ' '; + echo '
    '; echo '
    '; @@ -2214,7 +3129,8 @@ class Branching { echo '
    '; } } - // multigrid, multicheckbox, multitext, multinumber prikaz + + // multigrid, multicheckbox, multitext, multinumber prikaz elseif ($row['tip'] == 6 || $row['tip'] == 16 || $row['tip'] == 19 || $row['tip'] == 20 || $row['tip'] == 24) { $spremenljivkaParams = new enkaParameters($row['params']); @@ -2259,7 +3175,44 @@ class Branching { $sizebox = '$("#grids_count option:selected").val()'; $display = ($row['tip'] == 6 && $row['enota'] == 8) ? ' style="display:none;"' : ''; - $grid_plus_minus = '
    '; + + #kateri missingi so nastavljeni + //ignoriraj pri testiranje->komentarji + if($_GET['a'] !== 'komentarji' && $_GET['a'] !== 'komentarji_anketa'){ + $already_set_mv = array(); + $sql_grid_mv = sisplet_query("SELECT naslov, other FROM srv_grid WHERE spr_id='".$spremenljivka."' AND other != 0"); + + while ($row_grid_mv = mysqli_fetch_array($sql_grid_mv)) { + $already_set_mv[$row_grid_mv['other']] = $row_grid_mv['naslov']; + } + + $missing_menu_items = ''; + + if (count($missing_values) > 0) { + foreach ($missing_values AS $mv_key => $mv_text) { + $missing_menu_items = + '
  • +
  • ' + .$missing_menu_items; + } + } + + $grid_plus_minus = '
    + + + +
    +
    +
    +
      +
    • '.$lang['srv_manjkajoce_vrednosti'].' '.Help::display('srv_missing_values').'
    • + '.$missing_menu_items.' +
    + '; + } + //konec missingov //izrisemo multigride z dropdowni in select box if($row['tip'] == 6 && ($row['enota'] == 2 || $row['enota'] == 6)) { @@ -2310,7 +3263,7 @@ class Branching { if ($naslov != '') $row2['naslov'] = $naslov; } - echo '
    lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '
    '; + echo '
    lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '
    '; $row2 = mysqli_fetch_array($sql2); } @@ -2354,12 +3307,15 @@ class Branching { echo ''; echo ''; echo ''; - echo ' '; + + echo '
    '; + echo ' '; echo ' '; echo ' '; echo ' '; + echo '
    '; - echo '
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'
    '; + echo '
    lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'
    '; if ($row1['if_id'] > 0) { echo ' *'; @@ -2382,7 +3338,7 @@ class Branching { $sql2 = sisplet_query("SELECT id, naslov, vrstni_red FROM srv_grid WHERE spr_id='$row[id]' AND other=0 ORDER BY vrstni_red"); $row2 = mysqli_fetch_array($sql2); - echo ''; + echo ''; if ($row['enota'] == 6){ echo ''; + echo ''; else - echo ''; + echo ''; } echo ''; @@ -3129,6 +4096,9 @@ class Branching { // desni del radio button echo ' '; + //zadnji stolpec za ikone + echo ''; + //urejanje navpicnega dela grupiranja radio button - vodoravni je urejen po defaultu s pomočjo atributa name echo' '; - //echo ' '; - //Zadnja bela celica kjer se nahajajo ikone za mouseover, ko je slider - konec - - }else{ + + echo ''; + } + else{ echo ' '; } @@ -3796,12 +4768,21 @@ class Branching { // diferencial if ($row['enota'] == 1 && $row['tip'] == 6) { echo ' '; - echo '
    lang_id!=null ?' default="1"':'').'>' . $row1['naslov2'] . '
    '; + echo '
    lang_id!=null ?' default="1"':'').'>' . $row1['naslov2'] . '
    '; } if ($row['ranking_k'] != 1) { //ce ni slider // Zadnja bela celica kjer se nahajajo ikone za mouseover - echo ''; + echo ''; + + echo '
    '; + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo '
    '; + + echo ' '; echo ' '; } @@ -3896,8 +4877,11 @@ class Branching { //ce je drsnik in moramo urediti opisne labele - konec ################################################## } - // textbox -- not any more - } elseif ($row['tip'] == 4) { + + // textbox -- not any more + } + + elseif ($row['tip'] == 4) { $taSize = ($spremenljivkaParams->get('taSize') ? $spremenljivkaParams->get('taSize') : 1); $taWidth = ($spremenljivkaParams->get('taWidth') ? $spremenljivkaParams->get('taWidth') : -1); @@ -3924,7 +4908,7 @@ class Branching { // textbox* elseif ($row['tip'] == 21) { - if($row['num_useMin'] == 1 && $row['num_useMax'] == 1 && $row['vsota_min'] == $row['vsota_limit']) + if($row['num_useMin'] == 1 && $row['num_useMax'] == 1 && $row['vsota_min'] == $row['vsota_limit']) $limit = '('.$lang['srv_text_length_char_num'].$row['vsota_min'].')'; elseif($row['num_useMin'] == 1 && $row['num_useMax'] == 1) $limit = '('.$lang['srv_text_length_char_num'].'min '.$row['vsota_min'].', max '.$row['vsota_limit'].')'; @@ -3941,9 +4925,7 @@ class Branching { if($taWidth == -1) $taWidth = 30; - echo ''; - if($row['orientation'] != 3) - echo ''; + echo '
    '; $_others = array(); $sql1 = sisplet_query("SELECT id, naslov, variable, size, other, hidden, naslov2 FROM srv_vrednost WHERE spr_id='$row[id]' AND vrstni_red > 0 ORDER BY vrstni_red"); @@ -3951,77 +4933,102 @@ class Branching { if ((int)$row1['other'] == 0) { - // sirina celice td - $cell = $row['text_kosov'] == 1 ? 100 : $row1['size'] ; + // sirina celice + $cell_width = $row['text_kosov'] > 0 ? 100 / $row['text_kosov'] : 100; + + echo '
    '; + // sirina vnosnega polja $input = $taWidth; - if($row['orientation'] == 3) - echo '
    '; - echo ''; - if($row['orientation'] == 3) - echo ''; + echo ''; + + echo ''; } else { # imamo opcijo drugo prikažemo kot checkbox $_others[] = $row1; } } - if($row['orientation'] != 3) - echo ''; - echo '
    '; + if ($this->lang_id != null) { + save('lang_id', $this->lang_id); + $naslov = \App\Controllers\LanguageController::getInstance()->srv_language_vrednost($row1['id']); + if ($naslov != '') $row1['naslov'] = $naslov; + } + + // Polje za enoto + echo '
    lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'
    '; - if($row['text_orientation'] == 1 || $row['text_orientation'] == 3){ - echo '
    lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'
    '; - if ($row['text_orientation'] == 3) - echo '
    '; - } if ($taSize > 1) - echo ''; + echo ''; else - echo ''; - - if($row['text_orientation'] == 2){ - echo '
    lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'
    '; - } - echo '
    '; + + echo ''; + - if ($row['vsota_show'] == 1 && $limit != '') - echo ''.$limit.''; + if ($row['vsota_show'] == 1 && $limit != '') + echo '
    '.$limit.'
    '; if (count($_others)> 0 ) { + + echo '
    '; + foreach ($_others AS $oKey => $_other) { - if ($this->lang_id != null) { - save('lang_id', $this->lang_id); - $naslov = \App\Controllers\LanguageController::getInstance()->srv_language_vrednost($_other['id']); - if ($naslov != '') $_other['naslov'] = $naslov; - } - - // Ce je variabla ne vem in imamo vklopljen prikaz ob opozorilu -> rdec - $missing_warning = ''; - if(($_other['variable'] == '-97' && $row['alert_show_97'] > 0) - || ($_other['variable'] == '-98' && $row['alert_show_98'] > 0) - || ($_other['variable'] == '-99' && $row['alert_show_99'] > 0)){ - $missing_warning = ' red'; - } + if ($this->lang_id != null) { + save('lang_id', $this->lang_id); + $naslov = \App\Controllers\LanguageController::getInstance()->srv_language_vrednost($_other['id']); + if ($naslov != '') $_other['naslov'] = $naslov; + } + + // Ce je variabla ne vem in imamo vklopljen prikaz ob opozorilu -> rdec + $missing_warning = ''; + if(($_other['variable'] == '-97' && $row['alert_show_97'] > 0) + || ($_other['variable'] == '-98' && $row['alert_show_98'] > 0) + || ($_other['variable'] == '-99' && $row['alert_show_99'] > 0)){ + $missing_warning = ' red'; + } - echo '
    '; - echo ' '; - echo '
    ' . $_other['naslov'] . '
    '; - echo ' '; - echo ' '; - echo ' '; - echo ' '; + echo '
    '; + echo ' '; + echo ''; + echo '
    ' . $_other['naslov'] . '
    '; + + if($_other['other'] != 0 && $_other['other'] != 1){ + echo '
    +
    + '.$lang['srv_other_system'].$missing_values[$_other['other']].' +
    +
    0)?'':' style="display:none;"').'> +
    + + + +
    +
    +
    '; + } - echo '
    '; + echo '
    '; + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo '
    '; + echo '
    '; } + + echo '
    '; } + + $this->missings_menu($spremenljivka); } // number - elseif ($row['tip'] == 7) { + elseif ($row['tip'] == 7) { if($row['num_useMin'] == 1 && $row['num_useMax'] == 1 && $row['vsota_min'] == $row['vsota_limit']) $limit = '('.$row['vsota_min'].')'; @@ -4052,20 +5059,19 @@ class Branching { if($taWidth == -1) $taWidth = 10; - $cssFloat = ' floatLeft'; - $sql1 = sisplet_query("SELECT id, naslov FROM srv_vrednost WHERE spr_id='$row[id]' AND other = 0 "); $row1 = mysqli_fetch_array($sql1); $sqlOther = sisplet_query("SELECT id, naslov, other FROM srv_vrednost WHERE spr_id='$row[id]' AND vrstni_red>0 AND other != 0"); $num_other = mysqli_num_rows($sqlOther); - $num_all = $num_other+$row['size']; - $cell_width = 'width:'.(80/$num_all).'% '; if ( $row['ranking_k'] == '0' ) { - echo '
    '; + echo '
    '; + + + echo '
    '; if ($this->lang_id != null) { save('lang_id', $this->lang_id); @@ -4074,28 +5080,24 @@ class Branching { } if($row['enota'] == 1) - echo '
    lang_id!=null ?' default="1"':'').'>' . $row1['naslov'] . '
    - '; + echo '
    lang_id!=null ?' default="1"':'').'>' . $row1['naslov'] . '
    + '; elseif($row['enota'] == 2) - echo '
    lang_id!=null?' default="1"':'').'>' . $row1['naslov'].'
    '; + echo '
    lang_id!=null?' default="1"':'').'>' . $row1['naslov'].'
    '; else - echo ' '; - echo '
    '; + echo ' '; + + echo '
    '; + // Omejitev vnosa - if ($row['orientacija'] == 1) { - echo '
    ccc
    '; - $cssFloat = ''; - }else { - $cssFloat = ' floatLeft'; - } if ($row['vsota_show'] == 1 && $limit != '') { - echo ''.$limit.''; - } elseif($row['size'] != 2 && $limit == '') { - echo ''.$lang['srv_number_text'].''; + echo '
    '.$limit.'
    '; + } + elseif($row['size'] != 2 && $limit == '') { + echo '
    '.$lang['srv_number_text'].'
    '; } - $cssFloat = ' floatLeft'; if ($row['size'] == 2) { @@ -4107,35 +5109,32 @@ class Branching { if ($naslov != '') $row1['naslov'] = $naslov; } - echo '
    '; + echo '
    '; if($row['enota'] == 1){ if($taWidth > 40) echo '
    '; - echo '
    lang_id!=null ?' default="1"':'').'>' . $row1['naslov'] . '
    - '; + echo '
    lang_id!=null ?' default="1"':'').'>' . $row1['naslov'] . '
    + '; } elseif($row['enota'] == 2) - echo '
    lang_id!=null ?' default="1"':'').'>' . $row1['naslov'].'
    '; + echo '
    lang_id!=null ?' default="1"':'').'>' . $row1['naslov'].'
    '; else - echo ' '; + echo ' '; echo '
    '; - //Omejitev vnosa - if ($row['orientacija'] == 1) { - echo '
    ccc
    '; - $cssFloat = ''; - }else { - $cssFloat = ' floatLeft'; - } + // Omejitev vnosa if ($row['vsota_show'] == 1 && $limit2 != '') { - echo ''.$limit2.''; - } elseif($limit == '' && $limit2 == '') { - echo ''.$lang['srv_number_text'].''; + echo '
    '.$limit2.'
    '; + } + elseif($limit == '' && $limit2 == '') { + echo '
    '.$lang['srv_number_text'].'
    '; } } - }//ranking_k == 0 - + echo '
    '; + } + + //ranking_k == 0 if ( $row['ranking_k'] == '1' ) { echo '
    '; @@ -4222,18 +5221,21 @@ class Branching { //za custom opisne labele //moznosti urejanja opisnih label drsnika + $slider_CustomDescriptiveLabels = ''; if($slider_VmesneDescrLabel){ for($i=1; $i<=$slider_NumofDescrLabels; $i++){ if($prevajanje == false){ $slider_CustomDescriptiveLabelsTmp = ($spremenljivkaParams->get('slider_Labela_opisna_'.$i) ? $spremenljivkaParams->get('slider_Labela_opisna_'.$i) : ''); - }else if ($prevajanje == true){ + } + else if ($prevajanje == true){ $slider_CustomDescriptiveLabelsTmp = $custom_ar[$i-1]; } $slider_CustomDescriptiveLabelsTmp = preg_replace("/\s| /",' ',$slider_CustomDescriptiveLabelsTmp); //za odstranitev morebitnih presledkov, ki lahko delajo tezave pri polju za drsnik if($i == 1){ $slider_CustomDescriptiveLabels = $slider_CustomDescriptiveLabelsTmp; - }else{ + } + else{ $slider_CustomDescriptiveLabels .= "; ".$slider_CustomDescriptiveLabelsTmp; } } @@ -4259,10 +5261,8 @@ class Branching { '; - echo '
    '; - echo '
    '; - + + //tabela za labele podrocij in podrocja echo ''; @@ -4380,14 +5380,37 @@ class Branching { $missing_warning = ' red'; } - echo '
    '; - echo ''; - echo '
    ' . $row1['naslov'] . '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    ' . $row1['naslov'] . '
    '; + + if($row1['other'] != 0 && $row1['other'] != 1){ + echo '
    +
    + '.$lang['srv_other_system'].$missing_values[$row1['other']].' +
    +
    0)?'':' style="display:none;"').'> +
    + + + + +
    +
    '; + } + echo '
    '; echo ' '; echo ' '; + echo '
    '; + echo '
    '; } + + $this->missings_menu($spremenljivka); } // label @@ -4423,15 +5446,38 @@ class Branching { } echo '
    '; - echo ''; - echo '
    ' . $row1['naslov'] . '
    '; - echo ' '; + echo ''; + echo ''; + echo '
    ' . $row1['naslov'] . '
    '; + + if($row1['other'] != 0 && $row1['other'] != 1){ + echo '
    +
    + '.$lang['srv_other_system'].$missing_values[$row1['other']].' +
    +
    0)?'':' style="display:none;"').'> +
    + + + + +
    +
    '; + } + + echo '
    '; + echo ' '; echo ' '; echo ' '; echo ' '; + echo '
    '; + echo '
    '; } + $this->missings_menu($spremenljivka); } // ranking @@ -4443,9 +5489,12 @@ class Branching { $num = mysqli_num_rows($sql1); $size = $num * 50; + echo '
    '; + // n=k if ($row['design'] == 2) { - echo '
    '; + + echo '
    '; while ($row1 = mysqli_fetch_array($sql1)) { @@ -4469,10 +5518,6 @@ class Branching { echo '
    '; echo ''; - echo ' '; - echo ' '; - echo ' '; - echo ' '; echo '
    lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'
    '; @@ -4482,7 +5527,7 @@ class Branching { echo '
    '; echo ' *'; - echo ' '; + echo ' '; $this->conditions_display($row1['if_id']); echo ''; @@ -4492,8 +5537,16 @@ class Branching { echo '
    '; } + echo '
    '; + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo '
    '; + echo '
    '; } + echo '
    '; } @@ -4501,7 +5554,7 @@ class Branching { elseif ($row['design'] == 0) { //zaslon razdelimo na dva dela - izris leve strani - echo '
    '; + echo '
    '; while ($row1 = mysqli_fetch_array($sql1)) { @@ -4525,10 +5578,6 @@ class Branching { echo '
    '; echo ''; - echo ' '; - echo ' '; - echo ' '; - echo ' '; echo '
    lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'
    '; @@ -4537,7 +5586,7 @@ class Branching { echo '
    '; echo ' *'; - echo ' '; + echo ' '; $this->conditions_display($row1['if_id']); echo ''; @@ -4548,12 +5597,21 @@ class Branching { echo '
    '; } + echo '
    '; + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo '
    '; + echo '
    '; } + echo '
    '; + // izris desne strani - echo '
    '; + echo '
    '; if($row['ranking_k'] == 0) $max = mysqli_num_rows($sql1); @@ -4565,8 +5623,6 @@ class Branching { } echo '
    '; - - echo '
    '; } // cifre - dropdown @@ -4584,10 +5640,6 @@ class Branching { echo '
    '; echo ''; - echo ' '; - echo ' '; - echo ' '; - echo ' '; //echo ' '; echo ''; - - echo '
    lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'
    '; + + echo '
    lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'
    '; //koda za notranji IF if ($row1['if_id'] > 0) { echo ' *'; - echo ' '; + echo ' '; $this->conditions_display($row1['if_id']); echo ''; @@ -4612,6 +5664,13 @@ class Branching { echo ' '; } + echo '
    '; + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo '
    '; + echo '
    '; } } @@ -4622,6 +5681,8 @@ class Branching { //izris hotspot nastavitev za dodajanje slike $this->vprasanje_hotspot($row['id'], $row['tip'], $row['design']); } + + echo '
    '; } // vsota @@ -4641,14 +5702,17 @@ class Branching { if ($naslov != '') $row1['naslov'] = $naslov; } - echo '
    '; + echo '
    '; echo ''; + + echo '
    '; echo ' '; echo ' '; echo ' '; echo ' '; + echo '
    '; - echo '
    lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'
    '; + echo '
    lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'
    '; echo ' '; if ($row1['if_id'] > 0) { @@ -4664,6 +5728,7 @@ class Branching { $row1 = Cache::srv_spremenljivka($row['id']); + $limit = ''; if($row['vsota_limit'] != 0 && $row['vsota_limit'] == $row['vsota_min']) $limit = '('.$row['vsota_min'].')'; elseif($row['vsota_limit'] != 0 && $row['vsota_min'] != 0) @@ -4676,21 +5741,17 @@ class Branching { $vsota = ($row1['vsota'] != '') ? $row1['vsota'] : $lang['srv_vsota_text']; - echo '
    '; + echo '
    '; - echo '
    '; + echo '
    '; + + echo '
    lang_id!=null ?' default="1"':'').'>' . $vsota . '
    '; - echo ' '; + echo ' '; - echo '
    '; - echo '
    '; - echo '
    lang_id!=null ?' default="1"':'').'>' . $vsota . '
    '; - echo '
    '; - echo '
    '; - echo ' '; + echo ' '; if ($row['vsota_show'] == 1) - echo ' '; - echo '
    '; + echo '
    '; } // SN - imena @@ -4738,11 +5799,11 @@ class Branching { $sql1 = sisplet_query("SELECT id, naslov FROM srv_vrednost WHERE spr_id='$row[id]' ORDER BY $orderby"); while ($row1 = mysqli_fetch_array($sql1)) { - echo '

    '; + echo '

    '; } if ($row['textfield'] == 1) { - echo '

    '; + echo '

    '; } } @@ -4788,7 +5849,9 @@ class Branching { else $map_data[] = $sql1; - echo ''.$lang['srv_branching_no_value_map'].''; + echo ''. + $lang['srv_branching_no_value_map'].''; //get info shapes $sql2 = sisplet_query("SELECT lat, lng, address, overlay_id FROM srv_vrednost_map @@ -4821,7 +5884,7 @@ class Branching { ?> '; + if($_GET['a'] !== 'komentarji' && $_GET['a'] !== 'komentarji_anketa'){ $row = Cache::srv_spremenljivka($spremenljivka); - if ($row['thread'] == 0) { - $row['count'] = 0; - } else { - if ($admin_type <= $question_comment_viewadminonly) { - $sql = sisplet_query("SELECT COUNT(*) AS count FROM post WHERE tid='$row[thread]'"); - } elseif ($question_comment_viewauthor==1) { - $sql = sisplet_query("SELECT COUNT(*) AS count FROM post WHERE tid='$row[thread]' AND uid='$global_user_id'"); - } else { - $sql = sisplet_query("SELECT * FROM post WHERE 1 = 0"); - } - $row = mysqli_fetch_array($sql); - $row['count']--;//1. je default comment - } - - // Poglej komentarje - if ($admin_type <= $question_comment_viewadminonly || $question_comment_viewauthor==1) { - echo '   '; - echo ' '; + $spremenljivkaParams = new enkaParameters($row['params']); + + # preberemo missing vrednosti iz class.SurveyMissingValues - kateri so na voljo v anketi + $smv = new SurveyMissingValues($this->anketa); + $missing_values = $smv->GetUnsetValuesForSurvey(); + + # kateri missingi so nastavljeni + $already_set_mv = array(); + $sql_grid_mv = sisplet_query("SELECT naslov, other FROM srv_vrednost WHERE spr_id='".$spremenljivka."' AND other != 0"); + while ($row_grid_mv = mysqli_fetch_array($sql_grid_mv)) { + $already_set_mv[$row_grid_mv['other']] = $row_grid_mv['naslov']; } - } - // komentarji respondentov - if (($question_resp_comment==1) AND ($admin_type <= $question_resp_comment_viewadminonly)) { + $missing_menu_items = ''; - echo ' '; - $sql = sisplet_query("SELECT COUNT(*) AS count FROM srv_data_text".$this->db_table." WHERE spr_id='0' AND vre_id='$spremenljivka'"); - $row = mysqli_fetch_array($sql); + if (count($missing_values) > 0) { + foreach ($missing_values AS $mv_key => $mv_text) { + $missing_menu_items = ' +
  • + +
  • ' + .$missing_menu_items; + } - if ($row['count'] > 0) { - echo ''; - echo ' '; - echo $lang['srv_repondent_comment'].' ('.$row['count'].')'; - echo ''; - echo ' '; } - echo '
    '; - } - - echo '
    '; - } - - /** - * komentarji na if oz. blok - vrstica se izpise na dnu prikaza ifa oz. bloka - * - * @param mixed $if_id (id ifa ali bloka) - * @param mixed $block (ali gre za if ali blok) - */ - function if_komentarji ($if_id, $block=0) { - global $lang; - global $admin_type; - global $global_user_id; - - SurveySetting::getInstance()->Init($this->anketa); - $question_comment = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment'); - - $question_comment_viewadminonly = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment_viewadminonly'); - $question_comment_viewauthor = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment_viewauthor'); - if (!($admin_type <= $question_comment && $question_comment!='')) return; - if ($_GET['a'] == 'komentarji') return; // v komentarjih tut ne izpisujemo te vrstice - - // komentarji na if ali blok - if ($admin_type <= $question_comment && $question_comment != '') { - - // Dodaj komentar - echo ' '; - //echo ''.$lang['srv_question_comment'].' '; - echo ' '; - echo $lang['srv_add_comment']; - echo ''; - echo ' '; - - $row = Cache::srv_if($if_id); - if ($row['thread'] == 0) { - $row['count'] = 0; - } else { - if ($admin_type <= $question_comment_viewadminonly) { - $sql = sisplet_query("SELECT COUNT(*) AS count FROM post WHERE tid='$row[thread]'"); - } elseif ($question_comment_viewauthor==1) { - $sql = sisplet_query("SELECT COUNT(*) AS count FROM post WHERE tid='$row[thread]' AND uid='$global_user_id'"); - } else { - $sql = sisplet_query("SELECT * FROM post WHERE 1 = 0"); - } - $row = mysqli_fetch_array($sql); - $row['count']--;//1. je default comment - } + if (count($missing_values) > 0) { - // Poglej komentarje - if ($admin_type <= $question_comment_viewadminonly || $question_comment_viewauthor==1) { - echo '   '; - echo ' '; + echo ' +
    +
    +
      +
    • '.$lang['srv_manjkajoce_vrednosti'].' '.Help::display('srv_missing_values').'
    • + '.$missing_menu_items.' +
    + '; } } } @@ -5432,11 +6413,15 @@ class Branching { $this->Survey = new \App\Controllers\SurveyController(true); $lang = $l; + save('lang_id', $this->lang_id); + $rowl = \App\Controllers\LanguageController::srv_language_spremenljivka($id); - if ($id == -1) { + + if ($id == -1 && isset($rowl['naslov'])) { if (strip_tags($rowl['naslov']) != '') $row['introduction'] = $rowl['naslov']; - } else { + } + elseif(isset($rowl['naslov'])) { if (strip_tags($rowl['naslov']) != '') $row['conclusion'] = $rowl['naslov']; } } @@ -5524,7 +6509,7 @@ class Branching { // prikažemo nastavitve vprasanja $fullscreen = ( isset($_POST['fullscreen']) && $_POST['fullscreen'] != 'undefined') ? (int)$_POST['fullscreen'] : false; - echo '
    '."\n\r"; + echo '
    '."\n\r"; if ($id == -1) { $show = $row['show_intro']; @@ -5545,25 +6530,21 @@ class Branching { // <-- Editor teksta vprasanja --- echo '
    '; echo '
    '.$text.'
    '; - echo '
    '; echo ''; // opomba if ($opomba != '' && $this->lang_id == null) { - echo ''; - echo ''; - echo ''; - echo '
    '.$lang['note'].' ('.$lang['srv_internal'].'):'; - echo ''.$opomba.''; - echo '
    '; + + echo '
    '; + echo '*'.$lang['note'].' ('.$lang['srv_internal'].'): '.$opomba; + echo '
    '; } + echo '
    '; // --- Editor teksta vprasanja --> - - echo '
    '; - - } else { // urejanje uvoda,zakljucka + } + else { // urejanje uvoda,zakljucka // <-- Zgornja vrstica pri editiranju vprasanj --- echo '
    '; @@ -5576,9 +6557,8 @@ class Branching { // prikažemo nastavitve vprasanja $fullscreen = ( isset($_POST['fullscreen']) && $_POST['fullscreen'] != 'undefined') ? (int)$_POST['fullscreen'] : false; - echo '
    '."\n\r"; + echo '
    '."\n\r"; echo ' '; - //$this->introconcl_visible($id); echo ' '."\n\r"; echo '
    '; @@ -5601,7 +6581,6 @@ class Branching { echo '
    '; echo ''; echo '
    '; @@ -5713,16 +6692,14 @@ class Branching { // <-- Editor teksta vprasanja --- echo '
    '; echo '
    '.$text.'
    '; - echo '
    '; - echo '
    '; // --- Editor teksta vprasanja --> - echo '
    '; // Da/ne variable + echo '
    '; echo '
    '; echo '
    '; @@ -5739,6 +6716,7 @@ class Branching { echo '
    '.$lang['srv_gdpr_intro_yes'].'
    '; echo '
    '; + echo '
    '; echo '
    '; echo '
    '; @@ -5793,7 +6771,7 @@ class Branching { /** * @desc prikaze pogoje v IFu */ - function conditions_display($if, $long_alert=0, $notranji_pogoj=0) { + function conditions_display($if, $long_alert=0, $notranji_pogoj=0, $vrednost=0) { global $lang; $row_if = Cache::srv_if($if); @@ -5890,6 +6868,7 @@ class Branching { else echo $row2['variable']; } + // multigrid } elseif ($row['vre_id'] > 0) { @@ -5897,7 +6876,7 @@ class Branching { // Preverimo pogoj -1 $sqlX = sisplet_query("SELECT * FROM srv_condition_grid WHERE cond_id='$row[id]' AND grd_id='-1'"); - if (!$sql2) echo mysqli_error($GLOBALS['connect_db']); + if (!$sqlX) echo mysqli_error($GLOBALS['connect_db']); if(mysqli_num_rows($sqlX) > 0){ echo '-1'; $j++; @@ -6031,48 +7010,55 @@ class Branching { echo ' ) '; } - //echo ''; if ($row_if['label'] != '') { echo ' ('; echo ' '.$row_if['label'].' '; echo ') '; - } $condition_check = $this->condition_check($if); if ($long_alert) { - if ($c == 1 && $spr_id == 0) - if ($this->count_spr_in_if($if) > 1) { + + if ($c == 1 && $spr_id == 0){ + + if ($this->count_spr_in_if($if) > 1) { echo ''.$lang['srv_edit_condition_question'].''; - } else { + } + else { $spr = $this->find_first_in_if($if); $r = Cache::srv_spremenljivka($spr); - if (!$spr > 0) $r['variable'] = ''; - echo ''.sprintf($lang['srv_edit_condition_question1'], ''.$r['variable'].'').''; + + if (!$spr > 0) + $r['variable'] = ''; + + if(($vrednost == -4)) + echo ''.sprintf($lang['srv_edit_validation_question1'], ''.$r['variable'].'').''; + else + echo ''.sprintf($lang['srv_edit_condition_question1'], ''.$r['variable'].'').''; } - //if ($condition_check >= 1 && $condition_check <= 5 ) { - echo ''; - if ($condition_check == 1) - echo ' '.$lang['srv_error_oklepaji'].''; - if ($condition_check == 2) { - if (mysqli_num_rows($sql) > 1) // ko nardimo nov if, ne prikazemo takoj errorja - echo ' '.$lang['srv_error_spremenljivka'].''; - } elseif ($condition_check == 3) - echo ' '.$lang['srv_error_vrednost'].''; - if ($condition_check == 4) - echo ' '.$lang['srv_error_numericno'].''; - if ($condition_check == 5) - echo ' '.$lang['srv_error_calculation'].''; - if ($condition_check == 6) - echo ' '.$lang['srv_error_date'].''; - echo ''; - //} - } else { + echo ''; + if ($condition_check == 1) + echo ' '.$lang['srv_error_oklepaji'].''; + if ($condition_check == 2) { + if (mysqli_num_rows($sql) > 1) // ko nardimo nov if, ne prikazemo takoj errorja + echo ' '.$lang['srv_error_spremenljivka'].''; + } elseif ($condition_check == 3) + echo ' '.$lang['srv_error_vrednost'].''; + if ($condition_check == 4) + echo ' '.$lang['srv_error_numericno'].''; + if ($condition_check == 5) + echo ' '.$lang['srv_error_calculation'].''; + if ($condition_check == 6) + echo ' '.$lang['srv_error_date'].''; + echo ''; + } + } + else { if ($condition_check != 0) - echo ' '.$lang['srv_if_error'].''; + echo ' '.$lang['srv_if_error'].''; } @@ -6094,7 +7080,7 @@ class Branching { $rowb = Cache::srv_if($if); //začetek oklepaja za ZANKO - echo 'LOOP ('.$rowb['number'].')'; + echo 'LOOP ('.$rowb['number'].')'; $sql = sisplet_query("SELECT l.spr_id, s.variable FROM srv_loop l, srv_spremenljivka s WHERE l.if_id='$if' AND l.spr_id=s.id"); $row = mysqli_fetch_array($sql); @@ -6179,8 +7165,87 @@ class Branching { // in pa mogoce se cez spremenljivke tipa kalkulacija ? // TODO maybe - return true; - } + return true; + } + + function check_pogoji_output () { + global $lang; + + $output = ''; + + $code = $this->check_pogoji(); + + // ce je vse ok, preverimo se loope + if ($code === true) + $code = $this->check_loops(); + + // ce je vse ok, preverimo se validacije + if ($code === true) + $code = $this->check_validation(); + + // ce je vse ok, preverimo se imena variabel (vprasanj in variabel znotraj vprasanj) + if ($code === true) + $code = $this->check_variable(); + + // ce je vse ok, preverimo se vrednosti stolpcev v gridu (ce je slucajno kaksna prazna) + if ($code === true) + $code = $this->check_grid_value(); + + if ($code === true) return '1'; + + $output .= '
    '; + if ($code['type'] == 'if' || $code['type'] == 'podif') + $output .= $lang['srv_check_pogoji_not_ok']; + elseif ($code['type'] == 'loop') + $output .= $lang['srv_loop_no_nesting']; + elseif ($code['type'] == 'question_variable') + $output .= $lang['srv_duplicate_question_variable']; + elseif ($code['type'] == 'variable') + $output .= $lang['srv_duplicate_variables']; + elseif ($code['type'] == 'grid_value') + $output .= $lang['srv_empty_grid_values']; + + $output .= '
    '; + + // napaka v ifih + if ($code['type'] == 'if') { + $sql = sisplet_query("SELECT id, number FROM srv_if WHERE id = '$code[id]'"); + $row = mysqli_fetch_array($sql); + $output .= '

    '.$lang['srv_check_pogoji_if'].' '.$row['number'].'.

    '; + } + // napaka v podifih, ki so nastavljeni na vrednosti spremenljivk + elseif ($code['type'] == 'podif') { + $sql = sisplet_query("SELECT id, naslov, variable FROM srv_spremenljivka WHERE id = '$code[id]'"); + $row = mysqli_fetch_array($sql); + $output .= '

    '.$lang['srv_check_pogoji_spremenljivka'].': '.$row['variable'].' - '.strip_tags($row['naslov']).'

    '; + } + // napaka z gnezdenjem loopov + elseif ($code['type'] == 'loop') { + $sql = sisplet_query("SELECT id, number FROM srv_if WHERE id = '$code[id]'"); + $row = mysqli_fetch_array($sql); + $output .= '

    '.$lang['srv_check_pogoji_loop'].' '.$row['number'].'

    '; + } + elseif ($code['type'] == 'validation') { + $sql = sisplet_query("SELECT id, naslov, variable FROM srv_spremenljivka WHERE id = '$code[id]'"); + $row = mysqli_fetch_array($sql); + $output .= '

    '.$lang['srv_check_validacija'].': '.$row['variable'].' - '.strip_tags($row['naslov']).'

    '; + } + // napaka z imeni variabel + elseif ($code['type'] == 'variable') { + foreach ($code['vars'] AS $var) { + $output .= ''.$var.'
    '; + }; + } + // napaka z vrednostmi v gridu + elseif ($code['type'] == 'grid_value') { + foreach ($code['vars'] AS $var) { + $output .= ''.$var.'
    '; + }; + } + + + return $output; + } /** * preveri celo anketo, ce so loopi pravilno postavljeni @@ -6284,15 +7349,44 @@ class Branching { } } } - - /*if(count($spr_errors)) - return $spr_errors;*/ if(count($var_errors)) return $var_errors; return true; } + + /** + * preveri, da vrednosti gridov (multigrid vprasanja) v anketi niso prazne + * + */ + public function check_grid_value () { + + $spr_errors = array(); + $vars = array(); + + // Poiscemo gride, ki imajo prazno vrednost + $sql = sisplet_query("SELECT grid.vrstni_red, s.id AS spr_id, s.variable AS spr_variable + FROM srv_grid grid, srv_spremenljivka s, srv_grupa g + WHERE grid.spr_id=s.id AND s.gru_id=g.id AND g.ank_id='".$this->anketa."' + AND (grid.variable='' OR grid.variable='
    ') + "); + if (!$sql) echo mysqli_error($GLOBALS['connect_db']); + + while ($row = mysqli_fetch_array($sql)) { + $vars[] = $row['spr_variable'] . ' - ' . $row['vrstni_red']; + } + + if(count($vars)){ + $spr_errors['type'] = 'grid_value'; + $spr_errors['code'] = '7'; + $spr_errors['vars'] = $vars; + + return $spr_errors; + } + + return true; + } /** @@ -6563,9 +7657,7 @@ class Branching { echo '

    '.$lang['urejanje_pogoj_popup_vrednost'].'

    '; echo ''; - echo ''.$lang['urejanje_podif_alert'].''; - - echo '

    '; + echo ''.$lang['urejanje_podif_alert'].''; $sql = sisplet_query("SELECT naslov FROM srv_vrednost WHERE id='$vrednost'"); $row = mysqli_fetch_assoc($sql); @@ -6573,7 +7665,7 @@ class Branching { } // Pogoj pri npr. obvescanju elseif($vrednost == -3){ - echo '

    '.$lang['urejanje_pogoj_popup'].'

    '; + echo '

    IF - '.$lang['urejanje_pogoj_popup'].'

    '; echo ''; } // Validacija @@ -6601,26 +7693,56 @@ class Branching { // gumbi na desni v novem oknu if ($vrednost==0) { - // floating box + // floating box echo '
    '; + + echo '
    '; + + echo ''; + if ($row['tip'] == 0) - echo '

    '.$lang['oblikovanje_if'].'

    '; + echo $lang['oblikovanje_if']; elseif ($row['tip'] == 1) - echo '

    '.$lang['oblikovanje_blok'].'

    '; + echo $lang['oblikovanje_blok']; elseif ($row['tip'] == 2) - echo '

    '.$lang['srv_loop_urejanje'].'

    '; + echo $lang['srv_loop_urejanje']; - if ($row['tip'] == 0) - echo '

    '.$lang['srv_edit_condition_question'].'

    '; - elseif ($row['tip'] == 1) - echo '

    '.$lang['srv_block_desc'].'

    '; + echo '
    '; + + + echo '
    '; + + + echo '
    '.$lang['srv_common_settings'].''; + if ($row['tip'] == 0){ + echo '
    '; + echo '
    '; + echo '

    '.$lang['srv_edit_condition_question'].'

    '; + echo '
    '; + echo '
    '; + } + elseif ($row['tip'] == 1){ + echo '
    '; + echo '
    '; + echo '

    '.$lang['srv_block_desc'].'

    '; + echo '
    '; + echo '
    '; + } + if ($vrednost != -1 && $vrednost != -2) { - echo '

    '; - echo ($row['tip']==0?$lang['srv_if_label']:($row['tip']==1?$lang['srv_block_label']:$lang['srv_loop_label'])).':'; - echo ''; - echo '

    '; + + echo '
    '; + + echo '
    '; + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo '
    '; + + echo '
    '; echo ''; - } + // Dodaj blok/if v knjiznico + echo '
    '; + + echo '
    '; + echo ' '.$lang['srv_library_add_to_lib'].''; + echo '
    '; + + echo '
    '; + + echo '
    '; + + if ($row['tip'] == 0 || $row['tip'] == 1) { - echo '
    '; + echo '
    '.($row['tip'] == 1 ? $lang['srv_block_enabled'] : $lang['srv_if_enabled']).''; - echo '

    '.($row['tip'] == 1 ? $lang['srv_block_enabled'] : $lang['srv_if_enabled']).':'; + echo '

    '; - echo''; - echo ''; - if ($row['tip'] == 0) - echo ''; - echo ''; - echo ''; + echo '
    '; + echo ' '; + echo '
    '; + + if ($row['tip'] == 0){ + echo '
    '; + echo '
    '; + } - echo '

    '; + echo '
    '; + echo ' '; + echo '
    '; + + echo '
    '; echo '
    '; } @@ -6653,15 +7793,18 @@ class Branching { // Posebna nastavitev vrednosti statusa panelista ce je vklopljen modul "panel" if ($row['tip'] == 0 && SurveyInfo::getInstance()->checkSurveyModule('panel')) { - echo '
    '; - echo '

    '.$lang['srv_panel_if'].':'; + echo '

    '.$lang['srv_panel_if'].''; - $sp = new SurveyPanel($this->anketa); + $sp = new SurveyPanel($this->anketa); $panel_if = $sp->getPanelIf($if); - - echo''; - echo ''; - echo ''; + + echo '
    '; + + echo '
    '; + echo ' '; + echo '
    '; + + echo '
    '; echo ''; - echo '

    '; echo '
    '; } if ($row['tip'] == 1) { - echo '
    '; + echo '
    '.$lang['srv_block_random'].' '.Help::display('srv_block_random').''; // Blok ki prikaze nakljucno razvrscena vprasanja (in samo doloceno stevilo) - echo '

    '; - echo ' '.$lang['srv_block_random'].': '.Help::display('srv_block_random'); - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo '

    '; + echo '
    '; + + echo '
    '; + echo ' '; + echo '
    '; + + echo '
    '; + echo ' '; + echo '
    '; + + echo '
    '; + echo ' =0?' checked="checked"':'').' onClick="if_blok_random(\''.$row['id'].'\', $(this).val())" />'; + echo '
    '; + + echo '
    '; + // Stevilo vprasanj ki jih nakljucno izberemo (ce je zgornja "da") - echo '

    = 0) ? '' : ' style="display:none;"').'>'.$lang['srv_block_random_cnt'].':'; - echo ''; + echo ' '; $sqlB = sisplet_query("SELECT count(*) AS cnt_spr FROM srv_branching WHERE ank_id='".$this->anketa."' AND parent='".$row['id']."' AND element_spr>'0' ORDER BY vrstni_red"); @@ -6702,102 +7857,119 @@ class Branching { echo ' '; } } - echo ''; - + echo ' '; + echo ' '; + + echo '

    '; + + echo '
    '; + + // Blok ki vsebuje horizontalno urejena vprasanja - echo '

    '.$lang['srv_orientacija_vprasanja'].':'; - echo ''; - echo '

    '; + echo '
    '; + + echo '
    '; + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo '
    '; + + echo '
    '; + + // Blok kot zavihek - echo '

    '.$lang['srv_block_tab'].':'; - echo ''; - echo '

    '; - + echo '
    '; + + echo '
    '; + echo ' '; + echo' '; + echo ' '; + echo ' '; + echo '
    '; + + echo '
    '; + + // Opozorilo, da mora biti blok na svoji strani (ce je vklopljena katera od zgornjih nastavitev) - echo '

    =0 ? '' : ' style="display:none;"').'>'.$lang['srv_block_pbWarning'].'

    '; - + echo '
    =0 ? '' : ' style="display:none;"').'>'; + echo '
    '; + echo ' '.$lang['srv_block_pbWarning'].''; + echo '
    '; + echo '
    '; + echo ''; } + + echo '
    '; - echo ''; - - echo ''; - echo ''.($row['tip'] == 0 ? $lang['srv_if_rem_all'] : ($row['tip']==1?$lang['srv_block_rem_all']:$lang['srv_loop_rem_all']) ).''."\n\r"; - echo ''; + echo '
    '; - echo '
    '; + echo '
    '; + echo ($row['tip'] == 0 ? $lang['srv_if_rem_all'] : ($row['tip']==1?$lang['srv_block_rem_all']:$lang['srv_loop_rem_all']) ); + echo '
    '; - echo ''; - echo ''.$lang['srv_zapri'].''; - echo ''; + echo '
    '; + echo ' '; + echo ($row['tip'] == 0 ? $lang['srv_if_rem_only'] : ($row['tip']==1?$lang['srv_block_rem_only']:$lang['srv_loop_rem_only']) ); + echo '
    '; - echo ''; - echo ''.($row['tip'] == 0 ? $lang['srv_if_rem'] : ($row['tip']==1?$lang['srv_block_rem']:$lang['srv_loop_rem']) ).''."\n\r"; - echo ''; + echo '
    '; - echo '
    '; // -- div_condition_editing_float + + echo '
    '; + + echo ' '; + + echo '
    '; - } - // filter v DisplayData - elseif ($vrednost == -1) { - // tega niti ni vec... - } - // profili filtrov - elseif ($vrednost == -2) { + echo '
    '; // -- div_condition_editing_float } // klasicen popup v #div_condition_editing, uporablja se npr pri ifih za obvescanje - elseif ($vrednost == -3) { - echo ''; - echo ''.$lang['srv_potrdi'].''; - echo ''; - echo ''; - echo ''.$lang['srv_zapri'].''; - echo ''; - echo ''; - echo ''.$lang['srv_if_rem'].''."\n\r"; - echo ''; - + elseif ($vrednost == -3) { + + echo '
    '; + echo ''; + echo ''; + echo '
    '; } // validacija - elseif ($vrednost == -4) { - echo ''; - echo ''.$lang['srv_potrdi'].''; - echo ''; - echo ''; - echo ''.$lang['srv_zapri'].''; - echo ''; - echo ''; - echo ''.$lang['srv_if_rem'].''."\n\r"; - echo ''; - + elseif ($vrednost == -4) { + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + } + // analize, podatki, vabila ipd + elseif ($vrednost == -2) { } // filter na vrednosti - else { - echo ''; - echo ''.$lang['srv_potrdi'].''; - echo ''; - echo ''; - echo ''.$lang['srv_zapri'].''; - echo ''; - echo ''; - echo ''.$lang['srv_if_rem'].''."\n\r"; - echo ''; + else { + + echo '
    '; + echo ''; + echo ''; + echo ''; + echo '
    '; } - echo '
    '; + echo '
    '; ?>'; - echo '

    '.$lang['srv_calc'].'

    '; + echo '

    '.$lang['srv_calc'].'

    '; echo '
    '; echo $this->calculations_display($condition, 1); echo '
    '; echo ''; - echo '
    '; - echo '

    '.$lang['srv_editcalculation'].'

    '; - echo '
    '; + echo '
    '; $sql = sisplet_query("SELECT * FROM srv_calculation WHERE cnd_id = '$condition' ORDER BY vrstni_red"); if (mysqli_num_rows($sql) == 0) { sisplet_query("INSERT INTO srv_calculation (id, cnd_id, vrstni_red) VALUES ('', '$condition', '1')"); $sql = sisplet_query("SELECT * FROM srv_calculation WHERE cnd_id = '$condition' ORDER BY vrstni_red"); } - while ($row = mysqli_fetch_array($sql)) { + while ($row = mysqli_fetch_array($sql)) { $this->calculation_edit($row['id'], $vrednost); } - echo '

    '.$lang['srv_add_cond'].': -  + , -  - , -  * , -  /  -



    '; + echo '

    '.$lang['srv_add_cond'].': +  + , +  - , +  * , +  /  +

    '; + echo '
    '; } /** @@ -7988,53 +9183,16 @@ class Branching { $sql_count = sisplet_query("SELECT COUNT(*) AS count FROM srv_calculation WHERE cnd_id='$row[cnd_id]'"); if (!$sql_count) die(); - $row_count = mysqli_fetch_array($sql_count); - - if ($row['vrstni_red'] == 1 && $row_count['count'] > 1) { - echo ''; - echo ''; - echo ''; // gumbi oklepaji - echo ''; // logicni operatorji - echo ''; // oklepaji - echo ''; - echo ''; // gumbi zaklepaji - echo ''; // move - echo ''; - echo '
    '.$lang['srv_oklepaji'].'   '.$lang['srv_zaklepaji'].''.$lang['edit2'].'
    '; - - } elseif ($row['vrstni_red'] == 1) { - echo '
     
    '; - } - - // form - echo '
    '."\n\r"; + $row_count = mysqli_fetch_array($sql_count); - echo ''; - echo ''; + // form + echo ''."\n\r"; - // left_bracket - if ($row_count['count'] != 1 || $row['left_bracket']>0 || $row['right_bracket']>0) { - - echo ''; // operator - echo ''; + echo '
    '; + + // move + echo '
    '; + if ($row_count['count'] != 1 ) + echo ''; + echo '
    '; + + + // Srednji bel del + echo '
    '; + + // left_bracket + echo '
    '; + + if ($row_count['count'] != 1 || $row['left_bracket']>0 || $row['right_bracket']>0) { + + echo '
    '; + + echo ''; + + if ($row['left_bracket'] > 0) + echo ''; + else + echo ''; + + echo '
    '; + + echo '
    '.$lang['srv_oklepaji'].'
    '; + } + + echo '
    '; // left_bracket - echo '
    '; + echo ' ( '; + } + + echo ''; // spremenljivka - echo ''; - + echo ''; // right_bracket - echo ''; + echo ''; // right_bracket buttons + echo '
    '; + if ($row_count['count'] != 1 || $row['right_bracket']>0 || $row['left_bracket']>0) { - echo '
    '; + echo ''; - // move - echo ''; + echo ''; + + echo '
    '.$lang['srv_zaklepaji'].'
    '; + } + + echo ''; + + echo ''; + // remove - echo ''; - + echo ' '."\n\r"; + + echo ''; - echo ''; - echo '
    '; - echo ''; - - if ($row['left_bracket'] > 0) - echo ''; - else - echo ''; - } - else { - echo ''; - } - echo ''; - - if ($row['vrstni_red'] == 1) { - // nimamo nic.. - } else { + if ($row['vrstni_red'] > 1) { + echo '
    '; if ($row['operator']==0) echo ' + '; @@ -8044,22 +9202,60 @@ class Branching { echo ' * '; if ($row['operator']==3) echo ' / '; + + echo '
    '; } - echo '
    '; + echo '
    '; + for ($i=$row['left_bracket']; $i>0; $i--) { - echo ' ( '; } - echo '
    '; - if ($row['spr_id']==0) echo ''.$lang['srv_select_spr'].'!'; - echo '
    '; - echo ''."\n\r"; echo ''; echo ''; @@ -8173,8 +9369,7 @@ class Branching { // number vnos if ($row['spr_id'] == -1) { - //if ($row['number'] == 0) $row['number'] = ''; - echo ' '; + echo ' '; echo ''; - } - echo '
     '."\n\r"; - echo '
    '; + echo '
    '; + for ($i=$row['right_bracket']; $i>0; $i--) { echo ' ) '; } - echo '
    '; + + echo '
    '; + if ($row['right_bracket'] > 0) echo ''; else echo ''; - echo ''; - } else { - echo '
    '; -// echo ''; -// echo ''; - } - echo ''; - if ($row_count['count'] != 1 ) - echo ''; - echo ''; + echo '
    '; + $sql3 = sisplet_query("SELECT * FROM srv_calculation WHERE cnd_id='$row[cnd_id]'"); if (mysqli_num_rows($sql3) != 1 ) - echo ' '."\n\r"; - echo '
    '; - echo '
    '."\n\r"; + echo ''; + echo ''; } /** @@ -8268,7 +9463,7 @@ class Branching { $variable_ok = true; foreach ($variable_array AS $spr => $var) { - if ($spr != $row['id'] && $var == $variable) { + if ($var == $variable) { $variable_ok = false; } } @@ -8313,7 +9508,7 @@ class Branching { function nova_spremenljivka($grupa, $grupa_vrstni_red, $vrstni_red, $kuki = 0) { global $lang; - if ($kuki == 0) + if ($kuki == 0 && isset($_COOKIE['srv_clipboard_' . $this->anketa])) $kuki = $_COOKIE['srv_clipboard_' . $this->anketa]; $variable = $this->generate_variable(); @@ -8380,6 +9575,7 @@ class Branching { 'naslov' => "'".mysqli_real_escape_string($GLOBALS['connect_db'], $row['naslov'])."'", 'variable' => "'".mysqli_real_escape_string($GLOBALS['connect_db'], $variable)."'", 'variable_custom' => "'$variable_custom'", + 'vrstni_red' => "'$vrstni_red'", 'thread' => "'0'", 'edit_graf' => "'0'", // naknadno popravimo editiranje grafov - po kopiranju je onemogoceno ); @@ -8460,7 +9656,7 @@ class Branching { $condition = SurveyCopy::preformCopyTable('srv_condition', 'id', SurveyCopy::sql2array($qry_src_condition), $pre_set); // condtition grid, tabela srv_condition_grid - if (count($condition) > 0) { + if (is_countable($condition) && count($condition) > 0) { foreach ($condition AS $orig => $bckp) { // condtition grid, tabela srv_condition_grid $qry_src_condition_grid = sisplet_query("SELECT * FROM srv_condition_grid WHERE cond_id = '".$orig."'"); @@ -8472,7 +9668,7 @@ class Branching { } // condtition vrednost, tabela srv_condition_vre - if (count($condition) > 0) { + if (is_countable($condition) && count($condition) > 0) { foreach ($condition AS $orig => $bckp) { $qry_src_condition_vre = sisplet_query("SELECT * FROM srv_condition_vre WHERE cond_id = '$orig'"); //$src_srv_condition_vre = SurveyCopy::arrayfilter($arr_src['srv_condition_vre'], 'cond_id', $orig); @@ -8510,28 +9706,17 @@ class Branching { } + + } // nova (prazna) spremenljivka - } else { - + else { // pri glasovanju ustvarimo samo prvic novo spr. z default 2 variablami if(isset($_POST['survey_type']) && $_POST['survey_type'] == 0) $size = 2; else $size = 3; - if($type < 990) - $sql = sisplet_query("INSERT INTO srv_spremenljivka (id, gru_id, naslov, variable, size, tip, vrstni_red) VALUES ('', '$grupa', '

    $lang[srv_new_vprasanje]

    ', '$variable', '$size', '$type', '$vrstni_red')"); - //standardna vprasanja -> email, url, file upload, ime priimek - else{ - if($type == 991) //email - $sql = sisplet_query("INSERT INTO srv_spremenljivka (id, gru_id, naslov, variable, size, tip, vrstni_red) VALUES ('', '$grupa', '

    Vnesite vaš email naslov

    ', 'email', '1', '4', '$vrstni_red')"); - elseif($type == 992) //url - $sql = sisplet_query("INSERT INTO srv_spremenljivka (id, gru_id, naslov, variable, size, tip, vrstni_red) VALUES ('', '$grupa', '

    Vnesite URL

    ', 'url', '1', '4', '$vrstni_red')"); - elseif($type == 993) //file upload - $sql = sisplet_query("INSERT INTO srv_spremenljivka (id, gru_id, naslov, variable, size, tip, vrstni_red) VALUES ('', '$grupa', '

    Naložite datoteko

    ', 'upload', '1', '4', '$vrstni_red')"); - elseif($type == 994) //ime priimek - $sql = sisplet_query("INSERT INTO srv_spremenljivka (id, gru_id, naslov, variable, size, tip, vrstni_red, text_kosov, text_orientation) VALUES ('', '$grupa', '

    Vnesite ime in priimek

    ', 'name', '1', '21', '$vrstni_red', '2', '2')"); - } + $sql = sisplet_query("INSERT INTO srv_spremenljivka (id, gru_id, naslov, variable, size, vrstni_red) VALUES ('', '$grupa', '

    $lang[srv_new_vprasanje]

    ', '$variable', '$size', '$vrstni_red')"); if (!$sql) echo mysqli_error($GLOBALS['connect_db']); @@ -8539,6 +9724,7 @@ class Branching { $spremenljivka = mysqli_insert_id($GLOBALS['connect_db']); } + // vnesemo -4 tag v podatke, ki oznacuje novo spremenljivko $sql = sisplet_query("SELECT id FROM srv_user WHERE ank_id = '$this->anketa'"); $query_values = ""; @@ -8549,6 +9735,12 @@ class Branching { if (mysqli_num_rows($sql) > 0) sisplet_query("INSERT INTO srv_data_vrednost".$this->db_table." (spr_id, vre_id, usr_id) VALUES $query_values"); + + // Preverimo ce smo presegli limit za stevilo vprasanj + $check = new SurveyCheck($this->anketa); + $check->checkLimitSpremenljivke(); + + return $spremenljivka; } @@ -8559,10 +9751,12 @@ class Branching { */ function if_new ($endif, $parent, $if_id, $vrstni_red, $spremenljivka, $if, $copy=0, $no_content=0, $include_element=true) { - if ($copy > 0) - $cookie = $copy; - else - $cookie = substr($_COOKIE['srv_clipboard_'.$this->anketa], 3); + $cookie = 0; + + if ($copy > 0) + $cookie = $copy; + elseif(isset($_COOKIE['srv_clipboard_'.$this->anketa])) + $cookie = substr($_COOKIE['srv_clipboard_'.$this->anketa], 3); // Dodaten pogoj da nikoli ne vstavimo v srv_branching elementa ki ima element_spr=0 in element_if=0 (potem lahko pride do neskoncnega loopa kjer se dodajajo grupe v anketo) if ($if_id == 0) die('copy error2'); @@ -8578,9 +9772,9 @@ class Branching { // ob pastanju zbrisemo clipboard setcookie('srv_clipboard_'.$this->anketa, '', time()-3600); - - // navaden nov if (pri ENDIFu je nov if prazen, zato ne dodamo nicesar) - } else { + } + // navaden nov if (pri ENDIFu je nov if prazen, zato ne dodamo nicesar) + else { $s = sisplet_query("INSERT INTO srv_condition (id, if_id, vrstni_red) VALUES ('', '$if_id', '1')"); if (!$s) echo mysqli_error($GLOBALS['connect_db']); @@ -8706,6 +9900,9 @@ class Branching { SurveyCopy::preformCopyTable('srv_calculation', null, SurveyCopy::sql2array($sql2), $pre_set); } + + $vre_id = array(); + // zanka // srv_loop $qry_src_loop = sisplet_query("SELECT * FROM srv_loop WHERE if_id = '$if_copied'"); @@ -8806,7 +10003,7 @@ class Branching { if ($spr < 0) return $spr; - if ($this->if_copy_spremenljivke[$spr] > 0) + if (isset($this->if_copy_spremenljivke[$spr]) && $this->if_copy_spremenljivke[$spr] > 0) return $this->if_copy_spremenljivke[$spr]; $sql = sisplet_query("SELECT g.ank_id FROM srv_spremenljivka s, srv_grupa g WHERE s.id = '$spr' AND s.gru_id=g.id"); @@ -8827,7 +10024,7 @@ class Branching { if (!$sql) echo mysqli_error($GLOBALS['connect_db']); $row = mysqli_fetch_array($sql); - $spr_copy = $this->if_copy_spremenljivke[$row['spr_id']]; + $spr_copy = (isset($this->if_copy_spremenljivke[$row['spr_id']])) ? $this->if_copy_spremenljivke[$row['spr_id']] : 0; if ($spr_copy > 0) { $vrstni_red = $row['vrstni_red']; @@ -8838,7 +10035,8 @@ class Branching { return $row['id']; - } else { + } + else { $sql = sisplet_query("SELECT g.ank_id FROM srv_vrednost v, srv_spremenljivka s, srv_grupa g WHERE v.id='$vre' AND v.spr_id=s.id AND s.gru_id=g.id"); $row = mysqli_fetch_array($sql); @@ -8847,7 +10045,6 @@ class Branching { return $vre; else return 0; - } } @@ -9070,7 +10267,7 @@ class Branching { $gru_id = $this->find_grupa($gru_vr); - if ($this->spremenljivka_grupa[$row['element_spr']]['vrstni_red'] != $spr_vr OR $this->spremenljivka_grupa[$row['element_spr']]['gru_id'] != $gru_id) { + if (!isset($this->spremenljivka_grupa[$row['element_spr']]) || $this->spremenljivka_grupa[$row['element_spr']]['vrstni_red'] != $spr_vr || $this->spremenljivka_grupa[$row['element_spr']]['gru_id'] != $gru_id) { if ( $gru_id > 0 ) { sisplet_query("UPDATE srv_spremenljivka SET vrstni_red = '$spr_vr', gru_id='$gru_id' WHERE id = '$row[element_spr]'"); @@ -9189,7 +10386,8 @@ class Branching { // naslednij je na isti strani $next = $vrstni_red + 1; $sql = sisplet_query("SELECT id FROM srv_spremenljivka WHERE vrstni_red='$next' AND gru_id='$row[gru_id]'"); - if (mysqli_num_rows($sql) > 0) { + + if (mysqli_num_rows($sql) > 0) { $row = mysqli_fetch_array($sql); return $row['id']; } @@ -9197,12 +10395,17 @@ class Branching { // naslednik je na naslednji strani $sql = sisplet_query("SELECT g.vrstni_red FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND s.id='$spremenljivka'"); $row = mysqli_fetch_array($sql); + $grupa_red = $row['vrstni_red']; $next = $grupa_red + 1; - $sql = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' AND g.vrstni_red = '$next' ORDER BY s.vrstni_red ASC LIMIT 1"); - $row = mysqli_fetch_array($sql); - return $row['id']; + $sql2 = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' AND g.vrstni_red = '$next' ORDER BY s.vrstni_red ASC LIMIT 1"); + $row2 = mysqli_fetch_array($sql2); + + if(isset($row2['id'])) + return $row2['id']; + + return 0; } /** @@ -9234,12 +10437,16 @@ class Branching { $row = mysqli_fetch_array($sql); $grupa_red = $row['vrstni_red']; $prev = $grupa_red - 1; - $sql = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' AND g.vrstni_red = '$prev' ORDER BY s.vrstni_red DESC LIMIT 1"); - $row = mysqli_fetch_array($sql); - - $this->find_prev_spr[$spremenljivka] = $row['id']; - return $row['id']; - + + $sql = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' AND g.vrstni_red = '$prev' ORDER BY s.vrstni_red DESC LIMIT 1"); + if(mysqli_num_rows($sql) > 0){ + $row = mysqli_fetch_array($sql); + $this->find_prev_spr[$spremenljivka] = $row['id']; + + return $row['id']; + } + + return 0; } var $prev_srv_branching = 0; // zacasna spremenljivka @@ -9276,11 +10483,15 @@ class Branching { return $this->find_last_spr; $sql = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' ORDER BY g.vrstni_red DESC, s.vrstni_red DESC LIMIT 1"); - $row = mysqli_fetch_array($sql); + + if ( mysqli_num_rows($sql) > 0 ){ + $row = mysqli_fetch_array($sql); + $this->find_last_spr = $row['id']; - $this->find_last_spr = $row['id']; - return $row['id']; + return $row['id']; + } + return 0; } /** @@ -9290,14 +10501,34 @@ class Branching { function find_last_spr_branching ($parent = 0) { $sql = sisplet_query("SELECT element_spr, element_if FROM srv_branching WHERE ank_id='$this->anketa' AND parent='$parent' ORDER BY vrstni_red DESC LIMIT 1"); - $row = mysqli_fetch_array($sql); + + if ( mysqli_num_rows($sql) > 0 ){ + $row = mysqli_fetch_array($sql); + + if ($row['element_spr'] > 0) + return $row['element_spr']; + else + return $this->find_last_spr_branching($row['element_if']); + } - if ($row['element_spr'] > 0) return $row['element_spr']; + return 0; + } - if ( mysqli_num_rows($sql) > 0 ) - return $this->find_last_spr_branching($row['element_if']); + /** + * poisce zadnji if v tabeli srv_branching + * + */ + private function find_last_if_branching ($parent = 0) { - return 0; + $sql = sisplet_query("SELECT element_if FROM srv_branching WHERE ank_id='$this->anketa' AND parent='$parent' ORDER BY vrstni_red DESC LIMIT 1"); + + if ( mysqli_num_rows($sql) > 0 ){ + $row = mysqli_fetch_array($sql); + + return $row['element_if']; + } + + return 0; } /** @@ -9309,9 +10540,14 @@ class Branching { function getGrupa4Spremenljivka($spremenljivka) { $sql = sisplet_query("SELECT g.* FROM srv_grupa AS g WHERE g.id = (SELECT s.gru_id FROM srv_spremenljivka as s WHERE s.id = '$spremenljivka')"); - $row = mysqli_fetch_assoc($sql); - return $row; + if ( mysqli_num_rows($sql) > 0 ){ + $row = mysqli_fetch_assoc($sql); + + return $row; + } + + return 0; } /** @@ -9322,28 +10558,47 @@ class Branching { */ function getGrupa4If($if_id) { - $sqlBr = sisplet_query("SELECT vrstni_red FROM srv_branching WHERE ank_id='$this->anketa' AND element_if='$if_id'"); - $rowBr = mysqli_fetch_assoc($sqlBr); - $vrstni_red_if = $rowBr['vrstni_red']; + $row = array(); - if($vrstni_red_if == 1){ - $sql = sisplet_query("SELECT * FROM srv_grupa WHERE ank_id='$this->anketa' AND vrstni_red='1'"); - $row = mysqli_fetch_assoc($sql); + // Najprej preverimo, ce imamo v ifu kaksno vprasanje - potem je 1. vprasanje na isti strani + $spr_in_if = $this->get_subspr($if_id); + if(count($spr_in_if) > 0){ + $row = $this->getGrupa4Spremenljivka($spr_in_if[0]); + return $row; } - else{ - $sqlB = sisplet_query("SELECT element_spr, pagebreak FROM srv_branching WHERE ank_id='$this->anketa' AND vrstni_red<'$vrstni_red_if' AND element_spr>'0' ORDER BY vrstni_red DESC"); - $rowB = mysqli_fetch_assoc($sqlB); - if($rowB['pagebreak'] == 0){ - $row = $this->getGrupa4Spremenljivka($rowB['element_spr']); + // If nima znotraj se nobenega vprasanja - moramo poiskati prejsnje vprasanje in ugotoviti stran - NI SE CISTO OK - JE TREBA DODELATI + $sqlBr2 = sisplet_query("SELECT vrstni_red, parent FROM srv_branching WHERE ank_id='$this->anketa' AND element_if='$if_id'"); + if(mysqli_num_rows($sqlBr2) > 0){ + + $rowBr2 = mysqli_fetch_assoc($sqlBr2); + + $vrstni_red_if = isset($rowBr2['vrstni_red']) ? $rowBr2['vrstni_red'] : null; + $parent_if = isset($rowBr2['parent']) ? $rowBr2['parent'] : null; + + if($vrstni_red_if == 1){ + $sql = sisplet_query("SELECT * FROM srv_grupa WHERE ank_id='$this->anketa' AND vrstni_red='1'"); + $row = mysqli_fetch_assoc($sql); } else{ - $prev_grupa = $this->getGrupa4Spremenljivka($rowB['element_spr']); - $row['id'] = $this->find_grupa($prev_grupa['vrstni_red']+1); - $row['vrstni_red'] = $prev_grupa['vrstni_red']+1; + $sqlB = sisplet_query("SELECT element_spr, pagebreak + FROM srv_branching + WHERE ank_id='".$this->anketa."' AND vrstni_red<'".$vrstni_red_if."' AND parent='".$parent_if."' AND element_spr>'0' + ORDER BY vrstni_red DESC + "); + $rowB = mysqli_fetch_assoc($sqlB); + + if(isset($rowB['pagebreak']) && $rowB['pagebreak'] == 0 && $rowB['element_spr']){ + $row = $this->getGrupa4Spremenljivka($rowB['element_spr']); + } + else{ + $prev_grupa = $this->getGrupa4Spremenljivka($rowB['element_spr']); + $row['id'] = $this->find_grupa($prev_grupa['vrstni_red']+1); + $row['vrstni_red'] = $prev_grupa['vrstni_red']+1; + } } } - + return $row; } @@ -9357,11 +10612,12 @@ class Branching { return $this->find_first_spr; $sql = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' ORDER BY g.vrstni_red ASC, s.vrstni_red ASC LIMIT 1"); - $row = mysqli_fetch_array($sql); - - $this->find_first_spr = $row['id']; - return $row['id']; + if(mysqli_num_rows($sql) > 0){ + $row = mysqli_fetch_array($sql); + $this->find_first_spr = $row['id']; + } + return $this->find_first_spr; } /** @@ -9415,24 +10671,17 @@ class Branching { * poisce naslednji element (spremenljivko, if, blok) in vrne njegov row (parent, vrstni_red, element_spr, element_if) * v primeru ENDIFA, vrne prazno * - * @param mixed $spr - * @param mixed $if */ - var $find_next_element = array(); function find_next_element($parent, $vrstni_red) { - if (isset($this->find_next_element[$spr][$if])) - return $this->find_next_element[$spr][$if]; - $sql = sisplet_query("SELECT parent, vrstni_red, element_spr, element_if FROM srv_branching WHERE parent='$parent' AND vrstni_red>'$vrstni_red' AND ank_id='$this->anketa' ORDER BY vrstni_red ASC LIMIT 1"); if (mysqli_num_rows($sql) > 0) { $row = mysqli_fetch_array($sql); - $this->find_next_element[$spr][$if] = $row; - } else { - $this->find_next_element[$spr][$if] = null; - } - return $this->find_next_element[$spr][$if]; + return $row; + } + + return null; } /** @@ -9604,8 +10853,11 @@ class Branching { $vrstni_red = 1; $this->vrstni_red_branching_fun(0, $vrstni_red); } - - return $this->vrstni_red_branching[$if][$spremenljivka]; + + if(isset($this->vrstni_red_branching[$if][$spremenljivka])) + return $this->vrstni_red_branching[$if][$spremenljivka]; + else + return null; } /** @@ -9652,7 +10904,7 @@ class Branching { $vrstni_red = 1; - $sql = sisplet_query("SELECT element_spr, element_if FROM srv_branching WHERE parent='$parent' AND ank_id='$this->anketa' ORDER BY vrstni_red ASC"); + $sql = sisplet_query("SELECT element_spr, element_if, vrstni_red FROM srv_branching WHERE parent='$parent' AND ank_id='$this->anketa' ORDER BY vrstni_red ASC"); if (!$sql) echo mysqli_error($GLOBALS['connect_db']); while ($row = mysqli_fetch_array($sql)) { @@ -9798,33 +11050,36 @@ class Branching { // Vprasalnik se shranjuje avt. echo '
    '; - echo ''; - echo '
    '.$lang['srv_vprasalnik_autosave'].'
    '; + echo ' '; + echo ' '.$lang['srv_vprasalnik_autosave'].''; echo '
    '; echo ''; + echo ''; - echo '
    '; - echo '
    '; + echo '
    '; echo '' . $lang['srv_admin_q_comments'] . ''.$lang['srv_admin_q_comments_txt'].''; - echo ''; - echo ''; echo ''; echo ''; echo ''; @@ -1011,30 +1318,55 @@ class SurveyAdminSettings { echo ''; echo ''; echo ''; - echo '
    '; - echo ''; - echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; - echo ' '; - echo $lang['srv_comments_viewauthor']; - echo ''; + echo ''; + echo ''; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo ''; + echo '
    '; - echo '
    '; - - echo '
    '; - echo '' . $lang['srv_comments_respondents'] . ''.$lang['srv_comments_respondents_txt'].''; - - echo ''; - echo ' '; - echo ' '; - echo '
    '; - echo ''; - echo ''; + echo ' '; + echo ''; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + + echo ''; + + echo '
    '; + echo '' . $lang['srv_comments_view'] . ':'; + + echo '
    '; + echo ''; - echo '
    '; - echo ''; - echo ' '; - echo ' '; - echo '
    '; - echo ''; - echo ''; - echo ''; - echo '
    '; - echo '
    '; - - echo '
    '; - echo '' . $lang['srv_comments_respondents'] . ' - '.$lang['srv_extra_settings'].''; - echo ''; - echo ' '; - echo ' '; - echo '
    '; - echo ''; - echo ' '; - echo ' '; - echo ' '; - /*echo '
    '; - echo '
    '; - echo ''; - echo ' ' . strlen($srv_qct) . '/250' . "\n\r";*/ - echo '
    '; - echo '
    '; - - echo '
    '.$lang['srv_comments_respondents'].''.$lang['srv_resp_s_comments_txt'].''; + echo ''; + + echo ''; + + + echo '
    '; + echo '' . $lang['srv_comments_show_open'] . ':'; + + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + + echo '
    '; - echo ''; - echo ''; + echo '';echo ''; + + echo ''; + + echo '

    '.$lang['srv_resp_s_comments_txt'].'

    '; + + echo '
    '; + echo '' . $lang['srv_comments_write'] . ':'; + + echo '
    '; + echo ''; - echo '
    '; - echo ''; - echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ' '; - echo $lang['srv_comments_viewauthor']; - echo ''; - /*echo '
    '; - echo ''; - echo ' '; - echo ' '; - */ - echo '
    '; - echo '
    '; - - echo '
    '; - echo '' . $lang['srv_settings_komentarji'] . ''; - echo ''; - echo ' '; - echo ' '; - echo '
    '; - echo ''; - echo ' '; - echo ' '; - echo '
    '; - echo ''; - echo ' '; - echo ' '; - echo '
    '; - echo ''; - echo ' '; - echo ' '; - echo '
    '; - echo ''; - echo ''; + echo ''; + echo ''; + + echo ''; + + echo '

    '.$lang['srv_extra_settings'].'

    '; + + echo '
    '; + echo '' . $lang['srv_q_inicialke'] . ':'; + + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo '' . $lang['srv_q_inicialke_alert'] . ':'; + + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + + echo '
    '; + + echo '
    '; + + echo '
    '; + echo '' . $lang['srv_settings_komentarji'] . ''; + + echo '
    '; + echo '' . $lang['orderby'] . ':'; + + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo '' . $lang['srv_add_comment'] . ':'; + + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo '' . $lang['srv_comments_marks'] . ':'; + + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo '' . $lang['srv_comments_marks_who'] . ':'; + + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo '' . $lang['srv_comment_history'] . ':'; + + echo '
    '; + echo ''; - echo '
    '; + echo '
    '; + + echo '
    '; + echo '
    '; - echo '
    '; - echo '
    ' . $lang['srv_delete_comments'] . ''; - echo '

    '.$lang['srv_delete_comments3'].' ('.$lang['srv_delete_comments_txt2'].')

    '; - echo '
    '; + echo '

    '.$lang['srv_delete_comments3'].' ('.$lang['srv_delete_comments_txt2'].')

    '; echo ''; - echo '
    '; } } /*Dostop*/ if ($_GET['a'] == 'dostop') { - + // tukaj bom dodal še kontrolo na Avtorja ankete, tako da avtor lahko vedno spreminja dostop (gorazd,1.9.2009) $stringDostopAvtor = "SELECT count(*) as isAvtor FROM srv_dostop WHERE ank_id = '" . $this->anketa . "' AND (uid='" . $global_user_id . "' OR uid IN (SELECT user FROM srv_dostop_manage WHERE manager='$global_user_id' ))"; $sqlDostopAvtor = sisplet_query($stringDostopAvtor); @@ -1148,60 +1566,32 @@ class SurveyAdminSettings { if ($admin_type <= $row['dostop'] || $rowDostopAvtor['isAvtor'] > 0) { - echo '
    ' . $lang['srv_dostop_users'] . '' . Help :: display('srv_dostop_users'). ''."\n"; + echo '
    ' . $lang['srv_dostop_users'] . '' . Help :: display('srv_dostop_users'). ''; + + //Dodajanje dostopa - prikaži vse za admine - potrebuje prenovo + /**if($admin_type == 0 || $admin_type == 1){ + echo ''; + }**/ - echo ''.$lang['srv_dostop_show_all'].''; - echo ''.$lang['srv_dostop_hide_all'].''; - echo '
    '; $this->display_dostop_users(0); echo '
    '; + + echo '
    '; + echo ''; + echo '
    '; echo '
    '; - echo '
    '; // Dodajanje uproabnikov preko e-maila echo '
    '.$lang['srv_dostop_addusers'].''; echo '
    '; - - - // Dodajanje dostopa - global $app_settings; - global $aai_instalacija; - - echo '

    '; - - // Admini in managerji lahko dodajo dostop komurkoli - if($admin_type == 0 || $admin_type == 1){ - echo $lang['srv_dostop_adduserstxt_admin'].' '.$app_settings['app_name'].'. '; - } - // Ostali uporabniki lahko dodajo dostop samo ze registriranim uporabnikom - else{ - echo $lang['srv_dostop_adduserstxt'].' '.$app_settings['app_name'].'! '; - } - - // AAI ima poseben link na help - if(isset($aai_instalacija) && $aai_instalacija == true){ - echo $lang['srv_dostop_adduserstxt_aai_more']; - } - - echo '

    '; - - - echo ''; - - echo '

    '; - echo $lang['srv_dostop_adduserstxt_email'].'
    '; - echo ''; - echo '

    '; - - echo '

    '; - echo $lang['srv_dostop_adduserstxt_note'].'
    '; - echo ''; - echo '

    '; - - echo '

    '.$lang['srv_dostop_adduserstxt_end'].'

    '; + + $this->display_add_survey_dostop(); echo '
    '; echo '
    '; @@ -1229,10 +1619,11 @@ class SurveyAdminSettings { include($file); - echo '
    '.$lang['srv_extra_translations'].' '; + echo '
    '.$lang['srv_extra_translations'].' '; + $lang_id = ''; if ($row['multilang'] == 1) { - echo ' '; $lang_id = (int)$_GET['lang_id']; if ($lang_id > 0) @@ -1253,36 +1644,27 @@ class SurveyAdminSettings { echo ''; - if ($row['multilang'] == 1 && $lang_id > 0) { - //echo '

    '.SurveyInfo::getSurveyLink().'?language='.$lang_id.'

    '; - } - echo '

    '.$lang['srv_info_language'].'

    '; echo '
    '; echo ''; // da vemo, da nastavljamo ta besedila + + // Tabela standardnih besed + echo ''; + echo ''; - echo '

     '.($lang_id>0?$lang['srv_multilang']:$lang['srv_language_respons_1']).':'; - + echo '

    '; + echo ''; + + // nazaj na administrativni jezik $file = '../../lang/'.$lang_admin.'.php'; include($file); - - echo '

    '; - - echo ''.($lang_id>0?$lang['srv_language_respons_1'].': '.$resp_lang['language']:$lang['srv_language_admin'].': '.$lang['language']).''; - echo ''.$lang['srv_std_second'].''; - echo ''; - echo ''.$lang['srv_std_translation'].' '; - - echo '


    '; - - echo '

    '; + echo '

    '; + echo ''; // jezik nastavimo na nastavitev za respondente, ker ta text dejansko nastavljamo $file = '../../lang/'.$lang_resp.'.php'; @@ -1334,33 +1716,43 @@ class SurveyAdminSettings { $this->extra_translation('srv_survey_non_active_notStarted', 1); $this->extra_translation('srv_survey_non_active_expired', 1); $this->extra_translation('srv_survey_non_active_voteLimit', 1); - - - echo '

    '; - + // nastavimo jezik nazaj $file = '../../lang/'.$lang_admin.'.php'; include($file); - + + echo '
    '.($lang_id > 0 ? $lang['srv_language_respons_1'].': '.$resp_lang['language']:$lang['srv_language_admin'].': '.$lang['language']).''.$lang['srv_std_second'].': '; $file = '../../lang/'.$lang_resp.'.php'; include($file); - echo ' '.$lang['language'].'

    '; - - // nazaj na administrativnega + echo $lang['language'].'
    '.$lang['srv_std_translation'].'
    '; + echo '
    '; - - echo '
    '; - - echo '
    '; - + // Gumb za ponastavitev prevoda v bazi pobriše že nastavljene prevode za izbran jezik + echo '
    '; + echo ' '; + echo '
    '; - echo ''; + // Ta del se v 2. fazi zamenja z gumbom "Večjezične ankete" + echo '
    '; - // Gumb za ponastavitev prevoda v bazi pobriše že nastavljene prevode za izbran jezik - echo ''; + echo '

    '.$lang['srv_language_link2'].':'; + // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik + $userAccess = UserAccess::getInstance($global_user_id); + if($userAccess->checkUserAccess($what='prevajanje')){ + echo ' '.$lang['srv_language_link'].'

    '; + } + else{ + echo ' '.$lang['srv_language_link'].'

    '; + } + echo '

    '.$lang['srv_language_mySurveys'].'.

    '; + + echo '
    '; + echo '
    '; - echo ''.$lang['lang'].''; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + } /*Forma*/ if ($_GET['a'] == 'forma') { @@ -1369,40 +1761,125 @@ class SurveyAdminSettings { /*Nastavitve prikaza za mobilnike*/ if ($_GET['a'] == 'mobile_settings') { - SurveySetting::getInstance()->Init($this->anketa); - - echo '
    '; + SurveySetting::getInstance()->Init($this->anketa); + echo '
    '; - echo ''.$lang['srv_mobile_settings_title'].''; + echo ''.$lang['srv_mobile_settings_title'].Help::display('srv_mobilne_tabele').''; // Prikaz slik pri mobilnikih (default da) $mobile_friendly = SurveySetting::getInstance()->getSurveyMiscSetting('mobile_friendly'); - echo ''.$lang['srv_settings_mobile_friendly'].':'; - echo ' '; - echo ' '; + echo '
    '; + + echo ''; + echo ''; + echo ' '; + + echo '
    '; - $display = ($mobile_friendly == 1) ? '' : ' display: none;'; - echo '
    '; + $display = ($mobile_friendly == 1) ? '' : 'displayNone'; + + echo '
    '; // Prikaz slik pri mobilnikih (default da) $hide_mobile_img = SurveySetting::getInstance()->getSurveyMiscSetting('hide_mobile_img'); - echo ''.$lang['srv_settings_mobile_img'].':'; - echo ' '; - echo ' '; + echo '
    '; + + echo ''; + echo ''; + echo ' '; + + echo '
    '; + + // Prilagoditev tabel pri mobilnikih + /*$mobile_tables = SurveySetting::getInstance()->getSurveyMiscSetting('mobile_tables'); + echo '
    '; + + echo ''.$lang['srv_settings_mobile_tables'].':'; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + + echo '
    ';*/ + + echo '
    '; + + echo '
    '; + } + + /*Nastavitve prikaza za tabele*/ + if ($_GET['a'] == 'table_settings') { + + SurveySetting::getInstance()->Init($this->anketa); + + echo '
    '; - echo ''; + echo ''.$lang['srv_table_settings_title'].''; + + + // Prilagoditev tabel na pc-ju + $pc_tables = SurveySetting::getInstance()->getSurveyMiscSetting('pc_tables'); + + echo '
    '; + + echo ''.$lang['srv_table_settings_pc_tables'].':'; + + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + + // Prilagoditev tabel pri mobilnikih $mobile_tables = SurveySetting::getInstance()->getSurveyMiscSetting('mobile_tables'); - echo ''.$lang['srv_settings_mobile_tables'].':'; - echo ' '; - echo ' '; - echo ' '; - + + echo '
    '; + + echo ''.$lang['srv_table_settings_mobile_tables'].':'; + + echo '
    '; + echo ''; + echo ' '; echo '
    '; - - + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + + echo '
    '; + + echo '
    '; } @@ -1416,60 +1893,78 @@ class SurveyAdminSettings { $referal = SurveySetting::getInstance()->getSurveyMiscSetting('survey_referal'); $date = SurveySetting::getInstance()->getSurveyMiscSetting('survey_date'); + $ip = $ip == '' ? 0 : $ip; + $ip_show = $ip_show == '' ? 0 : $ip_show; + $browser = $browser == '' ? 0 : $browser; + $referal = $referal == '' ? 0 : $referal; + $date = $date == '' ? 0 : $date; + - echo '
    '; + echo '
    '; echo ''.$lang['srv_sledenje'].''; // Preverimo ce je vklopljen modul za volitve - potem ne pustimo nobenih preklopov $voting_disabled = ''; - $voting_disabled_class = ''; if(SurveyInfo::getInstance()->checkSurveyModule('voting')){ $voting_disabled = ' disabled'; - $voting_disabled_class = ' class="gray"'; - echo '

    '.$lang['srv_voting_warning_paradata'].'

    '; + echo '

    '.$lang['srv_voting_warning_paradata'].'


    '; } - echo '

    '.$lang['srv_metadata_desc'].'

    '; - - echo ''; - echo ' '; - echo '
    '; - - echo ''; - echo ' '; - echo '
    '; + echo '
    '; + echo '

    '.$lang['srv_metadata_desc'].'

    '; + echo '
    '; - echo ''; - echo ' '; - echo '
    '; - + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; - - echo '
    '; - - echo '
    '; echo ''.$lang['srv_sledenje_ip_title'].''; - - echo ''; - echo ' '; - echo ' '; - - if($ip == 0 && $ip_show != 1) - echo '
    '.$lang['srv_sledenje_ip_alert'].'
    '; - - echo '
    '; - - if($ip == 0 && ($admin_type == 0 || $admin_type == 1)){ - echo ''; - echo ' '; - echo ' '; - - if($ip_show == 1) - echo '
    '.$lang['srv_show_ip_alert'].'
    '; + + //Shranjuj IP naslov respondenta + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; + + echo '
    '; + echo '

    '.$lang['srv_sledenje_ip_alert'].'


    '; + echo '
    '; + + //Poveži IP v bazi s podatki + if ($admin_type == 0 || $admin_type == 1){ + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; + + echo '
    '; + echo '

    '.$lang['srv_show_ip_alert'].'

    '; + echo '
    '; + + echo '
    '; } echo '
    '; @@ -1477,16 +1972,26 @@ class SurveyAdminSettings { // Povezovanje identifikatorjev s podatki - samo za admine in ce so vklopljena email vabila if ($admin_type == 0 && SurveyInfo::getInstance()->checkSurveyModule('email')) { - echo '
    '; - echo '
    '; + echo '
    '; echo ''.$lang['srv_sledenje_identifikatorji_title'].' '.Help::display('srv_email_with_data').''; + + echo '
    '; + echo ''.$lang['srv_sledenje_identifikatorji'].':'; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; - echo ''; - echo ' '; - echo ' '; + echo '
    '; - if($row['show_email'] == 1) - echo '
    '.$lang['srv_show_mail_with_data3'].'
    '; + echo '
    '; + echo '

    '.$lang['srv_show_mail_with_data3'].'.

    '; + echo '
    '; echo '
    '; } @@ -1498,117 +2003,112 @@ class SurveyAdminSettings { SurveySetting::getInstance()->Init($this->anketa); // Nastavitve za izpis vprasalnika - echo '
    '; + echo '
    '; echo ''.$lang['srv_export_survey_settings'].''; // Številčenje vprašanj (default da) $export_numbering = SurveySetting::getInstance()->getSurveyMiscSetting('export_numbering'); - echo ''.$lang['srv_nastavitveStevilcenje'].':'; - echo ' '; - echo ' '; - - echo '
    '; - + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; + // Prikaz pogojev (default da) $export_show_if = SurveySetting::getInstance()->getSurveyMiscSetting('export_show_if'); - echo ''.$lang['srv_export_if'].':'; - echo ' '; - echo ' '; - - echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; // Prikazi uvoda (default ne) $export_show_intro = SurveySetting::getInstance()->getSurveyMiscSetting('export_show_intro'); - echo ''.$lang['srv_export_intro'].':'; - echo ' '; - echo ' '; - + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; - echo '
    '; - - // Nastavitve za izpis odgovorov respondentov - echo '
    '; + echo '
    '; echo ''.$lang['srv_export_results_settings'].''; - -/* // Tip izvoza (0->navaden-default, 1->dolg, 2->kratek) - $export_data_type = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_type'); - echo ''.$lang['srv_displaydata_type'].':'; - echo ''; - echo Help :: display('displaydata_pdftype'); */ - // Tip izvoza (1->dolg oz. razsirjen, 2->kratek oz. skrcen) - $export_data_type = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_type'); - echo ''.$lang['srv_displaydata_type'].':'; - echo ''; - echo Help :: display('displaydata_pdftype'); - - echo '
    '; - + // Številčenje vprašanj (default da) $export_data_numbering = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_numbering'); - echo ''.$lang['srv_nastavitveStevilcenje'].':'; - echo ' '; - echo ' '; - - echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; + // Prikaz recnuma (default da) $export_data_show_recnum = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_show_recnum'); - echo ''.$lang['srv_export_show_recnum'].':'; - echo ' '; - echo ' '; - - echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; + // Prikaz pogojev (default da) $export_data_show_if = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_show_if'); - echo ''.$lang['srv_export_if'].':'; - echo ' '; - echo ' '; - - echo '

    '; + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; + // Page break med posameznimi respondenti (default ne) $export_data_PB = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_PB'); - echo ''.$lang['srv_export_pagebreak'].':'; - echo ' '; - echo ' '; - - echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; + // Izpusti vprasanja brez odgovora (default ne) $export_data_skip_empty = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_skip_empty'); - echo ''.$lang['srv_export_skip_empty'].':'; - echo ' '; - echo ' '; - - echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; + // Izpusti podvprasanja brez odgovora (default ne) $export_data_skip_empty_sub = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_skip_empty_sub'); - echo ''.$lang['srv_export_skip_empty_sub'].':'; - echo ' '; - echo ' '; - - echo '
    '; - - // Landscape postavitev izvoza (default ne) -/* $export_data_landscape = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_landscape'); - echo ''.$lang['srv_export_landscape'].':'; - echo ' '; - echo ' '; */ - + echo '
    '; + echo ''; + echo ''; + echo ' '; + echo '
    '; + + // Tip izvoza (1->dolg oz. razsirjen, 2->kratek oz. skrcen) + echo '
    '; + $export_data_type = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_type'); + echo ''; + + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; + echo ' '; + echo '
    '; + + echo '
    '; + echo '
    '; } @@ -1620,18 +2120,17 @@ class SurveyAdminSettings { } - if ($_GET['a'] != 'jezik' && $_GET['a'] != 'trajanje' && $_GET['a'] != A_GDPR) { - //echo '

    '.$lang['srv_prestevilci'].'

    '; - echo '
    '; - echo ''; - echo '
    '; + if ($_GET['a'] != 'jezik' && $_GET['a'] != 'trajanje' && $_GET['a'] != A_GDPR && $_GET['a'] != 'dostop') { + + echo '
    '; + echo ''; + echo ''; + echo '
    '; } - if ($_GET['s'] == '1') { + if (isset($_GET['s']) && $_GET['s'] == '1') { echo '
    '; - echo ''; + echo ''; } echo ''; @@ -1683,7 +2182,7 @@ class SurveyAdminSettings { echo '

    '; echo '

    '; # replyTo - echo '

    '; + echo '

    '; echo '

    '; echo ''; @@ -1694,7 +2193,7 @@ class SurveyAdminSettings { echo '

    '; echo '

    '; # replyTo - echo '

    '; + echo '

    '; echo '

    '; #Password echo '

    '; @@ -1711,7 +2210,7 @@ class SurveyAdminSettings { echo '

    '; echo '

    '; # replyTo - echo '

    '; + echo '

    '; echo '

    '; #Username echo '

    '; @@ -1749,7 +2248,6 @@ class SurveyAdminSettings { echo ''; echo '

    '; - echo '
    '; echo ''; echo ''; } - echo '
    '; - - if ($_GET['s'] == '1') { + if (isset($_GET['s']) && $_GET['s'] == '1') { echo '
    '; - echo ''; + echo ''; } - - } /** @@ -1782,7 +2276,7 @@ class SurveyAdminSettings { global $admin_lang; global $resp_lang; - $lang_id = (int)$_GET['lang_id']; + $lang_id = isset($_GET['lang_id']) ? (int)$_GET['lang_id'] : ''; if ($lang_id > 0) $lang_id = '_'.$lang_id; else @@ -1799,28 +2293,57 @@ class SurveyAdminSettings { if($text == 'srv_nextpage_uvod') $next_uvod = $lang_id == '' ? $admin_lang['srv_nextpage_uvod_desc'] : $resp_lang['srv_nextpage_uvod_desc']; - echo '
    '.($lang_id==''?$admin_lang[$text]:$resp_lang[$text]).' '.($text == 'srv_nextpage_uvod' ? '('.$next_uvod.')' : '').' '; - echo ''.$lang[$text].' '; - echo '
    '.$value.'
    '; - + echo ''; + echo ''.($lang_id==''?$admin_lang[$text]:$resp_lang[$text]).' '.($text == 'srv_nextpage_uvod' ? ' ('.$next_uvod.')' : '').' '; + echo ''.$lang[$text].''; + echo '
    '.$value.'
    '; + if($editor == 1) - echo ''; - + echo ''; + echo ''; + echo '
    '; - echo '
    '; + echo ''; } function anketa_nice_links () { + global $lang; echo '
    '; + + echo '
    '.$lang['srv_nice_url'].''; $sql = sisplet_query("SELECT l.link, a.id, a.naslov FROM srv_nice_links l, srv_anketa a WHERE a.id=l.ank_id ORDER BY l.link ASC"); - while ($row = mysqli_fetch_array($sql)) { - echo '

    '.$row['link'].' '.$row['naslov'].'

    '; + $table_exists = 0; + while ($row = mysqli_fetch_array($sql)) { + if ($table_exists == 0) { + echo '

    '.$lang['srv_nice_url_note'].'

    '; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + $table_exists = 1; + } + + echo ''; + echo ''; + echo ''; + echo ''; + } + + if ($table_exists == 1){ + echo '
    '.$lang['srv_nice_url_extension'].''.$lang['srv_nice_url_surveyname'].'
    '.$row['link'].''.$row['naslov'].'
    '; + echo '
    '; + echo '
    '; } - + + echo '
    '; echo '
    '; } @@ -1851,14 +2374,44 @@ class SurveyAdminSettings { global $lang; echo '
    '; + + echo '
    '.$lang['srv_anketa_deleted'].''; $sql = sisplet_query("SELECT srv_anketa.id, srv_anketa.naslov, users.email FROM srv_anketa, users WHERE users.id=srv_anketa.insert_uid AND active='-1' ORDER BY edit_time DESC"); if (!$sql) echo mysqli_error($GLOBALS['connect_db']); - - while ($row = mysqli_fetch_array($sql)) { - echo '

    '.$row['naslov'].' ('.$row['email'].') '.$lang['srv_restore'].'

    '; + + + $table_exists = 0; + while ($row = mysqli_fetch_array($sql)) { + if ($table_exists == 0) { + echo '

    '.$lang['srv_anketa_deleted_note'].'

    '; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + $table_exists = 1; + } + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } + + if ($table_exists == 1){ + echo '
    '.$lang['srv_data_deleted_surveyname'].''.$lang['srv_data_deleted_user'].'
    '.$row['naslov'].''.$row['email'].'
    '; + echo '
    '; + echo '
    '; } + + echo '
    '; echo '
    '; } @@ -1870,14 +2423,39 @@ class SurveyAdminSettings { global $lang; echo '
    '; - + + echo '
    '.$lang['srv_data_deleted'].''; + $sql = sisplet_query("SELECT a.id, a.naslov, users.email, COUNT(u.id) AS deleted FROM srv_anketa a, srv_user u, users WHERE u.deleted='1' AND u.ank_id=a.id AND users.id=a.insert_uid GROUP BY a.id ORDER BY edit_time DESC"); if (!$sql) echo mysqli_error($GLOBALS['connect_db']); - while ($row = mysqli_fetch_array($sql)) { - echo '

    '.$row['naslov'].' ('.$row['email'].') '.$lang['srv_restore'].' ('.$row['deleted'].')

    '; + $table_exists = 0; + while ($row = mysqli_fetch_array($sql)) { + if ($table_exists == 0) { + echo '

    '.$lang['srv_data_deleted_note'].'

    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + $table_exists = 1; + } + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; } + + if ($table_exists == 1) + echo '
    '.$lang['srv_data_deleted_surveyname'].''.$lang['srv_data_deleted_user'].''.$lang['srv_data_deleted'].'
    '.$row['naslov'].''.$row['email'].''.$row['deleted'].'
    '; + echo '
    '; echo '
    '; } @@ -1889,455 +2467,303 @@ class SurveyAdminSettings { function anketa_vabila() { global $lang; - if ($_GET['m'] == '' || $_GET['m'] == 'settings') { + if ($_GET['a'] == A_VABILA) { $this->anketa_vabila_nastavitve(); - } elseif ($_GET['m'] == 'url') { - $this->anketa_vabila_url(); + } + elseif ($_GET['a'] == A_OTHER_INV) { + $this->anketa_vabila_drugo(); } } function anketa_vabila_nastavitve() { global $lang, $site_url, $global_user_id; - $row = SurveyInfo::getInstance()->getSurveyRow(); - $d = new Dostop(); - - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - - echo ''; - - # če ni aktivna damo opozorilo - echo ''; - - # Povezave, lepi linki... - echo ''; - /* # Opozorilo o napakah - echo '';*/ - - echo ''; - - echo ''; - - echo ''; - - echo ''; - - echo ''; - - echo '
    '; - + # Opozorilo o napakah - $sd = new SurveyDiagnostics($this->anketa); - $sd->doDiagnostics(); - $diagnostic = $sd->getDiagnostic(); - if (is_array($diagnostic) && count($diagnostic) > 0) - echo '
    '.$lang['srv_publication_survey_warnings'].' >>
    '; + $this->survey_errors(); + + # Opozorilo - anketa ni aktivna + $this->activation_error(); + + // Delite povezavo do ankete + echo '
    '.$lang['srv_publication_survey_links'].'
    '; + + //echo '

    '.$lang['srv_publication_survey_links_note'].'

    '; - // Aktivacija ankete - echo ''; - $this->anketa_aktivacija_note(); - echo''; - - echo '
    '; - # Linki, lepi linki - $this->niceUrlSettings(); + //Lep URL - dodajanje + // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik + $userAccess = UserAccess::getInstance($global_user_id); + if(!$userAccess->checkUserAccess($what='nice_url')){ - echo '
    '; + echo '
    '; + + echo '
    '; + echo '
    '; + echo ' '; + echo ' '.SurveyInfo::getRawSurveyLink().''; + echo '
    '; + echo ' '; + echo '
    '; + + /* echo ' '; */ + echo ' '; + + echo '
    '; + } + else{ + + echo '
    '; + + echo '
    '; + echo '
    '; + echo ' '; + echo ' '.SurveyInfo::getRawSurveyLink().''; + echo '
    '; + echo ' '; + echo '
    '; + + // Gumb za dodajanje lepega linka + echo ' '; + + echo '
    '; + + + if (isset($_GET['error'])) { + + $error = $_GET['error']; + + /* ?>'; + + // Prekratek lep url + if(strlen($error) <= 2) + echo '

    '.$error.' '.$lang['srv_nice_url_short'].'

    '; + // Predolg lep url + elseif(strlen($error) > 20) + echo '

    '.$error.' '.$lang['srv_nice_url_long'].'

    '; + // Ze obstaja + else + echo '

    '.$error.' '.$lang['srv_nice_url_taken'].'

    '; + + echo ''; + } + + } + + // Zlistamo nice URL, povezave za skupine in jezike + $this->niceUrlSettings(); - // Napredne URL povezave - echo '
    '; - //echo ''.$lang['srv_publication_advanced_url'].''; - echo ''; - echo '

    '.$lang['srv_publication_advanced_url_text'].'

    '; + // Spodnji kvadratki + // Več načinov deljenja ankete + echo '
    '; + + echo '
    '; + + // Vabila + echo '
    '; + echo '
    '; + echo '
    '; + echo $lang['srv_publication_invitations']; + if(!$userAccess->checkUserAccess('arhivi')) echo ''; + echo '
    '; echo '
    '; - - echo '
    '; - - // Individualizirana vabila - echo '
    '; - //echo ''.$lang['srv_publication_invitations'].''; - echo ''; - echo '

    '.$lang['srv_publication_invitations_text'].'

    '; + + // Drugi nacini + echo '
    '; + echo '
    '; + echo '
    '; + echo $lang['srv_publication_survey_more']; + echo '
    '; echo '
    '; + + echo '
    '; + echo '
    '; + - echo '
    '; - $sd = new SurveyDiagnostics($this->anketa); - $sd->doDiagnostics(); - $diagnostic = $sd->getDiagnostic(); - if (is_array($diagnostic) && count($diagnostic) > 0) { - echo ''; - $this->anketa_diagnostika_note($sd, $d->checkDostopSub('test')); - echo''; - } - echo '
    '; - echo ''; - - $base_url = $site_url.'admin/survey/index.php?anketa='.$this->anketa; - # preberomo osnovne nastavitve + echo ''; + } + + # Opozorilo - anketa ni aktivna + private function activation_error(){ + global $lang; + $row = SurveyInfo::getInstance()->getSurveyRow(); - - echo '
    '.($row['active']==0 ? $lang['srv_default_setting_unactive'] : $lang['srv_default_setting']).''; - - // Ce imamo dostop do zavihka urejanje - if($d->checkDostopSub('edit')){ - - # Trajanje - $starts = explode('-',$row['starts']); - $starts = $starts[2].'.'.$starts[1].'.'.$starts[0]; - $expire = explode('-',$row['expire']); - $expire = $expire[2].'.'.$expire[1].'.'.$expire[0]; - echo '

    '.$lang['srv_starts'].':'.$starts.'

    '; - if ( $row['expire'] == PERMANENT_DATE ) { - #trajna - echo '

    '.$lang['srv_trajna_anketa'].':'.($row['expire'] == PERMANENT_DATE ? $lang['yes'] : $lang['no']).'

    '; - } else { - echo '

    '.$lang['srv_expire'].':'.$expire.'

    '; - } - - // Skin ankete - if ($row['skin_profile'] == 0) { - $skin_name = $row['skin']; - } - else { - $sqla = sisplet_query("SELECT name FROM srv_theme_profiles WHERE id = '".$row['skin_profile']."'"); - $rowa = mysqli_fetch_array($sqla); - $skin_name = $rowa['name']; - } - //echo '

    '.$lang['srv_themes'].':'.$row['skin'].'

    '; - echo '

    '.$lang['srv_themes'].':'.$skin_name.'

    '; + + if ($row['active']==0) { + echo '
    '; + //echo '
    '; + //echo ' '.$lang['srv_publication_survey_noactive']; + //echo '
    '; + //echo '

    '.$lang['srv_publication_survey_noactive_note'].'

    '; + + + echo '
    '; - # Jezik - $lang_old = $lang; - $lang_admin = (int)$row['lang_admin']; - $lang_resp = (int)$row['lang_resp']; - $lang_array = array(); - $lang_array[0] = $lang['srv_language_not_set']; - // Preberemo razpoložljive jezikovne datoteke - if ($dir = opendir('../../lang')) { - while (($file = readdir($dir)) !== false) { - if ($file != '.' AND $file != '..') { - if (is_numeric(substr($file, 0, strpos($file, '.')))) { - $i = substr($file, 0, strpos($file, '.')); - $file = '../../lang/'.$i.'.php'; - if (file_exists($file)) { - include($file); - $lang_array[$i] = $lang['language']; - } - } + //echo '

    '.$lang['srv_anketa_noactive2'].'

    '; + echo '

    '.$lang['srv_publication_survey_noactive_note3'].'

    '; + + //Toggle kopiran iz headerja + if (SurveyInfo::getSurveyColumn('active') == 1) { + + # anketa je aktivna + # V kolikor gre za hierarhijo in uporabnik ni administrator hierarhije + if (SurveyInfo::getInstance()->checkSurveyModule('hierarhija')){ + if ($hierarhija_type == 1) { + echo ''; + } + else{ + echo ''; } } - } - - // nastavimo jezik nazaj - /*$file = '../../lang/'.$lang_admin.'.php'; - if (file_exists($file)) { - include($file); - }*/ - $lang = $lang_old; - $resp_change_lang = SurveySetting::getInstance()->getSurveyMiscSetting('resp_change_lang'); - //echo '

    '.$lang['srv_language_admin_1'].':

    '; - echo '

    '.$lang['srv_language_admin_0'].':'.$lang_array[$lang_admin].' / '.$lang_array[$lang_resp].'

    '; - - #obveščanje - - // jezikovni linki - $p = new Prevajanje($this->anketa); - $p->dostop(); - $jeziki = $p->get_all_translation_langs(); - if (count($jeziki) > 0) { - echo '

    ' . $lang['srv_trans_lang'] . ': '; - $i = 0; - foreach ($jeziki AS $key => $val) { - if ($i++ != 0) echo ', '; - echo ''.$val.''; + else { + echo ''; } - echo '

    '; - } - #piškotki - echo '

    '.$lang['srv_cookie'].':'.$lang['srv_cookie_'.$row['cookie']].'

    '; - echo '

    '.$lang['srv_cookie_return'].':'.($row['cookie_return'] == 0 ? $lang['srv_cookie_return_start'] : $lang['srv_cookie_return_middle']).'

    '; - - #more - več - echo ''; - echo ''; - echo '
    '; - - if ($row['cookie'] > -1) { - # če je piškotek dlje kot do konca nakete lahko izbere tudi druge možnosti - echo '

    '.$lang['srv_return_finished'].':'.($row['return_finished'] == 1 ? $lang['srv_return_finished_yes'] : $lang['srv_return_finished_no']).'

    '; - } else { - # ker je piškotek samo do konca ankete se ne more vrnit ali urejat - echo '

    '.$lang['srv_return_finished'].':'. $lang['srv_return_finished_no'] .'

    '; - } - - echo '

    '.$lang['srv_multilang'].':'.($row['multilang'] == 1 ? $lang['yes'] : $lang['no'] ).'

    '; - - echo '

    '.$lang['srv_user'].':'; - if ($row['user_from_cms'] == 1) { - echo $lang['srv_respondent']; - } elseif ($row['user_from_cms'] == 2) { - echo $lang['srv_vnasalec']; - } elseif ($row['user_from_cms'] == 0) { - echo $lang['no1']; - } - echo '

    '; - - echo '

    '.$lang['srv_block_ip'].':'; - if ($row['block_ip'] == 0) { - echo $lang['no1']; - } elseif ($row['block_ip'] == 10) { - echo '10 min'; - } elseif ($row['block_ip'] == 20) { - echo '20 min'; - } elseif ($row['block_ip'] == 60) { - echo '60 min'; - } elseif ($row['block_ip'] == 720) { - echo '12 '.$lang['hour_hours2']; - } elseif ($row['block_ip'] == 1440) { - echo '24 '.$lang['hour_hours2']; - } - echo ''; - echo '

    '; - - - # user from cms - if ($row['user_from_cms']>0) { - echo '

    '.$lang['srv_user_cms_show'].':'.($lang['srv_user_cms_email']).'

    '; + + echo '
    '; + + echo ''; } - echo '

    '.$lang['srv_vote_limit'].':'.($row['vote_limit'] == 0 ? $lang['no'] : $lang['yes']).'

    '; - - echo '

    '.$lang['srv_vote_count'].':'.($row['vote_limit'] == 0 ? '/' : $row['vote_count']).'

    '; - # Obveščanje - // preberemo nastavitve alertov - $sqlAlert = sisplet_query("SELECT * FROM srv_alert WHERE ank_id = '".$this->anketa."'"); - if (mysqli_num_rows($sqlAlert) > 0) { - $rowAlert = mysqli_fetch_assoc($sqlAlert); - } else { - SurveyAlert::getInstance()->Init($anketa, $global_user_id); - $rowAlert = SurveyAlert::setDefaultAlertBeforeExpire(); - } - - $alert_finish = array(); - $alert_expire = array(); - $alert_delete = array(); - $alert_active = array(); - if ($rowAlert['finish_respondent'] == 1) { - $alert_finish[] = $lang['srv_alert_respondent']; - } - if ($rowAlert['finish_respondent_cms'] == 1) { - $alert_finish[] = $lang['srv_alert_respondent_cms']; - } - if ($rowAlert['finish_author'] == 1) { - $alert_finish[] = $lang['srv_info_author']; - } - if ($rowAlert['finish_other'] == 1) { - $alert_finish[] = $lang['email_prejemniki']; - } - if ($rowAlert['expire_author'] == 1) { - $alert_expire[] = $lang['srv_info_author']; - } - if ($rowAlert['expire_other'] == 1) { - $alert_expire[] = $lang['email_prejemniki']; - } - if ($rowAlert['delete_author'] == 1) { - $alert_delete[] = $lang['srv_info_author']; - } - if ($rowAlert['delete_other'] == 1) { - $alert_delete[] = $lang['email_prejemniki']; - } - if ($rowAlert['active_author'] == 1) { - $alert_active[] = $lang['srv_info_author']; - } - if ($rowAlert['active_other'] == 1) { - $alert_active[] = $lang['email_prejemniki']; - } - echo '

    '.$lang['srv_alert_completed_2'].':'.(count($alert_finish) ? implode(',',$alert_finish) : $lang['no']).'

    '; - echo '

    '.$lang['srv_alert_expired_2'].':'.(count($alert_expire) ? implode(',',$alert_expire) : $lang['no']).'

    '; - echo '

    '.$lang['srv_alert_active_2'].':'.(count($alert_active) ? implode(',',$alert_active) : $lang['no']).'

    '; - echo '

    '.$lang['srv_alert_delete_2'].':'.(count($alert_delete) ? implode(',',$alert_delete) : $lang['no']).'

    '; - - echo '

    '; - echo ''; - echo $lang['srv_nastavitve_ankete_all'].''; - echo '

    '; - echo '
    '; - } - // Nimamo dostopa do zavihka urejanje - ni nobenih linkov - else{ - # Trajanje - $starts = explode('-',$row['starts']); - $starts = $starts[2].'.'.$starts[1].'.'.$starts[0]; - $expire = explode('-',$row['expire']); - $expire = $expire[2].'.'.$expire[1].'.'.$expire[0]; - echo '

    '.$lang['srv_starts'].': '.$starts.'

    '; - if ( $row['expire'] == PERMANENT_DATE ) { - #trajna - echo '

    '.$lang['srv_trajna_anketa'].': '.($row['expire'] == PERMANENT_DATE ? $lang['yes'] : $lang['no']).'

    '; - } else { - echo '

    '.$lang['srv_expire'].': '.$expire.'

    '; - } - - echo '

    '.$lang['srv_themes'].': '.$row['skin'].'

    '; - - # Jezik - $lang_old = $lang; - $lang_admin = (int)$row['lang_admin']; - $lang_resp = (int)$row['lang_resp']; - $lang_array = array(); - $lang_array[0] = $lang['srv_language_not_set']; - // Preberemo razpoložljive jezikovne datoteke - if ($dir = opendir('../../lang')) { - while (($file = readdir($dir)) !== false) { - if ($file != '.' AND $file != '..') { - if (is_numeric(substr($file, 0, strpos($file, '.')))) { - $i = substr($file, 0, strpos($file, '.')); - $file = '../../lang/'.$i.'.php'; - if (file_exists($file)) { - include($file); - $lang_array[$i] = $lang['language']; - } - } + else { + $anketa_active = "anketa_active('" . $this->anketa . "','" . $row['active'] . "'); "; + + //Preden anketo aktiviramo preverimo, če gre tudi za izgradnjo hierarhije in če anketa še ni bila aktivirana + if (SurveyInfo::getInstance()->checkSurveyModule('hierarhija')){ + if ($hierarhija_type == 1) { + echo ''; + } else{ + echo ''; } } - } - - // nastavimo jezik nazaj - /*$file = '../../lang/'.$lang_admin.'.php'; - if (file_exists($file)) { - include($file); - }*/ - $lang = $lang_old; - $resp_change_lang = SurveySetting::getInstance()->getSurveyMiscSetting('resp_change_lang'); - echo '

    '.$lang['srv_language_admin_0'].': '.$lang_array[$lang_admin].' / '.$lang_array[$lang_resp].'

    '; - - #obveščanje - - // jezikovni linki - $p = new Prevajanje($this->anketa); - $jeziki = $p->get_all_translation_langs(); - if (count($jeziki) > 0) { - echo '

    ' . $lang['srv_trans_lang'] . ': '; - $i = 0; - foreach ($jeziki AS $key => $val) { - if ($i++ != 0) echo ', '; - echo ''.$val.''; + else { + echo ''; } - echo '

    '; - } - #piškotki - echo '

    '.$lang['srv_cookie'].': '.$lang['srv_cookie_'.$row['cookie']].'

    '; - echo '

    '.$lang['srv_cookie_return'].': '.($row['cookie_return'] == 0 ? $lang['srv_cookie_return_start'] : $lang['srv_cookie_return_middle']).'

    '; - - #more - več - echo ''; - echo ''; - echo '
    '; - - if ($row['cookie'] > -1) { - # če je piškotek dlje kot do konca nakete lahko izbere tudi druge možnosti - echo '

    '.$lang['srv_return_finished'].': '.($row['return_finished'] == 1 ? $lang['srv_return_finished_yes'] : $lang['srv_return_finished_no']).'

    '; - } else { - # ker je piškotek samo do konca ankete se ne more vrnit ali urejat - echo '

    '.$lang['srv_return_finished'].': '. $lang['srv_return_finished_no'] .'

    '; - } - - echo '

    '.$lang['srv_multilang'].': '.($row['multilang'] == 1 ? $lang['yes'] : $lang['no'] ).'

    '; - - echo '

    '.$lang['srv_user'].': '; - if ($row['user_from_cms'] == 1) { - echo $lang['srv_respondent']; - } elseif ($row['user_from_cms'] == 2) { - echo $lang['srv_vnasalec']; - } elseif ($row['user_from_cms'] == 0) { - echo $lang['no1']; - } - echo '

    '; - - echo '

    '.$lang['srv_block_ip'].': '; - if ($row['block_ip'] == 0) { - echo $lang['no1']; - } elseif ($row['block_ip'] == 10) { - echo '10 min'; - } elseif ($row['block_ip'] == 20) { - echo '20 min'; - } elseif ($row['block_ip'] == 60) { - echo '60 min'; - } elseif ($row['block_ip'] == 720) { - echo '12 '.$lang['hour_hours2']; - } elseif ($row['block_ip'] == 1440) { - echo '24 '.$lang['hour_hours2']; - } - echo '

    '; - - - # user from cms - if ($row['user_from_cms']>0) { - echo '

    '.$lang['srv_user_cms_show'].': '.($lang['srv_user_cms_email']).'

    '; - } - echo '

    '.$lang['srv_vote_limit'].': '.($row['vote_limit'] == 0 ? $lang['no'] : $lang['yes']).'

    '; - - echo '

    '.$lang['srv_vote_count'].': '.($row['vote_limit'] == 0 ? '/' : $row['vote_count']).'

    '; - # Obveščanje - // preberemo nastavitve alertov - $sqlAlert = sisplet_query("SELECT * FROM srv_alert WHERE ank_id = '".$this->anketa."'"); - if (mysqli_num_rows($sqlAlert) > 0) { - $rowAlert = mysqli_fetch_assoc($sqlAlert); - } else { - SurveyAlert::getInstance()->Init($anketa, $global_user_id); - $rowAlert = SurveyAlert::setDefaultAlertBeforeExpire(); - } - - $alert_finish = array(); - $alert_expire = array(); - $alert_delete = array(); - $alert_active = array(); - if ($rowAlert['finish_respondent'] == 1) { - $alert_finish[] = $lang['srv_alert_respondent']; - } - if ($rowAlert['finish_respondent_cms'] == 1) { - $alert_finish[] = $lang['srv_alert_respondent_cms']; - } - if ($rowAlert['finish_author'] == 1) { - $alert_finish[] = $lang['srv_info_author']; - } - if ($rowAlert['finish_other'] == 1) { - $alert_finish[] = $lang['email_prejemniki']; - } - if ($rowAlert['expire_author'] == 1) { - $alert_expire[] = $lang['srv_info_author']; - } - if ($rowAlert['expire_other'] == 1) { - $alert_expire[] = $lang['email_prejemniki']; - } - if ($rowAlert['delete_author'] == 1) { - $alert_delete[] = $lang['srv_info_author']; - } - if ($rowAlert['delete_other'] == 1) { - $alert_delete[] = $lang['email_prejemniki']; - } - if ($rowAlert['active_author'] == 1) { - $alert_active[] = $lang['srv_info_author']; - } - if ($rowAlert['active_other'] == 1) { - $alert_active[] = $lang['email_prejemniki']; + + echo '
    '; + + echo '
    '; } - echo '

    '.$lang['srv_alert_completed_2'].': '.(count($alert_finish) ? implode(',',$alert_finish) : $lang['no']).'

    '; - echo '

    '.$lang['srv_alert_expired_2'].': '.(count($alert_expire) ? implode(',',$alert_expire) : $lang['no']).'

    '; - echo '

    '.$lang['srv_alert_active_2'].': '.(count($alert_active) ? implode(',',$alert_active) : $lang['no']).'

    '; - echo '

    '.$lang['srv_alert_delete_2'].': '.(count($alert_delete) ? implode(',',$alert_delete) : $lang['no']).'

    '; - + + echo '
    '; + + //echo '

    '.$lang['srv_publication_survey_noactive_note2'].'

    '; + echo '
    '; } + } + + # Opozorilo o napakah + private function survey_errors(){ + global $lang; + + $sd = new SurveyDiagnostics($this->anketa); + $sd->doDiagnostics(); + $diagnostic = $sd->getDiagnostic(); + if (is_array($diagnostic) && count($diagnostic) > 0) { + + echo '
    '; + echo '
    '; + echo ' '.$lang['srv_warning']; + echo ''; + echo '
    '; + echo $lang['srv_publication_survey_warnings'].'\''.$lang['srv_testiranje'].'\'.'; + echo '
    '; + } + } + + function anketa_vabila_drugo() { + global $lang, $site_url, $global_user_id; - echo '
    '; - echo '
    '; - echo '
    '; + $d = new Dostop(); + + # Opozorilo o napakah + $this->survey_errors(); + + # Opozorilo - anketa ni aktivna + $this->activation_error(); + + // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik + $userAccess = UserAccess::getInstance($global_user_id); + + // Več načinov deljenja ankete + echo '
    '.$lang['srv_publication_survey_more'].'
    '; + + echo '
    '; + + //QR koda + echo '
    '; + echo '
    '; + echo '
    '; + echo $lang['srv_anketa_href_friends']; + echo '
    '; + //echo $lang['srv_anketa_href_friends_text']; + echo '
    '; + + //jazvem + echo '
    '; + echo '
    '; + echo '
    '; + echo $lang['srv_anketa_href_jazvem']; + echo '
    '; + //echo $lang['srv_anketa_href_friends_text']; + echo '
    '; + + echo '
    '; + + echo '
    '; + + // Več načinov deljenja ankete + echo '
    '.$lang['srv_publication_survey_integration'].'
    '; + + echo '
    '; + + //HTML koda + echo '
    '; + echo '
    '; + echo '
    '; + echo $lang['srv_anketa_href']; + echo '
    '; + //echo $lang['srv_anketa_href_text']; + echo '
    '; + + //HTML koda + števec + echo '
    '; + echo '
    '; + echo '
    '; + echo $lang['srv_anketa_href_count']; + echo '
    '; + //echo $lang['srv_anketa_href_count_text']; + echo '
    '; + + // iFrame - brez js + echo '
    '; + echo '
    '; + echo '
    '; + echo $lang['srv_anketa_href_inojs']; + echo '
    '; + //echo $lang['srv_anketa_href_inojs_text']; + echo '
    '; + + // iFrame - js + echo '
    '; + echo '
    '; + echo '
    '; + echo $lang['srv_anketa_href_ijs']; + echo '
    '; + //echo $lang['srv_anketa_href_ijs_text']; + echo '
    '; + + + + echo '
    '; + echo ''; + } function niceUrlSettings() { @@ -2346,6 +2772,12 @@ class SurveyAdminSettings { $p = new Prevajanje($this->anketa); $p->dostop(); $lang_array = $p->get_all_translation_langs(); + + $row = SurveyInfo::getInstance()->getSurveyRow(); + + $p->include_lang($p->lang_resp); + $base_lang_resp = $lang['language']; + $p->include_base_lang(); $link = SurveyInfo::getSurveyLink(); $preview_disableif = SurveySetting::getInstance()->getSurveyMiscSetting('preview_disableif'); @@ -2354,195 +2786,138 @@ class SurveyAdminSettings { $preview_displayvariables = SurveySetting::getInstance()->getSurveyMiscSetting('preview_displayvariables'); $preview_hidecomment = SurveySetting::getInstance()->getSurveyMiscSetting('preview_hidecomment'); $preview_options = ''.($preview_disableif==1?'&disableif=1':'').($preview_disablealert==1?'&disablealert=1':'').($preview_displayifs==1?'&displayifs=1':'').($preview_displayvariables==1?'&displayvariables=1':'').($preview_hidecomment==1?'&hidecomment=1':'').''; - - - echo '
    '.$lang['srv_publication_base_title'].''; - - // Predogled url - echo '
    '; - - echo '

    ' . $lang['srv_poglejanketo2'] . ''; - echo '('.$lang['srv_preview_text'].')

    '; - echo '

    ' . $lang['url'] . ': ' . $link . '&preview=on'.$preview_options.'

    '; - - echo '
    '; - - // Test url - if($this->survey_type > 1){ - echo '
    '; - - echo '

    ' . $lang['srv_survey_testdata2'] . ''; - echo '('.$lang['srv_testdata_text'].')

    '; - echo '

    '.$lang['url'] . ': ' . $link . '&preview=on&testdata=on'.$preview_options; - echo ' ('.$lang['srv_testrianje_how'].')

    '; - - echo '
    '; - } - - // Navaden url + echo '
    '; - $row = SurveyInfo::getInstance()->getSurveyRow(); + //Zlistamo vse lepe url-je + $title = 0; + $sqll = sisplet_query("SELECT id, link FROM srv_nice_links WHERE ank_id = '$this->anketa' ORDER BY id desc"); + while ($rowl = mysqli_fetch_assoc($sqll)) { - echo '

    ' . $lang['srv_survey_real'] . ''; - echo '('.$lang['srv_survey_real_savedata'].')

    '; + if ($title == 0) { + echo '
    '; - echo '' . $lang['url'] . ':  '; - - $p->include_lang($p->lang_resp); - $base_lang_resp = $lang['language']; - $p->include_base_lang(); - - $link1 = $site_url.'a/'.Common::encryptAnketaID($this->anketa); - echo ''.$link1.''.(count($lang_array) > 0 ? ' - '.$base_lang_resp : '').''; - - // Zlistamo vse lepe url-je - $sqll = sisplet_query("SELECT id, link FROM srv_nice_links WHERE ank_id = '$this->anketa' ORDER BY id ASC"); - while ($rowl = mysqli_fetch_assoc($sqll)) { + echo '
    '.$lang['srv_publication_survey_niceurl'].'
    '; + $title = 1; + } $link_nice = $site_url . $rowl['link']; - echo '
    '; - echo ''.$link_nice.''.(count($lang_array) > 0 ? ' - '.$base_lang_resp : '').''; + echo '
    '; + echo '
    '; + echo ' '; + echo ' '.$site_url.''.$rowl['link'].''; + echo '
    '; + + echo ' '; + echo '
    '; + echo ' '.$lang['srv_diagnostika_testiranje_copy_url']; + echo '
    '; - //echo ''.$site_url.$rowl['link'].''; - //echo ''; + echo '
    '; } + - // Imamo vec linkov za skupine + // Povezave za skupine in jezike + // Navaden url + $ss = new SurveySkupine($this->anketa); - $spr_id = $ss->hasSkupine(); + $spr_id = $ss->hasSkupine(); + + $vrednosti = $ss->getVrednosti($spr_id); + + if (count($lang_array) > 0 || $spr_id > 0){ + echo '
    '; + + echo '
    '.$lang['srv_publication_survey_grouplang'].'
    '; + + if (count($lang_array) > 0){ + echo '
    '; + echo '
    '.$base_lang_resp.''.$lang['srv_nice_url_default_lang'].'
    '; + echo '
    '; + echo '
    '; + + echo '
    '; + echo '
    '.$lang['srv_nice_url_no_group'].'
    '; + echo '
    '; + echo ' '; + echo ' '.$link.''; + echo '
    '; + + echo '
    '; + echo ' '.$lang['srv_diagnostika_testiranje_copy_url']; + echo '
    '; + echo '
    '; + + } + } + + // Imamo vec linkov za skupine if($spr_id > 0){ - $vrednosti = $ss->getVrednosti($spr_id); + foreach($vrednosti as $vrednost){ + $link_skupine = isset($vrednost['nice_url']) ? $vrednost['nice_url'] : $vrednost['url']; - echo '
    '; - echo ''.$link_skupine.''.(count($lang_array) > 0 ? ' - '.$base_lang_resp : '').' - '.$vrednost['naslov'].''; + + echo '
    '; + echo '
    '.$vrednost['naslov'].'
    '; + echo '
    '; + echo ' '; + echo ' '.$link_skupine.''; + echo '
    '; + + echo '
    '; + echo ' '.$lang['srv_diagnostika_testiranje_copy_url']; + echo '
    '; + echo '
    '; } } // Imamo vec linkov za jezike if (count($lang_array) > 0) { + foreach ($lang_array AS $lang_id => $lang_name) { - echo '
    '; - echo ''.$link.'?language='.$lang_id.' - '.$lang_name.''; + + echo '
    '; + echo '
    '.$lang_name.'
    '; + echo '
    '; + echo '
    '; + + echo '
    '; + echo '
    '.$lang['srv_nice_url_no_group'].'
    '; + echo '
    '; + echo ' '; + echo ' '.$link.'?language='.$lang_id.''; + echo '
    '; + + echo '
    '; + echo ' '.$lang['srv_diagnostika_testiranje_copy_url']; + echo '
    '; + echo '
    '; if($spr_id > 0){ foreach($vrednosti as $vrednost){ + $link_skupine = isset($vrednost['nice_url']) ? $vrednost['nice_url'] : $vrednost['url']; - echo '
    '; - echo ''.$link_skupine.'&language='.$lang_id.' - '.$lang_name.' - '.$vrednost['naslov'].''; + + echo '
    '; + echo '
    '.$vrednost['naslov'].'
    '; + echo '
    '; + echo ' '; + echo ' '.$link_skupine.'&language='.$lang_id.''; + echo '
    '; + + echo '
    '; + echo ' '.$lang['srv_diagnostika_testiranje_copy_url']; + echo '
    '; + echo '
    '; } } } } - - echo '
    '; - - echo '
    '; - - - echo '
    '; - - - // Okno za dodajanje lepega url-ja - echo '
    '.$lang['srv_nice_url'].''; - - // Zlistamo vse lepe url-je - $sqll = sisplet_query("SELECT id, link FROM srv_nice_links WHERE ank_id = '$this->anketa' ORDER BY id ASC"); - while ($rowl = mysqli_fetch_assoc($sqll)) { - - echo ''; - echo ''.$site_url.$rowl['link'].''; - - // Remove nice url - echo ''; - - echo '
    '; - } - - echo '
    '; - - // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik - $userAccess = UserAccess::getInstance($global_user_id); - if(!$userAccess->checkUserAccess($what='nice_url')){ - $userAccess->displayNoAccess($what='nice_url'); - } - else{ - // Gumb za dodajanje lepega linka - //echo '
    ' . $lang['srv_nice_url'] . ' '.Help::display('srv_nice_url'); - echo ' '.Help::display('srv_nice_url'); - - - echo '


    '; - - echo $site_url.' '; - - echo '
    '; - echo '
    '; - - if (isset($_GET['error'])) { - - // Prekratek lep url - if(strlen($_GET['error']) <= 2) - echo '

    '.$_GET['error'].' '.$lang['srv_nice_url_short'].''; - // Predolg lep url - elseif(strlen($_GET['error']) > 20) - echo '

    '.$_GET['error'].' '.$lang['srv_nice_url_long'].''; - // Ze obstaja - else - echo '

    '.$_GET['error'].' '.$lang['srv_nice_url_taken'].''; - } - - echo ''; - } - - echo '

    '; - - echo '
    '; } - function anketa_vabila_url() { - echo ''; - echo ''; - - echo ''; - - echo ''; - - echo ''; - echo '
    '; - $this->displayInvSurveyEmbed(); - - // Embed v popup je zaenkrat disablan zaradi cross domain omejitev browserjev - //$this->displayInvSurveyPopup(); - echo ''; - $this->displayInvSurveyLink(); - echo '
    '; - } - - function displayInvSurveyEmbed() { - global $lang; - - echo '
    '; - echo ''.$lang['srv_embed_title'].':'; - - echo '

    '.$lang['srv_embed_js'].Help :: display('srv_embed_js').'

    '; - echo '

    '; - - echo '

    '.$lang['srv_embed_fixed'].Help :: display('srv_embed_fixed').'

    '; - echo '

    '; - - - echo '
    '; - - if ($_GET['js'] == 'open') { - ?>'; } - function displayInvSurveyLink() { - global $lang, $site_url, $admin_type; - - $row = SurveyInfo::getInstance()->getSurveyRow(); - - echo '
    '; - echo '' . $lang['srv_user_base_url'] . ''; - - echo '

    '; - echo '

    '.$lang['srv_anketa_href_text'].'

    '; - echo '

    '; - echo '

    '.$lang['srv_anketa_href_count_text'].'

    '; - - echo '
    '; - - // Prikaz QR kode - $img = 'classes/phpqrcode/imgs/code'.$this->anketa.'.png'; - QRcode::png(SurveyInfo::getSurveyLink(), $img, 'L', 4, 2); - - echo ''; -# echo '

    '.$lang['srv_qr_code'].':
    '; - echo '

    '; - echo ''; - echo '
    '; - - // Prikaz ikon za deljenje (FB, twitter...) - echo '

    '; - - ?> -

    - - - - - - - - - | - -
    - - - - - '; - echo '
    '; - } /** * nastavitve za obveščanje na email * @@ -2664,10 +2974,9 @@ class SurveyAdminSettings { echo ''; - echo '
    '; - if ($_GET['s'] == '1') { + if (isset($_GET['s']) && $_GET['s'] == '1') { echo '
    '; - echo ''; + echo ''; } #echo ''; @@ -2686,7 +2995,6 @@ class SurveyAdminSettings { SurveyInfo::getInstance()->SurveyInit($this->anketa); $row = SurveyInfo::getInstance()->getSurveyRow(); - //return '<iframe id="1ka" src="'.$site_url.'main/survey/index.php?anketa='.$this->anketa.'" scrolling="auto" frameborder="0" width="100%"></iframe><script type="text/javascript">function r(){var a=window.location.hash.replace("#","");if(a.length==0)return;document.getElementById("1ka").style.height=a+"px";window.location.hash=""};window.setInterval(\\\'r()\\\',100);</script>'; $iframe = ''; $javascript = ''; @@ -2722,9 +3030,11 @@ class SurveyAdminSettings { global $lang; global $site_url; global $admin_type; - global $app_settings; $anketa = $this->anketa; + + $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/"); + $preklici_url = "'". $site_url . $preklici_url . "'"; /* moznosti: * 'complete' -> obvsetilo o izpolnjeni anketi (respondent, respondent iz cms, avtor + dostop, dodatn-emaili) @@ -2772,7 +3082,7 @@ class SurveyAdminSettings { if ($tab == 'complete') { - //echo '

    ' . $lang['srv_alert_title'] . '

    '."\n"; + //Obveščanje o izpolnjeni anketi echo '
    ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; @@ -2780,60 +3090,75 @@ class SurveyAdminSettings { echo ' ' . "\n"; - echo '
    '. "\n"; - echo ' ' . $lang['srv_alert_prejemnik'] . ''. "\n"; - - // respondent - ne prikazemo ce gre za glasovanje oz. volitve + echo '
    '; + echo ' ' . $lang['srv_alert_completed_2'] . ''; + + echo '
    '; + echo ''.$lang['srv_alert_completed_prejemniki'].''; + + // respondent - ne prikazemo ce gre za glasovanje oz. volitve if($rowS['survey_type'] != 0 && !SurveyInfo::getInstance()->checkSurveyModule('voting')){ - echo '

    '; - echo ''; - echo ''; + echo '

    '; + + //echo ''; $this->display_alert_label('finish_respondent',($rowAlert['finish_respondent'] == 1)); - echo ''. "\n"; + echo '
    '; + // Ce imamo vec prevodov omogocimo za vsak prevod svoj email $this->display_alert_label('finish_respondent_language',($rowAlert['finish_respondent'] == 1)); - echo '

    '; + } - // respondent iz cms ne prikazemo ce gre za volitve + // respondent iz cms ne prikazemo ce gre za volitve if(!SurveyInfo::getInstance()->checkSurveyModule('voting')){ - echo '

    '; - echo ''; + echo '

    '; + + //echo ''; $this->display_alert_label('finish_respondent_cms',($rowAlert['finish_respondent_cms'] == 1)); - echo '

    '. "\n"; + + echo '
    '; } - // avtor ankete oz osebe z dostopom - //echo '

    '; - echo '

    '; - echo ''; + //Avtor ankete oz. souredniki + echo '

    '; + echo ''; $this->display_alert_label('finish_author',($rowAlert['finish_author'] == 1)); - echo '

    '; + echo '
    '; - // posebej navedeni maili - echo '

    '; - echo ' '; + //Posebej navedeni maili + echo '

    '; + echo ''; + echo ' '; echo ' '; - if ($rowAlert['finish_other_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($rowAlert['finish_other_if']); } - echo '

    '; - - echo '

    '; - echo '' . - '' . - '

    '; - - echo '
    '; - - - echo '
    '; + if ($rowAlert['finish_other_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($rowAlert['finish_other_if']); } + echo ''; + + echo '
    '; - echo '
    '; - echo '' . $lang['srv_alert_oblika'] . ''; - echo '
    '; - echo '

    '; - echo '

    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo '
    '; + + echo '

    '.$lang['message_content'].'

    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + if ($rowAlert['finish_text'] != '') { $text = $rowAlert['finish_text']; } @@ -2845,97 +3170,136 @@ class SurveyAdminSettings { } // prikaze editor za ne-spremenljivko (za karkoli druzga pac) - echo '

    '; - echo ' '; - echo '

    '; - echo '
    '; - echo '
    '; - echo '
    '; - echo $lang['srv_alert_instruction1']; + echo '
    '; + + echo ''; + echo ''; + + echo '
    '; + echo '
    '; + + //Navodila na desni + echo '
    '; + echo '
    '; + echo '

    '.$lang['srv_alert_instruction1'].'

    '; + echo '

    '.$lang['srv_alert_instruction1a'].':

    '; + + echo '
    '; + // ta se skriva, potreben respondent iz CMS, da dobi NAME echo ''.$lang['srv_alert_instruction2'].''; - echo $lang['srv_alert_instruction_survey'].'
    '; - echo $lang['srv_alert_instruction_date'].'
    '; - echo $lang['srv_alert_instruction_site'].'
    '; - echo $lang['srv_alert_instruction_url'].'
    '; - echo $lang['srv_alert_instruction_pdf'].'
    '; - echo $lang['srv_alert_instruction_rtf'].'
    '; - + echo '

    '.$lang['srv_alert_instruction_survey'].'

    '; + echo '

    '.$lang['srv_alert_instruction_date'].'

    '; + echo '

    '.$lang['srv_alert_instruction_site'].'

    '; + echo '

    '.$lang['srv_alert_instruction_url'].'

    '; + echo '

    '.$lang['srv_alert_instruction_pdf'].'

    '; + echo '

    '.$lang['srv_alert_instruction_rtf'].'

    '; + $row = SurveyInfo::getInstance()->getSurveyRow(); # če imamo prepoznavanje uporabnik iz CMS, potem ponudimo tudi META_REFERAL_URL - echo $lang['srv_alert_instruction_meta_referer_url'].'
    '; - echo $lang['srv_alert_instruction_system']; - echo $lang['srv_alert_instruction_sample']; - echo $lang['srv_alert_instruction_available']; - -# echo $lang['srv_alert_instruction3']; + if ($rowAlert['finish_respondent_cms'] == 1) + echo '

    '.$lang['srv_alert_instruction_meta_referer_url'].'

    '; + + echo '
    '; + + echo '
    '; + $sqlSistemske = sisplet_query("SELECT s.id, s.naslov, s.variable FROM srv_spremenljivka s, srv_grupa g WHERE s.sistem='1' AND s.gru_id=g.id AND g.ank_id='$anketa' ORDER BY g.vrstni_red, s.vrstni_red"); $prefix = ""; + while ($rowSistemske = mysqli_fetch_assoc($sqlSistemske)) { - echo $prefix . '#' . $rowSistemske['variable'] . '#'; - $prefix = ", "; + $prefix = $prefix . $rowSistemske['variable'] . ', '; } - if ($prefix == "") { // ni sistemskih spremenljivk - echo '

    '.$lang['srv_alert_no_sys_var'].'

    '; + if($prefix != "") { + echo '

    '.$lang['srv_alert_instruction_available'].'

    '; + echo '

    '.rtrim($prefix, ", ").'

    '; + echo '

    '.$lang['srv_alert_instruction_system'].'

    '; + echo '

    '.$lang['srv_alert_instruction_sample'].'

    '; } - echo ''; - echo '
    '; + else{ // ni sistemskih spremenljivk + echo '

    '.$lang['srv_alert_no_sys_var'].'

    '; + } + + echo '
    '; + + echo '
    '; - echo '
    '; - - echo '
    '; - - echo ' '; + echo ''; + + echo ''; + + echo '
    '; - echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; - if ($_GET['s'] == '1') { + if (isset($_GET['s']) && $_GET['s'] == '1') { echo '
    '; - echo ''; + echo ''; } echo ' '; } else if ($tab == 'expired') { global $site_path, $global_user_id; - //echo '

    ' . $lang['srv_alert_expired_title'] . '

    '."\n"; + //Obveščanje o izteku ankete echo '
    ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; - echo '
    '. "\n"; - echo ' ' . $lang['srv_alert_expired_time_title'] . ''. "\n"; + + echo '
    '; + echo ' ' . $lang['srv_alert_expired_2'] . ''; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; - echo $lang['srv_alert_expire_days1']; - echo ''; - echo $lang['srv_alert_expire_days2']; - echo $lang['srv_alert_expire_expire_at'] . $rowS['expire'].''.$lang['at'].'00:00
    '; - echo $lang['srv_alert_expire_note_at'] . ''.$rowAlert['newdate'].''.$lang['at'].'01:00
    '; - echo '
    '; + echo '
    '; + echo '

    '. $lang['srv_alert_expire_expire_at'] .'

    '; + echo $rowS['expire'].$lang['at'].'00:00'; + echo '
    '; - echo '
    '; - echo '
    '. "\n"; - echo ' ' . $lang['srv_alert_prejemnik'] . ''. "\n"; - echo '

    '; - echo ''; + echo '

    '; + echo '

    '. $lang['srv_alert_expire_note_at'] .'

    '; + echo '

    '.$rowAlert['newdate'].''.$lang['at'].'01:00

    '; + echo '
    '; + + echo '
    '; + echo ''.$lang['srv_alert_expire_prejemniki'].''; + + echo '
    '; + echo ''; $this->display_alert_label('expire_author',($rowAlert['expire_author'] == 1)); - echo '

    '; - echo '

    '; - echo '

    '; - echo '' . - ' ' . - '

    '; - echo '
    '; + echo ''; - echo '
    '; + echo '
    '; + echo ''; + echo '
    '; - echo '
    '; - echo '
    '; - echo '' . $lang['srv_alert_oblika'] . ''; - echo '
    '; - echo '

    '; + echo '
    '; - if ($rowAlert['expire_text'] != ''){ + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo '
    '; + + echo '

    '.$lang['message_content'].'

    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + if ($rowAlert['expire_text'] != ''){ $text = $rowAlert['expire_text']; } else{ @@ -2946,56 +3310,81 @@ class SurveyAdminSettings { } // prikaze editor za ne-spremenljivko (za karkoli druzga pac) - echo '

    '; - echo ' '; - echo '

    '; - echo '
    '; - echo '
    '; - echo '
    '; - echo $lang['srv_alert_instruction1']; - echo $lang['srv_alert_instruction4']; + echo '
    '; - echo '
    '; - echo '
    '; - echo '
    '; - echo '
    '; - echo ''; - echo '
    '; - if ($_GET['s'] == '1') { + echo ''; + echo ''; + + echo ''; + echo ''; + + //Navodila na desni + echo '
    '; + echo '
    '; + echo '

    '.$lang['srv_alert_instruction1'].'

    '; + echo '

    '.$lang['srv_alert_instruction1a'].':

    '; + echo '

    '.$lang['srv_alert_instruction4'].'

    '; + echo '
    '; + echo '
    '; + + echo ''; + + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + if (isset($_GET['s']) && $_GET['s'] == '1') { echo '
    '; - echo ''; + echo ''; } echo ''; - } else if ($tab == 'active') { - //echo '

    ' . $lang['srv_alert_active_title'] . '

    '."\n"; + } + + // Obveščanje o spremembi aktivnosti ankete + else if ($tab == 'active') { echo '
    ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; - echo '
    '. "\n"; - echo '' . $lang['srv_alert_prejemnik'] . ''. "\n"; - echo '

    '; - echo ''; - $this->display_alert_label('active_author',($rowAlert['active_author'] == 1)); - echo '

    '; - echo '

    '; - echo '

    '; - echo ''; - echo '' . - '

    '; - echo '
    '; - - echo '
    '; - - echo '
    '; echo '
    '; - echo '' . $lang['srv_alert_oblika'] . ''; - echo '
    '; - echo '

    ' . $lang['srv_alert_oblika_deactivate_note'] . '

    '; - echo '

    '; + echo '' . $lang['srv_alert_active_2'] . ''; + + echo '
    '; + echo ''.$lang['srv_alert_active_prejemniki'].''; + + echo '
    '; + echo ''; + $this->display_alert_label('active_author',($rowAlert['active_author'] == 1)); + echo '
    '; + + echo '
    '; + echo ''; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo '
    '; + + echo '

    '.$lang['message_content'].'

    '; + echo '

    '.$lang['srv_alert_oblika_deactivate_note'].'

    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; if ($rowAlert['active_text0'] != '') { $text0 = $rowAlert['active_text0']; @@ -3006,15 +3395,21 @@ class SurveyAdminSettings { $text0 = nl2br($lang['srv_alert_active_text0'].$signature); } + // prikaze editor za ne-spremenljivko (za karkoli druzga pac) - echo '

    '; - echo ' '; - echo '

    '; + echo '
    '; - echo '
    '; - echo '

    ' . $lang['srv_alert_oblika_activate_note'] . '

    '; - echo '

    '; + echo ''; + echo ''; + + echo '
    '; + + echo '

    '.$lang['srv_alert_oblika_activate_note'].'

    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; if ($rowAlert['active_text1'] != '') { $text1 = $rowAlert['active_text1']; @@ -3025,55 +3420,81 @@ class SurveyAdminSettings { $text1 = nl2br($lang['srv_alert_active_text1'].$signature); } + + echo '
    '; + + echo ''; + echo ''; + + echo '
    '; + echo '
    '; - echo '

    '; - echo ' '; - echo '

    '; + //Navodila na desni + echo '
    '; + echo '
    '; + echo '

    '.$lang['srv_alert_instruction1'].'

    '; + echo '

    '.$lang['srv_alert_instruction1a'].':

    '; + echo '

    '.$lang['srv_alert_instruction5'].'

    '; + echo '
    '; + echo '
    '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo ''; + echo ''; echo '
    '; - echo '
    '; - echo '
    '; - echo $lang['srv_alert_instruction1']; - echo $lang['srv_alert_instruction5']; - echo '
    '; - echo '
    '; - echo '
    '; - echo '
    '; - echo ''; - echo '
    '; - if ($_GET['s'] == '1') { + + if (isset($_GET['s']) && $_GET['s'] == '1') { echo '
    '; - echo ''; + echo ''; } echo ''; - } else if ($tab == 'delete') { - //echo '

    ' . $lang['srv_alert_delete_title'] . '

    '."\n"; + } + + else if ($tab == 'delete') { echo '
    ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; - echo '
    '. "\n"; - echo '' . $lang['srv_alert_prejemnik'] . ''. "\n"; - echo '

    '; - echo ''; + //Obveščanje o izbrisu ankete + echo '

    '; + echo '' . $lang['srv_alert_surveydelete'] . ''; + + echo '
    '; + echo ''.$lang['srv_alert_surveydelete_text'].''; + + echo '
    '; + echo ''; $this->display_alert_label('delete_author',($rowAlert['delete_author'] == 1)); - echo '

    '; - echo '

    '; - echo '

    '; - echo ''; - echo ''; - echo '

    '; - echo '
    '; + echo ''; - echo '
    '; + echo '
    '; + echo ''; + echo '
    '; - echo '
    '; - echo '
    '; - echo '' . $lang['srv_alert_oblika'] . ''; - echo '
    '; - echo '

    '; + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo '
    '; + + echo '

    '.$lang['message_content'].'

    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; if ($rowAlert['delete_text'] != '') { $text = $rowAlert['delete_text']; @@ -3084,25 +3505,37 @@ class SurveyAdminSettings { $text = nl2br($lang['srv_alert_delete_text'].$signature); } + // prikaze editor za ne-spremenljivko (za karkoli druzga pac) - echo '

    '; - echo ' '; - echo '

    '; + echo '
    '; + + echo ''; + echo ''; + echo '
    '; - echo '
    '; - echo '
    '; - echo $lang['srv_alert_instruction1']; - echo $lang['srv_alert_instruction5']; echo '
    '; + + //Navodila na desni + echo '
    '; + echo '
    '; + echo '

    '.$lang['srv_alert_instruction1'].'

    '; + echo '

    '.$lang['srv_alert_instruction1a'].':

    '; + echo '

    '.$lang['srv_alert_instruction5a'].'

    '; + echo '
    '; + echo '
    '; + echo '
    '; + echo '
    '; - echo '
    '; - echo ''; - echo '
    '; - if ($_GET['s'] == '1') { + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + if (isset($_GET['s']) && $_GET['s'] == '1') { echo '
    '; - echo ''; + echo ''; } echo '
    '; @@ -3153,7 +3586,7 @@ class SurveyAdminSettings { global $global_user_id; global $mysql_database_name; - echo '
    '; + echo '
    '; echo ''.$lang['srv_user_base_email_server_settings'].''; $row = SurveyInfo::getInstance()->getSurveyRow(); @@ -3161,7 +3594,7 @@ class SurveyAdminSettings { // Opozorilo, ce imamo vklopljena vabila, da gre za iste nastavitve $isEmail = (int)SurveyInfo::getInstance()->checkSurveyModule('email'); if($isEmail) - echo '

    '.$lang['srv_email_server_settings_warning'].'

    '; + echo '

    '.$lang['srv_email_server_settings_warning'].'

    '; echo '
    ' . "\n\r"; @@ -3176,20 +3609,31 @@ class SurveyAdminSettings { // Dostop za posiljanje mailov preko 1ka serverja $enabled1ka = ( $MA->is1KA() || (($admin_type == 0) && ($mysql_database_name == 'www1kasi' || $mysql_database_name == 'test1kasi' || $mysql_database_name == 'real1kasi' || $mysql_database_name == '1kaarnessi')) ) ? true : false; - echo '

    '; - echo ''.$lang['srv_email_setting_select_server'].' '; - echo ''; + + echo '

    '; + echo ''.$lang['srv_email_setting_select_server'].''; + + echo '
    '; + echo 'is1KA() ? 'checked ="checked" ' : '').' '.($enabled1ka ? '' : ' disabled="disabled"').' onclick="$(\'#send_mail_mode1, #send_mail_mode2\').hide();$(\'#send_mail_mode0\').show();">'; + echo ''; + echo '
    '; + // Google smtp je viden samo starim, kjer je ze vklopljen - if($MA->isGoogle()){ - echo ''; - } - echo ''; + if($MA->isGoogle()){ + echo '
    '; + echo 'isGoogle() ? 'checked ="checked" ' : '').' onclick="$(\'#send_mail_mode0, #send_mail_mode2\').hide(); $(\'#send_mail_mode1\').show();">'; + echo ''; + echo '
    '; + } + + echo '
    '; + echo 'isSMTP() ? 'checked ="checked" ' : '').' onclick="$(\'#send_mail_mode0, #send_mail_mode1\').hide(); $(\'#send_mail_mode2\').show();">'; + echo ''; echo Help :: display('srv_mail_mode'); - echo '

    '; - + echo '
    '; + + echo '
    '; + #1KA $enkaSettings = $MA->get1KASettings($raziskave=true); @@ -3200,7 +3644,7 @@ class SurveyAdminSettings { echo '

    '; echo '

    '; # replyTo - echo '

    '; + echo '

    '; echo '

    '; echo ''; @@ -3213,7 +3657,7 @@ class SurveyAdminSettings { echo '

    '; echo '

    '; # replyTo - echo '

    '; + echo '

    '; echo '

    '; #Password echo '

    '; @@ -3223,89 +3667,155 @@ class SurveyAdminSettings { #SMTP $enkaSettings = $MA->getSMTPSettings(); echo '

    isSMTP() ? ' class="displayNone"' : '').'>'; - echo ''.$lang['srv_email_setting_adapter2_note'].'
    '; - echo '
    '.$lang['srv_email_setting_settings'].'
    '; + //echo ''.$lang['srv_email_setting_adapter2_note'].'
    '; + echo '

    '.$lang['srv_email_setting_settings'].'

    '; + + echo '
    '; + # from - NICE - echo '

    '; - echo '

    '; + echo '
    '; + echo ''.$lang['srv_email_setting_from_nice'].''; + echo ''; + echo '
    '; + # from - echo '

    '; - echo '

    '; + echo '
    '; + echo ''.$lang['srv_email_setting_from'].''; + echo ''; + echo '
    '; + + echo '
    '; + + echo '
    '; + # replyTo - echo '

    '; - echo '

    '; + echo '
    '; + echo ''.$lang['srv_email_setting_reply'].Help::display('srv_obvescanje_odgovorZa').''; + echo ''; + echo '
    '; + + echo '
    '; + + echo '
    '; + #Username - echo '

    '; - echo '

    '; + echo '
    '; + echo ''.$lang['srv_email_setting_username'].''; + echo ''; + echo '
    '; + #Password - echo '

    '; - echo '

    '; + echo '
    '; + echo ''.$lang['srv_email_setting_password'].''; + echo ''; + echo '
    '; + + echo '
    '; + + echo '
    '; + #autentikacija - echo '

    '; - echo $lang['srv_email_setting_autentication']; - echo ''; - echo ''; - echo '

    '; + echo '
    '; + echo ''.$lang['srv_email_setting_autentication'].''; + + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; + echo '
    '; + #Varnost SMTPSecure - echo '

    '; - echo $lang['srv_email_setting_encryption']; - echo ''; - echo ''; - echo ''; - echo '

    '; + echo '
    '; + echo ''.$lang['srv_email_setting_encryption'].''; + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; + echo '
    '; + + echo '
    '; + + echo '
    '; + #port - echo '

    '; - echo ' '.$lang['srv_email_setting_port_note']; - echo '

    '; + echo '
    '; + echo ''.$lang['srv_email_setting_port'].$lang['srv_email_setting_port_note'].''; + echo ''; + echo '
    '; + #host - echo '

    '; - echo '

    '; - #delay - echo '

    '; - echo '

    '; + echo '
    '; + echo ''.$lang['srv_email_setting_host'].''; + echo ''; + echo '
    '; + + echo '
    '; + + echo '
    '; + + #delay + echo '
    '; + echo ''.$lang['srv_email_setting_smtp_delay'].' '.Help::display('srv_inv_delay').':'; + echo ''; + echo '
    '; + + + echo '
    '; - echo '
    '; echo '
    '; echo '
    '; - - - echo '
    '; - - // Gumb shrani - echo ''; - + + echo '
    '; // Gumb preveri nastavitve - echo ''; + echo ''; + // Gumb shrani + echo ''; + echo '
    '; - if ($_GET['s'] == '1') { - echo '
    '; - echo ''; + if (isset($_GET['s']) && $_GET['s'] == '1') { + echo ''; } } @@ -3365,7 +3875,6 @@ class SurveyAdminSettings { $sa = new SurveyAdmin(1, $this->anketa); $sa->show_mailto_users('all', null); echo ''; - echo '
    '; } else { // pošljemo emaile @@ -3551,91 +4060,140 @@ class SurveyAdminSettings { global $site_url; global $site_path; - echo '
    '; - echo '' . $lang['srv_splosna_navodila'] . ''; - - echo '

    '.$lang['srv_social_settings_text1'].'

    '; - echo '

    '.$lang['srv_social_settings_text2'].'

    '; - echo '

    '.$lang['srv_social_settings_text3'].'

    '; - echo '

    '.$lang['srv_social_settings_text4'].'

    '; - echo '

    '.$lang['srv_social_settings_text5'].' http://www.1ka.si/a/3510,

    '; - echo '

    '.$lang['srv_social_settings_text6'].' '.$lang['srv_library'].' '.$lang['srv_social_settings_text7'].'

    '; - echo '

    '.$lang['edit2'].''.$lang['srv_social_settings_text8'].'

    '; + echo '

    '.$lang['srv_social_settings_text1'].'

    '; + echo '

    '.$lang['srv_social_settings_text2'].$lang['srv_social_settings_text3'].$lang['srv_social_settings_text4'].'

    '; + echo '

    '.$lang['srv_social_settings_text5'].''.$lang['srv_social_settings_text6'].'.

    '; - echo '
    '; // Omrežja so sestavljane vprašanja. Začnejo se iz generatorja imen (name generator). S tem respondent (ego) navede objekte, prijatelje - alterje. , s katerim pridobimo imena pzanke in vprašanj. Druga kompnenta je zanka, ki za vse alterje določenega ega sproži enaka vprašanja. Dretja komponenta so vprašanja. Primer omrežja je tukaj, http://www.1ka.si/a/3510, vprašalnik pa najdemo v knjižnjic med Primerov 1KA anket http://www.1ka.si/admin/survey/index.php?a=knjiznica } /** * @desc prikaze tab arhivi */ - function arhivi() {//OSTANE + function arhivi() { global $lang; - echo '
    '; + echo '
    '; echo '' . $lang['srv_questionnaire_archives'] . ''; - - echo '

    ' . $lang['srv_backup_label'] . '

    '; - echo '

    '.$lang['srv_note'].':

    '; - - echo ''; - - echo '

    '; + + echo '

    '.$lang['srv_questionnaire_archives_text'].'

    '; + + echo '
    '; + echo $lang['srv_questionnaire_archives_note'].':'; + echo ''; + echo '
    '; + + echo '
    '; + echo ''; + echo '
    '; // Seznam ustvarjenih arhivov $sql = sisplet_query("SELECT a.id, a.naslov, a.intro_opomba, a.insert_time, a.edit_time, CONCAT(i.name, ' ', i.surname) AS insert_name, CONCAT(e.name, ' ', e.surname) AS edit_name FROM srv_anketa a, users i, users e WHERE a.insert_uid=i.id AND a.edit_uid=e.id AND a.backup = '$this->anketa' AND a.active>='0' ORDER BY a.insert_time DESC"); if (!$sql) echo mysqli_error($GLOBALS['connect_db']); - if (mysqli_num_rows($sql) > 0) - echo '
    ' . $lang['srv_backup_list'] . ':'; - - while ($row = mysqli_fetch_array($sql)) { - echo '
    '; - echo '' . $row['naslov'] . ' '.($row['intro_opomba']!='' ? ' - '.$row['intro_opomba'].'' : ''); - echo '
    (' . $lang['sent_by'] . ': ' . $row['insert_name'].' ' . datetime($row['insert_time']) . ', ' . $lang['edit_by'] . ': ' . $row['edit_name'].' ' . datetime($row['edit_time']) . ')'; - echo '
    ' . $lang['srv_survey_archives_delete_survey'] . ', ' . $lang['srv_anketarestore'] . ''; - echo '
    '; - } - - echo '
    '; - } + if (mysqli_num_rows($sql) > 0) { + echo '

    ' . $lang['srv_backup_list'] . ':

    '; - function arhivi_data() { - global $lang; - - echo '
    '; - echo '' . $lang['srv_arhiv_data'] . ''; - - echo '

    ' . $lang['srv_backup_data_label'] . '

    '; - - echo ''; + echo ''; - echo '

    '; - - $backups = array(); - if ($handle = opendir( dirname(__FILE__) . '/SurveyBackup/' )) { - while (false !== ($entry = readdir($handle))) { - if ($entry != "." && $entry != "..") { - $file = explode('-', $entry); - if ($file[0] == $this->anketa) { - $backups[] = $entry; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + while ($row = mysqli_fetch_array($sql)) { + echo ''; + echo ''; + echo ''; + + if ($row['intro_opomba']=='') + $opomba = "/"; + else if (strlen($row['intro_opomba']) > 40) + $opomba = substr($row['intro_opomba'], 0, 37).'...'; + else + $opomba = $row['intro_opomba']; + + echo ''; + + //Ikone + echo ''; + + echo ''; + } + + echo '
    '.$lang['srv_questionnaire_archives_date'].''.$lang['srv_questionnaire_archives_by'].''.$lang['srv_questionnaire_archives_note2'].'
    '.datetime($row['insert_time']).''.$row['insert_name'].''.$opomba.''; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + + } + + + + echo '
    '; + } + + function arhivi_data() { + global $lang; + + echo '
    '; + echo '' . $lang['srv_arhiv_data'] . ''; + + echo '

    '.$lang['srv_backup_data_text'].'

    '; + + echo '
    '; + echo ''; + echo '
    '; + + // Seznam ustvarjenih arhivov - 2. faza: kdo je arhiviral, opomba, možnost izbrisa + $backups = array(); + if ($handle = opendir( dirname(__FILE__) . '/SurveyBackup/' )) { + while (false !== ($entry = readdir($handle))) { + if ($entry != "." && $entry != "..") { + $file = explode('-', $entry); + if ($file[0] == $this->anketa) { + $backups[] = $entry; } } } closedir($handle); } if (count($backups) > 0) { - echo '
    ' . $lang['srv_backup_data_list'] . ':'; + echo '

    ' . $lang['srv_backup_data_list'] . ':

    '; + + echo ''; + + echo ''; + echo ''; + echo ''; + echo ''; + foreach ($backups AS $file) { $e = explode('-', $file); $e[2] = str_replace('.1ka', '', $e[2]); - echo '
    '.$e[1].' '.$e[2].' - '.$lang['srv_anketarestoredata'].''; + $e[2] = str_replace('.', ':', $e[2]); + $e[2] = substr($e[2], 0, -3); + + echo ''; + echo ''; + + + //Ikone + echo ''; + + echo ''; + } - echo '

    '; + echo '
    '.$lang['srv_questionnaire_archives_date'].'
    '.$e[1].' '.$e[2].''; + echo '
    '; + //echo ''; + echo ''; + echo '
    '; + echo '
    '; } echo '
    '; @@ -3644,94 +4202,115 @@ class SurveyAdminSettings { function arhivi_testdata() { global $lang; - $str_testdata = "SELECT count(*) FROM srv_user WHERE ank_id='".$this->anketa."' AND (testdata='1' OR testdata='2')"; - $query_testdata = sisplet_query($str_testdata); - list($testdata) = mysqli_fetch_row($query_testdata); - - $str_testdata_auto = "SELECT count(*), add_date, add_uid FROM srv_testdata_archive WHERE ank_id='".$this->anketa."' GROUP BY add_date"; - $query_testdata_auto = sisplet_query($str_testdata_auto); - $auto_testdata = array(); - while (list($_cnt, $_date, $_uid) = mysqli_fetch_row($query_testdata_auto) ) { - $testdata_auto+=$_cnt; - $auto_testdata[] = $cnt; - } - echo '
    '; echo ''.$lang['srv_arhiv_testdata'].''; - - echo $lang['srv_archive_test_data_count'].(int)$testdata; - if ($testdata_auto > 0) { - echo $lang['srv_archive_test_data_auto'].(int)$testdata_auto; + + $link = SurveyInfo::getSurveyLink(); + $surveyName = SurveyInfo::getInstance()->getSurveyTitle(); + + $preview_disableif = SurveySetting::getInstance()->getSurveyMiscSetting('preview_disableif'); + $preview_disablealert = SurveySetting::getInstance()->getSurveyMiscSetting('preview_disablealert'); + $preview_displayifs = SurveySetting::getInstance()->getSurveyMiscSetting('preview_displayifs'); + $preview_displayvariables = SurveySetting::getInstance()->getSurveyMiscSetting('preview_displayvariables'); + $preview_hidecomment = SurveySetting::getInstance()->getSurveyMiscSetting('preview_hidecomment'); + $preview_options = '' . ($preview_disableif == 1 ? '&disableif=1' : '') . ($preview_disablealert == 1 ? '&disablealert=1' : '') . ($preview_displayifs == 1 ? '&displayifs=1' : '') . ($preview_displayvariables == 1 ? '&displayvariables=1' : '') . ($preview_hidecomment == 1 ? '&hidecomment=1' : '') . ''; + + echo '

    '.$lang['srv_archive_test_data_text1'].''.$lang['srv_archive_test_data_text1a'].''.$lang['srv_archive_test_data_text2'].''.$lang['srv_archive_test_data_text2a'].''.$lang['srv_archive_test_data_text3'].'

    '; + + //Nimamo nobenih vnosov + $str_testdata_any = "SELECT count(*) as cnt, time_insert as time FROM srv_user WHERE ank_id='".$this->anketa."' AND (testdata='1' OR testdata='2') GROUP BY day(time_insert)"; + $query_testdata_any = sisplet_query($str_testdata_any); + list($testdata_any) = mysqli_fetch_row($query_testdata_any); + if ((int)$testdata_any == 0) { + echo '

    '.$lang['srv_archive_test_data_none1']. $surveyName . $lang['srv_archive_test_data_none2'] . $lang['srv_archive_test_data_none3'].'.

    '; + } + else { // Imamo vnose, izpišemo eno ali obe tabeli + + // Avtomatski vnosi + $str_testdata = "SELECT count(*) as cnt, time_insert as time FROM srv_user WHERE ank_id='".$this->anketa."' AND (testdata='2') GROUP BY day(time_insert)"; + $query_testdata = sisplet_query($str_testdata); + $table_exists1 = 0; + while ($testdata = mysqli_fetch_array($query_testdata)) { + // Izpišemo naslov in začetek tabele + if($table_exists1==0 && $testdata['cnt']!=0) { + echo '

    '.$lang['srv_archive_test_data_timeline_auto'].$surveyName.':

    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + $table_exists1=1; + } + + echo ''; + echo ''; + echo ''; + echo ''; + } + + if($table_exists1==1) { + echo '
    '.$lang['srv_archive_test_data_date'].''.$lang['srv_archive_test_data_count'].'
    '.date("d.m.Y",strtotime($testdata['time'])).''.$testdata['cnt'].'
    '; + } + + // Ročni vnosi + $str_testdata = "SELECT count(*) as cnt, time_insert as time FROM srv_user WHERE ank_id='".$this->anketa."' AND (testdata='1') GROUP BY day(time_insert)"; + $query_testdata = sisplet_query($str_testdata); + $table_exists2 = 0; + while ($testdata = mysqli_fetch_array($query_testdata)) { + // Izpišemo naslov in začetek tabele + if($table_exists2==0 && $testdata['cnt']!=0) { + echo '

    '.$lang['srv_archive_test_data_timeline_manual'].$surveyName.':

    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + $table_exists2=1; + } + + echo ''; + echo ''; + echo ''; + echo ''; + } + + if($table_exists2==1) { + echo '
    '.$lang['srv_archive_test_data_date'].''.$lang['srv_archive_test_data_count'].'
    '.date("d.m.Y",strtotime($testdata['time'])).''.$testdata['cnt'].'
    '; + } } - echo '
    '; } function arhivi_survey() { global $lang; - // Uvoz/izvoz samo ankete - po novem je uvoz pri kreiranju ankete + // Izvoz samo ankete if($_GET['m'] == 'survey'){ echo '
    '; - echo ''.$lang['srv_survey_archives_ie_title'].''; - - echo '

    '.$lang['srv_survey_archives_note_survey'].'

    '; - - // Izvoz - echo '

    '; - echo ''.$lang['srv_survey_archives_export'].''; - echo '
    '.$lang['srv_survey_archives_export_text']; - echo ''.$lang['srv_survey_archives_export_save'].''; - echo '

    '; - - echo '

    '; + echo ''.$lang['srv_survey_archives_ie_title'].Help::display('srv_arhiv_vprasalnik').''; - // Uvoz - /*echo '

    '; - echo ''.$lang['srv_survey_archives_import'].''; - echo '
    '.$lang['srv_survey_archives_import_text']; - echo '
    '.$lang['srv_survey_archives_import_import'].''; - echo '
    '; - echo '

    '; - echo '

    ';*/ - + echo '

    '.$lang['srv_survey_archives_note_survey'].'

    '; + + echo '
    '; + echo ''; + echo '
    '; + echo '
    '; } - // Uvoz/izvoz ankete s podatki - po novem je uvoz pri kreiranju ankete + + // Izvoz ankete s podatki else{ echo '
    '; - echo ''.$lang['srv_survey_archives_ie_data_title'].''; - - echo '

    '.$lang['srv_survey_archives_note_survey_data'].'

    '; - - // Izvoz - echo '

    '; - echo ''.$lang['srv_survey_archives_export'].''; - echo '
    '.$lang['srv_survey_archives_export_text']; - echo ''.$lang['srv_survey_archives_export_save'].''; - echo '

    '; - - echo '

    '; - - // Uvoz - /*echo '

    '; - echo ''.$lang['srv_survey_archives_import'].''; - echo '
    '.$lang['srv_survey_archives_import_text']; - echo '
    '.$lang['srv_survey_archives_import_import'].''; - echo '
    '; - echo '

    '; - echo '

    ';*/ - + echo ''.$lang['srv_survey_archives_ie_data_title'].Help::display('srv_arhiv_podatki').''; + + echo '

    '.$lang['srv_survey_archives_note_survey_data'].'

    '; + + echo '
    '; + echo ''; + echo '
    '; + echo '
    '; } } @@ -3770,7 +4349,7 @@ class SurveyAdminSettings { if ($anketa > 0) $this->anketa = $anketa; - $site = $_GET['site']; + $site = isset($_GET['site']) ? $_GET['site'] : 0; SurveyCopy :: setSrcSurvey($this->anketa); SurveyCopy :: setSrcConectDb($connect_db); @@ -3780,7 +4359,7 @@ class SurveyAdminSettings { $napake = SurveyCopy :: getErrors(); - if (count($napake) > 0) + if (is_countable($napake) && count($napake) > 0) print_r($napake); if (!$new_anketa_id) @@ -3892,11 +4471,9 @@ class SurveyAdminSettings { echo ''; echo ''; - echo '
    '; - - if ($_GET['s'] == '1') { + if (isset($_GET['s']) && $_GET['s'] == '1') { echo '
    '; - echo ''; + echo ''; } } @@ -3907,6 +4484,10 @@ class SurveyAdminSettings { global $site_url; global $lang; + $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/"); + $preklici_url = "'". $site_url . $preklici_url . "'"; + + SurveySetting::getInstance()->Init($this->anketa); if (count($_POST) > 0 && (isset($_POST['uporabnost_link']) || isset($_POST['uporabnost_razdeli']))) { @@ -3938,52 +4519,59 @@ class SurveyAdminSettings { if ($row['uporabnost_link'] == '') $row['uporabnost_link'] = 'http://'; - echo '

    '.$lang['srv_uporabnost_link'].'

    '; - echo '

    '.$lang['srv_uporabnost_warning'].'

    '; - echo '

    Link:

    '; + echo '

    '.$lang['srv_vrsta_survey_note_4_3b'].'

    '; + + echo '
    '; + echo '

    '.$lang['srv_uporabnost_link'].'

    '; + echo ''; + echo '
    '; $uporabnost_razdeli = SurveySetting::getInstance()->getSurveyMiscSetting('uporabnost_razdeli'); - echo '

    '.$lang['srv_uporabnost_razdeli'].': '.$lang['srv_vodoravno'].' '.$lang['srv_navpicno'].' ('.$lang['srv_razdeli_dodatno'].')

    '; - echo '
    '; + echo '
    '; + echo ''.$lang['srv_uporabnost_razdeli'].':'; - echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; + + echo '

    '.$lang['srv_uporabnost_warning'].'

    '; + + + echo '
    '; echo '
    '.$lang['srv_uporabnost_nadaljne'].''; - echo '

    '.$lang['srv_uporabnost_link_stran'].'

    '; + echo '

    '.$lang['srv_uporabnost_link_stran'].'

    '; $sqlg = sisplet_query("SELECT id, naslov FROM srv_grupa WHERE ank_id = '$this->anketa' ORDER BY vrstni_red ASC"); while ($rowg = mysqli_fetch_array($sqlg)) { $link = SurveySetting::getInstance()->getSurveyMiscSetting('uporabnost_link_'.$rowg['id']); if ($link == '') $link = 'http://'; - echo '

    '.$rowg['naslov'].':

    '; + + echo '
    '; + echo '

    '.$rowg['naslov'].':

    '; + echo ''; + echo '
    '; } echo '
    '; - echo '
    '; - - //echo '

    '; - echo ''; - echo ''; - echo ''; - - echo '
    '; - echo '
    '; + // Gumb shrani + echo '
    '; + echo ''; + echo ''; + echo '
    '; echo ''; - - /*echo '
    '.$lang['srv_upora_dodatno'].''; - echo '

    ' . $lang['srv_upora_text'] . '

    '; - echo '

    '.$lang['srv_primer'].'

    '; - echo ''; - echo '
    ';*/ } /** @@ -3994,6 +4582,8 @@ class SurveyAdminSettings { $sdf = SurveyDataFile::get_instance(); $sdf->init($this->anketa); + $sdf->prepareFiles(); + $headFileName = $sdf->getHeaderFileName(); $dataFileName = $sdf->getDataFileName(); $dataFileStatus = $sdf->getStatus(); @@ -4001,15 +4591,17 @@ class SurveyAdminSettings { if ($dataFileStatus== FILE_STATUS_NO_DATA || $dataFileStatus == FILE_STATUS_NO_FILE || $dataFileStatus == FILE_STATUS_SRV_DELETED){ + echo '
    '.$lang['srv_no_data'].''; Common::noDataAlert(); + echo '
    '; return false; } - if ($_GET['m'] == 'excel') { + /* if ($_GET['m'] == 'excel') { echo '
    '; - } else if($_GET['m'] == 'excel_xls') { + } */ if($_GET['m'] == 'excel_xls') { echo ''; } else if($_GET['m'] == 'txt') { - echo ''; + echo ''; } else if($_GET['m'] == 'spss') { echo ''; } else if($_GET['m'] == 'sav') { @@ -4018,134 +4610,212 @@ class SurveyAdminSettings { $row = SurveyInfo::getInstance()->getSurveyRow(); - echo '
    '; - echo '
      '; - - if($_GET['m'] != 'export_PDF'){ - echo '
    • '; - echo '' . $lang['srv_dsp_link'] . ''; - echo '
    • '; - } - - // profili statusov - SurveyStatusProfiles :: Init($this->anketa); - SurveyStatusProfiles :: DisplayLink(false); - - # div za profile variabel - SurveyVariablesProfiles :: Init($this->anketa, $global_user_id); - SurveyVariablesProfiles :: DisplayLink(false,false); - SurveyConditionProfiles :: Init($this->anketa, $global_user_id); - SurveyConditionProfiles::DisplayLink(false); - - # div za profile časov - SurveyTimeProfiles :: Init($this->anketa, $global_user_id); - SurveyTimeProfiles::DisplayLink(false,true); - - echo '
    '; - echo '
    '; - - - if($_GET['m'] != 'export_PDF'){ + //sedaj se prikaze staticno ob vsakem izvozu + /* if($_GET['m'] != 'export_PDF'){ if(session_id() == '') session_start(); - echo '
    '; + echo '
    '; + + echo '

    '.$lang['settings'].'

    '; + echo ''; + + + echo '
    '; // Izvozi identifikatorje - echo ''; - echo Help::display('exportSettings'); - - echo '
    '; - + ' onchange="exportChangeCheckbox(\'exportHiddenSystem\');"/>'; + echo '
    '; + // Izvozi podatke - echo '
    '; - } + + echo '
    '; + + echo '
    '; + echo ''; + echo '
    '; + + echo ''; + + } */ # v odvisnosti od $_GET['m'] prikazemo podstran - if (!$_GET['m'] || $_GET['m'] == M_EXPORT_EXCEL) { + if ($_GET['m'] == M_EXPORT_EXCEL_XLS) { - echo '
    '.$lang['srv_lnk_excel'].''; + echo '
    '.$lang['srv_lnk_excel_xls'].''; + + $this->exportSettingsData(); + echo '
    '; + + /* echo $lang['srv_izvoz_Excel_xls_labels']; + echo '
    '; + + // Izvozi podatke kot stevilske vrednosti + echo '
    '; + echo ' + '; + echo '
    '; + + // Izvozi podatke kot labele + echo '
    '; + echo ' + '; + echo '
    '; - echo $lang['srv_izvoz_Excel_note']; - echo $lang['srv_izvoz_Excel_note_2']; - - echo '

    '.$lang['srv_izvoz_Excel_settings'].'

    '; - echo '

    '; - echo ''; - echo ''; - echo ''; - echo '

    '; - - echo '

    '; - echo '

    '; - echo ''; - echo $lang['srv_export_replace1'].' '; - echo $lang['srv_export_replace2'].' '; - echo ''; - echo '
    '; - echo '
    '; - echo ''; - echo $lang['srv_export_replace1'].' '; - echo $lang['srv_export_replace2'].' '; - echo ''; echo '
    '; - echo '

    '; - echo '

    '; - echo ''; - echo '

    '; - + echo '
    '; */ + + echo $lang['srv_izvoz_Excel_xls_note1']; + echo '

    '; + echo ''; + echo '
    '; + + $this->filterNote(); + + echo '

    '.$lang['srv_izvoz_Excel_xls_prirocnik'].'

    '; echo '
    '; - - } elseif ($_GET['m'] == M_EXPORT_EXCEL_XLS) { + } + elseif ($_GET['m'] == M_EXPORT_TXT) { + + echo '
    '.$lang['srv_lnk_excel'].''; + + $this->exportSettingsData(); + echo '
    '; - echo '
    '.$lang['srv_lnk_excel_xls'].''; - echo $lang['srv_izvoz_Excel_xls_note']; - echo $lang['srv_izvoz_Excel_xls_note_2']; - echo '
    '; + echo '
    '; + echo ''.$lang['srv_expor_excel_cell_delimiter'].Help::display('srv_izvozCSV_locitveni').':'; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo ''.$lang['srv_export_texts'].Help::display('srv_izvozCSV_tekst').':'; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo ''.$lang['srv_izvoz_txt_format'].''; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + + echo '
    '; + + echo $lang['srv_izvoz_Excel_note_a']; + echo '
    '; + echo ''; + echo '
    '; + + $this->filterNote(); + + echo '

    '.$lang['srv_izvoz_Excel_note_2'].'

    '; + } elseif ($_GET['m'] == M_EXPORT_SPSS) { - echo '
    '.$lang['srv_lnk_spss'].''; - echo $lang['srv_izvoz_SPSS_faq']; - echo $lang['srv_izvoz_SPSS_note']; + echo '
    '.$lang['srv_lnk_spss'].''; + + $this->exportSettingsData(); + echo '
    '; + + echo '

    '.$lang['srv_izvoz_SPSS_faq'].'

    '; + echo '

    '.$lang['srv_izvoz_SPSS_note'].'

    '; + + + echo '

    '.$lang['srv_izvoz_step1'].'

    '; + echo '
    '; + echo '

    '.$lang['srv_izvoz_step1_SPSS'].'

    '; + echo '
    '; + echo ''; + echo '
    '; + echo '
    '; + + echo '

    '.$lang['srv_izvoz_step2'].'

    '; + echo '
    '; + echo '

    '.$lang['srv_izvoz_step2a_SPSS'].'

    '; + echo '
    '; + echo ''; + echo '
    '; + echo '

    '.$lang['srv_izvoz_step2b_SPSS'].'

    '; + echo '
    '; + + echo '

    '.$lang['srv_izvoz_step3'].'

    '; + echo '
    '; + echo '
      '; + echo '
    • '.$lang['srv_izvoz_step3a_SPSS'].'
    • '; + echo '
    • '.$lang['srv_izvoz_step3b_SPSS'].'
    • '; + echo '
    • '.$lang['srv_izvoz_step3c_SPSS'].'
    • '; + echo '
    '; + echo '
    '; + + echo '

    '.$lang['srv_izvoz_step4'].'

    '; + echo '
    '; + echo '

    '.$lang['srv_izvoz_step4_SPSS'].'

    '; + echo '
    '; + + echo '

    '.$lang['srv_izvoz_step5'].'

    '; + echo '
    '; + echo '

    '.$lang['srv_izvoz_step5_SPSS'].'

    '; + echo '
    '; + + $this->filterNote(); + echo '
    '; } - elseif ($_GET['m'] == M_EXPORT_SAV) { + /* elseif ($_GET['m'] == M_EXPORT_SAV) { echo '
    '.$lang['srv_lnk_sav'].''; - echo $lang['srv_izvoz_SAV_note']; + echo $lang['srv_izvoz_SAV_note1']; + echo '
    '; + echo ''; + echo '
    '; + echo '

    '.$lang['srv_izvoz_SAV_note2a'].''.$lang['srv_izvoz_SAV_note2b'].''.$lang['srv_izvoz_SAV_note2c'].'

    '; + echo '
    '; - } - elseif ($_GET['m'] == M_EXPORT_TXT) { - - echo '
    '.$lang['srv_lnk_txt'].''; - echo $lang['srv_izvoz_txt_note']; - echo '
    '; - } + } */ elseif ($_GET['m'] == 'export_PDF') { $pageBreak = isset($_GET['pageBreak']) ? $_GET['pageBreak'] : 0; @@ -4208,8 +4878,8 @@ class SurveyAdminSettings { } /** * @desc prikaze vnose v anketo - * / - function displayVnosi() {//OSTANE + */ + /*function displayVnosi() {//OSTANE global $lang; $row = SurveyInfo::getInstance()->getSurveyRow(); if ($_GET['m'] == 'SN_izvozi') { @@ -4264,19 +4934,79 @@ class SurveyAdminSettings { } } */ - /** - * @desc prikaze podatke v tabeli - */ - function displayData() { - global $lang; - global $site_url; - //include_once ('DisplaySurveyData.php'); - $dsd = new DisplaySurveyData($this->anketa); - $dsd->display(); - } + // nastavitve glede katere podatke se naj izvozi + private function exportSettingsData(){ + global $lang; + global $global_user_id; - /** + //pridobi nastavitve za export ankete + //kateri podatki so v export se sedaj veze na naketo (0-onlydata, 1-data in paradata, 2-identifikatorji) + $sql_export_mode = sisplet_query("SELECT value FROM srv_user_setting_for_survey ". + "WHERE sid = '" . $this->anketa . "' AND what='default_export_data_mode' AND uid='$global_user_id'"); + $export_mode = 0; + if($sql_export_mode){ + $export_mode = mysqli_fetch_assoc($sql_export_mode); + $export_mode = isset($export_mode['value']) ? $export_mode['value'] : 0; + } + + echo $lang['srv_izvoz_settings_data']; + + echo '
    '; + + // Izvozi podatke + echo '
    '; + echo ''; + echo '
    '; + + // Izvozi podatke in parapodatke + echo '
    '; + echo ''; + echo '
    '; + + //pridobi header, da vidimo, ce imamo identifikatorje + $SDF = SurveyDataFile::get_instance(); + $SDF->init($this->anketa); + $headFileName = $SDF->getHeaderFileName(); + $HEADERS = unserialize(file_get_contents($headFileName)); + + // Izvozi identifikatorje, ce obstajajo + if((isset($HEADERS['_settings']['count_system_data_variables']) && (int)$HEADERS['_settings']['count_system_data_variables'] > 0)){ + echo '
    '; + echo ''; + echo '
    '; + } + + echo '
    '; + } + + private function filterNote(){ + global $lang; + echo '

    '.$lang['srv_izvoz_filter_note'].'


    '; + } + + /** + * @desc prikaze podatke v tabeli + */ + function displayData() { + global $lang; + global $site_url; + + //include_once ('DisplaySurveyData.php'); + $dsd = new DisplaySurveyData($this->anketa); + $dsd->display(); + } + + /** * @desc Vrne ID trenutnega uporabnika (ce ni prijavljen vrne 0) */ function uid() { @@ -4332,28 +5062,52 @@ class SurveyAdminSettings { global $global_user_id, $admin_type, $lang; $avtorRow = SurveyInfo::getInstance()->getSurveyRow(); + + echo '

    '.$lang['srv_dostop_users_list'].'

    '; // Prikazemo samo userje ki lahko urejajo anketo if($show_all == 0){ echo ' ' . "\n"; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; $sql1 = sisplet_query("SELECT u.name, u.surname, u.id, u.email FROM users u, srv_dostop d WHERE d.ank_id='$this->anketa' AND d.uid=u.id"); while ($row1 = mysqli_fetch_array($sql1)) { - - // Da ga ne pocistimo ce je disablan (sam sebe ne more odstranit in avtorja se ne sme odstranit) + + // Da ga ne pocistimo, ce je disablan (sam sebe ne more odstranit in avtorja se ne sme odstranit) if($avtorRow['insert_uid'] == $row1['id'] || $global_user_id == $row1['id']) echo ' ' . "\n"; - - echo '
    ' . "\n"; - echo '' . "\n"; - echo ' '; - echo '
    ' . "\n"; + + echo ''; + + echo ' '; + echo ' '; + echo ' '; + + // Avtor ne rabi ikone za urejanje + echo ' '; + + echo ''; } + + echo '
    '; + //echo ''; + echo '' . $lang['srv_dostop_users_username'] . '' . $lang['srv_dostop_users_email'] . '
    '.$row1['name'] . ($avtorRow['insert_uid'] == $row1['id'] ? ' (' . $lang['author'] . ')' : '') .''.$row1['email'].''; + if($avtorRow['insert_uid'] != $row1['id']) + echo '
    '; + echo '
    '; + + //echo ''.$lang['srv_dostop_users_removeselected'].''; + } - // Prikazemo vse userje, ki jih lahko uporabnig dodaja + // Prikazemo vse userje, ki jih lahko uporabnik dodaja else{ $sql1 = $this->db_select_users_forLevel($this->anketa); if ( mysqli_num_rows($sql1) > 0 ) { @@ -4384,6 +5138,55 @@ class SurveyAdminSettings { } } + // Dodajanje uredniskega dostopa do ankete + public function display_add_survey_dostop(){ + global $lang; + global $admin_type; + + echo '

    '; + + // Admini in managerji lahko dodajo dostop komurkoli + if($admin_type == 0 || $admin_type == 1){ + echo $lang['srv_dostop_adduserstxt_admin'].' '.AppSettings::getInstance()->getSetting('app_settings-app_name').'. '; + } + // Ostali uporabniki lahko dodajo dostop samo ze registriranim uporabnikom + else{ + echo $lang['srv_dostop_adduserstxt'].' '.AppSettings::getInstance()->getSetting('app_settings-app_name').'! '; + } + + // AAI ima poseben link na help + if(isAAI()){ + echo $lang['srv_dostop_adduserstxt_aai_more']; + } + + echo '

    '; + + echo ''; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '

    '.$lang['srv_dostop_adduserstxt_end'].'

    '; + + //Opcijsko sporočilo + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo '
    '; + echo '
    '; + + // Gumb za dodajanje in posiljanje + echo '
    '; + echo ''; + echo '
    '; + } + /** * @desc Vrne podatke o uporabniku @@ -4419,7 +5222,7 @@ class SurveyAdminSettings { // polovimo tip ankete $str_survey_type = sisplet_query("SELECT survey_type FROM srv_anketa WHERE id = '" . $sid . "'"); $row_survey_type = mysqli_fetch_assoc($str_survey_type); - $this->getSurvey_type = $row_survey_type['survey_type']; + $this->getSurvey_type = isset($row_survey_type['survey_type']) ? $row_survey_type['survey_type'] : null; return $this->getSurvey_type; } @@ -4443,18 +5246,18 @@ class SurveyAdminSettings { case 'finish_respondent_language': // respondent ki je zakljucil anketo v drugem jeziku (mu omogocimo nastavljanje custom maila za obvescanje) if ($isChecked) { - $p = new Prevajanje($anketa); + $p = new Prevajanje($this->anketa); $p->dostop(); $jeziki = $p->get_all_translation_langs(); if(!empty($jeziki)){ $row = SurveyInfo::getInstance()->getSurveyRow(); - echo '
    '; foreach($jeziki as $key => $jezik){ - echo ''.$lang['srv_alert_respondent'].' - '.$jezik; - echo ' '; - echo ''; + echo '
    '; + echo ''; + echo ''; + echo '
    '; } } } @@ -4463,14 +5266,15 @@ class SurveyAdminSettings { case 'finish_respondent': // respondent ki je zakljucil anketo if ($isChecked) { - // preverimo ali obszaja sistemska spremenljivka email če ne jo dodamo + // preverimo, ali obstaja sistemska spremenljivka email, če ne jo dodamo $sqlEmail = sisplet_query("SELECT s.sistem, s.variable, s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.sistem='1' AND s.variable='email' AND s.gru_id=g.id AND g.ank_id='$this->anketa'"); $sqlIme = sisplet_query("SELECT s.sistem, s.variable, s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.sistem='1' AND s.variable='ime' AND s.gru_id=g.id AND g.ank_id='$this->anketa'"); - // ce sta dodani obe sistemski spremenljivki je fse ok + // ce sta dodani obe sistemski spremenljivki, je vse ok $email_ok = $ime_ok = false; if ( mysqli_num_rows($sqlEmail) > 0 && mysqli_num_rows($sqlIme) > 0) { $email_ok = $ime_ok = true; - } else { + } + else { // manjka ena ali obe potrebni sistemski spremenljivki // email je nujen, zato ga dodamo avtomatsko @@ -4480,7 +5284,7 @@ class SurveyAdminSettings { if (in_array('email',$sa->alert_add_necessary_sysvar( array('email') , false))) { $email_ok = true; } - // email v tem primeru spremenimo da je viden, ker gre za alert + // email v tem primeru spremenimo, da je viden, ker gre za alert $sqlEmail = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.sistem='1' AND s.variable='email' AND s.gru_id=g.id AND g.ank_id='$this->anketa'"); $rowEmail = mysqli_fetch_array($sqlEmail); sisplet_query("UPDATE srv_spremenljivka SET visible='1' WHERE id = '$rowEmail[id]'"); @@ -4489,51 +5293,48 @@ class SurveyAdminSettings { $v->spremenljivka = $rowEmail['id']; $v->set_email($reminder=1); - } else { - // email je ze dodan damo tekst za ok + } + else { + // email je ze dodan, damo tekst za ok $email_ok = true; } // preverimo še za ime if ( mysqli_num_rows($sqlIme) == 0 ) { - - } else{ + } + else{ $ime_ok = true; } } - - if($forma) - echo ''; - else - echo ''; + echo ''; + echo ''; if ($email_ok && $ime_ok) { - echo $lang['srv_alert_respondent_note_ok_email_ime']; - echo ' ' . "\n\r"; - - echo ' '; + echo ' '; $sql1 = sisplet_query("SELECT finish_respondent_if FROM srv_alert WHERE ank_id='$this->anketa'"); $row1 = mysqli_fetch_array($sql1); echo ' '; if ($row1['finish_respondent_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($row1['finish_respondent_if']); } + + echo ''.$lang['srv_alert_respondent_note_ok_email_ime'].' '; } else { if ($ime_ok) { // pomeni da email ni ok! napaka - echo $lang['srv_alert_respondent_note_notok_email']; + echo ''.$lang['srv_alert_respondent_note_notok_email'].''; } else { - // email je ok, ime ni, uporabnika fprasamo ali hoce se ime - echo $lang['srv_alert_respondent_note_ok_email']; - - echo ' '; + // email je ok, ime ni, uporabnika vprasamo, ali hoce se ime + echo ''; $sql1 = sisplet_query("SELECT finish_respondent_if FROM srv_alert WHERE ank_id='$this->anketa'"); $row1 = mysqli_fetch_array($sql1); - echo ' '; + echo ' '; if ($row1['finish_respondent_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($row1['finish_respondent_if']); } + echo '

    '.$lang['srv_alert_respondent_note_ok_email'].'

    '; + if(!$forma){ - echo $lang['srv_alert_respondent_note_ime']; - echo '   '.$lang['srv_alert_respondent_note_link'].'' . "\n\r"; + echo '

    '.$lang['srv_alert_respondent_note_ime'].''; + echo ' '.$lang['srv_alert_respondent_note_link'].'

    '; } } } @@ -4541,20 +5342,16 @@ class SurveyAdminSettings { // preverimo sistemske nastavitve in spremenljivke ime } else { - if($forma) - echo ''; - else - echo ''; + echo ''; + echo ''; } break; case 'finish_respondent_cms': // respondent prepoznan iz CMS ko je izpolnil anketo - //respondent iz cms - //pri hitrih nastavitvah forme prikazemo drug text - if($forma) - echo ''; - else - echo ''; + + //respondent iz cms + echo ''; + echo ''; if ($isChecked) { // preverimo sistemske nastavitve in spremenljivke @@ -4562,34 +5359,49 @@ class SurveyAdminSettings { //$rowCMS = mysqli_fetch_assoc($sqlCMS); $rowCMS = SurveyInfo::getInstance()->getSurveyRow(); if ($rowCMS['user_from_cms'] > 0) { - echo $lang['srv_alert_respondent_cms_note_ok']; - echo ' ' . "\n\r"; - - echo ' '; + echo ' '; $sql1 = sisplet_query("SELECT finish_respondent_cms_if FROM srv_alert WHERE ank_id='$this->anketa'"); $row1 = mysqli_fetch_array($sql1); echo ' '; if ($row1['finish_respondent_cms_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($row1['finish_respondent_cms_if']); } + echo ''.$lang['srv_alert_respondent_cms_note_ok'].' '; + } else { - echo $lang['srv_alert_respondent_cms_note']; - echo '   '.$lang['srv_alert_respondent_cms_note_link'].'' . "\n\r"; + echo '

    '.$lang['srv_alert_respondent_cms_note'].''; + echo ' '.$lang['srv_alert_respondent_cms_note_link'].'

    '; } } break; - case 'finish_author': // obveščanje ob izpolnjeni anketi - case 'expire_author': // obveščanje ob poteku ankete - case 'active_author': // obveščanje ob aktivaciji/deaktivaciej ankete - case 'delete_author': // obveščanje ob izbrisu ankete + case 'finish_author': // obveščanje o izpolnjeni anketi + case 'expire_author': // obveščanje o poteku ankete + case 'active_author': // obveščanje o aktivaciji/deaktivaciej ankete + case 'delete_author': // obveščanje o izbrisu ankete + + // preberemo nastavitve alertov + $sqlAlert = sisplet_query("SELECT * FROM srv_alert WHERE ank_id = '$this->anketa'"); + if (!$sqlAlert) + echo mysqli_error($GLOBALS['connect_db']); + + if (mysqli_num_rows($sqlAlert) > 0) { + $rowAlert = mysqli_fetch_array($sqlAlert); + } + else { + SurveyAlert::getInstance()->Init($this->anketa, $global_user_id); + $rowAlert = SurveyAlert::setDefaultAlertBeforeExpire(); + } // avtor ankete - if($forma) - echo ''; - else + if($forma) { + echo ''; + echo ''; + } + else { + echo ''; echo ''; - + } if ($isChecked) { //$sql = sisplet_query("SELECT insert_uid, edit_uid FROM srv_anketa WHERE id='$this->anketa'"); //$row = mysqli_fetch_assoc($sql); @@ -4597,8 +5409,6 @@ class SurveyAdminSettings { $row = SurveyInfo::getInstance()->getSurveyRow(); - echo '
    '; - if ($what == 'finish_author') $db_field = 'alert_complete'; else if ($what == 'expire_author') @@ -4623,14 +5433,21 @@ class SurveyAdminSettings { $checked = ($row1[$db_field] == '1') ? ' checked="checked" ' : ''; } - echo '' . "\n\r"; - echo '' . "\n\r"; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + if ($what == 'finish_author') { - echo ' '; + echo ''; + echo ' '; echo ' '; if ($row1['alert_complete_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($row1['alert_complete_if']); } + echo ''; } - echo '' . "\n\r"; + echo '
    '; + + echo '
    '; } // polovimo avtorja pri ostalih obvestilih else{ @@ -4639,14 +5456,21 @@ class SurveyAdminSettings { $sql1 = sisplet_query("SELECT *, uid AS id FROM srv_dostop WHERE ank_id='$this->anketa' AND uid='".$row['insert_uid']."'"); $row1 = mysqli_fetch_array($sql1); - echo '' . "\n\r"; - echo '' . "\n\r"; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + if ($what == 'finish_author') { - echo ' '; + echo ''; + echo ' '; echo ' '; if ($row1['alert_complete_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($row1['alert_complete_if']); } + echo ''; } - echo '' . "\n\r"; + echo '
    '; + + echo '
    '; } @@ -4657,14 +5481,21 @@ class SurveyAdminSettings { if ($row1['id']) { // se zgodi da je prazno za metauserje // avtor je vedno chekiran $checked = ( $row1[$db_field] == '1') ? ' checked="checked"' : ''; - echo '' . "\n\r"; - echo '' . "\n\r"; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + if ($what == 'finish_author') { - echo ' '; + echo ''; + echo ' '; echo ' '; if ($row1['alert_complete_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($row1['alert_complete_if']); } + echo ''; } - echo '' . "\n\r"; + echo '
    '; + + echo '
    '; } } } @@ -4801,13 +5632,14 @@ class SurveyAdminSettings { } function anketa_diagnostika_note($diagnostics,$show_link = false) { global $lang; + $diagnostics->printNote($show_link); - } /** * @desc prikaze dropdown z nastavitvami ankete (globalne, za celo 1ko) -- Prva stran -> Nastavitve -> Sistemske nastavitve + * Sistemske nastavitve: mora biti admin da ima dostop */ function anketa_nastavitve_system() { global $lang; @@ -4816,110 +5648,125 @@ class SurveyAdminSettings { global $admin_type; global $global_user_id; - /* ** Sistemske nastavitve: mora biti admin da ima dostop *** */ + $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/"); + $preklici_url = "'". $site_url . $preklici_url . "'"; - echo '
    ' . "\n\r"; - if ($admin_type == 0) { + // Ni admin - nima pravic + if ($admin_type != 0) { - echo '' . "\n\r"; - echo ' ' . "\n\r"; - echo ' ' . "\n\r"; - echo ' ' . "\n\r"; - echo ' ' . "\n\r"; + echo '
    '; + echo $lang['srv_settingsSystemNoRights']; + echo '
    '; - echo '
    '; - echo '' . $lang['settings'] . ''; - - $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyDostop'"); - list ($SurveyDostop) = mysqli_fetch_row($result); - $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyCookie'"); - list ($SurveyCookie) = mysqli_fetch_row($result); - $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyExport'"); - list ($SurveyExport) = mysqli_fetch_row($result); - $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyForum'"); - list ($SurveyForum) = mysqli_fetch_row($result); - - echo ''; - ?> - -
    - '; - ?> - -
    - '; - ?> - -
    - '; - ?> - -
    + return; + } - '; - echo '' . $lang['srv_edithelp'] . ''; - - echo ''; - Help :: edit_toggle(); - - echo '
    '; - //echo '

    ' . "\n\r"; - echo ' '; - - - $smv = new SurveyMissingValues(); - $smv->SystemFilters(); - - - // save gumb - echo ' '; - - echo ''; - - // div za prikaz uspešnosti shranjevanja - if ($_GET['s'] == '1') { - echo '
    '; - echo ''; - } + echo '
    '; - } else { - echo $lang['srv_settingsSystemNoRights']; - } - echo '
    ' . "\n\r"; - + echo '
    '; + + echo ' '; + echo ' '; + + + // SISTEMSKE NASTAVITVE (prej v settings_optional.php) + echo '
    '.$lang['as_basic'].''; + + echo '
    '; + + AppSettings::getInstance()->displaySettingsGroup('basic'); + + // Kdo lahko ureja ankete + echo '
    '; + + echo ''; + + $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyDostop'"); + list ($SurveyDostop) = mysqli_fetch_row($result); + + echo ''; + + echo '
    '; + + // Default trajanje piskotka + echo '
    '; + echo ''; + + $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyCookie'"); + list ($SurveyCookie) = mysqli_fetch_row($result); + + echo ''; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + + // INFO + echo '
    '.$lang['as_info'].''; + echo '
    '; + AppSettings::getInstance()->displaySettingsGroup('info'); + echo '
    '; + echo '
    '; + + + // OMEJITVE + echo '
    '.$lang['as_limits'].''; + echo '
    '; + AppSettings::getInstance()->displaySettingsGroup('limits'); + echo '
    '; + echo '
    '; + + + // SMTP NASTAVITVE + echo '
    '.$lang['as_smtp'].''; + echo '
    '; + AppSettings::getInstance()->displaySettingsGroup('smtp'); + echo '
    '; + echo '
    '; + + + // MODULI + echo '
    '.$lang['as_modules'].''; + echo '
    '; + AppSettings::getInstance()->displaySettingsGroup('modules'); + echo '
    '; + echo '
    '; + + + /* Missingi - zakomentirano, prenova po redizajnu + $smv = new SurveyMissingValues(); + $smv->SystemFilters(); + */ + + + // save gumb + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + // div za prikaz uspešnosti shranjevanja + if (isset($_GET['s']) && $_GET['s'] == '1') { + echo '
    '; + echo ''; + } + + + echo ''; } /** @@ -4928,71 +5775,78 @@ class SurveyAdminSettings { */ function anketa_nastavitve_predvidenicasi () { global $lang; - + global $site_url; + + $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/"); + $preklici_url = "'". $site_url . $preklici_url . "'"; + echo '
    '; - echo $lang['srv_predvidenicasi_help']; - echo ''; - echo '
    '.$lang['srv_stran'].''; - echo '

    '.$lang['srv_timing_page'].': s

    '; - echo '
    '; - - echo '
    '.$lang['srv_vprasanja'].''; - echo ''; - echo ''; - for ($tip=1; $tip<= 21; $tip++) { if ($tip <= 8 || $tip >= 16) { + echo '
    '.$lang['srv_testiranje_predvidenicas'].''; + + echo '

    '.$lang['srv_predvidenicasi_help'].'

    '; + + echo '
    '; + echo ''; + echo '  s'; + echo '
    '; + + echo '

    '.$lang['srv_predvidenicasi_note'].'

    '; + + echo '
    '; + echo '
    '; + + echo '
    '.$lang['srv_timing_vprasanje'].''.$lang['srv_timing_kategorija'].''.$lang['srv_timing_kategorija_max'].'
    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; - echo ''; - echo ''; + for ($tip=1; $tip<= 21; $tip++) { - if ($tip<=3 || $tip==6 || $tip==16 || $tip==17 || $tip==18 || $tip==19 || $tip==20) - echo ''; - - if ($tip==3){ - $kategorija_max = GlobalMisc::getMisc('timing_kategorija_max_'.$tip); - echo ''; - } - echo ''; - - } } + if ($tip <= 8 || $tip >= 16) { + echo ''; + echo ''; + echo ''; + + if ($tip<=3 || $tip==6 || $tip==16 || $tip==17 || $tip==18 || $tip==19 || $tip==20) + echo ''; + else + echo ''; + + if ($tip==3){ + $kategorija_max = GlobalMisc::getMisc('timing_kategorija_max_'.$tip); + echo ''; + } + else + echo ''; + + echo ''; + + } + } echo '
    '.$lang['srv_question_type'].''.$lang['srv_timing_vprasanje'].''.$lang['srv_timing_kategorija'].''.$lang['srv_timing_kategorija_max'].'
    '.$lang['srv_vprasanje_tip_'.$tip].' s s s' - /*. ''*/ - . '
    '.$lang['srv_vprasanje_tip_'.$tip].'  s  s  s
    '; - echo '
    '; - - echo '
    '; - echo ''.$lang['edit1337'].''; + echo '
    '; - - echo '
    '; + echo '
    '; + + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; echo ''; echo ''; } - - /** prikaze div da so nastavitve shranjene in ga nato skrije - * - */ - function displaySuccessSave() { - global $lang; - echo $lang['srv_success_save']; - } - function tabTestiranje () { global $lang; @@ -5022,20 +5876,20 @@ class SurveyAdminSettings { global $lang; $expected_time = array(); - $expected_time_block = array(); - $block_labels_by_number = array(); + $expected_time_block = array(); + $block_labels_by_number = array(); $expected_vprasanja = array(); $verjetnost = array(); - $verjetnost_block = array(); + $verjetnost_block = array(); - //from php 7.2 this helps to round numbers calculated in bcmod() - without it, it always rounds down to int - bcscale(1); + //from php 7.2 this helps to round numbers calculated in bcmod() - without it, it always rounds down to int + bcscale(1); $sql = sisplet_query("SELECT introduction FROM srv_anketa WHERE id = '$this->anketa'"); $row = mysqli_fetch_array($sql); + $introduction = isset($row['introduction']) ? $row['introduction'] : $lang['srv_intro']; + $expected_vprasanja[0][0] = strlen(strip_tags($introduction)) * GlobalMisc::getMisc('timing_vprasanje_5') / 100; - // nagovor racunamo kot da gre za labelo - $expected_vprasanja[0][0] = strlen(strip_tags($row['introduction'])) * GlobalMisc::getMisc('timing_vprasanje_5') / 100; $expected_vprasanja[0][1] = 1; $expected_vprasanja[0][2] = $lang['srv_vprasanje_tip_5']; $expected_vprasanja[0][3] = $lang['srv_intro_label']; @@ -5043,7 +5897,7 @@ class SurveyAdminSettings { $expected_time[0][0] = $expected_vprasanja[0][0] + GlobalMisc::getMisc('timing_stran'); $expected_time[0][1] = $expected_time[0][0]; - $block_spr_data = $this->get_block_data_by_spr_id(); + $block_spr_data = $this->get_block_data_by_spr_id(); $sql = sisplet_query("SELECT id, naslov, vrstni_red FROM srv_grupa g WHERE g.ank_id='$this->anketa' ORDER BY g.vrstni_red ASC"); while ($row = mysqli_fetch_array($sql)) { @@ -5058,62 +5912,77 @@ class SurveyAdminSettings { $expected_vprasanja[$row1['id']][1] = $this->vprasanje_verjetnost($row1['id']); $expected_vprasanja[$row1['id']][2] = strip_tags($row1['naslov']); $expected_vprasanja[$row1['id']][3] = strip_tags($row['naslov']); - $expected_vprasanja[$row1['id']][4] = strip_tags($block_spr_data[$row1['id']]['label']); + + if(isset($block_spr_data[$row1['id']]['label'])) + $expected_vprasanja[$row1['id']][4] = strip_tags($block_spr_data[$row1['id']]['label']); + else + $expected_vprasanja[$row1['id']][4] = ''; $expected_time[$row['vrstni_red']][0] += $expected_vprasanja[$row1['id']][0] * $expected_vprasanja[$row1['id']][1]; // dejanski $expected_time[$row['vrstni_red']][1] += $expected_vprasanja[$row1['id']][0]; // bruto - z vsemi vprasanji - if ( $expected_vprasanja[$row1['id']][1] > $verjetnost[$row['vrstni_red']]) + if (isset($verjetnost[$row['vrstni_red']]) && $expected_vprasanja[$row1['id']][1] > $verjetnost[$row['vrstni_red']]) $verjetnost[$row['vrstni_red']] = $expected_vprasanja[$row1['id']][1]; } - $expected_time[$row['vrstni_red']][0] += GlobalMisc::getMisc('timing_stran') * $verjetnost[$row['vrstni_red']]; // pri dejanskem trajanju strani upostevamo verjetnost najverjetnejsega vprasanja na strani (stran se pojavi z najvisjo verjetnostjo vseh vprasanj na strani) - $expected_time[$row['vrstni_red']][1] += GlobalMisc::getMisc('timing_stran'); + if(isset($verjetnost[$row['vrstni_red']])) + $expected_time[$row['vrstni_red']][0] += GlobalMisc::getMisc('timing_stran') * $verjetnost[$row['vrstni_red']]; // pri dejanskem trajanju strani upostevamo verjetnost najverjetnejsega vprasanja na strani (stran se pojavi z najvisjo verjetnostjo vseh vprasanj na strani) + + $expected_time[$row['vrstni_red']][1] += GlobalMisc::getMisc('timing_stran'); } - $sql = sisplet_query("SELECT * FROM srv_if as bl LEFT JOIN srv_branching as br ON br.parent = bl.id WHERE bl.enabled='0' AND bl.tip='1' AND br.ank_id = '$this->anketa' ORDER BY bl.number ASC, br.vrstni_red ASC"); - $last_block_st = -1; + $sql = sisplet_query("SELECT * FROM srv_if as bl LEFT JOIN srv_branching as br ON br.parent = bl.id WHERE bl.enabled='0' AND bl.tip='1' AND br.ank_id = '$this->anketa' ORDER BY bl.number ASC, br.vrstni_red ASC"); + $last_block_st = -1; while ($row = mysqli_fetch_array($sql)) { - $new_block = $last_block_st != $row['number']; - if($new_block){ - $last_block_st = $row['number']; - $label = $row['label'] ? $row['label']: $lang['srv_blok'].' '.$last_block_st; - $block_labels_by_number[$last_block_st] = $label; - $expected_time_block[$last_block_st-1][0] = 0; - $expected_time_block[$last_block_st-1][1] = 0; - } - - if(!$row['element_if']){ - $expected_time_block[$last_block_st-1][0] += $expected_vprasanja[$row['element_spr']][0] * $expected_vprasanja[$row['element_spr']][1]; // dejanski - $expected_time_block[$last_block_st-1][1] += $expected_vprasanja[$row['element_spr']][0]; // bruto - z vsemi vprasanji - - if ( $expected_vprasanja[$row['element_spr']][1] > $verjetnost_block[$last_block_st-1]) - $verjetnost_block[$last_block_st-1] = $expected_vprasanja[$row['element_spr']][1]; - } - else{ - $sql1 = sisplet_query("SELECT * FROM srv_branching WHERE parent='".$row['element_if']."' ORDER BY vrstni_red ASC"); - while ($row1 = mysqli_fetch_array($sql1)) { - $expected_time_block[$last_block_st-1][0] += $expected_vprasanja[$row1['element_spr']][0] * $expected_vprasanja[$row1['element_spr']][1]; // dejanski - $expected_time_block[$last_block_st-1][1] += $expected_vprasanja[$row1['element_spr']][0]; // bruto - z vsemi vprasanji - $expected_vprasanja[$row1['element_spr']][4] = $label; - - if ( $expected_vprasanja[$row1['element_spr']][1] > $verjetnost_block[$last_block_st-1]) - $verjetnost_block[$last_block_st-1] = $expected_vprasanja[$row1['element_spr']][1]; - } - } - - if($new_block){ - $expected_time_block[$last_block_st-1][0] += GlobalMisc::getMisc('timing_stran') * $verjetnost_block[$last_block_st-1]; // pri dejanskem trajanju strani upostevamo verjetnost najverjetnejsega vprasanja na strani (stran se pojavi z najvisjo verjetnostjo vseh vprasanj na strani) - $expected_time_block[$last_block_st-1][1] += GlobalMisc::getMisc('timing_stran'); - } + + $new_block = $last_block_st != $row['number']; + + if($new_block){ + $last_block_st = $row['number']; + $label = $row['label'] ? $row['label']: $lang['srv_blok'].' '.$last_block_st; + $block_labels_by_number[$last_block_st] = $label; + $expected_time_block[$last_block_st-1][0] = 0; + $expected_time_block[$last_block_st-1][1] = 0; + } + + if(!$row['element_if']){ + $expected_time_block[$last_block_st-1][0] += $expected_vprasanja[$row['element_spr']][0] * $expected_vprasanja[$row['element_spr']][1]; // dejanski + $expected_time_block[$last_block_st-1][1] += $expected_vprasanja[$row['element_spr']][0]; // bruto - z vsemi vprasanji + + if ( !isset($verjetnost_block[$last_block_st-1]) || $expected_vprasanja[$row['element_spr']][1] > $verjetnost_block[$last_block_st-1]) + $verjetnost_block[$last_block_st-1] = $expected_vprasanja[$row['element_spr']][1]; + } + else{ + $sql1 = sisplet_query("SELECT * FROM srv_branching WHERE parent='".$row['element_if']."' ORDER BY vrstni_red ASC"); + while ($row1 = mysqli_fetch_array($sql1)) { + if(array_key_exists($last_block_st, $expected_time_block)){ + $expected_time_block[$last_block_st-1][0] += $expected_vprasanja[$row1['element_spr']][0] * $expected_vprasanja[$row1['element_spr']][1]; // dejanski + $expected_time_block[$last_block_st-1][1] += $expected_vprasanja[$row1['element_spr']][0]; // bruto - z vsemi vprasanji + $expected_vprasanja[$row1['element_spr']][4] = $label; + + if ( !isset($verjetnost_block[$last_block_st-1]) || $expected_vprasanja[$row1['element_spr']][1] > $verjetnost_block[$last_block_st-1]) + $verjetnost_block[$last_block_st-1] = $expected_vprasanja[$row1['element_spr']][1]; + } + } + } + + if($new_block){ + $expected_time_block[$last_block_st-1][0] += GlobalMisc::getMisc('timing_stran') * $verjetnost_block[$last_block_st-1]; // pri dejanskem trajanju strani upostevamo verjetnost najverjetnejsega vprasanja na strani (stran se pojavi z najvisjo verjetnostjo vseh vprasanj na strani) + $expected_time_block[$last_block_st-1][1] += GlobalMisc::getMisc('timing_stran'); + } } // izpis za strani $max = 0; $total = 0; + $total_brez_pogojev = 0; foreach ($expected_time AS $key => $val) { - if ($val[1] > $max) $max = $val[1]; + + if ($val[1] > $max) + $max = $val[1]; + $total += $val[0]; + $total_brez_pogojev += $val[1]; } if ($max == 0) return; @@ -5121,46 +5990,58 @@ class SurveyAdminSettings { return $total; } - $skupni_cas = (bcdiv($total, 60, 0)>0?bcdiv($total, 60, 0).'min ':'').''.round(bcmod($total, 60), 0).'s'; + $skupni_cas = (bcdiv($total, 60, 0)>0?bcdiv($total, 60, 0).'min ':'').''.round(bcmod($total, 60), 0).'s'; + $skupni_cas_brez_pogojev = (bcdiv($total_brez_pogojev, 60, 0)>0?bcdiv($total_brez_pogojev, 60, 0).'min ':'').''.round(bcmod($total_brez_pogojev, 60), 0).'s'; if ($samo_izracunaj_skupini_cas == 1) return $skupni_cas; - echo '
    '; - echo '
    '.$lang['srv_total_trajanje'].''; - echo '

    '.$lang['srv_dejansko_trajanje'].': '.$skupni_cas.'

    '; + echo '

    '.$lang['srv_dejansko_trajanje'].':

    '; + echo '

    '.$skupni_cas.'

    '; echo '
    '; - echo '
    '; - echo '
    '.$lang['srv_casi_po_straneh'].''; - echo ''; + echo '
    '; + + echo ''; + echo ''; + echo ''; + echo ''; + foreach ($expected_time AS $vrstni_red => $time) { $sql = sisplet_query("SELECT naslov FROM srv_grupa WHERE vrstni_red='$vrstni_red' AND ank_id = '$this->anketa'"); $row = mysqli_fetch_array($sql); + $naslov = isset($row['naslov']) && $row['naslov'] != '' ? $row['naslov'] : $lang['srv_intro_label']; echo ''; - echo ''; - - echo ''; + + echo ''; + + echo ''; echo ''; } - echo ''; - echo ''; - + echo ''; echo '
    '.$lang['srv_casi_po_straneh_stran'].''.$lang['srv_neto_t_cas'].' / '.$lang['srv_bruto_t_cas'].'
    '.($row['naslov']!=''?$row['naslov']:$lang['srv_intro_label']).''; - echo '
     
    '; - if ((($time[1]-$time[0])/$max*85) > 0) - echo '
     
    '; - echo ' '.($time[0]<60?round($time[0],1).'s ':round($time[0]/60,1).'min ').'/ '.($time[1]<60?round($time[1],1).'s ':round($time[1]/60,1).'min ').''; + echo '
    '.$naslov.''; + echo ($time[0]<60?round($time[0],1).'s ':round($time[0]/60,1).'min ').'/ '.($time[1]<60?round($time[1],1).'s ':round($time[1]/60,1).'min ').''; + echo ''; + echo '
    '; + + echo '
    '; + if ((($time[1]-$time[0])/$max*85) > 0) + echo '
    '; + + echo '
    '; echo '
    '.$lang['srv_anl_suma1'].': '.(bcdiv($total, 60, 0)>0?bcdiv($total, 60, 0).'min ':'').''.round(bcmod($total, 60), 0).'s
    '.$lang['srv_casi_po_vprasanjih_skupaj'].''.$skupni_cas.' / '.$skupni_cas_brez_pogojev.'
    '; - echo '

     
    - '.$lang['srv_neto_t_cas'].''; - echo '
     
    - '.$lang['srv_bruto_t_cas'].'

    '; + echo '
    '; + echo '
    '.$lang['srv_neto_t_cas'].''; + echo '
    '.$lang['srv_bruto_t_cas'].''; + echo '
    '; echo '
    '; @@ -5176,15 +6057,21 @@ class SurveyAdminSettings { $prevstran = false; - echo '
    '; - echo '
    '.$lang['srv_casi_po_vprasanjih_strani'].''; - echo ''; - echo ''; + + echo '
    '.$lang['srv_bruto_v_cas'].''.$lang['srv_verjetnost_pojavitve'].''.$lang['srv_neto_v_cas'].'
    '; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + foreach ($expected_vprasanja AS $vprasanje) { if (!$prevstran || $prevstran != $vprasanje[3]) { - echo ''; + echo ''; $prevstran = $vprasanje[3]; } @@ -5192,102 +6079,156 @@ class SurveyAdminSettings { $verjetnost = $vprasanje[1]; $neto = $bruto * $verjetnost; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + + echo ''; + echo ''; } - echo ''; + echo ''; echo '
    '.$lang['srv_casi_po_straneh_stran'].'/'.$lang['srv_casi_po_vprasanjih_vprasanje'].''.$lang['srv_bruto_v_cas'].''.$lang['srv_verjetnost_pojavitve'].''.$lang['srv_neto_v_cas'].'/'.$lang['srv_bruto_v_cas_long'].'
    '.$vprasanje[3].'
    '.$vprasanje[3].'
    '.skrajsaj($vprasanje[2], 30).''.round($bruto, 1).'s'.round($verjetnost*100, 2).'%'.round($neto, 1).'s'; - echo '
     
    '; + echo '
    '.skrajsaj($vprasanje[2], 30).''.round($bruto, 1).'s'.round($verjetnost*100, 2).'%'; + echo round($neto, 1).'s / '.round($bruto, 1).'s'; + echo ''; + echo '
    '; + + echo '
    '; if (($bruto-$neto)/$max*85 > 0) - echo '
     
    '; - echo ' '.round($neto, 1).'s / '.round($bruto, 1).'s'; + echo '
    '; + + echo '
    '; echo '
    '.(bcdiv($bruto_total, 60, 0)>0?bcdiv($bruto_total, 60, 0).'min ':'').''.round(bcmod($bruto_total, 60), 0).'s'.(bcdiv($neto_total, 60, 0)>0?bcdiv($neto_total, 60, 0).'min ':'').''.round(bcmod($neto_total, 60), 0).'s
    '.$lang['srv_casi_po_vprasanjih_skupaj'].''.(bcdiv($bruto_total, 60, 0)>0?bcdiv($bruto_total, 60, 0).'min ':'').''.round(bcmod($bruto_total, 60), 0).'s'.(bcdiv($neto_total, 60, 0)>0?bcdiv($neto_total, 60, 0).'min ':'').''.round(bcmod($neto_total, 60), 0).'s / '.(bcdiv($bruto_total, 60, 0)>0?bcdiv($bruto_total, 60, 0).'min ':'').''.round(bcmod($bruto_total, 60), 0).'s
    '; + + echo '
    '; + echo '
    '.$lang['srv_neto_v_cas'].''; + echo '
    '.$lang['srv_bruto_v_cas_long'].''; + echo '
    '; + echo '
    '; - //CASI PO BLOKIH - if($block_spr_data){ - // izpis za bloke - $maxb = 0; - $totalb = 0; - foreach ($expected_time_block AS $key => $val) { - if ($val[1] > $maxb) $maxb = $val[1]; - $totalb += $val[0]; - } - - echo '
    '; - echo '
    '.$lang['srv_casi_po_blokih'].''; - echo ''; - - foreach ($expected_time_block AS $vrstni_red => $time) { - echo ''; - echo ''; - - echo ''; - - echo ''; - } - echo ''; - echo ''; + //CASI PO BLOKIH + if($block_spr_data){ + // izpis za bloke + $maxb = 0; + $totalb = 0; + foreach ($expected_time_block AS $key => $val) { + if ($val[1] > $maxb) $maxb = $val[1]; + $totalb += $val[0]; + } + + echo '
    '.$lang['srv_casi_po_blokih'].''; + echo '
    '.$block_labels_by_number[$vrstni_red+1].''; - echo '
     
    '; - if ((($time[1]-$time[0])/$maxb*85) > 0) - echo '
     
    '; - echo ' '.($time[0]<60?round($time[0],1).'s ':round($time[0]/60,1).'min ').'/ '.($time[1]<60?round($time[1],1).'s ':round($time[1]/60,1).'min ').''; - echo '
    '.$lang['srv_anl_suma1'].': '.(bcdiv($totalb, 60, 0)>0?bcdiv($totalb, 60, 0).'min ':'').''.round(bcmod($totalb, 60), 0).'s
    '; - echo '
    '; + echo ''; + echo ''.$lang['srv_casi_po_blokih_blok'].''; + echo ''.$lang['srv_neto_t_cas'].' / '.$lang['srv_bruto_t_cas'].''; + echo ''; - echo '

     
    - '.$lang['srv_neto_t_cas'].''; - echo '
     
    - '.$lang['srv_bruto_t_cas'].'

    '; + foreach ($expected_time_block AS $vrstni_red => $time) { + echo ''; + echo ''.$block_labels_by_number[$vrstni_red+1].''; - echo '
    '; - - - // izpis za vprasanja po blokih - $max = 0; - $bruto_total = 0; - $neto_total = 0; - foreach ($expected_vprasanja AS $vpr) { - if($vpr[4]){ - if ($vpr[0] > $max) $max = $vpr[0]; - $bruto_total += $vpr[0]; - $neto_total += $vpr[0] * $vpr[1]; - } - } + echo ''; + echo ($time[0]<60?round($time[0],1).'s ':round($time[0]/60,1).'min ').'/ '.($time[1]<60?round($time[1],1).'s ':round($time[1]/60,1).'min ').''; + echo ''; - $prevstran = false; - - echo '
    '; - - echo '
    '.$lang['srv_casi_po_vprasanjih_bloki'].''; - echo ''; - echo ''; - foreach ($expected_vprasanja AS $vprasanje) { - if($vprasanje[4]){ - if (!$prevstran || $prevstran != $vprasanje[4]) { - echo ''; - $prevstran = $vprasanje[4]; - } - - $bruto = $vprasanje[0]; - $verjetnost = $vprasanje[1]; - $neto = $bruto * $verjetnost; - - echo ''; - echo ''; - echo ''; - } - } - echo ''; - echo '
    '.$lang['srv_bruto_v_cas'].''.$lang['srv_verjetnost_pojavitve'].''.$lang['srv_neto_v_cas'].'
    '.$vprasanje[4].'
    '.skrajsaj($vprasanje[2], 30).''.round($bruto, 1).'s'.round($verjetnost*100, 2).'%'.round($neto, 1).'s'; - echo '
     
    '; - if (($bruto-$neto)/$max*85 > 0) - echo '
     
    '; - echo ' '.round($neto, 1).'s / '.round($bruto, 1).'s'; - echo '
    '.(bcdiv($bruto_total, 60, 0)>0?bcdiv($bruto_total, 60, 0).'min ':'').''.round(bcmod($bruto_total, 60), 0).'s'.(bcdiv($neto_total, 60, 0)>0?bcdiv($neto_total, 60, 0).'min ':'').''.round(bcmod($neto_total, 60), 0).'s
    '; - echo '
    '; - } + echo ''; + echo '
    '; + echo '
    '; + if ((($time[1]-$time[0])/$maxb*85) > 0) + echo '
    '; + echo '
    '; + echo ''; + + echo ''; + } + echo ''.$lang['srv_casi_po_vprasanjih_skupaj'].''.(bcdiv($totalb, 60, 0)>0?bcdiv($totalb, 60, 0).'min ':'').''.round(bcmod($totalb, 60), 0).'s'; + + echo ''; + + echo '
    '; + echo '
    '.$lang['srv_neto_t_cas'].''; + echo '
    '.$lang['srv_bruto_t_cas'].''; + echo '
    '; + + echo '
    '; + + + // izpis za vprasanja po blokih + $max = 0; + $bruto_total = 0; + $neto_total = 0; + foreach ($expected_vprasanja AS $vpr) { + if($vpr[4]){ + if ($vpr[0] > $max) $max = $vpr[0]; + $bruto_total += $vpr[0]; + $neto_total += $vpr[0] * $vpr[1]; + } + } + + $prevstran = false; + + echo '
    '.$lang['srv_casi_po_vprasanjih_bloki'].''; + + echo ''; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + foreach ($expected_vprasanja AS $vprasanje) { + + if($vprasanje[4]){ + if (!$prevstran || $prevstran != $vprasanje[4]) { + echo ''; + $prevstran = $vprasanje[4]; + } + + $bruto = $vprasanje[0]; + $verjetnost = $vprasanje[1]; + $neto = $bruto * $verjetnost; + + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + + echo ''; + + echo ''; + } + + } + echo ''; + echo '
    '.$lang['srv_casi_po_straneh_stran'].'/'.$lang['srv_casi_po_vprasanjih_vprasanje'].''.$lang['srv_bruto_v_cas'].''.$lang['srv_verjetnost_pojavitve'].''.$lang['srv_neto_v_cas'].'/'.$lang['srv_bruto_v_cas_long'].'
    '.$vprasanje[4].'
    '.skrajsaj($vprasanje[2], 30).''.round($bruto, 1).'s'.round($verjetnost*100, 2).'%'; + echo round($neto, 1).'s / '.round($bruto, 1).'s'; + echo ''; + echo '
    '; + + echo '
    '; + if (($bruto-$neto)/$max*85 > 0) + echo '
    '; + + echo '
    '; + echo '
    '.$lang['srv_casi_po_vprasanjih_skupaj'].''.(bcdiv($bruto_total, 60, 0)>0?bcdiv($bruto_total, 60, 0).'min ':'').''.round(bcmod($bruto_total, 60), 0).'s'.(bcdiv($neto_total, 60, 0)>0?bcdiv($neto_total, 60, 0).'min ':'').''.round(bcmod($neto_total, 60), 0).'s / '.(bcdiv($bruto_total, 60, 0)>0?bcdiv($bruto_total, 60, 0).'min ':'').''.round(bcmod($bruto_total, 60), 0).'s
    '; + + echo '
    '; + echo '
    '.$lang['srv_neto_v_cas'].''; + echo '
    '.$lang['srv_bruto_v_cas_long'].''; + echo '
    '; + + echo '
    '; + } } /** @@ -5323,21 +6264,24 @@ class SurveyAdminSettings { if ($row1['tip'] <= 3 || $row1['tip'] == 6 || $row1['tip'] == 16 || $row1['tip'] == 17 || $row1['tip'] == 18 || $row1['tip'] == 19 || $row1['tip'] == 20) { $sql2 = sisplet_query("SELECT naslov FROM srv_vrednost WHERE spr_id='$row1[id]'"); - //for those types we have max time option - if($row1['tip'] == 3){ - while ($row2 = mysqli_fetch_array($sql2)) { - $expected_time_temp += strlen(strip_tags($row2['naslov'])) * GlobalMisc::getMisc('timing_kategorija_'.$row1['tip']) / 100; - } - //if time is greater than max time, use max time - $max_time = GlobalMisc::getMisc('timing_kategorija_max_'.$row1['tip']); - $expected_time += ($max_time > $expected_time_temp) ? $expected_time_temp : $max_time; - } - //types that doesnt have max time option - else{ - while ($row2 = mysqli_fetch_array($sql2)) { - $expected_time += strlen(strip_tags($row2['naslov'])) * GlobalMisc::getMisc('timing_kategorija_'.$row1['tip']) / 100; - } - } + + //for those types we have max time option + if($row1['tip'] == 3){ + $expected_time_temp = 0; + + while ($row2 = mysqli_fetch_array($sql2)) { + $expected_time_temp += strlen(strip_tags($row2['naslov'])) * GlobalMisc::getMisc('timing_kategorija_'.$row1['tip']) / 100; + } + //if time is greater than max time, use max time + $max_time = GlobalMisc::getMisc('timing_kategorija_max_'.$row1['tip']); + $expected_time += (isset($expected_time_temp) && $max_time > $expected_time_temp) ? $expected_time_temp : $max_time; + } + //types that doesnt have max time option + else{ + while ($row2 = mysqli_fetch_array($sql2)) { + $expected_time += strlen(strip_tags($row2['naslov'])) * GlobalMisc::getMisc('timing_kategorija_'.$row1['tip']) / 100; + } + } } return $expected_time; @@ -5516,15 +6460,20 @@ class SurveyAdminSettings { SurveyUserSetting :: getInstance()->Init($this->anketa, $global_user_id); // nastavitve iz popupa - $rezanje = SurveyUserSetting::getInstance()->getSettings('rezanje'); if ($rezanje == '') $rezanje = 1; + $rezanje = SurveyUserSetting::getInstance()->getSettings('rezanje'); if ($rezanje == '') $rezanje = 0; $rezanje_meja_sp = SurveyUserSetting::getInstance()->getSettings('rezanje_meja_sp'); if ($rezanje_meja_sp == '') $rezanje_meja_sp = 5; $rezanje_meja_zg = SurveyUserSetting::getInstance()->getSettings('rezanje_meja_zg'); if ($rezanje_meja_zg == '') $rezanje_meja_zg = 5; $rezanje_predvidena_sp = SurveyUserSetting::getInstance()->getSettings('rezanje_predvidena_sp'); if ($rezanje_predvidena_sp == '') $rezanje_predvidena_sp = 10; $rezanje_predvidena_zg = SurveyUserSetting::getInstance()->getSettings('rezanje_predvidena_zg'); if ($rezanje_predvidena_zg == '') $rezanje_predvidena_zg = 200; $rezanje_preskocene = SurveyUserSetting::getInstance()->getSettings('rezanje_preskocene'); if ($rezanje_preskocene == '') $rezanje_preskocene = 1; + $get_predvideni = isset($_GET['predvideni']) ? $_GET['predvideni'] : ''; + $get_prikazi01 = isset($_GET['prikazi01']) ? $_GET['prikazi01'] : ''; + $get_pages = isset($_GET['pages']) ? $_GET['pages'] : ''; + + /* ++ Predvideni casi */ - if ($_GET['predvideni'] == 1 || $rezanje == 1) { + if ($get_predvideni == 1 || $rezanje == 1) { $expected_time = array(); $expected_vprasanja = array(); $verjetnost = array(); @@ -5559,7 +6508,7 @@ class SurveyAdminSettings { $expected_time[$row['vrstni_red']][0] += $expected_vprasanja[$row1['id']][0] * $expected_vprasanja[$row1['id']][1]; // dejanski $expected_time[$row['vrstni_red']][1] += $expected_vprasanja[$row1['id']][0]; // bruto - z vsemi vprasanji - if ( $expected_vprasanja[$row1['id']][1] > $verjetnost[$row['vrstni_red']]) + if (!isset($verjetnost[$row['vrstni_red']]) || $expected_vprasanja[$row1['id']][1] > $verjetnost[$row['vrstni_red']]) $verjetnost[$row['vrstni_red']] = $expected_vprasanja[$row1['id']][1]; } @@ -5594,9 +6543,14 @@ class SurveyAdminSettings { $sql = sisplet_query("SELECT ug.usr_id, UNIX_TIMESTAMP(ug.time_edit) AS time_edit_u, g.vrstni_red FROM srv_user_grupa".$this->db_table." ug, srv_grupa g, srv_user u WHERE ug.usr_id=u.id AND u.last_status IN ($status) $lurker AND ug.gru_id=g.id AND g.ank_id='$this->anketa' ORDER BY usr_id, gru_id"); if (!$sql) echo mysqli_error($GLOBALS['connect_db']); if (mysqli_num_rows($sql) == 0) { + if ($samo_izracunaj_skupini_cas == 1) { return null; - } else { + } + elseif ($samo_izracunaj_skupini_cas == 2) { + return array(null, null); + } + else { echo '
    '.$lang['srv_analiza_no_entry'].'
    '; } } @@ -5636,35 +6590,25 @@ class SurveyAdminSettings { $casi = array(); foreach ($user_grupa AS $usr_id => $val) { - //$sql = sisplet_query("SELECT recnum, time_insert, UNIX_TIMESTAMP(time_insert) AS time_insert_u FROM srv_user WHERE id = '$usr_id'"); - //$row = mysqli_fetch_array($sql); - $row = $cache_row[$usr_id]; + $row = isset($cache_row[$usr_id]) ? $cache_row[$usr_id] : array(); + $row1 = isset($cache_row1[$usr_id]) ? $cache_row1[$usr_id] : array(); - //$sql1 = sisplet_query("SELECT time_edit, UNIX_TIMESTAMP(time_edit) AS time_edit_u FROM srv_user_grupa".$this->db_table." WHERE usr_id = '$usr_id' AND gru_id = '0'"); - //$row1 = mysqli_fetch_array($sql1); - $row1 = $cache_row1[$usr_id]; - - //echo $row1['time_edit'].' ('.($row1['time_edit_u'] - strtotime($row1['time_edit'])).') - '.$row['time_insert'].' ('.($row['time_insert_u'] - strtotime($row['time_insert'])).')
    '; - $prev = ($row1['time_edit'] != '' ? $row1['time_edit_u'] : $row['time_insert_u']); + $prev = (isset($row1['time_edit']) && $row1['time_edit'] != '' ? $row1['time_edit_u'] : $row['time_insert_u']); // nagovor - //if ($row1['time_edit'] != '') $casi[0][$usr_id] = $this->diff($row1['time_edit'], $row['time_insert']); - if ($row1['time_edit'] != '') $casi[0][$usr_id] = abs($row1['time_edit_u'] - $row['time_insert_u']); + if (isset($row1['time_edit']) && $row1['time_edit'] != '') $casi[0][$usr_id] = abs($row1['time_edit_u'] - $row['time_insert_u']); - if ($row['recnum'] > 0) { // zapisi brez recnuma ne pridejo v poštev, ker nimajo pravih časov + if (isset($row['recnum']) && $row['recnum'] > 0) { // zapisi brez recnuma ne pridejo v poštev, ker nimajo pravih časov foreach ($val AS $vrstni_red => $time_edit) { - - //$casi[$vrstni_red][$usr_id] = $this->diff($time_edit, $prev); - $casi[$vrstni_red][$usr_id] = abs($time_edit - $prev); - - $prev = $time_edit; - + + $casi[$vrstni_red][$usr_id] = abs($time_edit - $prev); + + $prev = $time_edit; } } } // porezemo zgornjih in spodnjih 5% casov vsake strani - //if (isset($_GET['truncate'])) $truncate = ((int)$_GET['truncate'])/100; else $truncate = 0.05; $spodnja = $rezanje_meja_sp / 100; $zgornja = $rezanje_meja_zg / 100; @@ -5695,23 +6639,27 @@ class SurveyAdminSettings { } } - - //foreach ($casi AS $key => $val) { echo $key.': '; foreach ($val AS $k => $v) { echo $v.', '; } echo '
    '; } - + // izracunamo povprecne case $sql = sisplet_query("SELECT MAX(vrstni_red) AS max FROM srv_grupa WHERE ank_id = '$this->anketa'"); $row = mysqli_fetch_array($sql); $count = array(); - $count_bruto = array(); $povprecni_casi = array(); - $povprecni_casi_bruto = array(); - $max_time = 0; - for ($i=0; $i<=$row['max']; $i++) $povprecni_casi[$i] = 0; - foreach ($casi AS $vrstni_red => $val) { + $user_casi = array(); + + $max_time_on_page = 0; + + // Na zacetku nastavimo vse povprecne case po straneh na 0 + for ($i=0; $i<=$row['max']; $i++){ + $povprecni_casi[$i] = 0; + } + + // Loop po vseh straneh + foreach ($casi AS $vrstni_red => $uporabniki_na_strani) { - // pogledamo za preskocene strani + // pogledamo za preskocene strani - samo ce nimamo nastavljeno, da se uposteva preskocene kot 0s $preskocene = array(); if ($rezanje_preskocene == 0) { $sqlp = sisplet_query("SELECT ug.usr_id FROM srv_user_grupa".$this->db_table." ug, srv_grupa g WHERE g.id=ug.gru_id AND g.vrstni_red='$vrstni_red' AND ug.preskocena='1'"); @@ -5720,1400 +6668,612 @@ class SurveyAdminSettings { } } - foreach ($casi[$vrstni_red] AS $usr_id => $time) { - if (!in_array($usr_id, $preskocene)) { - $povprecni_casi_bruto[$vrstni_red] += $time; // bruto so kao brez upoštevanja strani ki so se preskocile (0s, 1s) - $count_bruto[$vrstni_red] ++; // to je dejansko trajanje strani, ce uporabnik pride nanjo - } - if (!in_array($usr_id, $preskocene) || $rezanje_preskocene==1) { - $povprecni_casi[$vrstni_red] += $time; // neto je kao povprecno trajanje strani in uposteva tudi 0s, 1s ce se je preskocilo - $count[$vrstni_red] ++; // ta cas pride potem dejansko krajsi od bruto casa - } - if ($time > $max_time) $max_time = $time; + // Loop po vseh uporabnikih na strani (cas, ki ga je prezivel na trenutni strani) + foreach ($uporabniki_na_strani AS $usr_id => $time) { + + // Racunanje casov - eliminiramo preskocene samo ce imamo to nastavitev vklopljeno + //if (!in_array($usr_id, $preskocene) || $rezanje_preskocene==1) { + + // neto je kao povprecno trajanje strani in uposteva tudi 0s, 1s ce se je preskocilo + if(isset($povprecni_casi[$vrstni_red])) + $povprecni_casi[$vrstni_red] += $time; + else + $povprecni_casi[$vrstni_red] = $time; + + // Pristejemo cas userja + if(isset($user_casi[$usr_id])) + $user_casi[$usr_id] += $time; + else + $user_casi[$usr_id] = $time; + //} + + // Zabelezimo najdaljsi obisk strani + if ($time > $max_time_on_page) + $max_time_on_page = $time; } + + // Izracunamo povprecje na strani + if (count($uporabniki_na_strani) > 0){ + $povprecni_casi[$vrstni_red] = $povprecni_casi[$vrstni_red] / count($uporabniki_na_strani); + } + + $count[$vrstni_red] = count($casi[$vrstni_red]); } - foreach ($povprecni_casi AS $vrstni_red => $time) { - if ($count[$vrstni_red] > 0) - $povprecni_casi[$vrstni_red] = $time / $count[$vrstni_red]; - } - - foreach ($povprecni_casi_bruto AS $vrstni_red => $time) { - if ($count_bruto[$vrstni_red] > 0) - $povprecni_casi_bruto[$vrstni_red] = $time / $count_bruto[$vrstni_red]; - } - + // Loop po povprecnih casih in dobimo najvecji povprecni cas in celoten cas $max = 0; - $total = 0; - $total_predvideni = 0; + $total_povprecni_cas = 0; + $total_predvideni_cas = 0; foreach ($povprecni_casi AS $key => $val) { - if ($val > $max) $max = $val; - $total += $val; - } - /*foreach ($povprecni_casi AS $key => $val) { - if ($val > $max) $max = $val; - //$total += $val; - }*/ - if ($_GET['predvideni'] == 1) { + + // Shranimo vecji povprecni cas + if ($val > $max) + $max = $val; + + // Pristejemo povprecni cas strani celotnemu povprecnemu casu + $total_povprecni_cas += $val; + } + + if ($get_predvideni == 1) { if ($rezanje_preskocene == 1) { foreach ($expected_time AS $key => $val) { if ($val[0] > $max) $max = $val[0]; - $total_predvideni += $val[0]; + $total_predvideni_cas += $val[0]; } } else { foreach ($expected_time AS $key => $val) { if ($val[1] > $max) $max = $val[1]; - $total_predvideni += $val[1]; + $total_predvideni_cas += $val[1]; } } } + - if ($max == 0) return; - - if ($samo_izracunaj_skupini_cas == 1) - return (bcdiv($total, 60, 0)>0?bcdiv($total, 60, 0).'min ':'').''.round(bcmod($total, 60), 0).'s'; - + // Izracunamo mediano, min in max cas na anketi + $total_median_cas = 0; + $total_min_cas = 0; + $total_max_cas = 0; + + // Sortiramo case uporabnikov po velikosti + sort($user_casi, SORT_NUMERIC); + $user_count = count($user_casi); + + // Dobimo index srednjega elementa + $user_median_index = floor($user_count / 2); + + // Liho stevilo userjev - dobimo mediano - vrednost srednjega + if ($user_count % 2 === 1) { + $total_median_cas = $user_casi[$user_median_index]; + } + // Sodo stevilo - izracunamo mediano iz srednjih dveh + else { + if(isset($user_casi[$user_median_index-1])) + $total_median_cas = ($user_casi[$user_median_index-1] + $user_casi[$user_median_index]) / 2; + else + $total_median_cas = $user_casi[$user_median_index]; + } + + // Zabelezimo min in max cas uporabnika na anketi + $total_min_cas = $user_casi[0]; + $total_max_cas = $user_casi[$user_count-1]; + + + if ($max == 0) + return; + // izpis - echo '
    '; + $skupni_cas = (bcdiv($total_povprecni_cas, 60, 0) > 0 ? bcdiv($total_povprecni_cas, 60, 0).'min ':'').''.round(bcmod($total_povprecni_cas, 60), 0).'s'; + $predviden_cas = (bcdiv($total_predvideni_cas, 60, 0)>0?bcdiv($total_predvideni_cas, 60, 0).'min ':'').''.round(bcmod($total_predvideni_cas, 60), 0); + + $mediana = (bcdiv($total_median_cas, 60, 0) > 0 ? bcdiv($total_median_cas, 60, 0).'min ':'').''.round(bcmod($total_median_cas, 60), 0).'s'; + $minimum = (bcdiv($total_min_cas, 60, 0) > 0 ? bcdiv($total_min_cas, 60, 0).'min ':'').''.round(bcmod($total_min_cas, 60), 0).'s'; + $maximum = (bcdiv($total_max_cas, 60, 0) > 0 ? bcdiv($total_max_cas, 60, 0).'min ':'').''.round(bcmod($total_max_cas, 60), 0).'s'; + $numerus = $user_count; + + + // Ce izipsujemo samo dejanski cas na nekem drugem mestu + if ($samo_izracunaj_skupini_cas > 0){ + + // Vracamo array tudi z mediano + if($samo_izracunaj_skupini_cas == 2) + return array($skupni_cas, $mediana); + else + return $skupni_cas; + } + + + // Prvi segment - dejansko trajanje, mediana... + echo '
    '.$lang['srv_total_trajanje'].''; + echo '

    '.$lang['srv_dejansko_trajanje_real'].':

    '; + echo '

    '.$skupni_cas.'

    '; + + echo '

    '.$lang['median'].':

    '; + echo '

    '.$mediana.'

    '; + + echo '

    Min:

    '; + echo '

    '.$minimum.'

    '; + + echo '

    Max:

    '; + echo '

    '.$maximum.'

    '; + + echo '

    '.$lang['numerus'].':

    '; + echo '

    '.$numerus.'

    '; + + echo '
    '; + + echo '
    '.$lang['srv_dejanski_casi'].''; - echo ''; - echo ''; + + echo '

    '; + + echo '
    '; - echo ''; - echo ''.$lang['srv_stevilo_enot'].'
    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; foreach ($povprecni_casi AS $vrstni_red => $time) { + $naslov = $lang['srv_intro_label']; + $sql = sisplet_query("SELECT naslov FROM srv_grupa WHERE vrstni_red='$vrstni_red' AND ank_id = '$this->anketa'"); - $row = mysqli_fetch_array($sql); - - $bruto = $povprecni_casi_bruto[$vrstni_red]; - + if(mysqli_num_rows($sql) > 0){ + $row = mysqli_fetch_array($sql); + + if($row['naslov'] != '') + $naslov = $row['naslov']; + } + echo ''; - echo ''; - - echo ''; + echo ''; - echo ''; - - echo ''; - - if ($_GET['predvideni'] == 1) { + echo ''; - echo ''; - - echo ''; - echo ''; - echo ''; + + echo '
    '; } + + echo ''; + echo ''; + + echo ''; + + echo ''; } - if ($_GET['predvideni'] != 1) - echo ''; - echo ''; - echo '
    '.$lang['srv_casi_po_straneh_stran'].''.$lang['srv_neto_v_cas']; + + if ($get_predvideni == 1) { + echo ' / '.$lang['srv_testiranje_predvidenicas_1']; + } + echo ''.$lang['srv_stevilo_enot'].'
    '.($row['naslov']!=''?$row['naslov']:$lang['srv_intro_label']).''; - echo '
     
    '; - //if ($bruto-$time > 0) - //echo '
     
    '; - echo ' '.($time<60?round($time,1).'s ':round($time/60,1).'min ')./*'/ '.($bruto<60?round($bruto,1).'s ':round($bruto/60,1).'min ').''.*/''; + echo '
    '.$naslov.''.($time<60 ? round($time,1).'s ' : round($time/60,1).'min '); + if ($get_predvideni == 1) { + if ($rezanje_preskocene == 1) + $time = $expected_time[$vrstni_red][0]; + else + $time = $expected_time[$vrstni_red][1]; + + echo ' / '.($time<60 ? round($time,1).'s ' : round($time/60,1).'min ').''; + } echo ''.$count[$vrstni_red]./*' / '.$count_bruto[$vrstni_red].''.*/'
    '; + echo '
    '; + echo '
    '; + + if ($get_predvideni == 1) { if ($rezanje_preskocene == 1) $time = $expected_time[$vrstni_red][0]; else $time = $expected_time[$vrstni_red][1]; - echo '
    '.($row['naslov']!=''?$row['naslov']:$lang['srv_intro_label']).''; - echo '
     
    '; - //if ((($time[1]-$time[0])/$max*85) > 0) - // echo '
     
    '; - echo ' '.($time<60?round($time,1).'s ':round($time/60,1).'min ')./*'/ '.($time[1]<60?round($time[1],1).'s ':round($time[1]/60,1).'min ').''.*/''; - echo '
    '.(isset($count[$vrstni_red]) ? $count[$vrstni_red] : 0).'
    '.$lang['srv_anl_suma1'].': '.(bcdiv($total, 60, 0)>0?bcdiv($total, 60, 0).'min ':'').''.round(bcmod($total, 60), 0).'s'; - if ($_GET['predvideni'] == 1) echo ' / '.$lang['srv_skupaj_predvideni'].': '.(bcdiv($total_predvideni, 60, 0)>0?bcdiv($total_predvideni, 60, 0).'min ':'').''.round(bcmod($total_predvideni, 60), 0).'s'; - echo '
    '; - - if ($_GET['predvideni'] == 1) { - echo '

     
    - '.$lang['srv_neto_t_cas'].''; - echo '
     
    - '.$lang['srv_testiranje_predvidenicas'].'

    '; + echo ''.$lang['srv_anl_suma1'].''.$skupni_cas; + if ($get_predvideni == 1) { + if ($rezanje_preskocene == 1) + $time = $expected_time[$vrstni_red][0]; + else + $time = $expected_time[$vrstni_red][1]; + + echo ' / '.$predviden_cas.'s'; } + echo ''; - echo '
    '; + echo ''; + + echo ''; + + echo '
    '; + echo '
    '.$lang['srv_neto_t_cas'].''; + if ($get_predvideni == 1) + echo '
    '.$lang['srv_testiranje_predvidenicas_1'].''; + echo '
    '; - if ($max_time > 1000 && $admin_type > 0) return; // pridejo prevelike tabele + echo '
    '; + - if ($_GET['prikazi01'] == 1) - $t_min = 0; - else - $t_min = 2; + // pridejo prevelike tabele + if ($max_time_on_page > 1000 && $admin_type > 0) + return; + // izpis histograma casov za vsako stran - echo '
    '.$lang['srv_frekvencna_porazdelitev'].''; - - echo '

    '; - echo ' '; - echo '

    '; + echo '
    '.$lang['srv_frekvencna_porazdelitev'].''; + + echo '
    '; + + echo '
    '; + echo ''; + echo '
    '; if ($rezanje_preskocene == 1) { - echo '

    '; - echo ' '; - echo '

    '; + echo '
    '; + echo ' '; + echo '
    '; } + + echo '
    '; - // zdruzimo vse case po straneh na en graf - if ($_GET['pages'] != '1') { - $casi2 = array(); - $casi2[0] = array(); - foreach ($casi AS $key => $val) { - foreach ($val AS $k => $v) { - if (isset($casi2[0][$k])) - $casi2[0][$k] += $v; + + // Zdruzimo vse case po straneh na en histogram + if ($get_pages != '1') { + + // Dobimo case resevanja celotne ankete - po respondentih + $skupni_casi = array(); + + // Loop po posameznih straneh - sestejemo case po straneh na skupni cas na anketi + foreach ($casi AS $stran => $casi_na_strani) { + + // Loop po vseh casih na strani + foreach ($casi_na_strani AS $usr_id => $cas_na_strani) { + + if (isset($skupni_casi[$usr_id])) + $skupni_casi[$usr_id] += $cas_na_strani; else - $casi2[0][$k] = $v; - //array_push($casi2[0], $v); - } - } - $casi = $casi2; - $max_time = 0; - foreach ($casi[0] AS $k => $v) - if ($v > $max_time) $max_time = $v; - } - - $minute = true; - if ($minute) { // minute - foreach ($casi AS $k => $page) { - foreach ($page AS $key => $val) { - $casi[$k][$key] = (int) round($val / 60, 0); + $skupni_casi[$usr_id] = $cas_na_strani; } } - $max_time = (int) round($max_time / 60, 0); - } - - foreach ($casi AS $key => $val) { - - if ($_GET['pages'] == '1') { - $sql = sisplet_query("SELECT naslov FROM srv_grupa WHERE vrstni_red='$key' AND ank_id='$this->anketa'"); - $row = mysqli_fetch_array($sql); - echo '

    '.($row['naslov']!=''?$row['naslov']:$lang['srv_intro_label']).'

    '; - } - - echo ''; - - $histogram = array(); - for ($t=0; $t<=$max_time; $t++) $histogram[$t] = 0; - foreach ($val AS $k => $v) { - if ($v >= $t_min) $histogram[$v]++; + + // Nastavimo se min cas in max cas na anketi + $max_cas_na_anketi = 0; + $min_cas_na_anketi = 0; + foreach ($skupni_casi AS $usr_id => $cas_na_anketi){ + + if ($cas_na_anketi > $max_cas_na_anketi) + $max_cas_na_anketi = $cas_na_anketi; + + if ($cas_na_anketi < $min_cas_na_anketi || $min_cas_na_anketi == 0) + $min_cas_na_anketi = $cas_na_anketi; } - $max_stran = 0; - $max_stran_time = 0; - foreach ($histogram AS $k => $v) { - if ($v > $max_stran) $max_stran = $v; - if ($v > 0) $max_stran_time = $k; + + // Pretvorimo v minute + foreach ($skupni_casi AS $usr_id => $cas_na_anketi) { + $skupni_casi[$usr_id] = (int) round($cas_na_anketi / 60, 0); } + $max_cas_na_anketi = (int) round($max_cas_na_anketi / 60, 0); + $min_cas_na_anketi = (int) round($min_cas_na_anketi / 60, 0); + + if($get_prikazi01 == 1) + $min_cas_na_anketi = 0; + else + $min_cas_na_anketi = 2; + + // Pripravimo podatke za histogram + $histogram_data = array(); - - if ($max_stran != 0) { - - for ($t=$t_min; $t<=$max_time; $t++) { - - echo ''; - } + // Napolnimo vrednosti 0 na vsakem koraku (minuti) + for ($t=0; $t<=$max_cas_na_anketi; $t++) + $histogram_data[$t] = 0; + + // Napolnimo vrednosti v histogram in dobimo najvecjo vrednost + $histogram_max_data = 0; + foreach ($skupni_casi AS $usr_id => $cas_na_anketi) { + $histogram_data[$cas_na_anketi]++; + + if($histogram_data[$cas_na_anketi] > $histogram_max_data) + $histogram_max_data = $histogram_data[$cas_na_anketi]; } - - echo ''; - - - if ($max_time <= 20) { - for ($t=$t_min; $t<=$max_time; $t++) { - echo ''; - } - } else { - if ($t_min == 0) - echo ''; - else - echo ''; - - for ($t=10; $t<=$max_time; $t+=10) { - echo ''; - } - } - - echo '
    '; - - echo '
    '; - //echo ''.$t.''; - echo '
    '.$t.($minute?'min':'s').'0'.($minute?'min':'s').'2'.($minute?'min':'s').''.$t.'
    '; - - } - echo '
    '; - - } - - /** - * opcije za rezanje - */ - function show_rezanje_casi () { - global $lang; - global $global_user_id; - - SurveyUserSetting :: getInstance()->Init($this->anketa, $global_user_id); - - $rezanje = SurveyUserSetting::getInstance()->getSettings('rezanje'); if ($rezanje == '') $rezanje = 0; - $rezanje_meja_sp = SurveyUserSetting::getInstance()->getSettings('rezanje_meja_sp'); if ($rezanje_meja_sp == '') $rezanje_meja_sp = 5; - $rezanje_meja_zg = SurveyUserSetting::getInstance()->getSettings('rezanje_meja_zg'); if ($rezanje_meja_zg == '') $rezanje_meja_zg = 5; - $rezanje_predvidena_sp = SurveyUserSetting::getInstance()->getSettings('rezanje_predvidena_sp'); if ($rezanje_predvidena_sp == '') $rezanje_predvidena_sp = 10; - $rezanje_predvidena_zg = SurveyUserSetting::getInstance()->getSettings('rezanje_predvidena_zg'); if ($rezanje_predvidena_zg == '') $rezanje_predvidena_zg = 200; - $rezanje_preskocene = SurveyUserSetting::getInstance()->getSettings('rezanje_preskocene'); if ($rezanje_preskocene == '') $rezanje_preskocene = 1; - - - echo '

    '.$lang['srv_rezanje_0'].'

    '; - echo '

           '.$lang['srv_rezanje_meja_sp'].':

    '; - - echo '

           '.$lang['srv_rezanje_meja_zg'].':

    '; - - echo '

    '.$lang['srv_rezanje_1'].'

    '; - echo '

           '.$lang['srv_rezanje_meja_sp'].': '.$lang['srv_rezanje_predvidenega'].'

    '; - - echo '

           '.$lang['srv_rezanje_meja_zg'].': '.$lang['srv_rezanje_predvidenega'].'

    '; - - echo '

     

    '; - echo '

    '.$lang['srv_rezanje_preskocene'].'

    '; - echo '

    '.$lang['srv_rezanje_preskocene_txt'].'

    '; - - echo ''.$lang['srv_save_run_profile'].''; - echo ''.$lang['srv_close_profile'].''; - - } - - /** - * shrani nastavitve - * - */ - function save_rezanje_casi () { - global $global_user_id; - - SurveyUserSetting::getInstance()->Init($this->anketa, $global_user_id); - - SurveyUserSetting::getInstance()->saveSettings('rezanje', $_POST['rezanje']); - SurveyUserSetting::getInstance()->saveSettings('rezanje_meja_sp', $_POST['rezanje_meja_sp']); - SurveyUserSetting::getInstance()->saveSettings('rezanje_meja_zg', $_POST['rezanje_meja_zg']); - SurveyUserSetting::getInstance()->saveSettings('rezanje_predvidena_sp', $_POST['rezanje_predvidena_sp']); - SurveyUserSetting::getInstance()->saveSettings('rezanje_predvidena_zg', $_POST['rezanje_predvidena_zg']); - SurveyUserSetting::getInstance()->saveSettings('rezanje_preskocene', $_POST['rezanje_preskocene']); - - } - - function testiranje_komentarji_links($comment_count){ - global $lang; - global $site_url; - global $site_path; - global $admin_type; - global $global_user_id; - - - if($_GET['a'] == 'komentarji_anketa'){ - - // Gumb nazaj - echo ''; - - echo ' ('; - if($comment_count['question']['unresolved'] > 0) - echo ''; - echo $comment_count['question']['unresolved']; - if($comment_count['question']['unresolved'] > 0) - echo ''; - echo '/'.$comment_count['question']['all']; - echo ')'; - } - else{ - - echo ''; - - echo $lang['srv_komentarji_imate'].' '; - if($comment_count['question']['unresolved'] > 0) echo ''; - echo $this->string_format((int)$comment_count['question']['unresolved'], 'srv_cnt_komentarji'); - if($comment_count['question']['unresolved'] > 0) echo ''; - - echo ' '.$lang['srv_komentarji_odskupno'].' '; - echo $this->string_format((int)$comment_count['question']['all'], 'srv_cnt_komentar_na_vprs'); - - echo ''; - - - // Gumb splosni komentarji - echo ''; - - echo ' ('; - if($comment_count['survey_resp']['unresolved']+$comment_count['survey_admin']['unresolved'] > 0) - echo ''; - echo ($comment_count['survey_resp']['unresolved']+$comment_count['survey_admin']['unresolved']); - if($comment_count['survey_resp']['unresolved']+$comment_count['survey_admin']['unresolved'] > 0) - echo ''; - echo '/'.($comment_count['survey_resp']['all']+$comment_count['survey_admin']['all']); - echo ')'; - } - } - - function string_format($cnt,$lang_root) { - global $lang; - - $txt = ''; - //if ($cnt > 0) $txt .= ''; - - if (isset($lang[$lang_root.'_'.$cnt])) { - $txt .= $cnt.' '.$lang[$lang_root.'_'.$cnt]; - } else { - $txt .= $cnt.' '.$lang[$lang_root.'_more']; - } - - //if ($cnt > 0) $txt .= ''; - - return $txt; - } - - /** - * izpise komentarje na anketo - stara ki se ne uporablja - * - */ - function testiranje_komentarji_anketa_old () { - global $lang; - global $site_url; - global $admin_type; - global $global_user_id; - - $rowa = SurveyInfo::getInstance()->getSurveyRow(); - - SurveySetting::getInstance()->Init($this->anketa); - $sortpostorder = SurveySetting::getInstance()->getSurveyMiscSetting('sortpostorder'); - - $f = new Forum; - - $sql = sisplet_query("SELECT * FROM post WHERE tid='$rowa[thread]'"); - - echo '
    '; - echo '

    '.$lang['srv_admin_s_comments'].'

    '; - - if (mysqli_num_rows($sql) > 0) { - $rows = mysqli_num_rows($sql); - if ($rows > 0) echo ''; - } - - $i=0; - while ($row = mysqli_fetch_array($sql)) { - - if (($i != 0 && $sortpostorder==0) || ($i < $rows-1 && $sortpostorder==1)) { - if ($row['ocena'] == 0) echo ''; - elseif ($row['ocena'] == 1) echo ''; - elseif ($row['ocena'] == 2) echo ''; - elseif ($row['ocena'] == 3) echo ''; - else echo ''; - - echo ''.$f->user($row['uid']).' ('.$f->datetime1($row['time']).'):'; - echo '
    '.$row['vsebina'].'
    '; - - echo '
    '; - } - $i++; - } - - echo '
    '; - - } - - /** - * izpise komentarje na anketo - * - */ - function testiranje_komentarji_anketa () { - global $lang; - global $site_url; - global $admin_type; - global $global_user_id; - - $b = new Branching($this->anketa); - $f = new Forum; - $d = new Dostop(); - - SurveySetting::getInstance()->Init($this->anketa); - $sortpostorder = SurveySetting::getInstance()->getSurveyMiscSetting('sortpostorder'); - $commentmarks = SurveySetting::getInstance()->getSurveyMiscSetting('commentmarks'); - $survey_comment = SurveySetting::getInstance()->getSurveyMiscSetting('survey_comment'); - $survey_comment_resp = SurveySetting::getInstance()->getSurveyMiscSetting('survey_comment_resp'); - $comment_count = $this->testiranje_komentarji_count(); - - $rowa = SurveyInfo::getInstance()->getSurveyRow(); - - echo '
    '; - - - echo '
    '; - - - echo ''; - - echo $lang['srv_komentarji_imate'].' '; - if(($comment_count['survey_resp']['unresolved']+$comment_count['survey_admin']['unresolved']) > 0) echo ''; - echo $this->string_format((int)($comment_count['survey_resp']['unresolved']+$comment_count['survey_admin']['unresolved']), 'srv_cnt_komentarji'); - if(($comment_count['survey_resp']['unresolved']+$comment_count['survey_admin']['unresolved']) > 0) echo ''; - - echo ' '.$lang['srv_komentarji_odskupno'].' '; - echo $this->string_format((int)($comment_count['survey_resp']['all']+$comment_count['survey_admin']['all']), 'srv_cnt_komentarji_survey'); - - echo ''; - - - echo ' '; - echo ' '.$lang['srv_survey_testdata'].''; - echo ' ('.SurveyInfo::getSurveyLink().'&preview=on&testdata=on'.$preview_options.') '; - echo ''; - echo '' . $lang['srv_survey_testdata2'] . ': '.$lang['srv_testdata_text'].''; - echo '

    '.$lang['srv_preview_testdata_longtext'].'

    '; - echo ''; - echo '
    '; // expanded-tooltip bottom - echo '
    '; // tooltip - - - # VV: privzeto naj bodo samo nerešeni komentarji - if (!isset($_GET['only_unresolved'])) { - $_GET['only_unresolved'] = 1; - } - - - echo ''; - - # samo nerešeni komentarji - if ($commentmarks == 0) { - echo ''; - } else { - echo $lang['move_show'].': '; - } - echo ' '.Help::display('srv_comments_only_unresolved').''; - - $only_unresolved = " "; - switch($_GET['only_unresolved']){ - case 1: - $only_unresolved = " AND ocena <= '1' "; - break; - case 2: - $only_unresolved = " AND ocena = '0' "; - break; - case 3: - $only_unresolved = " AND ocena = '1' "; - break; - case 4: - $only_unresolved = " AND ocena = '2' "; - break; - case 5: - $only_unresolved = " AND ocena = '3' "; - break; - default: - break; - } - - - echo ''; - - // Splosni komentarji urednikov - levo - echo '
    '; - echo ''.$lang['srv_comments_anketa_ured'].' ('.$comment_count['survey_admin']['unresolved'].'/'.$comment_count['survey_admin']['all'].')'; - - echo '
    '; - - $sql = sisplet_query("SELECT * FROM post WHERE tid='$rowa[thread]' ".$only_unresolved." "); - $rows = (mysqli_num_rows($sql) == 0) ? 0 : mysqli_num_rows($sql) - 1; - if ($rows > 0){ - echo ''; - echo '
    '; - - $i=0; - while ($row = mysqli_fetch_array($sql)) { - - if (($i != 0 && $sortpostorder==0) || ($i < $rows && $sortpostorder==1)) { - if ($row['ocena'] == 0) echo ''; - elseif ($row['ocena'] == 1) echo ''; - elseif ($row['ocena'] == 2) echo ''; - elseif ($row['ocena'] == 3) echo ''; - else echo ''; - - echo ''.$f->user($row['uid']).' ('.$f->datetime1($row['time']).'):'; - - echo '
    '; - if ($commentmarks == 1) { - echo ' '; - } else { - // Checkbox za "Koncano" - echo '= 2?' checked':'').' />'; - echo ''; - } - echo '
    '; - - echo '
    '.$row['vsebina'].'
    '; - - echo '
    '; - } - $i++; - } - } - // Nimamo komentarja - else{ - // Ce so komentarji aktivirani - if($survey_comment != ''){ - echo $lang['srv_no_comments_solved']; - } - else{ - echo $lang['srv_no_comments']; - } - } - - echo '
    '; - - // Dodajanje novega komentarja - echo ''; - echo '

    '.$lang['srv_comments_add_comment'].'

    '; - echo ''; - - echo '
    '; - - - // Splosni komentarji respondentov - desno - echo '
    '; - echo ''.$lang['srv_comments_anketa_resp'].' ('.$comment_count['survey_resp']['unresolved'].'/'.$comment_count['survey_resp']['all'].')'; - - echo '
    '; - - $sql = sisplet_query("SELECT * FROM srv_comment_resp WHERE ank_id='$this->anketa' ".$only_unresolved." ORDER BY comment_time $orderby, id $orderby"); - if (mysqli_num_rows($sql) > 0) { - - echo ''; - echo '
    '; - - while ($row = mysqli_fetch_array($sql)) { - - if ($row['ocena'] == 0) echo ''; - elseif ($row['ocena'] == 1) echo ''; - elseif ($row['ocena'] == 2) echo ''; - elseif ($row['ocena'] == 3) echo ''; - else echo ''; - - $datetime = strtotime($row['comment_time']); - $datetime = date("d.m G:i", $datetime); - - if($row['usr_id'] == 0){ - $user = $lang['guest']; - } - else{ - $sqlU = sisplet_query("SELECT name FROM users WHERE id='$row[usr_id]'"); - $rowU = mysqli_fetch_array($sqlU); - - $user = $rowU['name']; - } - - echo ''.$user.' ('.$datetime.'):'; - - echo '
    '; - if ($commentmarks == 1) { - echo ' '; - } else { - // Checkbox za "Koncano" - echo '= 2?' checked':'').' />'; - echo ''; - } - echo '
    '; - - echo '
    '.$row['comment'].'
    '; - - echo '
    '; - } - } - // Nimamo komentarja - else{ - // Ce so komentarji aktivirani - if($survey_comment_resp != ''){ - echo $lang['srv_no_comments_solved']; - } - else{ - echo $lang['srv_no_comments']; - } - } - - echo '
    '; - - // Dodajanje novega komentarja - echo ''; - echo '

    '.$lang['srv_comments_add_comment'].'

    '; - echo ''; - - echo '
    '; - - - echo '
    '; - echo '
    '; - } - - function testiranje_komentarji_komentarji_na_anketo ($return = true) { - - $rowi = SurveyInfo::getInstance()->getSurveyRow(); - - #komentarji na anketo - # vsi komentarji na anketo - $strta = "SELECT count(*) FROM post WHERE tid='".$rowi['thread']."' AND parent > 0"; - $sqlta = sisplet_query($strta); - list($rowta) = mysqli_fetch_row($sqlta); - - # nerešeni komentarji: only_unresolved => ocena <= 1 - $strtu = "SELECT count(*) FROM post WHERE tid='".$rowi['thread']."' AND parent > 0 AND ocena <= 1 "; - $sqltu = sisplet_query($strtu); - list($rowtu) = mysqli_fetch_row($sqltu); - - if ($return) - return '('.(int)$rowtu.'/'.(int)$rowta.')'; - else - return (int)$rowtu; - } - - public function testiranje_komentarji_count () { - - $comment_count = array(); - - $rowi = SurveyInfo::getInstance()->getSurveyRow(); - - - // KOMENTARJI NA ANKETO - UREDNIK - # vsi komentarji na anketo - $strta = "SELECT count(*) FROM post WHERE tid='".$rowi['thread']."' AND parent > 0"; - $sqlta = sisplet_query($strta); - list($rowta) = mysqli_fetch_row($sqlta); - - # nerešeni komentarji: only_unresolved => ocena <= 1 - $strtu = "SELECT count(*) FROM post WHERE tid='".$rowi['thread']."' AND parent > 0 AND ocena <= 1 "; - $sqltu = sisplet_query($strtu); - list($rowtu) = mysqli_fetch_row($sqltu); - //(int)$rowtu.'/'.(int)$rowta; - $comment_count['survey_admin']['all'] = (int)$rowta; - $comment_count['survey_admin']['unresolved'] = (int)$rowtu; - - - // KOMENTARJI NA ANKETO - RESPONDENT - # vsi komentarji na anketo - $strta = "SELECT count(*) FROM srv_comment_resp WHERE ank_id='".$this->anketa."'"; - $sqlta = sisplet_query($strta); - list($rowta) = mysqli_fetch_row($sqlta); - - # nerešeni komentarji: only_unresolved => ocena <= 1 - $strtu = "SELECT count(*) FROM srv_comment_resp WHERE ank_id='".$this->anketa."' AND ocena <= 1 "; - $sqltu = sisplet_query($strtu); - list($rowtu) = mysqli_fetch_row($sqltu); - //(int)$rowtu.'/'.(int)$rowta; - $comment_count['survey_resp']['all'] = (int)$rowta; - $comment_count['survey_resp']['unresolved'] = (int)$rowtu; - - - // KOMENTARJI NA VPRASANJE - # naenkrat preberemo vse spremenljivke, da ne delamo queryja vsakic posebej - $spremenljivke = Cache::cache_all_srv_spremenljivka($this->anketa, true); - $spr_id=array(); - $threads=array(); - if ( is_array($spremenljivke) && count($spremenljivke) > 0 ) { - - foreach ($spremenljivke as $id=>$value) { - $spr_id[] = $id; - - if ((int)$value['thread'] > 0) { - $threads[] = $value['thread']; - } - } - } - if (count($spr_id) > 0) { - #preštejemo komentarje uporabnikov na vprašanja - # srv_data_text where spr_id = 0 AND vre_id IN (id-ji spremenljivk) - $strqr = "SELECT count(*) FROM srv_data_text".$this->db_table." WHERE spr_id=0 AND vre_id IN (".implode(',',$spr_id).")"; - $sqlqr = sisplet_query($strqr); - list($rowqr) = mysqli_fetch_row($sqlqr); - - #končani komentarji respondentov - #text2 = 2 => končan - #text2 = 3 => nerelevantno - $strqrf = "SELECT count(*) FROM srv_data_text".$this->db_table." WHERE spr_id=0 AND vre_id IN (".implode(',',$spr_id).") AND text2 IN (2,3)"; - $sqlqrf = sisplet_query($strqrf); - list($rowqrf) = mysqli_fetch_row($sqlqrf); - - # preštejemo - if (count($threads) > 0) { - # vsi komentarji na anketo - $strta = "SELECT count(*) FROM post WHERE tid IN (".implode(',',$threads).") AND parent > 0"; - $sqlta = sisplet_query($strta); - list($rowtqa) = mysqli_fetch_row($sqlta); - # nerešeni komentarji: only_unresolved => ocena <= 1 - $strtu = "SELECT count(*) FROM post WHERE tid IN (".implode(',',$threads).") AND parent > 0 AND ocena IN (2,3) "; - $sqltu = sisplet_query($strtu); - list($rowtqu) = mysqli_fetch_row($sqltu); - } - } - - #vsi - //$all = (int)((int)$rowqr + (int)$rowtqa); - #nerešeni - //$unresolved = $all - (int)((int)$rowqrf + (int)$rowtqu); - $comment_count['question']['all'] = (int)((int)$rowqr + (int)$rowtqa); - $comment_count['question']['unresolved'] = $comment_count['question']['all'] - (int)((int)$rowqrf + (int)$rowtqu); - - // KOMENTARJI NA IF ALI BLOK - # naenkrat preberemo vse ife in bloke, da ne delamo queryja vsakic posebej - $ifi = Cache::cache_all_srv_if($this->anketa, true); - $if_id = array(); - $threads_if = array(); - if ( is_array($ifi) && count($ifi) > 0 ) { - - foreach ($ifi as $id=>$value) { - $if_id[] = $id; - - if ((int)$value['thread'] > 0) { - $threads_if[] = $value['thread']; - } - } - } - if (count($if_id) > 0) { - - #preštejemo komentarje uporabnikov na vprašanja - # srv_data_text where if_id = 0 AND vre_id IN (id-ji spremenljivk) - $strqr = "SELECT count(*) FROM srv_data_text".$this->db_table." WHERE spr_id=0 AND vre_id IN (".implode(',',$if_id).")"; - $sqlqr = sisplet_query($strqr); - list($rowqr_if) = mysqli_fetch_row($sqlqr); - - #končani komentarji respondentov - #text2 = 2 => končan - #text2 = 3 => nerelevantno - $strqrf = "SELECT count(*) FROM srv_data_text".$this->db_table." WHERE spr_id=0 AND vre_id IN (".implode(',',$if_id).") AND text2 IN (2,3)"; - $sqlqrf = sisplet_query($strqrf); - list($rowqrf_if) = mysqli_fetch_row($sqlqrf); - - # preštejemo - if (count($threads_if) > 0) { - # vsi komentarji na anketo - $strta = "SELECT count(*) FROM post WHERE tid IN (".implode(',',$threads_if).") AND parent > 0"; - $sqlta = sisplet_query($strta); - list($rowtqa_if) = mysqli_fetch_row($sqlta); - # nerešeni komentarji: only_unresolved => ocena <= 1 - $strtu = "SELECT count(*) FROM post WHERE tid IN (".implode(',',$threads_if).") AND parent > 0 AND ocena IN (2,3) "; - $sqltu = sisplet_query($strtu); - list($rowtqu_if) = mysqli_fetch_row($sqltu); - } - } - - $comment_count['question']['all'] += (int)((int)$rowqr_if + (int)$rowtqa_if); - $comment_count['question']['unresolved'] += ((int)((int)$rowqr_if + (int)$rowtqa_if)) - ((int)((int)$rowqrf_if + (int)$rowtqu_if)); - - - return $comment_count; - } - - /** - * $return pove a vrne text (true) ali samo številko (false) - */ - function testiranje_komentarji_komentarji_na_vprasanje ($return = true) { - - # naenkrat preberemo vse spremenljivke, da ne delamo queryja vsakic posebej - $spremenljivke = Cache::cache_all_srv_spremenljivka($this->anketa, true); - - $spr_id=array(); - $threads=array(); - if ( is_array($spremenljivke) && count($spremenljivke) > 0 ) { - foreach ($spremenljivke as $id=>$value) { - $spr_id[] = $id; - if ((int)$value['thread'] > 0) { - $threads[] = $value['thread']; - } - } - } - if (count($spr_id) > 0) { - #preštejemo komentarje uporabnikov na vprašanja - # srv_data_text where spr_id = 0 AND vre_id IN (id-ji spremenljivk) - $strqr = "SELECT count(*) FROM srv_data_text".$this->db_table." WHERE spr_id=0 AND vre_id IN (".implode(',',$spr_id).")"; - $sqlqr = sisplet_query($strqr); - list($rowqr) = mysqli_fetch_row($sqlqr); - - #končani komentarji respondentov - #text2 = 2 => končan - #text2 = 3 => nerelevantno - $strqrf = "SELECT count(*) FROM srv_data_text".$this->db_table." WHERE spr_id=0 AND vre_id IN (".implode(',',$spr_id).") AND text2 IN (2,3)"; - $sqlqrf = sisplet_query($strqrf); - list($rowqrf) = mysqli_fetch_row($sqlqrf); - - # preštejemo - if (count($threads) > 0) { - # vsi komentarji na anketo - $strta = "SELECT count(*) FROM post WHERE tid IN (".implode(',',$threads).") AND parent > 0"; - $sqlta = sisplet_query($strta); - list($rowtqa) = mysqli_fetch_row($sqlta); - # nerešeni komentarji: only_unresolved => ocena <= 1 - $strtu = "SELECT count(*) FROM post WHERE tid IN (".implode(',',$threads).") AND parent > 0 AND ocena IN (2,3) "; - $sqltu = sisplet_query($strtu); - list($rowtqu) = mysqli_fetch_row($sqltu); - } - } - - #vsi - $all = (int)((int)$rowqr + (int)$rowtqa); - # nerešeni - $unresolved = $all - (int)((int)$rowqrf + (int)$rowtqu); - - if ($return) - // '('.$unresolved.'/'.$all.')'; - return $unresolved; - else - return $unresolved; - - } - - /** - * izpise vprasanja, ki imajo komentarje in poleg tudi razprte komentarje - * - */ - function testiranje_komentarji () { - global $lang; - global $site_url; - global $admin_type; - global $global_user_id; - - $lang_admin = $lang; - - //$sa = new SurveyAdmin(1, $this->anketa); - include_once('../../main/survey/app/global_function.php'); - new \App\Controllers\SurveyController(true); - save('forceShowSpremenljivka', true); - $f = new Forum; - $c = 0; - - $lang = $lang_admin; - - $b = new Branching($this->anketa); - - $d = new Dostop(); - - $rowi = SurveyInfo::getInstance()->getSurveyRow(); - - echo '
    '; - - - echo '
    '; - - SurveySetting::getInstance()->Init($this->anketa); - $question_resp_comment_viewadminonly = SurveySetting::getInstance()->getSurveyMiscSetting('question_resp_comment_viewadminonly'); - $question_comment_viewadminonly = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment_viewadminonly'); - $question_comment_viewauthor = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment_viewauthor'); - $sortpostorder = SurveySetting::getInstance()->getSurveyMiscSetting('sortpostorder'); - $question_note_view = SurveySetting::getInstance()->getSurveyMiscSetting('question_note_view'); - $addfieldposition = SurveySetting::getInstance()->getSurveyMiscSetting('addfieldposition'); - $commentmarks = SurveySetting::getInstance()->getSurveyMiscSetting('commentmarks'); - $commentmarks_who = SurveySetting::getInstance()->getSurveyMiscSetting('commentmarks_who'); - - $question_comment_viewadminonly = ($question_comment_viewadminonly == '') ? 4 : $question_comment_viewadminonly; - $question_resp_comment_viewadminonly = ($question_resp_comment_viewadminonly == '') ? 4 : $question_resp_comment_viewadminonly;; - - $comment_count = $this->testiranje_komentarji_count(); - - - echo ''; - - echo $lang['srv_komentarji_imate'].' '; - if($comment_count['question']['unresolved'] > 0) echo ''; - echo $this->string_format((int)$comment_count['question']['unresolved'], 'srv_cnt_komentarji'); - if($comment_count['question']['unresolved'] > 0) echo ''; - - echo ' '.$lang['srv_komentarji_odskupno'].' '; - echo $this->string_format((int)$comment_count['question']['all'], 'srv_cnt_komentar_na_vprs'); - - echo ''; - - - echo ' '; - echo ' '.$lang['srv_survey_testdata'].''; - echo ' ('.SurveyInfo::getSurveyLink().'&preview=on&testdata=on'.$preview_options.') '; - echo ''; - echo '' . $lang['srv_survey_testdata2'] . ': '.$lang['srv_testdata_text'].''; - echo '

    '.$lang['srv_preview_testdata_longtext'].'

    '; - echo ''; - echo '
    '; // expanded-tooltip bottom - echo '
    '; // tooltip - - - # VV: privzeto naj bodo samo nerešeni komentarji - if (!isset($_GET['only_unresolved'])) { - $_GET['only_unresolved'] = 1; - } - - - $sqlf1 = sisplet_query("SELECT p.id FROM post p WHERE p.tid='$rowi[thread]' AND p.ocena='5'"); - while ($rowf1 = mysqli_fetch_array($sqlf1)) { - $s = sisplet_query("SELECT * FROM views WHERE pid='$rowf1[id]' AND uid='$global_user_id'"); - if (mysqli_num_rows($s) == 0) - $show_survey_comment = 1; - } - echo ''; - - // vsa vprasanja - echo ''; - - # samo nerešeni komentarji - if ($commentmarks == 0) { - echo ''; - } else { - echo $lang['move_show'].': '; - } - echo ' '.Help::display('srv_comments_only_unresolved').''; - - - - - - // Nov nacin kjer se sprehodimo cez branching, ker imamo lahko tudi komentarje na ife in bloke - Common::getInstance()->Init($this->anketa); - $branching_array = Common::getBranchingOrder(); - if (count($branching_array) > 0) { - - $view = 1; + // Izrisemo histogram - ce imamo kaksno vrednost nad 0 + if ($histogram_max_data != 0) { - echo ''; - - $b = new Branching($this->anketa); - - foreach($branching_array AS $element){ - - // Gre za if ali blok - if($element['if_id'] > 0){ - $if_id = $element['if_id']; + echo ''; - $sql1 = sisplet_query("SELECT * FROM srv_if WHERE id = '$if_id'"); - $row1 = mysqli_fetch_array($sql1); - - $orderby = $sortpostorder == 1 ? 'DESC' : 'ASC' ; - $tid = $row1['thread']; - - $only_unresolved = " "; - $only_unresolved2 = " "; - if ($_GET['only_unresolved'] == 1) $only_unresolved = " AND ocena <= 1 "; - if ($_GET['only_unresolved'] == 1) $only_unresolved2 = " AND text2 <= 1 "; - - if ($_GET['only_unresolved'] == 2) $only_unresolved = " AND ocena = 0 "; - if ($_GET['only_unresolved'] == 2) $only_unresolved2 = " AND text2 = 0 "; - - if ($_GET['only_unresolved'] == 3) $only_unresolved = " AND ocena = 1 "; - if ($_GET['only_unresolved'] == 3) $only_unresolved2 = " AND text2 = 1 "; - - if ($_GET['only_unresolved'] == 4) $only_unresolved = " AND ocena = 2 "; - if ($_GET['only_unresolved'] == 4) $only_unresolved2 = " AND text2 = 2 "; - - if ($_GET['only_unresolved'] == 5) $only_unresolved = " AND ocena = 3 "; - if ($_GET['only_unresolved'] == 5) $only_unresolved2 = " AND text2 = 3 "; - - - $tema_vsebuje = substr($lang['srv_forum_intro'],0,10); // da ne prikazujemo 1. default sporocila - - if ($admin_type <= $question_comment_viewadminonly) { // vidi vse komentarje - $sqlt = sisplet_query("SELECT * FROM post WHERE vsebina NOT LIKE '%{$tema_vsebuje}%' AND tid='$tid' $only_unresolved ORDER BY time $orderby, id $orderby"); - } elseif ($question_comment_viewauthor==1) { // vidi samo svoje komentarje - $sqlt = sisplet_query("SELECT * FROM post WHERE vsebina NOT LIKE '%{$tema_vsebuje}%' AND tid='$tid' $only_unresolved AND uid='$global_user_id' ORDER BY time $orderby, id $orderby"); - } else { // ne vidi nobenih komentarjev - $sqlt = sisplet_query("SELECT * FROM post WHERE 1=0"); - } - - if (($_GET['all_questions']=='1') OR (mysqli_num_rows($sqlt) > 0)) { - $c++; - - echo '
    '; - - echo '
  • '; - echo '
    '; - - // Blok - if($row1['tip'] == 1){ - echo '
    '; - echo 'BLOCK ('.$row1['number'].')'; - echo '
    '; - } - // If - else{ - echo '
    '; - $b->conditions_display($if_id); - echo '
    '; - } - - echo '
    '; - echo '
  • '; - - echo '
    '; - - if ($addfieldposition == 1) { - echo ''; - echo '

    '.$lang['srv_comments_add_comment'].'

    '; - echo ''; - } - - // komentarji na vprasanje - if ($row1['thread'] > 0) { - - if (mysqli_num_rows($sqlt) > 0) { - - echo '

    '.$lang['srv_admin_comment'].''; - //$rowss = mysqli_num_rows($sql); - //if ($rowss > 0) - echo ''; - echo '

    '; - - $i = 0; - while ($rowt = mysqli_fetch_array($sqlt)) { - if ($_GET['only_unresolved'] == 1) { - if ($rowt['ocena'] == 0) echo ''; - elseif ($rowt['ocena'] == 1) echo ''; - elseif ($rowt['ocena'] == 2) echo ''; - elseif ($rowt['ocena'] == 3) echo ''; - else echo ''; - } else { - if ($rowt['ocena'] == 0) echo ''; - elseif ($rowt['ocena'] == 1) echo ''; - elseif ($rowt['ocena'] == 2) echo ''; - elseif ($rowt['ocena'] == 3) echo ''; - else echo ''; - } - - echo ''.$f->user($rowt['uid']).' ('.$f->datetime1($rowt['time']).'):'; - - if ($admin_type <= 1 || $rowi['insert_uid']==$global_user_id || $commentmarks_who==0) { - - echo '
    '; - - if ($commentmarks == 1) { - echo ' '; - } else { - echo '= 2?' checked':'').' />'; - } - echo '
    '.$lang['srv_comment_comment'].''; - echo '
    '; - } - - echo '
    '.$rowt['vsebina'].'
    '; - echo '
    '; - } - } - } - - if ($addfieldposition == '' || $addfieldposition == 0) { - echo ''; - echo '

    '.$lang['srv_comments_add_comment'].'

    '; - echo ''; - } + // Sivi stolpci + echo '
    '; + + for ($t=$min_cas_na_anketi; $t<=$max_cas_na_anketi; $t++) { + + if(isset($histogram_data[$t])){ + echo ''; + } + } - echo ''; - - echo '
    '; - echo ''; + echo ''; + + + // Spodnja os + echo ''; + + // Korak 1 min + if ($max_cas_na_anketi <= 20) { + for ($t=$min_cas_na_anketi; $t<=$max_cas_na_anketi; $t++) { + echo ''; + } + } + // Korak 10 min + else { + $colspan = 10 - $min_cas_na_anketi; + echo ''; + + for ($t=10; $t<=$max_cas_na_anketi; $t+=10) { + + // Pri zadnji labeli odstejemo span + if(($t + 10) > count($histogram_data)) + $colspan = count($histogram_data) - $t; + else + $colspan = 10; + + echo ''; } } - // Gre za navadno vprasanje - else{ - $spr_id = $element['spr_id']; - $sql1 = sisplet_query("SELECT thread, note FROM srv_spremenljivka WHERE id = '$spr_id'"); - $row1 = mysqli_fetch_array($sql1); - - $orderby = $sortpostorder == 1 ? 'DESC' : 'ASC' ; - $tid = $row1['thread']; - - $only_unresolved = " "; - $only_unresolved2 = " "; - if ($_GET['only_unresolved'] == 1) $only_unresolved = " AND ocena <= 1 "; - if ($_GET['only_unresolved'] == 1) $only_unresolved2 = " AND text2 <= 1 "; - - if ($_GET['only_unresolved'] == 2) $only_unresolved = " AND ocena = 0 "; - if ($_GET['only_unresolved'] == 2) $only_unresolved2 = " AND text2 = 0 "; - - if ($_GET['only_unresolved'] == 3) $only_unresolved = " AND ocena = 1 "; - if ($_GET['only_unresolved'] == 3) $only_unresolved2 = " AND text2 = 1 "; - - if ($_GET['only_unresolved'] == 4) $only_unresolved = " AND ocena = 2 "; - if ($_GET['only_unresolved'] == 4) $only_unresolved2 = " AND text2 = 2 "; - - if ($_GET['only_unresolved'] == 5) $only_unresolved = " AND ocena = 3 "; - if ($_GET['only_unresolved'] == 5) $only_unresolved2 = " AND text2 = 3 "; - - - $tema_vsebuje = substr($lang['srv_forum_intro'],0,10); // da ne prikazujemo 1. default sporocila + echo ''; + + echo '
    '; + echo '
    '; + echo '
    '.$t.'min'.''.$min_cas_na_anketi.'min'.$t.'
    '; + } + } + // Casi po straneh - 1 histogram na stran + else{ + + foreach ($casi AS $stran => $casi_na_strani) { + + // Izpisemo naslov posamezne strani + $naslov = $lang['srv_intro_label']; + + $sql = sisplet_query("SELECT naslov FROM srv_grupa WHERE vrstni_red='$stran' AND ank_id='$this->anketa'"); + if(mysqli_num_rows($sql) > 0){ + $row = mysqli_fetch_array($sql); + + if($row['naslov'] != '') + $naslov = $row['naslov']; + } + + echo '

    '.$naslov.'

    '; + + + // Dobimo podatke za histogram + // Nastavimo min cas in max cas na anketi + $max_cas_na_strani = 0; + $min_cas_na_strani = 0; + foreach ($casi_na_strani AS $usr_id => $cas_na_strani) { - if ($admin_type <= $question_comment_viewadminonly) { // vidi vse komentarje - $sqlt = sisplet_query("SELECT * FROM post WHERE vsebina NOT LIKE '%{$tema_vsebuje}%' AND tid='$tid' $only_unresolved ORDER BY time $orderby, id $orderby"); - } elseif ($question_comment_viewauthor==1) { // vidi samo svoje komentarje - $sqlt = sisplet_query("SELECT * FROM post WHERE vsebina NOT LIKE '%{$tema_vsebuje}%' AND tid='$tid' $only_unresolved AND uid='$global_user_id' ORDER BY time $orderby, id $orderby"); - } else { // ne vidi nobenih komentarjev - $sqlt = sisplet_query("SELECT * FROM post WHERE 1=0"); - } + if ($cas_na_strani > $max_cas_na_strani) + $max_cas_na_strani = $cas_na_strani; + + if ($cas_na_strani < $min_cas_na_strani || $min_cas_na_strani == 0) + $min_cas_na_strani = $cas_na_strani; + } + + // Pretvorimo v minute + $max_cas_na_strani = (int) round($max_cas_na_strani / 60, 0); + $min_cas_na_strani = (int) round($min_cas_na_strani / 60, 0); + + if($get_prikazi01 == 1) + $min_cas_na_strani = 0; + + // Pripravimo podatke za histogram + $histogram_data = array(); - $sql2 = sisplet_query("SELECT COUNT(*) AS count FROM srv_data_text".$this->db_table." WHERE spr_id='0' AND vre_id='$spr_id' $only_unresolved2"); - $row2 = mysqli_fetch_array($sql2); + // Napolnimo vrednosti 0 na vsakem koraku (minuti) + for ($t=0; $t<=$max_cas_na_strani; $t++) + $histogram_data[$t] = 0; + + // Napolnimo vrednosti v histogram in dobimo najvecjo vrednost + $histogram_max_data = 0; + foreach ($casi_na_strani AS $usr_id => $cas_na_strani) { + + // Pretvorimo v minute + $cas_na_strani = (int) round($cas_na_strani / 60, 0); + + $histogram_data[$cas_na_strani]++; + + if($histogram_data[$cas_na_strani] > $histogram_max_data) + $histogram_max_data = $histogram_data[$cas_na_strani]; + } + + + // Izrisemo histogram za stran - ce imamo kaksno vrednost nad 0 + if ($histogram_max_data != 0) { + + echo ''; - - if ( ($_GET['all_questions']=='1') OR ( mysqli_num_rows($sqlt) > 0 || $row2['count'] > 0 || $row1['note'] != '' ) ) { - $c++; - - echo '
    '; - - echo '
  • '; - $b->vprasanje($spr_id); - echo '
  • '; - - if ($admin_type <= $question_note_view || $question_note_view == '') { - - if ($row1['note'] != '') { - echo '
    '; - echo '

    + '.$lang['srv_note'].'

    '; - echo '

    '.nl2br($row1['note']).'

    '; - echo '
    '; - } - } - - echo '
    '; - - if ($addfieldposition == 1) { - echo ''; - echo '

    '.$lang['srv_comments_add_comment'].'

    '; - echo ''; + // Sivi stolpci + echo '
    '; + + for ($t=$min_cas_na_strani; $t<=$max_cas_na_strani; $t++) { + + if(isset($histogram_data[$t])){ + echo ''; } - - // komentarji na vprasanje - if ($row1['thread'] > 0) { + } - if (mysqli_num_rows($sqlt) > 0) { - - echo '

    '.$lang['srv_admin_comment'].''; - //$rowss = mysqli_num_rows($sql); - //if ($rowss > 0) - echo ''; - echo '

    '; - - $i = 0; - while ($rowt = mysqli_fetch_array($sqlt)) { - if ($_GET['only_unresolved'] == 1) { - if ($rowt['ocena'] == 0) echo ''; - elseif ($rowt['ocena'] == 1) echo ''; - elseif ($rowt['ocena'] == 2) echo ''; - elseif ($rowt['ocena'] == 3) echo ''; - else echo ''; - } else { - if ($rowt['ocena'] == 0) echo ''; - elseif ($rowt['ocena'] == 1) echo ''; - elseif ($rowt['ocena'] == 2) echo ''; - elseif ($rowt['ocena'] == 3) echo ''; - else echo ''; - } - - echo ''.$f->user($rowt['uid']).' ('.$f->datetime1($rowt['time']).'):'; - - if ($admin_type <= 1 || $rowi['insert_uid']==$global_user_id || $commentmarks_who==0) { - - echo '
    '; - - if ($commentmarks == 1) { - echo ' '; - } else { - echo '= 2?' checked':'').' />'; - } - echo '
    '.$lang['srv_comment_comment'].''; - echo '
    '; - } - - echo '
    '.$rowt['vsebina'].'
    '; - echo '
    '; - } - } - } - - if ($addfieldposition == '' || $addfieldposition == 0) { - echo ''; - echo '

    '.$lang['srv_comments_add_comment'].'

    '; - echo ''; + echo '
    '; + + + // Spodnja os + echo ''; + + // Korak 1 min + if ($max_cas_na_strani <= 20) { + for ($t=$min_cas_na_strani; $t<=$max_cas_na_strani; $t++) { + echo ''; } + } + // Korak 10 min + else { + if ($min_cas_na_strani == 0) + echo ''; + else + echo ''; - echo ''; - - // komentarji respondentov - if ($row2['count'] > 0) { - - if ($admin_type <= $question_resp_comment_viewadminonly) { - echo '
    '; - echo '

    '.$lang['srv_repondent_comment'].'

    '; - - if ($_GET['only_unresolved'] == 1) $only_unresolved = " AND d.text2 <= 1 "; else $only_unresolved = " "; - - $sqlt = sisplet_query("SELECT * FROM srv_data_text".$this->db_table." WHERE spr_id='0' AND vre_id='$spr_id' $only_unresolved2 ORDER BY id ASC"); - if (!$sqlt) echo mysqli_error($GLOBALS['connect_db']); - while ($rowt = mysqli_fetch_array($sqlt)) { - - if ($rowt['text2'] == 0) echo ''; - elseif ($rowt['text2'] == 1) echo ''; - elseif ($rowt['text2'] == 2) echo ''; - elseif ($rowt['text2'] == 3) echo ''; - else echo ''; - - - if ($admin_type <= 1 || $rowi['insert_uid']==$global_user_id || $commentmarks_who==0) { - echo '
    '; - if ($commentmarks == 1) { - echo ' '; - } else { - echo '= 2?' checked':'').' />'; - } - echo '
    '; - } + for ($t=10; $t<=$max_cas_na_strani; $t+=10) { - // Ce smo slucajno pobrisali testne vnose, nimamo casa vnosa komentarja - $sqlTime = sisplet_query("SELECT time_edit FROM srv_user WHERE id='".$rowt['usr_id']."'"); - if(mysqli_num_rows($sqlTime) > 0){ - - $rowTime = mysqli_fetch_array($sqlTime); - - if ( strpos($rowt['text'], '__DATE__') !== false ) { - $rowt['text'] = str_replace('__DATE__', $f->datetime1($rowTime['time_edit']), $rowt['text']); - echo ''.nl2br($rowt['text']).'
    '; - } - else { - echo ''.$f->datetime1($rowTime['time_edit']).':
    '; - echo ''.nl2br($rowt['text']).'
    '; - } - } - else{ - if ( strpos($rowt['text'], '__DATE__') !== false ) { - $rowt['text'] = str_replace('__DATE__', '', $rowt['text']); - echo ''.nl2br($rowt['text']).'
    '; - } - else { - echo ''.nl2br($rowt['text']).'
    '; - } - } - - echo '
    '; - - } - echo '
    '; - } + $colspan = 10; + if(($t + 10) > count($histogram_data)) + $colspan = $t + 10 - count($histogram_data); + if($min_cas_na_strani != 0) + $colspan -= 2; + + echo ''; } - - echo '
    '; - echo ''; - } + } + + echo ''; + + echo '
    '; + echo '
    '; + echo '
    '.$t.'min'.'0'.'min'.'2'.'min'.''.$t.'
    '; } } - - echo '
    '; - - if ($c == 0) { - echo '
    '; - echo $lang['srv_no_comments_solved'].'
    '; - #echo ''.$lang['srv_settings_komentarji'].''; - echo '
    '; - } + + } + + echo '
    '; + } + + /** + * opcije za rezanje + */ + function show_rezanje_casi () { + global $lang; + global $global_user_id; + + SurveyUserSetting :: getInstance()->Init($this->anketa, $global_user_id); + + $rezanje = SurveyUserSetting::getInstance()->getSettings('rezanje'); if ($rezanje == '') $rezanje = 0; + $rezanje_meja_sp = SurveyUserSetting::getInstance()->getSettings('rezanje_meja_sp'); if ($rezanje_meja_sp == '') $rezanje_meja_sp = 5; + $rezanje_meja_zg = SurveyUserSetting::getInstance()->getSettings('rezanje_meja_zg'); if ($rezanje_meja_zg == '') $rezanje_meja_zg = 5; + $rezanje_predvidena_sp = SurveyUserSetting::getInstance()->getSettings('rezanje_predvidena_sp'); if ($rezanje_predvidena_sp == '') $rezanje_predvidena_sp = 10; + $rezanje_predvidena_zg = SurveyUserSetting::getInstance()->getSettings('rezanje_predvidena_zg'); if ($rezanje_predvidena_zg == '') $rezanje_predvidena_zg = 200; + $rezanje_preskocene = SurveyUserSetting::getInstance()->getSettings('rezanje_preskocene'); if ($rezanje_preskocene == '') $rezanje_preskocene = 1; + + + echo '

    '.$lang['srv_rezanje'].'

    '; + echo ''; + + + echo ''; + + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + } + + /** + * shrani nastavitve + * + */ + function save_rezanje_casi () { + global $global_user_id; + + SurveyUserSetting::getInstance()->Init($this->anketa, $global_user_id); + + SurveyUserSetting::getInstance()->saveSettings('rezanje', $_POST['rezanje']); + SurveyUserSetting::getInstance()->saveSettings('rezanje_meja_sp', $_POST['rezanje_meja_sp']); + SurveyUserSetting::getInstance()->saveSettings('rezanje_meja_zg', $_POST['rezanje_meja_zg']); + SurveyUserSetting::getInstance()->saveSettings('rezanje_predvidena_sp', $_POST['rezanje_predvidena_sp']); + SurveyUserSetting::getInstance()->saveSettings('rezanje_predvidena_zg', $_POST['rezanje_predvidena_zg']); + SurveyUserSetting::getInstance()->saveSettings('rezanje_preskocene', $_POST['rezanje_preskocene']); + + } + + function string_format($cnt,$lang_root) { + global $lang; + + $txt = ''; + //if ($cnt > 0) $txt .= ''; + + if (isset($lang[$lang_root.'_'.$cnt])) { + $txt .= $cnt.' '.$lang[$lang_root.'_'.$cnt]; + } else { + $txt .= $cnt.' '.$lang[$lang_root.'_more']; } - else { - echo '
    '; - echo $lang['srv_no_comments'].'
    '; - echo '
    '; - } - echo ''; // branching - echo '
    '; - echo ''; // placeholder + //if ($cnt > 0) $txt .= '
    '; + + return $txt; } /** @@ -7138,7 +7298,7 @@ class SurveyAdminSettings { function testiranje_testnipodatki () { global $lang; - if ($_POST['stevilo_vnosov'] > 0) { + if (isset($_POST['stevilo_vnosov']) && $_POST['stevilo_vnosov'] > 0) { // Nastavitev da vstavljamo samo veljavne vnose $only_valid = isset($_POST['only_valid']) ? $_POST['only_valid'] : 0; @@ -7220,7 +7380,7 @@ class SurveyAdminSettings { } if ($s->checkSpremenljivka($row['id'], $isTestData=true)) { - if ($vrednost > 0) { + if (isset($vrednost) && $vrednost > 0) { $srv_data_vrednost .= "('$row[id]', '$vrednost', '$this->usr_id'),"; if ($row1['other'] == 1) $srv_data_text .= "('$row[id]', '$vrednost', '".$this->randomString()."', '', '$this->usr_id'),"; @@ -7258,11 +7418,11 @@ class SurveyAdminSettings { $j++; } - if ($vrednost) { + if (isset($vrednost)) { foreach ($vrednost AS $key => $val) { if ($val > 0) { $srv_data_vrednost .= "('$row[id]', '$val', '$this->usr_id'),"; - if ($row1['other'] == 1) + if (isset($row1['other']) && $row1['other'] == 1) $srv_data_text .= "('$row[id]', '$val', '".$this->randomString()."', '', '$this->usr_id'),"; } } @@ -7388,56 +7548,8 @@ class SurveyAdminSettings { } } - //Lokacija - elseif($row['tip'] == 26){ - //choose location - $sql1 = sisplet_query("SELECT id FROM srv_vrednost WHERE spr_id = '$row[id]'", 'array'); - - //so vrednosti, se pravi je choose - if($sql1){ - foreach($sql1 as $row1){ - if ($s->checkSpremenljivka($row['id'], $isTestData=true)) { - // Ce imamo samo veljavne imamo vedno vrednost - if($only_valid == 1) - $vrednost = $this->randomString(); - else - $vrednost = rand(0,1)==0 ? $this->randomString() : ''; - - $srv_data_map .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '', '', '', '". - ($vrednost != '' ? $vrednost : '-1')."', ''),"; - } - else { - $srv_data_vrednost .= "('$row[id]', '-2', '$this->usr_id'),"; - } - } - } - //niso vrednosti, se pravi je moja ali multi lokacija - else{ - if ($s->checkSpremenljivka($row['id'], $isTestData=true)) { - - $make_input = ($only_valid == 1 ? true : rand(0,1)==0); - if($make_input){ - - $lat = floatval(mt_rand(454000, 466500)/10000); - $lng = floatval(mt_rand(136000, 163900)/10000); - - // Ce imamo samo veljavne imamo vedno vrednost - if($only_valid == 1) - $vrednost = $this->randomString(); - else - $vrednost = rand(0,1)==0 ? $this->randomString() : ''; - - $srv_data_map .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '$lat', '$lng', '[N/A]', '". - ($vrednost != '' ? $vrednost : '-1')."', ''),"; - } - } - else { - $srv_data_vrednost .= "('$row[id]', '-2', '$this->usr_id'),"; - } - } - } - //Heatmap - elseif($row['tip'] == 27){ + //Lokacija + elseif($row['tip'] == 26){ //choose location $sql1 = sisplet_query("SELECT id FROM srv_vrednost WHERE spr_id = '$row[id]'", 'array'); @@ -7451,7 +7563,7 @@ class SurveyAdminSettings { else $vrednost = rand(0,1)==0 ? $this->randomString() : ''; - $srv_data_heatmap .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '', '', '', '". + $srv_data_map .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '', '', '', '". ($vrednost != '' ? $vrednost : '-1')."', ''),"; } else { @@ -7475,7 +7587,7 @@ class SurveyAdminSettings { else $vrednost = rand(0,1)==0 ? $this->randomString() : ''; - $srv_data_heatmap .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '$lat', '$lng', '[N/A]', '". + $srv_data_map .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '$lat', '$lng', '[N/A]', '". ($vrednost != '' ? $vrednost : '-1')."', ''),"; } } @@ -7484,6 +7596,54 @@ class SurveyAdminSettings { } } } + //Heatmap + elseif($row['tip'] == 27){ + //choose location + $sql1 = sisplet_query("SELECT id FROM srv_vrednost WHERE spr_id = '$row[id]'", 'array'); + + //so vrednosti, se pravi je choose + if($sql1){ + foreach($sql1 as $row1){ + if ($s->checkSpremenljivka($row['id'], $isTestData=true)) { + // Ce imamo samo veljavne imamo vedno vrednost + if($only_valid == 1) + $vrednost = $this->randomString(); + else + $vrednost = rand(0,1)==0 ? $this->randomString() : ''; + + $srv_data_heatmap .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '', '', '', '". + ($vrednost != '' ? $vrednost : '-1')."', ''),"; + } + else { + $srv_data_vrednost .= "('$row[id]', '-2', '$this->usr_id'),"; + } + } + } + //niso vrednosti, se pravi je moja ali multi lokacija + else{ + if ($s->checkSpremenljivka($row['id'], $isTestData=true)) { + + $make_input = ($only_valid == 1 ? true : rand(0,1)==0); + if($make_input){ + + $lat = floatval(mt_rand(454000, 466500)/10000); + $lng = floatval(mt_rand(136000, 163900)/10000); + + // Ce imamo samo veljavne imamo vedno vrednost + if($only_valid == 1) + $vrednost = $this->randomString(); + else + $vrednost = rand(0,1)==0 ? $this->randomString() : ''; + + $srv_data_heatmap .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '$lat', '$lng', '[N/A]', '". + ($vrednost != '' ? $vrednost : '-1')."', ''),"; + } + } + else { + $srv_data_vrednost .= "('$row[id]', '-2', '$this->usr_id'),"; + } + } + } // multinumber elseif ($row['tip'] == 20) { @@ -7525,7 +7685,7 @@ class SurveyAdminSettings { if ($s->checkSpremenljivka($row['id'], $isTestData=true)) { $vrednost = rand(0,1)==0 ? $this->randomString() : ''; - if ($vrednost != '') + if (isset($vrednost) && $vrednost != '') $srv_data_text .= "('$row[id]', '', '$vrednost', '', '$this->usr_id'),"; } else { $srv_data_vrednost .= "('$row[id]', '-2', '$this->usr_id'),"; @@ -7546,7 +7706,7 @@ class SurveyAdminSettings { else $vrednost = rand(0,1)==0 ? $this->randomString() : ''; - if ($vrednost != '') + if (isset($vrednost) && $vrednost != '') $srv_data_text .= "('$row[id]', '$row1[id]', '$vrednost', '', '$this->usr_id'),"; } @@ -7639,7 +7799,7 @@ class SurveyAdminSettings { else $vrednost = rand(0,1)==0 ? $this->randomDate() : ''; - if ($vrednost != '') + if (isset($vrednost) && $vrednost != '') $srv_data_text .= "('$row[id]', '', '$vrednost', '', '$this->usr_id'),"; } else { @@ -7674,10 +7834,10 @@ class SurveyAdminSettings { while($row1 = mysqli_fetch_array($sql1)){ - if (count($array) > 0) { + if (isset($array) && count($array) > 0) { $vrednost = array_pop($array); - if ($vrednost != '') + if (isset($vrednost) && $vrednost != '') $srv_data_rating .= "('$row[id]', '$row1[id]', '$this->usr_id', '$vrednost'),"; } } @@ -7711,11 +7871,8 @@ class SurveyAdminSettings { elseif(rand(0,1) == 0) $vrednost = $this->randomNumber(); - if (isset( $vrednost )) { - - if ($vrednost != '') - $srv_data_text .= "('$row[id]', '$row1[id]', '$vrednost', '', '$this->usr_id'),"; - } + if (isset($vrednost) && $vrednost != '') + $srv_data_text .= "('$row[id]', '$row1[id]', '$vrednost', '', '$this->usr_id'),"; } else $srv_data_vrednost .= "('$row[id]', '-2', '$this->usr_id'),"; @@ -7931,9 +8088,9 @@ class SurveyAdminSettings { header("Location: index.php?anketa=$this->anketa&a=testiranje&m=testnipodatki"); - } elseif ($_GET['delete_testdata'] == 1 || $_GET['delete_autogen_testdata'] == 1) { + } elseif ((isset($_GET['delete_testdata']) && $_GET['delete_testdata'] == 1) || (isset($_GET['delete_autogen_testdata']) && $_GET['delete_autogen_testdata'] == 1)) { - if($_GET['delete_autogen_testdata'] == 1) + if(isset($_GET['delete_autogen_testdata']) && $_GET['delete_autogen_testdata'] == 1) sisplet_query("DELETE FROM srv_user WHERE ank_id='$this->anketa' AND testdata='2'"); else sisplet_query("DELETE FROM srv_user WHERE ank_id='$this->anketa' AND (testdata='1' OR testdata='2')"); @@ -7950,25 +8107,52 @@ class SurveyAdminSettings { $sql = sisplet_query("SELECT COUNT(*) AS count FROM srv_user WHERE ank_id='$this->anketa' AND (testdata='1' OR testdata='2')"); $row = mysqli_fetch_array($sql); $total_rows = $row['count']; - + echo '
    '; - echo '

    '; - echo ''.$lang['srv_stevilo_vnosov'].': (max 1000) '; + + echo '

    '.$lang['srv_testiranje_vnosi'].''; + echo '

    '.$lang['srv_testni_nagovor'].'

    '; + + echo '
    '; + echo $lang['srv_stevilo_vnosov'].':'; + echo '
    '; + echo ''; + echo '(max. 1000)'; + echo '
    '; + echo '
    '; + + echo '
    '; echo ''; - echo ''; - echo ''; - echo '

    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; + echo ''; + echo '
    '; + echo ''; - echo '

    '.$lang['srv_testni_nagovor'].'

    '; - - echo ''.$lang['srv_delete_testdata'].' ('.$total_rows.')'; + echo '

    '.$lang['srv_testni_nakonec'].'

    '; + + echo ''.$lang['srv_delete_testdata'].' ('.$total_rows.')'; + if ($total_rows > 0) { + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo '
    Labela Veljavni odgovori (Grafični prikaz)
    '; - + $prevpage = 0; - + + $sql = sisplet_query("SELECT s.id, s.gru_id, s.tip, s.naslov, g.naslov AS pagename FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND s.visible='1' AND g.ank_id='$this->anketa' ORDER BY g.vrstni_red, s.vrstni_red"); while ($row = mysqli_fetch_array($sql)) { @@ -7981,14 +8165,16 @@ class SurveyAdminSettings { echo ''; echo '
    '; } - - echo '
    '.$row['pagename'].''; - echo ''; + + echo '
    '; + echo ''.$row['pagename'].''; + // echo ' - '; + echo '
    '; $prevpage = $row['gru_id']; } - echo ''; + echo ''; // radio ali select, checkbox, textbox, textbox*, number, datum if ( ($row['tip']==1 || $row['tip']==3 || $row['tip']==2 || $row['tip']==4 || $row['tip']==21 || $row['tip']==7 || $row['tip']==8) ) { @@ -8056,9 +8242,11 @@ class SurveyAdminSettings { } } - echo ''; echo ''; @@ -8068,8 +8256,8 @@ class SurveyAdminSettings { echo '
    '.skrajsaj(strip_tags($row['naslov']),20).'
    '.skrajsaj(strip_tags($row['naslov']),50).''; - echo '
     
    '; - echo ' '.$p.'% ('.($total_rows-$rowc['count']).')'; + echo '
    '; + echo '
    '; + echo '
    '; + echo ' '.$p.'% ('.($total_rows-$rowc['count']).')'; + echo '
    '; echo '
    '; echo '
    '; - - echo '

    '.$lang['srv_testni_nakonec'].'

    '; + + echo '
    '; } } } @@ -8113,7 +8301,7 @@ class SurveyAdminSettings { function displayBtnMailtoPreview($row) { global $lang; echo '
    '; @@ -8132,33 +8320,46 @@ class SurveyAdminSettings { $_expire = explode('-',$row['expire']); $expire = $_expire[2].'.'.$_expire[1].'.'.$_expire[0]; - echo '
    '.$lang['srv_activate_duration_2'].' '.Help::display('srv_activity_quotas').''; - echo '

    '; - echo '' . $lang['srv_activate_duration_manual_from'].''; - echo ''; - echo '

    '; - - echo '

    '; - echo '' . $lang['srv_activate_duration_manual_to'].''; - echo ''; - echo '

    '; + + // Preklop domene na oneclicksurvey.com - ne pustimo spremembe aktivnosti + if(DomainChange::check1kaDomainChange() && DomainChange::getInstance($global_user_id)->domainChangeLimits()){ + return; + } + + echo '
    '; + echo ''.$lang['srv_activate_duration_2'].''; + echo '
    '; + echo '' . $lang['srv_activate_duration_manual_from'].''; + echo '
    '; + echo ''; + echo '
    '; + echo '
    '; - echo '

    '; - echo '' . $lang['srv_trajna_anketa'].''; + echo '

    '; + echo '' . $lang['srv_activate_duration_manual_to'].''; + echo '
    '; + echo ''; + echo '
    '; + echo '
    '; + + echo '
    '; echo ''; - echo '

    '; - echo '
    '; + echo ''; echo ''; - #echo ''; + echo '
    '; echo ' - '; + datepicker("#expireManual1");'; + + if($row['expire'] == PERMANENT_DATE) + echo '$("#expire").find(".ui-datepicker-trigger").addClass("disabled");'; + + echo ' }); + '; } function DisplayNastavitveMaxGlasov() { @@ -8171,73 +8372,54 @@ class SurveyAdminSettings { $row = SurveyInfo::getInstance()->getSurveyRow(); //Nastavitev max stevila glasov - echo '
    '; echo '
    '; echo ''.$lang['srv_vote_quotas'].' '.Help::display('srv_activity_quotas').''; - echo '

    '; - echo ''; - echo ''; - echo ''; - echo ''; - - echo '    '; - echo ''; - echo '

    '; - - - // Opozorilo, da je limit odgovorov presezen - echo '

    '; - echo $lang['srv_survey_voteLimit_warning'].':
    '; - $srv_survey_non_active_voteLimit = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_survey_non_active_voteLimit'); - if ($srv_survey_non_active_voteLimit == '') $srv_survey_non_active_voteLimit = $lang['srv_survey_non_active_voteLimit']; - echo ''.$srv_survey_non_active_voteLimit.''; + echo '

    '; - echo ' '.$lang['edit3'].''; - echo '

    '; + echo '' . $lang['srv_vote_quotas_2'] . ':'; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; - echo '
    '; - } - - /** - * Uporabnik (administrator, manager) lahko dodajata nove uporabnike in jim dodelita dostop - */ - public function dodajNovegaUporabnika(){ - global $admin_type; - global $lang; - global $virtual_domain; + echo ''; - // admini lahko dodajajo uporabnike, ki jih nato managirajo - if($admin_type != 0) - return ''; - echo '
    '; + // Opozorilo, da je limit odgovorov presezen + echo '
    '; + echo '
    '.$lang['srv_vote_quotas_all_warning'].'
    '; + echo '
    '; + - echo '
    '; + // Opozorilo, da je limit odgovorov presezen + echo '
    '; - echo '

    '.$lang['srv_users_add_new_title'].'

    '; + echo '
    '; + echo ''.$lang['srv_vote_count'].':'; + echo ''; + echo '
    '; - echo '

    '.(!empty($_GET['add']) && $_GET['error']=='email'?''.$lang['srv_added_false'].'':'').'

    '; - echo '

    '; - echo '

    '; - echo '

    '.(!empty($_GET['add']) && $_GET['error']=='pass'?''.$lang['pass_doesnt_match'].'':'').'

    '; - echo '

    '; - echo '

    - -

    '; - - //echo '

    '; - echo '

    '; - echo ' '.$lang['create'].''; - echo '

    '; + echo '

    '.$lang['srv_survey_voteLimit_warning'].':

    '; + + $srv_survey_non_active_voteLimit = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_survey_non_active_voteLimit'); + if ($srv_survey_non_active_voteLimit == '') $srv_survey_non_active_voteLimit = $lang['srv_survey_non_active_voteLimit']; + echo '

    '.$srv_survey_non_active_voteLimit.'

    '; + + echo '

    '; - echo '
    '; - echo '
    '; - } + echo ''; + } + /** * Uporabnik (administrator, manager) lahko dodajata nove uporabnike in jim dodelita dostop @@ -8246,96 +8428,246 @@ class SurveyAdminSettings { global $admin_type; global $lang; global $global_user_id; - global $virtual_domain; - // managerji in admini lahko dodajajo uporabnike, ki jih nato managirajo + // managerji in admini lahko dodajajo uporabnike, ki jih nato managirajo if( !($admin_type == 1 || $admin_type == 0) ) return ''; - // Na virtualkah imajo managerji omejitev st. dodeljenih uporabnikov - ZAENKRAT JE TO ONEMOGOCENO, KASNEJE SE LAHKO OMEJI NA PAKET - if(false && $virtual_domain && $admin_type == 1){ + $error = isset($_GET['error']) ? $_GET['error'] : ''; - // Limit st. dodeljenih uporabnikov - $managed_accounts_limit = 5; - // Prestejemo dodeljene uporabnike - $sql = sisplet_query("SELECT u.email - FROM srv_dostop_manage m, users u - WHERE m.manager='".$global_user_id."' AND u.id=m.user AND u.email NOT LIKE ('D3LMD-%') AND u.email NOT LIKE ('UNSU8MD-%') - "); + // MANAGER lahko samo doda novega uporabnika pod sebe + if($admin_type == 1){ + + echo '
    '.$lang['n_users_list_add'].''; - $managed_accounts_count = mysqli_num_rows($sql); + echo '
    '; + echo ' '.$lang['srv_users_add_new_type2'].''; + echo '
    '; - echo '

    '; - echo $lang['srv_users_add_assigned_max_1'].' '.$managed_accounts_limit.' '.$lang['srv_users_add_assigned_max_2']; + // Na virtualkah imajo managerji omejitev st. dodeljenih uporabnikov - ZAENKRAT JE TO ONEMOGOCENO, KASNEJE SE LAHKO OMEJI NA PAKET + /*if(false && isVirtual() && $admin_type == 1){ + + // Limit st. dodeljenih uporabnikov + $managed_accounts_limit = 5; + + // Prestejemo dodeljene uporabnike + $sql = sisplet_query("SELECT u.email + FROM srv_dostop_manage m, users u + WHERE m.manager='".$global_user_id."' AND u.id=m.user AND u.email NOT LIKE ('D3LMD-%') AND u.email NOT LIKE ('UNSU8MD-%') + "); + + $managed_accounts_count = mysqli_num_rows($sql); - // Manager na virtualkah ima omejitev koliko uporabnikov lahko pregleduje - if($managed_accounts_count >= $managed_accounts_limit){ - echo '

    '; - echo $lang['srv_users_add_assigned_max_reached']; - echo '

    '; - - return; - } - elseif($managed_accounts_count > 0){ - echo '

    '; - echo $lang['srv_users_add_assigned_current'].' '.$managed_accounts_count.' '.$lang['of'].' '.$managed_accounts_limit.''; - } - echo '

    '; + echo '

    '; + echo $lang['srv_users_add_assigned_max_1'].' '.$managed_accounts_limit.' '.$lang['srv_users_add_assigned_max_2'].'

    '; + + // Manager na virtualkah ima omejitev koliko uporabnikov lahko pregleduje + if($managed_accounts_count >= $managed_accounts_limit){ + echo '

    '; + echo $lang['srv_users_add_assigned_max_reached']; + echo '

    '; + + return; + } + elseif($managed_accounts_count > 0){ + echo '

    '; + echo $lang['srv_users_add_assigned_current'].' '.$managed_accounts_count.' '.$lang['of'].' '.$managed_accounts_limit.'

    '; + } + }*/ + + + // Dodajanje novih uporabnikov pod pregled - ustvari racun, doda uporabnika pod pregled in mu poslje mail + echo '
    '; + echo '
    '; + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + + echo '
    '; + echo ' '; + echo ' '.(empty($_GET['add']) && $error=='email'?''.$lang['srv_added_false'].'':''); + echo '
    '; + + echo '
    '; + echo ' '; + echo ' '.(empty($_GET['add']) && $error=='pass'?''.$lang['pass_doesnt_match'].'':''); + echo '
    '; + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + + echo '
    '; + echo ' '; + echo '
    '; + + echo '
    '; + echo '
    '; //new_user_option + + + // Managerji lahko dodajajo samo uporabnike z dolocenimi emaili (če jim domeno posebej nastavi admin) + // TODO: trenutno onemogočimo dodaja ostalih uporabnikov za managerje. Ko bo stvar vezana na domeno se jim bo omogočilo dodajanje samo domenskih + /*elseif(false && $admin_type == 1){ + + UserSetting :: getInstance()->Init($global_user_id); + $emails = UserSetting :: getInstance()->getUserSetting('manage_domain'); + + echo '
    '; + echo '

    '.sprintf($lang['srv_manager_add_user3'], $emails).'
    '.$lang['srv_manager_add_user4'].'

    '; + echo '

    '; + echo '

    '; + + echo '
    '; + }*/ + + echo '
    '; } + // ADMIN lahko tudi doda uporabnika brez pregleda in doda obstojecega pod pregled + else{ - echo '
    '; + echo '
    '.$lang['n_users_list_add'].''; - // Dodajanje novih uporabnikov - ustvari racun, doda uporabnika pod pregled in mu poslje mail - echo '
    '; - echo '

    '.$lang['srv_users_add_assigned_title'].'

    '; - echo '

    '.(empty($_GET['add']) && $_GET['error']=='email'?''.$lang['srv_added_false'].'':'').'

    '; - echo '

    '; - echo '

    '; - echo '

    '.(empty($_GET['add']) && $_GET['error']=='pass'?''.$lang['pass_doesnt_match'].'':'').'

    '; - echo '

    '; + echo '
    '; + echo ''.$lang['srv_users_add_new_type'].''; - echo '

    '; - echo ' '.$lang['create_add'].''; - echo '

    '; + // Dodajanje novega uporabnika v sistem + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + + // Dodajanje novega uporabnika v sistem in pod svoj pregled + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + + // Dodajanje obstoječega uporabnika pod pregled + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + + echo '
    '; - echo '
    '; - // admini si lahko dodajajo ze obstojece uporabnike - if ($admin_type == 0) { + // Dodajanje novih uporabnikov - ustvari racun in mu poslje mail + echo '
    '; + echo '
    '; + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; - echo '


    '; + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; - echo ''; + echo '
    '; + echo ' '; + echo ' '.(empty($_GET['add']) && $error=='email'?''.$lang['srv_added_false'].'':''); + echo '
    '; + + echo '
    '; + echo ' '; + echo ' '.(empty($_GET['add']) && $error=='pass'?''.$lang['pass_doesnt_match'].'':''); + echo '
    '; + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + + echo '
    '; + echo ' '; + echo ' '; + echo ' '; + echo '
    '; + + echo '
    '; + echo ' '; + echo '
    '; + + echo '
    '; + echo '
    '; - echo '

    '.$lang['srv_manager_add_user2'].'

    '; - echo '

    '; + + // Dodajanje novih uporabnikov pod pregled - ustvari racun, doda uporabnika pod pregled in mu poslje mail + echo '
    '; + echo '
    '; - //echo '

    '; - echo '

    '; - echo ' '.$lang['add'].''; - echo '

    '; + echo '
    '; + echo '
    '; + echo ''.$lang['name'].':'; + echo ''; + echo '
    '; + + echo '
    '; + echo ''.$lang['surname'].':'; + echo ''; + echo '
    '; + echo '
    '; + + echo '
    '; + echo '

    '.$lang['email'].':

    '; + echo ' '.(empty($_GET['add']) && $error=='email'?''.$lang['srv_added_false'].'':''); + echo '
    '; + + echo '
    '; + echo '
    '; + echo '

    '.$lang['password'].':

    '; + echo ' '.(empty($_GET['add']) && $error=='pass'?''.$lang['pass_doesnt_match'].'':''); + echo '
    '; + + echo '
    '; + echo '

    '.$lang['password_confirm'].':

    '; + echo ''; + echo '
    '; + echo '
    '; + + echo '
    '; + echo ' '; + echo '
    '; echo '
    '; - } - // Managerji lahko dodajajo samo uporabnike z dolocenimi emaili (če jim domeno posebej nastavi admin) - // TODO: trenutno onemogočimo dodaja ostalih uporabnikov za managerje. Ko bo stvar vezana na domeno se jim bo omogočilo dodajanje samo domenskih - /*elseif(false && $admin_type == 1){ + + echo '
    '; + + + // Dodajanje obstojecih uporabnikov pod pregled + echo '
    '; + + echo '
    '; - UserSetting :: getInstance()->Init($global_user_id); - $emails = UserSetting :: getInstance()->getUserSetting('manage_domain'); + echo '
    '; + echo '

    '.$lang['srv_manager_add_user_label'].':

    '; + echo ' '; + echo '
    '; - echo '
    '; - echo '

    '.sprintf($lang['srv_manager_add_user3'], $emails).'
    '.$lang['srv_manager_add_user4'].'

    '; - echo '

    '; - echo '

    '; + echo '
    '; + echo ' '; + echo '
    '; echo '
    '; - }*/ - echo '
    '; + echo '
    '; + + + echo ''; + } } /** @@ -8345,9 +8677,10 @@ class SurveyAdminSettings { global $lang; global $admin_type; - echo ''; + echo '
    '; echo ''; + echo ''; echo ''; echo ''; echo ''; @@ -8360,22 +8693,9 @@ class SurveyAdminSettings { echo ''; echo ''; echo ''; - echo ''; echo ''; echo '
    '.$lang['edit2'].'' . $lang['srv_survey_list_users_name'] . '' . $lang['srv_survey_list_users_email'] . '' . $lang['admin_type'] . '' . $lang['users_gdpr_title'] . '' . $lang['srv_survey_list_users_registred'] . '' . $lang['srv_survey_list_users_last_login'] . ''.$lang['edit2'].'
    '; - - // Dodajanje uporabnikov - echo '
    '; - - // Admin lahko doda novega uporabnika v sistem (brez pregleda) - if($admin_type == '0'){ - echo '
    '.$lang['srv_users_add_new'].''; - $this->dodajNovegaUporabnika(); - echo '
    '; - } - - echo '
    '; } /** @@ -8389,9 +8709,13 @@ class SurveyAdminSettings { $sqlU = sisplet_query("SELECT name, surname, email FROM users WHERE id='".$global_user_id."'"); $rowU = mysqli_fetch_array($sqlU); + //echo "Ime: ".$rowU['name']; - // Naslov - echo '

    '; + // PREGLED NAD UPORABNIKI - TABELA + echo '
    '; + + // Naslov + /*echo '

    '; if($admin_type == 0) echo $lang['administrator']; @@ -8404,15 +8728,15 @@ class SurveyAdminSettings { echo ' '; - echo '

    '; + echo '

    '; */ + echo '

    '.$lang['srv_users_assigned_title'].'

    '; // Tabela - echo '
    '.$lang['srv_users_assigned_title'].''; - //echo '

    '.$lang['srv_users_assigned_title'].'

    '; - echo ''; + echo '
    '; echo ''; + echo ''; echo ''; echo ''; echo ''; @@ -8423,20 +8747,9 @@ class SurveyAdminSettings { echo ''; echo ''; echo ''; - echo ''; echo ''; echo '
    '.$lang['edit2'].'' . $lang['srv_survey_list_users_name'] . '' . $lang['srv_survey_list_users_email'] . '' . $lang['admin_type'] . '' . $lang['users_gdpr_title'] . '' . $lang['srv_survey_list_users_registred'] . '' . $lang['srv_survey_list_users_last_login'] . ''.$lang['edit2'].'
    '; - echo '
    '; - - - // Dodajanje uporabnikov - echo '
    '; - - // Manager ali admin lahko doda novega uporabnika pod pregled - echo '
    '.$lang['srv_users_add_assigned'].''; - $this->dodeljeniUporabniki(); - echo '
    '; echo '
    '; } @@ -8447,7 +8760,7 @@ class SurveyAdminSettings { public function deletedUsersList(){ global $lang; - echo ''; + echo '
    '; echo ''; echo ''; echo ''; @@ -8466,7 +8779,7 @@ class SurveyAdminSettings { public function unsignedUsersList(){ global $lang; - echo '
    '.$lang['srv_survey_list_users_name'].''.$lang['srv_survey_list_users_email'].'
    '; + echo '
    '; echo ''; echo ''; echo ''; @@ -8485,12 +8798,12 @@ class SurveyAdminSettings { echo '
    '.$lang['srv_survey_list_users_name'].''.$lang['srv_survey_list_users_email'].'
    '; echo ''; + echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; - echo ''; echo ''; echo '
    '.$lang['edit2'].''.$lang['srv_survey_list_users_name'].''.$lang['srv_survey_list_users_email'].''.$lang['admin_type'].''.$lang['lang'].''.$lang['registered'].''.$lang['edit2'].'
    '; } @@ -8568,14 +8881,17 @@ class SurveyAdminSettings { if ($_GET['a'] == 'uporabnost'){ - echo '
    '.$lang['srv_uporabnost'].''; - echo ''; - echo '
    '.$lang['srv_vrsta_survey_note_4_3'].''; + echo '
    '.$lang['srv_uporabnost'].Help::display('srv_evalvacija_strani').''; + + echo '

    '.$lang['srv_vrsta_survey_note_4_3'].'

    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; - echo '
    '; - echo '
    '; if(isset($modules['uporabnost'])){ $this->uporabnost(); @@ -8685,13 +9001,15 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'kviz'){ echo '
    '.$lang['srv_kviz'].''; - echo ''; - echo '
    '.$lang['srv_vrsta_survey_note_6_4'].''; + + echo '

    '.$lang['srv_vrsta_survey_note_6_4'].'

    '; + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + echo '
    '; - echo '
    '; - echo '
    '; if(isset($modules['quiz'])){ $sq = new SurveyQuiz($this->anketa); @@ -8709,19 +9027,22 @@ class SurveyAdminSettings { echo '
    '.$lang['srv_voting'].''; - echo ''; - echo '
    '.$lang['srv_voting_info'].''; + echo '

    '.$lang['srv_voting_info'].'

    '; + echo '

    '.$lang['srv_voting_info_link'].'

    '; + echo '

    '.$lang['srv_voting_info_warning'].'

    '; // Opozorilo, da so vabila ze vklopljena in zato modula ni mogoce vklopiti if(!isset($modules['voting']) && SurveyInfo::getInstance()->checkSurveyModule('email')){ - echo '

    '.$lang['srv_voting_info_error'].'
    '; + echo '

    '.$lang['srv_voting_info_error'].'

    '; } + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; echo '
    '; - - echo '
    '; - + echo '
    '; if(isset($modules['voting'])){ $sv = new SurveyVoting($this->anketa); @@ -8732,13 +9053,14 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'advanced_paradata'){ echo '
    '.$lang['srv_advanced_paradata'].''; - echo ''; - //echo '
    '.$lang['srv_vrsta_survey_note_6_4'].''; - echo '
    '; - - echo '
    '; - + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + + echo '
    '; + echo '
    '; if(isset($modules['advanced_paradata'])){ $sap = new SurveyAdvancedParadata($this->anketa); @@ -8746,6 +9068,24 @@ class SurveyAdminSettings { } echo '
    '; } + elseif ($_GET['a'] == 'advanced_timestamps'){ + + echo '
    '.$lang['srv_advanced_timestamps'].''; + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + + echo '
    '; + + echo '
    '; + if(isset($modules['advanced_timestamps'])){ + $sat = new SurveyAdvancedTimestamps($this->anketa); + $sat->displaySettings(); + } + echo '
    '; + } elseif ($_GET['a'] == 'json_survey_export'){ echo '
    '.$lang['srv_json_survey_export'].''; @@ -8798,6 +9138,18 @@ class SurveyAdminSettings { echo ''; } elseif ($_GET['a'] == A_TELEPHONE){ + + echo '
    '; + if(isset($modules['phone'])){ + $ST = new SurveyTelephone($this->anketa); + $ST->action($_GET['m']); + } + echo '
    '; + + $hide_tel_fieldset = ''; + if ($_GET['m'] == 'recipients_lists') { + $hide_tel_fieldset = 'displayNone'; + } // Ce je anketar ne vidi teh nastavitev $isAnketar = Common::isUserAnketar($this->anketa, $global_user_id); @@ -8809,46 +9161,46 @@ class SurveyAdminSettings { // Ce se nimamo nobene stevilke v bazi, pustimo da se lahko ugasne if($rowT['cnt'] == 0){ - echo '
    '.$lang['srv_vrsta_survey_type_7'].' '.Help::display('srv_telephone_help').''; - echo ''; - echo '
    '.$lang['srv_vrsta_survey_note_7_3'].''; + echo '
    '.$lang['srv_vrsta_survey_type_7'].' '.Help::display('srv_telephone_help').''; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '

    '.$lang['srv_vrsta_survey_note_7_3'].'

    '; echo '
    '; } - else{ + /*else{ echo ''.$lang['srv_vrsta_survey_type_7'].' '.Help::display('srv_telephone_help'); echo '
    '; - } + }*/ } else{ - echo '
    '.$lang['srv_vrsta_survey_type_7'].' '.Help::display('srv_telephone_help').''; - echo ''; - echo '
    '.$lang['srv_vrsta_survey_note_7_3'].''; + echo '
    '.$lang['srv_vrsta_survey_type_7'].' '.Help::display('srv_telephone_help').''; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '

    '.$lang['srv_vrsta_survey_note_7_3'].'

    '; echo '
    '; } - - echo '
    '; - } - - echo '
    '; - if(isset($modules['phone'])){ - $ST = new SurveyTelephone($this->anketa); - $ST->action($_GET['m']); } - echo '
    '; } elseif ($_GET['a'] == A_CHAT){ global $site_path; echo '
    '.$lang['srv_vrsta_survey_type_14'].''; - echo ''; - echo '
    '.$lang['srv_vrsta_survey_note_14_1'].''; + + echo '

    '.$lang['srv_vrsta_survey_note_14_1'].'

    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; - echo '
    '; - echo '
    '; if(isset($modules['chat'])){ $sc = new SurveyChat($this->anketa); @@ -8860,13 +9212,15 @@ class SurveyAdminSettings { global $site_path; echo '
    '.$lang['srv_vrsta_survey_type_15'].''; - echo ''; - echo '
    '.$lang['srv_vrsta_survey_note_15_1'].''; + echo '

    '.$lang['srv_vrsta_survey_note_15_1'].'

    '; + echo '

    '.$lang['srv_vrsta_survey_note_15_1a'].'

    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; - echo '
    '; - echo '
    '; if(isset($modules['panel'])){ $sp = new SurveyPanel($this->anketa); @@ -8874,6 +9228,26 @@ class SurveyAdminSettings { } echo '
    '; } + elseif ($_GET['a'] == A_EMAIL_ACCESS){ + global $site_path; + + echo '
    '.$lang['srv_vrsta_survey_type_19'].''; + echo '

    '.$lang['srv_vrsta_survey_note_19_1'].'

    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; + + echo '
    '; + if(isset($modules['email_access'])){ + $sea = new SurveyEmailAccess($this->anketa); + $sea->displaySettings(); + } + echo '
    '; + } elseif ($_GET['a'] == A_FIELDWORK){ global $site_path; @@ -8892,7 +9266,7 @@ class SurveyAdminSettings { echo '
    '; } - elseif ($_GET['a'] == A_MAZA){ + elseif ($_GET['a'] == A_MAZA){ global $site_path; echo '
    '.$lang['srv_maza'].''; @@ -8905,14 +9279,14 @@ class SurveyAdminSettings { echo '
    '; - if(isset($modules['maza'])){ - $MS = new MAZA($this->anketa); - $MS ->display(); - } + if(isset($modules['maza'])){ + $MS = new MAZA($this->anketa); + $MS ->display(); + } echo '
    '; } - elseif ($_GET['a'] == A_WPN){ + elseif ($_GET['a'] == A_WPN){ global $site_path; echo '
    '.$lang['srv_wpn'].''; @@ -8925,10 +9299,10 @@ class SurveyAdminSettings { echo '
    '; - if(isset($modules['wpn'])){ - $MS = new WPN($this->anketa); - $MS ->display(); - } + if(isset($modules['wpn'])){ + $MS = new WPN($this->anketa); + $MS ->display(); + } echo '
    '; } @@ -8936,19 +9310,20 @@ class SurveyAdminSettings { if ($_GET['m'] == 'respondenti' || $_GET['m'] == "") { echo '
    '.$lang['srv_vrsta_survey_type_8'].''; - echo ''; - echo '
    '.$lang['srv_vrsta_survey_note_8_3'].''; - echo '
    '; - - echo '
    '; - + + echo '

    '.$lang['srv_vrsta_survey_note_8_3'].'

    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; - // urejanje respondentov if(isset($modules['social_network'])){ $this->SN_Settings(); } echo '
    '; + + echo '
    '; } } elseif ($_GET['a'] == A_360){ @@ -8990,25 +9365,28 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'evoli'){ echo '
    Evoli'; - echo ''; - echo '
    Napredna poročila Evoli'; - echo '
    '; - - echo '
    '; - - echo '
    '; + + echo '

    Napredna poročila Evoli

    '; + echo '
    '; + echo ''; + echo ''; echo '
    '; + + echo '
    '; + + echo '
    '; } elseif ($_GET['a'] == 'evoli_teammeter'){ echo '
    Evoli team meter'; - echo ''; - echo '
    Napredna poročila Evoli team meter'; - echo '
    '; - - echo '
    '; + + echo '

    Napredna poročila Evoli team meter

    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; echo '
    '; // urejanje respondentov @@ -9021,13 +9399,15 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'evoli_quality_climate'){ echo '
    Evoli quality climate'; - echo ''; - echo '
    Napredna poročila Evoli quality climate'; + + echo '

    Napredna poročila Evoli quality climate

    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; - echo '
    '; - echo '
    '; // urejanje respondentov if(isset($modules['evoli_quality_climate'])){ @@ -9039,13 +9419,15 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'evoli_teamship_meter'){ echo '
    Evoli teamship meter'; - echo ''; - echo '
    Napredna poročila Evoli teamship meter'; + + echo '

    Napredna poročila Evoli teamship meter

    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; - echo '
    '; - echo '
    '; // urejanje respondentov if(isset($modules['evoli_teamship_meter'])){ @@ -9057,13 +9439,15 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'evoli_organizational_employeeship_meter'){ echo '
    Evoli organizational employeeship meter'; - echo ''; - echo '
    Napredna poročila Evoli organizational employeeship meter'; + + echo '

    Napredna poročila Evoli organizational employeeship meter

    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; - - echo '
    '; - + echo '
    '; // urejanje respondentov if(isset($modules['evoli_organizational_employeeship_meter'])){ @@ -9075,53 +9459,58 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'evoli_employmeter'){ echo '
    Evoli employ meter'; - echo ''; - echo '
    Napredna poročila Evoli employeeship meter'; - echo '
    '; - - echo '
    '; - - echo '
    '; + + echo '

    Napredna poročila Evoli employeeship meter

    '; + echo '
    '; + echo ''; + echo ''; echo '
    '; + + echo '
    '; + + echo '
    '; } elseif ($_GET['a'] == 'mfdps'){ echo '
    MFDPŠ'; - echo ''; - echo '
    Napredni izvozi MFDPŠ'; - echo '
    '; - - echo '
    '; - - echo '
    '; + + echo '

    Napredni izvozi MFDPŠ

    '; + echo '
    '; + echo ''; + echo ''; echo '
    '; + + echo '
    '; + + echo '
    '; } elseif ($_GET['a'] == 'borza'){ echo '
    Borza'; - echo ''; - echo '
    Napredni izvozi Borza'; - echo '
    '; - - echo '
    '; - - echo '
    '; + + echo '

    Napredni izvozi Borza

    '; + echo '
    '; + echo ''; + echo ''; echo '
    '; + + echo ''; + + echo '
    '; } elseif ($_GET['a'] == 'mju'){ echo '
    MJU'; - echo ''; - echo '
    Napredni izvozi MJU'; - + + echo '

    Napredni izvozi MJU

    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + - echo '
    '; - echo '
    '; if(isset($modules['mju'])){ $sme = new SurveyMJUEnote($this->anketa); @@ -9132,15 +9521,16 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'excell_matrix'){ echo '
    Excelleration matrix'; - echo ''; - echo '
    '.$lang['srv_vrsta_survey_note_16_1'].''; - echo '
    '; - - echo '
    '; - - echo '
    '; + + echo '

    '.$lang['srv_vrsta_survey_note_16_1'].'

    '; + echo '
    '; + echo ''; + echo ''; echo '
    '; + + echo ''; + + echo '
    '; } } @@ -9168,7 +9558,10 @@ class SurveyAdminSettings { } function globalUserSettings () { - global $lang, $global_user_id, $admin_type; + global $lang, $global_user_id, $admin_type, $site_url; + + $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/"); + $preklici_url = "'". $site_url . $preklici_url . "'"; # polovimo nastavitve uporabnika UserSetting::getInstance()->Init($global_user_id); @@ -9210,117 +9603,157 @@ class SurveyAdminSettings { $sql = sisplet_query("SELECT lang FROM users WHERE id = '$global_user_id'"); $row = mysqli_fetch_array($sql); $lang_admin = $row['lang']; - echo ''.$lang['lang'] . ':'; echo ''; echo ''; echo ''; - - echo '
    '; - - // Napredni vmesnik (star design za moje ankete) - echo ''; + echo '
    '; - echo '
    '; + echo '
    '; + echo ''.$lang['srv_settings_interfaceshow'] . ':'; - // Prikaži ikono za jezik v navigacijski vrstici ankete, desno zgoraj - echo ''; + // Prikaži ikono za jezik v navigacijski vrstici ankete, desno zgoraj - TE NASTAVITVE NE UPOSTEVAMO VEC + /*echo '
    '; + echo ''; + echo ''; + echo ''; + echo '
    ';*/ - echo '
    '; - // Opcija enklik ustvarjanja ankete (v mojih anketah) - echo '
    '; echo ''; echo '
    '.$lang['srv_survey_settings'].''; - + + echo '
    '; + echo ''.$lang['srv_settings_oncreation'] . ':'; + // Aktivna anketa ob aktivaciji - TO PUSTIMO SAMO ADMINOM ZARADI GDPR OPOZORILA OB AKTIVACIJI if($admin_type == '0'){ - echo '
    '; + + echo '
    '; + echo ''.$lang['srv_settings_onactivation'] . ':'; + + // Zaklep urejanja ob aktivaciji + echo '
    '; + echo ''; + echo ''; + echo ''; + echo '
    '; + echo '
    '; echo '
    '; echo ''; + // save gumb + echo '
    '; + echo ''; + echo ''; + echo '
    '; - // API avtentikacija - echo '
    '.$lang['srv_api'].''; + // div za prikaz uspešnosti shranjevanja + if (isset($_GET['s']) && $_GET['s'] == '1') { + echo '
    '; + echo ''; + } + - echo ''.$lang['srv_api_auth'].': '; - echo ''.$lang['srv_api_auth2'].''; - echo '

    '; + // API avtentikacija + echo '
    '.$lang['srv_api'].Help::display('srv_nastavitve_API').''; + + echo '

    '.$lang['srv_api_auth'].':

    '; + + echo '
    '; + echo ''; + echo '
    '; echo $lang['additional_info_api']; echo '
    '; + + + // Izvoz vseh anket v paket + echo '
    '.$lang['srv_archive_surveys'].Help::display('archive_surveys').''; + + echo '

    '.$lang['srv_archive_surveys_text1'].'

    '; + echo '

    '.$lang['srv_archive_surveys_text2'].'

    '; + echo '

    '.$lang['srv_archive_surveys_text3'].'

    '; + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + echo '
    '; - // save gumb - echo ' '; - - echo ''; - - // div za prikaz uspešnosti shranjevanja - if ($_GET['s'] == '1') { - echo '
    '; - echo ''; - } - + echo '
    '; } function globalUserMyProfile () { - global $lang, $global_user_id, $admin_type, $site_domain, $site_url, $app_settings, $aai_instalacija; + global $lang, $global_user_id, $admin_type, $site_domain, $site_url; + + $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/"); + $preklici_url = "'". $site_url . $preklici_url . "'"; // podatki prijavljenega uporabnika $sql = sisplet_query("SELECT id, name, surname, email, type, gdpr_agree, last_login FROM users WHERE id = '$global_user_id'"); @@ -9332,26 +9765,34 @@ class SurveyAdminSettings { echo ' ' . "\n\r"; echo ' ' . "\n\r"; - echo '
    '.$lang['edit_data'].''; - - echo '
    '.$lang['logged_in_as'].': '.$row['name'].' '.$row['surname'].'
    '; + echo '
    '.$lang['edit_data'].''; + + //Prijavljeni kot, status, zadnja prijava, aktivni paket + echo '
    '; + if($row['type'] == '0') $type = $lang['admin_admin']; elseif($row['type'] == '1') $type = $lang['admin_manager']; else $type = $lang['admin_narocnik']; - echo '
    '.$lang['your_status'].': '.$type.'
    '; - - // Zadnja prijava - echo '
    '.$lang['srv_last_login'].': '.date('j.n.Y', strtotime($row['last_login'])).' '.$lang['ob'].' '.date('H:i', strtotime($row['last_login'])).'
    '; - - - // Trenutni paket funkcionalnosti - if($app_settings['commercial_packages']){ - echo '
    '; - + echo ''; + + echo '
    '; } else{ $rowA = mysqli_fetch_array($sqlA); + $userAccess = UserAccess::getInstance($global_user_id); + $package_name = $userAccess->getPackageName($rowA['package_id']); // Ce ima paket 2 ali 3 - if($rowA['package_id'] == '2' || $rowA['package_id'] == '3'){ + if($rowA['package_id'] == '2' || $rowA['package_id'] == '3'){ // Ce je paket ze potekel - if(strtotime($rowA['time_expire']) < time()){ + if(strtotime($rowA['time_expire']) < time()){ - $package_string = ''; - $package_string .= $rowA['package_name']; + $package_string = ''; + $package_string .= $package_name; $package_string .= ' ('.$lang['srv_access_package_expire'].' '.date("d.m.Y", strtotime($rowA['time_expire'])).')'; $package_string .= ''; - - $package_string .= ' - '.$lang['srv_narocila_extend'].''; + + $package_string .= '
    '; } else{ - $package_string = $rowA['package_name']; + $package_string = $package_name; $package_string .= ' ('.$lang['srv_access_package_valid'].' '.date("d.m.Y", strtotime($rowA['time_expire'])).')'; - $package_string .= ' - '.$lang['srv_narocila_extend'].''; - - $package_string .= '
    '.$lang['srv_access_package_all'].''; + $package_string .= '
    '; } } else{ - $package_string = $rowA['package_name']; + $package_string = $package_name; $package_string .= ' ('.$lang['srv_access_package_free'].')'; - $package_string .= ' - '.$lang['srv_narocila_buy'].''; + $package_string .= '
    '; } } - - echo '
    '.$lang['srv_access_package'].': '.$package_string.'
    '; + echo '
    '.$package_string.'
    '; } - - echo '
    '; + echo '
    '; + + echo '
    '; // AAI nima moznosti spreminjanja imena, priimka, emaila, gesla... - if($aai_instalacija){ + if(isAAI()){ echo ''.$lang['srv_profil_aai_warning'].''; } else{ - echo '
    '.$lang['name'].':'; - echo '
    '; - - echo '
    '.$lang['surname'].' :'; - echo '
    '; - echo '
    '.$lang['email'].' : '; - echo ' '; - echo ' '; - echo '  '; - - $alternativni_emaili = User::getInstance()->allEmails('brez primarnega'); - - echo ''; - if(!empty($alternativni_emaili)){ - foreach($alternativni_emaili as $email) { - echo '
     '; - echo ''; - echo ''; - echo 'active == 1 ? 'checked="checked"' : '').'> '; - } + echo '

    '.$lang['srv_profil_settings_text'].'

    '; + + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; + + $alternativni_emaili = User::getInstance()->allEmails('brez primarnega'); + + echo '
    '; + echo ''; + echo '
    '; + echo ''; + if(!empty($alternativni_emaili)) + echo 'primaryEmail() == $row['email'] ? 'checked="checked"' : '').'>'; + echo '
    '; + echo '
    '; + + //Alternativni maili + if(!empty($alternativni_emaili)){ + foreach($alternativni_emaili as $email) { + echo '
    '; + echo ''; + echo '
    '; + echo ''; + echo '
    '; + echo 'active == 1 ? 'checked="checked"' : '').'> '; + echo '
    '; + echo '
    '; } - echo '

    '; - - echo ''; + } + + echo '
    '; + echo '
    '.$lang['srv_profil_settings_addemail'].'
    '; + echo '
    '; + + echo ''; // Ce je vklopljen modul gorenje, preverimo ce ima se default geslo in izpisemo opozorilo if (Common::checkModule('gorenje')){ @@ -9448,25 +9917,44 @@ class SurveyAdminSettings { echo '

    '.$lang['gorenje_password_warning'].'

    '; } - // Obveščanje - echo '
    '.$lang['password'].':'; - echo '
    '; - - echo '
    '.$lang['again'].':'; - echo '
    '; + // Geslo + + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; // Prejemanje obvestil - $red_border = (isset($_GET['unsubscribe']) && $_GET['unsubscribe'] == '1') ? ' border:2px red solid; padding: 5px 10px;' : ''; - echo '
    '.$lang['srv_gdpr_user_options'].': '.Help::display('srv_gdpr_user_options').''; - echo ' '; - echo '
    '; + + echo '
    '; + echo ''.$lang['srv_gdpr_user_options'].' '.Help::display('srv_gdpr_user_options').''; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; // Google 2 FA $user_option = User::option($global_user_id, 'google-2fa-secret'); $user_option_validate = User::option($global_user_id, 'google-2fa-validation'); - echo '
    '.$lang['google_2fa'].': '.Help::display('srv_google_2fa_options').''; - echo ' '; - echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; if (empty($user_option)) { $google2fa = new \Sonata\GoogleAuthenticator\GoogleAuthenticator(); @@ -9479,56 +9967,89 @@ class SurveyAdminSettings { echo '
    '.$lang['google_2fa_admin_enabled'].''.$googleSecret.'
    '; echo '
    '.$lang['google_2fa_admin_enabled_2'].'
    '; echo ''; - echo '
    '; - echo '
    Ko boste shranili nastavitve, bo nastavitev obveljala.
    '; + echo '
    '; + echo '
    '.$lang['google_2fa_admin_save_note'].'
    '; echo '
    '; - } elseif (! empty($user_option) && $user_option_validate == 'NOT') { - echo '
    '; - echo '
    '.$lang['google_2fa_admin_validate'].'
    '; - echo '
    '; - echo ''; - echo ''; - - echo '
    '.$lang['google_2fa_user_error_code'].'
    '; + } + elseif (! empty($user_option) && $user_option_validate == 'NOT') { + echo '
    '; + + echo '
    '.$lang['google_2fa_admin_validate'].'
    '; + echo '
    '; + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + + echo ''; + echo '
    '; - } else { - echo ''; + } + + function globalUserChangeArchive () { + global $lang, $global_user_id, $admin_type, $site_domain, $site_url; + + // podatki prijavljenega uporabnika + $sql = sisplet_query("SELECT id, name, surname, email, type, gdpr_agree, last_login FROM users WHERE id = '$global_user_id'"); + $row = mysqli_fetch_array($sql); + + echo '
    '; + + echo '
    ' . "\n\r"; + echo ' ' . "\n\r"; + echo ' ' . "\n\r"; // Tabela aktivnosti (prijav) echo '
    '.$lang['srv_login_tracking_title'].''; + echo '
    '; + echo '
    '; + echo ''; - echo ''; + echo ''; $result = sisplet_query ("SELECT IP, kdaj FROM user_login_tracker WHERE uid='".$global_user_id."' ORDER BY kdaj desc"); if (mysqli_num_rows($result) == 0) { @@ -9537,21 +10058,23 @@ class SurveyAdminSettings { else { $count = 0; while ($row = mysqli_fetch_array ($result)) { - echo '= 5 ? ' class="hide"' : '').'>'; + echo '= 5 ? ' class="displayNone"' : '').($count == 4 ? ' class="show_as_last_row"' : '').'>'; echo ''; - echo ''; - echo ''; + echo ''; echo ''; $count++; } } echo ''; + + echo '
    '; + echo '
    '; - if(mysqli_num_rows($result) > 25){ - echo ''; - echo '

    '; - } + //Gumb za izpis vseh prijav v tabeli - update v 2. fazi @TG + /**if(mysqli_num_rows($result) > 25){ + echo ''; + }**/ echo '
    '; @@ -9586,15 +10109,16 @@ class SurveyAdminSettings { $lockSurvey = (int)UserSetting::getInstance()->getUserSetting('lockSurvey'); if ($admin_type == '0' || $admin_type == '1') { - echo '

    '; - echo ''; - echo '

    '; + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; } if ((int)$lockSurvey > 0) { - echo '

    '.$lang['srv_unlock_popup'].'

    '; + echo '

    '.$lang['srv_unlock_popup'].'

    '; } } @@ -9608,23 +10132,29 @@ class SurveyAdminSettings { $msg = null; $email_msg = $lang['srv_mail_test_smtp_test_success']; $email_subject = $lang['srv_mail_test_smtp_test']; + + $mailMode = $_REQUEST['SMTPMailMode']; $MA = new MailAdapter($this->anketa); - $settings = $MA->getSettingsFromRequest($_REQUEST); - $mailMode = $_REQUEST['SMTPMailMode']; + $SmailMode = $mailMode === 1 ? 'google' : 'smtp'; + $settings_saved = $MA->getSettings($SmailMode); - - if (isset ($_COOKIE['uid'])) { + if ($mailMode == 1 || $mailMode == 2){ + $email = $settings['SMTPFrom']; + } + else if (isset ($_COOKIE['uid'])) { $email = base64_decode ($_COOKIE['uid']); } else { $error = true; $msg = $lang['srv_mail_test_smtp_mail_detect_error']; } - - if (validEmail($email)){ + $settings['SMTPPassword'] = empty($_REQUEST['SMTPPassword']) ? $settings_saved['SMTPPassword'] : $_REQUEST['SMTPPassword']; + + if (validEmail($email)){ + // preverimo password - ne sme bit prazen if (($mailMode == 1 || $mailMode == 2) && empty($settings['SMTPPassword'])){ # password $error = true; @@ -9647,8 +10177,13 @@ class SurveyAdminSettings { $error = true; $msg = $lang['srv_mail_test_smtp_not_possible']; } - } + } + + echo '
    '; + echo '

    '.$lang['srv_mail_test_smtp'].'

    '; + echo ''; + // če imamo napake jo izpišemo if ($error == true){ echo $lang['srv_mail_test_smtp_error'].': '. $msg; @@ -9656,23 +10191,17 @@ class SurveyAdminSettings { else{ echo $lang['srv_mail_test_smtp_sent'].': '.$email; } - + #vsebino shranimo v buffer $content = ob_get_clean(); + + echo $content; + + echo '
    '; + echo ''; + echo '
    '; - $popUp = new PopUp(); - #$popUp->setId('divSurveySmtp'); - $popUp->setHeaderText($lang['srv_mail_test_smtp']); - - #dodamo vsebino - $popUp->setContent($content); - - # dodamo gumb Prekliči - $button = new PopUpCancelButton(); - $button->setCaption($lang['srv_zapri'])->setTitle($lang['srv_zapri']); - $popUp->addButton($button); - - echo $popUp; + echo '
    '; } } ?> \ No newline at end of file diff --git a/admin/survey/ajax.php b/admin/survey/ajax.php index 80cae5c..162d02e 100644 --- a/admin/survey/ajax.php +++ b/admin/survey/ajax.php @@ -14,6 +14,10 @@ if (isDebug()){ error_reporting(E_ALL ^ E_NOTICE); ini_set('display_errors', '1'); } +else{ + error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT); + ini_set('display_errors', '0'); +} Common::start(); @@ -25,7 +29,7 @@ $surveySkin = 0; // Naložimo jezikovno datoteko -$anketa = $_REQUEST['anketa']; +$anketa = $_REQUEST['anketa'] ?? null; $lang_admin = 0; if ($anketa > 0) { $sql = sisplet_query("SELECT lang_admin FROM srv_anketa WHERE id = '$anketa'"); @@ -49,11 +53,17 @@ include($file); $_SESSION['langX'] = $site_url .'lang/'.$lang_admin.'.php'; +$t = (isset($_GET['t'])) ? $_GET['t'] : ''; +$a = (isset($_GET['a'])) ? $_GET['a'] : ''; +$m = (isset($_GET['m'])) ? $_GET['m'] : ''; +$d = (isset($_GET['d'])) ? $_GET['d'] : ''; + + // preverimo dostop $result = sisplet_query ("SELECT value FROM misc WHERE what='SurveyDostop'"); list ($SurveyDostop) = mysqli_fetch_row ($result); -if ( (( ($admin_type <= $SurveyDostop && $SurveyDostop<3) || ($SurveyDostop==3) ) && ($admin_type>=0)) || $_GET['a']=='comment_manage' ) { +if ( (( ($admin_type <= $SurveyDostop && $SurveyDostop<3) || ($SurveyDostop==3) ) && ($admin_type>=0)) || $a == 'comment_manage' ) { // ok, bo slo naprej... } else { @@ -67,94 +77,100 @@ $tracking_status = -1; /**************** UREJANJE ****************/ -if ($_GET['t'] == 'branching') { +if ($t == 'branching') { $tracking_status = 0; $b = new BranchingAjax($anketa); $b->ajax(); } -elseif ($_GET['t'] == 'quota') { +elseif ($t == 'quota') { $tracking_status = 0; $SQ = new SurveyQuotas($anketa); $SQ->ajax(); } -elseif ($_GET['t'] == 'vprasanje') { +elseif ($t == 'vprasanje') { $tracking_status = 0; $v = new Vprasanje(); $v->ajax(); } -elseif ($_GET['t'] == 'vprasanjeinline') { +elseif ($t == 'vprasanjeinline') { $tracking_status = 0; $v = new VprasanjeInline(); $v->ajax(); } -elseif ($_GET['t'] == 'prevajanje') { +elseif ($t == 'vprasanjeDeleted') { + $tracking_status = 0; + + $vd = new VprasanjeDeleted($anketa); + $vd->ajax(); +} +elseif ($t == 'prevajanje') { $tracking_status = 0; $p = new Prevajanje(); $p->ajax(); } -elseif ($_GET['t'] == 'glasovanje') { +elseif ($t == 'glasovanje') { $tracking_status = 0; $gl = new Glasovanje($anketa); $gl->ajax(); } -elseif ($_GET['t'] == 'missingValues') { +elseif ($t == 'missingValues') { $tracking_status = 0; $smv = new SurveyMissingValues($anketa); $smv->ajax(); } -elseif ($_GET['t'] == 'quiz') { +elseif ($t == 'quiz') { $tracking_status = 0; $sq = new SurveyQuiz($anketa); $sq -> ajax(); } -elseif ($_GET['t'] == 'theme') { +elseif ($t == 'theme') { $tracking_status = 0; $diplayIframe = ($_POST['a'] == 'previewThemeIframe' ? false : true); $st = new SurveyTheme($anketa,$diplayIframe); $st->Ajax(); } -elseif ($_GET['t'] == 'heatmapRadij') { +elseif ($t == 'heatmapRadij') { $tracking_status = 0; $hmr = new SurveyHeatMapRadij(); $hmr->ajax() ; } -elseif ($_GET['t'] == 'getheatmapradij') { +elseif ($t == 'getheatmapradij') { $tracking_status = 0; $hmgr = new SurveyGetHeatMapRadij(); $hmgr->ajax() ; } -elseif ($_GET['t'] == 'getheatmapexporticons') { +elseif ($t == 'getheatmapexporticons') { $tracking_status = 0; $hmei = new SurveyHeatMapExportIcons(); $hmei->ajax() ; } -elseif ($_GET['t'] == 'saveHeatmapImage') { +elseif ($t == 'saveHeatmapImage') { $tracking_status = 0; $hmis = new SurveyHeatMapImageSave(); $hmis->ajax() ; } -elseif ($_GET['t'] == 'themeEditor') { +elseif ($t == 'themeEditor') { $tracking_status = 0; $te = new SurveyThemeEditor($anketa, true); $te->ajax(); } -elseif ($_GET['t'] == 'changeSurveyLock') { +elseif ($t == 'changeSurveyLock') { $tracking_status = 0; if (isset($_POST['name']) && $_POST['name'] == 'lockSurvey') { @@ -168,31 +184,31 @@ elseif ($_GET['t'] == 'changeSurveyLock') { $sas = new SurveyAdminSettings(); $sas->showLockSurvey(); } -elseif ($_GET['t'] == 'SurveyConnect') { +elseif ($t == 'SurveyConnect') { $tracking_status = 0; $sc = new SurveyConnect(); $sc->ajax(); } -elseif ($_GET['t'] == 'surveyCondition') { +elseif ($t == 'surveyCondition') { $tracking_status = 0; $scp = new SurveyCondition($anketa); $scp->ajax(); } -elseif($_GET['t'] == 'checboxChangeTheme'){ +elseif($t == 'checboxChangeTheme'){ $tracking_status = 0; $checkbox = new SurveyTheme($anketa); $checkbox->Ajax(); } -elseif($_GET['t'] == 'gdpr'){ +elseif($t == 'gdpr'){ $tracking_status = 0; $gdpr = new GDPR(); $gdpr->ajax(); } -elseif ($_GET['t'] == 'skupine') { +elseif ($t == 'skupine') { $tracking_status = 0; $ss = new SurveySkupine($anketa); @@ -202,76 +218,76 @@ elseif ($_GET['t'] == 'skupine') { /**************** ANALIZE ****************/ -elseif ($_GET['t'] == A_ANALYSIS) { +elseif ($t == A_ANALYSIS) { $tracking_status = 2; $a = new SurveyAnalysis(); $a->Init($anketa); $a->ajax(); } -elseif ($_GET['t'] == 'crosstab') { +elseif ($t == 'crosstab') { $tracking_status = 2; $sc = new SurveyCrosstabs(); $sc -> Init($anketa); $sc -> ajax(); } -elseif ($_GET['t'] == 'multicrosstabs') { +elseif ($t == 'multicrosstabs') { $tracking_status = 2; $smc = new SurveyMultiCrosstabs($anketa); $smc -> ajax(); } -elseif ($_GET['t'] == 'means') { +elseif ($t == 'means') { $tracking_status = 2; $sm = new SurveyMeans($anketa); $sm -> ajax(); } -elseif ($_GET['t'] == 'ttest') { +elseif ($t == 'ttest') { $tracking_status = 2; $stt = new SurveyTTest($anketa); $stt -> ajax(); } -elseif ($_GET['t'] == 'table_chart') { +elseif ($t == 'table_chart') { $tracking_status = 2; $stc = new SurveyTableChart($anketa); $stc -> ajax(); } -elseif ($_GET['t'] == 'charts') { +elseif ($t == 'charts') { $tracking_status = 2; $sc = new SurveyChart(); $sc -> Init($anketa); $sc -> ajax(); } -elseif ($_GET['t'] == 'zoom') { +elseif ($t == 'zoom') { $tracking_status = 2; $sz = new SurveyZoom($anketa); $sz -> ajax(); } -elseif ($_GET['t'] == 'break') { +elseif ($t == 'break') { $tracking_status = 2; $sb = new SurveyBreak($anketa); $sb->ajax() ; } -elseif($_GET['t'] == 'analysisGorenje'){ +elseif($t == 'analysisGorenje'){ $tracking_status = 2; $SAG = new SurveyAnalysisGorenje($anketa); $SAG->ajax(); } -elseif ($_GET['t'] == 'ParaAnalysis') { +elseif ($t == 'ParaAnalysis') { $tracking_status = 2; $spa = new SurveyParaAnalysis($anketa); $spa->ajax(); } -elseif ($_GET['t'] == 'custom_report') { +elseif ($t == 'custom_report') { $tracking_status = 2; $SCR = new SurveyCustomReport($anketa); @@ -281,7 +297,7 @@ elseif ($_GET['t'] == 'custom_report') { /**************** STATUS ****************/ -elseif ($_GET['t'] == 'dashboard') { +elseif ($t == 'dashboard') { $tracking_status = 3; $ss = new SurveyStatistic(); @@ -292,62 +308,62 @@ elseif ($_GET['t'] == 'dashboard') { /**************** PODATKI ****************/ -elseif ($_GET['t'] == 'postprocess') { +elseif ($t == 'postprocess') { $tracking_status = 4; $spp = new SurveyPostProcess($anketa); $spp->ajax(); } -elseif ($_GET['t'] == 'advanced_paradata') { +elseif ($t == 'advanced_paradata') { $tracking_status = 4; $sq = new SurveyAdvancedParadata($anketa); $sq -> ajax(); } -elseif ($_GET['t'] == 'recode') { +elseif ($t == 'recode') { $tracking_status = 4; $SR = new SurveyRecoding($anketa); $SR -> Ajax(); } -elseif ($_GET['t'] == 'displayData') { +elseif ($t == 'displayData') { $tracking_status = 4; $dd = new SurveyDataDisplay($anketa); $dd->ajax() ; } -elseif ($_GET['t'] == 'dataFile') { +elseif ($t == 'dataFile') { $tracking_status = 4; $SDF = SurveyDataFile::get_instance(); $SDF->init($anketa); $SDF->ajax(); } -elseif ($_GET['t'] == 'mapData') { +elseif ($t == 'mapData') { $tracking_status = 4; $md = new SurveyMapData(); $md->mapData() ; } -elseif ($_GET['t'] == 'mapDataAll') { +elseif ($t == 'mapDataAll') { $tracking_status = 4; $md = new SurveyMapData(); $md->mapDataAll() ; } -elseif ($_GET['t'] == 'heatmapData') { +elseif ($t == 'heatmapData') { $tracking_status = 4; $hmd = new SurveyHeatMap(); $hmd->ajax() ; } -elseif ($_GET['t'] == 'heatmapBackgroundData') { +elseif ($t == 'heatmapBackgroundData') { $tracking_status = 4; $hmbd = new SurveyHeatMapBackground(); $hmbd->ajax() ; } -elseif ($_GET['t'] == 'setDataView') { +elseif ($t == 'setDataView') { $tracking_status = 4; if ($_POST['what'] != null && trim($_POST['what']) != '' && is_string($_POST['what'])){ @@ -364,25 +380,26 @@ elseif ($_GET['t'] == 'setDataView') { SurveySession::append('data_view_settings','cur_rec_page','1'); } } -elseif ($_GET['t'] == 'surveyUsableResp') { +elseif ($t == 'surveyUsableResp') { $tracking_status = 4; $sur = new SurveyUsableResp($anketa); $sur->ajax(); } -elseif($_GET['t'] == 'aaporCalculation'){ +elseif($t == 'aaporCalculation'){ $tracking_status = 4; $ss = new SurveyStatistic(); $ss -> Init($anketa); - if(!isset($_GET['m'])) + if($m == ''){ $ss->DisplayAaporFullCalculation(); - else if(isset($_GET['m']) && $_GET['m'] == 'priblizek'){ + } + else if($m == 'priblizek'){ $ss->DisplayAaporPriblizek(); } } -elseif ($_GET['t'] == 'appendMerge') { +elseif ($t == 'appendMerge') { $tracking_status = 4; $am = new SurveyAppendMerge($anketa); @@ -392,51 +409,51 @@ elseif ($_GET['t'] == 'appendMerge') { /**************** OBJAVA ****************/ -elseif ($_GET['t'] == 'telephone') { +elseif ($t == 'telephone') { $tracking_status = 5; $tp = new SurveyTelephone($anketa); $tp->ajax(); } -elseif ($_GET['t'] == 'invitations') { +elseif ($t == 'invitations') { $tracking_status = 5; $SIN = new SurveyInvitationsNew($anketa); $SIN -> ajax(); } -elseif ($_GET['t'] == 'notifications') { +elseif ($t == 'notifications') { $tracking_status = 5; $NO = new Notifications(); $NO->ajax(); } -elseif ($_GET['t'] == 'simpleMailInvitation') { +elseif ($t == 'simpleMailInvitation') { $tracking_status = 5; $SSMI = new SurveySimpleMailInvitation($anketa); $SSMI -> ajax(); } -elseif ($_GET['t'] == 'surveyBaseSetting') { +elseif ($t == 'surveyBaseSetting') { $tracking_status = 5; $SBS = new SurveyBaseSetting($anketa); $SBS -> ajax(); } -elseif ($_GET['t'] == 'getSiteUrl') { +elseif ($t == 'getSiteUrl') { $tracking_status = 5; $hmii = new GetSiteUrl(); $hmii->ajax() ; } -elseif($_GET['t'] == 'WPN'){ - if($_GET['a'] == 'wpn_send_notification'){ +elseif($t == 'WPN'){ + if($a == 'wpn_send_notification'){ $tracking_status = 5; $WPN = new WPN($anketa); $WPN -> sendWebPushNotificationsToAll(); } } -elseif ($_GET['t'] == 'SurveyUrlLinks') { +elseif ($t == 'SurveyUrlLinks') { $tracking_status = 5; $sul = new SurveyUrlLinks($anketa); @@ -446,20 +463,20 @@ elseif ($_GET['t'] == 'SurveyUrlLinks') { /**************** HIERARHIJA ****************/ -elseif ($_GET['t'] == 'hierarhy-means') { +elseif ($t == 'hierarhy-means') { $tracking_status = 6; $sm = new HierarhijaAnalysis($anketa); $sm -> ajax(); } -elseif($_GET['t'] == 'hierarhija-ajax'){ +elseif($t == 'hierarhija-ajax'){ $tracking_status = 6; $hierarhija = new \Hierarhija\HierarhijaAjax($anketa); $hierarhija->ajax(); } -elseif ($_GET['t'] == 'sa-uporabniki') { +elseif ($t == 'sa-uporabniki') { $tracking_status = 6; if(!class_exists('Hierarhija\Ajax\AjaxHierarhijaDostopUporabnikovClass')) @@ -467,23 +484,23 @@ elseif ($_GET['t'] == 'sa-uporabniki') { $hierarhija_dostop = new Hierarhija\Ajax\AjaxHierarhijaDostopUporabnikovClass(); - if($_GET['a'] == 'add') { + if($a == 'add') { $hierarhija_dostop->save(); } - elseif($_GET['a'] == 'check'){ + elseif($a == 'check'){ $hierarhija_dostop->checkUserEmail(); } - elseif($_GET['a'] == 'delete'){ + elseif($a == 'delete'){ $hierarhija_dostop->delete(); } - elseif($_GET['a'] == 'edit') { + elseif($a == 'edit') { $user_id = (!empty($_POST['id']) ? $_POST['id'] : null); $hierarhija_dostop->popupNew($user_id); } - elseif($_GET['a'] == 'update') { + elseif($a == 'update') { $hierarhija_dostop->update(); } - elseif($_GET['a'] == 'show') { + elseif($a == 'show') { $hierarhija_dostop->show(); } else { @@ -494,86 +511,105 @@ elseif ($_GET['t'] == 'sa-uporabniki') { /**************** UPORABNIK ****************/ -elseif ($_GET['t'] == 'surveyList') { +elseif ($t == 'surveyList') { $SL = new SurveyList(); $SL->Ajax(); } -elseif ($_GET['t'] == 'library') { +elseif ($t == 'surveyListFolders') { + $SL = new SurveyListFolders(); + $SL->ajax(); +} +elseif ($t == 'library') { $l = new Library(); $l->ajax(); } -elseif ($_GET['t'] == 'help') { +elseif ($t == 'libraryBranching') { + $lb = new LibraryBranching($anketa); + $lb->ajax(); +} +elseif ($t == 'help') { $h = new Help(); $h->ajax(); } -elseif ($_GET['t'] == 'globalUserSettings') { +elseif ($t == 'globalUserSettings') { $sas = new SurveyAdminSettings(); $sas->setGlobalUserSetting(); } -elseif($_GET['t'] == 'userAccess'){ +elseif($t == 'userAccess'){ $ua = UserAccess::getInstance($global_user_id); $ua->ajax(); } -elseif($_GET['t'] == 'userNarocila'){ +elseif($t == 'userNarocila'){ $UN = new UserNarocila(); $UN->ajax(); } -elseif($_GET['t'] == 'userPlacila'){ +elseif($t == 'userPlacila'){ $UP = new UserPlacila(); $UP->ajax(); } -elseif ($_GET['t'] == 'newSurvey') { +elseif($t == 'domainChange'){ + $usr_id = (isset($_POST['usr_id']) ? $_POST['usr_id'] : $global_user_id); + + $dc = DomainChange::getInstance($usr_id); + $dc->ajax(); +} +elseif ($t == 'newSurvey') { $ns = new NewSurvey(); $ns->ajax(); } -elseif ($_GET['a'] == 'user_tracking') { - if($_GET['d'] == 'download'){ - return UserTrackingClass::init()->csvExport(); - } +elseif ($a == 'user_tracking') { + + if($d == 'download'){ + return UserTrackingClass::init()->csvExport(); + } +} +elseif ($t == 'archiveSurveys') { + $as = new ArchiveSurveys(); + $as->ajax(); } /**************** UPORABNIK - END ****************/ /**************** UNKNOWN, NAPREDNI MODULI ****************/ -elseif ($_GET['t'] == 'profileManager') { +elseif ($t == 'profileManager') { $tracking_status = -1; $spm = new SurveyProfileManager(); $spm->ajax(); } -elseif ($_GET['t'] == 'SurveyReminderTracking') { +elseif ($t == 'SurveyReminderTracking') { $tracking_status = -1; $sur = new SurveyReminderTracking($anketa); $sur->ajax(); } -elseif ($_GET['t'] == 'inspect') { +elseif ($t == 'inspect') { $tracking_status = -1; $SI = new SurveyInspect($anketa); $SI -> ajax(); } -elseif ($_GET['t'] == 'dostop') { +elseif ($t == 'dostop') { $tracking_status = -1; $d = new Dostop(); $d->ajax(); } -elseif ($_GET['t'] == 'missingProfiles') { +elseif ($t == 'missingProfiles') { $tracking_status = -1; $smp = new SurveyMissingProfiles(); $smp->Init($anketa); $smp->ajax(); } -elseif ($_GET['t'] == 'statusProfile') { +elseif ($t == 'statusProfile') { $tracking_status = -1; $ssp = new SurveyStatusProfiles(); $ssp -> Init($anketa); $ssp->ajax(); } -elseif ($_GET['t'] == 'timeProfile') { +elseif ($t == 'timeProfile') { global $global_user_id; $tracking_status = -1; @@ -582,7 +618,7 @@ elseif ($_GET['t'] == 'timeProfile') { $tp -> Init($anketa,$global_user_id); $tp -> ajax(); } -elseif ($_GET['t'] == 'dataSettingProfile') { +elseif ($t == 'dataSettingProfile') { global $global_user_id; $tracking_status = -1; @@ -591,204 +627,217 @@ elseif ($_GET['t'] == 'dataSettingProfile') { $dsp -> Init($anketa,$global_user_id); $dsp -> ajax(); } -elseif ($_GET['t'] == 'variableProfile') { +elseif ($t == 'variableProfile') { $tracking_status = -1; $svp = new SurveyVariablesProfiles(); $svp -> Init($anketa,$global_user_id); $svp->ajax(); } -elseif ($_GET['t'] == 'export') { +elseif ($t == 'export') { $tracking_status = -1; $se = new SurveyExport(); $se -> Init($anketa); $se -> ajax(); } -elseif ($_GET['t'] == 'conditionProfile') { +elseif ($t == 'conditionProfile') { $tracking_status = -1; $scp = new SurveyConditionProfiles(); $scp -> Init($anketa,$global_user_id); $scp -> ajax(); } -elseif ($_GET['t'] == 'zankaProfile') { +elseif ($t == 'zankaProfile') { $tracking_status = -1; $szp = new SurveyZankaProfiles(); $szp -> Init($anketa,$global_user_id); $szp -> ajax(); } -elseif ($_GET['t'] == 'slideshow') { +elseif ($t == 'slideshow') { $tracking_status = -1; $ss = new SurveySlideshow($anketa); $ss -> ajax(); } -elseif ($_GET['t'] == 'chat') { +elseif ($t == 'chat') { $tracking_status = -1; $sc = new SurveyChat($anketa); $sc -> ajax(); } -elseif ($_GET['t'] == 'panel') { +elseif ($t == 'panel') { $tracking_status = -1; $sp = new SurveyPanel($anketa); $sp -> ajax(); } -elseif ($_GET['t'] == 'showTestSurveySMTP') { +elseif ($t == 'email_access') { + $tracking_status = -1; + + $sea = new SurveyEmailAccess($anketa); + $sea -> ajax(); +} +elseif ($t == 'showTestSurveySMTP') { $tracking_status = -1; $sas = new SurveyAdminSettings(); $sas->ajax_showTestSurveySMTP(); } -elseif ($_GET['t'] == 'evalvacija') { +elseif ($t == 'evalvacija') { $tracking_status = -1; // UL EVALVACIJA $eval = new Evalvacija($anketa); $eval->ajax(); } -elseif ($_GET['t'] == 'evoliTM') { +elseif ($t == 'evoliTM') { $tracking_status = -1; // Evoli TeamMeter $evoliTM = new SurveyTeamMeter($anketa); $evoliTM->ajax(); } +elseif ($t == 'kolektor') { + $tracking_status = -1; + + // Modul za kolektor + $kolektor = new Kolektor(); + $kolektor->ajax(); +} /**************** UNKNOWN, NAPREDNI MODULI - END ****************/ /**************** MAZA ****************/ -elseif ($_GET['t'] == 'MAZA') { +elseif ($t == 'MAZA') { - if(isset($_GET['a'])){ + if(isset($a)){ $anketa = $anketa; - if($_GET['a'] == 'maza_send_notification'){ + if($a == 'maza_send_notification'){ $tracking_status = 5; $maza = new MAZA($anketa); $maza->ajax_sendNotification(); } - if($_GET['a'] == 'maza_send_notification_pwa'){ + if($a == 'maza_send_notification_pwa'){ $tracking_status = 5; $WPN = new WPN($anketa); $WPN -> sendWebPushNotificationsToAll(); } - else if($_GET['a'] == 'maza_on_off'){ + else if($a == 'maza_on_off'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_maza_on_off(); } - else if($_GET['a'] == 'maza_cancel_alarm'){ + else if($a == 'maza_cancel_alarm'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_maza_cancel_alarm(); } - else if($_GET['a'] == 'maza_generate_users'){ + else if($a == 'maza_generate_users'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_maza_generate_users(); } - else if($_GET['a'] == 'maza_survey_description'){ + else if($a == 'maza_survey_description'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_maza_survey_description(); } - else if($_GET['a'] == 'changeRepeatBy'){ + else if($a == 'changeRepeatBy'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_changeRepeatBy(); } - else if($_GET['a'] == 'changeTimeInDay'){ + else if($a == 'changeTimeInDay'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_changeTimeInDay(); } - else if($_GET['a'] == 'changeDayInWeek'){ + else if($a == 'changeDayInWeek'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_changeDayInWeek(); } - else if($_GET['a'] == 'changeEveryWhichDay'){ + else if($a == 'changeEveryWhichDay'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_changeEveryWhichDay(); } - else if($_GET['a'] == 'maza_save_repeater'){ + else if($a == 'maza_save_repeater'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_saveRepeater(); } - else if($_GET['a'] == 'cancelRepeater'){ + else if($a == 'cancelRepeater'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->maza_cancel_repeater(); } - else if($_GET['a'] == 'insert_geofence'){ + else if($a == 'insert_geofence'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_insert_geofence(); } - else if($_GET['a'] == 'update_geofence'){ + else if($a == 'update_geofence'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_update_geofence(); } - else if($_GET['a'] == 'update_geofence_name'){ + else if($a == 'update_geofence_name'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_update_geofence_name(); } - else if($_GET['a'] == 'delete_geofence'){ + else if($a == 'delete_geofence'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_delete_geofence(); } - else if($_GET['a'] == 'get_all_geofences'){ + else if($a == 'get_all_geofences'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->ajax_get_all_geofences(); } - else if($_GET['a'] == 'maza_cancel_geofencing'){ + else if($a == 'maza_cancel_geofencing'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->maza_cancel_geofencing(); } - else if($_GET['a'] == 'maza_run_geofences'){ + else if($a == 'maza_run_geofences'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->maza_run_geofences(); } - else if($_GET['a'] == 'maza_cancel_entry'){ + else if($a == 'maza_cancel_entry'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->maza_cancel_entry(); } - else if($_GET['a'] == 'maza_run_entry'){ + else if($a == 'maza_run_entry'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->maza_run_entry(); } - else if($_GET['a'] == 'maza_run_activity'){ + else if($a == 'maza_run_activity'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->maza_run_activity(); } - else if($_GET['a'] == 'maza_cancel_activity'){ + else if($a == 'maza_cancel_activity'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->maza_cancel_activity(); } - else if($_GET['a'] == 'maza_run_tracking'){ + else if($a == 'maza_run_tracking'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->maza_run_tracking(); } - else if($_GET['a'] == 'maza_cancel_tracking'){ + else if($a == 'maza_cancel_tracking'){ $tracking_status = 0; $maza = new MAZA($anketa); $maza->maza_cancel_tracking(); @@ -808,7 +857,7 @@ else { // Shranimo tracking if($anketa != null && $anketa > 0){ - TrackingClass::update($anketa, $status); + TrackingClass::update($anketa, $tracking_status); } //nismo vezani na anketo, tracking uporabnika else{ diff --git a/admin/survey/api/apidoc/index.html b/admin/survey/api/apidoc/index.html index 5f04ded..9e81f37 100644 --- a/admin/survey/api/apidoc/index.html +++ b/admin/survey/api/apidoc/index.html @@ -1,669 +1,669 @@ - - - - - Loading... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    - -
    - -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -

    Loading...

    -
    -
    - - - - + + + + + Loading... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Loading...

    +
    +
    + + + + diff --git a/admin/survey/api/class.ApiController.php b/admin/survey/api/class.ApiController.php index b35d867..40028d7 100644 --- a/admin/survey/api/class.ApiController.php +++ b/admin/survey/api/class.ApiController.php @@ -121,11 +121,10 @@ class ApiController{ // TUKAJ PRIDE DODATEN POGOJ CE GRE ZA PRIJAVO PREKO GOOGLA, FB... - V TEM PRIMERU NIMAMO PASSWORDA if(!isset($this->data['Login']['password']) && isset($this->data['Login']['special_login'])){ - global $APP_special_login_key; // DODATI FUNKCIJO checkSpecialLogin v SurveyMobile, kjer se pogleda samo če obstaja mail in nastavi ustrezno user id if($this->data['Login']['special_login'] == 'nekajzavsakslucajv4x7in6' || - $this->data['Login']['special_login'] == $APP_special_login_key){ + $this->data['Login']['special_login'] == AppSettings::getInstance()->getSetting('maza-APP_special_login_key')){ $user_id = $sm->googleLogin($this->data['Login']['username']); } } diff --git a/admin/survey/api/class.ApiSurvey.php b/admin/survey/api/class.ApiSurvey.php index 36b8d85..a589358 100644 --- a/admin/survey/api/class.ApiSurvey.php +++ b/admin/survey/api/class.ApiSurvey.php @@ -363,6 +363,65 @@ class ApiSurvey { break; + // SAMO ZA GORANA - PLACILA + case 'getNarocilo': + + // Klic dovolimo samo Goranu + if($global_user_id == '112696'){ + + if (isset($params['narocilo_id'])){ + $narocilo = new UserNarocila(); + $json_array = $narocilo->getNarocilo($params['narocilo_id']); + } + else{ + $json_array['error'] = 'Narocilo ID is missing'; + } + } + else{ + $json_array['error'] = 'Denied for user '.$global_user_id; + } + + break; + + case 'placajNarocilo': + + // Klic dovolimo samo Goranu + if($global_user_id == '112696'){ + + if (isset($params['narocilo_id'])){ + $narocilo = new UserNarocila(); + $json_array = $narocilo->payNarocilo($params['narocilo_id']); + } + else{ + $json_array['error'] = 'Narocilo ID is missing'; + } + } + else{ + $json_array['error'] = 'Denied for user '.$global_user_id; + } + + break; + + case 'placajNarociloEracun': + + // Klic dovolimo samo Goranu + if($global_user_id == '112696'){ + + if (isset($params['narocilo_id'])){ + $narocilo = new UserNarocila(); + $json_array = $narocilo->payNarociloEracun($params['narocilo_id']); + } + else{ + $json_array['error'] = 'Narocilo ID is missing'; + } + } + else{ + $json_array['error'] = 'Denied for user '.$global_user_id; + } + + break; + + // MOBILE APP ONLY case 'getMobileAppVersion': $json_array = $this->getMobileAppVersion(); @@ -2144,21 +2203,25 @@ class ApiSurvey { $res = sisplet_query("SELECT value FROM misc WHERE what='SurveyCookie'"); list ($SurveyCookie) = mysqli_fetch_row($res); + // Nastavimo se hash + $hash = Common::generateSurveyHash(); // GLASOVANJE if ($survey_type == 0) { - $sql = sisplet_query("INSERT INTO srv_anketa (id, naslov, akronim, db_table, starts, expire, dostop, insert_uid, insert_time, edit_uid, edit_time, cookie, text, url, intro_opomba, survey_type, lang_admin, lang_resp, active, skin, show_intro, show_concl, locked, mobile_created) " . - "VALUES ('', '$naslov', '$akronim', '1', $starts, $expire, '0', '$global_user_id', NOW(), '$global_user_id', NOW(), '$SurveyCookie', '', '$url', '', '0', '$lang_admin', '$lang_resp', '0', '1kaBlue', '0', '0', '0', '$mobile_created')"); + $sql = sisplet_query("INSERT INTO srv_anketa + (id, hash, naslov, akronim, db_table, starts, expire, dostop, insert_uid, insert_time, edit_uid, edit_time, cookie, text, url, intro_opomba, survey_type, lang_admin, lang_resp, active, skin, show_intro, show_concl, locked, mobile_created) + VALUES + ('', '".$hash."', '$naslov', '$akronim', '1', $starts, $expire, '0', '$global_user_id', NOW(), '$global_user_id', NOW(), '$SurveyCookie', '', '$url', '', '0', '$lang_admin', '$lang_resp', '0', '1kaBlue', '0', '0', '0', '$mobile_created')"); if (!$sql) { $error = mysqli_error($GLOBALS['connect_db']); } $anketa = mysqli_insert_id($GLOBALS['connect_db']); - if ($anketa > 0) { - $url .= 'a/' . $anketa; + + $url .= 'a/' . $hash; // vnesemo tudi 1. grupo aka page $sql = sisplet_query("INSERT INTO srv_grupa (id, ank_id, naslov, vrstni_red) VALUES ('', '$anketa', '$lang[srv_stran] 1', '1')"); @@ -2219,8 +2282,8 @@ class ApiSurvey { $zakljucek_besedilo = $purifier->purify_DB($zakljucek['besedilo']); $show_concl = ($zakljucek['hide_zakljucek'] == '1') ? 0 : 1; - $sql = sisplet_query("INSERT INTO srv_anketa (id, naslov, akronim, db_table, starts, expire, dostop, insert_uid, insert_time, edit_uid, edit_time, cookie, text, url, intro_opomba, survey_type, lang_admin, lang_resp, active, skin, introduction, conclusion, show_intro, show_concl, locked, mobile_created) " . - "VALUES ('', '$naslov', '$akronim', '1', $starts, $expire, '0', '$global_user_id', NOW(), '$global_user_id', NOW(), '$SurveyCookie', '', '$url', '', '2', '$lang_admin', '$lang_resp', '$autoActiveSurvey', '1ka', '$uvod_besedilo', '$zakljucek_besedilo', '$show_intro', '$show_concl', '1', '$mobile_created')"); + $sql = sisplet_query("INSERT INTO srv_anketa (id, hash, naslov, akronim, db_table, starts, expire, dostop, insert_uid, insert_time, edit_uid, edit_time, cookie, text, url, intro_opomba, survey_type, lang_admin, lang_resp, active, skin, introduction, conclusion, show_intro, show_concl, locked, mobile_created) " . + "VALUES ('', '".$hash."', '$naslov', '$akronim', '1', $starts, $expire, '0', '$global_user_id', NOW(), '$global_user_id', NOW(), '$SurveyCookie', '', '$url', '', '2', '$lang_admin', '$lang_resp', '$autoActiveSurvey', '1ka', '$uvod_besedilo', '$zakljucek_besedilo', '$show_intro', '$show_concl', '1', '$mobile_created')"); if (!$sql) { $error = mysqli_error($GLOBALS['connect_db']); } @@ -2228,7 +2291,8 @@ class ApiSurvey { if ($anketa > 0) { - $url .= 'a/' . $anketa; + + $url .= 'a/' . $hash; // vnesemo tudi 1. grupo aka page $sql = sisplet_query("INSERT INTO srv_grupa (id, ank_id, naslov, vrstni_red) VALUES ('', '$anketa', '$lang[srv_stran] 1', '1')"); @@ -2267,7 +2331,8 @@ class ApiSurvey { $json_array['id'] = $anketa; $json_array['note'] = 'Survey created'; - } else { + } + else { $json_array['error'] = 'Error creating survey'; } @@ -3117,11 +3182,19 @@ class ApiSurvey { $updateActiveTime = ", starts=$starts, expire=$expire"; if ($active == 1) { - $activity_insert_string = "INSERT INTO srv_activity (sid, starts, expire, uid) VALUES('" . $ank_id . "', $starts, $expire, '" . $global_user_id . "' )"; - $sql_insert = sisplet_query($activity_insert_string); - //ignoriraj erorror, ce ze obstaja identicna vrstica - /* if (!$sql_insert) - $json_array['error'] = mysqli_error($GLOBALS['connect_db']); */ + $sql_insert = sisplet_query("INSERT INTO srv_activity + (sid, starts, expire) + VALUES + ('".$ank_id."', ".$starts.", ".$expire.") + ON DUPLICATE KEY UPDATE + SET expire=".$expire." + "); + } + else{ + $sql_insert = sisplet_query("UPDATE srv_activity + SET expire=".$expire." + WHERE sid='".$ank_id."' + "); } $sql = sisplet_query("UPDATE srv_anketa SET active=" . $active @@ -3129,7 +3202,8 @@ class ApiSurvey { if (!$sql) { $json_array['error'] = mysqli_error($GLOBALS['connect_db']); - } else { + } + else { if (!isset($json_array['error'])) $json_array['note'] = 'Survey activity changed'; } @@ -3377,7 +3451,7 @@ class ApiSurvey { // vstavimo v srv_data_text (email, ime, priimek) SurveyInfo::getInstance()->SurveyInit($ank_id); - $db_table = (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) ? '_active' : ''; + $db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); foreach ($sys_vars AS $sid => $spremenljivka) { if ($spremenljivka['variable'] == 'email') sisplet_query("INSERT INTO srv_data_text" . $db_table . " (spr_id, vre_id, text, usr_id) VALUES ('" . $sid . "', '" . $spremenljivka['vre_id'] . "', '" . $email . "', '" . $usr_id . "')"); @@ -3424,7 +3498,7 @@ class ApiSurvey { // vstavimo v srv_data_text (email, ime, priimek) SurveyInfo::getInstance()->SurveyInit($ank_id); - $db_table = (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) ? '_active' : ''; + $db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); foreach ($sys_vars AS $sid => $spremenljivka) { if ($spremenljivka['variable'] == 'email') { $data_insert = sisplet_query("INSERT INTO srv_data_text" . $db_table . " (spr_id, vre_id, text, usr_id) VALUES ('" . $sid . "', '" . $spremenljivka['vre_id'] . "', '" . $email . "', '" . $usr_id . "')"); @@ -3519,14 +3593,14 @@ class ApiSurvey { $add = false; if (SurveyInfo::getInstance()->checkSurveyModule('uporabnost')) - $link = 'main/survey/uporabnost.php?anketa=' . $anketa . '&skupina=' . $vre_id; + $link = 'main/survey/uporabnost.php?anketa=' . SurveyInfo::getInstance()->getSurveyHash() . '&skupina=' . $vre_id; else - $link = 'main/survey/index.php?anketa=' . $anketa . '&skupina=' . $vre_id; + $link = 'main/survey/index.php?anketa=' . SurveyInfo::getInstance()->getSurveyHash() . '&skupina=' . $vre_id; if ($add) { $f = @fopen($site_path . '.htaccess', 'a'); if ($f !== false) { - fwrite($f, "\nRewriteRule ^" . $nice_url . '\b(.*) ' . $link . "&foo=\$1&%{QUERY_STRING}"); + fwrite($f, "\nRewriteRule ^" . $nice_url . '\b(?!-)(.*) ' . $link . "&foo=\$1&%{QUERY_STRING}"); fclose($f); $sqlI = sisplet_query("INSERT INTO srv_nice_links_skupine (id,ank_id,nice_link_id,vre_id,link) VALUES ('','$ank_id','$row[id]','$vre_id','$nice_url')"); @@ -3626,14 +3700,14 @@ class ApiSurvey { $add = false; if (SurveyInfo::getInstance()->checkSurveyModule('uporabnost')) - $link = 'main/survey/uporabnost.php?anketa=' . $anketa . '&skupina=' . $vre_id; + $link = 'main/survey/uporabnost.php?anketa=' . SurveyInfo::getInstance()->getSurveyHash() . '&skupina=' . $vre_id; else - $link = 'main/survey/index.php?anketa=' . $anketa . '&skupina=' . $vre_id; + $link = 'main/survey/index.php?anketa=' . SurveyInfo::getInstance()->getSurveyHash() . '&skupina=' . $vre_id; if ($add) { $f = @fopen($site_path . '.htaccess', 'a'); if ($f !== false) { - fwrite($f, "\nRewriteRule ^" . $nice_url . '\b(.*) ' . $link . "&foo=\$1&%{QUERY_STRING}"); + fwrite($f, "\nRewriteRule ^" . $nice_url . '\b(?!-)(.*) ' . $link . "&foo=\$1&%{QUERY_STRING}"); fclose($f); $sqlI = sisplet_query("INSERT INTO srv_nice_links_skupine (id,ank_id,nice_link_id,vre_id,link) VALUES ('','$ank_id','$row[id]','$vre_id','$nice_url')"); @@ -3887,7 +3961,7 @@ class ApiSurvey { // vstavimo v srv_data_text (email, ime, priimek) SurveyInfo::getInstance()->SurveyInit($ank_id); - $db_table = (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) ? '_active' : ''; + $db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); foreach ($sys_vars AS $sid => $spremenljivka) { if ($spremenljivka['variable'] == 'email') sisplet_query("INSERT INTO srv_data_text" . $db_table . " (spr_id, vre_id, text, usr_id) VALUES ('" . $sid . "', '" . $spremenljivka['vre_id'] . "', '" . $email . "', '" . $usr_id . "')"); @@ -3934,7 +4008,7 @@ class ApiSurvey { // vstavimo v srv_data_text (email, ime, priimek) SurveyInfo::getInstance()->SurveyInit($ank_id); - $db_table = (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) ? '_active' : ''; + $db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); foreach ($sys_vars AS $sid => $spremenljivka) { if ($spremenljivka['variable'] == 'email') { $data_insert = sisplet_query("INSERT INTO srv_data_text" . $db_table . " (spr_id, vre_id, text, usr_id) VALUES ('" . $sid . "', '" . $spremenljivka['vre_id'] . "', '" . $email . "', '" . $usr_id . "')"); diff --git a/admin/survey/classes/class.AppSettings.php b/admin/survey/classes/class.AppSettings.php new file mode 100644 index 0000000..510c9c6 --- /dev/null +++ b/admin/survey/classes/class.AppSettings.php @@ -0,0 +1,195 @@ + array( + 'debug', + + // INSTALLATION TYPE (0->lastna, 1->www, 2->aai, 3->virtualka) + 'installation_type', + + 'confirm_registration', + 'confirm_registration_admin', + + 'gdpr_admin_email', + + 'meta_admin_ids', + ), + + // APP SETTINGS + 'info' => array( + 'app_settings-app_name', + 'app_settings-admin_email', + 'app_settings-owner', + 'app_settings-owner_website', + 'app_settings-footer_custom', + 'app_settings-footer_text', + 'app_settings-footer_survey_custom', + 'app_settings-footer_survey_text', + 'app_settings-email_signature_custom', + 'app_settings-email_signature_text', + 'app_settings-survey_finish_url', + 'app_settings-custom_logo', + 'app_settings-export_type', + ), + + // APP LIMITS + 'limits' => array( + 'app_limits-clicks_per_minute_limit', + 'app_limits-question_count_limit', + 'app_limits-response_count_limit', + 'app_limits-invitation_count_limit', + 'app_limits-admin_allow_only_ip', + ), + + // SMTP SETTINGS + 'smtp' => array( + 'email_server_settings-SMTPFrom', + 'email_server_settings-SMTPFromNice', + 'email_server_settings-SMTPReplyTo', + 'email_server_settings-SMTPHost', + 'email_server_settings-SMTPPort', + 'email_server_settings-SMTPSecure', + 'email_server_settings-SMTPAuth', + 'email_server_settings-SMTPUsername', + 'email_server_settings-SMTPPassword', + 'email_server_fromSurvey', + ), + + 'modules' => array( + + // GOOGLE + 'google-recaptcha_sitekey', + 'google-secret_captcha', + 'google-login_client_id', + 'google-login_client_secret', + 'google-maps_API_key', + + // FACEBOOK + 'facebook-appid', + 'facebook-appsecret', + + // MODULE MAZA + 'maza-FCM_server_key', + 'maza-APP_special_login_key', + 'maza-NextPinMainToken', + 'maza-NextPinMainPassword', + + // MODULE HIERARHIJA + 'hierarhija-folder_id', + 'hierarhija-default_id', + + // SQUALO MAIL + 'squalo-user', + 'squalo-key', + ) + ); + + + private function __construct(){ + + $this->prepareSettings(); + + } + + + public static function getInstance(){ + + if (self::$instance == null){ + self::$instance = new AppSettings(); + } + + return self::$instance; + } + + + // Get all app settings from database (based on domain) + private function prepareSettings(){ + global $site_domain; + + $sqlSetting = sisplet_query("SELECT what, value FROM app_settings WHERE domain='".$site_domain."'"); + + while ($rowSetting = mysqli_fetch_array($sqlSetting)) { + $this->settings[$rowSetting['what']] = $rowSetting['value']; + } + } + + + // Get app setting + public function getSetting($what){ + + if(isset($this->settings[$what])){ + + // Nastavitev true + if($this->settings[$what] === '1' || $this->settings[$what] === true || $this->settings[$what] === 'true') + return true; + + // Nastavitev false + if($this->settings[$what] === '0' || $this->settings[$what] === '' || $this->settings[$what] === false || $this->settings[$what] === 'false') + return false; + + // Nastavitev array + if($what == 'confirm_registration_admin' || $what == 'meta_admin_ids' || $what == 'app_limits-admin_allow_only_ip') + return explode(',', $this->settings[$what]); + + return $this->settings[$what]; + } + else + return false; + } + + // Save app setting + public function saveSetting($what, $value){ + global $site_domain; + + $sqlSetting = sisplet_query("UPDATE app_settings SET value='".$value."' WHERE what='".$what."' AND domain='".$site_domain."'"); + + $this->settings[$what] = $value; + } + + + // Display app settings + public function displaySettingsGroup($group){ + + $setting_variables = $this->variables[$group]; + + + foreach($setting_variables as $what){ + $this->displaySetting($what); + } + + } + + // Display app single setting + public function displaySetting($what){ + global $lang; + + if(!isset($this->settings[$what])) + return; + + echo '
    '; + + echo ''; + + echo ''; + + echo '
    '; + } +} + +?> \ No newline at end of file diff --git a/admin/survey/classes/class.ArchiveSurveys.php b/admin/survey/classes/class.ArchiveSurveys.php new file mode 100644 index 0000000..703f4b8 --- /dev/null +++ b/admin/survey/classes/class.ArchiveSurveys.php @@ -0,0 +1,345 @@ +'; + + echo '
      '; + + // Loop cez vse ankete kjer je user avtor + $sql = sisplet_query("SELECT id, naslov, akronim FROM srv_anketa WHERE insert_uid='".$global_user_id."' AND active!='-1'"); + while ($row = mysqli_fetch_array($sql)) { + + echo '
    • '; + echo ' '; + echo ' '; + echo '
    • '; + } + + echo '
    '; + + echo '
    '; + } + + + // Izvedemo izvoz anket v paket + private function createSurveysArchive($survey_list, $data=true){ + global $connect_db; + global $global_user_id; + global $lang; + + // Nastavimo nastavitve php-ja, da zmore sprocesirati + //set_time_limit(1800); + ini_set('memory_limit', '1024M'); + ini_set('max_input_time', 600); + + + // Pobrisemo zip ce obstaja od prej + if (file_exists(ARCHIVE_FOLDER.'archive_surveys_'.$global_user_id.'.zip')) { + unlink(ARCHIVE_FOLDER.'archive_surveys_'.$global_user_id.'.zip'); + } + + + // Gremo cez seznam anket in ustvarimo .1ka izvoz za vsako posebej in jo dodamo v zip + $surveys_for_deletion = array(); + foreach($survey_list as $ank_id){ + + // Odpremo oz. ustvarimo zip + $zip = new ZipArchive(); + $zip_file = ARCHIVE_FOLDER.'archive_surveys_'.$global_user_id.'.zip'; + + if ($zip->open($zip_file, ZipArchive::CREATE) !== true) { + exit('Napaka pri ustvarjanju zip arhiva anket.'); + } + + SurveyCopy::setSrcSurvey($ank_id); + SurveyCopy::setSrcConectDb($connect_db); + SurveyCopy::setDestSite(0); + + //SurveyCopy::downloadArrayFile($data); + $export_survey_array = SurveyCopy::getArrayVar($data); + $export_survey_string = base64_encode(serialize($export_survey_array)); + + // Ustvarimo datoteko za anketo + $export_survey_file_name = $export_survey_array['srv_anketa'][0]['naslov'].' '.date("j.n.Y").'.1ka'; + $export_survey_file_content = $export_survey_string; + + // Dodamo vsebino kot datoteka v zip + $zip->addFromString($export_survey_file_name, $export_survey_file_content); + + // Zapremo zip + $zip->close(); + } + + return $lang['srv_archive_surveys_export_created']; + } + + // Izvedemo uvoz paketa anket + private function importSurveysArchive($zipFile){ + global $lang; + global $connect_db; + global $admin_type; + + // Nastavimo nastavitve php-ja, da zmore sprocesirati + //set_time_limit(1800); + ini_set('memory_limit', '1024M'); + ini_set('max_input_time', 600); + + + $zip = new ZipArchive(); + + // Razpakiramo zip paket + if ($zip->open($zipFile) === true) { + + $success_count = 0; + $error_surveys = array(); + + SurveyCopy::setSrcSurvey(-1); + SurveyCopy::setSrcConectDb($connect_db); + SurveyCopy::setDestSite(0); + + // loop cez vse arhivske datoteke v zip paketu + for ($i = 0; $i < $zip->numFiles; $i++) { + + try{ + // Dobimo ime datoteke in vsebino + $fileName = $zip->getNameIndex($i); + $fileContent = $zip->getFromIndex($i); + + $array = unserialize(base64_decode($fileContent)); + + if (is_array($array) ) { + + SurveyCopy::setSourceArray($array); + + // Ce je vse ok ustvarimo kopijo ankete + if(SurveyCopy::getErrors() == ''){ + $new_survey_id = SurveyCopy::doCopy(); + $success_count++; + } + else{ + $error_surveys[] = array('name'=>$fileName, 'error'=>SurveyCopy::getErrors()); + } + } + } + catch (Exception $e) { + $error_surveys[] = array('name'=>$fileName, 'error'=>$e->getMessage()); + } + + // Resetiramo parametre classa - errorje in source array + SurveyCopy::reset(); + } + + $zip->close(); + + + // Uspesno uvozene ankete + echo '

    '.$lang['srv_archive_surveys_import_success'].': '.$success_count.'

    '; + + // Izpisemo se ankete z errorji + if(count($error_surveys) > 0){ + + // Stevilo anket z napako + echo '

    '.$lang['srv_archive_surveys_import_error_details'].': '.count($error_surveys).'

    '; + + // Loop cez vse ankete z napako + echo '
    '; + foreach($error_surveys as $error_survey){ + echo '

    '.$error_survey['name'].'

    '; + + // Samo adminu izpišemo dejanski error + if($admin_type == 0) + echo '

    '.$error_survey['error'].'

    '; + } + echo '
    '; + } + } + // Zipa ni bilo mogoce odpreti + else { + echo '

    '.$lang['srv_archive_surveys_import_error_import'].'

    '; + } + } + + + public function ajax(){ + global $lang; + global $global_user_id; + + // Prikazemo popup s seznamom anket upporabnika za izvoz + if ($_GET['a'] == 'display_export') { + + echo ''; + + echo '

    '.$lang['srv_archive_surveys_export'].'

    '; + + + echo ''; + + // Masovno oznacevanje checkboxov + echo '
    '; + echo ' '.$lang['srv_select_all'].''; + echo ' '.$lang['srv_deselect_all'].''; + + echo '
    '.$lang['srv_archive_surveys_export_counter'].': 0
    '; + echo '
    '; + + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + } + + // Ustvarimo zip arhiv za izvoz in ponudimo gumb za download + elseif($_GET['a'] == 'export'){ + + $survey_list = isset($_POST['survey_archive']) ? $_POST['survey_archive'] : array(); + $error = ''; + + // Napaka - nimamo oznacene nobene ankete + if(count($survey_list) == 0){ + $error = $lang['srv_archive_surveys_export_error1']; + } + // Napaka - presezen limit anket + elseif(count($survey_list) > 100){ + $error = $lang['srv_archive_surveys_export_error2']; + } + + + echo ''; + + echo '

    '.$lang['srv_archive_surveys_export'].'

    '; + + // Imamo opozorila + if($error != ''){ + echo ''; + + echo '
    '; + echo ' '; + echo '
    '; + + return; + } + + // Izvedemo izvoz in prikazemo gumb za download + try{ + $response = $this->createSurveysArchive($survey_list); + } + catch (Exception $e) { + $error = $e->getMessage(); + } + + // Imamo napake pri pripravljanju paketa + if($error != ''){ + echo ''; + + echo '
    '; + echo ' '; + echo '
    '; + + return; + } + + + // Uspesno kreiran paket + echo ''; + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + } + + // Prikazemo popup za uvoz zip arhiva anket + if ($_GET['a'] == 'display_import') { + + echo ''; + + echo '

    '.$lang['srv_archive_surveys_import'].'

    '; + + + echo ''; + + + echo '
    '; + echo ' '; + echo ' '; + echo '
    '; + } + + // Izvedemo uvoz zip arhiva in prikazemo obvestilo (uspesno, napake) + elseif($_GET['a'] == 'import'){ + + echo ''; + + echo '

    '.$lang['srv_archive_surveys_import'].'

    '; + + + echo ''; + + + echo '
    '; + echo ' '; + echo '
    '; + } + } +} \ No newline at end of file diff --git a/admin/survey/classes/class.Cache.php b/admin/survey/classes/class.Cache.php index 6635055..86d04a8 100644 --- a/admin/survey/classes/class.Cache.php +++ b/admin/survey/classes/class.Cache.php @@ -207,32 +207,95 @@ class Cache $result['tip'] = $lang['srv_sklop_posebna_short'] . ' - ' . $lang['srv_vprasanje_tip_' . $spremenljivka['tip']]; break; } + + //$result['izrazanje'] = $spremenljivka['tip']; - preverjanje manjkajočih tipov za switch spodaj. Če je vse ok, se lahko odstrani @TG + switch ($spremenljivka['tip']) { case 1 : // radio + $result['izrazanje'] = $lang['srv_vprasanje_radio']; + break; case 2 : // check + $result['izrazanje'] = $lang['srv_vprasanje_checkbox']; + break; case 3 : // drop + $result['izrazanje'] = $lang['srv_vprasanje_dropdown']; + break; + case 4 : // text + $result['izrazanje'] = $lang['srv_vprasanje_text']; + break; + case 5 : // nagovor + $result['izrazanje'] = $lang['srv_vprasanje_label']; + break; case 6 : // mradio + $result['izrazanje'] = $lang['srv_vprasanje_multigrid']; + break; + case 7 : // number + $result['izrazanje'] = $lang['srv_vprasanje_number']; + break; + case 8 : // datum + $result['izrazanje'] = $lang['srv_vprasanje_datum']; + break; + + + //SOCIAL NETWORK VPRAŠANJA + case 9 : + $result['izrazanje'] = $lang['srv_vprasanje_tip_9']; + break; + case 10 : + $result['izrazanje'] = $lang['srv_vprasanje_tip_10']; + break; + case 11 : + $result['izrazanje'] = $lang['srv_vprasanje_tip_11']; + break; + case 12 : + $result['izrazanje'] = $lang['srv_vprasanje_tip_12']; + break; + case 13 : + $result['izrazanje'] = $lang['srv_vprasanje_tip_13']; + break; + + + //AW + case 14 : + $result['izrazanje'] = $lang['srv_vprasanje_tip_14']; + break; + case 15 : + $result['izrazanje'] = $lang['srv_vprasanje_tip_15']; + break; + + case 16 : // mcheck + $result['izrazanje'] = $lang['srv_vprasanje_multicheckbox']; + break; case 17 : // razvrščanje - $result['izrazanje'] = $lang['srv_analiza_vrsta_kate']; + $result['izrazanje'] = $lang['srv_vprasanje_ranking']; + break; + case 18 : // vsota + $result['izrazanje'] = $lang['srv_vprasanje_vsota']; break; - case 4 : // text case 19 : // mtext - case 21 : // text* - $result['izrazanje'] = $lang['srv_analiza_vrsta_bese']; + $result['izrazanje'] = $lang['srv_vprasanje_multitext']; break; - case 7 : // number - case 18 : // vsota case 20 : // mnumber + $result['izrazanje'] = $lang['srv_vprasanje_multinumber']; + break; + case 21 : // text* + $result['izrazanje'] = $lang['srv_vprasanje_text']; + break; case 22 : // kalkulacija + $result['izrazanje'] = $lang['srv_vprasanje_tip_22']; + break; + case 24 : // kombinirana tabela + $result['izrazanje'] = $lang['srv_vprasanje_tip_24']; + break; case 25 : // kvota - $result['izrazanje'] = $lang['srv_analiza_vrsta_stev']; + $result['izrazanje'] = $lang['srv_vprasanje_tip_25']; break; - case 8 : // datum - $result['izrazanje'] = $lang['srv_analiza_vrsta_stev']; + case 26 : // lokacija + $result['izrazanje'] = $lang['srv_vprasanje_tip_26']; break; - case 5 : // nagovor - $result['izrazanje'] = $lang['srv_analiza_vrsta_nago']; + case 27 : // heatmap + $result['izrazanje'] = $lang['srv_vprasanje_heatmap']; break; } diff --git a/admin/survey/classes/class.Common.php b/admin/survey/classes/class.Common.php index 6f761b6..66946f0 100644 --- a/admin/survey/classes/class.Common.php +++ b/admin/survey/classes/class.Common.php @@ -19,7 +19,7 @@ class Common { // konstrutor protected function __construct() {} // kloniranje - final private function __clone() {} + private function __clone() {} /** * Poskrbimo za samo eno instanco @@ -42,10 +42,9 @@ class Common { { if ($anketa) { self::$anketa = $anketa; - SurveyInfo::getInstance()->SurveyInit(self::$anketa); - if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) - self::$db_table = '_active'; + SurveyInfo::getInstance()->SurveyInit(self::$anketa); + self::$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); } } @@ -240,9 +239,8 @@ class Common { $sql = sisplet_query("SELECT id FROM srv_user WHERE preview='1' AND time_edit < NOW() - INTERVAL 3 HOUR AND ank_id = '".$sid."'"); # polovimo vrsto tabel za to anketo - $strDbTable = "SELECT db_table FROM srv_anketa WHERE id = $sid"; - $qryDbTable = sisplet_query($strDbTable); - list($db_table) = mysqli_fetch_row($qryDbTable); + SurveyInfo::getInstance()->SurveyInit($sid); + $db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString(); $list = ''; // se je dogajalo da je 0 ... pa se je pojavljal mysql_fetch error @@ -255,6 +253,7 @@ class Common { } if ($list != '') { sisplet_query("BEGIN"); + // tabela z respondenti $deleted = sisplet_query("DELETE FROM srv_user WHERE preview='1' AND id IN ($list) AND ank_id = '$sid'"); @@ -311,6 +310,10 @@ class Common { global $admin_type; global $global_user_id; + $anketa = 0; + $grupa = 0; + $spremenljivka = 0; + if (isset ($_REQUEST['spremenljivka'])) $spremenljivka = $_REQUEST['spremenljivka']; if (isset ($_REQUEST['anketa'])) @@ -708,27 +711,15 @@ class Common { */ function getFromEmail() { global $global_user_id, $site_domain; - $MailFrom = 'info@1ka.si'; - # nastavimo pošiljatelja - # za SAFE.SI naredimo hardcoded da se pošilja kao iz SAFE.SI - if (strpos($site_domain, "safe.si") === false) - { - #nismo iz SAFE.SI - $r = sisplet_query("SELECT value FROM misc WHERE what='AlertFrom'"); - list ($MailFrom) = mysqli_fetch_row($r); - } - else - { - # smo na SAFE.SI - $MailFrom = 'info@safe.si'; - } + if(AppSettings::getInstance()->getSetting('email_server_settings-SMTPFrom') !== false) + $MailFrom = AppSettings::getInstance()->getSetting('email_server_settings-SMTPFrom'); # Če je slučanjo napaka nastavimo info@1ka.si - if ($MailFrom == null || trim($MailFrom) == '' || !$this->validEmail($MailFrom)) - { + if ($MailFrom == null || trim($MailFrom) == '' || !$this->validEmail($MailFrom)){ $MailFrom = 'info@1ka.si'; } + return $MailFrom; } @@ -814,15 +805,21 @@ class Common { return $result; } - static function formatNumber ($value, $digit = 0, $form=null,$sufix = "") { + static function formatNumber ($value, $digit = 0, $form=null, $sufix = "") { + # Kako izpisujemo decimalke in tisočice - $default_seperators = array( 0=>array('decimal_point'=>'.', 'thousands'=>','), - 1=>array('decimal_point'=>',', 'thousands'=>'.')); + $default_seperators = array( + 'decimal_point' => '.', + 'thousands' => ',' + /*0=>array('decimal_point'=>'.', 'thousands'=>','), + 1=>array('decimal_point'=>',', 'thousands'=>'.')*/ + ); if (is_array($form) && isset($form['decimal_point'])&& isset($form['thousands'])) { $decimal_point = $form['decimal_point']; $thousands = $form['thousands']; - } else { + } + else { $decimal_point = $default_seperators['decimal_point']; $thousands = $default_seperators['thousands']; } @@ -844,7 +841,7 @@ class Common { private $dataPiping_query = null; // kesiramo query, ker ga bomo ponavljali za vsako spremenljivko public function dataPiping ($text, $usr_id, $loop_id=null, $lang_id=null) { - if (stripos($text, "#") !== false) { + if ($text != null && stripos($text, "#") !== false) { if ($this->dataPiping_query == null) $this->dataPiping_query = sisplet_query("SELECT s.* FROM srv_spremenljivka s, srv_grupa g WHERE g.ank_id='".self::$anketa."' AND s.gru_id=g.id AND s.tip!='5' AND (s.tip < '10' OR s.tip = '17' OR s.tip = '22' OR s.tip = '25' OR s.tip='21')"); if (mysqli_num_rows($this->dataPiping_query)) @@ -1125,7 +1122,7 @@ class Common { while (!feof($f)) { $r = fgets($f); - if (strpos($r, "^".$nice_url.'\b(.*) ') !== false && strpos($r, "?anketa=".$ank_id."") !== false) { + if (strpos($r, "^".$nice_url.'\b') !== false && strpos($r, "?anketa=".$ank_id."") !== false) { // kao pobrisemo vrstico } else { $output[] = $r; @@ -1165,7 +1162,7 @@ class Common { while($rowS = mysqli_fetch_array($sqlS)){ - if (strpos($r, "^".$rowS['link'].'\b(.*) ') !== false && strpos($r, "?anketa=".$ank_id."&skupina=".$rowS['vre_id']."") !== false) { + if (strpos($r, "^".$rowS['link'].'\b') !== false && strpos($r, "?anketa=".$ank_id."&skupina=".$rowS['vre_id']."") !== false) { // pobrisemo vrstico in vnos v bazi $sqlD = sisplet_query("DELETE FROM srv_nice_links_skupine WHERE ank_id='$ank_id' AND nice_link_id='$row[id]' AND vre_id='$rowS[vre_id]'"); @@ -1217,7 +1214,7 @@ class Common { if($subdomain == 'english'){ // Nastavitve in podzavihki - if ($_GET['anketa'] == '' && ($_GET['a'] == 'nastavitve' # in podzavihki + if ((!isset($_GET['anketa']) || $_GET['anketa'] == '') && ($_GET['a'] == 'nastavitve' # in podzavihki || $_GET['a'] == 'osn_pod' || $_GET['a'] == 'trajanje' || $_GET['a'] == 'dostop' @@ -1606,7 +1603,7 @@ class Common { } //Urejanje - Nastavitve - else if ($_GET['anketa'] != '' && $_GET['a'] == 'nastavitve') { + else if ((!isset($_GET['anketa']) || $_GET['anketa'] == '') && $_GET['a'] == 'nastavitve') { $help_url = 'https://www.1ka.si/d/en/help/user-guide/edit/settings'; } @@ -2076,29 +2073,23 @@ class Common { return $help_url; } - // Nov algoritem za id ankete v url-ju (ni vec stevilka ampak string - vsako liho stevilko zamenjamo z ustrezno crko npr. 1234 -> A2C4) - public static function encryptAnketaID($anketa_id){ + // Nov algoritem za id ankete v url-ju za izpolnjevanje + public static function generateSurveyHash(){ + + $unique = false; - // Ali imamo vklopljeno sifriranje id-ja anket v url-ju - ZENKRAT UGASNJENO - //if(true){ - if(false){ - $anketa_arr = str_split($anketa_id); - $anketa_string = ''; + while(!$unique){ - foreach($anketa_arr as $pos => $num){ + // Zgeneriramo random string z 8 znaki + $hash = substr(md5(uniqid(mt_rand(), true)), 0, 8); - // Na lihih mestih pretvorimo stevilko v crko - if($pos % 2 == 0) - $anketa_string .= chr(97 + $num); - else - $anketa_string .= $num; - } - //$anketa_string = strtolower($anketa_string); - } - else - $anketa_string = $anketa_id; - - return $anketa_string; + // Preverimo ce slucajno ze obstaja v bazi + $sql = sisplet_query("SELECT 1 FROM srv_anketa WHERE hash='".$hash."' LIMIT 1"); + if (mysqli_num_rows($sql) == 0) + $unique = true; + } + + return $hash; } // Algoritem, ki iz texta ustvari strukturo vprasanj in variabel (za uvoz anekte iz texta) @@ -2148,21 +2139,132 @@ class Common { } // Izpise obvestilo, da ni podatkov - static function noDataAlert() { + static function noDataAlert($location='') { global $lang; + global $anketa; + global $site_url; echo '
    '; - echo $lang['srv_data_no_data']; + + if($lang['id'] == '1') + echo ''; + else + echo ''; + + if($location == 'status') { + echo '

    '.$lang['srv_dashboard_no_data'].'

    '; + } + else { + echo '

    '.$lang['srv_data_no_data'].'

    '; + } + + echo '
    '; + if($location == 'status') { + echo '

    '.$lang['srv_data_no_data3'].'

    '; + } + else { + echo '

    '.$lang['srv_data_no_data2'].'

    '; + } + echo '
    '; + + if($location == 'status') { + $buttonA = 'index.php?anketa='.$anketa.'&a=branching'; //urejanje + $buttonB = 'index.php?anketa='.$anketa.'&a=testiranje'; //testiranje + $textA = $lang['edit2']; + $textB = $lang['srv_testiranje']; + $textC = $lang['srv_vabila']; + } + else { + $buttonA = 'index.php?anketa='.$anketa.'&a=testiranje&m=testnipodatki'; //avtomatski testni vnos + $buttonB = SurveyInfo::getSurveyLink() . '?preview=on&testdata=on'; //ročni testni vnos + $textA = $lang['srv_testiranje_vnosi2']; + $textB = $lang['srv_archive_test_data_text2a']; + $textC = $lang['srv_anketa_share']; + } + + $buttonC = 'index.php?anketa='.$anketa.'&a=vabila'; //objava + + echo '
    '; + echo ' '; + echo ' '; + echo ' '; + echo '
    '; + echo '
    '; } + // Izpise obvestilo, da ni podatkov v javni povezavi + static function noDataAlertPublic($action) { + global $lang; + global $anketa; + global $site_url; + + header('Cache-Control: no-cache'); + header('Pragma: no-cache'); + + #izpišemo HTML + echo ''; + echo ''; + + + echo ''; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + + + echo ''; + + + switch ($action) { + case 'data': + case 'data_nijz': + echo '

    '.$lang['srv_publc_data_title_for'].SurveyInfo::getSurveyTitle() .'

    '; + break; + + case M_ANALYSIS_CHARTS: + echo '

    '.$lang['srv_publc_chart_title_for'].SurveyInfo::getSurveyTitle() .'

    '; + break; + + case M_ANALYSIS_CREPORT: + echo '

    '.$lang['srv_publc_creport_title_for'].SurveyInfo::getSurveyTitle() .'

    '; + break; + + case 'analysis': + echo '

    '.$lang['srv_publc_analysis_title_for'].SurveyInfo::getSurveyTitle() .'

    '; + break; + + default: + echo 'Error!'; + break; + } + + if($lang['id'] == '1') + echo ''; + else + echo ''; + + echo '

    '.$lang['srv_data_no_data'].'

    '; + + echo ''; + + + echo ''; + } + // Vrne string s signaturjem za email v ustreznem jeziku (default slovenski) public static function getEmailSignature($lang_id = 0){ global $lang; - global $app_settings; - if(isset($app_settings['email_signature_custom']) && $app_settings['email_signature_custom'] == 1){ - $signature = '


    '.$app_settings['email_signature_text']; + if(AppSettings::getInstance()->getSetting('app_settings-email_signature_custom') !== false){ + $signature = '


    '.AppSettings::getInstance()->getSetting('app_settings-email_signature_text'); } else{ @@ -2174,9 +2276,9 @@ class Common { // Logo if($lang['id'] == '1') - $signature .= ''; + $signature .= ''; else - $signature .= ''; + $signature .= ''; $signature .= '
    -------------------------------------------------------------------
    '; diff --git a/admin/survey/classes/class.Dostop.php b/admin/survey/classes/class.Dostop.php index 883e7ce..a06e0d9 100644 --- a/admin/survey/classes/class.Dostop.php +++ b/admin/survey/classes/class.Dostop.php @@ -37,7 +37,6 @@ class Dostop { if ($anketa == 0) { $anketa = $this->anketa; } - $uid = $global_user_id; SurveyInfo::getInstance()->SurveyInit($anketa); $rowa = SurveyInfo::getInstance()->getSurveyRow(); @@ -48,19 +47,19 @@ class Dostop { } // za demonstracijsko je posebno preverjanje - if ($rowa['invisible'] == 1) { + if (isDemoSurvey($anketa)) { return TRUE; } // posebej dostop za vsazga userja posebej - $sql = sisplet_query("SELECT ank_id, uid FROM srv_dostop WHERE ank_id = '$anketa' AND uid='$uid'"); + $sql = sisplet_query("SELECT ank_id, uid FROM srv_dostop WHERE ank_id = '$anketa' AND uid='$global_user_id'"); if (mysqli_num_rows($sql) > 0) { return TRUE; } // dodatno imamo se ce je manager ali admin, potem vidi ankete podrejenih userjev if ($admin_type == 1 || $admin_type == 0) { - $sql = sisplet_query("SELECT COUNT(*) FROM srv_dostop WHERE ank_id='$anketa' AND uid IN (SELECT user FROM srv_dostop_manage WHERE manager='$uid')"); + $sql = sisplet_query("SELECT COUNT(*) FROM srv_dostop WHERE ank_id='$anketa' AND uid IN (SELECT user FROM srv_dostop_manage WHERE manager='$global_user_id')"); $row = mysqli_fetch_array($sql); if ($row[0] > 0) { return TRUE; @@ -76,24 +75,28 @@ class Dostop { } /** - * Kao meta admin, ki vidi vse + * Meta admin, ki vidi vse ankete */ - static function isMetaAdmin() - { - global $global_user_id; + static function isMetaAdmin(){ + global $global_user_id; global $admin_type; - global $mysql_database_name; - // Samo na www in virtualkah - if(($mysql_database_name == 'www1kasi' || $mysql_database_name == 'real1kasi') && $admin_type == '0'){ - // vvasja@gmail.com - id: 100, peter.h1203@gmail.com - id: 12611, 1ka.techsupport - id: 49089 (virtualke), 72253 - if (in_array($global_user_id, [100, 12611, 49089, 72253])) { + // Ce ni admin ni nikoli metaadmin + if($admin_type != '0'){ + return FALSE; + } + + $meta_admin_ids = AppSettings::getInstance()->getSetting('meta_admin_ids'); + + // Ce imamo nastavljene id-je za metaadmine v settings_optional + if(isset($meta_admin_ids) && !empty($meta_admin_ids)){ + + if (in_array($global_user_id, $meta_admin_ids)) { return TRUE; } - } - + } // Gorenje ima svoje metaadmine - if ($admin_type == '0' && Common::checkModule('gorenje')){ + elseif(Common::checkModule('gorenje')){ global $meta_admin_emails; $sql = sisplet_query("SELECT email FROM users WHERE id = '$global_user_id'"); @@ -130,15 +133,13 @@ class Dostop { * * @param mixed $anketa */ - function checkDostopSub($type, $anketa = 0) - { + public function checkDostopSub($type, $anketa = 0){ global $admin_type; global $global_user_id; if ($anketa == 0) { $anketa = $this->anketa; } - $uid = $global_user_id; SurveyInfo::getInstance()->SurveyInit($anketa); $rowa = SurveyInfo::getInstance()->getSurveyRow(); @@ -149,17 +150,28 @@ class Dostop { } // za demonstracijsko je posebno preverjanje - if ($rowa['invisible'] == 1) { + if (isDemoSurvey($anketa)) { + return TRUE; + } + + // ce je avtor ima vedno dostop do vsega + if ($global_user_id == $rowa['insert_uid']) { return TRUE; } - $sql = sisplet_query("SELECT dostop FROM srv_dostop WHERE ank_id = '$anketa' AND uid='$uid'"); + + $sql = sisplet_query("SELECT dostop FROM srv_dostop WHERE ank_id = '$anketa' AND uid='$global_user_id'"); if (mysqli_num_rows($sql) > 0) { $row = mysqli_fetch_array($sql); $dostop = explode(',', $row['dostop']); if (in_array($type, $dostop)) { - return TRUE; + + // Odklepanje anekte - vrne ravno obratno + if($type == 'lock') + return FALSE; + else + return TRUE; } // managerji in admini majo vedno lepe linke in maile @@ -170,7 +182,7 @@ class Dostop { // administratorji in managerji imajo do max kar imajo njegovi podrejeni userji if ($admin_type <= 1) { - $sql = sisplet_query("SELECT dostop FROM srv_dostop WHERE ank_id='$anketa' AND uid IN (SELECT user FROM srv_dostop_manage WHERE manager='$uid')"); + $sql = sisplet_query("SELECT dostop FROM srv_dostop WHERE ank_id='$anketa' AND uid IN (SELECT user FROM srv_dostop_manage WHERE manager='$global_user_id')"); while ($row = mysqli_fetch_array($sql)) { $dostop = explode(',', $row['dostop']); @@ -190,82 +202,138 @@ class Dostop { return TRUE; } - return FALSE; + // Odklepanje anekte - vrne ravno obratno + if($type == 'lock') + return TRUE; + else + return FALSE; } + public function checkDostopSubFromNavigation($navigation){ + global $admin_type; + global $global_user_id; + + if ($navigation == NAVI_STATUS) { + $type = 'dashboard'; + } + elseif ($navigation == NAVI_UREJANJE) { + if ($_GET['a'] == 'telephone') + $type = 'phone'; + else + $type = 'edit'; + } + elseif ($navigation == NAVI_TESTIRANJE) { + $type = 'test'; + } + elseif ($navigation == NAVI_OBJAVA) { + $type = 'publish'; + } + elseif ($navigation == NAVI_RESULTS && $_GET['m'] != 'monitoring') { + $type = 'data'; + } + elseif ($navigation == NAVI_ANALYSIS) { + $type = 'analyse'; + } + else{ + return TRUE; + } + + return $this->checkDostopSub($type); + } + + // Izposemo obvestilo, da urednik nima dostopa do podstrani + public function displayDostopNoAccess($what=''){ + global $lang; + global $site_url; + + echo '
    '; + + echo '
    '.$lang['srv_dostop_sub_locked_title'].'
    '; + + echo '
    '; + echo '

    '.$lang['srv_dostop_sub_locked_text'].'

    '; + echo '
    '; + + echo '
    '; + } + + function ajax(){ - if ($_GET['a'] == 'manager_add_user') { + $a = isset($_GET['a']) ? $_GET['a'] : ''; + $m = isset($_GET['m']) ? $_GET['m'] : ''; + + if ($a == 'manager_add_user') { $this->ajax_manager_add_user(); } - elseif($_GET['a'] == 'add_new_user'){ + elseif($a == 'add_new_user'){ $this->ajax_add_new_user(); } - elseif ($_GET['a'] == 'anketa_user_dostop') { + elseif ($a == 'anketa_user_dostop') { $this->ajax_anketa_user_dostop(); } - elseif ($_GET['a'] == 'anketa_user_dostop_save') { + elseif ($a == 'anketa_user_dostop_save') { $this->ajax_anketa_user_dostop_save(); } - elseif ($_GET['a'] == 'edit_user') { + elseif ($a == 'edit_user') { $this->ajax_edit_user(); } - elseif ($_GET['a'] == 'edit_user_save') { + elseif ($a == 'edit_user_save') { $this->ajax_edit_user_save(); } - elseif ($_GET['a'] == 'admin_add_user') { + elseif ($a == 'admin_add_user') { $this->ajax_admin_add_user(); } - elseif ($_GET['a'] == 'admin_add_user_popup') { + elseif ($a == 'admin_add_user_popup') { $this->ajax_admin_add_user_popup(); } - elseif($_GET['a'] == 'find_user'){ + elseif($a == 'find_user'){ $this->ajax_find_user(); } - elseif ($_GET['a'] == 'edit_remove_user') { + elseif ($a == 'edit_remove_user') { $this->ajax_edit_remove_user(); } - elseif ($_GET['a'] == 'edit_remove_user_manager') { + elseif ($a == 'edit_remove_user_manager') { $this->ajax_edit_remove_user_manager(); } - elseif ($_GET['a'] == 'edit_remove_user_admin') { + elseif ($a == 'edit_remove_user_admin') { $this->ajax_edit_remove_user_admin(); } - elseif ($_GET['a'] == 'all_users_list') { + elseif ($a == 'all_users_list') { - if ($_GET['m'] == 'delete') { + if ($m == 'delete') { $this->ajax_all_users_list_delete(); } - if ($_GET['m'] == 'ban') { + if ($m == 'ban') { $this->ajax_all_users_list_ban(); } else { $this->ajax_all_users_list(); } } - elseif($_GET['a'] == 'my_users_list'){ + elseif($a == 'my_users_list'){ $this->ajax_all_users_list_my(); } - elseif ($_GET['a'] == 'delete_users_list') { + elseif ($a == 'delete_users_list') { $this->ajax_delete_users_list(); } - elseif ($_GET['a'] == 'unsigned_users_list') { + elseif ($a == 'unsigned_users_list') { $this->ajax_unsigned_users_list(); } - elseif ($_GET['a'] == 'unconfirmed_mail_user_list') { + elseif ($a == 'unconfirmed_mail_user_list') { - if ($_GET['m'] == 'delete') { + if ($m == 'delete') { $this->ajax_unconfirmed_mail_user_list_delet_user(); } - elseif ($_GET['m'] == 'accept') { + elseif ($m == 'accept') { $this->ajax_confirm_user_email(); } else { $this->ajax_unconfirmed_mail_user_list(); } } - elseif ($_GET['a'] == 'dodeljeni_uporabniki_display') { + elseif ($a == 'dodeljeni_uporabniki_display') { $this->ajax_dodeljeni_uporabniki_display(); } } @@ -275,7 +343,7 @@ class Dostop { */ public function ajax_add_new_user() { - global $pass_salt, $site_url, $site_domain, $virtual_domain, $lang, $app_settings; + global $pass_salt, $site_url, $site_domain, $lang; $email = $_POST['email']; $name = $_POST['name']; @@ -286,6 +354,7 @@ class Dostop { include root_dir('lang/'.$jezik.'.php'); + $error = ''; if ($email != '') { @@ -294,7 +363,7 @@ class Dostop { if ($password == '' || $password == $password2) { - $s = sisplet_query("INSERT INTO users (name, surname, email, pass, type, when_reg, came_from, lang) VALUES ('$name', '$surnname', '$email', '" . base64_encode((hash(SHA256, $password . $pass_salt))) . "', '3', DATE_FORMAT(NOW(), '%Y-%m-%d'), '1', $jezik)"); + $s = sisplet_query("INSERT INTO users (name, surname, email, pass, type, when_reg, came_from, lang) VALUES ('$name', '$surnname', '$email', '" . base64_encode((hash('SHA256', $password . $pass_salt))) . "', '3', DATE_FORMAT(NOW(), '%Y-%m-%d'), '1', $jezik)"); $id = mysqli_insert_id($GLOBALS['connect_db']); } else { @@ -317,26 +386,24 @@ class Dostop { $UserContent .= $lang['register_add_user_content_edit']; - $PageName = $app_settings['app_name']; + $PageName = AppSettings::getInstance()->getSetting('app_settings-app_name'); $change = ''; - $out = ''; // Ce gre slucajno za virtualko - $Subject = ($virtual_domain) ? $lang['register_user_subject_virtual'] : $lang['register_user_subject']; + $Subject = (isVirtual()) ? $lang['register_user_subject_virtual'] : $lang['register_user_subject']; $UserContent = str_replace("SFNAME", $name, $UserContent); $UserContent = str_replace("SFMAIL", $email, $UserContent); $UserContent = str_replace("SFWITH", $email, $UserContent); $UserContent = str_replace("SFPAGENAME", $PageName, $UserContent); $UserContent = str_replace("SFCHANGE", $change, $UserContent); - $UserContent = str_replace("SFOUT", $out, $UserContent); $UserContent = str_replace("SFEND", '', $UserContent); $Subject = str_replace("SFPAGENAME", $PageName, $Subject); // Ce gre slucajno za virtualko - if($virtual_domain) + if(isVirtual()) $Subject = str_replace("SFVIRTUALNAME", $site_domain, $Subject); if ($password2 == "") { @@ -384,7 +451,7 @@ class Dostop { $error = 'email'; } - header("Location: index.php?a=diagnostics&t=uporabniki&m=all&add=new&error=" . ($error !== FALSE ? $error : '')); + header("Location: index.php?a=diagnostics&t=uporabniki&m=all&add=new&error=".$error); } /** @@ -411,6 +478,8 @@ class Dostop { $password = $_POST['password']; $password2 = $_POST['password2']; + $error = ''; + if ($email != '') { $sqlu = sisplet_query("SELECT id FROM users WHERE email='$email'"); @@ -418,7 +487,7 @@ class Dostop { if ($password == '' || $password == $password2) { - $s = sisplet_query("INSERT INTO users (name, surname, email, pass, type, when_reg, came_from) VALUES ('$name', '$surnname', '$email', '" . base64_encode((hash(SHA256, $password . $pass_salt))) . "', '3', DATE_FORMAT(NOW(), '%Y-%m-%d'), '1')"); + $s = sisplet_query("INSERT INTO users (name, surname, email, pass, type, when_reg, came_from) VALUES ('$name', '$surnname', '$email', '" . base64_encode((hash('SHA256', $password . $pass_salt))) . "', '3', DATE_FORMAT(NOW(), '%Y-%m-%d'), '1')"); $id = mysqli_insert_id($GLOBALS['connect_db']); } else { @@ -473,7 +542,7 @@ class Dostop { $error = 'email'; } - header("Location: index.php?a=diagnostics&t=uporabniki&m=my&error=" . ($error !== FALSE ? $error : '')); + header("Location: index.php?a=diagnostics&t=uporabniki&m=my&error=".$error); } /** @@ -497,7 +566,8 @@ class Dostop { echo ''; - echo '

    '; + echo '
    '; + echo ''; if ($r['type'] == 2 || $r['type'] == 3) { echo $lang['admin_narocnik']; @@ -511,7 +581,7 @@ class Dostop { $r['email'] = iconv("iso-8859-2", "utf-8", $r['email']); - echo ': ' . $r['name'] . ' ' . $r['surname'] . ' (' . $r['email'] . ')

    '; + echo ': ' . $r['name'] . ' ' . $r['surname'] . ' (' . $r['email'] . ')'; if ($r['type'] >= 2) { @@ -520,49 +590,77 @@ class Dostop { $dostop = explode(',', $row['dostop']); echo '
    '; echo ''; - echo ''; - echo '

    '; - echo '

    '; - echo '

    '; - echo '

    '; - echo '

    '; - echo '

    '; - - echo '

    '; - + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; // Nastavitev, da ne more odklenit ankete - echo '

    '; - + echo '
    '; + echo ''; + echo ''; + echo '
    '; // Je anketar - ne more poceti nicesar razen izvajati telefonsko anketo (ob kliku se ostale avtomatsko ugasnejo in disablajo) - echo '

    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; // Če gre za Hierarhijo if (SurveyInfo::checkSurveyModule('hierarhija', $this->anketa)) { $tip = sisplet_query("SELECT type FROM srv_hierarhija_users WHERE user_id='" . $uid . "' AND anketa_id='" . $this->anketa . "'", "obj"); if (!empty($tip) && !empty($tip->type)) { - echo '

    '; - echo '

    '; + echo '
    '; + echo 'Uporabnik hierarhije s pravicami:'; + echo ''; + echo '
    '; } } - - echo '
    '; - // Ce je katerikoli od treh checkboxou ugasnjen imamo enablano editiranje samo posameznega jezik $enable_lang = (!in_array('edit', $dostop) || !in_array('test', $dostop) || !in_array('publish', $dostop)) ? TRUE : FALSE; $sqll = sisplet_query("SELECT * FROM srv_language WHERE ank_id = '$this->anketa'"); - if (mysqli_num_rows($sqll) > 0) { - echo '

    ' . $lang['srv_passive_multilang'] . '

    '; + echo '
    '; + + if (mysqli_num_rows($sqll) > 0) { + echo '' . $lang['srv_passive_multilang'] . ':'; + echo ''; } + while ($rowl = mysqli_fetch_array($sqll)) { $sqldl = sisplet_query("SELECT * FROM srv_dostop_language WHERE ank_id = '$this->anketa' AND uid = '$uid' AND lang_id='$rowl[lang_id]'"); @@ -575,16 +673,18 @@ class Dostop { $checked = ''; } - echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; } echo '
    '; echo ''; - - echo ''; } - // Manager - brez moznosti uporabe 1ka streznika + + // Manager - brez moznosti uporabe 1ka streznika elseif ($r['type'] == 1) { $sql = sisplet_query("SELECT dostop FROM srv_dostop WHERE ank_id='$this->anketa' AND uid='$uid'"); @@ -629,8 +729,6 @@ class Dostop { echo ''; echo '

    (' . $lang['srv_dostop_edit'] . ', ' . $lang['srv_dostop_data'] . ', ' . $lang['srv_dostop_export'] . ')

    '; - - echo ''; } // Ostali ne morejo managerju nicesar spreminjati else { @@ -642,7 +740,10 @@ class Dostop { echo '

    (' . $lang['srv_dostop_edit'] . ', ' . $lang['srv_dostop_data'] . ', ' . $lang['srv_dostop_export'] . ')

    '; } - echo ''; + echo '
    '; + echo ''; + echo ''; + echo '
    '; } function ajax_anketa_user_dostop_save() { @@ -680,7 +781,6 @@ class Dostop { global $lang; global $global_user_id; global $admin_type; - global $virtual_domain; $uid = $_POST['uid']; @@ -694,7 +794,8 @@ class Dostop { echo '
    '; - echo '

    ' . $lang['edit_user'] . '

    '; + echo '

    ' . $lang['edit_user'] . '

    '; + echo ''; // Segment tip uporabnika echo '
    '; @@ -703,35 +804,65 @@ class Dostop { // Emaila ne more vec editirat, ker je prevec problemov (izgubi ankete...) echo ''; - echo '

    '.$row['name'].' '.$row['surname'].' ('.$row['email'].')

    '; + + echo '
    '; + echo '' . $lang['user2'] . ': '.$row['name'].' '.$row['surname'].' ('.$row['email'].')'; + echo '
    '; // Admin lahko spreminja tip vseh userjev if ($admin_type == 0) { - echo '

    '; echo ''; echo ''; echo ''; - echo '

    '; + echo ''; + echo '
    '; } else { echo ''; } - echo '

    '; - + echo '
    '; + echo '' . $lang['status'] . ''; + echo ''; + echo '
    '; + echo '
    '; // Segment osnovni podatki echo ''; // Segment paket - global $app_settings; - if($app_settings['commercial_packages'] == true){ + if(AppSettings::getInstance()->getSetting('app_settings-commercial_packages') === true){ echo '
    '; $userAccess = UserAccess::getInstance($uid); @@ -776,20 +908,20 @@ class Dostop { $time_expire = (isset($userAccess_data['time_expire'])) ? date('d.m.Y', strtotime($userAccess_data['time_expire'])) : ''; // Paket - echo '

    '; - echo ' '; - echo ' '; foreach($userAccess->getPackages() as $package_id => $package){ echo ' '; } echo ' '; - echo '

    '; + echo '
    '; // Trajanje paketa - echo '

    '; - echo ' '; - echo ' '; - echo '

    '; + echo '
    '; + echo ' ' . ucfirst($lang['srv_access_package_valid']) . ':'; + echo ' '; + echo '
    '; echo ' '; + echo ''; } echo ''; @@ -280,22 +373,22 @@ class GDPR{ $current_authorities[] = $authority; } - echo '

    '.$lang['srv_gdpr_user_settings_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'].'
    '; + echo ''.$authority['name'].'
    '; if($authority['title'] != '') echo ''.$authority['title'].'
    '; if($authority['email'] != '') - echo ''.$lang['srv_gdpr_user_settings_email'].': '.$authority['email'].'
    '; + echo ''.$lang['srv_gdpr_user_settings_email'].':
    '.$authority['email'].'
    '; if($authority['phone'] != '') - echo ''.$lang['srv_gdpr_user_settings_phone'].': '.$authority['phone'].'
    '; + echo ''.$lang['srv_gdpr_user_settings_phone'].':
    '.$authority['phone'].'
    '; if($authority['fax'] != '') - echo 'Fax: '.$authority['fax'].'
    '; + echo 'Fax:
    '.$authority['fax'].'

    '; echo '
    '; } @@ -307,9 +400,8 @@ class GDPR{ global $site_url; global $lang; - echo '
    '; - echo '

    '.$lang['srv_gdpr_requests_desc'].'

    '; - echo '
    '; + + echo '

    '.$lang['srv_gdpr_requests_desc'].'

    '; // Seznam cakajocih zahtevkov $request_list = array(); @@ -319,108 +411,114 @@ class GDPR{ $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 ''; - 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 ''; + // Checkbox ce je zahteva opravljena + echo ' '; + + echo ' '; - echo ''; + echo ' '; + + echo ' '; - echo ''; + echo ' '; - // Checkbox ce je zahteva opravljena - //echo ''; - echo ''; + echo ' '; // Komentar avtorja - echo ''; - + echo ' '; echo ''; } echo '
    '.$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_done'].''.$lang['srv_gdpr_requests_comment'].''.$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['naslov'].''.$request['recnum'].''.$request['ip'].''.$request['url'].''.$request['email'].''.$request['date'].''.$request['text'].''; + echo ' '; + echo ' '.$lang['srv_gdpr_requests_type_'.$request['type']].''.$request['email'].''.date('j.n.Y', strtotime($request['datum'])).''; + echo '
    '.$lang['srv_gdpr_requests_type_'.$request['type']].'
    '; + echo '
    '.($request['status'] == '1' ? $lang['srv_gdpr_requests_status_1'] : $lang['srv_gdpr_requests_status_0']).''.date('j.n.Y', strtotime($request['datum'])).''; + echo ' '; + echo '
    '; - } - else{ - echo '

    '.$lang['srv_gdpr_requests_none'].'

    '; - } - + echo '
    '; + echo '
    '; + } // Tabela opravljenih zahtevkov if(count($request_list_done) > 0){ + + echo '
    '.$lang['srv_gdpr_requests_list_resolved'].'
    '; - echo '
    '.$lang['srv_gdpr_requests_done'].''; - - echo ''; + echo '
    '; + echo '
    '; + echo '
    '; echo ''; - echo ''; - //echo ''; - //echo ''; - echo ''; - echo ''; - //echo ''; - 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 ''; + // Checkbox ce je zahteva opravljena + echo ' '; + echo ' '; - echo ''; + echo ' '; + + echo ' '; - echo ''; + echo ' '; - // Checkbox ce je zahteva opravljena - //echo ''; - echo ''; + echo ' '; // Komentar avtorja - echo ''; - - + echo ' '; echo ''; } echo '
    '.$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_done'].''.$lang['srv_gdpr_requests_comment'].''.$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['naslov'].''.$request['recnum'].''.$request['ip'].''.$request['url'].''.$request['email'].''.$request['date'].''.$request['text'].''.$lang['srv_gdpr_requests_type_'.$request['type']].''.$request['email'].''.date('j.n.Y', strtotime($request['datum'])).''; + echo '
    '.$lang['srv_gdpr_requests_type_'.$request['type']].'
    '; + echo '
    '.($request['status'] == '1' ? $lang['srv_gdpr_requests_status_1'] : $lang['srv_gdpr_requests_status_0']).''.date('j.n.Y', strtotime($request['datum'])).''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; } } @@ -441,7 +539,10 @@ class GDPR{ ORDER BY date(r.datum) ASC"); if(mysqli_num_rows($sql) > 0){ - echo ''; + echo '
    '; + echo '
    '; + + echo '
    '; echo ''; echo ''; @@ -472,7 +573,7 @@ class GDPR{ echo ''; // Odgovorna oseba - echo ''; // Organizacija - echo '
    '.$lang['srv_gdpr_requests_author'].''.$row['u_name'].' '.$row['u_surname'].'
    ('.$row['u_email'].')
    '; + echo ''; 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'] != '') @@ -482,7 +583,7 @@ class GDPR{ echo '
    '; + echo ''; if($row['gu_type'] == '1'){ if($row['gu_organization'] != '') echo ''.$lang['srv_gdpr_user_settings_organization'].': '.$row['gu_organization'].'
    '; @@ -514,6 +615,9 @@ class GDPR{ } echo '
    '; + + echo ''; + echo ''; } else{ echo '

    '.$lang['srv_gdpr_requests_none'].'

    '; @@ -534,10 +638,11 @@ class GDPR{ if(mysqli_num_rows($sql) > 0){ echo '
    '; - echo ''; - echo ' + '.$lang['srv_gdpr_requests_done'].''; - echo ''; + echo ' '; + echo '
    '; + echo '
    '; + echo ''; echo ''; @@ -569,7 +674,7 @@ class GDPR{ echo ''; // Odgovorna oseba - echo ''; // Organizacija - echo ''; + + echo '
    '; + echo '
    '; } } @@ -651,98 +759,158 @@ class GDPR{ // GDPR nastavitve ankete - echo '
    '; + echo '
    '; echo ''.$lang['srv_gdpr_survey_settings'].''; // Besedilo na vrhu - echo '

    '.$lang['srv_gdpr_survey_settings_desc1'].'

    '; + echo '

    '.$lang['srv_gdpr_survey_settings_desc1'].'

    '; - echo '

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

    '; + echo '

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

    '; - echo '

    '.$lang['srv_gdpr_survey_settings_desc3'].'

    '; + echo '

    '.$lang['srv_gdpr_survey_settings_desc3'].'

    '; // Ali gre za gdpr anketo - echo ''.$lang['srv_gdpr_survey_gdpr_data'].':'; - echo ' '; - echo ' '; + echo '
    '; + echo '
    '; + echo ''.$lang['srv_gdpr_survey_gdpr_data'].':'; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '
    '; + echo '
    '; - echo '

    '; + // Oznacena kot GDPR - prikazemo identifikatorje + echo '
    '; - echo '
    '; - - // Dodatne informacije - echo '