This commit is contained in:
patrik2020 2021-05-17 15:58:40 +02:00
commit afa70d93e4
85 changed files with 5181 additions and 835 deletions

View File

@ -267,158 +267,93 @@ class SurveyAdmin
global $site_domain;
global $aai_instalacija;
$sql = sisplet_query("SELECT email FROM users WHERE id='$global_user_id'");
$row = mysqli_fetch_assoc($sql);
if ($row['email'] == "test@1ka.si") {
echo '<div id="test_user_alert">';
echo '<span>' . $lang['notify_testUser'] . '</span>';
echo '</div>';
}
echo '<div id="blue_header"><a href="' . $site_url . 'admin/survey"></a></div>';
// user navigacija
echo '<div id="enka_nav">';
// Search po zunanji lupini - preusmeri na drupalov search
echo '<div id="search_holder">';
if($lang['id'] != "1")
$drupal_search_url = 'https://www.1ka.si/d/en/iskanje/';
else
$drupal_search_url = 'https://www.1ka.si/d/sl/iskanje/';
echo '<form method="GET" id="1kasf" action="'.$drupal_search_url.'">';
echo '<input type="hidden" id="drupal_search_url" name="drupal_search_url" value="'.$drupal_search_url.'" />';
echo '<a href="#" onclick="showSearch();"><span class="faicon search pointer"></span></a> ';
echo '<input id="searchSurvey" type="text" value="" placeholder="' . $lang['s_search_frontend'] . '" name="search" />';
echo '<input type="button" style="display: none;" value="' . $lang['s_search'] . '" />';
echo '</form>';
echo '</div>';
// Hitra pomoč - povezave na linke s pomočjo na www.1ka.si
$subdomain = ($lang['id'] == "1") ? 'www' : 'english';
$help_url = Common::getHelpUrl($subdomain, $this->first_action);
echo '<div id="help_holder">';
echo ' <a href="' . $help_url . '" title="' . $lang['srv_settings_help'] . '" target="_blank">';
echo '<span class="faicon help2"></span>';
echo '</a> ';
echo '</div>';
// povezava na fieldwork sync
if ($this->anketa > 0) {
// poglej če je tale ID ankete v srv_fieldwork
$sql = sisplet_query("SELECT id FROM srv_fieldwork where sid_server='" . $this->anketa . "'");
if (mysqli_num_rows($sql) > 0) {
// nariši link.
echo '<div id="fieldwork_holder">';
echo '<a href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_FIELDWORK . '" title="' . $lang['srv_vrsta_survey_type_13'] . '">';
echo '<span class="sprites fieldwork"></span>';
echo '</a> ';
echo '</div>';
}
}
$sql = $this->db_select_user($global_user_id);
$row = mysqli_fetch_array($sql);
$text = $row['name'] . ' ' . $row['surname'];
$text = (strlen($text) > 25) ? substr($text, 0, 25) . '...' : $text;
echo '<div id="xtradiv"><strong class="xtraname">' . $text . ' <span class="faicon after sort_down_arrow"/></strong>';
echo '<div id="xtradivSettings">';
echo '<span class="xtraSetting"><a class="xtra" href="' . $site_url . 'admin/survey/index.php?a=nastavitve&m=global_user_myProfile"><span class="faicon user"></span>' . $lang['edit_data'] . '</a></span>';
// Odjava na nov nacin preko frontend/api
echo '<form name="odjava" method="post" action="'.$site_url.'frontend/api/api.php?action=logout">';
echo '<span class="xtraSetting"><a class="xtra" href="#" onClick="document.odjava.submit();"><span class="faicon logout"></span>' . $lang['logout'] . '</a></span>';
echo '</form>';
echo '</div>';
echo '</div>';
echo '</div>';
// logotip
echo '<div id="logo">';
$logo_class = ($lang['id'] != "1") ? ' class="english"' : '';
$su = ($site_url == "https://www.1ka.si/" && $lang['id'] != "1") ? "https://www.1ka.si/d/en/" : $site_url;
echo '<a href="' . $su . '" title="' . $lang['srv_1cs'] . '" id="enka_logo" ' . $logo_class . '></a>';
echo '</div>';
echo '<div id="main_holder">';
echo '<div id="main">';
/***** SEZNAM ANKET - Ce ni nastavljene ankete, potem prikazujemo seznam na prvi strani *****/
if (!($this->anketa > 0)) {
/********************* GLAVA *********************/
echo '<header>';
$this->displaySeznamAnket();
}
/***** GLAVNA VSEBINA - Znotraj posamezne ankete *****/
else{
// DESKTOP HEADER
echo '<div class="desktop_header">';
echo ' <div id="anketa"' . ($this->anketa == 0 ? ' class="prva"' : '') . '>';
// Nastavitve zgoraj desno v headerju (search, help, profil...)
$this->displayHeaderRight();
// logotip
$this->displayHeaderLogo();
// Znotraj posamezne ankete
if($this->anketa > 0){
// Utripajoc napis "Demo anketa"
$this->displayHeaderDemoSurvey();
// Prikaze podatke o anketi in navigacijo - na vrhu (top bar)
$this->displayAnketaTop();
$this->displayHeaderAnketa();
}
// Seznam anket
else{
$this->displayHeaderSeznamAnket();
}
echo '</div>';
// MOBILE HEADER
echo '<div class="mobile_header">';
$mobile_admin = new MobileSurveyAdmin($this);
$mobile_admin->displayHeaderMobile();
echo '</div>';
echo '</header>';
/********************* GLAVA - END *********************/
/********************* MAIN *********************/
echo '<div id="main">';
// SEZNAM ANKET - Ce ni nastavljene ankete, potem prikazujemo seznam na prvi strani *****/
if (!($this->anketa > 0)) {
$this->displaySeznamAnket();
}
// ZNOTRAJ ANKETE
else{
echo '<div id="anketa">';
echo '<div id="anketa_edit" class="page_'.$_GET['a'].' subpage_'.$_GET['m'].' '.($this->survey_type == '1' ? 'forma' : '').' '.($this->survey_type == '0' ? 'glasovanje' : '').'">';
$this->displayAnketa();
echo '</div>';
echo ' </div> <!-- /anketa -->';
// Predpregled tipa vprašanj - prikazujemo samo kadar smo v urejanju ankete
if (($_GET['a'] == '' && isset($_GET['anketa'])) || $_GET['a'] == 'branching') {
echo '<div id="tip_preview">';
echo '<div class="top-left"></div><div class="top-right"></div><div class="inside">';
$this->getTipPreviewHtml();
echo '</div><div class="bottom-left"></div><div class="bottom-right"></div>';
echo '</div>'; // tip_preview
}
// Utripajoc napis "Demo anketa"
$row = SurveyInfo::getInstance()->getSurveyRow();
if ($row['invisible'] == 1 && !Dostop::isMetaAdmin()) {
echo '<div id="invisible-layer"></div>';
echo '<div id="invisible-close" onClick="window.close(); return false;"><span>' . $lang['srv_close_invisible'] . '</span></div>';
?> <script> $('#invisible-close span').effect("pulsate", {times: 3}, 2000); </script> <?
}
echo '</div>';
}
/***** SKRITI DIVI ZA POPUPE *****/
$this->displayHiddenPopups();
echo '</div> <!-- /main -->';
echo '</div>';
/********************* MAIN - END *********************/
/***** FOOTER *****/
/********************* FOOTER *********************/
$this->displayFooter();
/********************* FOOTER - END *********************/
echo '</div> <!-- /main_holder -->';
}
// Prikazemo skrite dive za popupe
private function displayHiddenPopups(){
global $lang;
// Predpregled tipa vprašanj - prikazujemo samo kadar smo v urejanju ankete
$this->getTipPreviewHtml();
// Loading ikona
echo ' <div id="loading">';
echo ' <span class="faicon spinner fa-spin spaceRight"></span> '.$lang['srv_saving'];
@ -547,8 +482,123 @@ class SurveyAdmin
echo '</div>';
}
// Prikazemo podatke zgoraj desno v glavi (search, user, help)
private function displayHeaderRight(){
global $site_url;
global $global_user_id;
global $lang;
// user navigacija
echo '<div id="enka_nav">';
// Search po zunanji lupini - preusmeri na drupalov search
echo '<div id="search_holder">';
if($lang['id'] != "1")
$drupal_search_url = 'https://www.1ka.si/d/en/iskanje/';
else
$drupal_search_url = 'https://www.1ka.si/d/sl/iskanje/';
echo '<form method="GET" id="1kasf" action="'.$drupal_search_url.'">';
echo '<input type="hidden" id="drupal_search_url" name="drupal_search_url" value="'.$drupal_search_url.'" />';
echo '<a href="#" onclick="showSearch();"><span class="faicon search pointer"></span></a> ';
echo '<input id="searchSurvey" type="text" value="" placeholder="' . $lang['s_search_frontend'] . '" name="search" />';
echo '<input type="button" style="display: none;" value="' . $lang['s_search'] . '" />';
echo '</form>';
echo '</div>';
// Hitra pomoč - povezave na linke s pomočjo na www.1ka.si
$subdomain = ($lang['id'] == "1") ? 'www' : 'english';
$help_url = Common::getHelpUrl($subdomain, $this->first_action);
echo '<div id="help_holder">';
echo ' <a href="' . $help_url . '" title="' . $lang['srv_settings_help'] . '" target="_blank">';
echo '<span class="faicon help2"></span>';
echo '</a> ';
echo '</div>';
// povezava na fieldwork sync
if ($this->anketa > 0) {
// poglej če je tale ID ankete v srv_fieldwork
$sql = sisplet_query("SELECT id FROM srv_fieldwork where sid_server='" . $this->anketa . "'");
if (mysqli_num_rows($sql) > 0) {
// nariši link.
echo '<div id="fieldwork_holder">';
echo '<a href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_FIELDWORK . '" title="' . $lang['srv_vrsta_survey_type_13'] . '">';
echo '<span class="sprites fieldwork"></span>';
echo '</a> ';
echo '</div>';
}
}
// User profil
$sql = $this->db_select_user($global_user_id);
$row = mysqli_fetch_array($sql);
$text = $row['name'] . ' ' . $row['surname'];
$text = (strlen($text) > 25) ? substr($text, 0, 25) . '...' : $text;
echo '<div id="xtradiv"><strong class="xtraname">'.$text.' <span class="faicon after sort_down_arrow"/></strong>';
echo '<div id="xtradivSettings">';
echo '<span class="xtraSetting"><a class="xtra" href="' . $site_url . 'admin/survey/index.php?a=nastavitve&m=global_user_myProfile"><span class="faicon user"></span>' . $lang['edit_data'] . '</a></span>';
// Odjava na nov nacin preko frontend/api
echo '<form name="odjava" id="form_odjava_desktop" method="post" action="'.$site_url.'frontend/api/api.php?action=logout">';
echo '<span class="xtraSetting"><a class="xtra" href="#" onClick="$(\'#form_odjava_desktop\').submit();"><span class="faicon logout"></span>' . $lang['logout'] . '</a></span>';
echo '</form>';
echo '</div>';
echo '</div>';
echo '</div>';
}
// Prikazemo logo zgoraj levo
public function displayHeaderLogo(){
global $lang;
global $site_url;
echo '<div id="logo">';
$logo_class = ($lang['id'] != "1") ? ' class="english"' : '';
$su = ($site_url == "https://www.1ka.si/" && $lang['id'] != "1") ? "https://www.1ka.si/d/en/" : $site_url;
echo '<a href="' . $su . '" title="' . $lang['srv_1cs'] . '" id="enka_logo" ' . $logo_class . '></a>';
echo '</div>';
}
// Utripajoc napis "Demo anketa"
private function displayHeaderDemoSurvey(){
global $lang;
$row = SurveyInfo::getInstance()->getSurveyRow();
if ($row['invisible'] == 1 && !Dostop::isMetaAdmin()) {
echo '<div id="invisible-layer"></div>';
echo '<div id="invisible-close" onClick="window.close(); return false;"><span>' . $lang['srv_close_invisible'] . '</span></div>';
?> <script> $('#invisible-close span').effect("pulsate", {times: 3}, 2000); </script> <?
}
}
// Prikaze podatke o anketi na vrhu
private function displayAnketaTop(){
private function displayHeaderAnketa(){
global $lang;
global $site_url;
@ -567,6 +617,59 @@ class SurveyAdmin
$this->thirdNavigation();
}
/**
* prikaze glavo v seznamu anket
*
*/
private function displayHeaderSeznamAnket(){
global $lang, $site_url, $global_user_id, $admin_type, $site_domain;
// Pobrisemo vse preview vnose
Common::deletePreviewData($this->anketa);
# naložimo razred z seznamom anket
$SL = new SurveyList();
$SLCount = $SL->countSurveys();
$SLCountPhone = $SL->countPhoneSurveys();
// Obvestilo da ima uporabnik neprebrano sporocilo
$NO = new Notifications();
$countMessages = $NO->countMessages();
if ($countMessages > 0) {
echo '<div id="new_notification_alert" onClick="showUnreadMessages();">';
echo $lang['srv_notifications_alert'];
echo '</div>';
// Ce imamo vklopljen avtomatski prikaz sporcila (za pomembne zadeve), ga prikazemo po loadu
if($NO->checkForceShow())
echo '<script>$(document).ready(function(){showUnreadMessages();})</script>';
}
// GDPR popup za prejemanje obvestil - force ce ga se ni izpolnil - SAMO NA www.1ka.si, test.1ka.si in virtualkah
if (($site_url == 'https://www.1ka.si/' || $site_url == 'http://test.1ka.si/' || $site_url == 'https://1ka.arnes.si/' || ($cookie_domain == '.1ka.si' && $virtual_domain == true))
&& User::getInstance()->getSetting($setting='gdpr_agree') == '-1') {
// Avtomatsko prikazemo po loadu
echo '<script>$(document).ready(function(){showGDPRMessage();})</script>';
}
echo '<div id="anketa_active" class="folders">';
echo ' <div id="topLine2">&nbsp;</div>';
echo ' <div id="surveyNavigation">';
$SL->display_tabs();
echo ' </div>';
echo '</div>';
# smo v knjižnici
$SL->display_sub_tabs();
}
// Priakz footerja
private function displayFooter(){
global $lang;
@ -575,7 +678,8 @@ class SurveyAdmin
global $aai_instalacija;
global $mysql_database_name;
echo '<div id="srv_footer">';
echo '<footer id="srv_footer">';
// Leva stran footerja
@ -648,11 +752,10 @@ class SurveyAdmin
echo '</div>';
echo '</div>'; // END #main
echo '</div>'; // END #main_holder
echo '</footer>';
}
// Prikaze ime ankete, zvezdico in tiste linke spodi (ker se vse refresha z ajaxom)
private function anketa_active() {
global $lang;
@ -1872,6 +1975,16 @@ class SurveyAdmin
echo '</li>';
echo '<li class="space"></li>';
# kakovost resp - V DELU - ZAENKRAT SAMO ADMINI
if ($admin_type === '0') {
echo '<li>';
echo '<a class="no-img' . ($_GET['a'] == A_KAKOVOST_RESP ? ' active' : '') . '"'
. ' href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_KAKOVOST_RESP . '" title="' . $lang['srv_kakovost'] . '">';
echo $lang['srv_kakovost'] . '</a>';
echo '</li>';
echo '<li class="space"></li>';
}
# speeder index - V DELU - ZAENKRAT SAMO ADMINI
if ($admin_type === '0') {
echo '<li>';
@ -2336,6 +2449,13 @@ class SurveyAdmin
$SUR->displayUporabnost();
echo ' </div>';
}
// prikaze modul kakovost
elseif ($_GET['a'] == A_KAKOVOST_RESP) {
echo ' <div id="surveyKakovostResp">';
$SUR = new SurveyKakovost($this->anketa);
$SUR->displayKakovost();
echo ' </div>';
}
// Prikaze analizo hitrosti respondenta
elseif ($_GET['a'] == A_SPEEDER_INDEX) {
echo ' <div id="surveySpeederIndex">';
@ -3123,7 +3243,7 @@ class SurveyAdmin
}
// Linki za napredne module
function showAdvancedModulesLinks()
private function showAdvancedModulesLinks()
{
global $lang;
global $site_url;
@ -3312,54 +3432,15 @@ class SurveyAdmin
* prikaze seznam anket in polje za dodajanje na prvi strani
*
*/
function displaySeznamAnket(){
private function displaySeznamAnket(){
global $lang, $site_url, $global_user_id, $admin_type, $site_domain;
// Pobrisemo vse preview vnose
Common::deletePreviewData($this->anketa);
# naložimo razred z seznamom anket
$SL = new SurveyList();
$SLCount = $SL->countSurveys();
$SLCountPhone = $SL->countPhoneSurveys();
// Obvestilo da ima uporabnik neprebrano sporocilo
$NO = new Notifications();
$countMessages = $NO->countMessages();
if ($countMessages > 0) {
echo '<div id="new_notification_alert" onClick="showUnreadMessages();">';
echo $lang['srv_notifications_alert'];
echo '</div>';
// Ce imamo vklopljen avtomatski prikaz sporcila (za pomembne zadeve), ga prikazemo po loadu
if($NO->checkForceShow())
echo '<script>$(document).ready(function(){showUnreadMessages();})</script>';
}
// GDPR popup za prejemanje obvestil - force ce ga se ni izpolnil - SAMO NA www.1ka.si, test.1ka.si in virtualkah
if (($site_url == 'https://www.1ka.si/' || $site_url == 'http://test.1ka.si/' || $site_url == 'https://1ka.arnes.si/' || ($cookie_domain == '.1ka.si' && $virtual_domain == true))
&& User::getInstance()->getSetting($setting='gdpr_agree') == '-1') {
// Avtomatsko prikazemo po loadu
echo '<script>$(document).ready(function(){showGDPRMessage();})</script>';
}
echo '<div id="anketa_active" class="folders">';
echo ' <div id="topLine2">&nbsp;</div>';
echo ' <div id="surveyNavigation">';
$SL->display_tabs();
echo ' </div>';
echo '</div>';
# smo v knjižnici
$SL->display_sub_tabs();
// VSEBINA POSAMEZNEGA TABA PRI MOJIH ANKETAH
echo '<div id="moje_ankete_edit" class="page_'.$_GET['a'].' subpage_'.$_GET['t'].' '.(isset($_GET['b']) ? 'subpage_b_'.$_GET['b'] : '').' '.($SLCount == 0 ? 'page_ustvari_anketo' : '').'">';
@ -3649,6 +3730,8 @@ class SurveyAdmin
echo '</div>';
}
/**
* vrne kodo ankete, ki se jo uporabi za embed
*
@ -3833,7 +3916,7 @@ class SurveyAdmin
}
}
if (($_GET['a'] == A_COLLECT_DATA || $_GET['a'] == A_USABLE_RESP || $_GET['a'] == A_SPEEDER_INDEX || $_GET['a'] == A_REMINDER_TRACKING || $_GET['a'] == A_TEXT_ANALYSIS || $_GET['a'] == A_EDITS_ANALYSIS || $_GET['a'] == A_ANALYSIS) && $_GET['m'] != 'analysis_links' && $_GET['m'] != 'anal_arch')
if (($_GET['a'] == A_COLLECT_DATA || $_GET['a'] == A_USABLE_RESP || $_GET['a'] == A_KAKOVOST_RESP || $_GET['a'] == A_SPEEDER_INDEX || $_GET['a'] == A_REMINDER_TRACKING || $_GET['a'] == A_TEXT_ANALYSIS || $_GET['a'] == A_EDITS_ANALYSIS || $_GET['a'] == A_ANALYSIS) && $_GET['m'] != 'analysis_links' && $_GET['m'] != 'anal_arch')
$this->displayExportHover($navigation);
} else if ($navigation == 1) {
@ -4966,10 +5049,24 @@ class SurveyAdmin
* preview
*
*/
function getTipPreviewHtml(){
private function getTipPreviewHtml(){
global $lang;
global $global_user_id;
// Predpregled tipa vprašanj - prikazujemo samo kadar smo v urejanju ankete
if (!$this->anketa > 0)
return;
if ( ($_GET['a'] != '' || !isset($_GET['anketa'])) && $_GET['a'] != 'branching' )
return;
echo '<div id="tip_preview">';
echo '<div class="top-left"></div><div class="top-right"></div><div class="inside">';
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
$userAccess = UserAccess::getInstance($global_user_id);
@ -5875,6 +5972,11 @@ class SurveyAdmin
echo '</div>';
}
}
echo '</div><div class="bottom-left"></div><div class="bottom-right"></div>';
echo '</div>'; // tip_preview
}
/**

View File

@ -1281,7 +1281,7 @@ class SurveyAdminAjax {
$avtorSql = sisplet_query("SELECT insert_uid FROM srv_anketa WHERE id='" . $this->anketa . "'");
$avtorRow = mysqli_fetch_assoc($avtorSql);
// da ne more zbrisat avtorja (razen če je test@1ka.si)
// da ne more zbrisat avtorja
$avtorPogoj = (isset ($avtorRow['insert_uid']) && $avtorRow['insert_uid'] > 0) ? " AND (uid != ".$avtorRow['insert_uid']." )" : "";
// da ne more zbrisat sam sebe
$avtorID = " AND uid != '" . $global_user_id . "'";

View File

@ -8705,9 +8705,16 @@ class SurveyAdminSettings {
}
echo '<fieldset><legend>'.$lang['srv_voting'].'</legend>';
echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_voting" name="voting" value="1" '. (isset($modules['voting']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'voting\');" />';
echo $lang['srv_vrsta_survey_type_18'] . '</label>';
echo '<br/><i>'.$lang['srv_voting_info'].'</i>';
echo '<br><i>'.$lang['srv_voting_info'].'</i>';
// Opozorilo, da so vabila ze vklopljena in zato modula ni mogoce vklopiti
if(!isset($modules['voting']) && SurveyInfo::getInstance()->checkSurveyModule('email')){
echo '<br><br><i class="red bold">'.$lang['srv_voting_info_error'].'</i><br>';
}
echo '</fieldset>';
echo '<br />';

View File

@ -227,6 +227,9 @@ class SurveyPostProcess {
} elseif ($_GET['a'] == 'edit_data_question_save') {
$this->ajax_edit_data_question_save(0);
} elseif ($_GET['a'] == 'edit_data_question_upload_delete') {
$this->ajax_edit_data_question_upload_delete();
} elseif ($_GET['a'] == 'get_inline_edit') {
$this->ajax_get_inline_edit();
@ -256,10 +259,7 @@ class SurveyPostProcess {
} elseif ($_GET['a'] == 'coding_filter') {
$this->ajax_coding_filter();
}
}
/**
@ -548,6 +548,25 @@ class SurveyPostProcess {
header("Location: index.php?anketa=".$this->anketa."&a=data&m=edit");*/
}
// Pobrisemo upload datoteke v urejanju podatkov
function ajax_edit_data_question_upload_delete () {
Common::updateEditStamp();
$spr_id = $_POST['spr_id'];
$usr_id = $_POST['usr_id'];
$code = $_POST['code'];
$s = sisplet_query("DELETE FROM srv_data_upload WHERE ank_id='".$this->anketa."' AND usr_id='".$usr_id."' AND code='".$code."'");
if (!$s) echo mysqli_error($GLOBALS['connect_db']);
$s2 = sisplet_query("DELETE FROM srv_data_text".$this->db_table." WHERE spr_id='".$spr_id."' AND usr_id='".$usr_id."'");
if (!$s2) echo mysqli_error($GLOBALS['connect_db']);
$this->ajax_edit_data_question();
self::forceRefreshData($this->anketa);
}
function ajax_get_inline_edit () {
$spr_id = $_POST['spr_id'];

View File

@ -1876,10 +1876,7 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
#'email','ime','priimek','telefon','naziv','drugo'
echo '<p><span class="title">'.$lang['srv_label'].':</span><span class="content"><input type="text" name="label" value="'.$row['label'].'" maxlength="50" /></span></p>';
//echo '<p><span class="title">'.$lang['srv_datapiping'].': '.Help::display('DataPiping').'</span> '.$lang['srv_datapiping_txt'].'</p>';
echo '<p><span class="title">'.$lang['srv_label'].':</span><span class="content"><input type="text" name="label" value="'.$row['label'].'" maxlength="80" /></span></p>';
}
/**

View File

@ -7,79 +7,686 @@
class MobileSurveyAdmin extends SurveyAdmin{
class MobileSurveyAdmin{
function __construct(){
var $surveyAdminClass;
function __construct($surveyAdminClass){
global $site_url;
$this->surveyAdminClass = $surveyAdminClass;
}
// Izris glave z menijem
public function displayMobileHeader(){
// Izris glave z menijem - znotraj ankete
public function displayHeaderMobile(){
echo '<div class="mobile_header">';
echo '<div class="mobile_header '.($this->surveyAdminClass->anketa > 0 ? 'survey_edit' : 'survey_list').'">';
// Ikona za meni
$this->displayMenuIcon();
// Meni
$this->displayMobileMenu();
$this->displayMenu();
// Logo
echo '<div class="mobile_logo"></div>';
// Naslov ankete
if($this->surveyAdminClass->anketa > 0){
$this->displaySurveyTitle();
}
// Logo - enak kot na desktopu
else{
$this->displayLogo();
}
// Se inicializiramo zeynep jquery mobile menu
echo '<script> mobile_init(); </script>';
echo '</div>';
}
// Prikazemo mobile logo
private function displayLogo(){
global $lang;
global $site_url;
echo '<div class="mobile_logo">';
$logo_class = ($lang['id'] != "1") ? ' class="english"' : '';
$su = ($site_url == "https://www.1ka.si/" && $lang['id'] != "1") ? "https://www.1ka.si/d/en/" : $site_url;
echo '<a href="' . $su . '" title="' . $lang['srv_1cs'] . '" id="enka_logo" ' . $logo_class . '></a>';
echo '</div>';
}
private function displaySurveyTitle(){
SurveyInfo::getInstance()->SurveyInit($this->surveyAdminClass->anketa);
$row = SurveyInfo::getInstance()->getSurveyRow();
echo '<div class="mobile_survey_title">'.$row['naslov'].'</div>';
}
private function displayMenuIcon(){
echo '<div class="mobile_menu_icon mobile_menu_open">';
echo ' <span class="faicon bars"></span>';
echo '</div>';
echo '<div class="mobile_menu_icon mobile_menu_close">';
echo ' <span>✕</span>';
echo '</div>';
}
// Izris menija
private function displayMobileMenu(){
private function displayMenu(){
echo '<div class="mobile_menu">';
echo '<div class="mobile_menu first" data-menu-name="first">';
// Izris uporabniških podatkov v dropdownu
$this->displayMobileMenuUser();
$this->displayMenuUser();
// Meni znotraj ankete
if($this->surveyAdminClass->anketa > 0){
// Izris glavne navigacije v dropdownu
$this->displayMobileMenuNavigation();
$this->displayMenuSurveyNavigation();
// Izris akcij za anketo (kopiraj, brisi...) v dropdownu
$this->displayMobileMenuActions();
$this->displayMenuSurveyActions();
}
// Meni v mojih anketah
else{
$this->displayMenuMySurveysNavigation();
}
echo '</div>';
}
// Izris uporabniških podatkov v dropdownu
private function displayMobileMenuUser(){
private function displayMenuUser(){
global $lang, $global_user_id, $site_url;
$sql = $this->surveyAdminClass->db_select_user($global_user_id);
$row = mysqli_fetch_array($sql);
$user_name = $row['name'] . ' ' . $row['surname'];
$user_name = (strlen($user_name) > 25) ? substr($user_name, 0, 25) . '...' : $user_name;
$user_email = '<br><span class="email">'.$row['email'].'</span>';
echo '<div class="mobile_menu_user">';
echo '<ul>';
echo ' <li class="has-submenu">';
echo ' <a href="#" data-submenu="submenu_user" title="'.$user_name.'"><span class="faicon arrow_back"></span>'.$user_name.$user_email.'</a>';
echo ' </li>';
// Podmeni
echo ' <div id="submenu_user" class="submenu">';
// Podmeni header
echo ' <div class="submenu-header" data-submenu-close="submenu_user">';
echo ' <a href="#"><span class="faicon arrow_back"></span></a>';
echo ' <label>'.$user_name.'</label>';
echo ' </div>';
// Podmeni vsebina
echo ' <div class="submenu_user_content">';
echo ' <div><a href="'.$site_url.'admin/survey/index.php?a=nastavitve&m=global_user_myProfile"><span class="faicon user"></span>' . $lang['edit_data'] . '</a></div>';
// Odjava na nov nacin preko frontend/api
echo ' <div><form name="odjava" id="form_odjava" method="post" action="'.$site_url.'frontend/api/api.php?action=logout">';
echo ' <span class="as_link" onClick="$(\'#form_odjava\').submit();"><span class="faicon logout"></span>' . $lang['logout'] . '</span>';
echo ' </form></div>';
echo ' </div>';
echo ' </div>';
echo '</ul>';
echo '</div>';
}
// Izris glavne navigacije v dropdownu
private function displayMobileMenuNavigation(){
// Izris glavne navigacije v mojih anketah
private function displayMenuMySurveysNavigation(){
global $lang, $admin_type, $app_settings;
# naložimo razred z seznamom anket
$SL = new SurveyList();
$SLCount = $SL->countSurveys();
$SLCountPhone = $SL->countPhoneSurveys();
echo '<div class="mobile_menu_navigation">';
echo '<span class="">Urejanje</span>';
echo '<span class="">Testiranje</span>';
echo '<span class="">Objava</span>';
echo '<span class="">Podatki</span>';
echo '<span class="">Analiza</span>';
echo '<ul>';
// MOJE ANKETE
$this->displayMenuItem($lang['srv_pregledovanje'], $url='index.php?a=pregledovanje');
// TELEFONSKA ANKETA
if ($SLCountPhone > 0 && $admin_type != '0') {
$this->displayMenuItem($lang['srv_telephone_surveys'], $url='index.php?a=phoneSurveys');
}
// AKTIVNOST
if ($SLCount > 0 && $admin_type == 0) {
$submenu = array(
array(
'title' => $lang['srv_ankete'],
'url' => 'index.php?a=diagnostics'
),
array(
'title' => $lang['srv_weekly_diagnostics'],
'url' => 'index.php?a=diagnostics&t=time_span_daily'
),
array(
'title' => $lang['srv_monthly_diagnostics'],
'url' => 'index.php?a=diagnostics&t=time_span_monthly'
),
array(
'title' => $lang['srv_yearly_diagnostics'],
'url' => 'index.php?a=diagnostics&t=time_span_yearly'
),
array(
'title' => $lang['srv_all_diagnostics'],
'url' => 'index.php?a=diagnostics&t=time_span&uvoz=0&ustrezni=1&delnoustrezni=1&neustrezni=0'
),
array(
'title' => $lang['srv_metapodatki'],
'url' => 'index.php?a=diagnostics&t=paradata'
)
);
$this->displayMenuItemWithSubmenu($name='diagnostics', $lang['srv_diagnostics'], $submenu);
}
// UPORABNIKI
if ($admin_type <= 1) {
// Admini imajo pregled nad vsemi zavihki uporabnikov
if ($admin_type == 0) {
$submenu = array(
array(
'title' => $lang['n_users_list'],
'url' => 'index.php?a=diagnostics&t=uporabniki'
),
array(
'title' => $lang['n_users_list_all'],
'url' => 'index.php?a=diagnostics&t=uporabniki&m=all'
),
array(
'title' => $lang['n_deleted_users'],
'url' => 'index.php?a=diagnostics&t=uporabniki&m=izbrisani'
),
array(
'title' => $lang['n_unconfirmed_users'],
'url' => 'index.php?a=diagnostics&t=uporabniki&m=nepotrjeni'
),
array(
'title' => $lang['n_unsigned_users'],
'url' => 'index.php?a=diagnostics&t=uporabniki&m=odjavljeni'
),
array(
'title' => $lang['srv_hierarchy_users_access'],
'url' => 'index.php?a=diagnostics&t=uporabniki&m=sa-modul'
),
);
}
// Manegerji imajo samo osnovni pregled svojih uporabnikov
if ($admin_type == 1) {
$submenu = array(
array(
'title' => $lang['n_users_list'],
'url' => 'index.php?a=diagnostics&t=uporabniki'
)
);
}
$this->displayMenuItemWithSubmenu($name='uporabniki', $lang['hour_users'], $submenu);
}
// KNJIZNICA
$submenu = array(
array(
'title' => $lang['srv_javna_knjiznica'],
'url' => 'index.php?a=knjiznica'
),
array(
'title' => $lang['srv_moja_knjiznica'],
'url' => 'index.php?a=knjiznica&t=moje_ankete'
)
);
$this->displayMenuItemWithSubmenu($name='knjiznica', $lang['srv_library'], $submenu);
// NASTAVITVE
if ($admin_type == '0') {
$submenu = array(
array(
'title' => $lang['srv_settingsSystem'],
'url' => 'index.php?a=nastavitve&m=system'
),
array(
'title' => $lang['srv_testiranje_predvidenicas'],
'url' => 'index.php?a=nastavitve&m=predvidenicasi'
),
array(
'title' => $lang['srv_collectData'],
'url' => 'index.php?a=nastavitve&m=collectData'
),
array(
'title' => $lang['srv_nice_url'],
'url' => 'index.php?a=nastavitve&m=nice_links'
),
array(
'title' => $lang['srv_anketa_admin'],
'url' => 'index.php?a=nastavitve&m=anketa_admin'
),
array(
'title' => $lang['srv_anketa_deleted'],
'url' => 'index.php?a=nastavitve&m=anketa_deleted'
),
array(
'title' => $lang['srv_data_deleted'],
'url' => 'index.php?a=nastavitve&m=data_deleted'
),
array(
'title' => $lang['srv_user_settings'],
'url' => 'index.php?a=nastavitve&m=global_user_settings'
),
array(
'title' => $lang['edit_data'],
'url' => 'index.php?a=nastavitve&m=global_user_myProfile'
),
);
}
else{
$submenu = array(
array(
'title' => $lang['srv_user_settings'],
'url' => 'index.php?a=nastavitve&m=global_user_settings'
),
array(
'title' => $lang['edit_data'],
'url' => 'index.php?a=nastavitve&m=global_user_myProfile'
),
);
}
$this->displayMenuItemWithSubmenu($name='nastavitve', $lang['settings'], $submenu);
// NAROCILA
if($app_settings['commercial_packages']){
// placila - samo admini
if ($admin_type == '0') {
$submenu = array(
array(
'title' => $lang['srv_narocila_my'],
'url' => 'index.php?a=narocila'
),
array(
'title' => $lang['srv_placila'],
'url' => 'index.php?a=narocila&m=placila'
)
);
$this->displayMenuItemWithSubmenu($name='nastavitve', $lang['settings'], $submenu);
}
// moja narocila
else{
$this->displayMenuItem($lang['srv_narocila'], $url='index.php?a=narocila');
}
}
// GDPR
$request_counter = GDPR::countUserUnfinishedRequests();
$submenu = array(
array(
'title' => $lang['srv_gdpr_user_settings'],
'url' => 'index.php?a=gdpr'
),
array(
'title' => $lang['srv_gdpr_survey_list'],
'url' => 'index.php?a=gdpr&m=placila'
),
array(
'title' => $lang['srv_gdpr_dpa'],
'url' => 'index.php?a=gdpr'
),
array(
'title' => $lang['srv_gdpr_requests'].' ('.$request_counter.')',
'url' => 'index.php?a=gdpr&m=gdpr_requests'
)
);
// Vse zahteve za izbris - samo ADMINI
if($admin_type == '0'){
$submenu[] = array(
'title' => $lang['srv_gdpr_requests_all'],
'url' => 'index.php?a=gdpr&m=gdpr_requests_all'
);
}
$this->displayMenuItemWithSubmenu($name='gdpr', 'GDPR', $submenu);
echo '</ul>';
echo '</div>';
}
// Izris glavne navigacije v anketi
private function displayMenuSurveyNavigation(){
global $lang;
$hierarhija_type = (!empty($_SESSION['hierarhija'][$this->surveyAdminClass->anketa]['type']) ? $_SESSION['hierarhija'][$this->surveyAdminClass->anketa]['type'] : null);
$row = SurveyInfo::getInstance()->getSurveyRow();
SurveyInfo:: getInstance()->SurveyInit($this->surveyAdminClass->anketa);
$modules = SurveyInfo::getSurveyModules();
$d = new Dostop();
echo '<div class="mobile_menu_navigation first" data-menu-name="first">';
echo '<ul>';
// MOJE ANKETE
echo '<li>';
echo '<a class="left-1ka" href="index.php?a=pregledovanje" title="' . $lang['srv_pregledovanje'] . ' (' . strtolower($lang['srv_create_survey']) . ', ' . strtolower($lang['srv_library']) . ')">' . $lang['srv_pregledovanje'] . '</a>';
echo '</li>';
// STATUS
if ($this->surveyAdminClass->skin == 0 && $this->surveyAdminClass->isAnketar == false && $d->checkDostopSub('dashboard')) {
if(SurveyInfo::getInstance()->checkSurveyModule('voting')){
$this->displayMenuItem($lang['srv_status_summary'], $url='index.php?anketa='.$this->anketa.'&a='.A_REPORTI);
}
else{
$submenu = array(
array(
'title' => $lang['srv_status_summary'],
'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_REPORTI
),
array(
'title' => $lang['srv_metapodatki'],
'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_PARA_GRAPH
)
);
$this->displayMenuItemWithSubmenu($name='dashboard', $lang['srv_navigation_status'], $submenu);
}
}
// UREJANJE
if ($d->checkDostopSub('edit') && $hierarhija_type < 5 && !$this->surveyAdminClass->isAnketar) {
$submenu = array(
array(
'title' => $lang['srv_editirajanketo2'],
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . ($this->surveyAdminClass->survey_type > 1 ? '&a=' . A_BRANCHING : '')
),
array(
'title' => $lang['srv_nastavitve_ankete'] ,
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_SETTINGS
),
array(
'title' => $lang['srv_themes'],
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_TEMA
),
array(
'title' => $lang['srv_analiza_arhiv'],
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_ARHIVI
),
);
$this->displayMenuItemWithSubmenu($name='edit', $lang['srv_vprasalnik'], $submenu);
}
# TESTIRANJE - ne prikazemo v glasovanju
if ($this->surveyAdminClass->survey_type != 0 && $this->surveyAdminClass->survey_type != 1 && $d->checkDostopSub('test')) {
$submenu = array(
array(
'title' => $lang['srv_testiranje_diagnostika'],
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_TESTIRANJE . '&m=' . M_TESTIRANJE_DIAGNOSTIKA
),
array(
'title' => $lang['srv_testiranje_komentarji'],
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_KOMENTARJI
),
array(
'title' => $lang['srv_testiranje_vnosi'],
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_TESTIRANJE . '&m=' . M_TESTIRANJE_VNOSI
),
);
$this->displayMenuItemWithSubmenu($name='test', $lang['srv_testiranje'], $submenu);
}
// OBJAVA
if ($d->checkDostopSub('publish')) {
$submenu = array(
array(
'title' => $lang['srv_publication_base'],
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_VABILA . '&m=settings'
),
array(
'title' => $lang['srv_publication_url'],
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_VABILA . '&m=url'
),
array(
'title' => $lang['srv_inv_nav_invitations'],
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_INVITATIONS . '&m=settings'
),
);
$this->displayMenuItemWithSubmenu($name='publish', $lang['srv_vabila'], $submenu);
}
// PODATKI - ne prikazemo v glasovanju
if ($this->surveyAdminClass->survey_type != 0 && $d->checkDostopSub('data')) {
$submenu = array(
array(
'title' => $lang['srv_link_data_browse'],
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_COLLECT_DATA
),
array(
'title' => $lang['srv_data_navigation_calculate'],
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_COLLECT_DATA . '&m=calculation'
),
array(
'title' => $lang['srv_data_navigation_import'],
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_COLLECT_DATA . '&m=append'
)
);
if ($d->checkDostopSub('export')) {
$submenu[] = array(
'title' => $lang['srv_export_tab'],
'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_COLLECT_DATA_EXPORT
);
}
$this->displayMenuItemWithSubmenu($name='data', $lang['srv_results'], $submenu);
}
// ANALIZA
if ($d->checkDostopSub('analyse')) {
// Hierarhija
if (SurveyInfo::getInstance()->checkSurveyModule('hierarhija')) {
$this->displayMenuItem($lang['srv_stat_analiza'], $url='index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_MEANS_HIERARHY);
}
// Navadne analize
else{
$submenu = array(
array(
'title' => $lang['srv_stat_analiza'],
'name' => 'analyse_submenu',
'submenu' => array(
array(
'title' => $lang['srv_analiza_arhiviraj_type_0'],
'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_SUMMARY
),
array(
'title' => $lang['srv_analiza_arhiviraj_type_1'],
'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_DESCRIPTOR
),
array(
'title' => $lang['srv_analiza_arhiviraj_type_2'],
'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_FREQUENCY
),
array(
'title' => $lang['srv_analiza_arhiviraj_type_3'],
'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_CROSSTAB
),
array(
'title' => $lang['srv_multicrosstabs'],
'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_MULTICROSSTABS
),
array(
'title' => $lang['srv_analiza_arhiviraj_type_4'],
'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_MEANS
),
array(
'title' => $lang['srv_analiza_arhiviraj_type_5'],
'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_TTEST
),
array(
'title' => $lang['srv_analiza_arhiviraj_type_6'],
'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_BREAK
)
)
),
array(
'title' => $lang['srv_analiza_charts'],
'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_CHARTS
),
array(
'title' => $lang['srv_reporti'],
'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_LINKS
),
);
$this->displayMenuItemWithSubmenu($name='analyse', $lang['srv_analiza'], $submenu);
}
}
echo '</ul>';
echo '</div>';
}
// Izris akcij za anketo (kopiraj, brisi...) v dropdownu
private function displayMobileMenuActions(){
private function displayMenuSurveyActions(){
global $lang;
echo '<div class="mobile_menu_actions">';
echo '<span class="">Kopiraj anketo</span>';
echo '<span class="">Brisi anketo</span>';
# kopiranje
echo ' <a href="#" onclick="anketa_copy_top(\'' . $this->surveyAdminClass->anketa . '\'); return false;" title="'.$lang['srv_anketacopy'].'" class="srv_ico">';
echo ' <span class="faicon anketa_copy"></span> '.$lang['srv_anketacopy'];
echo ' </a>';
# brisanje
echo ' <a href="#" onclick="anketa_delete(\'' . $this->surveyAdminClass->anketa . '\', \'' . $lang['srv_anketadeleteconfirm'] . '\'); return false;" title="' . $lang['srv_anketadelete'] . '" class="srv_ico">';
echo ' <span class="faicon anketa_delete" title="'.$lang['srv_anketadelete'].'"></span> '.$lang['srv_anketadelete'];
echo ' </a>';
echo '</div>';
}
private function displayMenuItemWithSubmenu($name, $title, $submenu){
global $lang;
echo '<li class="has-submenu">';
echo ' <a href="#" data-submenu="submenu_'.$name.'" title="'.$title.'">'.$title.'<span class="faicon arrow_back"></span></a>';
echo '</li>';
// Podmeni
echo '<div id="submenu_'.$name.'" class="submenu">';
// Podmeni header
echo '<div class="submenu-header" data-submenu-close="submenu_'.$name.'">';
// Nazaj
echo ' <a href="#"><span class="faicon arrow_back"></span></a>';
// Label
echo '<label>'.$title.'</label>';
echo '</div>';
// Vsebina podmenija
echo '<ul>';
foreach($submenu as $submenu_item){
// Dodaten podmeni
if(isset($submenu_item['name'])){
//$this->displaySubmenuItem($submenu_item['name'], $submenu_item['title'], $submenu_item['submenu']);
$this->displayMenuItemWithSubmenu($submenu_item['name'], $submenu_item['title'], $submenu_item['submenu']);
}
else{
$this->displayMenuItem($submenu_item['title'], $submenu_item['url']);
}
}
echo '</ul>';
echo '</div>';
}
private function displayMenuItem($title, $url){
echo '<li>';
echo '<a href="'.$url.'" title="'.$title.'">'.$title.'</a>';
echo '</li>';
}
}

View File

@ -2802,13 +2802,6 @@ class SurveyInvitationsNew {
return false;
}
# če je testni uporabnik mu ne prikažemo linkov
$sql = sisplet_query("SELECT email FROM users WHERE id='$global_user_id'");
list($email) = mysqli_fetch_row($sql);
if ( $email == 'test@1ka.si' ) {
return false;
}
if (!isset($_POST['noNavi']) || (isset($_POST['noNavi']) && $_POST['noNavi'] != 'true')) {
$_sub_action = $_GET['m'];
@ -3889,7 +3882,7 @@ class SurveyInvitationsNew {
$sending_results = $squalo->sendSqualoInvitations($sql_query, $sending_data);
}
else{
$sending_results = $this->sendMailToUser($sql_query, $sending_data);
$sending_results = $this->sendMailToUsers($sql_query, $sending_data);
}
$send_ok = $sending_results['send_ok'];
@ -8109,10 +8102,10 @@ class SurveyInvitationsNew {
else{
if($noEmailing == 1){
echo '<table style="width:50%;">';
echo '<table class="invitations_settings" style="width:50%;">';
}
else{
echo '<table style="width:100%;">';
echo '<table class="invitations_settings" style="width:100%;">';
echo '<colgroup style="width:48%;"></colgroup>';
echo '<colgroup style="width:48%;"></colgroup>';
}
@ -10485,7 +10478,7 @@ class SurveyInvitationsNew {
echo $lang['srv_email_setting_btn_save'] . '</a></div></span>';
// Gumb preveri nastavitve
echo '<span id="send_mail_mode_test" class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_green" href="#" onclick="showTestSurveySMTP(); return false;">';
echo '<span id="send_mail_mode_test" class="floatRight spaceRight '.($squalo->getSqualoActive() ? ' displayNone' : '').'"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_green" href="#" onclick="showTestSurveySMTP(); return false;">';
echo $lang['srv_email_setting_btn_test'].'</a></div></span>';

View File

@ -10,9 +10,9 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include_once '../../definition.php';
include_once '../../../../function.php';
include_once '../../../../vendor/autoload.php';
include_once '../../../definition.php';
include_once '../../../../../function.php';
include_once '../../../../../vendor/autoload.php';

View File

@ -35,6 +35,7 @@ class CrossRoad {
break;
case A_NONRESPONSE_GRAPH:
case A_USABLE_RESP:
case A_KAKOVOST_RESP:
case A_SPEEDER_INDEX:
case A_TEXT_ANALYSIS:
case A_GEOIP_LOCATION:

View File

@ -57,6 +57,7 @@
define("A_NONRESPONSE_GRAPH", "nonresponse_graph");
define("A_PARA_GRAPH", "para_graph");
define("A_USABLE_RESP", "usable_resp");
define("A_KAKOVOST_RESP", "kakovost_resp");
define("A_SPEEDER_INDEX", "speeder_index");
define("A_TEXT_ANALYSIS", "text_analysis");
define("A_GEOIP_LOCATION", "geoip_location");

View File

@ -440,21 +440,29 @@ class LatexSurvey{
if ( !$this->getGrupa() ){
if ( SurveyInfo::getInstance()->getSurveyShowConcl() && SurveyInfo::getInstance()->getSurveyConcl() )
{ // ce obstaja footer izpisemo footer
/* $this->pdf->Ln(LINE_BREAK);
$this->pdf->drawLine();
$this->pdf->Ln(LINE_BREAK);
$this->pdf->Write (0, $this->encodeText(SurveyInfo::getInstance()->getSurveyConcl()), '', 0, 'L', 1, 1); */
}
}
########
// Izpis grafa in tabele za NIJZ na koncu dokumenta
global $site_domain;
if( ($site_domain == 'test.1ka.si' && $this->anketa == '8892') || ($site_domain == 'anketa.nijz.si' && $this->anketa == '126738') ){
// Pripravimo podatke, ki se uporabijo v tabelah
// Page break
$tex .= '\cleardoublepage';
// Loop cez vsa vprasanja
// Znotraj loopa vsak element posebej izrisemo kot objekt LatexFreqElement - pomembno, ker zelimo recimo posamezno tabelo frekvenc (sa specificno vprasanje) izrisati tudi v kaksnem drugem porocilu (npr custom report). Zato se mora vsak element neodvisno izrisovati.
//$this->tex .= ' testni tekst display survey';
// Naslov "Ocena bivalnega okolja"
$tex .= '\begin{center} \textbf{Ocena bivalnega okolja} \end{center}';
$nijz = new SurveyNIJZ($this->anketa, $this->usr_id);
// Latex nijz slika grafa
$tex .= $nijz->displayRadarLatex();
// Latex nijz tabela
$tex .= $nijz->displayTableLatex();
}
return $tex;
}
@ -1049,12 +1057,6 @@ class LatexSurvey{
$output .= ' '.$row_if['label'].' ';
$output .= ') ';
}
//echo $output."</br>";
/* $this->pdf->SetTextColor(0,0,150);
$this->pdf->setFont('','B',$this->font);
$this->pdf->MultiCell(90, 1, $this->encodeText($output),0,'L',0,1,0,0);
$this->pdf->SetTextColor(0,0,0);
$this->pdf->setFont('','',$this->font); */
return $output;
}
@ -1242,55 +1244,6 @@ class LatexSurvey{
$posLi = strpos($text, $findLi);
$posPar = strpos($text, $findPar);
//ureditev izrisa slike
/* if($posImg !== false){
$numOfImgs = substr_count($text, $findImg); //stevilo '<img ' v tekstu
$posImg = strpos($text, $findImg);
$textPrej = '';
$textPotem = '';
for($i=0; $i<$numOfImgs; $i++){
$posImg = strpos($text, $findImg);
$textPrej = substr($text, 0, $posImg); //tekst do img
$textPotem = substr($text, $posImg); //tekst po img, z vkljuceno hmlt kodo z img
$posImgEnd = strpos($textPotem, '/>'); //pozicija, kjer se konca html koda za img
$textPotem = substr($textPotem, $posImgEnd+strlen('/>')); //tekst od konca html kode za img dalje
//$text = $textPrej.' '.PIC_SIZE_ANS."{".$this->path2UploadedImages."".$this->getImageName($text, 0, '<img')."}".' '.$textPotem;
//$text = $textPrej.' '.PIC_SIZE_ANS."{".$this->path2UploadedImages."".$this->getImageName($text, 0, '<img', $vre_id)."}".' '.$textPotem;
$imageName = $this->path2UploadedImages."".$this->getImageName($text, 0, '<img', $vre_id);
$imageNameTest = $imageName.'.png'; //za preveriti, ali obstaja slikovna datoteka na strezniku
//error_log("iz survey element: ".$imageNameTest);
//echo("iz survey element: ".$imageNameTest."</br>");
if(filesize($imageNameTest) > 0){
$text = $textPrej.' '.PIC_SIZE_ANS."{".$imageName."}".' '.$textPotem;
}else{
$image = $lang['srv_pc_unavailable'];
$text = $textPrej.' '.$image.' '.$textPotem;
}
}
//pred ureditvijo posebnih karakterjev, odstrani del teksta s kodo za sliko, da se ne pojavijo tezave zaradi imena datoteke od slike
$findImgCode = '\includegraphics';
$posOfImgCode = strpos($text, $findImgCode);
//echo $posOfImgCode."</br>";
$textToImgCode = substr($text, 0, $posOfImgCode); //tekst do $findImgCode
//echo $textToImgCode."</br>";
$textFromImgCode = substr($text, $posOfImgCode); //tekst po $findImgCode
//echo $textFromImgCode."</br>";
$findImgCodeEnd = '}';
//$posOfImgCodeEnd = strpos($text, $findImgCodeEnd);
$posOfImgCodeEnd = strpos($textFromImgCode, $findImgCodeEnd);
//echo $posOfImgCodeEnd."</br>";
$textAfterImgCode = substr($textFromImgCode, $posOfImgCodeEnd+1); //tekst po $findImgCodeEnd
//echo $textAfterImgCode."</br>";
$textOfImgCode = substr($text, $posOfImgCode, $posOfImgCodeEnd+1);
//echo $textOfImgCode."</br>";
$text = $textToImgCode.$textAfterImgCode;
//pred ureditvijo posebnih karakterjev, odstrani del teksta s kodo za sliko, da se ne pojavijo tezave zaradi imena datoteke od slike - konec
} */
//ureditev izrisa slike - konec
//ureditev posebnih karakterjev za Latex http://www.cespedes.org/blog/85/how-to-escape-latex-special-characters, https://en.wikibooks.org/wiki/LaTeX/Special_Characters#Other_symbols
$text = str_replace('\\','\textbackslash{} ',$text);
@ -1328,12 +1281,6 @@ class LatexSurvey{
}
//ureditev preureditve html kode ul in li v latex itemize - konec
//po ureditvi posebnih karakterjev, dodati del teksta s kodo za sliko, ce je slika prisotna
/* if($posImg !== false){
$text = substr_replace($text, $textOfImgCode, $posOfImgCode, 0);
} */
//po ureditvi posebnih karakterjev, dodati del teksta s kodo za sliko, ce je slika prisotna
if($posPar !== false){ //ce je kaksen html tag <p>, dodaj prazno vrstico oz. break
if($numOfUl!=0 && $posLi !== false){ //ce imamo ul in li
$divider = ' ';

View File

@ -196,16 +196,11 @@ class LatexSurveyElement{
$rowVrstic = mysqli_fetch_row($sqlVrstic);
$visina = round(($rowVrstic[0]+2) * 8);
//$linecount_vprasanja = $this->pdf->getNumLines($spremenljivke['naslov'], $this->pdf->getPageWidth());
//$tex = $spremenljivke['naslov'];
######################################### Pridobimo tekst vprasanja - konec
#Stevilcenje vprasanj###############################################################
//$numberingText = ($this->numbering == 1) ? $spremenljivke['variable'].' - ' : '';
$numberingText = ($this->numbering == 1) ? $this->encodeText($spremenljivke['variable']).' - ' : '';
######################################### Stevilcenje vprasanj - konec
//echo "goli naslov: ".$spremenljivke['naslov']."</br>";
//belezenje imena spremenljivke, zaradi GDPR vprasanja
$this->variableName =$spremenljivke['variable'];
@ -224,36 +219,6 @@ class LatexSurveyElement{
#Izpis if-ov pri vprasanju#########################################################
if($this->showIf == 1){
// TODO: Stara koda za iskanje po branchingu (briši, če je vse ok)
//$b = new Branching($this->anketa);
//$parents = $b->get_parents($spremenljivke['id']);
//$parents = explode('p_', $parents);
//foreach ($parents AS $key => $val) {
// if ( is_numeric(trim($val)) ) {
// $parents[$key] = (int)$val;
// } else {
// unset($parents[$key]);
// }
//}
/* $b = new Branching($this->anketa);
$parents = $b->get_parents($spremenljivke['id']);
$parents = explode('p_', $parents);
foreach ($parents AS $key => $val) {
if ( is_numeric(trim($val)) ) {
$parents[$key] = (int)$val;
} else {
unset($parents[$key]);
}
}
foreach ($parents AS $if) {
$tex .= $this->displayIf($if);
$tex .= $this->texNewLine;
}*/
###### stara koda, ki je delavala
// Po novem izpisemo pred vsakim vprasanjem vse ife znotraj katerih se nahaja
Cache::cache_all_srv_branching($this->anketa);
$parents = Cache::srv_branching($spremenljivke['id'], 0)['parent'];
@ -266,8 +231,6 @@ class LatexSurveyElement{
}
######################################### Izpis if-ov pri vprasanju - konec
//$tex .= '\textbf{'.$text.'} '.$texNewLine; //izris besedila vprasanja
if($export_subtype=='q_data'||$export_subtype=='q_data_all'){ //ce je izpis odgovorov
$text = $this->dataPiping($text); //pokazi odgovore po zanki
}
@ -314,42 +277,8 @@ class LatexSurveyElement{
}
}
}
####################
/* if( !in_array($spremenljivke['tip'], array(6, 16, 19, 20, 21, 7)) ){ //ce ni multigrid radio, checkbox, besedilo ali stevilo
//preveri, ce je itemize v besedilu in ustrezno uredi prazno vrstico
$findItemize = '\begin{itemize}';
$posItemize = strpos($tex, $findItemize); //v trenutni tex kodi najdi prisotnost besedila za itemize
if($posItemize === false){ //ce ni besedila itemize, dodaj prazno vrstico
//pejdi v novo vrstico
$tex .= $this->texNewLine;
}
//preveri, ce je itemize v besedilu in ustrezno uredi prazno vrstico - konec
}
if($export_subtype=='q_data'||$export_subtype=='q_data_all'){ //ce je izpis odgovorov
if( in_array($spremenljivke['tip'], array(6, 16, 19, 20, 21, 7)) ){ //ce je multigrid radio, checkbox, besedilo ali stevilo
$tex .= $this->texNewLine;
//echo "ni vodoravno ob vprašanju in je število ali besedilo </br>";
}
}
//ce imamo opombo, jo izpisi
if($spremenljivke['info'] != ''){
if( in_array($spremenljivke['tip'], array(6, 16, 19, 20, 21, 7)) ){ //ce je multigrid radio, checkbox, besedilo ali stevilo
$tex .= $this->texNewLine;
echo "ni vodoravno ob vprašanju in je število ali besedilo </br>";
}
//$tex .= $this->texNewLine;
$tex .= '\vspace{2 mm}';
$tex .= ' {\indent \\footnotesize '.$this->encodeText($spremenljivke['info']).'}';
if( !in_array($spremenljivke['tip'], array(6, 16, 19, 20, 21, 7)) ){ //ce ni multigrid radio, checkbox, besedilo ali stevilo
$tex .= $this->texNewLine;
}
} */
####################
}else{ //ce je vodoravno ob vprasanju
else{ //ce je vodoravno ob vprasanju
//ce imamo opombo, jo izpisi
if($spremenljivke['info'] != ''){
//pejdi v novo vrstico
@ -370,6 +299,7 @@ class LatexSurveyElement{
#ce vprasanje nima moznih odgovorov, je potrebno zakljuciti environment (absolutelynopagebreak) pri pdf
//echo $rowVrstic[0]."za spremenljivko: ".$spremenljivke['tip']."</br>";
if($rowVrstic[0]==0 && (in_array($spremenljivke['tip'], array(1, 2, 3, 6, 16, 17, 20, 9, 19, 17))) ){
if($this->export_format == 'pdf'){ //ce je pdf
if($spremenljivke['orientation']==0 || $spremenljivke['orientation']==2){ //ce sta vodoravni orientaciji
$tex .= $this->texNewLine; //dodaj na koncu vprasanja prazno vrstico
@ -377,7 +307,8 @@ class LatexSurveyElement{
$tex .= $this->texBigSkip;
$tex .= $this->texBigSkip;
$tex .= '\\end{absolutelynopagebreak}'; //zakljucimo environment, da med vprasanji ne bo prelomov strani
}else{ //ce je rtf
}
else{ //ce je rtf
if($spremenljivke['orientation']==0 || $spremenljivke['orientation']==2){ //ce sta vodoravni orientaciji
$tex .= $this->texNewLine; //dodaj na koncu vprasanja prazno vrstico
}
@ -387,7 +318,7 @@ class LatexSurveyElement{
}
#ce vprasanje nima moznih odgovorov, je potrebno zakljuciti environment (absolutelynopagebreak) pri pdf - konec
}
//echo "tex: ".$tex."</br>";
return $tex;
}
#funkcija, ki pripravi latex kodo za prikazovanje besedila vprasanja - konec ############################################################################

View File

@ -175,10 +175,6 @@
$sql = sisplet_query("SELECT email FROM users WHERE id='$global_user_id'");
$row = mysqli_fetch_assoc($sql);
if ( $row['email'] == 'test@1ka.si') {
$cssBodyClass .= ' test_user';
}
/**************** BODY ****************/
echo '<body class="mainBody'.$cssBodyClass.'">'."\n";

View File

@ -20,20 +20,12 @@ return [
// jquery in jquery ui vkljucimo ze minificirana, da bo slo mal hitrej
new Minify_Source(['filepath' => dirname(__FILE__).'/../script/jquery/ui-1.8.18/js/jquery-1.7.1.min.js',]),
// fix za IE in draggables -- http://dev.jqueryui.com/ticket/5374 (v novi verziji zgleda da to dela)
//new Minify_Source( array('filepath' => dirname(__FILE__) .'/../script/jquery/ui-1.8.4/js/jquery-1.4.2.mod.min.js',)),
//dirname(__FILE__) .'/../script/jquery/ui-1.8.4/development-bundle/jquery-1.4.2.mod.js',
// Priprava za posodobitev jQuery na novejšo verzijo
// dirname(__FILE__).'/../script/jquery/jquery-1.12.4.min.js',
// dirname(__FILE__).'/../script/jquery/jquery-migrate-1.4.1.js',
new Minify_Source(['filepath' => dirname(__FILE__).'/../script/jquery/ui-1.8.18/js/jquery-ui-1.8.18.custom.min.js',]),
//new Minify_Source( array('filepath' => dirname(__FILE__) .'/../script/jquery/ui-1.8.4/js/jquery-ui-1.8.4.custom.min.js',)),
new Minify_Source(['filepath' => dirname(__FILE__).'/../script/jquery/ui.drag_drop_selectable.js',]),
new Minify_Source(['filepath' => dirname(__FILE__).'/../script/jquery/jquery_touch_punch/jquery.ui.touch-punch.min.js',]),
//dirname(__FILE__) .'/../script/jquery/ui.draggable.orig.js',
dirname(__FILE__).'/../script/mobileMenu/zeynep.min.js',
dirname(__FILE__).'/../script/jquery/jquery.timer.js',
dirname(__FILE__).'/../script/jquery/farbtastic.js',
@ -45,6 +37,7 @@ return [
dirname(__FILE__).'/../script/onload.js',
dirname(__FILE__).'/../script/script.js',
dirname(__FILE__).'/../script/mobile.js',
dirname(__FILE__).'/../script/branching.js',
dirname(__FILE__).'/../script/folders.js',
dirname(__FILE__).'/../script/surveyList.js',
@ -196,6 +189,9 @@ return [
new Minify_Source(['filepath' => dirname(__FILE__).'/../script/jquery/ui-1.8.18/js/jquery-1.7.1.min.js',]),
new Minify_Source(['filepath' => dirname(__FILE__).'/../script/jquery/ui-1.8.18/js/jquery-ui-1.8.18.custom.min.js',]),
dirname(__FILE__).'/../script/mobileMenu/zeynep.min.js',
dirname(__FILE__).'/../script/mobile.js',
dirname(__FILE__).'/../script/datatables/jquery.dataTables.min.js',
dirname(__FILE__).'/../script/select2/select2.min.js',
dirname(__FILE__).'/../script/datatables/dataTables.buttons.min.js',

View File

@ -32,25 +32,199 @@ library(Cairo)
#---------------- //LIBRARIES// -----------------#
# #-------------------- CUSTOM FUNCTIONS ------------------------#
# # In case of slovenian ČŽŠ we have problems when using PDF to
# # capture image and saving it on 1KA server, so we replace them
# replace.characters <- function(vector.to.tidy){
# vector.to.tidy <- gsub("-", "", vector.to.tidy)
# vector.to.tidy <- gsub(" ", "", vector.to.tidy)
# vector.to.tidy <- gsub("\\.", "", vector.to.tidy)
# vector.to.tidy <- gsub("\\&", "", vector.to.tidy)
# vector.to.tidy <- gsub("\u010C", "C", vector.to.tidy)
# vector.to.tidy <- gsub("\u0160", "S", vector.to.tidy)
# vector.to.tidy <- gsub("\u017D", "Z", vector.to.tidy)
# vector.to.tidy <- gsub("\u010D", "c", vector.to.tidy)
# vector.to.tidy <- gsub("\u0161", "s", vector.to.tidy)
# vector.to.tidy <- gsub("\u017E", "z", vector.to.tidy)
# vector.to.tidy <- gsub("\u017E", "z", vector.to.tidy)
# vector.to.tidy <- gsub("[(\\...\\,)]", "", vector.to.tidy)
# return(vector.to.tidy)
# }
# #------------------ //CUSTOM FUNCTIONS// ----------------------#
#-------------------- MODOFY RADARSHART FUNCTION ------------------------#
# In order to rotate labels the original function must be modyfied
radarchart2 <-
function (df, axistype = 0, seg = 4, pty = 16, pcol = 1:8, plty = 1:6,
plwd = 1, pdensity = NULL, pangle = 45, pfcol = NA, cglty = 3,
cglwd = 1, cglcol = "navy", axislabcol = "blue",
title = "", maxmin = TRUE, na.itp = TRUE, centerzero = FALSE,
vlabels = NULL, vlcex = NULL, caxislabels = NULL, calcex = NULL,
paxislabels = NULL, palcex = NULL, ...)
{
if (!is.data.frame(df)) {
cat("The data must be given as dataframe.\n")
return()
}
if ((n <- length(df)) < 3) {
cat("The number of variables must be 3 or more.\n")
return()
}
if (maxmin == FALSE) {
dfmax <- apply(df, 2, max)
dfmin <- apply(df, 2, min)
df <- rbind(dfmax, dfmin, df)
}
plot(c(-1.2, 1.2), c(-1.2, 1.2), type = "n", frame.plot = FALSE,
axes = FALSE, xlab = "", ylab = "", main = title,
asp = 1, ...)
theta <- seq(90, 450, length = n + 1) * pi/180
theta <- theta[1:n]
xx <- cos(theta)
yy <- sin(theta)
CGap <- ifelse(centerzero, 0, 1)
for (i in 0:seg) {
polygon(xx * (i + CGap)/(seg + CGap), yy * (i + CGap)/(seg +
CGap), lty = cglty, lwd = cglwd, border = cglcol)
if (axistype == 1 | axistype == 3)
CAXISLABELS <- paste(i/seg * 100, "(%)")
if (axistype == 4 | axistype == 5)
CAXISLABELS <- sprintf("%3.2f", i/seg)
if (!is.null(caxislabels) & (i < length(caxislabels)))
CAXISLABELS <- caxislabels[i + 1]
if (axistype == 1 | axistype == 3 | axistype == 4 | axistype ==
5) {
if (is.null(calcex))
text(-0.05, (i + CGap)/(seg + CGap), CAXISLABELS,
col = axislabcol)
else text(-0.05, (i + CGap)/(seg + CGap), CAXISLABELS,
col = axislabcol, cex = calcex)
}
}
if (centerzero) {
arrows(0, 0, xx * 1, yy * 1, lwd = cglwd, lty = cglty,
length = 0, col = cglcol)
}
else {
arrows(xx/(seg + CGap), yy/(seg + CGap), xx * 1, yy *
1, lwd = cglwd, lty = cglty, length = 0, col = cglcol)
}
PAXISLABELS <- df[1, 1:n]
if (!is.null(paxislabels))
PAXISLABELS <- paxislabels
if (axistype == 2 | axistype == 3 | axistype == 5) {
if (is.null(palcex))
text(xx[1:n], yy[1:n], PAXISLABELS, col = axislabcol)
else text(xx[1:n], yy[1:n], PAXISLABELS, col = axislabcol,
cex = palcex)
}
VLABELS <- colnames(df)
if (!is.null(vlabels))
VLABELS <- vlabels
if (is.null(vlcex))
text(xx * 1.2, yy * 1.2, VLABELS, srt=20)
else text(xx * 1.2, yy * 1.2, VLABELS, cex = vlcex, srt=20)
series <- length(df[[1]])
SX <- series - 2
if (length(pty) < SX) {
ptys <- rep(pty, SX)
}
else {
ptys <- pty
}
if (length(pcol) < SX) {
pcols <- rep(pcol, SX)
}
else {
pcols <- pcol
}
if (length(plty) < SX) {
pltys <- rep(plty, SX)
}
else {
pltys <- plty
}
if (length(plwd) < SX) {
plwds <- rep(plwd, SX)
}
else {
plwds <- plwd
}
if (length(pdensity) < SX) {
pdensities <- rep(pdensity, SX)
}
else {
pdensities <- pdensity
}
if (length(pangle) < SX) {
pangles <- rep(pangle, SX)
}
else {
pangles <- pangle
}
if (length(pfcol) < SX) {
pfcols <- rep(pfcol, SX)
}
else {
pfcols <- pfcol
}
for (i in 3:series) {
xxs <- xx
yys <- yy
scale <- CGap/(seg + CGap) + (df[i, ] - df[2, ])/(df[1,
] - df[2, ]) * seg/(seg + CGap)
if (sum(!is.na(df[i, ])) < 3) {
cat(sprintf("[DATA NOT ENOUGH] at %d\n%g\n",
i, df[i, ]))
}
else {
for (j in 1:n) {
if (is.na(df[i, j])) {
if (na.itp) {
left <- ifelse(j > 1, j - 1, n)
while (is.na(df[i, left])) {
left <- ifelse(left > 1, left - 1, n)
}
right <- ifelse(j < n, j + 1, 1)
while (is.na(df[i, right])) {
right <- ifelse(right < n, right + 1, 1)
}
xxleft <- xx[left] * CGap/(seg + CGap) +
xx[left] * (df[i, left] - df[2, left])/(df[1,
left] - df[2, left]) * seg/(seg + CGap)
yyleft <- yy[left] * CGap/(seg + CGap) +
yy[left] * (df[i, left] - df[2, left])/(df[1,
left] - df[2, left]) * seg/(seg + CGap)
xxright <- xx[right] * CGap/(seg + CGap) +
xx[right] * (df[i, right] - df[2, right])/(df[1,
right] - df[2, right]) * seg/(seg + CGap)
yyright <- yy[right] * CGap/(seg + CGap) +
yy[right] * (df[i, right] - df[2, right])/(df[1,
right] - df[2, right]) * seg/(seg + CGap)
if (xxleft > xxright) {
xxtmp <- xxleft
yytmp <- yyleft
xxleft <- xxright
yyleft <- yyright
xxright <- xxtmp
yyright <- yytmp
}
xxs[j] <- xx[j] * (yyleft * xxright - yyright *
xxleft)/(yy[j] * (xxright - xxleft) - xx[j] *
(yyright - yyleft))
yys[j] <- (yy[j]/xx[j]) * xxs[j]
}
else {
xxs[j] <- 0
yys[j] <- 0
}
}
else {
xxs[j] <- xx[j] * CGap/(seg + CGap) + xx[j] *
(df[i, j] - df[2, j])/(df[1, j] - df[2, j]) *
seg/(seg + CGap)
yys[j] <- yy[j] * CGap/(seg + CGap) + yy[j] *
(df[i, j] - df[2, j])/(df[1, j] - df[2, j]) *
seg/(seg + CGap)
}
}
if (is.null(pdensities)) {
polygon(xxs, yys, lty = pltys[i - 2], lwd = plwds[i -
2], border = pcols[i - 2], col = pfcols[i -
2])
}
else {
polygon(xxs, yys, lty = pltys[i - 2], lwd = plwds[i -
2], border = pcols[i - 2], density = pdensities[i -
2], angle = pangles[i - 2], col = pfcols[i -
2])
}
points(xx * scale, yy * scale, pch = ptys[i - 2],
col = pcols[i - 2])
}
}
}
#------------------ //MODIFY RADARSHART FUNCTION// ----------------------#
@ -74,14 +248,18 @@ data <- read.csv2(
data <-
subset(data,
!is.na(data$V2) | data$V2 < 0)
# Because we will reverse the order
# client wopudl liek to have
# Label 1 at 12.00 in plot
data <- rbind( data[-1, ], data[1, ])
#--------------------------- // READ DATA // ------------------------#
#-------------------------- RADAR CHART -----------------------------#
CairoPNG(paste0('../../admin/survey/modules/mod_NIJZ/results/radar_', respondent_id, '.png'), width = 900, height = 700) # Export chart to png
# Create rang which will be labeld in grapf (10 likert scale)
myrange <- c(min(data$V2), max(data$V2))
myrange <- c(0, 7)
# create a data frame with the max and min as the first two rows
mydf <-
@ -90,16 +268,15 @@ mydf <-
# Add names which will be displayed as labels in
# chart and also their means in parentheses
labels <- gsub('(.{1,30})(\\s|$)', '\\1\n', data$V1)
# Deljenje besed zaradi preglednosti
labels <- gsub('(.{1,18})(\\s|$)', '\\1\n', data$V1)
colnames(mydf) <- labels
# Deljenje besed zaradi preglednosti
par(col="#004078", font = 2)
# Nastavitve fonta na željo naročnika
par(col="#004078", font = 2, cex = 0.8, xpd = TRUE)
# Plot a radar chart
radarchart(
mydf,
radarchart2(
rev(mydf),
pcol = "#D0D0D0",
pfcol = scales::alpha("#D0D0D0", 0.5),
# Customize the grid
@ -111,9 +288,9 @@ radarchart(
na.itp = FALSE,
plwd = 3,
plty = 1,
seg = max(data$V2),
seg = 7,
axistype = 1,
caxislabels = min(data$V2):max(data$V2),
caxislabels = 0:7,
centerzero = TRUE
)

View File

@ -13,6 +13,24 @@ class SurveyNIJZ{
private $vprasanja_radar = array(); // array z vsemi vprasanji in odgovori na njih, ki jih obravnavamo
// Barve
private $colors = array(
1 => '9966cc',
2 => 'cc0099',
3 => 'FFD700',
4 => 'cc6699',
5 => 'FFA500',
6 => '008000',
7 => '3399cc',
8 => '99cc33',
9 => '0099cc',
10 => '669900',
11 => '66cc99',
12 => 'FF0000',
13 => 'FF8C00',
14 => '99cccc',
);
function __construct($anketa, $usr_id){
@ -81,7 +99,7 @@ class SurveyNIJZ{
global $lang;
global $site_url;
$this->createRadar();
$radar_image = $this->createRadar();
// CSS:)
echo '<style>
@ -90,6 +108,7 @@ class SurveyNIJZ{
}
.nijz_radar_holder h1.radar_title{
padding-top: 20px;
background-image: none !important;
}
.nijz_radar_holder img{
@ -99,19 +118,44 @@ class SurveyNIJZ{
echo '<div class="spremenljivka nijz_radar_holder">';
echo '<h1 class="nijz_title radar_title">Naslov grafa</h1>';
echo '<h1 class="nijz_title radar_title">Ocena bivalnega okolja</h1>';
echo '<img src="'.$site_url.RESULTS_FOLDER.'/radar_'.$this->usr_id.'.png">';
echo '<img src="'.$radar_image.'">';
echo '</div>';
}
// Prikazemo radar graf po temah v pdf izvozu
public function displayRadarLatex(){
global $lang;
global $site_path;
$this->createRadar();
$tex = '';
$tex .= '\graphicspath{ {'.$site_path.RESULTS_FOLDER.'/} }';
$radar_image = 'radar_'.$this->usr_id.'.png';
//$radar_image = 'radar.png';
// Vstavimo graf
$tex .= '
\begin{center}
\includegraphics[width=15cm]{'.$radar_image.'}
\end{center}
';
return $tex;
}
// Prikazemo tabelo po temah
public function displayTable(){
global $lang;
// CSS:)
echo '<style>
echo '<style>';
echo '
.nijz_table_holder{
}
@ -137,25 +181,20 @@ class SurveyNIJZ{
border: 1px #505050 solid;
}
.nijz_table_holder table.nijz_table tr td.tema1{ color: #9966cc; }
.nijz_table_holder table.nijz_table tr td.tema2{ color: #cc0099; }
.nijz_table_holder table.nijz_table tr td.tema3{ color: #FFD700; }
.nijz_table_holder table.nijz_table tr td.tema4{ color: #cc6699; }
.nijz_table_holder table.nijz_table tr td.tema5{ color: #FFA500; }
.nijz_table_holder table.nijz_table tr td.tema6{ color: #008000; }
.nijz_table_holder table.nijz_table tr td.tema7{ color: #3399cc; }
.nijz_table_holder table.nijz_table tr td.tema8{ color: #99cc33; }
.nijz_table_holder table.nijz_table tr td.tema9{ color: #0099cc; }
.nijz_table_holder table.nijz_table tr td.tema10{ color: #669900; }
.nijz_table_holder table.nijz_table tr td.tema11{ color: #66cc99; }
.nijz_table_holder table.nijz_table tr td.tema12{ color: #FF0000; }
.nijz_table_holder table.nijz_table tr td.tema13{ color: #FF8C00; }
.nijz_table_holder table.nijz_table tr td.tema14{ color: #99cccc; }
</style>';
.nijz_table_holder table.nijz_table tr td:nth-child(1),
.nijz_table_holder table.nijz_table tr td:nth-child(3){
width: 280px;
}
';
foreach($this->colors as $key => $color){
echo '.nijz_table_holder table.nijz_table tr td.tema'.$key.'{ color: #'.$color.'; }';
}
echo '</style>';
echo '<div class="spremenljivka nijz_table_holder">';
echo '<h1 class="nijz_title table_title">Naslov tabele</h1>';
//echo '<h1 class="nijz_title table_title">Naslov tabele</h1>';
$half = round(count($this->vprasanja_radar) / 2);
@ -179,10 +218,49 @@ class SurveyNIJZ{
echo '</div>';
}
// Prikazemo tabelo po temah v pdf izvozu
public function displayTableLatex(){
global $lang;
$half = round(count($this->vprasanja_radar) / 2);
$tex = '';
// Definiramo barve
foreach($this->colors as $key => $color){
$tex .= '\definecolor{tablecolor'.$key.'}{HTML}{'.$color.'}';
}
// Vstavimo tabelo
$tex .= '
\begin{table}[h]
\centering
\begin{tabular}{|>{\raggedright}p{6cm}|c|>{\raggedright}p{6cm}|c|}
';
for($i=1; $i<=$half; $i++) {
$tex .= ' \hline ';
$tex .= '\textcolor{tablecolor'.$i.'}{'.$this->vprasanja_radar[$i]['naslov'].'} & \textcolor{tablecolor'.$i.'}{'.$this->vprasanja_radar[$i]['data'].'} & ';
$j = $i + $half;
$tex .= '\textcolor{tablecolor'.$j.'}{'.$this->vprasanja_radar[$j]['naslov'].'} & \textcolor{tablecolor'.$j.'}{'.$this->vprasanja_radar[$j]['data'].'}';
$tex .= ' \\\\ ';
}
$tex .= '
\hline
\end{tabular}
\end{table}
';
return $tex;
}
// Zgeneriramo pdf analizo
private function createRadar(){
public function createRadar(){
global $site_path;
global $site_url;
global $admin_type;
// Najprej pocistimo morebitno obstojeco sliko grafa
@ -197,9 +275,11 @@ class SurveyNIJZ{
$out = exec('Rscript '.$script.' '.$this->usr_id.' 2>&1', $output, $return_var);
}
catch(Exception $e){
echo $e->getMessage();
return $e->getMessage();
}
$radar_image = $site_url.RESULTS_FOLDER.'/radar_'.$this->usr_id.'.png';
// Testiranje - izpis errorjev
/*if($admin_type == 0){
echo '<div>';
@ -211,6 +291,8 @@ class SurveyNIJZ{
// Na koncu pobrisemo zacasne datoteke
$this->deleteTemp();
return $radar_image;
}
// Pripravimo zacasne datoteke

View File

@ -0,0 +1,72 @@
calc.usability <- function(m.all, return.type){
# return.type:
# 1: return only absolute
# 2: return only %
# 3: return both (even rows: absolute, odd rows: %)
## calculations
m.all[, Prekinitve:=v3]
m.all[, Neodgovori:=v1]
m.all[, Nevsebinski:=v96+v97+v98+v99]
m.all[, Izpostavljen:=allqs-(v2+v3+v4+v5)]
setnames(m.all, "va", "Veljavni")
m.all[, UNL:=Neodgovori/Izpostavljen]
m.all[is.na(UNL)==T, UNL:=0]
m.all[, UML:=(v3/allqs)+(1-(v3/allqs))*UNL]
m.all[, UCL:=1-UML]
m.all[, UIL:=v2/(v2+Izpostavljen)]
m.all[is.na(UIL)==T, UIL:=0]
m.all[, UAQ:=v4/allqs]
m.all[, Uporabnost:=1-UML]
#tidy up
setcolorder(m.all, c("recnum", "allqs", "Veljavni", "Nevsebinski", "Neodgovori",
"Izpostavljen", "Prekinitve", "Uporabnost",
"v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99",
"UNL", "UML", "UCL", "UIL", "UAQ"))
if(return.type==1){
return(m.all)
}else{
m.all.p <- copy(m.all)
m.all.p[, (c("Veljavni", "Nevsebinski", "Neodgovori")) := lapply(.SD, "/", m.all.p$Izpostavljen), .SDcols=c("Veljavni", "Nevsebinski", "Neodgovori")]
m.all.p[, (c("Prekinitve", "v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99")) := lapply(.SD, "/", m.all.p$allqs), .SDcols=c("Prekinitve", "v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99")]
m.all.p[, Izpostavljen:=1]
if(return.type==2){
return(m.all.p)
}else{
m.all[, Uporabnost:=Veljavni]
m.all[, c("UNL", "UML", "UCL", "UIL", "UAQ"):=NA]
m.all <- m.all[, lapply(.SD, as.character)]
m.all.p[, allqs:=NA]
m.all.p[, allqs:=as.character(allqs)]
change.cols <- c("Veljavni", "Nevsebinski", "Neodgovori", "Izpostavljen", "Prekinitve", "Uporabnost",
"v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99",
"UNL", "UML", "UCL", "UIL", "UAQ")
m.all.p[, (change.cols):=lapply(.SD, function(x){paste0(round(x*100, 0), "%")}), .SD=change.cols]
m.1ka <- data.table(matrix("", nrow=nrow(m.all)*2, ncol=ncol(m.all)))
a.rows <- as.integer(seq(1, nrow(m.1ka), by=2))
p.rows <- as.integer(seq(2, nrow(m.1ka), by=2))
set(m.1ka, a.rows, 1:ncol(m.1ka), value=m.all)
suppressWarnings(set(m.1ka, p.rows, 1:ncol(m.1ka), value=m.all.p))
setnames(m.1ka, colnames(m.all))
m.1ka[, Status:=NA_character_]
setcolorder(m.1ka, c("recnum", "allqs", "Veljavni", "Nevsebinski", "Neodgovori",
"Izpostavljen", "Prekinitve", "Uporabnost", "Status",
"v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99",
"UNL", "UML", "UCL", "UIL", "UAQ"))
return(m.1ka)
}
}
}

View File

@ -0,0 +1,71 @@
gen.survey.str <- function(colnames.dsa, questions.file, items.file){
#import questions file
questions <- fread(questions.file, skip=1, header=F,
select=c(2, 5, 6, 8, 9, 10),
col.names=c("question.id", "variable", "tip", "size", "visible", "params"))
#create variable list from survey data file
#remove "recnum" and "_text" fields
var.data <- colnames.dsa[sapply(colnames.dsa, function(x){substr(x, nchar(x)-4, nchar(x))})!="_text"]
#create variable list from questions file
var.questions <- questions$variable
#generate data.table from var.data list
survey.str <- data.table(variable = var.data)
setkey(questions, "variable")
setkey(survey.str, "variable")
#if all var.data in var.questions, do the simple merge and return file
if(all(var.data %in% var.questions)){
survey.str <- questions[survey.str,]
return(survey.str)
}else{ #if not, import items file and do additional merge with it...
#import items file
items <- fread(items.file, skip=1, header=F,
select=c(2, 3, 4),
col.names=c("question.id", "item.id", "variable"))
setkey(items, "question.id")
setkey(questions, "question.id")
#bind variables from questions and items (for the later, only take instances with no match in the questions file...)
survey.str.qi <- rbindlist(list(questions[var.questions %in% var.data,],
items[questions[!(var.questions %in% var.data), -"variable", with=F], nomatch=0L]),
fill=T)
#merge questions+items with survey data...
setkey(survey.str.qi, "variable")
setkey(survey.str, "variable")
survey.str <- survey.str.qi[survey.str,]
#if all var.data is now matched, return the survey.str
if(!(any(is.na(survey.str)))){
return(survey.str)
}else{ #if not, do additional merging...
#create index of all NA instaces from survey.str...
index <- apply(cbind(survey.str[, is.na(tip)],
(sapply(survey.str[, variable], function(x){
substr(x, 1, regexpr("\\_[^\\_]*$", x)-1)
}) %in% survey.str.qi$variable)
),
1, all)
#... using regex to find matches among unmatched instances from survey.str.qi
add <- merge(survey.str[index, list(variable, substr(variable, 1, regexpr("\\_[^\\_]*$", variable)-1))],
survey.str.qi[!(variable %in% survey.str$variable),],
by.x="V2", by.y="variable", all.y=F)[, list(question.id, item.id, tip, visible, size, params)]
#update survey.str with new values
survey.str[index, c("question.id", "item.id", "tip", "visible", "size", "params") := as.list(add)]
#if there is no NAs left, return survey.str, else return msg
if(!(any(is.na(survey.str$tip)))){
return(survey.str)
}else{
return(paste("No match found for: ", survey.str[is.na(tip), variable]))
}
}
}
}

View File

@ -0,0 +1,181 @@
gen.usability.matrix <- function(dsa, survey.str){
#define special values to detect
#order of this values is important:
# in case of conflicts @ chk.t types of questions the order sets the priporty of which values to keep
special.v <- c(-1, -3, -5, -96, -97, -98, -99, -4, -2)
#define which variables belong to checkbox-like* questions
#(* i.e.: check for special values @ ANY variable per question/item ID)
# 2: normal checkbox
# 16: multicheckbox
# 17: ranking
chkbox.t <- c(2, 16, 17)
##all other variables belong to normal** questions
#(** i.e.: check for special values @ each variable per question/item ID)
#if there are no normal questions, create 0 matrix, otherwise...
if(nrow(survey.str[!(tip %in% chkbox.t),])==0){
m.n <- matrix(0, nrow = nrow(dsa), ncol=length(special.v)+1)
}else{
#create list of all normal questions
c.n <- colnames(dsa)[which(colnames(dsa) %in% survey.str[!(tip %in% chkbox.t), variable])]
#...count all non-special values for each variable
#... + count each special value for each variable
m.n <- cbind(rowSums(sapply(dsa[, c.n, with=FALSE], function(x){!(x %in% special.v)})),
sapply(special.v, function(x){as.integer(rowSums(dsa[, c.n, with=FALSE]==x, na.rm=TRUE))}))
}
##procedure for tip:2
#only run if there is an at least one tip:2 variable
if(survey.str[, any(tip==2)]){
#get list of all unique tip:2 question ids
q.2 <- unique(survey.str[tip==2, question.id])
#get list of all corresponding variables for each q.2 id
c.2 <- lapply(q.2, function(x){colnames(dsa)[which(colnames(dsa) %in% survey.str[question.id==x & tip==2, variable])]})
#(do this for each instance in c.2):
#for each set of variables:
# check if any variable contains at least one non-special value
# + (for each special value) check if any variable contains at least special value
m.2 <- lapply(c.2, function(x){
cbind(apply(dsa[, x, with=FALSE], 1, function(q){any(!(q %in% special.v))}),
sapply(special.v, function(y){
apply(dsa[, x, with=FALSE], 1, function(q){any(q==y)})
})
)
})
# (do this for each instance in c.2)
# if multiple special values per respondent exist, keep only the first one
m.2 <- lapply(m.2, function(x){
if(any(rowSums(x)>1)){
p <- x[rowSums(x)>1,]
for(i in 1:nrow(p)){
a <- p[i,]
f <- TRUE
for(j in 1:length(a)){
print(j)
if(a[j] & f){
f <- FALSE
}else if(a[j] & !f){
a[j] <- FALSE
}
}
p[i,] <- a
}
x[rowSums(x)>1,] <- p
}else{x}
})
#add to m.n
m.n <- m.n + Reduce('+', m.2)
}
##procedure for tip:16
#only run if there is an at least one tip:16 variable
if(survey.str[, any(tip==16)]){
#get list of all unique tip:16 item ids
q.16 <- unique(survey.str[tip==16, item.id])
#get list of all corresponding variables for each q.16 id
c.16 <- lapply(q.16, function(x){colnames(dsa)[which(colnames(dsa) %in% survey.str[item.id==x & tip==16, variable])]})
#(do this for each special value):
#for each set of variables, check if any variable contains at least one special value
# m.16 <- sapply(special.v, function(x){
# rowSums(sapply(c.16, function(y){
# apply(dsa[, y, with=FALSE], 1, function(q){any(q==x)})
# }))
# })
#(do this for each instance in c.16):
#for each set of variables:
# check if any variable contains at least one non-special value
# + (for each special value) check if any variable contains at least special value
m.16 <- lapply(c.16, function(x){
cbind(apply(dsa[, x, with=FALSE], 1, function(q){any(!(q %in% special.v))}),
sapply(special.v, function(y){
apply(dsa[, x, with=FALSE], 1, function(q){any(q==y)})
})
)
})
# (do this for each instance in c.16)
# if multiple special values per respondent exist, keep only the first one
m.16 <- lapply(m.16, function(x){
if(any(rowSums(x)>1)){
p <- x[rowSums(x)>1,]
for(i in 1:nrow(p)){
a <- p[i,]
f <- TRUE
for(j in 1:length(a)){
print(j)
if(a[j] & f){
f <- FALSE
}else if(a[j] & !f){
a[j] <- FALSE
}
}
p[i,] <- a
}
x[rowSums(x)>1,] <- p
}else{x}
})
m.n <- m.n + Reduce('+', m.16)
}
##procedure for tip:17
#only run if there is an at least one tip:17 variable
if(survey.str[, any(tip==17)]){
#get list of all unique tip:17 question ids
q.17 <- unique(survey.str[tip==17, question.id])
#get list of all corresponding variables for each q.17 id
c.17 <- lapply(q.17, function(x){colnames(dsa)[which(colnames(dsa) %in% survey.str[question.id==x & tip==17, variable])]})
#similiar procedure as for tip:2 and tip:16....
m.17 <- lapply(c.17, function(x){
cbind(apply(dsa[, x, with=FALSE], 1, function(q){any(!(q %in% special.v))}),
sapply(special.v, function(y){
apply(dsa[, x, with=FALSE], 1, function(q){any(q==y)})
})
)
})
#... the only difference is that we are checking for all rowsums > 0, not > 1
m.17 <- lapply(m.17, function(x){
if(any(rowSums(x)>1)){
p <- x[rowSums(x)>0,]
for(i in 1:nrow(p)){
a <- p[i,]
f <- TRUE
for(j in 1:length(a)){
if(a[j] & f){
f <- FALSE
}else if(a[j] & !f){
a[j] <- FALSE
}
}
p[i,] <- a
}
x[rowSums(x)>0,] <- p
}else{x}
})
m.n <- m.n + Reduce('+', m.17)
}
m.n <- cbind(m.n, rowSums(m.n))
if(all(m.n[, ncol(m.n)][1]==m.n[, ncol(m.n)])){
m.n <- as.data.table(m.n)
m.n[, recnum:=dsa$recnum]
setnames(m.n, colnames(m.n)[-length(colnames(m.n))], c("va", "v1", "v3", "v5", "v96", "v97", "v98", "v99", "v4", "v2", "allqs"))
setcolorder(m.n, c("recnum", colnames(m.n)[-length(colnames(m.n))]))
return(m.n)
}else{
print("not all rowsums equal!")
}
}

View File

@ -0,0 +1,47 @@
#uporabnost <- function(params){
#setwd("path od mape, kjer se nahaja ta glavna datoteka, npr. C:/mapa")
# Import data.table & functions ------------------------------------------------------
require("data.table")
source("modules/mod_uporabnost/R/gen.survey.str.R")
source("modules/mod_uporabnost/R/gen.usability.matrix.R")
source("modules/mod_uporabnost/R/calc.usability.R")
# Input data ------------------------------------------------------
params <- commandArgs(trailingOnly = TRUE)
ID <- params[1]
#get & import dsa: the main survey data file (containing only recnum, status, lurker and all variables relating to answers to survey questions)
dsa.file <- paste0("modules/mod_uporabnost/temp/data_", ID, ".csv")
dsa <- fread(dsa.file, header=T, drop=c(1:5, 7, 8))
#get question and item files
questions.file <- paste0("modules/mod_uporabnost/temp/questions_", ID, ".csv")
items.file <- paste0("modules/mod_uporabnost/temp/items_", ID, ".csv")
# Main & Output ------------------------------------------------------
#generate survey structure
survey.str <- gen.survey.str(colnames(dsa)[-(1)], questions.file, items.file)
if(any(!(is.data.table(survey.str)), nrow(survey.str)==0)){
write(survey.str, paste0("modules/mod_uporabnost/results/usability_", ID, ".csv"))
}else{
#delete invisible variables and types: 5, 9, 22, 23, 25
survey.str <- survey.str[visible==1 & !(tip %in% c(5, 9, 22, 23, 25)),]
#generate usability matrix
m.all <- gen.usability.matrix(dsa, survey.str)
if(any(!(is.data.table(m.all)), nrow(m.all)==0)){
write(m.all, paste0("modules/mod_uporabnost/results/usability_", ID, ".csv"))
}else{
#calculate usability indexes
m.final <- calc.usability(m.all, 3)
#write to results
write.csv2(m.final, paste0("modules/mod_uporabnost/results/usability_", ID, ".csv"), row.names = FALSE)
}
}
#}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,2 @@
*
!.gitignore

View File

@ -0,0 +1,2 @@
*
!.gitignore

View File

@ -1751,12 +1751,12 @@ function smtpAAIAccept(){
function squaloSwitch(){
if($('#squalo_mode').prop('checked')){
$('#send_mail_mode0, #send_mail_mode1, #send_mail_mode2, .mail_mode_switch').hide();
$('#send_mail_mode0, #send_mail_mode1, #send_mail_mode2, .mail_mode_switch, #send_mail_mode_test').hide();
//$('.squalo_settings').show();
}
else{
$('.squalo_settings').hide();
$('#send_mail_mode2, .mail_mode_switch').show();
$('#send_mail_mode2, .mail_mode_switch, #send_mail_mode_test').show();
}
}

View File

@ -192,6 +192,7 @@ lang('srv_alert_upload_size');
lang('srv_alert_upload_ext');
lang('srv_trans_lang');
lang('srv_manager_remove_alert');
lang('srv_resevanje_foto_pre_result');
//LOKACIJA

View File

@ -0,0 +1,37 @@
function mobile_init(){
// init zeynepjs side menu
var zeynep = $('.mobile_menu').zeynep({
opened: function () {
},
closed: function () {
}
})
// dynamically bind 'closing' event
zeynep.on('closing', function () {
})
// handle zeynepjs overlay click
$('.mobile_menu_close').on('click', function () {
zeynep.close();
$('#fade').fadeOut();
$('.mobile_menu_close').fadeOut('fast', function(){
$('.mobile_menu_open').fadeIn('fast');
});
})
// open zeynepjs side menu
$('.mobile_menu_open').on('click', function () {
zeynep.open();
$('#fade').fadeIn();
$('.mobile_menu_open').fadeOut('fast', function(){
$('.mobile_menu_close').fadeIn('fast');
});
})
}

View File

@ -0,0 +1,9 @@
/*!
* zeynepjs v2.1.2
* A light-weight multi-level jQuery side menu plugin.
* It's fully customizable and is compatible with modern browsers such as Google Chrome, Mozilla Firefox, Safari, Edge and Internet Explorer
* MIT License
* by Huseyin ELMAS
*/
!function(l,s){var n={htmlClass:!0};function i(e,t){this.element=e,this.eventController=o,this.options=l.extend({},n,t),this.options.initialized=!1,this.init()}i.prototype.init=function(){var s=this.element,e=this.options,i=this.eventController.bind(this);!0!==e.initialized&&(i("loading"),s.find("[data-submenu]").on("click",function(e){e.preventDefault();var t,n=l(this).attr("data-submenu"),o=l("#"+n);o.length&&(i("opening",t={subMenu:!0,menuId:n}),s.find(".submenu.current").removeClass("current"),o.addClass("opened current"),s.hasClass("submenu-opened")||s.addClass("submenu-opened"),s.scrollTop(0),i("opened",t))}),s.find("[data-submenu-close]").on("click",function(e){e.preventDefault();var t,n=l(this).attr("data-submenu-close"),o=l("#"+n);o.length&&(i("closing",t={subMenu:!0,menuId:n}),o.removeClass("opened current"),s.find(".submenu.opened:last").addClass("current"),s.find(".submenu.opened").length||s.removeClass("submenu-opened"),o.scrollTop(0),i("closed",t))}),i("load"),this.options.htmlClass&&!l("html").hasClass("zeynep-initialized")&&l("html").addClass("zeynep-initialized"),e.initialized=!0)},i.prototype.open=function(){this.eventController("opening",{subMenu:!1}),this.element.addClass("opened"),this.options.htmlClass&&l("html").addClass("zeynep-opened"),this.eventController("opened",{subMenu:!1})},i.prototype.close=function(e){e||this.eventController("closing",{subMenu:!1}),this.element.removeClass("opened"),this.options.htmlClass&&l("html").removeClass("zeynep-opened"),e||this.eventController("closed",{subMenu:!1})},i.prototype.destroy=function(){this.eventController("destroying"),this.close(!0),this.element.find(".submenu.opened").removeClass("opened"),this.element.removeData(s),this.eventController("destroyed"),this.options=n,this.options.htmlClass&&l("html").removeClass("zeynep-initialized"),delete this.element,delete this.options,delete this.eventController},i.prototype.on=function(e,t){r.call(this,e,t)};var o=function(e,t){if(this.options[e]){if("function"!=typeof this.options[e])throw Error("event handler must be a function: "+e);this.options[e].call(this,this.element,this.options,t)}},r=function(e,t){if("string"!=typeof e)throw Error("event name is expected to be a string but got: "+typeof e);if("function"!=typeof t)throw Error("event handler is not a function for: "+e);this.options[e]=t};l.fn[s]=function(e){var t,n,o;return t=l(this[0]),n=e,o=null,t.data(s)?o=t.data(s):(o=new i(t,n||{}),t.data(s,o)),o}}(window.jQuery,"zeynep");
//# sourceMappingURL=zeynep.min.js.map

View File

@ -9,8 +9,6 @@
$(function() {
//console.time('onload');
load_meta_variables(); // script.js
ajax_start_stop(); // script.js
onload_init(); // script.js
@ -25,9 +23,6 @@ $(function() {
analiza_init(); // script_analiza.js
statistika_init(); // statistika.js
//console.timeEnd('onload');
//browser_alert();
missingProfiles_init(); // missingProfiles.js
missingValues_init(); // missingValues.js
@ -40,7 +35,6 @@ $(function() {
slideshow_init(); // prezendatcije (slideshow)
dataSetingProfile_init(); // nastavitve v analizah in podatkov
invitations_init(); // nastavitve v analizah in podatkov
//themes_init(); // nastavitve v temah
inspect_init(); // nastavitve v inspect
means_init(); // nastavitve v meansih
ttest_init(); // nastavitve v ttest
@ -48,8 +42,4 @@ $(function() {
charts_init(); // nastavitve v charts
creport_init(); // nastavitve v creport
onload_init_recode(); // nastavitve v recodiranju(function($) {
//onload_init_language_technology(); // nastavitve v language technology{
// prestejemo stevilo DOM elementov
//alert(document.getElementsByTagName("*").length);
});

View File

@ -5468,3 +5468,10 @@ function consultingPopupClose(){
$('#popup_note').fadeOut('slow').html('');
$('#fade').fadeOut('slow');
}
// Brisanje datoteke iz podatkov
function removeUploadFromData(usr_id, spr_id, code){
$("#fullscreen").load('ajax.php?t=postprocess&a=edit_data_question_upload_delete', {anketa: srv_meta_anketa_id, usr_id: usr_id, spr_id: spr_id, code: code});
}

52
composer.lock generated
View File

@ -66,16 +66,16 @@
},
{
"name": "fgrosse/phpasn1",
"version": "v2.2.0",
"version": "v2.3.0",
"source": {
"type": "git",
"url": "https://github.com/fgrosse/PHPASN1.git",
"reference": "d1978f7abd580f3fc33561e7f71d4c12c7531fad"
"reference": "20299033c35f4300eb656e7e8e88cf52d1d6694e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/d1978f7abd580f3fc33561e7f71d4c12c7531fad",
"reference": "d1978f7abd580f3fc33561e7f71d4c12c7531fad",
"url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/20299033c35f4300eb656e7e8e88cf52d1d6694e",
"reference": "20299033c35f4300eb656e7e8e88cf52d1d6694e",
"shasum": ""
},
"require": {
@ -133,7 +133,7 @@
"x509",
"x690"
],
"time": "2020-10-11 16:28:18"
"time": "2021-04-24 19:01:55"
},
{
"name": "geoip2/geoip2",
@ -308,16 +308,16 @@
},
{
"name": "guzzlehttp/psr7",
"version": "1.8.1",
"version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "35ea11d335fd638b5882ff1725228b3d35496ab1"
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1",
"reference": "35ea11d335fd638b5882ff1725228b3d35496ab1",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
"shasum": ""
},
"require": {
@ -375,7 +375,7 @@
"uri",
"url"
],
"time": "2021-03-21 16:25:00"
"time": "2021-04-26 09:17:50"
},
{
"name": "maxmind-db/reader",
@ -757,16 +757,16 @@
},
{
"name": "phpmailer/phpmailer",
"version": "v6.4.0",
"version": "v6.4.1",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "050d430203105c27c30efd1dce7aa421ad882d01"
"reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/050d430203105c27c30efd1dce7aa421ad882d01",
"reference": "050d430203105c27c30efd1dce7aa421ad882d01",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9256f12d8fb0cd0500f93b19e18c356906cbed3d",
"reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d",
"shasum": ""
},
"require": {
@ -819,7 +819,7 @@
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"time": "2021-03-31 20:06:42"
"time": "2021-04-29 12:25:04"
},
{
"name": "psr/http-message",
@ -2085,16 +2085,16 @@
},
{
"name": "psr/log",
"version": "1.1.3",
"version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
@ -2118,7 +2118,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
@ -2128,7 +2128,7 @@
"psr",
"psr-3"
],
"time": "2020-03-23 09:12:05"
"time": "2021-05-03 11:20:27"
},
{
"name": "symfony/polyfill-mbstring",
@ -2261,16 +2261,16 @@
},
{
"name": "symfony/var-dumper",
"version": "v4.4.21",
"version": "v4.4.22",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806"
"reference": "c194bcedde6295f3ec3e9eba1f5d484ea97c41a7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/0da0e174f728996f5d5072d6a9f0a42259dbc806",
"reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/c194bcedde6295f3ec3e9eba1f5d484ea97c41a7",
"reference": "c194bcedde6295f3ec3e9eba1f5d484ea97c41a7",
"shasum": ""
},
"require": {
@ -2329,7 +2329,7 @@
"debug",
"dump"
],
"time": "2021-03-27 19:49:03"
"time": "2021-04-19 13:36:17"
}
],
"aliases": [],

View File

@ -71,27 +71,21 @@ function prijava_1ka_block_view($delta = '')
$html .= '<div class="intro-modal intro-aai crta">';
$html .= '<div class="row naslov-url">
<div class="col">
<div class="col text-arnes">
1ka.arnes.si
</div>
</div>';
$html .= '<div class="row">
<div class="col">
<h4>
<span class="modal-intro-title modal-intro-login-text">'.$lang['cms_login_link'].'</span>
<span class="modal-intro-title modal-intro-registration-text"> '.$lang['cms_register_link'].'</span> '
.$lang['cms_intro_modal_aai_title'].'
</h4>
</div>
</div>';
$html .= '<div class="row">
<div class="col">
<p class="besedilo">'.$lang['cms_intro_modal_aai_text'].'</p>
<p class="besedilo" style="padding-top: 0.5rem;">'.$lang['cms_intro_modal_aai_text'].'</p>
<div class="ikona ikona-custom-login ikona-aai" data-login="aai">
<div class="w-button submit-btn gumb-aai">'.$lang['next1'].'</div>
<div class="w-button submit-btn gumb-aai">
<span class="modal-intro-title modal-intro-login-text">'.$lang['login_short'].'</span>
<span class="modal-intro-title modal-intro-registration-text"> '.$lang['e_login_register'].'</span>
</div>
</div>';
//$html .= '<div class="row pojasnilo">
@ -110,25 +104,19 @@ function prijava_1ka_block_view($delta = '')
$html .= '<div class="intro-modal intro-1ka">';
$html .= '<div class="row naslov-url">
<div class="col">
<div class="col modra">
www.1ka.si
</div>
</div>';
$html .= '<div class="row">
<div class="col">
<h4>
<span class="modal-intro-title modal-intro-login-text">'.$lang['cms_login_link'].'</span>
<span class="modal-intro-title modal-intro-registration-text"> '.$lang['cms_register_link'].'</span> '
.$lang['cms_intro_modal_1ka_title'].'
</h4>
</div>
</div>';
$html .= '<div class="row">
<div class="col">
<p class="besedilo">'.$lang['cms_intro_modal_1ka_text'].'</p>
<div class="submit-btn w-button" id="modal-open-1ka">'.$lang['next1'].'</div>
<p class="besedilo" style="padding-top: 0.5rem;">'.$lang['cms_intro_modal_1ka_text'].'<br /><br /></p>
<div class="submit-btn w-button" id="modal-open-1ka">
<span class="modal-intro-title modal-intro-login-text">'.$lang['login_short'].'</span>
<span class="modal-intro-title modal-intro-registration-text"> '.$lang['e_login_register'].'</span>
</div>
</div>
</div>';
@ -562,20 +550,23 @@ function prijava_1ka_block_view($delta = '')
// Naslov
$html .= '<div class="row">
<div class="col">
<h3 class="color-arnes">' . $lang['login_with_aai_title'] . '</h3>
<h3 class="color-arnes center">' . $lang['login_with_aai_title'] . '</h3>
</div>
</div>';
$html .= '<div>
<div class="col w-clearfix">
<a href="https://1ka.arnes.si" class="submit-btn w-button gumb-aai" style="margin: 0;">'.$lang['cms_aai_login_redirect_button'] .'</a>
<div class="col w-clearfix center">
<a href="https://1ka.arnes.si" class="submit-btn w-button gumb-aai" style="margin: 0;">
<span class="modal-intro-title modal-intro-login-text">'.$lang['login_short'].'</span>
<span class="modal-intro-title modal-intro-registration-text"> '.$lang['e_login_register'].'</span>
</a>
</div>
</div>';
$html .= '<p class="aai-obvestilo">'.$lang['cms_aai_login_redirect_text'].'</p>';
for($i=2; $i<5; $i++) {
for($i=2; $i<4; $i++) {
$html .= '<div class="w-clearfix">
<div class="col _4-4-12-12">
<p>' . $lang['cms_aai_login_redirect_text_' . $i] . '</p>
@ -585,8 +576,11 @@ function prijava_1ka_block_view($delta = '')
$html .= '<div>
<div class="col w-clearfix">
<a href="https://1ka.arnes.si" class="submit-btn w-button gumb-aai">'.$lang['cms_aai_login_redirect_button'] .'</a>
<div class="col w-clearfix center">
<a href="https://1ka.arnes.si" class="submit-btn w-button gumb-aai">
<span class="modal-intro-title modal-intro-login-text">'.$lang['login_short'].'</span>
<span class="modal-intro-title modal-intro-registration-text"> '.$lang['e_login_register'].'</span>
</a>
</div>
</div>';

File diff suppressed because one or more lines are too long

View File

@ -189,8 +189,8 @@
.gumb-aai{
background: $arnes;
letter-spacing: 0.5px;
width: 100%;
text-align: center;
float: none;
&:hover{
background: #fa6c21;

View File

@ -71,6 +71,10 @@ $arnes: #E35205;
color: $oranzna;
}
.text-arnes{
color: $arnes;
}
.center {
text-align: center;
}

View File

@ -1642,17 +1642,16 @@ $lang = array (
"cms_activation_error_all_field" => "Vsa polja so obvezna in morajo biti izpolnjena.",
"cms_login_module_title" => '<span class="strong">PRIJAVA</span> in <br /><span class="strong">REGISTRACIJA</span>',
"cms_login_title" => 'Prijava uporabnika 1KA',
"cms_aai_login_redirect_text" => '<b>Študenti, raziskovalci, učitelji</b> in drugi z <b>ArnesAAI računom</b> se lahko prijavite na <a href="https://1ka.arnes.si">1KA.ARNES.SI</a>, kjer lahko <b>brezplačno in neomejeno uporabljate vse napredne 1KA nastavitve</b>.',
"cms_aai_login_redirect_text_2" => 'Na <b>1KA.ARNES.SI</b> se prijavite z vašim »uporabniškim imenom ArnesAAI«, <b>ki ga že uporabljate oziroma imate v organizaciji</b>, kjer ste zaposleni ali se izobražujete. Običajno ima obliko <b>uporabnik@domenaorganizacije.si</b>.',
"cms_aai_login_redirect_text_3" => '<b>Študenti Univerze v Ljubljani</b> ste ob začetku študija prejeli avtomatsko dodeljen AAI račun (digitalna identiteta na UL). Za prijavo uporabite uporabniško ime (npr. up1234@student.uni-lj.si) in geslo vaše <b>digitalne identitete na UL</b>.',
"cms_aai_login_redirect_text_4" => 'V primeru nejasnosti si lahko ogledate pogosta vprašanja glede:<ul><li>pridobivanja in delovanja <a href="https://www.arnes.si/pomoc-uporabnikom/aai/odgovori-na-pogosto-zastavljena-vprasanja/">AAI računa</a>,</li><li>uporabe 1KA z <a href="https://www.1ka.si/d/sl/pomoc/pogosta-vprasanja/pogosta-vprasanja-o-zasebni-poslovni-aai-uporabi-orodja-1ka">ARNES AAI računom (digitalno identiteto)</a>.</li></ul>',
"cms_aai_login_redirect_button" => 'Prijava na 1ka.arnes.si',
"cms_aai_login_redirect_text" => '<b>Študenti, raziskovalci, učitelji, dijaki</b> in drugi z ArnesAAI računom oziroma digitalno identiteto lahko na ločeni namestitvi <a href="https://1ka.arnes.si">1KA.ARNES.SI</a> uporabljajo 1KA <b>brezplačno</b> in <b>brez omejitev</b>.',
"cms_aai_login_redirect_text_2" => '<b>Zaposleni</b> se prijavijo z obstoječim uporabniškim računom, ki ga imajo v določeni javni organizaciji (npr. uporabniskoime@javnaorganizacija.si). <b>Študenti</b> javnih univerz so ob začetku študija prejeli avtomatsko dodeljen ArnesAAI račun oziroma digitalno identiteto (npr. xy1234@student.uni-lj.si), kar uporabijo tudi za 1KA. <b>Dijaki</b> lahko pridobijo odgovarjajoči ArnesAAI račun na njihovi šoli.',
"cms_aai_login_redirect_text_3" => 'V primeru nejasnosti si lahko ogledate pogosta vprašanja glede:<ul><li>Arnes: pridobivanje <a href="https://www.arnes.si/pomoc-uporabnikom/aai/odgovori-na-pogosto-zastavljena-vprasanja/">AAI računa</a>,</li><li>1KA: uporaba z <a href="https://www.1ka.si/d/sl/pomoc/pogosta-vprasanja/pogosta-vprasanja-o-zasebni-poslovni-aai-uporabi-orodja-1ka">ArnesAAI računom</a>.</li></ul>',
"cms_aai_login_redirect_button" => 'Prijava',
"cms_buy_login_description" => 'Za nadaljevanje nakupa morate biti najprej prijavljeni v 1KA sistem.',
"cms_registration_title" => 'Registracija novega uporabnika 1KA',
"cms_intro_modal_aai_title" => "za študente, raziskovalce in učitelje",
"cms_intro_modal_1ka_title" => "za splošne uporabnike,",
"cms_intro_modal_aai_text" => "in druge z AAI računom ali <a href='https://www.1ka.si/d/sl/pomoc/pogosta-vprasanja/pogosta-vprasanja-o-arnes-aai-prijavi-uporabi-orodja-1ka'>digitalno identiteto</a>.",
'cms_intro_modal_1ka_text' => "ki se lahko prijavite s svojim elektronskim naslovom ali z <b>uporabniškim računom za Facebook ali Gmail.</b>",
"cms_intro_modal_aai_text" => "Ločena namestitev 1KA za študente, raziskovalce, učitelje, dijake in druge z ArnesAAI računom oziroma digitalno identiteto. Uporaba 1KA na tej namestitvi je <b>brezplačna</b> in <b>brez omejitev</b>.",
'cms_intro_modal_1ka_text' => "Namestitev 1KA za splošne uporabnike s poljubnim e-poštnim računom, kjer je <b>osnovna uporaba brezplačna</b>, nekatere napredne funkcije pa so <b>plačljive</b>.",
"cms_intro_modal_aai_qa" => "KAJ JE AAI RAČUN IN<br /> DIGITALNA IDENTITETA?",
"step1" => "Korak 1",
"root_search" => "Po korenu besede",
@ -2039,6 +2038,7 @@ $lang = array (
"srv_alert_upload_size" => "Naložena datoteka je prevelika! Največja dovoljena velikost je 16 MB.",
"srv_alert_upload_ext" => "Naložen tip datoteke ni dovoljen!",
"srv_alert_upload_remove" => "Odstrani datoteko",
"srv_alert_foto_remove" => "Odstrani sliko",
"srv_dostop" => "Anketo lahko ureja avtor in vsi",
"srv_izpolnjujejo" => "Anketo lahko izpolnjujejo",
"srv_dostop_users" => "Uporabniki, ki lahko urejajo anketo",
@ -3113,6 +3113,7 @@ $lang = array (
"srv_kviz_konec_note" => "&#268;e ni izbrana nobena opcija, vidi rezultate samo administrator",
"srv_voting" => "Volitve",
"srv_voting_info" => "Modul volitve omogoča pošiljanje vabil z izklopom vseh parapodatkov in brez kakršnekoli možnosti povezovanja podatkov z elektronskimi naslovi in drugimi identifikatorji.<br>Po vklopu, izklop modula ni več mogoč!",
"srv_voting_info_error" => "V anketi so bila že vklopljena oziroma poslana email vabila, zato modula na tej anketi ni mogoče vklopiti.",
"srv_voting_edit1" => "Vprašalnik urejate v zavihku",
"srv_voting_edit2" => "Urejanje",
"srv_voting_invitations1" => "Prejemnike vabil in sporočilo za vabilo k volitvam urejate v",
@ -6354,6 +6355,7 @@ $lang = array (
'srv_off' => 'Izklopi',
'srv_para_neodgovori' => 'Neodgovor spremenljivke',
'srv_usable_respondents' => 'Uporabni respondenti',
'srv_kakovost' => 'Kakovost respondentov',
'srv_speeder_index' => 'Indeks hitrosti',
'srv_speeder_index_text' => 'V tabeli so označene enote, ki so anketo izpolnjevale prehitro (status 1); za vsako stran so prikazani časi respondentov, merjeni v sekundah. Uporabljena je metoda speeder index (Rossmann 2010). Pri označenih enotah obstaja določeno tveganje, da imajo slabšo kakovost (strategija zadostovanja). Priporočljivo je, da se odgovore označenih enot podrobneje analizira. <a href="https://www.1ka.si/d/sl/pomoc/vodic-za-uporabnike/status/indeks-hitrosti?from1ka=1" target="_blank">Več >></a>',
'srv_speeder_index_legend_0' => '0 - ni prehiter',
@ -6548,7 +6550,7 @@ $lang = array (
'login_with_google' => 'Gmail prijava',
'login_with_facebook' => 'Facebook prijava',
'login_with_aai' => 'ARNES AAI-prijava',
'login_with_aai_title' => 'PRIJAVA UPORABNIKA Z AAI NA 1KA.ARNES.SI',
'login_with_aai_title' => '1KA.ARNES.SI',
'login_with_aai_small_text' => '<span style="color:#e35205;font-weight:bold;">Študenti, raziskovalci, učitelji</span> in drugi z AAI dostopom se lahko za <b> brezplačno uporabo</b> vseh funkcionalnosti orodja 1KA prijavite s svojim <b>obstoječim AAI računom</b> oz. <b>digitalno identiteto</b>.',
'login_with_yahoo' => 'Prijava z Yahoo ra&#269;unom',
'login_with_msn' => 'Prijava z MSN ra&#269;unom',

View File

@ -1627,8 +1627,7 @@ $lang = array (
"cms_login_title" => 'Login 1KA user',
"cms_aai_login_redirect_text" => '<b>Students, researchers, teachers</b> and others with an <b> ArnesAAI account </b> can log in to <a href="https://1ka.arnes.si/index.php?lang_id=2">1KA.ARNES.SI </a>, where you can <b> use all advanced 1KA settings </b> for free and unlimited </b>.',
"cms_aai_login_redirect_text_2" => 'Log in to <b> 1KA.ARNES.SI </b> with your "ArnesAAI username", which you get from the organization where you are employed or educated. It usually takes the form <b> user@domainorganization.si </b>. ',
"cms_aai_login_redirect_text_3" => '<b> Students of the University of Ljubljana </b> received an <b> automatically assigned AAI account (digital identity at UL) </b> at the beginning of their studies </b>. Use the <b> username (eg up1234@student.uni-lj.si) </b> and the password of your digital identity on UL to log in. ',
"cms_aai_login_redirect_text_4" => 'In case of ambiguity, you can see frequently asked questions regarding: <ul> <li> obtaining and operating <a href = "https://www.arnes.si/services/arnesaai/"> AAI account </a>, </li> <li> using 1KA with <a href ="https://www.1ka.si/d/en/help/faq/frequently-asked-questions-about-private-business-and-aai-use-of-1ka-tool"> ARNES AAI accounts (digital identity) </a>. </li> </ul> ',
"cms_aai_login_redirect_text_3" => 'In case of ambiguity, you can see frequently asked questions regarding: <ul> <li> obtaining and operating <a href = "https://www.arnes.si/services/arnesaai/"> AAI account </a>, </li> <li> using 1KA with <a href ="https://www.1ka.si/d/en/help/faq/frequently-asked-questions-about-private-business-and-aai-use-of-1ka-tool"> ARNES AAI accounts (digital identity) </a>. </li> </ul> ',
"cms_aai_login_redirect_button" => 'Login to 1ka.arnes.si',
"cms_buy_login_description" => 'You need to be logged in to continue purchasing.',
"cms_registration_title" => 'Registration of a new 1KA user',
@ -2026,6 +2025,7 @@ $lang = array (
"srv_alert_upload_size" => "Uploaded file is too large! Maximum file size is 16 MB.",
"srv_alert_upload_ext" => "Uploaded file type is not allowed!",
"srv_alert_upload_remove" => "Remove file",
"srv_alert_foto_remove" => "Remove image",
"srv_dostop" => "Survey can be edited by",
"srv_izpolnjujejo" => "Survey can be answered by",
"srv_dostop_users" => "Users who can edit survey",
@ -3085,6 +3085,7 @@ $lang = array (
"srv_kviz_konec_note" => "If no option is selected, only administrator can view results",
"srv_voting" => "Voting",
"srv_voting_info" => "The Voting module allows you to send invitations by turning off all paraadata and without any possibility of associating data with e-mail addresses and other identifiers.<br>After switching on, switching off the module is no longer possible!",
"srv_voting_info_error" => "Email invitations have already been activated or sent, so the module cannot be activated in this survey.",
"srv_voting_edit1" => "You can edit the questionnaire in a tab",
"srv_voting_edit2" => "Edit",
"srv_voting_invitations1" => "Email invitations are edited in",
@ -6239,6 +6240,7 @@ $lang = array (
'srv_off' => 'Turn off',
'srv_para_neodgovori' => 'Item nonresponse',
'srv_usable_respondents' => 'Usable respondents',
'srv_kakovost' => 'Respondents quality',
'srv_speeder_index' => 'Speeder index',
'srv_speeder_index_text' => 'The table indicates the units that completed the survey too quickly (status 1); each page displays respondent\'s times measured in seconds. The speeder index method was used (Rossmann 2010). Labelled units have a certain risk of poor quality (satisficing strategy). It is recommended that the responses of the marked units are analysed in more detail. <a href="https://www.1ka.si/d/en/help/user-guide/dashboard/speed-index?from1ka=1" target="_blank">More >></a>',
'srv_speeder_index_legend_0' => '0 - not too fast',
@ -6433,7 +6435,7 @@ $lang = array (
'login_with_google' => 'Gmail',
'login_with_facebook' => 'Facebook',
'login_with_aai' => 'ARNES AAI-account',
'login_with_aai_title' => 'REGISTRATION WITH AAI ON 1KA.ARNES.SI FOR FREE UNLIMITED USE OF 1KA',
'login_with_aai_title' => '1KA.ARNES.SI',
'login_with_aai_small_text' => '<b>Students, researchers, teachers</b> and others with AAI access can sign up for <b> free use </b> of all 1KA functionality with their <b> existing AAI account </b> or <b> digital identity </b>.',
'login_with_yahoo' => 'Login with Yahoo account',
'login_with_msn' => 'Login with MSN account',

View File

@ -1239,8 +1239,7 @@ class BodyController extends Controller
// NIJZ - prikaz radar grafa in tabele
global $site_domain;
//if(get('anketa') == '140'){
if( ($site_domain == 'test.1ka.si' && get('anketa') == '8892') || ($site_domain == 'anketa.nijz.si' && get('anketa') == '9999999') ){
if( ($site_domain == 'test.1ka.si' && get('anketa') == '8892') || ($site_domain == 'anketa.nijz.si' && get('anketa') == '126738') ){
$nijz = new SurveyNIJZ(get('anketa'), get('usr_id'));

View File

@ -774,8 +774,48 @@ class TextController extends Controller
';
}
// Smo v admin podatkih in uplodamo datoteko ali fotografijo
elseif( ($row['upload'] == 1 || $row['upload'] == 2) && ($_GET['t'] == 'postprocess' || $_GET['m'] == 'quick_edit') ){
$sqlUpload = sisplet_query("SELECT filename FROM srv_data_upload WHERE usr_id='".get('usr_id')."' AND code='".$row2['text']."'");
// Ze imamo datoteko - moznost brisanja v adminu
if(mysqli_num_rows($sqlUpload) > 0){
$rowUpload = mysqli_fetch_array($sqlUpload);
$file = $rowUpload[0];
global $site_url;
echo '<div style="font-size:14px;"><a href="'.$site_url.'/main/survey/download.php?anketa='.get('anketa').'&code='.$row2['text'].'">'.$file.'</a></div>';
// Remove file button
if($_GET['quick_view'] != '1'){
echo '<div class="buttonwrapper floatLeft">
<a
class="ovalbutton ovalbutton_orange btn_savesettings"
href="#"
style="margin: 10px 0 0 0;"
id="remove_file_'.$spremenljivka.'_vrednost_'.$i.'"
onClick="removeUploadFromData(\''.get('usr_id').'\', \''.$spremenljivka.'\', \''.$row2['text'].'\')"
>';
echo self::$lang['srv_alert_upload_remove'];
echo '</div>';
}
}
// Uploadamo datoteko preko admina - TODO
else{
echo '<input name="vrednost_' . $spremenljivka . '_kos_' . $row1['id'] . '"
type="file"
id="spremenljivka_' . $spremenljivka . '_vrednost_' . $i . '"
class="pointer"
>';
}
}
// Upload
elseif ($row['upload'] == 1) {
echo '<input name="vrednost_' . $spremenljivka . '_kos_' . $row1['id'] . '"
type="file"
id="spremenljivka_' . $spremenljivka . '_vrednost_' . $i . '"
@ -794,19 +834,28 @@ class TextController extends Controller
echo '</div>';
}
//Fotografiranje
// Fotografiranje
elseif ($row['upload'] == 2) {
$inpname = 'vrednost_' . $spremenljivka . '_kos_' . $row1['id'];
$inpid = 'spremenljivka_' . $spremenljivka . '_vrednost_' . $i;
echo '<label class="custom-foto-upload" for="'.$inpid. '"></label>';
echo '<input class="upload_foto_file" name="'.$inpname . '" type="file" accept="image/*" id="'.$inpid. '" capture="camera">';
echo '<div><img id="upload_foto_result_'.$inpid. '" class="upload_foto_result" src="#"></div>';
echo '<div class="fotoresults_delete upload_fotoresults_delete pointer" id="upload_fotoresults_delete_'.$inpid.'" onClick="delete_upload_foto(\''.$inpid.'\');">'.$lang['srv_alert_foto_remove'].'</div>';
echo '<div id="upload_foto_result_'.$inpid.'_holder">
<img id="upload_foto_result_'.$inpid. '" class="upload_foto_result" src="#">
</div>';
echo '<div class="fotoparent" id="fotoparent_'.$inpid.'" style="visibility: hidden; display : none;">
<div class="fotoresults_div">
<p style="padding: 4px;"><i>'.self::$lang['srv_resevanje_foto_result_title'].'</i></p>
<div class="fotoresults" id="fotoresults_'.$inpid.'"><p style="padding: 6px; border:1px solid;">'.self::$lang['srv_resevanje_foto_pre_result'].'</p></div>
<div class="fotoresults" id="fotoresults_'.$inpid.'">
<p>'.self::$lang['srv_resevanje_foto_pre_result'].'</p>
</div>
<div class="fotoresults_delete pointer" id="fotoresults_delete_'.$inpid.'" onClick="delete_snapshot(\''.$inpid.'\');">'.$lang['srv_alert_foto_remove'].'</div>
</div>
<input id="foto_'.$inpid.'" type="hidden" name="foto_'.$inpname.'" value=""/>
@ -837,6 +886,7 @@ class TextController extends Controller
reader.onload = function (e) {
$('#upload_foto_result_'+inpid).css("display", "inline");
$('#upload_foto_result_'+inpid).attr('src', e.target.result);
$('#upload_fotoresults_delete_'+inpid).show();
};
reader.readAsDataURL(input.files[0]);

View File

@ -777,8 +777,10 @@ class SaveSurvey extends Model
}
// textbox*
} elseif ($row['tip'] == 21) {
}
// TEXTBOX
elseif ($row['tip'] == 21) {
if ($_POST['visible_' . $row['id']] == 1) {
@ -814,7 +816,6 @@ class SaveSurvey extends Model
$vrednost = uniqid();
//pri fotografiji naredi tukaj da zbrise iz mape uploads morebitno prejsnjo sliko narejeno z webcam (lahko, da sta razlicna exstensiona in se ne povozi)
sisplet_query("INSERT INTO srv_data_upload (ank_id, usr_id, code, filename) VALUES ('" . get('anketa') . "', '" . get('usr_id') . "', '$vrednost', '$filename')");
}
// Ni bil nalozen noben file
@ -833,7 +834,9 @@ class SaveSurvey extends Model
// save to server (beware of permissions)
$result = file_put_contents( 'uploads/' . $filename, $binary_data );
if (!$result) die("Could not save image! Check file permissions.");
if (!$result){
die("Could not save image! Check file permissions.");
}
else{
$vrednost = uniqid();
@ -855,16 +858,12 @@ class SaveSurvey extends Model
$vrednost = $_POST['vrednost_' . $row['id'] . '_kos_' . $row1['id']]; //vnešeno besedilo v input polje Podpis osebe
$signature_name = $vrednost;
//$vrednost_signature = uniqid(); //vrednost, ki se beleži v bazi kot unique koda
$vrednost_signature = $row['id']; //vrednost, ki se beleži v bazi kot spr_id
//$sqlIsFilename = sisplet_query("SELECT filename FROM srv_data_upload WHERE usr_id = '" . get('usr_id') . "' AND ank_id = '" . get('anketa') . "' ");
$sqlIsFilename = sisplet_query("SELECT filename FROM srv_data_upload WHERE usr_id = '" . get('usr_id') . "' AND ank_id = '" . get('anketa') . "' AND code = '" . $row['id'] . "' ");
$rowSqlIsFilename = mysqli_fetch_array($sqlIsFilename);
if (mysqli_num_rows($sqlIsFilename) == 0) { //ce ni nicesar v bazi, ustvari datoteko s sliko in vpisi informacijo v bazo
//odstranitev sumnikov in presledkov iz vnesenega imena podpisanega za shranjevanje datoteke
$posebni_znaki = array("č", "ć", "ž", "š", "đ", "Č", "Ć", "Ž", "Š", "Đ");
@ -891,15 +890,16 @@ class SaveSurvey extends Model
sisplet_query("INSERT INTO srv_data_upload (ank_id, usr_id, code, filename) VALUES ('" . get('anketa') . "', '" . get('usr_id') . "', '$vrednost_signature', '$filename_signature')");
}
} else {
}
else {
$vrednost = '';
}
} else {
}
else {
$vrednost = $_POST['vrednost_' . $row['id'] . '_kos_' . $row1['id']];
}
if ($vrednost != '') {
//sisplet_query("INSERT INTO srv_data_text (spr_id, vre_id, text, usr_id) VALUES ('$row[id]', '$row1[id]', '$vrednost', '".get('usr_id')."')");
$srv_data_text .= "('$row[id]', '$row1[id]', '$vrednost', '', '" . get('usr_id') . "', $loop_id),";
Model::user_not_lurker();
$empty = false;
@ -908,13 +908,8 @@ class SaveSurvey extends Model
if ($empty) {
if (isset($_POST['vrednost_mv_' . $row['id']])) {
//sisplet_query("INSERT INTO srv_data_vrednost".get('db_table')." (spr_id, vre_id, usr_id) VALUES ('$row[id]', '-2', '".get('usr_id')."')");
$srv_data_vrednost .= "('$row[id]', '" . $_POST['vrednost_mv_' . $row['id']][0] . "', '" . get('usr_id') . "', $loop_id),";
}
#preverimo ali je missing
//sisplet_query("INSERT INTO srv_data_vrednost".get('db_table')." (spr_id, vre_id, usr_id) VALUES ('$row[id]', '-1', '".get('usr_id')."')");
//$srv_data_vrednost .= "('$row[id]', '-1', '".get('usr_id')."'),";
}
if ($row['variable'] == 'email' && $row['sistem'] == '1') {
@ -926,13 +921,14 @@ class SaveSurvey extends Model
User::sinhronizeInvitationEmail($vrednost);
}
} else {
}
else {
//sisplet_query("INSERT INTO srv_data_vrednost".get('db_table')." (spr_id, vre_id, usr_id) VALUES ('$row[id]', '-2', '".get('usr_id')."')");
$srv_data_vrednost .= "('$row[id]', '-2', '" . get('usr_id') . "', $loop_id),";
}
// number
} elseif ($row['tip'] == 7) {
}
// NUMBER
elseif ($row['tip'] == 7) {
if ($_POST['visible_' . $row['id']] == 1) {

View File

@ -43,12 +43,40 @@ function FotoDeclaration(inpid, site_url){
* @returns {undefined}
*/
function take_snapshot(inpid) {
// take snapshot and get image data
Webcam.snap( function(data_uri) {
// display results in page
document.getElementById('fotoresults_'+inpid).innerHTML =
'<img style="border:1px solid;" src="'+data_uri+'"/>';
$('#fotoresults_'+inpid).html('<img src="'+data_uri+'"/>');
var raw_image_data = data_uri.replace(/^data\:image\/\w+\;base64\,/, '');
document.getElementById('foto_'+inpid).value = raw_image_data;
} );
$('#foto_'+inpid).val(raw_image_data);
$('#fotoresults_delete_'+inpid).show();
});
}
// Pobrisemo snapshot
function delete_snapshot(inpid) {
$('#fotoresults_'+inpid).html('<p>'+lang['srv_resevanje_foto_pre_result']+'</p>');
$('#foto_'+inpid).val('');
$('#fotoresults_delete_'+inpid).hide();
}
// Pobrisemo upload fotografije
function delete_upload_foto(inpid) {
$('#'+inpid).val(null);
//var reader = new FileReader();
//reader.onload = function (e) {
$('#upload_foto_result_'+inpid).css("display", "none");
$('#upload_foto_result_'+inpid).attr('src', "#");
//};
//reader.readAsDataURL(input.files[0]);
$('#upload_fotoresults_delete_'+inpid).hide();
}

View File

@ -253,6 +253,7 @@ iframe {
padding: 0;
margin: 0;
border: 0;
flex-grow: 1;
}
#main #anketa {
border: 0;
@ -5892,6 +5893,10 @@ and open the template in the editor.
#enka_nav input[type="text"]:focus {
width: 200px;
}*/
.mobile_header {
display: none;
}
#logo {
position: absolute;
left: 15px;
@ -7506,6 +7511,12 @@ span.faicon.spinner::before {
content: "";
}
/* Bars - mobile menu */
span.faicon.bars::before {
font-size: 26px;
content: "";
}
/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
@ -13516,6 +13527,7 @@ and open the template in the editor.
#globalSetingsLinks ul {
padding: 5px;
margin: 0px;
list-style: none;
}
#globalSetingsLinks ul li {
padding: 4px 0px 4px 20px;
@ -28444,12 +28456,828 @@ a.addIfIcon {
}
@media (max-width: 600px) {
table#surveyList_new td {
#main {
margin-top: 70px;
}
#main #anketa_edit {
box-sizing: border-box !important;
padding: 15px !important;
}
#main #placeholder {
width: auto;
}
fieldset {
width: 100% !important;
box-sizing: border-box !important;
margin-left: 0 !important;
margin-right: 0 !important;
}
fieldset .nastavitveSpan1,
fieldset .nastavitveSpan2,
fieldset .nastavitveSpan3,
fieldset .nastavitveSpan4,
fieldset .nastavitveSpan5,
fieldset .nastavitveSpan6 {
width: auto !important;
display: block !important;
float: none !important;
text-align: left !important;
padding: 15px 0 5px 0 !important;
}
fieldset select,
fieldset .select2-container,
fieldset input[type=text] {
width: 100% !important;
box-sizing: border-box;
}
fieldset .setting {
height: auto !important;
}
.desktop_header {
display: none;
}
table#surveyList_new td:nth-child(3), table#surveyList_new td:nth-child(6), table#surveyList_new td:nth-child(7) {
.mobile_header {
position: fixed;
z-index: 9990;
display: flex;
align-items: center;
width: 100vw;
height: 70px;
border-bottom: 1px solid #efefef;
}
.mobile_header.survey_edit {
color: white;
background-color: #1e88e5;
}
.mobile_header.survey_list {
color: #1e88e5;
background-color: white;
}
.mobile_header .mobile_menu_icon {
width: 60px;
text-align: center;
}
.mobile_header .mobile_menu_icon.mobile_menu_close {
display: none;
}
.mobile_header .mobile_menu_icon.mobile_menu_close span {
font-size: 30px;
font-weight: 600;
line-height: 25px;
}
.mobile_header .mobile_menu_icon span {
cursor: pointer;
}
.mobile_header .mobile_survey_title {
width: calc(100% - 120px);
text-align: center;
font-size: 14px;
font-weight: 500;
}
.mobile_header .mobile_logo {
width: calc(100% - 120px);
}
.mobile_header .mobile_logo #enka_logo {
margin: 0 auto;
}
/* Mobile meni */
.mobile_menu {
position: fixed;
z-index: 9995;
display: flex;
flex-direction: column;
top: 71px;
bottom: 0;
width: 85vw;
color: #333;
background-color: #ffffff;
overflow: hidden;
-webkit-overflow-scrolling: touch;
overflow-y: auto;
pointer-events: none;
transform: translateX(-100%);
}
.mobile_menu:not(.no-transition),
.mobile_menu .submenu:not(.no-transition) {
transition: all 250ms;
}
.mobile_menu.opened {
pointer-events: auto;
transform: translateX(0px);
}
.mobile_menu.submenu-opened {
overflow: hidden;
}
.mobile_menu ul {
list-style-type: none;
padding: 0;
padding-left: 0px;
margin: 0;
-webkit-overflow-scrolling: touch;
}
.mobile_menu ul > li {
display: block;
}
.mobile_menu ul > li > a {
position: relative;
display: block;
padding: 18px 20px;
font-size: 14px;
font-weight: 500;
text-decoration: none;
transition: all 150ms;
}
.mobile_menu ul > li > a:hover {
background-color: #c8e3f8;
border-radius: 3px;
}
.mobile_menu ul > li > a .arrow_back {
display: block;
position: absolute;
right: 20px;
top: 18px;
transform: rotate(180deg);
}
.mobile_menu ul > li:not(:last-child) > a {
border-bottom: 1px solid #efefef;
}
.mobile_menu .submenu {
overflow: hidden;
-webkit-overflow-scrolling: touch;
overflow-y: auto;
pointer-events: none;
z-index: 9998;
position: fixed;
bottom: 0;
top: 0;
left: 100%;
width: 100%;
min-height: 100%;
background-color: #ffffff;
}
.mobile_menu .submenu.opened {
left: 0;
pointer-events: auto;
}
.mobile_menu .submenu.opened:not(.current) {
overflow: hidden;
}
.mobile_menu .submenu-header {
cursor: pointer;
position: relative;
display: flex;
border-bottom: solid 1px #efefef;
}
.mobile_menu .submenu-header > a {
display: block;
font-size: 14px;
font-weight: 500;
padding: 18px 20px;
padding-left: 20px;
text-decoration: none;
}
.mobile_menu .submenu-header > label {
display: block;
width: calc(100% - 110px);
margin-bottom: 8px;
margin-top: 20px;
padding-left: 0px;
font-size: 15px;
font-weight: 500;
text-align: center;
opacity: 0.5;
}
.mobile_menu .mobile_menu_user li.has-submenu .arrow_back {
line-height: 30px;
}
.mobile_menu .mobile_menu_user li.has-submenu a {
font-size: 13px;
color: #333;
}
.mobile_menu .mobile_menu_user li.has-submenu a .email {
font-size: 12px;
}
.mobile_menu .mobile_menu_user .submenu_user_content {
display: flex;
flex-direction: column;
padding: 20px;
}
.mobile_menu .mobile_menu_user .submenu_user_content > div {
padding: 5px 0;
}
.mobile_menu .mobile_menu_user .submenu_user_content > div .faicon {
padding-right: 10px;
}
.mobile_menu .mobile_menu_actions {
display: flex;
flex-direction: column;
padding: 20px;
}
.mobile_menu .mobile_menu_actions a {
padding: 0 0 15px 0;
font-size: 13px;
}
.mobile_menu .mobile_menu_actions a .faicon::before {
padding-right: 10px;
font-size: 20px;
}
#srv_footer {
display: flex;
flex-direction: column;
}
#srv_footer .footer_left {
margin-bottom: 10px;
}
#main #moje_ankete_edit {
padding: 20px !important;
}
#main #moje_ankete_edit #anketa_edit {
padding: 0 !important;
}
#main #moje_ankete_edit #survey_list {
display: flex;
flex-direction: column;
}
#main #moje_ankete_edit #survey_list > div {
margin: 15px 0 20px 0;
}
#main #moje_ankete_edit #survey_list #anketa_new_float {
display: flex;
justify-content: center;
}
#main #moje_ankete_edit #survey_list #pagination {
margin-left: auto;
margin-right: auto;
transform: none;
display: none;
}
#main #moje_ankete_edit #survey_list #pagination.bottom {
display: block;
}
#main #moje_ankete_edit #survey_list #sortButton,
#main #moje_ankete_edit #survey_list #filterButton,
#main #moje_ankete_edit #survey_list #folderSwitch {
display: none;
}
#main #moje_ankete_edit #survey_list #searchMySurveys {
padding: 0;
}
#main #moje_ankete_edit #survey_list #searchMySurveys form {
display: flex;
justify-content: center;
}
#main #moje_ankete_edit #survey_list #searchMySurveys form input[type=text] {
width: 100%;
padding: 5px 0 5px 7px;
}
#main #moje_ankete_edit #survey_list .div_sl_new {
padding: 20px 0;
}
#main #moje_ankete_edit #survey_list table#surveyList_new td {
display: none;
}
#main #moje_ankete_edit #survey_list table#surveyList_new td:nth-child(3), #main #moje_ankete_edit #survey_list table#surveyList_new td:nth-child(6) {
display: table-cell;
}
#new_anketa_div {
display: flex;
flex-direction: column;
min-height: auto;
width: 100%;
}
#new_anketa_div #left_menu,
#new_anketa_div #right_content {
width: 100%;
position: relative;
}
#new_anketa_div #right_content {
box-sizing: border-box;
margin: 20px 0 0 0;
padding: 0;
}
#new_anketa_div #right_content .setting {
width: 100% !important;
margin: 0 !important;
padding: 0 !important;
}
#new_anketa_div #right_content .survey_title_text_holder {
flex-direction: column !important;
}
#new_anketa_div #right_content select {
width: 100% !important;
margin: 0;
}
#new_anketa_div #right_content input {
width: 100% !important;
box-sizing: border-box;
}
#new_anketa_div #right_content .survey_type_holder {
flex-direction: column !important;
}
#new_anketa_div #right_content .survey_type_holder label {
margin-bottom: 15px;
}
#new_anketa_div #right_content .survey_type_holder label > div {
box-sizing: border-box;
padding: 10px !important;
}
#new_anketa_div #input_field_holder,
#new_anketa_div #preview_field_holder {
width: 100% !important;
width: 300px !important;
float: none;
box-sizing: border-box;
margin: 0 !important;
padding: 10px 0 !important;
}
table.dashboard {
border-spacing: 0px;
}
table.dashboard > tbody > tr,
table.dashboard > tbody > tr > td {
display: flex;
flex-direction: column;
width: 100%;
box-sizing: border-box;
}
table.dashboard > tbody > tr > td {
margin: 15px 0;
}
#branching {
width: 100%;
}
#branching li {
margin: 0 10px 0 20px !important;
}
#branching .spr_edit {
display: none !important;
}
#branching .empty_vrivanje {
padding: 50px 0 !important;
margin: 20px 10px 20px 20px !important;
}
#branching .empty_vrivanje .empty_vrivanje_title {
margin: 0 20px;
font-size: 14px;
}
#branching .empty_vrivanje .empty_vrivanje_subtitle {
margin: 15px 20px 0 15px;
font-size: 13px;
}
#branching #bottom_icons_holder {
display: flex;
flex-direction: column;
}
#branching #bottom_icons_holder .forma_bottom {
display: flex;
flex-direction: column;
align-items: left;
width: 100%;
height: auto;
padding: 30px 10px 20px 20px;
}
#branching #bottom_icons_holder .forma_bottom .forma_bottom_inner {
display: flex;
flex-direction: row;
padding: 0 0 10px 0;
margin: 0;
}
#branching #bottom_icons_holder .forma_bottom .forma_bottom_inner a {
margin: 0 11px 0 2px;
padding: 0;
}
#toolbox_advanced_settings {
top: 150px;
}
#toolbox_basic {
top: 187px;
}
#vprasanje_float_editing {
position: fixed;
z-index: 99999;
width: 100%;
height: 100%;
max-height: 100%;
overflow-y: auto;
overflow-x: hidden;
margin: 0 !important;
top: 0;
right: 0;
left: 0;
box-shadow: 0px 0px 100px 100px #333;
}
#vprasanje_float_editing #vprasanje_edit {
top: 0;
margin-bottom: 55px;
}
#vprasanje_float_editing #vprasanje_tabs {
position: absolute;
top: 42px;
}
#vprasanje_float_editing #vprasanje_tabs a.tab_link {
height: auto;
padding: 10px 9px;
}
#vprasanje_float_editing .tab {
padding-top: 100px;
}
#vprasanje_float_editing .tab h2 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 42px;
box-sizing: border-box;
padding: 10px;
margin: 0;
}
#vprasanje_float_editing #vprasanje_buttons {
display: flex;
justify-content: space-evenly;
position: relative;
bottom: 30px;
padding: 0 15px;
}
#vprasanje_float_editing #vprasanje_buttons span {
width: 40%;
margin-left: 0 !important;
text-align: center;
}
#main #anketa #globalSetingsList {
max-width: 100% !important;
width: 100% !important;
}
#main #anketa #globalSetingsList fieldset {
width: 100% !important;
}
/* NASTAVITVE in ARHIVI */
#main #anketa #anketa_edit.page_nastavitve {
flex-direction: column-reverse;
}
#main #anketa #anketa_edit.page_nastavitve > div {
width: 100%;
margin: 20px 0;
}
/* OBLIKA */
#main #anketa #anketa_edit.page_tema #div_theme_group_holder {
width: 100%;
}
#main #anketa #anketa_edit.page_tema #div_theme_group_holder #div_theme_group div.theme_label {
width: 100%;
box-sizing: border-box;
margin-left: 0;
margin-right: 0;
}
#main #anketa #anketa_edit.page_tema #div_theme_group_holder #div_theme_group div.theme_label img {
width: 100%;
height: auto;
}
#theme-editor {
width: 100% !important;
float: none !important;
}
#theme-preview {
width: 100% !important;
float: none !important;
margin-top: 80px !important;
}
/* ARHIVI */
#main #anketa #anketa_edit.page_arhivi {
flex-direction: column-reverse;
}
#main #anketa #anketa_edit.page_arhivi > div {
width: 100% !important;
margin: 20px 0;
}
#main #anketa #anketa_edit.page_arhivi #div_archive_content fieldset {
width: 100% !important;
box-sizing: border-box !important;
margin-left: 0 !important;
margin-right: 0 !important;
}
#main #anketa #anketa_edit.page_arhivi #div_archive_content fieldset input {
width: 100% !important;
}
#srv_diagnostic br {
display: none;
}
#srv_diagnostic #srv_diagnostic_results,
#srv_diagnostic #srv_diagnostic_results_right {
clear: both;
display: block !important;
width: 100% !important;
box-sizing: border-box;
margin: 20px 0 !important;
}
#srv_diagnostic #srv_diagnostic_results table,
#srv_diagnostic #srv_diagnostic_results_right table {
width: 100%;
min-width: 100%;
}
#srv_diagnostic #srv_diagnostic_results table td + td,
#srv_diagnostic #srv_diagnostic_results_right table td + td {
width: auto !important;
}
#vabila > table,
table.invitations_settings,
#inv_msg_preview table,
#inv_send_mail table {
border-spacing: 0px;
width: 100%;
}
#vabila > table tbody,
table.invitations_settings tbody,
#inv_msg_preview table tbody,
#inv_send_mail table tbody {
display: flex;
flex-direction: column;
width: 100% !important;
}
#vabila > table > tbody > tr,
#vabila > table > tbody > tr > td,
table.invitations_settings > tbody > tr,
table.invitations_settings > tbody > tr > td,
#inv_msg_preview table > tbody > tr,
#inv_msg_preview table > tbody > tr > td,
#inv_send_mail table > tbody > tr,
#inv_send_mail table > tbody > tr > td {
display: flex;
flex-direction: column;
width: 100% !important;
box-sizing: border-box;
}
#vabila > table > tbody > tr > td,
table.invitations_settings > tbody > tr > td,
#inv_msg_preview table > tbody > tr > td,
#inv_send_mail table > tbody > tr > td {
height: auto !important;
margin: 0;
padding: 0 !important;
}
#vabila > table > tbody > tr > td > br,
table.invitations_settings > tbody > tr > td > br,
#inv_msg_preview table > tbody > tr > td > br,
#inv_send_mail table > tbody > tr > td > br {
display: none;
}
#vabila > table > tbody > tr > td > div,
#vabila > table > tbody > tr > td > fieldset,
table.invitations_settings > tbody > tr > td > div,
table.invitations_settings > tbody > tr > td > fieldset,
#inv_msg_preview table > tbody > tr > td > div,
#inv_msg_preview table > tbody > tr > td > fieldset,
#inv_send_mail table > tbody > tr > td > div,
#inv_send_mail table > tbody > tr > td > fieldset {
margin: 15px 0;
}
#vabila > table colgroup,
#vabila > table colgroup col,
table.invitations_settings colgroup,
table.invitations_settings colgroup col,
#inv_msg_preview table colgroup,
#inv_msg_preview table colgroup col,
#inv_send_mail table colgroup,
#inv_send_mail table colgroup col {
width: 100% !important;
}
#surveyInvitationSetting,
#surveyInvitationSettingServer {
min-width: 100% !important;
width: 100% !important;
box-sizing: border-box !important;
}
#inv_top_navi {
display: flex;
flex-direction: column;
width: 100%;
padding: 0;
margin: 0;
}
#inv_top_navi .inv_space {
display: none;
}
#inv_top_navi > #inv_step_nav {
width: 100%;
padding: 0;
margin: 0 0 15px 0;
}
#inv_top_navi > #inv_step_nav .inv_step {
height: auto;
padding: 0;
margin: 0;
}
#inv_top_navi > #inv_step_nav span.label {
padding: 0;
}
#inv_top_navi > #inv_step_nav.yellow {
display: flex;
justify-content: space-between;
}
#inv_top_navi > #inv_step_nav.yellow .inv_step span.circle {
width: 18px;
height: 18px;
line-height: 18px;
}
#inv_top_navi > #inv_step_nav.yellow .inv_step span.label {
padding: 0 0 0 3px;
}
#inv_top_navi > #inv_step_nav.yellow .inv_step_space {
display: none;
}
#inv_recipients_profiles_holder,
#inv_import_list_container,
#inv_messages_profiles_holder,
#inv_msg_preview_hld,
#invitation_profile_notes,
#inv_select_mail_to,
#inv_select_mail_preview {
width: 100%;
box-sizing: border-box;
margin: 15px 0 !important;
}
#inv_recipients_profiles_holder textarea,
#inv_import_list_container textarea,
#inv_messages_profiles_holder textarea,
#inv_msg_preview_hld textarea,
#invitation_profile_notes textarea,
#inv_select_mail_to textarea,
#inv_select_mail_preview textarea {
width: 100%;
}
#inv_msg_preview table th {
height: auto !important;
width: 100% !important;
margin: 0;
padding: 20px 0 0 0 !important;
text-align: left;
}
#inv_msg_preview table input {
width: 100%;
box-sizing: border-box;
}
.page_data #vnosi_paginacija {
display: flex;
flex-direction: column;
float: none;
}
.page_data #vnosi_paginacija > div {
margin: 5px 0;
}
.page_data #vnosi_paginacija label {
margin: 0;
padding: 0;
}
.page_data #data_search_filter {
display: flex;
width: 100%;
box-sizing: border-box;
}
.page_data #data_search_filter input {
box-sizing: border-box;
margin-left: 10px;
width: 100%;
}
.page_data .dataSettingsBasic {
width: 100%;
box-sizing: border-box;
margin: 0;
}
.page_data #toggleDataCheckboxes {
display: none;
}
.page_data #div_vnosi_data #dataTableScroller {
display: none;
}
.page_data #bottom_data_legend {
display: block;
float: none;
width: 100%;
box-sizing: border-box;
margin: 5px 0 10px 0;
}
.subpage_append,
.subpage_merge,
.subpage_calculation,
.subpage_coding_auto,
.subpage_recoding,
.subpage_coding,
.page_export {
flex-direction: column !important;
}
.subpage_append .anketa_edit_left,
.subpage_append .anketa_edit_main,
.subpage_merge .anketa_edit_left,
.subpage_merge .anketa_edit_main,
.subpage_calculation .anketa_edit_left,
.subpage_calculation .anketa_edit_main,
.subpage_coding_auto .anketa_edit_left,
.subpage_coding_auto .anketa_edit_main,
.subpage_recoding .anketa_edit_left,
.subpage_recoding .anketa_edit_main,
.subpage_coding .anketa_edit_left,
.subpage_coding .anketa_edit_main,
.page_export .anketa_edit_left,
.page_export .anketa_edit_main {
width: 100% !important;
box-sizing: border-box;
margin: 20px 0 !important;
}
.subpage_append .anketa_edit_left,
.subpage_merge .anketa_edit_left,
.subpage_calculation .anketa_edit_left,
.subpage_coding_auto .anketa_edit_left,
.subpage_recoding .anketa_edit_left,
.subpage_coding .anketa_edit_left,
.page_export .anketa_edit_left {
margin: 0 !important;
}
.subpage_append textarea,
.subpage_merge textarea,
.subpage_calculation textarea,
.subpage_coding_auto textarea,
.subpage_recoding textarea,
.subpage_coding textarea,
.page_export textarea {
width: 100% !important;
}
.subpage_append #inv_upload_recipients_nosbmt + span,
.subpage_merge #inv_upload_recipients_nosbmt + span,
.subpage_calculation #inv_upload_recipients_nosbmt + span,
.subpage_coding_auto #inv_upload_recipients_nosbmt + span,
.subpage_recoding #inv_upload_recipients_nosbmt + span,
.subpage_coding #inv_upload_recipients_nosbmt + span,
.page_export #inv_upload_recipients_nosbmt + span {
display: block;
clear: both;
margin: 40px 0 0 0 !important;
}
.analysis_bottom_settings a:first-child {
display: block;
margin: 0 0 20px 0 !important;
}
.chart_holder {
width: 100%;
box-sizing: border-box;
}
.chart_holder .chart_img {
min-height: auto;
float: none;
}
.chart_holder .chart_img img {
width: 100%;
}
.chart_holder .chart_settings {
display: none;
}
.chart_holder .chart_bottom_settings:first-child {
display: block;
clear: both;
}
table.analysis_reports {
border-spacing: 0px;
}
table.analysis_reports > tbody > tr,
table.analysis_reports > tbody > tr > td {
display: flex;
flex-direction: column;
width: 100%;
box-sizing: border-box;
}
table.analysis_reports > tbody > tr > td {
margin: 10px 0;
}
table.analysis_reports fieldset {
margin-bottom: 0 !important;
}
}
/*# sourceMappingURL=admin.css.map */

