AC_4897, AC_4898, AC_4899: Multifile uploader fixes.
[acontent.git] / file_manager / preview.php
1 <?php\r
2 /************************************************************************/\r
3 /* AContent                                                             */\r
4 /************************************************************************/\r
5 /* Copyright (c) 2010                                                   */\r
6 /* Inclusive Design Institute                                           */\r
7 /*                                                                      */\r
8 /* This program is free software. You can redistribute it and/or        */\r
9 /* modify it under the terms of the GNU General Public License          */\r
10 /* as published by the Free Software Foundation.                        */\r
11 /************************************************************************/\r
12 \r
13 define('TR_INCLUDE_PATH', '../include/');\r
14 require(TR_INCLUDE_PATH.'vitals.inc.php');\r
15 global $_course_id;\r
16 \r
17 if (defined('TR_FORCE_GET_FILE') && TR_FORCE_GET_FILE) {\r
18         $get_file = $_base_path . 'get.php/';\r
19         $file = 'b64:'.base64_encode($_GET['file']);\r
20 } else {\r
21         $get_file = $_base_path . 'content/' . $_course_id . '/';\r
22         $file = $_GET['file'];\r
23 }\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'].SEP.'_course_id='.$_course_id; ?>" 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="../file_manager/index.php"><?php echo _AT('file_manager'); ?></a>\r
41   </p>\r
42 </noframes>\r
43 \r
44 </frameset>\r
45 </html>