tip = 1 * checkbox -> tip = 2 * select -> tip = 3 * text -> tip = 4 // ni vec v uporabi * besedilo* -> tip = 21 * label -> tip = 5 * multigrid -> tip = 6 * multicheckbox -> tip = 16 * multitext -> tip = 19 * multinumber -> tip = 20 * number -> tip = 7 * compute -> tip = 22 // samo v naprednejših anketah (ifi ali test anketa) * quota -> tip = 25 // samo v naprednejših anketah (ifi ali test anketa) * datum -> tip = 8 * ranking -> tip = 17 * vsota -> tip = 18 * grid - multiple -> tip = 24 * iz knjiznice -> tip = 23 // podtip nam pove za tip vprasanja, ki ga poiscemo glede na variablo * SN-imena -> tip = 9 * Map-lokacija -> tip = 26 * HeatMap -> tip = 27 *****************************************/ namespace App\Controllers\Vprasanja; use App\Controllers\Controller; use App\Controllers\FindController as Find; use App\Controllers\HeaderController as Header; use App\Controllers\HelperController as Helper; use App\Controllers\LanguageController as Language; use App\Controllers\StatisticController as Statistic; use App\Controllers\Vprasanja\ComputeController as Compute; use App\Controllers\Vprasanja\DatumController as Datum; use App\Controllers\Vprasanja\DoubleController as Double; use App\Controllers\Vprasanja\DragDropController as DragDrop; use App\Controllers\Vprasanja\DynamicController as Dynamic; use App\Controllers\Vprasanja\ImenaController as Imena; use App\Controllers\Vprasanja\MaxDiffController as MaxDiff; use App\Controllers\Vprasanja\MultigridController as Multigrid; use App\Controllers\Vprasanja\MultigridMobileController as MultigridMobile; use App\Controllers\Vprasanja\NumberController as Number; use App\Controllers\Vprasanja\OneAgainstAnotherController as OneAgainstAnother; use App\Controllers\Vprasanja\QuotaController as Quota; use App\Controllers\Vprasanja\RadioCheckboxSelectController as RadioCheckboxSelect; use App\Controllers\Vprasanja\RankingController as Ranking; use App\Controllers\Vprasanja\SystemVariableController as SystemVariable; use App\Controllers\Vprasanja\TextController as Text; use App\Controllers\Vprasanja\VprasanjaController as Vprasanja; use App\Controllers\Vprasanja\VsotaController as Vsota; use App\Controllers\Vprasanja\MapsController as Maps; use App\Controllers\Vprasanja\ImageHotSpotController as HotSpot; use App\Controllers\Vprasanja\HeatMapController as HeatMap; use App\Models\Model; use Branching; use enkaParameters; use SurveyInfo; use SurveySetting; use SurveySlideshow; use UserAccess; class VprasanjaController extends Controller { public function __construct() { parent::getGlobalVariables(); } /************************************************ * Get instance ************************************************/ private static $_instance; public static function getInstance() { if (self::$_instance) { self::refreshVariables(); return self::$_instance; } return new VprasanjaController(); } private function refreshVariables() { return parent::getAllVariables(); } /** * @desc prikaze spremenljivke v trenutni grupi */ public function displaySpremenljivke(){ if (!get('printPreview')) { // poiscemo vprasanja s prejsnje strani, ki imajo vklopljeno statistiko Statistic::displayStatistika(); // zgeneriramo sistemske spremenljivke Header::getInstance()->displaySistemske(); // prikazemo skrita ze odgovorjena vprasanja Vprasanja::getInstance()->displaySpremenljivkeHidden(); } $offset = 0; $zaporedna = 1; if (SurveyInfo::getInstance()->getSurveyCountType() > 0) { // Preštejemo koliko vprašanj je bilo do sedaj $sqlg = sisplet_query("SELECT vrstni_red FROM srv_grupa WHERE id='" . get('grupa') . "'"); $rowg = mysqli_fetch_assoc($sqlg); $vrstni_red = $rowg['vrstni_red']; $sqlCountPast = sisplet_query("SELECT count(*) as cnt FROM srv_spremenljivka s, srv_grupa g WHERE g.ank_id='" . get('anketa') . "' AND s.gru_id=g.id AND g.vrstni_red < '$vrstni_red' ORDER BY g.vrstni_red ASC, s.vrstni_red ASC"); $rowCount = mysqli_fetch_assoc($sqlCountPast); $offset = $rowCount['cnt']; } // poiscemo vprasanja / spremenljivke // če imamo pri posamezni spremenljivki nastavljeno da jo prikazujemo na začetku vsake strani if (get('displayAllPages')) { $sql = sisplet_query("SELECT s.id FROM srv_spremenljivka AS s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='" . get('anketa') . "' ORDER BY g.vrstni_red, s.vrstni_red ASC"); } else { // Optimizirano $sql = sisplet_query("SELECT s.id FROM srv_spremenljivka AS s, srv_grupa g WHERE ((s.gru_id='" . get('grupa') . "' AND s.visible='1' AND g.ank_id='" . get('anketa') . "') OR (s.showOnAllPages = '1' AND s.visible='1' AND g.ank_id='" . get('anketa') . "')) AND s.gru_id=g.id ORDER BY g.vrstni_red, s.vrstni_red ASC"); } if(SurveyInfo::getInstance()->checkSurveyModule('evoli_teammeter') || SurveyInfo::getInstance()->checkSurveyModule('evoli_quality_climate') || SurveyInfo::getInstance()->checkSurveyModule('evoli_teamship_meter') || SurveyInfo::getInstance()->checkSurveyModule('evoli_organizational_employeeship_meter') ) $evoli_teammeter = true; else $evoli_teammeter = false; while ($row = mysqli_fetch_array($sql)) { // Izbira departmenta za modul EVOLI TEAMMETER / evoli_quality_climate / evoli_teamship_meter / evoli_organizational_employeeship_meter na prvi strani if($evoli_teammeter){ // Ce smo na prvi strani in izpisujemo drugo vprasanje $sqlg = sisplet_query("SELECT vrstni_red FROM srv_grupa WHERE id='" . get('grupa') . "'"); $rowg = mysqli_fetch_assoc($sqlg); $vrstni_red = $rowg['vrstni_red']; if($zaporedna == 2 && $rowg['vrstni_red'] == 1){ // Dobimo id skupine (podjetja) za respondenta $sqlGroupTM = sisplet_query("SELECT d.* FROM srv_data_vrednost_active d, srv_spremenljivka s, srv_grupa g WHERE g.ank_id='" . get('anketa') . "' AND d.usr_id='" . get('usr_id') . "' AND s.skupine='1' AND s.id=d.spr_id AND g.id=s.gru_id"); $rowGroupTM = mysqli_fetch_array($sqlGroupTM); // Loop cez vse oddelke (departments) za izbrano skupino (podjetje) $sqlTM = sisplet_query("SELECT d.* FROM srv_evoli_teammeter_department d, srv_evoli_teammeter tm WHERE d.tm_id=tm.id AND tm.skupina_id='".$rowGroupTM['vre_id']."'"); if(mysqli_num_rows($sqlTM) > 0){ echo '
'; $b->conditions_display($if); $b->blocks_display($if); echo '
'; } echo '' . $row['info'] . '
'; echo '' . $row['naslov'] . ' | '; if ($row['other'] == 1) echo ' | '; echo ' |
' . $row['naslov'] . ' | '; if ($row['other'] == 1) echo ' | '; echo ' |