View File

@ -6864,6 +6864,32 @@ table.trak_inline_nadnaslov td {
.fotoresults_div {
float: right;
}
.fotoresults_div .fotoresults {
display: flex;
justify-content: center;
align-items: center;
width: 320px;
height: 240px;
border: 1px solid;
}
.fotoresults_delete {
display: none;
cursor: pointer;
margin-top: 5px;
width: 150px;
color: #1e88e5;
text-decoration: none;
cursor: pointer;
}
.fotoresults_delete:hover {
color: #ffa608;
text-decoration: none;
}
.fotoresults_delete.upload_fotoresults_delete {
position: static;
margin: 20px 0 10px 20px;
}
.my_camera_div {
float: left;

View File

@ -449,6 +449,11 @@ iframe {
margin: 20px 0 0 0 !important;
padding: 0 !important;
}
#outercontainer #container .grupa .spremenljivka.tip_4 .upload_fotoresults_delete, #outercontainer #container .grupa .spremenljivka.tip_21 .upload_fotoresults_delete, #outercontainer #container .grupa .spremenljivka.tip_7 .upload_fotoresults_delete {
position: absolute;
left: 100px;
margin: 20px 0 10px 0;
}
#outercontainer #container .grupa .spremenljivka.tip_8 input[type=text],
#outercontainer #container .grupa .spremenljivka.tip_8 input[type=email] {
box-sizing: border-box;

View File

@ -26,6 +26,9 @@ and open the template in the editor.
ul {
padding: 5px;
margin: 0px;
list-style: none;
li {
padding: 4px 0px 4px 20px;
border-bottom: 1px $grey_super_light solid;

View File

@ -259,6 +259,8 @@ iframe {
margin: 0;
border: 0;
flex-grow: 1;
#anketa {
border: 0;
padding: 0px 0px 0px 0px;

View File

@ -27,6 +27,10 @@ $header_background: #ffffff;
width: 200px;
}*/
.mobile_header{
display: none;
}
#logo {
position: absolute;
left: 15px;

View File

@ -526,9 +526,15 @@ span.faicon.minus_orange::before{
}
/* Spinner */
span.faicon.spinner::before{
font-size: 18px;
content: "\f110";
}
/* Bars - mobile menu */
span.faicon.bars::before{
font-size: 26px;
content: "\f0c9";
}

View File

@ -1 +1,46 @@
#main{
margin-top: 70px;
#anketa_edit{
box-sizing: border-box !important;
padding: 15px !important;
}
#placeholder{
width: auto;
}
}
fieldset {
width: 100% !important;
box-sizing: border-box !important;
margin-left: 0 !important;
margin-right: 0 !important;
.nastavitveSpan1,
.nastavitveSpan2,
.nastavitveSpan3,
.nastavitveSpan4,
.nastavitveSpan5,
.nastavitveSpan6{
width: auto !important;
display: block !important;
float: none !important;
text-align: left !important;
padding: 15px 0 5px 0 !important;
}
select,
.select2-container,
input[type="text"]{
width: 100% !important;
box-sizing: border-box;
}
.setting{
height: auto !important;
}
}

