*/ /** * First, initialise the script */ // name of the language file which needs to be included // 'inc.php' is automatically appended to the file name $language_file[] = "document"; //the document file is loaded because most of the upload vocab relates to the document tool $language_file[] = "learnpath"; $language_file[] = "scormdocument"; // global settings initialisation // also provides access to main api (inc/lib/main_api.lib.php) include("../inc/global.inc.php"); require_once(api_get_path(LIBRARY_PATH) . 'fileUpload.lib.php'); require_once(api_get_path(LIBRARY_PATH) . 'events.lib.inc.php'); require_once(api_get_path(LIBRARY_PATH) . 'document.lib.php'); require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'); $form_style= ' '; $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; $htmlHeadXtra[] = $form_style; if(isset($_POST['convert'])){ $cwdir = getcwd(); require('../newscorm/lp_upload.php'); if(isset($o_ppt) && $first_item_id != 0){ header('Location: ../newscorm/lp_controller.php?'.api_get_cidreq().'&lp_id='.$o_ppt->lp_id.'&action=view_item&id='.$first_item_id); } else { $errorMessage = get_lang('Ppt2lpError'); } } event_access_tool(TOOL_UPLOAD); // check access permissions (edit permission is needed to add a document or a LP) $is_allowed_to_edit = api_is_allowed_to_edit(); if(!$is_allowed_to_edit){ api_not_allowed(true); } $interbreadcrumb[]= array ("url"=>"../newscorm/lp_controller.php?action=list", "name"=> get_lang("Doc")); $nameTools = get_lang("OogieConversionPowerPoint"); Display :: display_header($nameTools); ?>

'; $s_style="border-width: 1px; border-style: solid; margin-left: 0; margin-top: 10px; margin-bottom: 0px; min-height: 30px; padding: 5px; position: relative; width: 500px; background-color: #E5EDF9; border-color: #4171B5; color: #000;"; $s_style_error="border-width: 1px; border-style: solid; margin-left: 0; margin-top: 10px; margin-bottom: 10px; min-height: 30px; padding: 5px; position: relative; width: 500px; background-color: #FFD1D1; border-color: #FF0000; color: #000;"; //Display::display_normal_message($message); echo '
'.$alt_text.'
'.$message.'
'; if(!empty($errorMessage)){ //Display::display_error_message($errorMessage); echo '
'.$alt_text.'
'.$errorMessage.'
'; } $form = new FormValidator('upload_ppt', 'POST', '', '', 'style="margin: 0;"'); // build the form $form -> addElement ('html','
'); $renderer = & $form->defaultRenderer(); $user_file_template = str_replace('
', '
', $renderer->_elementTemplate); $renderer->setElementTemplate($user_file_template, 'user_file'); $form -> addElement ('file', 'user_file',''); $form -> addElement ('checkbox', 'take_slide_name','', get_lang('TakeSlideName')); $form -> addElement ('submit', 'convert', get_lang('ConvertToLP'), 'class="convert_button"'); $form -> addElement('html','
'.get_lang('UploadMaxSize').' : '.ini_get('post_max_size').'
'); $form -> addElement ('hidden', 'ppt2lp', 'true'); $form -> add_real_progress_bar(md5(rand(0,10000)), 'user_file', 1, true); // display the form $form -> display(); /* ============================================================================== FOOTER ============================================================================== */ Display::display_footer(); ?>