123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <?php
- function get_zip_files_in_garbage(){
- $list = array();
- $dh = opendir(api_get_path(SYS_ARCHIVE_PATH));
- if($dh === false){
-
- }else{
- while($entry = readdir($dh)){
- if(substr($entry,0,1) == '.'){}
- else
- {
- if(preg_match('/^.*\.zip$/i',$entry)){
- $list[] = $entry;
- }
- }
- }
- natcasesort($list);
- closedir($dh);
- }
- return $list;
- }
- $nameTools = get_lang("FileUpload");
- $interbreadcrumb[]= array ("url"=>"../newscorm/lp_controller.php?action=list", "name"=> get_lang("Learnpath"));
- Display::display_header($nameTools,"Path");
- require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
- include('../newscorm/content_makers.inc.php');
- require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php');
- $form = new FormValidator('','POST','upload.php','','id="upload_form" enctype="multipart/form-data" style="background-image: url(\'../img/scorm.jpg\'); background-repeat: no-repeat; background-position: 600px;"');
- $form->addElement('header', '', $nameTools);
- $form->addElement('hidden', 'curdirpath', $path);
- $form->addElement('hidden', 'tool', $my_tool);
- $form->addElement('file','user_file',get_lang('FileToUpload'));
- $select_content_marker = &$form->addElement('select','content_maker',get_lang('ContentMaker'));
- foreach($content_origins as $index => $origin){
- $select_content_marker->addOption($origin,$origin);
- }
- $select_content_proximity = &$form->addElement('select','content_proximity',get_lang('ContentProximity'));
- $select_content_proximity->addOption(get_lang('Local'),"local");
- $select_content_proximity->addOption(get_lang('Remote'),"remote");
- $select_content_proximity -> setSelected("local");
- if(api_get_setting('search_enabled')=='true')
- {
- $form -> addElement ('checkbox', 'index_document','', get_lang('SearchFeatureDoIndexDocument'));
-
- $specific_fields = get_specific_field_list();
- foreach ($specific_fields as $specific_field) {
- $form -> addElement ('text', $specific_field['code'], $specific_field['name'].' : ');
- }
- }
- $form->addElement('style_submit_button','submit', get_lang('Send'),'class="save"');
- $form->addElement('html', '<br /><br /><br />');
- $form->add_real_progress_bar('uploadScorm','user_file');
- $form->addRule('user_file', '<div class="required">'.get_lang('ThisFieldIsRequired'), 'required');
- $defaults = array('index_document'=>'checked="checked"');
- $form->setDefaults($defaults);
- $form->display();
- Display::display_footer();
- ?>
|