View File

@ -1 +1,8 @@
#srv_footer{
display: flex;
flex-direction: column;
.footer_left{
margin-bottom: 10px;
}
}

View File

@ -1 +1,256 @@
.desktop_header{
display: none;
}
.mobile_header{
position: fixed;
z-index: 9990;
display: flex;
align-items: center;
width: 100vw;
height: 70px;
border-bottom: 1px solid $grey_super_light;
// Znotraj ankete
&.survey_edit{
color: white;
background-color: $strong_blue;
}
// Seznam anket
&.survey_list{
color: $strong_blue;
background-color: white;
}
.mobile_menu_icon{
width: 60px;
text-align: center;
&.mobile_menu_close{
display: none;
span{
font-size: 30px;
font-weight: 600;
line-height: 25px;
}
}
span{
cursor: pointer;
}
}
.mobile_survey_title{
width: calc(100% - 120px);
text-align: center;
font-size: 14px;
font-weight: 500;
}
.mobile_logo{
width: calc(100% - 120px);
#enka_logo{
margin: 0 auto;
}
}
}
/* Mobile meni */
.mobile_menu{
position: fixed;
z-index: 9995;
display: flex;
flex-direction: column;
top: 71px;
bottom: 0;
width: 85vw;
color: $main_text;
background-color: #ffffff;
overflow: hidden;
-webkit-overflow-scrolling: touch;
overflow-y: auto;
pointer-events: none;
transform: translateX(-100%);
&:not(.no-transition),
.submenu:not(.no-transition){
transition: all 250ms;
}
&.opened{
pointer-events: auto;
transform: translateX(0px);
}
&.submenu-opened{
overflow: hidden;
}
ul {
list-style-type: none;
padding: 0;
padding-left: 0px;
margin: 0;
-webkit-overflow-scrolling: touch;
> li {
display: block;
> a {
position: relative;
display: block;
padding: 18px 20px;
font-size: 14px;
font-weight: 500;
text-decoration: none;
transition: all 150ms;
&:hover {
background-color: $soft_blue;
border-radius: 3px;
}
.arrow_back{
display: block;
position: absolute;
right: 20px;
top: 18px;
transform: rotate(180deg);
}
}
&:not(:last-child) > a {
border-bottom: 1px solid $grey_super_light;
}
}
}
.submenu{
overflow: hidden;
-webkit-overflow-scrolling: touch;
overflow-y: auto;
pointer-events: none;
z-index: 9998;
position: fixed;
bottom: 0;
top: 0;
left: 100%;
width:100%;
min-height: 100%;
background-color: #ffffff;
&.opened{
left:0;
pointer-events:auto;
}
&.opened:not(.current){
overflow:hidden;
}
}
.submenu-header {
cursor: pointer;
position: relative;
display: flex;
border-bottom: solid 1px $grey_super_light;
> a {
display: block;
font-size: 14px;
font-weight: 500;
padding: 18px 20px;
padding-left: 20px;
text-decoration: none;
}
> label {
display: block;
width: calc(100% - 110px);
margin-bottom: 8px;
margin-top: 20px;
padding-left: 0px;
font-size: 15px;
font-weight: 500;
text-align: center;
opacity: .5;
}
}
.mobile_menu_user{
li.has-submenu{
.arrow_back{
line-height: 30px;
}
a{
font-size: 13px;
color: $main_text;
.email{
font-size: 12px;
}
}
}
.submenu_user_content{
display: flex;
flex-direction: column;
padding: 20px;
> div{
padding: 5px 0;
.faicon{
padding-right: 10px;
}
}
}
}
.mobile_menu_actions{
display: flex;
flex-direction: column;
padding: 20px;
a{
padding: 0 0 15px 0;
font-size: 13px;
.faicon::before{
padding-right: 10px;
font-size: 20px;
}
}
}
}

