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/sa_koda.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 '')
-rw-r--r-- | main/survey/sa_koda.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/survey/sa_koda.php b/main/survey/sa_koda.php index b7d00b6..8cbc54d 100644 --- a/main/survey/sa_koda.php +++ b/main/survey/sa_koda.php @@ -10,7 +10,7 @@ include_once('../../function.php'); if (!empty($_POST['koda'])) {
$koda = strtolower($_POST['koda']);
- $sql = sisplet_query("SELECT url, anketa_id FROM srv_hierarhija_koda WHERE koda='" . $koda . "'");
+ $sql = sisplet_query("SELECT h.url, h.anketa_id, a.hash FROM srv_hierarhija_koda h, srv_anketa a WHERE h.koda='".$koda."' AND h.anketa_id=a.id");
if ($sql->num_rows > 0) {
$row = $sql->fetch_object();
@@ -19,7 +19,7 @@ if (!empty($_POST['koda'])) { $url_encode_spremenljivke = urlencode(base64_encode($row->url));
//celotni url do ankete
- header("Location: " . $site_url . "a/" . $row->anketa_id . "?enc=" . $url_encode_spremenljivke);
+ header("Location: " . $site_url . "a/" . $row->hash . "?enc=" . $url_encode_spremenljivke);
die();
}
@@ -35,7 +35,7 @@ if (!empty($_POST['koda'])) { $url_encode_spremenljivke = urlencode(base64_encode($koda_resevanje->url . '&supersifra=' . $koda.'&resujem=0'));
//celotni url do ankete
- header("Location: " . $site_url . "a/" . $row->anketa_id . "?enc=" . $url_encode_spremenljivke);
+ header("Location: " . $site_url . "a/" . $row->hash . "?enc=" . $url_encode_spremenljivke);
die();
}
|