4
* Copyright (C) 2007 The LimeSurvey Project Team / Carsten Schmitz
6
* License: GNU/GPL License v2 or later, see LICENSE.php
7
* LimeSurvey is free software. This version may have been modified pursuant
8
* to the GNU General Public License, and as distributed it includes or
9
* is derivative of works licensed under the GNU General Public License or
10
* other free or open source software licenses.
11
* See COPYRIGHT.php for copyright notices and details.
13
* $Id: access_denied.php 4247 2008-02-16 00:24:07Z lemeur $
17
if (!isset($dbprefix) || isset($_REQUEST['dbprefix'])) {die("Cannot run this script directly (access_denied)");}
19
if (isset($_SESSION['loginID']))
22
$accesssummary = "<br /><strong>".$clang->gT("Access denied!")."</strong><br />\n";
24
$action=returnglobal('action');
25
if ( $action == "dumpdb" )
27
$accesssummary .= "<p>".$clang->gT("You are not allowed dump the database!")."</p>";
28
$accesssummary .= "<a href='$scriptname'>".$clang->gT("Continue")."</a><br /> \n";
30
elseif($action == "dumplabel")
32
$accesssummary .= "<p>".$clang->gT("You are not allowed export a label set!")."</p>";
33
$accesssummary .= "<a href='$scriptname'>".$clang->gT("Continue")."</a><br /> \n";
35
elseif($action == "edituser")
37
$accesssummary .= $clang->gT("You are not allowed to change user data!");
38
$accesssummary .= "<br /><br /><a href='$scriptname?action=editusers'>".$clang->gT("Continue")."</a><br /> \n";
40
elseif($action == "newsurvey")
42
$accesssummary .= "<p>".$clang->gT("You are not allowed to create new surveys!")."</p>";
43
$accesssummary .= "<a href='$scriptname'>".$clang->gT("Continue")."</a><br /> \n";
45
elseif($action == "deletesurvey")
47
$accesssummary .= "<p>".$clang->gT("You are not allowed to delete this survey!")."</p>";
48
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
50
elseif($action == "addquestion")
52
$accesssummary .= "<p>".$clang->gT("You are not allowed to add new questions for this survey!")."</p>";
53
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
55
elseif($action == "activate")
57
$accesssummary .= "<p>".$clang->gT("You are not allowed to activate this survey!")."</p>";
58
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
60
elseif($action == "deactivate")
62
$accesssummary .= "<p>".$clang->gT("You are not allowed to deactivate this survey!")."</p>";
63
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
65
elseif($action == "addgroup")
67
$accesssummary .= "<p>".$clang->gT("You are not allowed to add a group to this survey!")."</p>";
68
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
70
elseif($action == "ordergroups")
72
$accesssummary .= "<p>".$clang->gT("You are not allowed to order groups in this survey!")."</p>";
73
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
75
elseif($action == "editsurvey")
77
$accesssummary .= "<p>".$clang->gT("You are not allowed to edit this survey!")."</p>";
78
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
80
elseif($action == "editgroup")
82
$accesssummary .= "<p>".$clang->gT("You are not allowed to edit groups in this survey!")."</p>";
83
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
85
elseif($action == "browse_response" || $action == "listcolumn" || $action == "vvexport" || $action == "vvimport")
87
$accesssummary .= "<p>".$clang->gT("You are not allowed to browse responses!")."</p>";
88
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
90
elseif($action == "assessment")
92
$accesssummary .= "<p>".$clang->gT("You are not allowed to set assessment rules!")."</p>";
93
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
95
elseif($action == "delusergroup")
97
$accesssummary .= "<p>".$clang->gT("You are not allowed to delete this group!")."</p>";
98
$accesssummary .= "<a href='$scriptname?action=editusergroups'>".$clang->gT("Continue")."</a><br /> \n";
100
elseif($action == "importsurvey")
102
$accesssummary .= "<p>".$clang->gT("You are not allowed to import a survey!")."</p>";
103
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
106
elseif($action == "importgroup")
108
$accesssummary .= "<p>".$clang->gT("You are not allowed to import a group!")."</p>";
109
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
111
elseif($action == "importquestion")
113
$accesssummary .= "<p>".$clang->gT("You are not allowed to to import a question!")."</p>";
114
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
116
elseif($action == "CSRFwarn")
118
$accesssummary .= "<p><font color='red'>".$clang->gT("Security Alert")."</font>: ".$clang->gT("Someone may be trying to use your LimeSurvey session (CSRF attack suspected). If you just clicked on a malicious link, please report this to your system administrator.")."</p>";
119
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
121
elseif($action == "FakeGET")
123
$accesssummary .= "<p><font color='red'>".$clang->gT("Security Alert")."</font>: ".$clang->gT("Someone may be trying to use your LimeSurvey session by using dangerous GET requests (CSRF attack suspected). If you just clicked on a malicious link, please report this to your system administrator.")."</p>";
124
$accesssummary .= "<a href='$scriptname?sid={$sid}'>".$clang->gT("Continue")."</a><br /> \n";
128
$accesssummary .= "<br />".$clang->gT("You are not allowed to perform this operation!")."<br />\n";
130
$accesssummary .= "<br /><br /><a href='$scriptname?sid=$sid>".$clang->gT("Continue")."</a><br /> \n";
131
elseif(!empty($ugid))
132
//elseif(isset($_GET['ugid']))
134
$accesssummary .= "<br /><br /><a href='$scriptname?action=editusergroups&ugid={$ugid}'>".$clang->gT("Continue")."</a><br /> \n";
137
$accesssummary .= "<br /><br /><a href='$scriptname'>".$clang->gT("Continue")."</a><br /> \n";