View File

@ -18,7 +18,12 @@ $breakpoint-mobile: 600px;
// Posamezne strani
@import "pages/my_surveys";
@import "pages/new_survey";
@import "pages/status";
@import "pages/branching";
@import "pages/survey_settings";
@import "pages/testing";
@import "pages/publish";
@import "pages/data";
@import "pages/analysis";
}

View File

@ -1 +1,59 @@
// Tabele
.analysis_bottom_settings a:first-child{
display: block;
margin: 0 0 20px 0 !important;
}
// Grafi
.chart_holder{
width: 100%;
box-sizing: border-box;
.chart_img{
min-height: auto;
float: none;
img {
width: 100%;
}
}
.chart_settings{
display: none;
}
.chart_bottom_settings{
&:first-child{
display: block;
clear: both;
}
}
}
// Porocila
table.analysis_reports{
border-spacing: 0px;
> tbody > tr,
> tbody > tr > td{
display: flex;
flex-direction: column;
width: 100%;
box-sizing: border-box;
}
> tbody > tr > td{
margin: 10px 0;
}
fieldset{
margin-bottom: 0 !important;
}
}

View File

@ -1 +1,131 @@
#branching{
width: 100%;
li{
margin: 0 10px 0 20px !important;
}
.spr_edit{
display: none !important;
}
.empty_vrivanje {
padding: 50px 0 !important;
margin: 20px 10px 20px 20px !important;
.empty_vrivanje_title{
margin: 0 20px;
font-size: 14px;
}
.empty_vrivanje_subtitle{
margin: 15px 20px 0 15px;
font-size: 13px;
}
}
#bottom_icons_holder{
display: flex;
flex-direction: column;
.forma_bottom{
display: flex;
flex-direction: column;
align-items: left;
width: 100%;
height: auto;
padding: 30px 10px 20px 20px;
.forma_bottom_inner{
display: flex;
flex-direction: row;
padding: 0 0 10px 0;
margin: 0;
a{
margin: 0 11px 0 2px;
padding: 0;
}
}
}
}
}
// Toolbox na levi
#toolbox_advanced_settings{
top: 150px;
}
#toolbox_basic{
top: 187px;
}
// Urejanje vprasanja popup
#vprasanje_float_editing{
position: fixed;
z-index: 99999;
width: 100%;
height: 100%;
max-height: 100%;
overflow-y: auto;
overflow-x: hidden;
margin: 0 !important;
top: 0;
right: 0;
left: 0;
box-shadow: 0px 0px 100px 100px #333;
#vprasanje_edit{
top: 0;
margin-bottom: 55px;
}
#vprasanje_tabs{
position: absolute;
top: 42px;
a.tab_link{
height: auto;
padding: 10px 9px;
}
}
.tab{
padding-top: 100px;
h2{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 42px;
box-sizing: border-box;
padding: 10px;
margin: 0;
}
}
#vprasanje_buttons{
display: flex;
justify-content: space-evenly;
position: relative;
bottom: 30px;
padding: 0 15px;
span{
width: 40%;
margin-left: 0 !important;
text-align: center;
}
}
}

