0){ $this->anketa = $anketa; } } public function displaySettings(){ global $lang; $settings = $this->getSettings(); echo '
'.$lang['settings'].''; // Belezenje post time-a echo ''.$lang['srv_advanced_paradata_collect_post_time'].':'; echo ''; echo ''; echo '
'; echo '
'; // Gumb shrani echo '
'; echo '
'; echo $lang['edit1337'] . '
'; echo '
'; echo '
'; echo '
'; // Prikazemo parapodatke $this->displayParadata(); } // Pridobimo trenutne nastavitve za anketo public function getSettings(){ $settings = array(); // Default vrednosti $settings['collect_post_time'] = '1'; $sql = sisplet_query("SELECT * FROM srv_advanced_paradata_settings WHERE ank_id='".$this->anketa."'"); if(mysqli_num_rows($sql) > 0){ $row = mysqli_fetch_array($sql); $settings['collect_post_time'] = $row['collect_post_time']; } return $settings; } private function displayParadata(){ global $lang; global $site_url; $sape = new SurveyAdvancedParadataExport($this->anketa); echo '
'.$lang['srv_results'].''; // Opcija za brisanje loga echo '

'; echo ' Delete all data'; echo '

'; // Po sejah po straneh echo 'Seja na strani'; $href_csv = 'izvoz.php?m=advanced_paradata_csv&table=srv_advanced_paradata_page&anketa=' . $this->anketa; echo ' (CSV izvoz)'; $sape->displayPageTable(); // Po vprasanjih echo 'Vprašanja'; $href_csv = 'izvoz.php?m=advanced_paradata_csv&table=srv_advanced_paradata_question&anketa=' . $this->anketa; echo ' (CSV izvoz)'; $sape->displayQuestionTable(); // Po vrednostih echo 'Vrednosti'; $href_csv = 'izvoz.php?m=advanced_paradata_csv&table=srv_advanced_paradata_vrednost&anketa=' . $this->anketa; echo ' (CSV izvoz)'; $sape->displayVrednostTable(); // Ostalo echo 'Ostalo'; $href_csv = 'izvoz.php?m=advanced_paradata_csv&table=srv_advanced_paradata_other&anketa=' . $this->anketa; echo ' (CSV izvoz)'; $sape->displayOtherTable(); // Premiki miske echo 'Premiki miške'; $href_csv = 'izvoz.php?m=advanced_paradata_csv&table=srv_advanced_paradata_movement&anketa=' . $this->anketa; echo ' (CSV izvoz)'; $sape->displayMovementTable(); // Alerti echo 'Alerti'; $href_csv = 'izvoz.php?m=advanced_paradata_csv&table=srv_advanced_paradata_alert&anketa=' . $this->anketa; echo ' (CSV izvoz)'; $sape->displayAlertTable(); echo '
'; } public function ajax() { // Brisanje logov if (isset($_GET['a']) && $_GET['a'] == 'logDataDelete') { $sql = sisplet_query("DELETE FROM srv_advanced_paradata_page WHERE ank_id='".$this->anketa."'"); } // Shranjevanje nastavitev if(isset($_GET['a']) && $_GET['a'] == 'save_settings'){ $collect_post_time = isset($_POST['collect_post_time']) ? $_POST['collect_post_time'] : '1'; $sql = sisplet_query("INSERT INTO srv_advanced_paradata_settings (ank_id, collect_post_time) VALUES ('".$this->anketa."', '".$collect_post_time."') ON DUPLICATE KEY UPDATE collect_post_time='".$collect_post_time."'"); if (!$sql) echo mysqli_error($GLOBALS['connect_db']); } } }