summaryrefslogtreecommitdiffstats
path: root/main/survey/sa_koda.php
diff options
context:
space:
mode:
Diffstat (limited to 'main/survey/sa_koda.php')
-rw-r--r--main/survey/sa_koda.php6
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();
}