View File

@ -1 +1,94 @@
.page_data{
#vnosi_paginacija{
display: flex;
flex-direction: column;
float: none;
> div{
margin: 5px 0;
}
label{
margin: 0;
padding: 0;
}
}
#data_search_filter{
display: flex;
width: 100%;
box-sizing: border-box;
input{
box-sizing: border-box;
margin-left: 10px;
width: 100%;
}
}
.dataSettingsBasic{
width: 100%;
box-sizing: border-box;
margin: 0;
}
#toggleDataCheckboxes{
display: none;
}
#div_vnosi_data{
#dataTableScroller {
display: none;
}
}
#bottom_data_legend{
display: block;
float: none;
width: 100%;
box-sizing: border-box;
margin: 5px 0 10px 0;
}
}
// Ostale podstrani
.subpage_append,
.subpage_merge,
.subpage_calculation,
.subpage_coding_auto,
.subpage_recoding,
.subpage_coding,
.page_export{
flex-direction: column !important;
.anketa_edit_left,
.anketa_edit_main{
width: 100% !important;
box-sizing: border-box;
margin: 20px 0 !important;
}
.anketa_edit_left{
margin: 0 !important;
}
textarea{
width: 100% !important;
}
#inv_upload_recipients_nosbmt + span{
display: block;
clear: both;
margin: 40px 0 0 0 !important;
}
}

