sid = $anketa;
SurveyUserSetting:: getInstance()->Init($anketa, $global_user_id);
}
# Nastavitve multicrosstab tabele
public function displayMulticrosstabSettings(){
global $lang;
global $global_user_id;
$this->table_id = SurveyUserSetting:: getInstance()->getSettings('default_mc_table');
if (isset($this->table_id) && $this->table_id != '')
$sql = sisplet_query("SELECT name FROM srv_mc_table WHERE id='$this->table_id' AND ank_id='$this->sid' AND usr_id='$global_user_id'");
else
$sql = sisplet_query("SELECT name FROM srv_mc_table WHERE ank_id='$this->sid' AND usr_id='$global_user_id' ORDER BY time_created ASC");
$row = mysqli_fetch_array($sql);
echo '
';
$hierarhija = false;
if (SurveyInfo::getInstance()->checkSurveyModule('hierarhija')) {
$uporabnik = sisplet_query("SELECT type FROM srv_hierarhija_users WHERE anketa_id='".$this->sid."' AND user_id='".$global_user_id."'", "obj");
if (!empty($uporabnik) && $uporabnik->type == 1)
$hierarhija = true;
}
if ($hierarhija) {
// Vsi podatki o gradnji hierarhije, šifrantov in ostalega
echo '
';
}
public function displayTestDataBar($showAnalizeCheckbox = false)
{
global $lang;
$str_testdata = "SELECT count(*) FROM srv_user WHERE ank_id='" . $this->sid . "' AND (testdata='1' OR testdata='2') AND deleted='0'";
$query_testdata = sisplet_query($str_testdata);
list($testdata) = mysqli_fetch_row($query_testdata);
$str_autogen_testdata = "SELECT count(*) FROM srv_user WHERE ank_id='" . $this->sid . "' AND testdata='2' AND deleted='0'";
$query_autogen_testdata = sisplet_query($str_autogen_testdata);
list($autogen_testdata) = mysqli_fetch_row($query_autogen_testdata);
echo '
';
$borderLeft = ' class="borderLeft"';
} // Link nazaj na podatke - Spremenljivke
elseif ($podstran == 'para_analysis_graph') {
// Info o neodgovorih
echo '
';
}
# filter za nastavitve
# div za filtre statusov
SurveyStatusProfiles:: DisplayLink(false, false);
# filter za spremenljivke - variable
SurveyVariablesProfiles::DisplayLink(false, false);
#filter za ife - pogoje
SurveyConditionProfiles::DisplayLink(false);
# filter za čase
SurveyTimeProfiles::DisplayLink(false);
# generiranje datoteke s podatki - dodana lastna ikona za generiranje datoteke
//SurveyStatusProfiles :: FileGeneratingSetting(false);
echo '
';
if (in_array('AS_SEGMENTS', $allowShow[$podstran])) {
# zoom
SurveyZoom::DisplayLink($hideAdvanced);
}
if (in_array('AS_ZOOM', $allowShow[$podstran])) {
# inspect
$SI = new SurveyInspect($this->sid);
$SI->DisplayLink($hideAdvanced);
}
if (in_array('AS_LOOPS', $allowShow[$podstran])) {
# filter za zanke
SurveyZankaProfiles::DisplayLink($hideAdvanced);
}
if (in_array('AS_VARIABLES', $allowShow[$podstran])) {
# div za profile variabel
SurveyVariablesProfiles::DisplayLink(true, $hideAdvanced);
}
if (in_array('AS_CONDITIONS', $allowShow[$podstran])) {
# filter za pogoje - ifi
SurveyConditionProfiles::DisplayLink($hideAdvanced);
}
if (in_array('AS_MISSINGS', $allowShow[$podstran])) {
# profili missingov
SurveyMissingProfiles::DisplayLink($hideAdvanced);
}
if (in_array('AS_TIME', $allowShow[$podstran])) {
# filter za čase
SurveyTimeProfiles::DisplayLink($hideAdvanced);
}
if (in_array('AS_STATUS', $allowShow[$podstran])) {
# div za filtre statusov
SurveyStatusProfiles::DisplayLink($hideAdvanced);
}
echo '
';
if ($onlyLinks == false) {
echo '
';
}
}
// Javascript s katerim povozimo urlje za izvoze, ki niso na voljo v paketu
$userAccess = UserAccess::getInstance($global_user_id);
if(!$userAccess->checkUserAccess($what='filters')){
echo '';
}
}
public function displayAnalizaRightOptions2($podstran, $onlyLinks = false)
{
global $lang, $admin_type, $global_user_id;
$allowShow = array();
#dovoljenja za prikaz določenih nastavitev
$allowShow[M_ANALYSIS_SUMMARY] =
$allowShow[M_ANALYSIS_DESCRIPTOR] =
$allowShow[M_ANALYSIS_FREQUENCY] =
$allowShow[M_ANALYSIS_CHARTS] =
$allowShow[M_ANALYSIS_LINKS] =
$allowShow[M_ANALYSIS_CREPORT] = array(
'AS_SETTINGS',
'AS_SEGMENTS',
'AS_ZOOM',
'AS_LOOPS',
'AS_BREAK',
'AS_VARIABLES',
'AS_CONDITIONS',
'AS_MISSINGS',
'AS_TIME',
'AS_STATUS');
$allowShow[M_ANALYSIS_CROSSTAB] =
$allowShow[M_ANALYSIS_MULTICROSSTABS] =
$allowShow[M_ANALYSIS_MEANS_HIERARHY] =
$allowShow[M_ANALYSIS_MEANS] = array(
'AS_SETTINGS',
'AS_ZOOM',
'AS_LOOPS',
'AS_CONDITIONS',
'AS_MISSINGS',
'AS_TIME',
'AS_STATUS');
$allowShow[M_ANALYSIS_TTEST] = array(
'AS_SETTINGS',
'AS_CONDITIONS',
'AS_TIME',
'AS_STATUS');
$allowShow[M_ANALYSIS_BREAK] = array(
'AS_SETTINGS',
'AS_ZOOM',
'AS_LOOPS',
'AS_BREAK',
'AS_VARIABLES',
'AS_CONDITIONS',
'AS_MISSINGS',
'AS_TIME',
'AS_STATUS');
$allowShow[M_ANALYSIS_NONRESPONSES] =
$allowShow[M_ANALYSIS_PARA] = array(
'AS_SETTINGS',
'AS_VARIABLES',
'AS_CONDITIONS',
'AS_MISSINGS',
'AS_TIME',
'AS_STATUS');
$allowShow['para_analysis_graph'] = array(
'AS_VARIABLES',
'AS_CONDITIONS',
'AS_MISSINGS',
);
session_start();
$hideAdvanced = (isset($_SESSION['AnalysisAdvancedLinks'][$this->sid]) && $_SESSION['AnalysisAdvancedLinks'][$this->sid] == true) ? true : false;
if ($onlyLinks == false) {
echo '
';
}
echo '
';
if ($podstran == 'charts') {
// nastavitve za grafe (hq, barva)
$this->displayChartOptions();
}
if (in_array('AS_SETTINGS', $allowShow[$podstran])) {
# filter za nastavitve
SurveyDataSettingProfiles::DisplayLink($hideAdvanced);
}
echo '
';
if ($onlyLinks == false) {
echo '
';
}
}
public function displayChartOptions()
{
global $lang, $admin_type;
// Nastavitev HQ grafov
echo '';
// Nastavitev skina grafov
$skin = SurveyUserSetting:: getInstance()->getSettings('default_chart_profile_skin');
$skin = isset($skin) ? $skin : '1ka';
// ce je custom skin
if (is_numeric($skin)) {
$skin = SurveyChart::getCustomSkin($skin);
$name = $skin['name'];
} else {
switch ($skin) {
// 1ka skin
case '1ka':
$name = $lang['srv_chart_skin_1ka'];
break;
// zivahen skin
case 'lively':
$name = $lang['srv_chart_skin_0'];
break;
// blag skin
case 'mild':
$name = $lang['srv_chart_skin_1'];
break;
// Office skin
case 'office':
$name = $lang['srv_chart_skin_6'];
break;
// Pastel skin
case 'pastel':
$name = $lang['srv_chart_skin_7'];
break;
// zelen skin
case 'green':
$name = $lang['srv_chart_skin_2'];
break;
// moder skin
case 'blue':
$name = $lang['srv_chart_skin_3'];
break;
// rdeč skin
case 'red':
$name = $lang['srv_chart_skin_4'];
break;
// skin za vec kot 5 moznosti
case 'multi':
$name = $lang['srv_chart_skin_5'];
break;
}
}
if ($hideAdvanced == false) {
echo '