summaryrefslogtreecommitdiffstats
path: root/main/survey/edit_anketa.php
diff options
context:
space:
mode:
Diffstat (limited to 'main/survey/edit_anketa.php')
-rw-r--r--main/survey/edit_anketa.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/main/survey/edit_anketa.php b/main/survey/edit_anketa.php
index f57a1ed..24632e9 100644
--- a/main/survey/edit_anketa.php
+++ b/main/survey/edit_anketa.php
@@ -2,9 +2,11 @@
include_once('../../function.php');
-$anketa = $_GET['anketa'];
+$anketa_hash = $_GET['anketa'];
+$anketa = getSurveyIdFromHash($anketa_hash);
+
$usr_id = $_GET['usr_id'];
-$preview = $_GET['preview'];
+$preview = isset($_GET['preview']) ? $_GET['preview'] : null;
$code = isset($_GET['code']) ? '&code='.$_GET['code'] : '';
$sql1 = sisplet_query("SELECT cookie FROM srv_anketa WHERE id = '$anketa'");
@@ -13,7 +15,7 @@ $row1 = mysqli_fetch_array($sql1);
$sql = sisplet_query("SELECT cookie FROM srv_user WHERE id = '$usr_id'");
$row = mysqli_fetch_array($sql);
-if ($_GET['quick_view'] == 1) {
+if (isset($_GET['quick_view']) && $_GET['quick_view'] == 1) {
$urejanje = '&quick_view=1';
} else {
$urejanje = '&urejanje=1';
@@ -21,9 +23,9 @@ if ($_GET['quick_view'] == 1) {
if ($row1['cookie'] == -1) {
- header("Location: ".$site_url."main/survey/index.php?anketa=$anketa&survey-".$anketa."=".$row['cookie'].$urejanje.$code);
+ header("Location: ".$site_url."main/survey/index.php?anketa=".$anketa_hash."&survey-".$anketa."=".$row['cookie'].$urejanje.$code);
} else {
setcookie('survey-'.$anketa, $row['cookie'], 0);
- header("Location: ".$site_url."main/survey/index.php?anketa=$anketa".$urejanje.$code);
+ header("Location: ".$site_url."main/survey/index.php?anketa=".$anketa_hash.$urejanje.$code);
}
?> \ No newline at end of file