View File

@ -1,19 +1,73 @@
#main #moje_ankete_edit{
padding: 20px !important;
// Tabela z mojimi anketami
table#surveyList_new{
#anketa_edit{
padding: 0 !important;
}
#survey_list{
display: flex;
flex-direction: column;
> div{
margin: 15px 0 20px 0;
}
#anketa_new_float{
display: flex;
justify-content: center;
}
#pagination{
margin-left: auto;
margin-right: auto;
transform: none;
display: none;
&.bottom{
display: block;
}
}
#sortButton,
#filterButton,
#folderSwitch{
display: none;
}
#searchMySurveys{
padding: 0;
form{
display: flex;
justify-content: center;
input[type="text"]{
width: 100%;
padding: 5px 0 5px 7px;
}
}
}
.div_sl_new {
padding: 20px 0;
}
// Tabela z mojimi anketami
table#surveyList_new{
td{
display: none;
&:nth-child(3),
&:nth-child(6),
&:nth-child(7){
&:nth-child(6){
display: table-cell;
}
}
}
}
}

View File

@ -0,0 +1,65 @@
#new_anketa_div{
display: flex;
flex-direction: column;
min-height: auto;
width: 100%;
#left_menu,
#right_content{
width: 100%;
position: relative;
}
#right_content{
box-sizing: border-box;
margin: 20px 0 0 0;
padding: 0;
.setting{
width: 100% !important;
margin: 0 !important;
padding: 0 !important;
}
.survey_title_text_holder{
flex-direction: column !important;
}
select{
width: 100% !important;
margin: 0;
}
input{
width: 100% !important;
box-sizing: border-box;
}
.survey_type_holder{
flex-direction: column !important;
label{
margin-bottom: 15px;
> div{
box-sizing: border-box;
padding: 10px !important;
}
}
}
}
#input_field_holder,
#preview_field_holder{
width: 100% !important;
width: 300px !important;
float: none;
box-sizing: border-box;
margin: 0 !important;
padding: 10px 0 !important;
}
}

