summaryrefslogtreecommitdiffstats
path: root/admin/survey/unsubscribe.php
blob: b92ca1f753bb334c6c0fefce7cfa29030bb1145c (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
30
31
32
33
34
35
36
37
38
39
40
<?php
	
	/**
	* da se lahko uporabnik odjavi iz "mailing liste"
	* 
	* zbrisemo ga iz baze respondentov glede na njegov cookie ID
	* 
	*/

	header('Cache-Control: no-cache');
	header('Pragma: no-cache');
	
	include('../../function.php');
	include_once 'definition.php';
	include_once('../../vendor/autoload.php');
	
	
	echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
	echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
	
	echo '<head>';
	echo '	<title>'.$lang['user_bye_hl'].'</title>';
	echo '	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
	echo '</head>';
	
	
	echo '<body>';
	
	$anketa = $_GET['anketa'];
	if ((int)$anketa > 0) {
		$su = new SurveyUnsubscribe($anketa);
		$su::doUnsubscribe();
		
	} else {
		echo $lang['user_bye_missing_id'];
		exit;
	}
	
	echo '</body>';
?>