define('TR_INCLUDE_PATH', '../include/');
require(TR_INCLUDE_PATH.'vitals.inc.php');
require_once(TR_INCLUDE_PATH.'classes/FileUtility.class.php');
+$_custom_css = $_base_href.'include/jscripts/infusion/components/uploader/css/Uploader.css';
if ((isset($_REQUEST['popup']) && $_REQUEST['popup']) &&
(!isset($_REQUEST['framed']) || !$_REQUEST['framed'])) {
if (!isset($_COOKIE["fluid_on"]))
trans.utility.setcookie("fluid_on", "yes", time()+1200);
- $fluid_dir = 'jscripts/infusion/';
+ $fluid_dir = 'include/jscripts/infusion/';
$framed = intval($_GET['framed']);
$popup = intval($_GET['popup']);
$current_path = TR_CONTENT_DIR.$_course_id.'/';
}
}
-
- $_custom_head .= '
- <link href="'.$fluid_dir.'components/uploader/css/Uploader.css" rel="stylesheet" type="text/css" />
- <script src="'.$fluid_dir.'InfusionAll.js" type="text/javascript"></script>
- <script language="JavaScript" type="text/javascript">
-
- var myUpload; // mostly used for testing
-
- jQuery(document).ready(function () {
- myUpload = fluid.progressiveEnhanceableUploader(".flc-uploader", ".fl-ProgEnhance-basic", {
- uploadManager: {
- type: "fluid.swfUploadManager",
-
- options: {
- // Set the uploadURL to the URL for posting files to your server.
- uploadURL: "'.$_base_href.'include/lib/upload.php?path='.urlencode($current_path.$pathext).'",
-
- // This option points to the location of the SWFUpload Flash object that ships with Fluid Infusion.
- flashURL: "jscripts/infusion/lib/swfupload/flash/swfupload.swf"
- }
- },
-
- listeners: {
- onFileSuccess: function (file, serverData){
- // example assumes that the server code passes the new image URL in the serverData
- window.location="'.$_SERVER['PHP_SELF'].'?pathext=' . urlencode($pathext) . SEP . 'popup=' . $popup . SEP . 'framed=' . $framed . SEP . 'msg=FILEUPLOAD_DONE'.SEP.'_course_id='.$_course_id.'";
- }
- },
-
- decorators: [{
- type: "fluid.swfUploadSetupDecorator",
- options: {
- // This option points to the location of the Browse Files button used with Flash 10 clients.
- flashButtonImageURL: "'.TR_BASE_HREF.'jscripts/infusion/components/uploader/images/browse.png"
- }
- }]
- });
- });
- </script>
- ';
}
global $msg;