summaryrefslogtreecommitdiffstats
path: root/admin/survey/AnalysisArchive.php
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-01-11 12:35:47 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2022-01-11 12:35:47 +0100
commit19985dbb8c0aa66dc4bf7905abc1148de909097d (patch)
tree2cd5a5d20d7e80fc2a51adf60d838d8a2c40999e /admin/survey/AnalysisArchive.php
download1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.gz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.bz2
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.lz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.xz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.zst
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.zip
Diffstat (limited to 'admin/survey/AnalysisArchive.php')
-rw-r--r--admin/survey/AnalysisArchive.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/admin/survey/AnalysisArchive.php b/admin/survey/AnalysisArchive.php
new file mode 100644
index 0000000..96d9a4b
--- /dev/null
+++ b/admin/survey/AnalysisArchive.php
@@ -0,0 +1,38 @@
+<?php
+ob_start();
+ include_once('../../settings.php');
+ include_once($site_path.'function.php');
+ include_once('../../vendor/autoload.php');
+
+ global $site_path, $admin_type, $lang;
+ $anketa = $_GET['anketa'];
+ $aid = $_GET['aid']; // arhiv id
+
+ session_start();
+ checkArchiveAccessSessionValues($aid, $anketa);
+
+ if (isset($anketa) && isset($aid)) {
+ SurveyAnalysisArchive :: Init($anketa);
+ SurveyAnalysisArchive :: ViewArchive($aid);
+ } else {
+ echo 'Error!';
+ }
+
+ /**
+ * Just for acces with password
+ */
+ function checkArchiveAccessSessionValues($aid, $anketa){
+ if(isset($_POST['archive_access_pass'])){
+ # polovimo podatke o arhivu
+ $s = sisplet_query("SELECT access_password FROM srv_analysis_archive WHERE id='".$aid."' AND sid='".$anketa."'");
+ if($s){
+ $row = mysqli_fetch_assoc($s);
+ if($row['access_password'] == $_POST['archive_access_pass'])
+ $_SESSION['archive_access'][$aid] = '1';
+ else
+ $_SESSION['archive_access'][$aid] = '0';
+ }
+ }
+ }
+ob_flush();
+?> \ No newline at end of file