From 75160b12821f7f4299cce7f0b69c83c1502ae071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 27 May 2024 13:08:29 +0200 Subject: 2024-02-19 upstream --- main/survey/sa_koda.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main/survey/sa_koda.php') 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(); } -- cgit v1.2.3