Documentation is available at RSDEngineTemplateFilePermissionDenied.php
1 <?php
2 // RSDEngine: The Rapid and Secure Development Engine
3 // Copyright (C) 2003 Lukas Feiler
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
19 /**Contains just the class RSDEngineTemplateFilePermissionDenied.
20 *
21 * @package RSDEngine
22 * @author Lukas Feiler <lukas.feiler@chello.at>
23 * @copyright Lukas Feiler 2003
24 * @filesource
25 */
26
27 /**RSDEngineTemplateFilePermissionDenied extends RSDEngineFile.
28 */
29 require_once('RSDEngine/RSDEngineFile.php');
30
31 /**Generates the smarty template file for informig the user about a denied permission.
32 *
33 * @author Lukas Feiler <lukas.feiler@chello.at>
34 * @version 0.1.9
35 * @copyright Lukas Feiler 2003
36 * @package RSDEngine
37 */
38 class RSDEngineTemplateFilePermissionDenied extends RSDEngineTemplateFile {
39
40 /**Whether to overwrite an existing file.
41 * @var boolean
42 */
43 var $overwriteExisting = false;
44
45 function getFilename()
46 {
47 return "permissionDenied.tpl";
48 }
49
50 /**Returns the code for the template file for informig the user about a denied permission.
51 *
52 * @access private
53 * @return String The code for the file.
54 */
55 function getCode()
56 {
57 extract($this->config);
58 $OPEN = $smartyLeftDelimiter;
59 $CLOSE = $smartyRightDelimiter;
60 $header = true;
61 $footer = true;
62
63 $write = $this->config['writePermissionDeniedTemplate'];
64 $this->setWrite($write);
65
66 $data = '' .
67 '<html>' . "\n" .
68 ' <head>' . "\n" .
69 ' <title>Permission Denied</title>' . "\n" .
70 ' </head>' . "\n" .
71 ' <body>' . "\n";
72 if ($header) {
73 $data .="{{include file=\"header.tpl\"}}\n";
74 }
75 $data .=' Permission Denied.' . "\n" .
76 " We are sorry for the inconvenience. Feel free to contact us by writing an email to <a href=\"mailto:${OPEN}\$email${CLOSE}\">${OPEN}\$email${CLOSE}</a>.\n" .
77 " <br>\n" .
78 " <br>\n" .
79 " Error code: ${OPEN}\$errorCode${CLOSE}\n" .
80 " <br>\n" .
81 " Error message: ${OPEN}\$errorMessage${CLOSE}\n" .
82 " <br>\n" .
83 " Error toString: ${OPEN}\$errorToString${CLOSE}\n" .
84 " <br>\n" .
85 " <br>\n" .
86 " [Do not display this error information in production systems.]\n";
87 if ($footer) {
88 $data .="{{include file=\"footer.tpl\"}}\n";
89 }
90 $data .=' </body>' . "\n" .
91 '</html>' . "\n";
92 return $data;
93 }
94 }
95 ?>
Documentation generated on Mon, 8 Dec 2003 13:12:55 +0100 by phpDocumentor 1.2.3