~adamzammit/quexs/quexscativm

« back to all changes in this revision

Viewing changes to include/limesurvey/admin/access_denied.php

  • Committer: azammitdcarf
  • Date: 2008-10-15 04:55:53 UTC
  • Revision ID: svn-v4:fd4a0071-7450-0410-a91b-842f6942ebe7:trunk:6
Import from DCARF SVN

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/*
 
3
* LimeSurvey
 
4
* Copyright (C) 2007 The LimeSurvey Project Team / Carsten Schmitz
 
5
* All rights reserved.
 
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.
 
12
 
13
* $Id: access_denied.php 4247 2008-02-16 00:24:07Z lemeur $
 
14
*/
 
15
 
 
16
 
 
17
if (!isset($dbprefix) || isset($_REQUEST['dbprefix'])) {die("Cannot run this script directly (access_denied)");}
 
18
 
 
19
if (isset($_SESSION['loginID']))
 
20
        {
 
21
        
 
22
        $accesssummary = "<br /><strong>".$clang->gT("Access denied!")."</strong><br />\n";
 
23
 
 
24
    $action=returnglobal('action');
 
25
        if  (  $action == "dumpdb"  )
 
26
                {               
 
27
                $accesssummary .= "<p>".$clang->gT("You are not allowed dump the database!")."</p>";
 
28
                $accesssummary .= "<a href='$scriptname'>".$clang->gT("Continue")."</a><br />&nbsp;\n";
 
29
                }       
 
30
    elseif($action == "dumplabel")
 
31
        {        
 
32
        $accesssummary .= "<p>".$clang->gT("You are not allowed export a label set!")."</p>";
 
33
        $accesssummary .= "<a href='$scriptname'>".$clang->gT("Continue")."</a><br />&nbsp;\n";
 
34
        }    
 
35
        elseif($action == "edituser")
 
36
                {
 
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 />&nbsp;\n";
 
39
                } 
 
40
    elseif($action == "newsurvey")
 
41
        {        
 
42
        $accesssummary .= "<p>".$clang->gT("You are not allowed to create new surveys!")."</p>";
 
43
        $accesssummary .= "<a href='$scriptname'>".$clang->gT("Continue")."</a><br />&nbsp;\n";
 
44
        }    
 
45
        elseif($action == "deletesurvey")
 
46
                {               
 
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 />&nbsp;\n";
 
49
                }
 
50
        elseif($action == "addquestion")
 
51
                {               
 
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 />&nbsp;\n";
 
54
                }
 
55
        elseif($action == "activate")
 
56
                {               
 
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 />&nbsp;\n";
 
59
                }
 
60
        elseif($action == "deactivate")
 
61
                {               
 
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 />&nbsp;\n";
 
64
                }
 
65
        elseif($action == "addgroup")
 
66
                {               
 
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 />&nbsp;\n";
 
69
                }
 
70
        elseif($action == "ordergroups")
 
71
                {               
 
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 />&nbsp;\n";
 
74
                }
 
75
        elseif($action == "editsurvey")
 
76
                {               
 
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 />&nbsp;\n";
 
79
                }
 
80
        elseif($action == "editgroup")
 
81
                {               
 
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 />&nbsp;\n";
 
84
                }
 
85
        elseif($action == "browse_response" || $action == "listcolumn" || $action == "vvexport" || $action == "vvimport")
 
86
                {               
 
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 />&nbsp;\n";
 
89
                }
 
90
        elseif($action == "assessment")
 
91
                {               
 
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 />&nbsp;\n";
 
94
                }
 
95
        elseif($action == "delusergroup")
 
96
                {               
 
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 />&nbsp;\n";
 
99
                }
 
100
        elseif($action == "importsurvey")
 
101
                {               
 
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 />&nbsp;\n";
 
104
                }       
 
105
 
 
106
        elseif($action == "importgroup")
 
107
                {               
 
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 />&nbsp;\n";
 
110
                }
 
111
        elseif($action == "importquestion")
 
112
                {               
 
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 />&nbsp;\n";
 
115
                }
 
116
        elseif($action == "CSRFwarn")
 
117
                {               
 
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 />&nbsp;\n";
 
120
                }
 
121
        elseif($action == "FakeGET")
 
122
                {               
 
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 />&nbsp;\n";
 
125
                }
 
126
        else
 
127
                {
 
128
                $accesssummary .= "<br />".$clang->gT("You are not allowed to perform this operation!")."<br />\n";             
 
129
                if(!empty($sid))
 
130
                        $accesssummary .= "<br /><br /><a href='$scriptname?sid=$sid>".$clang->gT("Continue")."</a><br />&nbsp;\n";
 
131
                elseif(!empty($ugid))
 
132
                //elseif(isset($_GET['ugid']))
 
133
                        {
 
134
                        $accesssummary .= "<br /><br /><a href='$scriptname?action=editusergroups&ugid={$ugid}'>".$clang->gT("Continue")."</a><br />&nbsp;\n";
 
135
                                        }
 
136
                else 
 
137
                        $accesssummary .= "<br /><br /><a href='$scriptname'>".$clang->gT("Continue")."</a><br />&nbsp;\n";
 
138
                }
 
139
                
 
140
        }
 
141
?>