';
- #if (self::$profiles[self :: $currentProfileId]['type'] == 'inspect') {
- # echo '
'.$lang['srv_profile_data_is_filtred_zoom'].'';
- #} else {
- echo '
'.$lang['srv_profile_data_is_filtred'].'';
- #}
- echo '
('.self::$profiles[self :: $currentProfileId]['name'].')';
- echo '
'.$condition_label.'';
- // ali imamo napake v ifu
+ echo '
';
+
+ echo ' ';
+
echo '
';
- echo '
';
+
return true;
}
@@ -1009,4 +1000,4 @@ class SurveyConditionProfiles
return false;
}
}
-?>
\ No newline at end of file
+?>
diff --git a/admin/survey/classes/class.SurveyExport.php b/admin/survey/classes/class.SurveyExport.php
index 7494191d2..0f3653f2a 100644
--- a/admin/survey/classes/class.SurveyExport.php
+++ b/admin/survey/classes/class.SurveyExport.php
@@ -132,7 +132,7 @@ class SurveyExport
case 'sav':
self::exportSav();
break;
- case 'spss':
+ case 'spss':
self::exportSpss();
break;
case 'excel':
@@ -144,6 +144,9 @@ class SurveyExport
case 'txt':
self::exportText();
break;
+ case '1ka':
+ self::export1KA();
+ break;
}
}
@@ -154,7 +157,7 @@ class SurveyExport
if ($this->_fileStatus >= 0) {
- $this->_HEADERS = unserialize(file_get_contents($this->_headFileName));
+ $this->_HEADERS = unserialize(file_get_contents($this->_headFileName));
$this->exportSettings = array();
foreach ($_SESSION AS $pkey => $pvalue)
@@ -611,7 +614,7 @@ class SurveyExport
fwrite($file_handler,$output2."\n");
fclose($file_handler);
-
+
# sfiltriramo podatke
exec ('awk -F'.$this->_QUOTE.STR_DLMT.$this->_QUOTE.' '.$this->_QUOTE.$this->_CURRENT_STATUS_FILTER.' {print $0}'.$this->_QUOTE.' '.$this->_dataFileName.' > '.$this->_dataFileName .'_data1'.TMP_EXT);
if (IS_WINDOWS) {
@@ -711,6 +714,110 @@ class SurveyExport
exit;
}
+
+ /** naredimo izvoz za txt
+ *
+ */
+ function export1KA() {
+ $this->_EXPORT_FULL_META = true;
+ $this->_EXPORT_HIDDEN_SYSTEM = true;
+ $this->_SPECIAL_EXPORT = true;
+
+ $this->setUpFilter();
+
+ global $site_path;
+
+ $folder = $site_path . EXPORT_FOLDER.'/';
+
+ // če fajl obstaja, ga briši (dodaj)
+ if ($this->_fileStatus >= 0 && $this->_dataFileName !== null && $this->_dataFileName !== '' && $this->_headFileName !== null && $this->_headFileName !== '') {
+
+ #zapišemo v temp file
+
+ $file_handler = fopen($this->_dataFileName.'.1ka',"w");
+
+ $output1 = '';
+ $output2 = '';
+
+ // array za labele (ce jih izpisujemo)
+ $display_labels = true;
+ $labels = array();
+
+ # naredimo header row
+ foreach ($this->_HEADERS AS $spid => $spremenljivka) {
+ if (isset($this->_SVP_PV[$spid])) {
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+ foreach ($grid['variables'] AS $vid => $variable ){
+
+ // izvozimo KOMPLET VSE
+ $output1 .= strip_tags($variable['variable']).'|';
+ $output2 .= strip_tags($variable['naslov']).'|';
+ }
+ }
+ }
+
+ // Ce izpisujemo tudi labele
+ if($display_labels && isset($spremenljivka['spr_id'])){
+ if(in_array($spremenljivka['tip'], array('1','3','6','16'))){
+
+ $sequences = array();
+ $sequences = explode('_', $spremenljivka['sequences']);
+ $vars = $this->getVariableLabels($spremenljivka['spr_id']);
+
+ foreach($sequences as $sequence){
+ $labels[$sequence] = $vars;
+ }
+ }
+ }
+ }
+ fwrite($file_handler,$output1."\n");
+ fwrite($file_handler,$output2."\n");
+ fclose($file_handler);
+
+ # izvedemo download
+ $out_file = fopen($this->_dataFileName .'.1ka',"a");
+ if ($fd = fopen ($this->_dataFileName, "r")) {
+ while(($line = fgets($fd)) !== false) {
+ fwrite($out_file, $line);
+ }
+ }
+ else {
+ echo "Napaka";
+ }
+ fclose ($fd);
+ fclose ($out_file);
+
+ if ($fd = fopen ($this->_dataFileName.'.1ka', "r")) {
+ ob_clean();
+
+ $fsize = filesize($this->_dataFileName.'.1ka');
+ $path_parts = pathinfo($this->_dataFileName.'.1ka');
+ $ext = strtolower($path_parts["extension"]);
+ header('Content-type: text/plain; charset='.$convertTypes[$convertType]['charSet']);
+ header('Content-Disposition: attachment; filename="anketa'.$this->sid.'-'.date('Y-m-d').'.txt"');
+ header('Pragma: public');
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Cache-Control: private',false);
+ header('Content-Transfer-Encoding: binary');
+ ob_flush();
+
+ while(($line = fgets($fd)) !== false) {
+ echo $line;
+ }
+ fclose ($fd);
+
+ }
+
+ }
+ else {
+ echo '';
+ }
+ unlink ($this->_dataFileName.'.1ka');
+
+ exit;
+ }
+
// shranim SPS in A00, potem pokličem spss in je.
private function exportSav () {
@@ -1450,4 +1557,4 @@ class SurveyExport
return $response;
}
}
-?>
\ No newline at end of file
+?>
diff --git a/admin/survey/classes/class.SurveyInpect.php b/admin/survey/classes/class.SurveyInpect.php
index 7416a2117..3cbfd3aca 100644
--- a/admin/survey/classes/class.SurveyInpect.php
+++ b/admin/survey/classes/class.SurveyInpect.php
@@ -698,8 +698,11 @@ class SurveyInspect {
function getConditionString() {
global $lang;
+ global $site_url;
+
#preverimi ali imamo nastavljen pogoj za inspect
$if_id = (int)SurveyUserSetting :: getInstance()->getSettings('inspect_if_id');
+
if ($if_id > 0) {
ob_start();
$b = new Branching($this->sid);
@@ -724,7 +727,8 @@ class SurveyInspect {
# }
#
session_start();
- global $site_url;
+
+
if (isset($_SESSION['inspectFromPodstran'][$this->sid])) {
$inspect_comeFrom = '\''.$site_url.'admin/survey/index.php?anketa='.$this->sid.'&a=analysis&m='.$_SESSION['inspectFromPodstran'][$this->sid].'\'';
unset($_SESSION['inspectFromPodstran'][$this->sid]);
@@ -739,6 +743,7 @@ class SurveyInspect {
echo '
'.$lang['srv_profile_remove'].'';
echo '
';
echo '';
@@ -741,4 +743,4 @@ class SurveyTimeProfiles {
return false;
}
}
-?>
\ No newline at end of file
+?>
diff --git a/admin/survey/classes/class.SurveyZoom.php b/admin/survey/classes/class.SurveyZoom.php
index 8d3009244..228ea2376 100644
--- a/admin/survey/classes/class.SurveyZoom.php
+++ b/admin/survey/classes/class.SurveyZoom.php
@@ -520,6 +520,7 @@ class SurveyZoom
if (is_countable($vars) && count($vars) > 0) {
$conditions = self::$profiles[self::$currentProfileId]['conditions'];
+
if ($showDiv == true) {
echo '
';
}
@@ -557,6 +558,7 @@ class SurveyZoom
} else {
$row = Cache::srv_spremenljivka($spr);
}
+
echo '
';
echo '';
echo '('.strip_tags($row['variable']).') ';
@@ -598,7 +600,9 @@ class SurveyZoom
echo "
";
}
}
+
echo '
';
+
echo '';
}
}
@@ -942,10 +946,12 @@ class SurveyZoom
function doZoomFromInspect() {
global $lang;
+
# polovimo id-je variabel iz inspect profila in nastavimo zoom profil
$SI = new SurveyInspect(self::$sid);
$variables_to_add = $SI->getInspectVariables();
+
session_start();
# shranjujenmo v sejo
# dodamo profil in ga izberemo za privzetega
@@ -961,4 +967,4 @@ class SurveyZoom
$showDiv = ((int)$_POST['showDiv'] == 1)?true:false;
self::displayZoomConditions($showDiv);
}
-}
\ No newline at end of file
+}
diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php
index 91027c94f..5ec986d10 100644
--- a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php
+++ b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php
@@ -453,9 +453,11 @@ class SurveyAnalysis {
} else {
# polovimo nastavtve missing profila
self::$missingProfileData = SurveyMissingProfiles::getProfile(self::$currentMissingProfile);
+
if (self::$podstran != M_ANALYSIS_ARCHIVE) {
self::$_LOOPS = SurveyZankaProfiles::getFiltersForLoops();
}
+
if (!is_countable(self::$_LOOPS) || count(self::$_LOOPS) == 0) {
# če nimamo zank
@@ -477,9 +479,11 @@ class SurveyAnalysis {
self::$podstran = M_ANALYSIS_SUMMARY;
self::Display();
break;
+ }
}
- } else {
+ else {
$loop_cnt = 0;
+
# če mamo zanke
foreach ( self::$_LOOPS AS $loop)
{
@@ -505,8 +509,7 @@ class SurveyAnalysis {
self::$podstran = M_ANALYSIS_SUMMARY;
self::Display();
break;
- }
-
+ }
}
}
@@ -6811,16 +6814,17 @@ class SurveyAnalysis {
# polovimo nastavtve missing profila
self::$missingProfileData = SurveyMissingProfiles::getProfile(self::$currentMissingProfile);
- if (self::$podstran != M_ANALYSIS_ARCHIVE)
- {
+ if (self::$podstran != M_ANALYSIS_ARCHIVE){
self::$_LOOPS = SurveyZankaProfiles::getFiltersForLoops();
}
- if (!is_array(self::$_LOOPS))
- {
+
+ if (!is_array(self::$_LOOPS)){
self::$_LOOPS[] = array('filter'=>null,'text'=>null);
}
$loop_cnt = 0;
+
+
# ce mamo zanke
foreach ( self::$_LOOPS AS $loop)
{
@@ -8598,4 +8602,4 @@ class SurveyAnalysis {
}
}
-?>
\ No newline at end of file
+?>
diff --git a/admin/survey/definition.php b/admin/survey/definition.php
index b7864bf4b..57d2a7e7a 100644
--- a/admin/survey/definition.php
+++ b/admin/survey/definition.php
@@ -203,6 +203,7 @@
define('M_EXPORT_SPSS', 'spss');
define('M_EXPORT_SAV', 'sav');
define('M_EXPORT_TXT', 'txt');
+ define('M_EXPORT_1KA', '1ka');
# dodatne nastavitve
define('A_ADVANCED', 'advanced');
@@ -334,4 +335,4 @@
define ('STR_EQUALS', '\x3D');
-?>
\ No newline at end of file
+?>
diff --git a/admin/survey/script/js-lang.php b/admin/survey/script/js-lang.php
index 01a43de6a..4bab074db 100644
--- a/admin/survey/script/js-lang.php
+++ b/admin/survey/script/js-lang.php
@@ -207,6 +207,7 @@ lang('srv_anketa_deleted_restore_confirm');
lang('srv_data_deleted_restore_confirm');
lang('more2');
lang('less2');
+lang('srv_concl_deactivation_text_edit');
//LOKACIJA
@@ -247,4 +248,4 @@ lang('srv_maza_geofence_infowin_radius');
lang('srv_maza_geofence_infowin_radius_unit');
lang('srv_maza_geofence_delete_confirm_map');
-// EOF
\ No newline at end of file
+// EOF
diff --git a/admin/survey/script/script.js b/admin/survey/script/script.js
index a20a09007..a8fefd89d 100644
--- a/admin/survey/script/script.js
+++ b/admin/survey/script/script.js
@@ -3763,6 +3763,15 @@ function doTxtExport() {
*/
return false;
}
+function do1KAExport() {
+ $('#export_1ka_form').submit();
+ /*
+ var fullMeta = ( $('#fullMeta').is(':checked') ) ? '&fullMeta=1' : '';
+ var hiddenSystem = ( $('#hiddenSystem').is(':checked') ) ? '&hiddenSystem=1' : '';
+ window.open( 'ajax.php?t=export&a=doexport'+'&m=txt'+'&anketa=' + srv_meta_anketa_id + fullMeta+hiddenSystem);
+ */
+ return false;
+}
function doExcelXlsExport() {
$('#export_excel_xls_form').submit();
@@ -5392,6 +5401,7 @@ function vprasanje_jezik_save_zakljucek(id_value){
});
}
+
function prikaziGoogle2faKodo(){
$('#2fa-display').toggle();
}
@@ -5739,4 +5749,4 @@ function toggleAnketaOpomba () {
function toggleAnketaMapa () {
$("#dodaj-v-mapo").toggleClass('displayNone');
$("#anketa-toggle").toggleClass('bottom0');
-}
\ No newline at end of file
+}
diff --git a/frontend/api/class.ApiLogin.php b/frontend/api/class.ApiLogin.php
index 59b894312..5e12abc84 100644
--- a/frontend/api/class.ApiLogin.php
+++ b/frontend/api/class.ApiLogin.php
@@ -287,7 +287,7 @@ class ApiLogin
// Preveri ce je user ze logiran v 1ko in nastavi globalne spremenljivke in cookie (kopirano iz function.php)
- public function executeAction($params, $data, $method)
+ public function executeAction($params, $data, $method='')
{
global $site_url;
global $global_user_id;
@@ -2096,4 +2096,4 @@ class ApiLogin
{
return base64_encode(serialize($piskotek));
}
-}
\ No newline at end of file
+}
diff --git a/frontend/install/classes/class.DisplaySettings.php b/frontend/install/classes/class.DisplaySettings.php
index 08c7db2b4..81f7038b5 100644
--- a/frontend/install/classes/class.DisplaySettings.php
+++ b/frontend/install/classes/class.DisplaySettings.php
@@ -243,6 +243,7 @@ class DisplaySettings{
echo '
'.$lang['install_settings_SMTPPassword'].':
';
echo '
';
echo '
';
+
}
private function displaySettingsGoogle(){
@@ -442,4 +443,4 @@ class DisplaySettings{
$result = curl_exec($ch);
}
-}
\ No newline at end of file
+}
diff --git a/frontend/payments/api_test.php b/frontend/payments/api_test.php
index ba15099a4..1cf828237 100644
--- a/frontend/payments/api_test.php
+++ b/frontend/payments/api_test.php
@@ -112,7 +112,7 @@ function executePOST(){
"narocilo_id" => '33'
);*/
$post_data = array(
- "email" => 'peter@1ka.si'
+ "email" => '...'
);
/*$post_data = array(
"podjetje_drzava" => 'Germany',
@@ -166,4 +166,4 @@ function executePOST(){
return $result;
}
-
\ No newline at end of file
+
diff --git a/function.php b/function.php
index 6263933d2..f353605ef 100644
--- a/function.php
+++ b/function.php
@@ -59,6 +59,8 @@ if (!$connect_db = mysqli_connect($mysql_server, $mysql_username, $mysql_passwor
}
// To je ostanek sispleta in verjetno ne sme biti več prisotno?
+// NAPAČNO, to je za stare instalacije, ki imajo Mario/SQL nastavljen na latin1.
+// če imaš v anketah kvake namesto ČŽŠ, odkomentiraj.
//sisplet_query("SET character_set_results=latin1");
@@ -772,4 +774,4 @@ function root_dir($file = null)
return __DIR__ .'/'. $file;
}
-?>
\ No newline at end of file
+?>
diff --git a/lang/1.php b/lang/1.php
index f5c33f377..44719d0f1 100644
--- a/lang/1.php
+++ b/lang/1.php
@@ -1583,6 +1583,7 @@ $lang = array (
"srv_lnk_sav" => "SPSS SAV",
"srv_lnk_PDF/RTF" => "Zaporedni izpis vseh respodentov",
"srv_lnk_txt" => "Tekstovna datoteka",
+ "srv_lnk_1ka" => "1KA oblika",
"srv_lnk_data_view" => "Pregled",
"srv_lnk_data_edit" => "Urejanje",
"srv_izvoz_step1" => "1. korak:",
@@ -1610,7 +1611,9 @@ $lang = array (
"srv_izvoz_step4_SPSS" => "Datoteko s sintakso nato poženemo z ukazom RUN ALL (najdemo ga v spustnem meniju RUN) in tako kreiramo novo datoteko - bazo podatkov (.sav), ki jo lahko shranimo.",
"srv_izvoz_step5_SPSS" => "Po izvozu v SPSS/PASW lahko določimo tudi manjkajoče vrednosti. Postavimo se v zavihek Variable View in v stolpcu Missing označimo 'Range plus one optional discrete missing value; Low: -99; High: -1;' v 1KA so namreč manjkajoče vse negativne vrednosti s sledečimi pomeni:
(-1) Ni odgovoril
(-2) Preskok (if)
(-3) Prekinjeno
(-4) Naknadno vprašanje
(-97) Neustrezno
(-98) Zavrnil
(-99) Ne vem.",
"srv_izvoz_txt_note" => "Podatke lahko izvozite v tekstovno ASCII datoteko s klikom na spodnji ukaz:",
+ "srv_izvoz_1ka_note" => "Podatke lahko izvozite v specialno 1KA datoteko s klikom na spodnji ukaz:",
"srv_izvoz_txt_file" => "Izvoz v tekstovno datoteko",
+ "srv_izvoz_1ka_file" => "Izvoz v 1KA podatkovno (.1KD) datoteko",
"srv_izvoz_SPSS_complex_note" => "Pri izvozu zelo kompleksne ankete z zankami vam v primeru kakršnih koli težav priporočamo najprej izvoz v Excel, in nato uvoz v SPSS.",
"srv_izvoz_SPSS_faq" => "V primeru kakršnihkoli zapletov (npr. pri kompleksnih anketah z zankami, stare verzije SPSS) priporočamo izvoz v Excel, in nato uvoz v SPSS. To priporočamo še posebej pri kombiniranih tabelah. Več o izvozih v SPSS si lahko preberete v priročniku
Izvoz v SPSS. V primeru težav kontaktirajte
Pomoč uporabnikom.",
"srv_izvoz_SAV_note1" => "Podatke izvozite v SPSS SAV s klikom na spodnji ukaz:",
@@ -2403,6 +2406,7 @@ $lang = array (
"srv_concl_link_go" => "Skoči na povezavo",
"srv_concl_link_rec" => "Rekurzivno",
"srv_concl_deactivation_text" => "Obvestilo pri deaktivaciji",
+ "srv_concl_deactivation_text_edit" => "Napredno urejanje obvestila pri deaktivaciji",
"srv_concl_link_params" => "URL parametri",
"srv_concl_link_usr_id" => "ID respondenta",
"srv_concl_link_status" => "Status responedenta",
diff --git a/lang/2.php b/lang/2.php
index 2f26f76c0..2d278279d 100644
--- a/lang/2.php
+++ b/lang/2.php
@@ -1571,6 +1571,7 @@ $lang = array (
"srv_lnk_sav" => "SPSS SAV",
"srv_lnk_PDF/RTF" => "Respondent results",
"srv_lnk_txt" => "Text file",
+ "srv_lnk_1ka" => "1KA format",
"srv_lnk_data_view" => "Preview",
"srv_lnk_data_edit" => "Editing",
"srv_izvoz_step1" => "Step 1:",
@@ -1599,6 +1600,8 @@ $lang = array (
"srv_izvoz_step5_SPSS" => "After export we can define missing values. In SPSS/PASW we open the Variable View, find the column Missing and select 'Range plus one optional discrete missing value; Low: -99; High: -1.' Default missing values in 1KA are:
(-1) Not answered
(-2) Skipped (condition)
(-3) Drop-out
(-4) Subsequently added question
(-97) Not applicable
(-98) Refused
(-99) Don't know.",
"srv_izvoz_txt_note" => "Data can be exported in a text ASCII file by clicking the button below:",
"srv_izvoz_txt_file" => "Text file export",
+ "srv_izvoz_1ka_note" => "Data can be exported into a 1KA data file by clicking the button below:",
+ "srv_izvoz_1ka_file" => "1KA data (.1KD) file export",
"srv_izvoz_SPSS_complex_note" => "If you encounter any problems while exporting complex surveys with loops, we suggest you first export data to Excel and then import it into SPSS.",
"srv_izvoz_SPSS_faq" => "In case of complications (e.g. complex surveys with loops, old SPSS versions) we suggest export to Excel and then import into SPSS. We specifically recommended for multiple tables. You can find more information about SPSS exports in the
SPSS Export manual. In case of any problems please contact
Help center.",
"srv_izvoz_SAV_note1" => "Export data in SPSS (SAV) format by clicking the button below:",
@@ -2388,6 +2391,7 @@ $lang = array (
"srv_concl_link_go" => "Jump to link",
"srv_concl_link_rec" => "Recursive",
"srv_concl_deactivation_text" => "Deactivation note",
+ "srv_concl_deactivation_text_edit" => "Edit deactivation note",
"srv_concl_link_params" => "URL parameters",
"srv_concl_link_usr_id" => "Respondent ID",
"srv_concl_link_status" => "Respondent status",
@@ -8654,4 +8658,4 @@ GDPR introduction preview",
);
-?>
\ No newline at end of file
+?>
diff --git a/main/survey/app/Controllers/BodyController.php b/main/survey/app/Controllers/BodyController.php
index f9bdd71ca..154552214 100644
--- a/main/survey/app/Controllers/BodyController.php
+++ b/main/survey/app/Controllers/BodyController.php
@@ -1853,6 +1853,7 @@ class BodyController extends Controller
* @desc prikaze trenutno grupo
*/
public function displayGrupa(){
+ global $fieldwork_install;
global $admin_type;
@@ -1975,7 +1976,8 @@ class BodyController extends Controller
// Preverimo, ce je uporabnik ze bil na strani
if(Check::getInstance()->check_subsequent_visit()){
- echo '';
+// PREVERI ME!
+// echo '';
}
}
@@ -2518,4 +2520,4 @@ class BodyController extends Controller
echo '
';
}
-}
\ No newline at end of file
+}
diff --git a/main/survey/app/Controllers/CheckController.php b/main/survey/app/Controllers/CheckController.php
index 598e20ab7..1d7538934 100644
--- a/main/survey/app/Controllers/CheckController.php
+++ b/main/survey/app/Controllers/CheckController.php
@@ -663,10 +663,11 @@ class CheckController extends Controller
$row1 = mysqli_fetch_array($sql1);
save('grupa', $row1['id']);
-
- $grupa = Find::getInstance()->findNextGrupa();
-
+
+ $grupa = Find::getInstance()->findSameGrupa();
+
if ($grupa > 0) {
+ $_GET['grupa'] = $grupa; // v primeru dostopa s kodo, po vpisu kode nastavi $_GET['grupa'] na 0. Ker se drugje v kodi preverja GET, ga nastavim tu na pravo vrednost, da deluje "nadaljuj kjer je ostal" tudi v primeru dostopa s kodo.
setcookie('ref', get('anketa')); // cookie z referalom (da se ne sprozi redirect zaradi referala pri ?code= )
return header("Location: " . \SurveyInfo::getSurveyLink() . "&grupa=$grupa" . (isset($_GET['language']) ? '&language=' . $_GET['language'] : '') . (isset($_GET['skupina']) ? '&skupina=' . $_GET['skupina'] : '') . get('cookie_url') . "&c");
die();
@@ -770,4 +771,4 @@ class CheckController extends Controller
else
return false;
}
-}
\ No newline at end of file
+}
diff --git a/main/survey/app/Controllers/FindController.php b/main/survey/app/Controllers/FindController.php
index e0913c99b..4a38d0922 100644
--- a/main/survey/app/Controllers/FindController.php
+++ b/main/survey/app/Controllers/FindController.php
@@ -286,5 +286,38 @@ class FindController extends Controller
return 0;
}
}
+ /**
+ * @desc poisce naslednjo stran - grupo, 0 pomeni konec
+ */
+ public function findSameGrupa($gru_id=0)
+ {
+ //vrstni red trenutne grupe
+ if (get('grupa') > 0) {
+ $sql = sisplet_query("SELECT vrstni_red FROM srv_grupa WHERE id = '" . get('grupa') . "'");
+ $row = mysqli_fetch_array($sql);
+ $vrstni_red = $row['vrstni_red'];
+ }
+ elseif ($gru_id > 0) {
+ $sql = sisplet_query("SELECT vrstni_red FROM srv_grupa WHERE id = '" . $gru_id . "'");
+ $row = mysqli_fetch_array($sql);
+ $vrstni_red = $row['vrstni_red'];
+ }
+ else {
+ $vrstni_red = 0;
+ }
-}
\ No newline at end of file
+ $sql = sisplet_query("SELECT id FROM srv_grupa WHERE ank_id='" . get('anketa') . "' AND vrstni_red='$vrstni_red' ORDER BY vrstni_red ASC LIMIT 1");
+
+ // naslednja stran
+ if (mysqli_num_rows($sql) > 0) {
+ $row = mysqli_fetch_array($sql);
+ return $row['id'];
+ }
+ // konec
+ else {
+ return 0;
+ }
+ }
+
+
+}
diff --git a/settings.php.example b/settings.php.example
index 9db55e7e5..36d27ce00 100644
--- a/settings.php.example
+++ b/settings.php.example
@@ -23,4 +23,23 @@ $pass_salt = '';
$mysql_server = 'localhost';
$mysql_username = '';
$mysql_password = '';
-$mysql_database_name = '';
\ No newline at end of file
+$mysql_database_name = '';
+
+
+/**
+ * Nastavitve za F2F laptop delo
+ */
+
+$fieldwork_install = false;
+
+/*
+ Nastavitev dostopa za export podatkov v .A00 (kao .1KD - 1ka data),
+ ki se uporablja za redne izvoze in sinhronizacijo na centralni strežnik.
+
+ Za več preveri F2F.md!
+
+ data_export_ajax_access= [id_survey => [id_user, skrita_koda]]
+ */
+
+$data_export_ajax_access = [];
+