View File

@ -0,0 +1,140 @@
#vabila > table,
table.invitations_settings,
#inv_msg_preview table,
#inv_send_mail table{
border-spacing: 0px;
width: 100%;
tbody{
display: flex;
flex-direction: column;
width: 100% !important;
}
> tbody > tr,
> tbody > tr > td{
display: flex;
flex-direction: column;
width: 100% !important;
box-sizing: border-box;
}
> tbody > tr > td{
height: auto !important;
margin: 0;
padding: 0 !important;
> br{
display: none;
}
> div,
> fieldset{
margin: 15px 0;
}
}
colgroup,
colgroup col{
width: 100% !important;
}
}
#surveyInvitationSetting,
#surveyInvitationSettingServer{
min-width: 100% !important;
width: 100% !important;
box-sizing: border-box !important;
}
// Navigacija v vabilih
#inv_top_navi{
display: flex;
flex-direction: column;
width: 100%;
padding: 0;
margin: 0;
.inv_space{
display: none;
}
> #inv_step_nav{
width: 100%;
padding: 0;
margin: 0 0 15px 0;
.inv_step{
height: auto;
padding: 0;
margin: 0;
}
span.label{
padding: 0;
}
}
> #inv_step_nav.yellow{
display: flex;
justify-content: space-between;
.inv_step{
span.circle{
width: 18px;
height: 18px;
line-height: 18px;
}
span.label{
padding: 0 0 0 3px;
}
}
.inv_step_space{
display: none;
}
}
}
// VABILA podstrani
#inv_recipients_profiles_holder,
#inv_import_list_container,
#inv_messages_profiles_holder,
#inv_msg_preview_hld,
#invitation_profile_notes,
#inv_select_mail_to,
#inv_select_mail_preview{
width: 100%;
box-sizing: border-box;
margin: 15px 0 !important;
textarea{
width: 100%;
}
}
#inv_msg_preview table{
th{
height: auto !important;
width: 100% !important;
margin: 0;
padding: 20px 0 0 0 !important;
text-align: left;
}
input{
width: 100%;
box-sizing: border-box;
}
}

View File

@ -0,0 +1,16 @@
table.dashboard{
border-spacing: 0px;
> tbody > tr,
> tbody > tr > td{
display: flex;
flex-direction: column;
width: 100%;
box-sizing: border-box;
}
> tbody > tr > td{
margin: 15px 0;
}
}

View File

@ -0,0 +1,79 @@
#main #anketa #globalSetingsList {
max-width: 100% !important;
width: 100% !important;
fieldset{
width: 100% !important;
}
}
/* NASTAVITVE in ARHIVI */
#main #anketa #anketa_edit.page_nastavitve{
flex-direction: column-reverse;
> div{
width: 100%;
margin: 20px 0;
}
}
/* OBLIKA */
#main #anketa #anketa_edit.page_tema{
#div_theme_group_holder{
width: 100%;
#div_theme_group div.theme_label{
width: 100%;
box-sizing: border-box;
margin-left: 0;
margin-right: 0;
img{
width: 100%;
height: auto;
}
}
}
}
#theme-editor{
width: 100% !important;
float: none !important;
}
#theme-preview{
width: 100% !important;
float: none !important;
margin-top: 80px !important;
}
/* ARHIVI */
#main #anketa #anketa_edit.page_arhivi{
flex-direction: column-reverse;
> div{
width: 100% !important;
margin: 20px 0;
}
#div_archive_content fieldset {
width: 100% !important;
box-sizing: border-box !important;
margin-left: 0 !important;
margin-right: 0 !important;
input{
width: 100% !important;
}
}
}

View File

