move code up one directory
[atutor.git] / mods / _core / file_manager / preview.php
1 <?php\r
2 /************************************************************************/\r
3 /* ATutor                                                                                                                               */\r
4 /************************************************************************/\r
5 /* Copyright (c) 2002-2010                                              */\r
6 /* Inclusive Design Institute                                           */\r
7 /* http://atutor.ca                                                                                                             */\r
8 /*                                                                                                                                              */\r
9 /* This program is free software. You can redistribute it and/or        */\r
10 /* modify it under the terms of the GNU General Public License          */\r
11 /* as published by the Free Software Foundation.                        */\r
12 /************************************************************************/\r
13 // $Id$\r
14 \r
15 define('AT_INCLUDE_PATH', '../../../include/');\r
16 require(AT_INCLUDE_PATH.'vitals.inc.php');\r
17 \r
18 if (defined('AT_FORCE_GET_FILE') && AT_FORCE_GET_FILE) {\r
19         $get_file = $_base_path . 'get.php/';\r
20         $file = 'b64:'.base64_encode($_GET['file']);\r
21 } else {\r
22         $get_file = $_base_path . 'content/' . $_SESSION['course_id'] . '/';\r
23         $file = $_GET['file'];  \r
24 }\r
25 ?>\r
26 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd" />\r
27 <html lang="<?php echo $myLang->getCode(); ?>">\r
28 <head>\r
29         <title><?php echo _AT('file_manager_frame'); ?></title>\r
30         <meta http-equiv="Content-Type" content="text/html; <?php echo $myLang->getCharacterSet(); ?>" />\r
31 </head>\r
32 \r
33 <frameset rows="50,*">\r
34 \r
35 <frame src="preview_top.php?file=<?php echo $file.SEP.'pathext='. $_GET['pathext'] . SEP . 'popup=' . $_GET['popup']; ?>" scrolling="no" marginwidth="0" marginheight="0" />\r
36 <frame src="<?php echo $get_file; ?><?php echo $file; ?>" />\r
37 \r
38 <noframes>\r
39   <p><?php echo _AT('frame_contains'); ?><br />\r
40   * <a href="../mods/_core/file_manager/file_manager.php"><?php echo _AT('file_manager'); ?></a>\r
41   </p>\r
42 </noframes>\r
43 \r
44 </frameset>\r
45 </html>\r