summaryrefslogtreecommitdiffstats
path: root/main/survey/edit_anketa.php
blob: f57a1edc3fcee6b8df1ebe95d3e05b782d3516d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php

include_once('../../function.php');

$anketa = $_GET['anketa'];
$usr_id = $_GET['usr_id'];
$preview = $_GET['preview'];
$code = isset($_GET['code']) ? '&code='.$_GET['code'] : '';

$sql1 = sisplet_query("SELECT cookie FROM srv_anketa WHERE id = '$anketa'");
$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) {
	$urejanje = '&quick_view=1'; 
} else {
	$urejanje = '&urejanje=1';
}

if ($row1['cookie'] == -1) {
	
	header("Location: ".$site_url."main/survey/index.php?anketa=$anketa&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);
}
?>