@ -0,0 +1,26 @@
#srv_diagnostic{
br{
display: none;
}
#srv_diagnostic_results,
#srv_diagnostic_results_right{
clear: both;
display: block !important;
width: 100% !important;
box-sizing: border-box;
margin: 20px 0 !important;
table{
width: 100%;
min-width: 100%;
td + td {
width: auto !important;
}
}
}
}

View File

@ -1495,6 +1495,41 @@ table.trak_inline_nadnaslov td {
/* Osnovne zadeve za prikaz okenc in slik za fotografiranje*/
.fotoresults_div {
float: right;
.fotoresults{
display: flex;
justify-content: center;
align-items: center;
width: 320px;
height: 240px;
border: 1px solid;
}
}
.fotoresults_delete{
display: none;
cursor: pointer;
margin-top: 5px;
width: 150px;
color: #1e88e5;
text-decoration: none;
cursor: pointer;
&:hover {
color: #ffa608;
text-decoration: none;
}
&.upload_fotoresults_delete{
position: static;
margin: 20px 0 10px 20px;
}
}
.my_camera_div {

View File

@ -412,6 +412,12 @@ iframe{
margin: 20px 0 0 0 !important;
padding: 0 !important;
}
.upload_fotoresults_delete{
position: absolute;
left: 100px;
margin: 20px 0 10px 0;
}
}
/* END TIP TEXT, NUMBER */

View File

@ -4,7 +4,7 @@
if($_GET['type'] == 'install')
header("location: https://www.1ka.si/uploadi/1ka_install_20-10-2019.zip");
header("location: https://www.1ka.si/uploadi/1ka_install_7-5-2021.zip");
elseif($_GET['type'] == 'offline')
header("location: https://www.1ka.si/uploadi/1ka_install_offline_23-11-2018.zip");

View File

@ -23,7 +23,7 @@ services:
mysql:
container_name: mysql_1ka
image: mysql:5.6.40
image: mariadb:10.3
ports:
- "3306:3306"
volumes:

View File

@ -684,7 +684,7 @@ return array(
'Sonata\\GoogleAuthenticator\\GoogleQrUrl' => $vendorDir . '/sonata-project/google-authenticator/src/GoogleQrUrl.php',
'Sonata\\GoogleAuthenticator\\RuntimeException' => $vendorDir . '/sonata-project/google-authenticator/src/RuntimeException.php',
'SpremenljivkaSkala' => $baseDir . '/admin/survey/classes/objects/obj.SpremenljivkaSkala.php',
'SqualoApi' => $baseDir . '/admin/survey/modules/mod_squalo/class.SqualoApi.php',
'SqualoApi' => $baseDir . '/admin/survey/classes/surveyEmails/squalo/class.SqualoApi.php',
'SteviloLatex' => $baseDir . '/admin/survey/export/latexclasses/Vprasanja/SteviloLatex.php',
'SteviloXml' => $baseDir . '/admin/survey/export/xmlClasses/Vprasanja/SteviloXml.php',
'Stripe\\Account' => $vendorDir . '/stripe/stripe-php/lib/Account.php',
@ -948,8 +948,9 @@ return array(
'SurveyInfo' => $baseDir . '/admin/survey/classes/class.SurveyInfo.php',
'SurveyInspect' => $baseDir . '/admin/survey/classes/class.SurveyInpect.php',
'SurveyInvitationsNew' => $baseDir . '/admin/survey/classes/surveyEmails/class.SurveyInvitationsNew.php',
'SurveyInvitationsSqualo' => $baseDir . '/admin/survey/modules/mod_squalo/class.SurveyInvitationsSqualo.php',
'SurveyInvitationsSqualo' => $baseDir . '/admin/survey/classes/surveyEmails/squalo/class.SurveyInvitationsSqualo.php',
'SurveyJsonSurveyData' => $baseDir . '/admin/survey/modules/mod_json_survey_export/class.SurveyJsonSurveyData.php',
'SurveyKakovost' => $baseDir . '/admin/survey/modules/mod_kakovost/class.SurveyKakovost.php',
'SurveyLanguageTechnology' => $baseDir . '/admin/survey/classes/class.SurveyLanguageTechnology.php',
'SurveyList' => $baseDir . '/admin/survey/classes/class.SurveyList.php',
'SurveyLog' => $baseDir . '/admin/survey/classes/log/class.SurveyLog.php',

View File

@ -11,8 +11,8 @@ return array(
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'3109cb1a231dcd04bee1f9f620d46975' => $vendorDir . '/paragonie/sodium_compat/autoload.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'2bf0564df058fbe21b5554296cc8571a' => $baseDir . '/main/survey/class.EvalvacijaMain.php',
'5bc35216aa4f6cb823ce4a5cec52fdce' => $baseDir . '/main/survey/mobile-detect/Mobile_Detect.php',

View File

@ -12,8 +12,8 @@ class ComposerStaticInit6b03163c371c5541881b55b762b8c779
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'2bf0564df058fbe21b5554296cc8571a' => __DIR__ . '/../..' . '/main/survey/class.EvalvacijaMain.php',
'5bc35216aa4f6cb823ce4a5cec52fdce' => __DIR__ . '/../..' . '/main/survey/mobile-detect/Mobile_Detect.php',
@ -888,7 +888,7 @@ class ComposerStaticInit6b03163c371c5541881b55b762b8c779
'Sonata\\GoogleAuthenticator\\GoogleQrUrl' => __DIR__ . '/..' . '/sonata-project/google-authenticator/src/GoogleQrUrl.php',
'Sonata\\GoogleAuthenticator\\RuntimeException' => __DIR__ . '/..' . '/sonata-project/google-authenticator/src/RuntimeException.php',
'SpremenljivkaSkala' => __DIR__ . '/../..' . '/admin/survey/classes/objects/obj.SpremenljivkaSkala.php',
'SqualoApi' => __DIR__ . '/../..' . '/admin/survey/modules/mod_squalo/class.SqualoApi.php',
'SqualoApi' => __DIR__ . '/../..' . '/admin/survey/classes/surveyEmails/squalo/class.SqualoApi.php',
'SteviloLatex' => __DIR__ . '/../..' . '/admin/survey/export/latexclasses/Vprasanja/SteviloLatex.php',
'SteviloXml' => __DIR__ . '/../..' . '/admin/survey/export/xmlClasses/Vprasanja/SteviloXml.php',
'Stripe\\Account' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Account.php',
@ -1152,8 +1152,9 @@ class ComposerStaticInit6b03163c371c5541881b55b762b8c779
'SurveyInfo' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyInfo.php',
'SurveyInspect' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyInpect.php',
'SurveyInvitationsNew' => __DIR__ . '/../..' . '/admin/survey/classes/surveyEmails/class.SurveyInvitationsNew.php',
'SurveyInvitationsSqualo' => __DIR__ . '/../..' . '/admin/survey/modules/mod_squalo/class.SurveyInvitationsSqualo.php',
'SurveyInvitationsSqualo' => __DIR__ . '/../..' . '/admin/survey/classes/surveyEmails/squalo/class.SurveyInvitationsSqualo.php',
'SurveyJsonSurveyData' => __DIR__ . '/../..' . '/admin/survey/modules/mod_json_survey_export/class.SurveyJsonSurveyData.php',
'SurveyKakovost' => __DIR__ . '/../..' . '/admin/survey/modules/mod_kakovost/class.SurveyKakovost.php',
'SurveyLanguageTechnology' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyLanguageTechnology.php',
'SurveyList' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyList.php',
'SurveyLog' => __DIR__ . '/../..' . '/admin/survey/classes/log/class.SurveyLog.php',

View File

@ -182,79 +182,6 @@
"url"
]
},
{
"name": "fgrosse/phpasn1",
"version": "v2.2.0",
"version_normalized": "2.2.0.0",
"source": {
"type": "git",
"url": "https://github.com/fgrosse/PHPASN1.git",
"reference": "d1978f7abd580f3fc33561e7f71d4c12c7531fad"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/d1978f7abd580f3fc33561e7f71d4c12c7531fad",
"reference": "d1978f7abd580f3fc33561e7f71d4c12c7531fad",
"shasum": ""
},
"require": {
"php": ">=7.0.0"
},
"require-dev": {
"phpunit/phpunit": "~6.3",
"satooshi/php-coveralls": "~2.0"
},
"suggest": {
"ext-bcmath": "BCmath is the fallback extension for big integer calculations",
"ext-curl": "For loading OID information from the web if they have not bee defined statically",
"ext-gmp": "GMP is the preferred extension for big integer calculations",
"phpseclib/bcmath_compat": "BCmath polyfill for servers where neither GMP nor BCmath is available"
},
"time": "2020-10-11 16:28:18",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"FG\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Friedrich Große",
"email": "friedrich.grosse@gmail.com",
"homepage": "https://github.com/FGrosse",
"role": "Author"
},
{
"name": "All contributors",
"homepage": "https://github.com/FGrosse/PHPASN1/contributors"
}
],
"description": "A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.",
"homepage": "https://github.com/FGrosse/PHPASN1",
"keywords": [
"DER",
"asn.1",
"asn1",
"ber",
"binary",
"decoding",
"encoding",
"x.509",
"x.690",
"x509",
"x690"
]
},
{
"name": "web-token/jwt-core",
"version": "v1.3.10",
@ -1615,147 +1542,6 @@
"promise"
]
},
{
"name": "phpmailer/phpmailer",
"version": "v6.4.0",
"version_normalized": "6.4.0.0",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "050d430203105c27c30efd1dce7aa421ad882d01"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/050d430203105c27c30efd1dce7aa421ad882d01",
"reference": "050d430203105c27c30efd1dce7aa421ad882d01",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-filter": "*",
"ext-hash": "*",
"php": ">=5.5.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"doctrine/annotations": "^1.2",
"phpcompatibility/php-compatibility": "^9.3.5",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.5.6",
"yoast/phpunit-polyfills": "^0.2.0"
},
"suggest": {
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
"psr/log": "For optional PSR-3 debug logging",
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
},
"time": "2021-03-31 20:06:42",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"PHPMailer\\PHPMailer\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1-only"
],
"authors": [
{
"name": "Marcus Bointon",
"email": "phpmailer@synchromedia.co.uk"
},
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Andy Prevost",
"email": "codeworxtech@users.sourceforge.net"
},
{
"name": "Brent R. Matzelle"
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP"
},
{
"name": "guzzlehttp/psr7",
"version": "1.8.1",
"version_normalized": "1.8.1.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "35ea11d335fd638b5882ff1725228b3d35496ab1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1",
"reference": "35ea11d335fd638b5882ff1725228b3d35496ab1",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
"psr/http-message": "~1.0",
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"require-dev": {
"ext-zlib": "*",
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
},
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
},
"time": "2021-03-21 16:25:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.7-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "Tobias Schultze",
"homepage": "https://github.com/Tobion"
}
],
"description": "PSR-7 message implementation that also provides common utility methods",
"keywords": [
"http",
"message",
"psr-7",
"request",
"response",
"stream",
"uri",
"url"
]
},
{
"name": "stripe/stripe-php",
"version": "v7.77.0",
@ -1961,5 +1747,219 @@
"secret-key cryptography",
"side-channel resistant"
]
},
{
"name": "phpmailer/phpmailer",
"version": "v6.4.1",
"version_normalized": "6.4.1.0",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9256f12d8fb0cd0500f93b19e18c356906cbed3d",
"reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-filter": "*",
"ext-hash": "*",
"php": ">=5.5.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"doctrine/annotations": "^1.2",
"phpcompatibility/php-compatibility": "^9.3.5",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.5.6",
"yoast/phpunit-polyfills": "^0.2.0"
},
"suggest": {
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
"psr/log": "For optional PSR-3 debug logging",
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
},
"time": "2021-04-29 12:25:04",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"PHPMailer\\PHPMailer\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1-only"
],
"authors": [
{
"name": "Marcus Bointon",
"email": "phpmailer@synchromedia.co.uk"
},
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Andy Prevost",
"email": "codeworxtech@users.sourceforge.net"
},
{
"name": "Brent R. Matzelle"
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP"
},
{
"name": "guzzlehttp/psr7",
"version": "1.8.2",
"version_normalized": "1.8.2.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
"psr/http-message": "~1.0",
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"require-dev": {
"ext-zlib": "*",
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
},
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
},
"time": "2021-04-26 09:17:50",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.7-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "Tobias Schultze",
"homepage": "https://github.com/Tobion"
}
],
"description": "PSR-7 message implementation that also provides common utility methods",
"keywords": [
"http",
"message",
"psr-7",
"request",
"response",
"stream",
"uri",
"url"
]
},
{
"name": "fgrosse/phpasn1",
"version": "v2.3.0",
"version_normalized": "2.3.0.0",
"source": {
"type": "git",
"url": "https://github.com/fgrosse/PHPASN1.git",
"reference": "20299033c35f4300eb656e7e8e88cf52d1d6694e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/20299033c35f4300eb656e7e8e88cf52d1d6694e",
"reference": "20299033c35f4300eb656e7e8e88cf52d1d6694e",
"shasum": ""
},
"require": {
"php": ">=7.0.0"
},
"require-dev": {
"phpunit/phpunit": "~6.3",
"satooshi/php-coveralls": "~2.0"
},
"suggest": {
"ext-bcmath": "BCmath is the fallback extension for big integer calculations",
"ext-curl": "For loading OID information from the web if they have not bee defined statically",
"ext-gmp": "GMP is the preferred extension for big integer calculations",
"phpseclib/bcmath_compat": "BCmath polyfill for servers where neither GMP nor BCmath is available"
},
"time": "2021-04-24 19:01:55",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"FG\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Friedrich Große",
"email": "friedrich.grosse@gmail.com",
"homepage": "https://github.com/FGrosse",
"role": "Author"
},
{
"name": "All contributors",
"homepage": "https://github.com/FGrosse/PHPASN1/contributors"
}
],
"description": "A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.",
"homepage": "https://github.com/FGrosse/PHPASN1",
"keywords": [
"DER",
"asn.1",
"asn1",
"ber",
"binary",
"decoding",
"encoding",
"x.509",
"x.690",
"x509",
"x690"
]
}
]

View File

@ -1,3 +1,7 @@
#### v2.3.0 (2021-04)
* Allow creating an unsigned CSR and adding the signature later
https://github.com/fgrosse/PHPASN1/pull/82
#### v2.2.0 (2020-08)
* support polyfills for bcmath and gmp, and add a composer.json
suggestion for the `phpseclib/bcmath_polyfill` for servers unable

View File

@ -15,6 +15,7 @@ class OID
const RSA_ENCRYPTION = '1.2.840.113549.1.1.1';
const MD5_WITH_RSA_ENCRYPTION = '1.2.840.113549.1.1.4';
const SHA1_WITH_RSA_SIGNATURE = '1.2.840.113549.1.1.5';
const SHA256_WITH_RSA_SIGNATURE = '1.2.840.113549.1.1.11';
const PKCS9_EMAIL = '1.2.840.113549.1.9.1';
const PKCS9_UNSTRUCTURED_NAME = '1.2.840.113549.1.9.2';
const PKCS9_CONTENT_TYPE = '1.2.840.113549.1.9.3';

View File

@ -41,7 +41,7 @@ class CSR extends Sequence
* @param string $signature
* @param string $signatureAlgorithm
*/
public function __construct($commonName, $email, $organization, $locality, $state, $country, $organizationalUnit, $publicKey, $signature, $signatureAlgorithm = OID::SHA1_WITH_RSA_SIGNATURE)
public function __construct($commonName, $email, $organization, $locality, $state, $country, $organizationalUnit, $publicKey, $signature = null, $signatureAlgorithm = OID::SHA1_WITH_RSA_SIGNATURE)
{
$this->subject = new CertificateSubject(
$commonName,
@ -56,8 +56,10 @@ class CSR extends Sequence
$this->signature = $signature;
$this->signatureAlgorithm = $signatureAlgorithm;
if (isset($signature)) {
$this->createCSRSequence();
}
}
protected function createCSRSequence()
{
@ -68,11 +70,31 @@ class CSR extends Sequence
$certRequestInfo = new Sequence($versionNr, $this->subject, $publicKey);
// Clear the underlying Construct
$this->rewind();
$this->children = [];
$this->addChild($certRequestInfo);
$this->addChild($signatureAlgorithm);
$this->addChild($signature);
}
public function getSignatureSubject()
{
$versionNr = new Integer(self::CSR_VERSION_NR);
$publicKey = new PublicKey($this->publicKey);
$certRequestInfo = new Sequence($versionNr, $this->subject, $publicKey);
return $certRequestInfo->getBinary();
}
public function setSignature($signature, $signatureAlgorithm = OID::SHA1_WITH_RSA_SIGNATURE)
{
$this->signature = $signature;
$this->signatureAlgorithm = $signatureAlgorithm;
$this->createCSRSequence();
}
public function __toString()
{
$tmp = base64_encode($this->getBinary());

View File

@ -0,0 +1,29 @@
name: Static analysis
on:
pull_request:
jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
extensions: mbstring
- name: Download dependencies
run: composer update --no-interaction --no-progress
- name: Download PHP CS Fixer
run: composer require "friendsofphp/php-cs-fixer:2.18.4"
- name: Execute PHP CS Fixer
run: vendor/bin/php-cs-fixer fix --diff-format udiff --dry-run

View File

@ -7,16 +7,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
## Unreleased
## [1.8.1] - 2021-03-21
## 1.8.2 - 2021-04-26
### Fixed
- Handle possibly unset `url` in `stream_get_meta_data`
## 1.8.1 - 2021-03-21
### Fixed
- Issue parsing IPv6 URLs
- Issue modifying ServerRequest lost all its attributes
## [1.8.0] - 2021-03-21
## 1.8.0 - 2021-03-21
### Added
@ -28,7 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Issue when creating stream from `php://input` and curl-ext is not installed
- Broken `Utils::tryFopen()` on PHP 8
## [1.7.0] - 2020-09-30
## 1.7.0 - 2020-09-30
### Added
@ -272,7 +278,6 @@ Currently unsupported:
[Unreleased]: https://github.com/guzzle/psr7/compare/1.6.0...HEAD
[1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0
[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2
[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1

View File

@ -109,7 +109,7 @@ class Uri implements UriInterface
$url
);
$result = parse_url($prefix.$encodedUrl);
$result = parse_url($prefix . $encodedUrl);
if ($result === false) {
return false;

View File

@ -317,7 +317,8 @@ final class Utils
* The 'php://input' is a special stream with quirks and inconsistencies.
* We avoid using that stream by reading it into php://temp
*/
if (\stream_get_meta_data($resource)['uri'] === 'php://input') {
$metaData = \stream_get_meta_data($resource);
if (isset($metaData['uri']) && $metaData['uri'] === 'php://input') {
$stream = self::tryFopen('php://temp', 'w+');
fwrite($stream, stream_get_contents($resource));
fseek($stream, 0);

View File

@ -2,6 +2,8 @@
Please disclose any security issues or vulnerabilities found through [Tidelift's coordinated disclosure system](https://tidelift.com/security) or to the maintainers privately.
PHPMailer versions between 6.1.8 and 6.4.0 contain a regression of the earlier CVE-2018-19296 object injection vulnerability as a result of [a fix for Windows UNC paths in 6.1.8](https://github.com/PHPMailer/PHPMailer/commit/e2e07a355ee8ff36aba21d0242c5950c56e4c6f9). Recorded as [CVE-2020-36326](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-36326). Reported by Fariskhi Vidyan via Tidelift. 6.4.1 fixes this issue, and also enforces stricter checks for URL schemes in local path contexts.
PHPMailer versions 6.1.5 and earlier contain an output escaping bug that occurs in `Content-Type` and `Content-Disposition` when filenames passed into `addAttachment` and other methods that accept attachment names contain double quote characters, in contravention of RFC822 3.4.1. No specific vulnerability has been found relating to this, but it could allow file attachments to bypass attachment filters that are based on matching filename extensions. Recorded as [CVE-2020-13625](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-13625). Reported by Elar Lang of Clarified Security.
PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing `phar://` paths into `addAttachment()` and other functions that may receive unfiltered local paths, possibly leading to RCE. Recorded as [CVE-2018-19296](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-19296). See [this article](https://knasmueller.net/5-answers-about-php-phar-exploitation) for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as `phar://`. Reported by Sehun Oh of cyberone.kr.

View File

@ -1 +1 @@
6.4.0
6.4.1

View File

@ -57,5 +57,9 @@
"PHPMailer\\Test\\": "test/"
}
},
"license": "LGPL-2.1-only"
"license": "LGPL-2.1-only",
"scripts": {
"check": "./vendor/bin/phpcs",
"test": "./vendor/bin/phpunit"
}
}

View File

@ -16,11 +16,11 @@ $PHPMAILER_LANG['file_access'] = 'Немає доступу до фай
$PHPMAILER_LANG['file_open'] = 'Помилка файлової системи: не вдається відкрити файл: ';
$PHPMAILER_LANG['from_failed'] = 'Невірна адреса відправника: ';
$PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail().';
$PHPMAILER_LANG['provide_address'] = 'Будь-ласка, введіть хоча б одну email-адресу отримувача.';
$PHPMAILER_LANG['provide_address'] = 'Будь ласка, введіть хоча б одну email-адресу отримувача.';
$PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.';
$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: не вдалося відправлення для таких отримувачів: ';
$PHPMAILER_LANG['empty_message'] = 'Пусте повідомлення';
$PHPMAILER_LANG['invalid_address'] = 'Не відправлено через невірний формат email-адреси: ';
$PHPMAILER_LANG['invalid_address'] = 'Не відправлено через неправильний формат email-адреси: ';
$PHPMAILER_LANG['signing'] = 'Помилка підпису: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка з\'єднання з SMTP-сервером';
$PHPMAILER_LANG['smtp_error'] = 'Помилка SMTP-сервера: ';

View File

@ -748,7 +748,7 @@ class PHPMailer
*
* @var string
*/
const VERSION = '6.4.0';
const VERSION = '6.4.1';
/**
* Error severity: message only, continue processing.
@ -1721,9 +1721,10 @@ class PHPMailer
fwrite($mail, $header);
fwrite($mail, $body);
$result = pclose($mail);
$addrinfo = static::parseAddresses($toAddr);
$this->doCallback(
($result === 0),
[$toAddr],
[[$addrinfo['address'], $addrinfo['name']]],
$this->cc,
$this->bcc,
$this->Subject,
@ -1810,7 +1811,8 @@ class PHPMailer
*/
protected static function isPermittedPath($path)
{
return !preg_match('#^[a-z]+://#i', $path);
//Matches scheme definition from https://tools.ietf.org/html/rfc3986#section-3.1
return !preg_match('#^[a-z][a-z\d+.-]*://#i', $path);
}
/**
@ -1822,12 +1824,15 @@ class PHPMailer
*/
protected static function fileIsAccessible($path)
{
if (!static::isPermittedPath($path)) {
return false;
}
$readable = file_exists($path);
//If not a UNC path (expected to start with \\), check read permission, see #2069
if (strpos($path, '\\\\') !== 0) {
$readable = $readable && is_readable($path);
}
return static::isPermittedPath($path) && $readable;
return $readable;
}
/**
@ -1876,7 +1881,17 @@ class PHPMailer
if ($this->SingleTo && count($toArr) > 1) {
foreach ($toArr as $toAddr) {
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
$this->doCallback($result, [$toAddr], $this->cc, $this->bcc, $this->Subject, $body, $this->From, []);
$addrinfo = static::parseAddresses($toAddr);
$this->doCallback(
$result,
[[$addrinfo['address'], $addrinfo['name']]],
$this->cc,
$this->bcc,
$this->Subject,
$body,
$this->From,
[]
);
}
} else {
$result = $this->mailPassthru($to, $this->Subject, $body, $header, $params);
@ -1965,7 +1980,7 @@ class PHPMailer
$isSent = true;
}
$callbacks[] = ['issent' => $isSent, 'to' => $to[0]];
$callbacks[] = ['issent' => $isSent, 'to' => $to[0], 'name' => $to[1]];
}
}
@ -1986,7 +2001,7 @@ class PHPMailer
foreach ($callbacks as $cb) {
$this->doCallback(
$cb['issent'],
[$cb['to']],
[[$cb['to'], $cb['name']]],
[],
[],
$this->Subject,

View File

@ -46,7 +46,7 @@ class POP3
*
* @var string
*/
const VERSION = '6.4.0';
const VERSION = '6.4.1';
/**
* Default POP3 port number.

View File

@ -35,7 +35,7 @@ class SMTP
*
* @var string
*/
const VERSION = '6.4.0';
const VERSION = '6.4.1';
/**
* SMTP line break constant.