diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
commit | 75160b12821f7f4299cce7f0b69c83c1502ae071 (patch) | |
tree | 27e25e4ccaef45f0c58b22831164050d1af1d4db /main/survey/edit_anketa.php | |
parent | prvi-commit (diff) | |
download | 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip |
Diffstat (limited to 'main/survey/edit_anketa.php')
-rw-r--r-- | main/survey/edit_anketa.php | 12 |
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 |