Prenova arhiviranja sql tabel s podatki (poleg _active imamo sedaj tudi _archive1, _archive2...)
This commit is contained in:
parent
4c7f448de7
commit
386f969595
@ -120,8 +120,7 @@ class PdfIzvoz {
|
|||||||
$this->anketa['uid'] = $global_user_id;
|
$this->anketa['uid'] = $global_user_id;
|
||||||
SurveyUserSetting::getInstance()->Init($this->anketa['id'], $this->anketa['uid']);
|
SurveyUserSetting::getInstance()->Init($this->anketa['id'], $this->anketa['uid']);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
@ -146,8 +146,7 @@ class PdfIzvozResults {
|
|||||||
{
|
{
|
||||||
SurveyUserSetting::getInstance()->Init($this->anketa['id'], $global_user_id);
|
SurveyUserSetting::getInstance()->Init($this->anketa['id'], $global_user_id);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
@ -90,8 +90,7 @@ class RtfIzvoz {
|
|||||||
$this->anketa['uid'] = $global_user_id;
|
$this->anketa['uid'] = $global_user_id;
|
||||||
SurveyUserSetting::getInstance()->Init($this->anketa['id'], $this->anketa['uid']);
|
SurveyUserSetting::getInstance()->Init($this->anketa['id'], $this->anketa['uid']);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
@ -115,8 +115,7 @@ class RtfIzvozResults {
|
|||||||
{
|
{
|
||||||
SurveyUserSetting::getInstance()->Init($this->anketa['id'], $global_user_id);
|
SurveyUserSetting::getInstance()->Init($this->anketa['id'], $global_user_id);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
@ -84,8 +84,7 @@ class Branching {
|
|||||||
|
|
||||||
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
UserSetting :: getInstance()->Init($global_user_id);
|
UserSetting :: getInstance()->Init($global_user_id);
|
||||||
|
|
||||||
@ -102,7 +101,7 @@ class Branching {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @desc inicializacija branchinga (samo prvi<EFBFBD>, na za<EFBFBD>etku), prepi<EFBFBD>e vrstni red iz normalenga urejanja
|
* @desc inicializacija branchinga (samo prvic, na zacetku), prepise vrstni red iz normalenga urejanja
|
||||||
*/
|
*/
|
||||||
function init_branching () {
|
function init_branching () {
|
||||||
|
|
||||||
|
@ -2172,7 +2172,7 @@ class BranchingAjax {
|
|||||||
// komentarji respondentov
|
// komentarji respondentov
|
||||||
elseif ($type == 2) {
|
elseif ($type == 2) {
|
||||||
|
|
||||||
$db_table = (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) ? '_active' : '';
|
$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
|
|
||||||
$orderby = $sortpostorder == 1 ? 'DESC' : 'ASC' ;
|
$orderby = $sortpostorder == 1 ? 'DESC' : 'ASC' ;
|
||||||
$sql = sisplet_query("SELECT d.*, u.time_edit FROM srv_data_text".$db_table." d, srv_user u WHERE d.spr_id='0' AND d.vre_id='$spremenljivka' AND u.id=d.usr_id ORDER BY d.id $orderby");
|
$sql = sisplet_query("SELECT d.*, u.time_edit FROM srv_data_text".$db_table." d, srv_user u WHERE d.spr_id='0' AND d.vre_id='$spremenljivka' AND u.id=d.usr_id ORDER BY d.id $orderby");
|
||||||
|
@ -153,8 +153,7 @@ class SurveyAdmin
|
|||||||
|
|
||||||
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
$this->survey_type = $this->getSurvey_type($this->anketa);
|
$this->survey_type = $this->getSurvey_type($this->anketa);
|
||||||
|
|
||||||
|
@ -68,8 +68,7 @@ class SurveyAdminAjax {
|
|||||||
|
|
||||||
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
$this->survey_type = $this->SurveyAdmin->getSurvey_type($this->anketa);
|
$this->survey_type = $this->SurveyAdmin->getSurvey_type($this->anketa);
|
||||||
|
|
||||||
|
@ -58,8 +58,7 @@ class SurveyAdminSettings {
|
|||||||
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
||||||
SurveyInfo::getInstance()->resetSurveyData();
|
SurveyInfo::getInstance()->resetSurveyData();
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
$this->survey_type = $this->getSurvey_type($this->anketa);
|
$this->survey_type = $this->getSurvey_type($this->anketa);
|
||||||
|
|
||||||
|
@ -3377,7 +3377,7 @@ class ApiSurvey {
|
|||||||
|
|
||||||
// vstavimo v srv_data_text (email, ime, priimek)
|
// vstavimo v srv_data_text (email, ime, priimek)
|
||||||
SurveyInfo::getInstance()->SurveyInit($ank_id);
|
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) {
|
foreach ($sys_vars AS $sid => $spremenljivka) {
|
||||||
if ($spremenljivka['variable'] == 'email')
|
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 . "')");
|
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 +3424,7 @@ class ApiSurvey {
|
|||||||
|
|
||||||
// vstavimo v srv_data_text (email, ime, priimek)
|
// vstavimo v srv_data_text (email, ime, priimek)
|
||||||
SurveyInfo::getInstance()->SurveyInit($ank_id);
|
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) {
|
foreach ($sys_vars AS $sid => $spremenljivka) {
|
||||||
if ($spremenljivka['variable'] == 'email') {
|
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 . "')");
|
$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 . "')");
|
||||||
@ -3887,7 +3887,7 @@ class ApiSurvey {
|
|||||||
|
|
||||||
// vstavimo v srv_data_text (email, ime, priimek)
|
// vstavimo v srv_data_text (email, ime, priimek)
|
||||||
SurveyInfo::getInstance()->SurveyInit($ank_id);
|
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) {
|
foreach ($sys_vars AS $sid => $spremenljivka) {
|
||||||
if ($spremenljivka['variable'] == 'email')
|
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 . "')");
|
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 +3934,7 @@ class ApiSurvey {
|
|||||||
|
|
||||||
// vstavimo v srv_data_text (email, ime, priimek)
|
// vstavimo v srv_data_text (email, ime, priimek)
|
||||||
SurveyInfo::getInstance()->SurveyInit($ank_id);
|
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) {
|
foreach ($sys_vars AS $sid => $spremenljivka) {
|
||||||
if ($spremenljivka['variable'] == 'email') {
|
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 . "')");
|
$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 . "')");
|
||||||
|
@ -42,10 +42,9 @@ class Common {
|
|||||||
{
|
{
|
||||||
if ($anketa) {
|
if ($anketa) {
|
||||||
self::$anketa = $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."'");
|
$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
|
# polovimo vrsto tabel za to anketo
|
||||||
$strDbTable = "SELECT db_table FROM srv_anketa WHERE id = $sid";
|
SurveyInfo::getInstance()->SurveyInit($sid);
|
||||||
$qryDbTable = sisplet_query($strDbTable);
|
$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
list($db_table) = mysqli_fetch_row($qryDbTable);
|
|
||||||
|
|
||||||
$list = '';
|
$list = '';
|
||||||
// se je dogajalo da je 0 ... pa se je pojavljal mysql_fetch error
|
// se je dogajalo da je 0 ... pa se je pojavljal mysql_fetch error
|
||||||
@ -255,6 +253,7 @@ class Common {
|
|||||||
}
|
}
|
||||||
if ($list != '') {
|
if ($list != '') {
|
||||||
sisplet_query("BEGIN");
|
sisplet_query("BEGIN");
|
||||||
|
|
||||||
// tabela z respondenti
|
// tabela z respondenti
|
||||||
$deleted = sisplet_query("DELETE FROM srv_user WHERE preview='1' AND id IN ($list) AND ank_id = '$sid'");
|
$deleted = sisplet_query("DELETE FROM srv_user WHERE preview='1' AND id IN ($list) AND ank_id = '$sid'");
|
||||||
|
|
||||||
|
@ -47,8 +47,7 @@ class Prevajanje {
|
|||||||
|
|
||||||
SurveySetting::getInstance()->Init($this->anketa);
|
SurveySetting::getInstance()->Init($this->anketa);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
$row = SurveyInfo::getInstance()->getSurveyRow();
|
$row = SurveyInfo::getInstance()->getSurveyRow();
|
||||||
|
|
||||||
|
@ -30,9 +30,8 @@ class RecodeValues {
|
|||||||
self::$anketa = $anketa;
|
self::$anketa = $anketa;
|
||||||
self::$spremenljivka = $spremenljivka;
|
self::$spremenljivka = $spremenljivka;
|
||||||
|
|
||||||
SurveyInfo::getInstance()->SurveyInit($anketa);
|
SurveyInfo::getInstance()->SurveyInit($anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
self::$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
self::$db_table = '_active';
|
|
||||||
|
|
||||||
# polovimo manjkajoče privzete vrednosti ankete
|
# polovimo manjkajoče privzete vrednosti ankete
|
||||||
self::$smv = new SurveyMissingValues(self::$anketa);
|
self::$smv = new SurveyMissingValues(self::$anketa);
|
||||||
|
@ -137,8 +137,6 @@ class SurveyAktivnost{
|
|||||||
|
|
||||||
if ($type == 'pages')
|
if ($type == 'pages')
|
||||||
$time_edit = 'srv_user_grupa_active.time_edit';
|
$time_edit = 'srv_user_grupa_active.time_edit';
|
||||||
// ker je time_edit vcasih 0000-00-00 bi mogli v teh primerih pobrat time_insert
|
|
||||||
// $time_edit = 'srv_user_grupa'.$this->db_table.'.time_insert';
|
|
||||||
elseif ($type == 'users')
|
elseif ($type == 'users')
|
||||||
$time_edit = 'srv_user.time_edit';
|
$time_edit = 'srv_user.time_edit';
|
||||||
elseif ($type=='analiza')
|
elseif ($type=='analiza')
|
||||||
|
@ -24,9 +24,7 @@ class SurveyAppendMerge {
|
|||||||
|
|
||||||
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function display ($merge = false) {
|
function display ($merge = false) {
|
||||||
|
@ -24,8 +24,7 @@ class SurveyConnect {
|
|||||||
|
|
||||||
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ajax () {
|
function ajax () {
|
||||||
@ -111,7 +110,24 @@ class SurveyConnect {
|
|||||||
if (!$subsql) echo mysqli_error($GLOBALS['connect_db']);
|
if (!$subsql) echo mysqli_error($GLOBALS['connect_db']);
|
||||||
while ($subrow = mysqli_fetch_assoc($subsql)) {
|
while ($subrow = mysqli_fetch_assoc($subsql)) {
|
||||||
|
|
||||||
$db_table = ($subrow['db_table'] == 1) ? '_active' : '';
|
switch($subrow['db_table']){
|
||||||
|
|
||||||
|
// Arhivska 1
|
||||||
|
case '0':
|
||||||
|
$db_table = '_archive1';
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Arhivska 2
|
||||||
|
case '2':
|
||||||
|
$db_table = '_archive2';
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Aktivna anketa
|
||||||
|
case '1':
|
||||||
|
default:
|
||||||
|
$db_table = '_active';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$subsql1 = sisplet_query("SELECT d.* FROM srv_data_vrednost".$db_table." d, srv_vrednost v, srv_user u WHERE d.spr_id='$subrow[id]' AND d.vre_id=v.id AND v.variable='$unikat' AND u.id=d.usr_id AND u.deleted='0'");
|
$subsql1 = sisplet_query("SELECT d.* FROM srv_data_vrednost".$db_table." d, srv_vrednost v, srv_user u WHERE d.spr_id='$subrow[id]' AND d.vre_id=v.id AND v.variable='$unikat' AND u.id=d.usr_id AND u.deleted='0'");
|
||||||
if (!$subsql1) echo mysqli_error($GLOBALS['connect_db']);
|
if (!$subsql1) echo mysqli_error($GLOBALS['connect_db']);
|
||||||
|
@ -29,9 +29,8 @@ class SurveyCustomReport {
|
|||||||
|
|
||||||
// polovimo vrsto tabel (aktivne / neaktivne)
|
// polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->ank_id);
|
SurveyInfo :: getInstance()->SurveyInit($this->ank_id);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
|
||||||
$this->db_table = '_active';
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
}
|
|
||||||
|
|
||||||
// Inicializiramo in polovimo nastavitve missing profila
|
// Inicializiramo in polovimo nastavitve missing profila
|
||||||
SurveyStatusProfiles::Init($this->ank_id);
|
SurveyStatusProfiles::Init($this->ank_id);
|
||||||
|
@ -794,7 +794,7 @@ class SurveyDiagnostics
|
|||||||
}
|
}
|
||||||
if (count($spr_id) > 0) {
|
if (count($spr_id) > 0) {
|
||||||
|
|
||||||
$db_table = ($this->surveyInfo['db_table'] == 1) ? '_active' : '';
|
$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
|
|
||||||
#preštejemo komentarje uporabnikov na vprašanja
|
#preštejemo komentarje uporabnikov na vprašanja
|
||||||
# srv_data_text where spr_id = 0 AND vre_id IN (id-ji spremenljivk)
|
# srv_data_text where spr_id = 0 AND vre_id IN (id-ji spremenljivk)
|
||||||
|
@ -87,8 +87,7 @@ class SurveyExport
|
|||||||
$this->survey = SurveyInfo::getInstance()->getSurveyRow();
|
$this->survey = SurveyInfo::getInstance()->getSurveyRow();
|
||||||
|
|
||||||
# aktivne tabele
|
# aktivne tabele
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
// Preverimo ce ima user dostop
|
// Preverimo ce ima user dostop
|
||||||
$d = new Dostop();
|
$d = new Dostop();
|
||||||
@ -820,7 +819,7 @@ class SurveyExport
|
|||||||
$_max_text_missing_chars = max($_max_text_missing_chars, strlen($mkey . ': '. $missing));
|
$_max_text_missing_chars = max($_max_text_missing_chars, strlen($mkey . ': '. $missing));
|
||||||
$_max_number_missing_chars = max($_max_number_missing_chars, strlen($mkey));
|
$_max_number_missing_chars = max($_max_number_missing_chars, strlen($mkey));
|
||||||
}
|
}
|
||||||
$maxLengthForSpr = self::create_array_SPSS(max($_max_text_missing_chars,$_max_number_missing_chars));
|
$maxLengthForSpr = $this->create_array_SPSS(max($_max_text_missing_chars,$_max_number_missing_chars));
|
||||||
//$resultString .= .NEW_LINE;
|
//$resultString .= .NEW_LINE;
|
||||||
$resultString = $lang['srv_spss_export_base_instructions'];
|
$resultString = $lang['srv_spss_export_base_instructions'];
|
||||||
$resultString .= NEW_LINE.'.'.NEW_LINE.NEW_LINE;
|
$resultString .= NEW_LINE.'.'.NEW_LINE.NEW_LINE;
|
||||||
@ -1361,18 +1360,15 @@ class SurveyExport
|
|||||||
private function create_array_SPSS($max_missing) {
|
private function create_array_SPSS($max_missing) {
|
||||||
$array_SPSS = array();
|
$array_SPSS = array();
|
||||||
|
|
||||||
$db_table = ($this->survey['db_table'] == 1) ? '_active' : '';
|
|
||||||
|
|
||||||
# poberemo max dolžine iz srv_data_text max(text1,text2)
|
# poberemo max dolžine iz srv_data_text max(text1,text2)
|
||||||
$str_query = 'SELECT dt.spr_id, MAX(LENGTH(dt.text)) AS length, MAX(LENGTH(dt.text2)) AS length2 FROM srv_data_text'.$db_table.' dt, srv_grupa g, srv_spremenljivka s WHERE dt.spr_id = s.id AND s.gru_id=g.id AND g.ank_id='.$this->sid.' GROUP BY dt.spr_id';
|
$str_query = 'SELECT dt.spr_id, MAX(LENGTH(dt.text)) AS length, MAX(LENGTH(dt.text2)) AS length2 FROM srv_data_text'.$this->db_table.' dt, srv_grupa g, srv_spremenljivka s WHERE dt.spr_id = s.id AND s.gru_id=g.id AND g.ank_id='.$this->sid.' GROUP BY dt.spr_id';
|
||||||
$_qry_SPSS = sisplet_query($str_query);
|
$_qry_SPSS = sisplet_query($str_query);
|
||||||
while (list($spr_id,$text,$text2) = mysqli_fetch_row($_qry_SPSS)) {
|
while (list($spr_id,$text,$text2) = mysqli_fetch_row($_qry_SPSS)) {
|
||||||
$array_SPSS[$spr_id] = max((int)$text,(int)$text2,$max_missing);
|
$array_SPSS[$spr_id] = max((int)$text,(int)$text2,$max_missing);
|
||||||
}
|
}
|
||||||
$str_query = 'SELECT dt.spr_id, MAX(LENGTH(dt.text)) AS length FROM srv_data_textgrid'.$db_table.' AS dt, srv_grupa g, srv_spremenljivka s WHERE dt.spr_id = s.id AND s.gru_id=g.id AND g.ank_id='.$this->sid.' GROUP BY dt.spr_id';
|
$str_query = 'SELECT dt.spr_id, MAX(LENGTH(dt.text)) AS length FROM srv_data_textgrid'.$this->db_table.' AS dt, srv_grupa g, srv_spremenljivka s WHERE dt.spr_id = s.id AND s.gru_id=g.id AND g.ank_id='.$this->sid.' GROUP BY dt.spr_id';
|
||||||
$_qry_SPSS = sisplet_query($str_query);
|
$_qry_SPSS = sisplet_query($str_query);
|
||||||
while (list($spr_id,$text) = mysqli_fetch_row($_qry_SPSS)) {
|
while (list($spr_id,$text) = mysqli_fetch_row($_qry_SPSS)) {
|
||||||
#$this->_array_SPSS[$spr_id]['text2'] = ((int)$text < $this->MISSING_MAX_LENGTH ? $this->MISSING_MAX_LENGTH :$text);
|
|
||||||
$array_SPSS[$spr_id] = max((int)$text,$array_SPSS[$spr_id],$max_missing);
|
$array_SPSS[$spr_id] = max((int)$text,$array_SPSS[$spr_id],$max_missing);
|
||||||
}
|
}
|
||||||
return $array_SPSS;
|
return $array_SPSS;
|
||||||
|
@ -847,5 +847,33 @@ class SurveyInfo
|
|||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Vrnemo pripeto ime tabele s podatki ce gre za arhivsko ali aktivno anketo (_active, archive1, archive2...)
|
||||||
|
public static function getSurveyArchiveDBString() {
|
||||||
|
|
||||||
|
$db_table = self::getSurveyColumn('db_table');
|
||||||
|
|
||||||
|
switch($db_table){
|
||||||
|
|
||||||
|
// Arhivska 1
|
||||||
|
case '0':
|
||||||
|
$db_table_string = '_archive1';
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Arhivska 2
|
||||||
|
case '2':
|
||||||
|
$db_table_string = '_archive2';
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Aktivna anketa
|
||||||
|
case '1':
|
||||||
|
default:
|
||||||
|
$db_table_string = '_active';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $db_table_string;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
@ -57,9 +57,8 @@ class SurveyParaAnalysis{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
|
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
|
||||||
|
|
||||||
Common::deletePreviewData($this->anketa);
|
Common::deletePreviewData($this->anketa);
|
||||||
|
@ -27,8 +27,7 @@ class SurveyPostProcess {
|
|||||||
|
|
||||||
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
#inicializiramo class za datoteke
|
#inicializiramo class za datoteke
|
||||||
$this->SDF = SurveyDataFile::get_instance();
|
$this->SDF = SurveyDataFile::get_instance();
|
||||||
|
@ -7,11 +7,10 @@ class SurveyRecoding
|
|||||||
|
|
||||||
function __construct($anketa) {
|
function __construct($anketa) {
|
||||||
$this->anketa = $anketa;
|
$this->anketa = $anketa;
|
||||||
|
|
||||||
SurveyInfo::getInstance()->SurveyInit($anketa);
|
SurveyInfo::getInstance()->SurveyInit($anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
|
||||||
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Ajax() {
|
function Ajax() {
|
||||||
|
@ -51,9 +51,8 @@ class SurveyReminderTracking{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
|
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
|
||||||
|
|
||||||
Common::deletePreviewData($this->anketa);
|
Common::deletePreviewData($this->anketa);
|
||||||
|
@ -434,7 +434,7 @@ class SurveyRespondents {
|
|||||||
global $site_path, $site_url, $lang;
|
global $site_path, $site_url, $lang;
|
||||||
|
|
||||||
SurveyInfo::getInstance()->SurveyInit(self::getSurveyId());
|
SurveyInfo::getInstance()->SurveyInit(self::getSurveyId());
|
||||||
$db_table = (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) ? '_active' : '';
|
$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
|
|
||||||
echo '<span>'.$lang['srv_respondents_added_respondents'].':</span>';
|
echo '<span>'.$lang['srv_respondents_added_respondents'].':</span>';
|
||||||
echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="' . $site_url . 'admin/survey/index.php?anketa='.self::getSurveyId().'&a=email&m=usermailing_setting" ><span>'.$lang['forward'].'</span></a></span></span>';
|
echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="' . $site_url . 'admin/survey/index.php?anketa='.self::getSurveyId().'&a=email&m=usermailing_setting" ><span>'.$lang['forward'].'</span></a></span></span>';
|
||||||
@ -669,7 +669,7 @@ class SurveyRespondents {
|
|||||||
global $admin_type;
|
global $admin_type;
|
||||||
|
|
||||||
SurveyInfo::getInstance()->SurveyInit(self::getSurveyId());
|
SurveyInfo::getInstance()->SurveyInit(self::getSurveyId());
|
||||||
$db_table = (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) ? '_active' : '';
|
$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
|
|
||||||
// preverimo potrebne sistemske variable
|
// preverimo potrebne sistemske variable
|
||||||
// tu je lahko vejica
|
// tu je lahko vejica
|
||||||
|
@ -140,8 +140,7 @@ class SurveyStatistic {
|
|||||||
|
|
||||||
# poiščemo aktivno anketo
|
# poiščemo aktivno anketo
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->getSurveyId());
|
SurveyInfo :: getInstance()->SurveyInit($this->getSurveyId());
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
# nastavimo spremenljivko ali imamo vse default vrednosti
|
# nastavimo spremenljivko ali imamo vse default vrednosti
|
||||||
$this->isDefaultFilters = true;
|
$this->isDefaultFilters = true;
|
||||||
|
@ -3472,7 +3472,7 @@ class SurveyTelephone {
|
|||||||
sisplet_query($strInsert);
|
sisplet_query($strInsert);
|
||||||
|
|
||||||
# vstavimo v srv_data_text
|
# vstavimo v srv_data_text
|
||||||
$db_table = (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) ? '_active' : '';
|
$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
if (count($strInsertDataText) > 0) {
|
if (count($strInsertDataText) > 0) {
|
||||||
$strInsert = "INSERT INTO srv_data_text".$db_table." (spr_id, vre_id, text, usr_id) VALUES ";
|
$strInsert = "INSERT INTO srv_data_text".$db_table." (spr_id, vre_id, text, usr_id) VALUES ";
|
||||||
$strInsert .= implode(',',$strInsertDataText);
|
$strInsert .= implode(',',$strInsertDataText);
|
||||||
|
@ -15,9 +15,7 @@ class SurveyTextAnalysis{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo 'Invalid Survey ID!';
|
echo 'Invalid Survey ID!';
|
||||||
|
@ -51,9 +51,8 @@ class SurveyUsableResp{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
|
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
|
||||||
|
|
||||||
Common::deletePreviewData($this->anketa);
|
Common::deletePreviewData($this->anketa);
|
||||||
|
@ -31,8 +31,7 @@ class Vprasanje {
|
|||||||
|
|
||||||
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('expanded') == 1)
|
if (SurveyInfo::getInstance()->getSurveyColumn('expanded') == 1)
|
||||||
$this->expanded = 1;
|
$this->expanded = 1;
|
||||||
|
@ -31,8 +31,7 @@ class VprasanjeInline {
|
|||||||
|
|
||||||
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('expanded') == 1)
|
if (SurveyInfo::getInstance()->getSurveyColumn('expanded') == 1)
|
||||||
$this->expanded = 1;
|
$this->expanded = 1;
|
||||||
|
@ -196,9 +196,7 @@ class SurveyAnalysis {
|
|||||||
|
|
||||||
UserSetting :: getInstance()->Init($global_user_id);
|
UserSetting :: getInstance()->Init($global_user_id);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
self::$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
self::$db_table = '_active';
|
|
||||||
}
|
|
||||||
|
|
||||||
# nastavimo vse filtre
|
# nastavimo vse filtre
|
||||||
self::setUpFilter();
|
self::setUpFilter();
|
||||||
|
@ -28,9 +28,8 @@ class SurveyAnalysisHelper {
|
|||||||
self::$anketa = $anketa;
|
self::$anketa = $anketa;
|
||||||
|
|
||||||
SurveyInfo::getInstance()->SurveyInit(self::$anketa);
|
SurveyInfo::getInstance()->SurveyInit(self::$anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
|
||||||
self::$db_table = '_active';
|
self::$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,9 +49,8 @@ class SurveyBreak
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->sid);
|
SurveyInfo :: getInstance()->SurveyInit($this->sid);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
|
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
|
||||||
|
|
||||||
#inicializiramo class za datoteke
|
#inicializiramo class za datoteke
|
||||||
|
@ -104,9 +104,8 @@ class SurveyCrosstabs {
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->sid);
|
SurveyInfo :: getInstance()->SurveyInit($this->sid);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
|
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
|
||||||
|
|
||||||
# Inicializiramo in polovimo nastavitve missing profila
|
# Inicializiramo in polovimo nastavitve missing profila
|
||||||
|
@ -15,20 +15,20 @@ class SurveyEditsAnalysis{
|
|||||||
|
|
||||||
|
|
||||||
function __construct($anketa){
|
function __construct($anketa){
|
||||||
if ((int)$anketa > 0){
|
|
||||||
|
|
||||||
$this->anketa = $anketa;
|
if ((int)$anketa > 0){
|
||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
$this->anketa = $anketa;
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
$this->db_table = '_active';
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
}
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo 'Invalid Survey ID!';
|
|
||||||
exit();
|
echo 'Invalid Survey ID!';
|
||||||
}
|
exit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,9 +41,7 @@ class SurveyMeans{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->sid);
|
SurveyInfo :: getInstance()->SurveyInit($this->sid);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
|
|
||||||
# Inicializiramo in polovimo nastavitve missing profila
|
# Inicializiramo in polovimo nastavitve missing profila
|
||||||
SurveyStatusProfiles::Init($this->sid);
|
SurveyStatusProfiles::Init($this->sid);
|
||||||
|
@ -74,9 +74,7 @@ class SurveyMultiCrosstabs {
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->ank_id);
|
SurveyInfo :: getInstance()->SurveyInit($this->ank_id);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
|
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
|
||||||
|
|
||||||
|
@ -37,10 +37,7 @@ class SurveyTTest
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->sid);
|
SurveyInfo :: getInstance()->SurveyInit($this->sid);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Inicializiramo in polovimo nastavitve missing profila
|
# Inicializiramo in polovimo nastavitve missing profila
|
||||||
SurveyStatusProfiles::Init($this->sid);
|
SurveyStatusProfiles::Init($this->sid);
|
||||||
|
@ -189,11 +189,10 @@ class SurveyDataCollect{
|
|||||||
$qry_survey = sisplet_query("SELECT *, UNIX_TIMESTAMP(edit_time) AS srv_edit_time FROM srv_anketa WHERE id='".$this->sid."'");
|
$qry_survey = sisplet_query("SELECT *, UNIX_TIMESTAMP(edit_time) AS srv_edit_time FROM srv_anketa WHERE id='".$this->sid."'");
|
||||||
$this->survey = mysqli_fetch_assoc($qry_survey);
|
$this->survey = mysqli_fetch_assoc($qry_survey);
|
||||||
|
|
||||||
|
SurveyInfo::getInstance()->SurveyInit($this->sid);
|
||||||
|
|
||||||
// Aktivne tabele za podatke v bazi
|
// Aktivne tabele za podatke v bazi
|
||||||
if ((int)$this->survey['db_table'] == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
else
|
|
||||||
$this->db_table = '';
|
|
||||||
|
|
||||||
// Zadnji cas editiranja ankete
|
// Zadnji cas editiranja ankete
|
||||||
$this->max_anketa_time = (int)$this->survey['srv_edit_time'];
|
$this->max_anketa_time = (int)$this->survey['srv_edit_time'];
|
||||||
|
@ -165,8 +165,7 @@ class SurveyDataDisplay{
|
|||||||
self::$survey = SurveyInfo::getInstance()->getSurveyRow();
|
self::$survey = SurveyInfo::getInstance()->getSurveyRow();
|
||||||
|
|
||||||
# aktivne tabele
|
# aktivne tabele
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
self::$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
self::$db_table = '_active';
|
|
||||||
|
|
||||||
# ali je anketa tipa SN - social network
|
# ali je anketa tipa SN - social network
|
||||||
self::$is_social_network = (SurveyInfo::getInstance()->checkSurveyModule('social_network')) ? true : false;
|
self::$is_social_network = (SurveyInfo::getInstance()->checkSurveyModule('social_network')) ? true : false;
|
||||||
@ -3050,11 +3049,9 @@ class SurveyDataDisplay{
|
|||||||
echo '<td class="right">'.$text.'</td></tr>';
|
echo '<td class="right">'.$text.'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $admin_type <= 1) {
|
if ( $admin_type <= 1) {
|
||||||
|
|
||||||
echo '<tr><td class="left">'.$lang['srv_sc_txt1'].':</td>';
|
echo '<tr><td class="left">'.$lang['srv_sc_txt1'].':</td>';
|
||||||
echo '<td class="right"><a href="#" onclick="sc_display(\''.self::$usr_id.'\'); return false;">'.$lang['srv_sc_txt2'].'</a></td></tr>';
|
echo '<td class="right"><a href="#" onclick="sc_display(\''.self::$usr_id.'\'); return false;">'.$lang['srv_sc_txt2'].'</a></td></tr>';
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,8 +44,7 @@ class SurveyInvitationsNew {
|
|||||||
|
|
||||||
SurveyInfo::SurveyInit($this->sid);
|
SurveyInfo::SurveyInit($this->sid);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
$this->surveySettings = SurveyInfo::getInstance()->getSurveyRow();
|
$this->surveySettings = SurveyInfo::getInstance()->getSurveyRow();
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ class SurveyUnsubscribe {
|
|||||||
|
|
||||||
$anketa = self::$sid;
|
$anketa = self::$sid;
|
||||||
|
|
||||||
$db_table = (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) ? '_active' : '';
|
$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
|
|
||||||
$lang_id = (int)$_GET['language'];
|
$lang_id = (int)$_GET['language'];
|
||||||
if ($lang_id != null) $_lang = '_'.$lang_id; else $_lang = '';
|
if ($lang_id != null) $_lang = '_'.$lang_id; else $_lang = '';
|
||||||
|
@ -254,8 +254,7 @@ class SurveyInvitationsSqualo {
|
|||||||
// če mamo personalizirana email vabila, userje dodamo v bazo
|
// če mamo personalizirana email vabila, userje dodamo v bazo
|
||||||
if ($individual == 1) {
|
if ($individual == 1) {
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$db_table = '_active';
|
|
||||||
|
|
||||||
$inv_variables_link = array('email'=>'email','geslo'=>'password','ime'=>'firstname','priimek'=>'lastname','naziv'=>'salutation','telefon'=>'phone','drugo'=>'custom','odnos'=>'relation','last_status'=>'last_status','sent'=>'sent','responded'=>'responded','unsubscribed'=>'unsubscribed');
|
$inv_variables_link = array('email'=>'email','geslo'=>'password','ime'=>'firstname','priimek'=>'lastname','naziv'=>'salutation','telefon'=>'phone','drugo'=>'custom','odnos'=>'relation','last_status'=>'last_status','sent'=>'sent','responded'=>'responded','unsubscribed'=>'unsubscribed');
|
||||||
|
|
||||||
|
@ -23,8 +23,7 @@ class TrackingClass
|
|||||||
|
|
||||||
# poiščemo aktivno anketo
|
# poiščemo aktivno anketo
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
|
|
||||||
if ($_GET['m'] == 'tracking_data')
|
if ($_GET['m'] == 'tracking_data')
|
||||||
$this->sub = 'data';
|
$this->sub = 'data';
|
||||||
@ -322,7 +321,7 @@ class TrackingClass
|
|||||||
|
|
||||||
# poiščemo aktivno anketo
|
# poiščemo aktivno anketo
|
||||||
SurveyInfo :: getInstance()->SurveyInit($anketa);
|
SurveyInfo :: getInstance()->SurveyInit($anketa);
|
||||||
$db_table = (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) ? '_active' : '';
|
$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
|
|
||||||
$get = '';
|
$get = '';
|
||||||
foreach ($_GET AS $key => $val) {
|
foreach ($_GET AS $key => $val) {
|
||||||
|
@ -95,9 +95,7 @@ class LatexSurvey{
|
|||||||
//if ( SurveyInfo::getInstance()->SurveyInit($this->anketa['id']) && $this->init())
|
//if ( SurveyInfo::getInstance()->SurveyInit($this->anketa['id']) && $this->init())
|
||||||
if ( SurveyInfo::getInstance()->SurveyInit($this->anketa) )
|
if ( SurveyInfo::getInstance()->SurveyInit($this->anketa) )
|
||||||
{
|
{
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1){
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return false;
|
return false;
|
||||||
|
@ -102,8 +102,7 @@ class LatexSurveyElement{
|
|||||||
{
|
{
|
||||||
SurveyUserSetting::getInstance()->Init($anketa, $global_user_id);
|
SurveyUserSetting::getInstance()->Init($anketa, $global_user_id);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return false;
|
return false;
|
||||||
|
@ -63,9 +63,7 @@ class XmlSurvey{
|
|||||||
//if ( SurveyInfo::getInstance()->SurveyInit($this->anketa['id']) && $this->init())
|
//if ( SurveyInfo::getInstance()->SurveyInit($this->anketa['id']) && $this->init())
|
||||||
if ( SurveyInfo::getInstance()->SurveyInit($this->anketa) )
|
if ( SurveyInfo::getInstance()->SurveyInit($this->anketa) )
|
||||||
{
|
{
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1){
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return false;
|
return false;
|
||||||
|
@ -57,8 +57,7 @@ class XmlSurveyElement{
|
|||||||
{
|
{
|
||||||
SurveyUserSetting::getInstance()->Init($anketa, $global_user_id);
|
SurveyUserSetting::getInstance()->Init($anketa, $global_user_id);
|
||||||
|
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return false;
|
return false;
|
||||||
|
@ -69,9 +69,7 @@ class Evalvacija{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Nastavimo clanico kateri pripada anketa
|
// Nastavimo clanico kateri pripada anketa
|
||||||
$this->fakulteta = $this->getFakultetaId($anketa);
|
$this->fakulteta = $this->getFakultetaId($anketa);
|
||||||
|
@ -19,9 +19,7 @@ class Survey360{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,9 +19,7 @@ class Survey3601ka{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,9 +19,7 @@ class SurveyBORZA{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,9 +39,7 @@ class EvoliForm {
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,9 +21,7 @@ class SurveyEmployMeter{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,9 +21,7 @@ class SurveyEvoli{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,9 +30,7 @@ class SurveyTeamMeter{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Nastavimo se ustrezne parametre za skripto glede na tip izvoza (ime skripte, pdf-ja, csv-ja)
|
// Nastavimo se ustrezne parametre za skripto glede na tip izvoza (ime skripte, pdf-ja, csv-ja)
|
||||||
$this->setExecuteParams();
|
$this->setExecuteParams();
|
||||||
|
@ -26,9 +26,7 @@ class SurveyMFDPS{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->cacheData();
|
$this->cacheData();
|
||||||
|
@ -25,9 +25,7 @@ class SurveyMJU{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,9 +20,7 @@ class SurveyMJUEnote{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,9 +45,7 @@ class SurveyNIJZ{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
die();
|
die();
|
||||||
|
@ -19,9 +19,7 @@ class SurveySpeedIndex{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,9 +54,7 @@ class HierarhijaAnalysis
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
SurveyInfo::getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
|
|
||||||
# Inicializiramo in polovimo nastavitve missing profila
|
# Inicializiramo in polovimo nastavitve missing profila
|
||||||
SurveyStatusProfiles::Init($this->anketa);
|
SurveyStatusProfiles::Init($this->anketa);
|
||||||
|
@ -2087,8 +2087,7 @@ class Hierarhija {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$db_table = (SurveyInfo::getInstance()
|
$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
->getSurveyColumn('db_table') == 1) ? '_active' : '';
|
|
||||||
|
|
||||||
// tukaj pridobimo podatke o anketi za določeno strukturo
|
// tukaj pridobimo podatke o anketi za določeno strukturo
|
||||||
// preverimov prvi in zadnji nivo
|
// preverimov prvi in zadnji nivo
|
||||||
|
@ -41,10 +41,7 @@ class HierarhijaHelper
|
|||||||
// V kolikor smo na katerikoli strani, potem gledamo po piškotkih
|
// V kolikor smo na katerikoli strani, potem gledamo po piškotkih
|
||||||
if (isset($get->{'survey-'.$ank_id})) {
|
if (isset($get->{'survey-'.$ank_id})) {
|
||||||
|
|
||||||
$active = '';
|
$active = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
|
||||||
$active = '_active';
|
|
||||||
}
|
|
||||||
|
|
||||||
// ID uporabnika, glede na njegov piškot
|
// ID uporabnika, glede na njegov piškot
|
||||||
$srv_user = sisplet_query("SELECT id FROM srv_user WHERE cookie='".$get->{'survey-'.$ank_id}."'", "obj")->id;
|
$srv_user = sisplet_query("SELECT id FROM srv_user WHERE cookie='".$get->{'survey-'.$ank_id}."'", "obj")->id;
|
||||||
|
@ -313,8 +313,7 @@ class HierarhijaIzvoz {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$db_table = (SurveyInfo::getInstance()
|
$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
->getSurveyColumn('db_table') == 1) ? '_active' : '';
|
|
||||||
|
|
||||||
// tukaj pridobimo podatke o anketi za določeno strukturo
|
// tukaj pridobimo podatke o anketi za določeno strukturo
|
||||||
// preverimov prvi in zadnji nivo
|
// preverimov prvi in zadnji nivo
|
||||||
|
@ -50,9 +50,7 @@ class SurveyKakovost{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
|
|
||||||
SurveyAnalysisHelper::getInstance()->Init($this->anketa);
|
SurveyAnalysisHelper::getInstance()->Init($this->anketa);
|
||||||
|
|
||||||
|
@ -20,9 +20,7 @@ class SurveyPanel{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,9 +50,7 @@ class SurveyUporabnost{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
|
|
||||||
SurveyAnalysisHelper::getInstance()->Init($this->anketa);
|
SurveyAnalysisHelper::getInstance()->Init($this->anketa);
|
||||||
|
|
||||||
|
@ -20,9 +20,7 @@ class SurveyVizualizacija{
|
|||||||
|
|
||||||
# polovimo vrsto tabel (aktivne / neaktivne)
|
# polovimo vrsto tabel (aktivne / neaktivne)
|
||||||
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
SurveyInfo :: getInstance()->SurveyInit($this->anketa);
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
|
$this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
$this->db_table = '_active';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,9 +106,7 @@ if ($_GET['a'] == 'ankete') {
|
|||||||
if (mysqli_num_rows($sql) > 0) {
|
if (mysqli_num_rows($sql) > 0) {
|
||||||
|
|
||||||
$row = mysqli_fetch_array($sql);
|
$row = mysqli_fetch_array($sql);
|
||||||
|
|
||||||
if ($row['db_table'] == 1) $db_table = '_active'; else $db_table = '';
|
|
||||||
|
|
||||||
echo $row['id'].delimiter;
|
echo $row['id'].delimiter;
|
||||||
echo $row['insert_uid'].delimiter;
|
echo $row['insert_uid'].delimiter;
|
||||||
echo $row['a_first'].delimiter;
|
echo $row['a_first'].delimiter;
|
||||||
@ -232,7 +230,24 @@ if ($_GET['a'] == 'ankete') {
|
|||||||
|
|
||||||
while ($row = mysqli_fetch_array($sql)) {
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
|
|
||||||
if ($row['db_table'] == 1) $db_table = '_active'; else $db_table = '';
|
switch($row['db_table']){
|
||||||
|
|
||||||
|
// Arhivska 1
|
||||||
|
case '0':
|
||||||
|
$db_table = '_archive1';
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Arhivska 2
|
||||||
|
case '2':
|
||||||
|
$db_table = '_archive2';
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Aktivna anketa
|
||||||
|
case '1':
|
||||||
|
default:
|
||||||
|
$db_table = '_active';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
echo $row['id'].delimiter;
|
echo $row['id'].delimiter;
|
||||||
echo $row['uid'].delimiter;
|
echo $row['uid'].delimiter;
|
||||||
|
@ -99,8 +99,8 @@ class InitClass extends Controller
|
|||||||
|
|
||||||
// polovimo podatke o anketi
|
// polovimo podatke o anketi
|
||||||
SurveyInfo::getInstance()->SurveyInit(get('anketa'));
|
SurveyInfo::getInstance()->SurveyInit(get('anketa'));
|
||||||
if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
save('db_table', '_active');
|
save('db_table', $db_table);
|
||||||
|
|
||||||
$rowa = SurveyInfo::getInstance()->getSurveyRow();
|
$rowa = SurveyInfo::getInstance()->getSurveyRow();
|
||||||
|
|
||||||
@ -453,8 +453,8 @@ class InitClass extends Controller
|
|||||||
|
|
||||||
// polovimo podatke o anketi
|
// polovimo podatke o anketi
|
||||||
\SurveyInfo::getInstance()->SurveyInit(get('anketa'));
|
\SurveyInfo::getInstance()->SurveyInit(get('anketa'));
|
||||||
if (\SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
|
$db_table = \SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
save('db_table', '_active');
|
save('db_table', $db_table);
|
||||||
|
|
||||||
\SurveySetting::getInstance()->Init(get('anketa'));
|
\SurveySetting::getInstance()->Init(get('anketa'));
|
||||||
save('usr_id', $_REQUEST['usr_id']);
|
save('usr_id', $_REQUEST['usr_id']);
|
||||||
|
@ -138,8 +138,9 @@ class StatisticController extends Controller
|
|||||||
$sqla = sisplet_query("SELECT starts, expire, statistics, db_table FROM srv_anketa WHERE id ='$row2[ank_id]'");
|
$sqla = sisplet_query("SELECT starts, expire, statistics, db_table FROM srv_anketa WHERE id ='$row2[ank_id]'");
|
||||||
$rowa = mysqli_fetch_array($sqla);
|
$rowa = mysqli_fetch_array($sqla);
|
||||||
|
|
||||||
if ($rowa['db_table'] == 1)
|
SurveyInfo::getInstance()->SurveyInit($row2['ank_id']);
|
||||||
save('db_table', '_active');
|
$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
|
||||||
|
save('db_table', $db_table);
|
||||||
|
|
||||||
$text = $rowa['statistics'];
|
$text = $rowa['statistics'];
|
||||||
|
|
||||||
|
@ -9500,15 +9500,32 @@ INSERT INTO srv_help (help, what) VALUES ('Operatorji', 'srv_if_operator');
|
|||||||
|
|
||||||
UPDATE misc SET value='21.05.25' WHERE what="version";
|
UPDATE misc SET value='21.05.25' WHERE what="version";
|
||||||
|
|
||||||
|
|
||||||
# Drupal verzija je bila posodobljena in vpišemo na 1ka.si in te
|
# Drupal verzija je bila posodobljena in vpišemo na 1ka.si in te
|
||||||
UPDATE misc SET value='7.81' WHERE what="drupal version";
|
UPDATE misc SET value='7.81' WHERE what="drupal version";
|
||||||
UPDATE misc SET value='21.06.10' WHERE what="version";
|
UPDATE misc SET value='21.06.10' WHERE what="version";
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO srv_help (what, help) VALUES ('srv_export_full_meta', 'Export data and paradata');
|
INSERT INTO srv_help (what, help) VALUES ('srv_export_full_meta', 'Export data and paradata');
|
||||||
UPDATE misc SET value='21.07.19' WHERE what="version";
|
|
||||||
|
|
||||||
UPDATE srv_help SET help='Izvozi podatke in parapodatke' WHERE what='srv_export_full_meta' AND lang='1';
|
UPDATE srv_help SET help='Izvozi podatke in parapodatke' WHERE what='srv_export_full_meta' AND lang='1';
|
||||||
INSERT INTO srv_help (what, help, lang) VALUES ('srv_export_full_meta', 'Export data and paradata', '2');
|
INSERT INTO srv_help (what, help, lang) VALUES ('srv_export_full_meta', 'Export data and paradata', '2');
|
||||||
UPDATE misc SET value='21.07.19' WHERE what="version";
|
|
||||||
|
UPDATE misc SET value='21.07.19' WHERE what="version";
|
||||||
|
|
||||||
|
# NOVE ARHIVSKE TABELE - STARE SO PREIMENOVANE IN DODANE DODATNE
|
||||||
|
RENAME TABLE srv_data_vrednost TO srv_data_vrednost_archive1;
|
||||||
|
RENAME TABLE srv_data_text TO srv_data_text_archive1;
|
||||||
|
RENAME TABLE srv_data_grid TO srv_data_grid_archive1;
|
||||||
|
RENAME TABLE srv_data_checkgrid TO srv_data_checkgrid_archive1;
|
||||||
|
RENAME TABLE srv_data_textgrid TO srv_data_textgrid_archive1;
|
||||||
|
RENAME TABLE srv_user_grupa TO srv_user_grupa_archive1;
|
||||||
|
RENAME TABLE srv_tracking TO srv_tracking_archive1;
|
||||||
|
|
||||||
|
CREATE TABLE srv_data_vrednost_archive2 LIKE srv_data_vrednost_archive1;
|
||||||
|
CREATE TABLE srv_data_text_archive2 LIKE srv_data_text_archive1;
|
||||||
|
CREATE TABLE srv_data_grid_archive2 LIKE srv_data_grid_archive1;
|
||||||
|
CREATE TABLE srv_data_checkgrid_archive2 LIKE srv_data_checkgrid_archive1;
|
||||||
|
CREATE TABLE srv_data_textgrid_archive2 LIKE srv_data_textgrid_archive1;
|
||||||
|
CREATE TABLE srv_user_grupa_archive2 LIKE srv_user_grupa_archive1;
|
||||||
|
CREATE TABLE srv_tracking_archive2 LIKE srv_tracking_archive1;
|
||||||
|
|
||||||
|
UPDATE misc SET value='23.07.19' WHERE what="version";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Podatke neaktivnih anket, ki se ze nekaj casa niso spreminjale prenese iz _active tabel v navadne - arhivske tabele
|
* Podatke neaktivnih anket, ki se ze nekaj casa niso spreminjale prenese iz _active tabel v arhivske tabele
|
||||||
*
|
*
|
||||||
* NOVA SKRIPTA ZA TABELE
|
* NOVA SKRIPTA ZA TABELE
|
||||||
*
|
*
|
||||||
@ -30,6 +30,9 @@ $start = (isset($_GET['start'])) ? ' AND id > '.$_GET['start'] : '';
|
|||||||
// Limit stevila anket, ki jih naenkrat arhiviramo
|
// Limit stevila anket, ki jih naenkrat arhiviramo
|
||||||
$limit = (isset($_GET['limit'])) ? $_GET['limit'] : 200;
|
$limit = (isset($_GET['limit'])) ? $_GET['limit'] : 200;
|
||||||
|
|
||||||
|
$archive_table = '2';
|
||||||
|
$archive_table_string = '_archive2';
|
||||||
|
|
||||||
|
|
||||||
// Arhiviramo specificno anketo
|
// Arhiviramo specificno anketo
|
||||||
if($survey_id != ''){
|
if($survey_id != ''){
|
||||||
@ -50,8 +53,10 @@ else{
|
|||||||
}
|
}
|
||||||
if (!$sql) { echo mysqli_error($GLOBALS['connect_db']).' 50'; die(); }
|
if (!$sql) { echo mysqli_error($GLOBALS['connect_db']).' 50'; die(); }
|
||||||
|
|
||||||
|
|
||||||
echo 'Arhiviranje '.mysqli_num_rows($sql).' anket.<hr>';
|
echo 'Arhiviranje '.mysqli_num_rows($sql).' anket.<hr>';
|
||||||
|
|
||||||
|
|
||||||
// Loop po anketah
|
// Loop po anketah
|
||||||
while ($row = mysqli_fetch_array($sql)) {
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
|
|
||||||
@ -84,7 +89,7 @@ while ($row = mysqli_fetch_array($sql)) {
|
|||||||
|
|
||||||
|
|
||||||
// Popravimo anketo med arhivske (ni vec _active)
|
// Popravimo anketo med arhivske (ni vec _active)
|
||||||
$s = sisplet_query("UPDATE srv_anketa SET db_table = '0' WHERE id = '$row[id]'");
|
$s = sisplet_query("UPDATE srv_anketa SET db_table = '".$archive_table."' WHERE id = '$row[id]'");
|
||||||
if (!$s) { echo mysqli_error($GLOBALS['connect_db']).' 70'; die(); }
|
if (!$s) { echo mysqli_error($GLOBALS['connect_db']).' 70'; die(); }
|
||||||
|
|
||||||
|
|
||||||
@ -101,8 +106,8 @@ while ($row = mysqli_fetch_array($sql)) {
|
|||||||
// ARHIVIRANJE srv_user_grupa
|
// ARHIVIRANJE srv_user_grupa
|
||||||
function archive_srv_user_grupa($ank_id){
|
function archive_srv_user_grupa($ank_id){
|
||||||
|
|
||||||
// Vstavimo v arhivsko tabelo (srv_user_grupa)
|
// Vstavimo v arhivsko tabelo (srv_user_grupa_archive2)
|
||||||
$sql1 = sisplet_query("INSERT INTO srv_user_grupa (gru_id, usr_id, time_edit, preskocena)
|
$sql1 = sisplet_query("INSERT INTO srv_user_grupa".$archive_table_string." (gru_id, usr_id, time_edit, preskocena)
|
||||||
SELECT d2.gru_id, d2.usr_id, d2.time_edit, d2.preskocena
|
SELECT d2.gru_id, d2.usr_id, d2.time_edit, d2.preskocena
|
||||||
FROM srv_user_grupa_active d2, srv_grupa g
|
FROM srv_user_grupa_active d2, srv_grupa g
|
||||||
WHERE d2.gru_id = g.id
|
WHERE d2.gru_id = g.id
|
||||||
@ -126,8 +131,8 @@ function archive_srv_data_vrednost($ank_id){
|
|||||||
// Samo za kopiranje ugasnemo foreign key check, ker obstajajo primeri, kjer usr_id ne obstaja
|
// Samo za kopiranje ugasnemo foreign key check, ker obstajajo primeri, kjer usr_id ne obstaja
|
||||||
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
||||||
|
|
||||||
// Vstavimo v arhivsko tabelo (srv_data_vrednost)
|
// Vstavimo v arhivsko tabelo (srv_data_vrednost_archive2)
|
||||||
$sql1 = sisplet_query("INSERT INTO srv_data_vrednost (spr_id, vre_id, usr_id, loop_id)
|
$sql1 = sisplet_query("INSERT INTO srv_data_vrednost".$archive_table_string." (spr_id, vre_id, usr_id, loop_id)
|
||||||
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.loop_id
|
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.loop_id
|
||||||
FROM srv_data_vrednost_active d2, srv_spremenljivka s, srv_grupa g
|
FROM srv_data_vrednost_active d2, srv_spremenljivka s, srv_grupa g
|
||||||
WHERE d2.spr_id = s.id
|
WHERE d2.spr_id = s.id
|
||||||
@ -156,7 +161,7 @@ function archive_srv_data_text($ank_id){
|
|||||||
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
||||||
|
|
||||||
// Vstavimo v arhivsko tabelo (srv_data_text)
|
// Vstavimo v arhivsko tabelo (srv_data_text)
|
||||||
$sql1 = sisplet_query("INSERT INTO srv_data_text (spr_id, vre_id, text, text2, usr_id, loop_id)
|
$sql1 = sisplet_query("INSERT INTO srv_data_text".$archive_table_string." (spr_id, vre_id, text, text2, usr_id, loop_id)
|
||||||
SELECT d2.spr_id, d2.vre_id, d2.text, d2.text2, d2.usr_id, d2.loop_id
|
SELECT d2.spr_id, d2.vre_id, d2.text, d2.text2, d2.usr_id, d2.loop_id
|
||||||
FROM srv_data_text_active d2, srv_spremenljivka s, srv_grupa g
|
FROM srv_data_text_active d2, srv_spremenljivka s, srv_grupa g
|
||||||
WHERE d2.spr_id = s.id
|
WHERE d2.spr_id = s.id
|
||||||
@ -181,7 +186,7 @@ function archive_srv_data_text($ank_id){
|
|||||||
// Samo za kopiranje ugasnemo foreign key check, ker obstajajo primeri, kjer usr_id ne obstaja
|
// Samo za kopiranje ugasnemo foreign key check, ker obstajajo primeri, kjer usr_id ne obstaja
|
||||||
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
||||||
|
|
||||||
$sql1 = sisplet_query("INSERT INTO srv_data_text (spr_id, vre_id, text, text2, usr_id, loop_id)
|
$sql1 = sisplet_query("INSERT INTO srv_data_text".$archive_table_string." (spr_id, vre_id, text, text2, usr_id, loop_id)
|
||||||
SELECT d2.spr_id, d2.vre_id, d2.text, d2.text2, d2.usr_id, d2.loop_id
|
SELECT d2.spr_id, d2.vre_id, d2.text, d2.text2, d2.usr_id, d2.loop_id
|
||||||
FROM srv_data_text_active d2, srv_spremenljivka s, srv_grupa g
|
FROM srv_data_text_active d2, srv_spremenljivka s, srv_grupa g
|
||||||
WHERE d2.spr_id = '0'
|
WHERE d2.spr_id = '0'
|
||||||
@ -212,7 +217,7 @@ function archive_srv_data_grid($ank_id){
|
|||||||
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
||||||
|
|
||||||
// Vstavimo v arhivsko tabelo (srv_data_grid)
|
// Vstavimo v arhivsko tabelo (srv_data_grid)
|
||||||
$sql1 = sisplet_query("INSERT INTO srv_data_grid (spr_id, vre_id, usr_id, grd_id, loop_id)
|
$sql1 = sisplet_query("INSERT INTO srv_data_grid".$archive_table_string." (spr_id, vre_id, usr_id, grd_id, loop_id)
|
||||||
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.grd_id, d2.loop_id
|
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.grd_id, d2.loop_id
|
||||||
FROM srv_data_grid_active d2, srv_spremenljivka s, srv_grupa g
|
FROM srv_data_grid_active d2, srv_spremenljivka s, srv_grupa g
|
||||||
WHERE d2.spr_id = s.id
|
WHERE d2.spr_id = s.id
|
||||||
@ -237,7 +242,7 @@ function archive_srv_data_grid($ank_id){
|
|||||||
// Samo za kopiranje ugasnemo foreign key check, ker obstajajo primeri, kjer usr_id ne obstaja
|
// Samo za kopiranje ugasnemo foreign key check, ker obstajajo primeri, kjer usr_id ne obstaja
|
||||||
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
||||||
|
|
||||||
$sql1 = sisplet_query("INSERT INTO srv_data_grid (spr_id, vre_id, usr_id, grd_id, loop_id)
|
$sql1 = sisplet_query("INSERT INTO srv_data_grid".$archive_table_string." (spr_id, vre_id, usr_id, grd_id, loop_id)
|
||||||
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.grd_id, d2.loop_id
|
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.grd_id, d2.loop_id
|
||||||
FROM srv_data_grid_active d2, srv_spremenljivka s, srv_grupa g, srv_grid_multiple m
|
FROM srv_data_grid_active d2, srv_spremenljivka s, srv_grupa g, srv_grid_multiple m
|
||||||
WHERE d2.spr_id = m.spr_id AND m.parent=s.id
|
WHERE d2.spr_id = m.spr_id AND m.parent=s.id
|
||||||
@ -266,7 +271,7 @@ function archive_srv_data_textgrid($ank_id){
|
|||||||
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
||||||
|
|
||||||
// Vstavimo v arhivsko tabelo (srv_data_textgrid)
|
// Vstavimo v arhivsko tabelo (srv_data_textgrid)
|
||||||
$sql1 = sisplet_query("INSERT INTO srv_data_textgrid (spr_id, vre_id, usr_id, grd_id, text, loop_id)
|
$sql1 = sisplet_query("INSERT INTO srv_data_textgrid".$archive_table_string." (spr_id, vre_id, usr_id, grd_id, text, loop_id)
|
||||||
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.grd_id, d2.text, d2.loop_id
|
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.grd_id, d2.text, d2.loop_id
|
||||||
FROM srv_data_textgrid_active d2, srv_spremenljivka s, srv_grupa g
|
FROM srv_data_textgrid_active d2, srv_spremenljivka s, srv_grupa g
|
||||||
WHERE d2.spr_id = s.id
|
WHERE d2.spr_id = s.id
|
||||||
@ -291,7 +296,7 @@ function archive_srv_data_textgrid($ank_id){
|
|||||||
// Samo za kopiranje ugasnemo foreign key check, ker obstajajo primeri, kjer usr_id ne obstaja
|
// Samo za kopiranje ugasnemo foreign key check, ker obstajajo primeri, kjer usr_id ne obstaja
|
||||||
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
||||||
|
|
||||||
$sql1 = sisplet_query("INSERT INTO srv_data_textgrid (spr_id, vre_id, usr_id, grd_id, text, loop_id)
|
$sql1 = sisplet_query("INSERT INTO srv_data_textgrid".$archive_table_string." (spr_id, vre_id, usr_id, grd_id, text, loop_id)
|
||||||
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.grd_id, d2.text, d2.loop_id
|
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.grd_id, d2.text, d2.loop_id
|
||||||
FROM srv_data_textgrid_active d2, srv_spremenljivka s, srv_grupa g, srv_grid_multiple m
|
FROM srv_data_textgrid_active d2, srv_spremenljivka s, srv_grupa g, srv_grid_multiple m
|
||||||
WHERE d2.spr_id = m.spr_id AND m.parent=s.id
|
WHERE d2.spr_id = m.spr_id AND m.parent=s.id
|
||||||
@ -320,7 +325,7 @@ function archive_srv_data_checkgrid($ank_id){
|
|||||||
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
||||||
|
|
||||||
// Vstavimo v arhivsko tabelo (srv_data_checkgrid)
|
// Vstavimo v arhivsko tabelo (srv_data_checkgrid)
|
||||||
$sql1 = sisplet_query("INSERT INTO srv_data_checkgrid (spr_id, vre_id, usr_id, grd_id, loop_id)
|
$sql1 = sisplet_query("INSERT INTO srv_data_checkgrid".$archive_table_string." (spr_id, vre_id, usr_id, grd_id, loop_id)
|
||||||
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.grd_id, d2.loop_id
|
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.grd_id, d2.loop_id
|
||||||
FROM srv_data_checkgrid_active d2, srv_spremenljivka s, srv_grupa g
|
FROM srv_data_checkgrid_active d2, srv_spremenljivka s, srv_grupa g
|
||||||
WHERE d2.spr_id = s.id
|
WHERE d2.spr_id = s.id
|
||||||
@ -344,7 +349,7 @@ function archive_srv_data_checkgrid($ank_id){
|
|||||||
// Se dodatno za kombinirane tabele
|
// Se dodatno za kombinirane tabele
|
||||||
// Samo za kopiranje ugasnemo foreign key check, ker obstajajo primeri, kjer usr_id ne obstaja
|
// Samo za kopiranje ugasnemo foreign key check, ker obstajajo primeri, kjer usr_id ne obstaja
|
||||||
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
sisplet_query("SET FOREIGN_KEY_CHECKS=0");
|
||||||
$sql1 = sisplet_query("INSERT INTO srv_data_checkgrid (spr_id, vre_id, usr_id, grd_id, loop_id)
|
$sql1 = sisplet_query("INSERT INTO srv_data_checkgrid".$archive_table_string." (spr_id, vre_id, usr_id, grd_id, loop_id)
|
||||||
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.grd_id, d2.loop_id
|
SELECT d2.spr_id, d2.vre_id, d2.usr_id, d2.grd_id, d2.loop_id
|
||||||
FROM srv_data_checkgrid_active d2, srv_spremenljivka s, srv_grupa g, srv_grid_multiple m
|
FROM srv_data_checkgrid_active d2, srv_spremenljivka s, srv_grupa g, srv_grid_multiple m
|
||||||
WHERE d2.spr_id = m.spr_id AND m.parent=s.id
|
WHERE d2.spr_id = m.spr_id AND m.parent=s.id
|
||||||
@ -370,7 +375,7 @@ function archive_srv_data_checkgrid($ank_id){
|
|||||||
function archive_srv_tracking($ank_id){
|
function archive_srv_tracking($ank_id){
|
||||||
|
|
||||||
// Vstavimo v arhivsko tabelo (srv_tracking)
|
// Vstavimo v arhivsko tabelo (srv_tracking)
|
||||||
$sql1 = sisplet_query("INSERT INTO srv_tracking (`ank_id`, `datetime`, `ip`, `user`, `get`, `post`, `status`, `time_seconds`)
|
$sql1 = sisplet_query("INSERT INTO srv_tracking".$archive_table_string." (`ank_id`, `datetime`, `ip`, `user`, `get`, `post`, `status`, `time_seconds`)
|
||||||
SELECT d2.ank_id, d2.datetime, d2.ip, d2.user, d2.get, d2.post, d2.status, d2.time_seconds
|
SELECT d2.ank_id, d2.datetime, d2.ip, d2.user, d2.get, d2.post, d2.status, d2.time_seconds
|
||||||
FROM srv_tracking_active d2
|
FROM srv_tracking_active d2
|
||||||
WHERE d2.ank_id = '$ank_id'
|
WHERE d2.ank_id = '$ank_id'
|
||||||
|
@ -11,20 +11,26 @@ include_once ('../settings.php');
|
|||||||
$struktura = array();
|
$struktura = array();
|
||||||
$podatki = array(
|
$podatki = array(
|
||||||
'srv_user' => array(),
|
'srv_user' => array(),
|
||||||
'srv_data_checkgrid' => array(),
|
'srv_data_checkgrid_archive1' => array(),
|
||||||
|
'srv_data_checkgrid_archive2' => array(),
|
||||||
'srv_data_checkgrid_active' => array(),
|
'srv_data_checkgrid_active' => array(),
|
||||||
'srv_data_glasovanje' => array(),
|
'srv_data_glasovanje' => array(),
|
||||||
'srv_data_grid' => array(),
|
'srv_data_grid_archive1' => array(),
|
||||||
|
'srv_data_grid_archive2' => array(),
|
||||||
'srv_data_grid_active' => array(),
|
'srv_data_grid_active' => array(),
|
||||||
'srv_data_rating' => array(),
|
'srv_data_rating' => array(),
|
||||||
'srv_data_text' => array(),
|
'srv_data_text_archive1' => array(),
|
||||||
|
'srv_data_text_archive2' => array(),
|
||||||
'srv_data_text_active' => array(),
|
'srv_data_text_active' => array(),
|
||||||
'srv_data_textgrid' => array(),
|
'srv_data_textgrid_archive1' => array(),
|
||||||
|
'srv_data_textgrid_archive2' => array(),
|
||||||
'srv_data_textgrid_active' => array(),
|
'srv_data_textgrid_active' => array(),
|
||||||
'srv_data_upload' => array(),
|
'srv_data_upload' => array(),
|
||||||
'srv_data_vrednost' => array(),
|
'srv_data_vrednost_archive1' => array(),
|
||||||
|
'srv_data_vrednost_archive2' => array(),
|
||||||
'srv_data_vrednost_active' => array(),
|
'srv_data_vrednost_active' => array(),
|
||||||
'srv_user_grupa' => array(),
|
'srv_user_grupa_archive1' => array(),
|
||||||
|
'srv_user_grupa_archive2' => array(),
|
||||||
'srv_user_grupa_active' => array());
|
'srv_user_grupa_active' => array());
|
||||||
|
|
||||||
|
|
||||||
@ -102,20 +108,26 @@ if ($handle = opendir($sync_server_path)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$podatki['srv_user'] = array_merge($podatki['srv_user'], $kljuc['srv_user']);
|
$podatki['srv_user'] = array_merge($podatki['srv_user'], $kljuc['srv_user']);
|
||||||
$podatki['srv_data_checkgrid'] = array_merge($podatki['srv_data_checkgrid'], $kljuc['srv_data_checkgrid']);
|
$podatki['srv_data_checkgrid_archive1'] = array_merge($podatki['srv_data_checkgrid_archive1'], $kljuc['srv_data_checkgrid_archive1']);
|
||||||
|
$podatki['srv_data_checkgrid_archive2'] = array_merge($podatki['srv_data_checkgrid_archive2'], $kljuc['srv_data_checkgrid_archive2']);
|
||||||
$podatki['srv_data_checkgrid_active'] = array_merge($podatki['srv_data_checkgrid_active'], $kljuc['srv_data_checkgrid_active']);
|
$podatki['srv_data_checkgrid_active'] = array_merge($podatki['srv_data_checkgrid_active'], $kljuc['srv_data_checkgrid_active']);
|
||||||
$podatki['srv_data_glasovanje'] = array_merge($podatki['srv_data_glasovanje'], $kljuc['srv_data_glasovanje']);
|
$podatki['srv_data_glasovanje'] = array_merge($podatki['srv_data_glasovanje'], $kljuc['srv_data_glasovanje']);
|
||||||
$podatki['srv_data_grid'] = array_merge($podatki['srv_data_grid'], $kljuc['srv_data_grid']);
|
$podatki['srv_data_grid_archive1'] = array_merge($podatki['srv_data_grid_archive1'], $kljuc['srv_data_grid_archive1']);
|
||||||
|
$podatki['srv_data_grid_archive2'] = array_merge($podatki['srv_data_grid_archive2'], $kljuc['srv_data_grid_archive2']);
|
||||||
$podatki['srv_data_grid_active'] = array_merge($podatki['srv_data_grid_active'], $kljuc['srv_data_grid_active']);
|
$podatki['srv_data_grid_active'] = array_merge($podatki['srv_data_grid_active'], $kljuc['srv_data_grid_active']);
|
||||||
$podatki['srv_data_rating'] = array_merge($podatki['srv_data_rating'], $kljuc['srv_data_rating']);
|
$podatki['srv_data_rating'] = array_merge($podatki['srv_data_rating'], $kljuc['srv_data_rating']);
|
||||||
$podatki['srv_data_text'] = array_merge($podatki['srv_data_text'], $kljuc['srv_data_text']);
|
$podatki['srv_data_text_archive1'] = array_merge($podatki['srv_data_text_archive1'], $kljuc['srv_data_text_archive1']);
|
||||||
|
$podatki['srv_data_text_archive2'] = array_merge($podatki['srv_data_text_archive2'], $kljuc['srv_data_text_archive2']);
|
||||||
$podatki['srv_data_text_active'] = array_merge($podatki['srv_data_text_active'], $kljuc['srv_data_text_active']);
|
$podatki['srv_data_text_active'] = array_merge($podatki['srv_data_text_active'], $kljuc['srv_data_text_active']);
|
||||||
$podatki['srv_data_textgrid'] = array_merge($podatki['srv_data_textgrid'], $kljuc['srv_data_textgrid']);
|
$podatki['srv_data_textgrid_archive1'] = array_merge($podatki['srv_data_textgrid_archive1'], $kljuc['srv_data_textgrid_archive1']);
|
||||||
|
$podatki['srv_data_textgrid_archive2'] = array_merge($podatki['srv_data_textgrid_archive2'], $kljuc['srv_data_textgrid_archive2']);
|
||||||
$podatki['srv_data_textgrid_active'] = array_merge($podatki['srv_data_textgrid_active'], $kljuc['srv_data_textgrid_active']);
|
$podatki['srv_data_textgrid_active'] = array_merge($podatki['srv_data_textgrid_active'], $kljuc['srv_data_textgrid_active']);
|
||||||
$podatki['srv_data_upload'] = array_merge($podatki['srv_data_upload'], $kljuc['srv_data_upload']);
|
$podatki['srv_data_upload'] = array_merge($podatki['srv_data_upload'], $kljuc['srv_data_upload']);
|
||||||
$podatki['srv_data_vrednost'] = array_merge($podatki['srv_data_vrednost'], $kljuc['srv_data_vrednost']);
|
$podatki['srv_data_vrednost_archive1'] = array_merge($podatki['srv_data_vrednost_archive1'], $kljuc['srv_data_vrednost_archive1']);
|
||||||
|
$podatki['srv_data_vrednost_archive2'] = array_merge($podatki['srv_data_vrednost_archive2'], $kljuc['srv_data_vrednost_archive2']);
|
||||||
$podatki['srv_data_vrednost_active'] = array_merge($podatki['srv_data_vrednost_active'], $kljuc['srv_data_vrednost_active']);
|
$podatki['srv_data_vrednost_active'] = array_merge($podatki['srv_data_vrednost_active'], $kljuc['srv_data_vrednost_active']);
|
||||||
$podatki['srv_user_grupa'] = array_merge($podatki['srv_user_grupa'], $kljuc['srv_user_grupa']);
|
$podatki['srv_user_grupa_archive1'] = array_merge($podatki['srv_user_grupa_archive1'], $kljuc['srv_user_grupa_archive1']);
|
||||||
|
$podatki['srv_user_grupa_archive2'] = array_merge($podatki['srv_user_grupa_archive2'], $kljuc['srv_user_grupa_archive2']);
|
||||||
$podatki['srv_user_grupa_active'] = array_merge($podatki['srv_user_grupa_active'], $kljuc['srv_user_grupa_active']);
|
$podatki['srv_user_grupa_active'] = array_merge($podatki['srv_user_grupa_active'], $kljuc['srv_user_grupa_active']);
|
||||||
|
|
||||||
$uvozeno = true;
|
$uvozeno = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user