/** * Displays pick list of files to process... * * @param int album_id album_id save uploaded media * @return string HTML * */ function MG_FTPpickFiles($album_id, $dir, $purgefiles, $recurse) { global $_CONF, $_MG_CONF, $LANG_MG01, $LANG_MG03, $destDirCount, $pCount; $destDirCount = 0; $pCount = 0; $retval = ''; $T = COM_newTemplate(MG_getTemplatePath($album_id)); $T->set_file('admin', 'ftpimport.thtml'); $T->set_var(array('start_block' => COM_startBlock($LANG_MG03['upload_media']), 'end_block' => COM_endBlock(), 'navbar' => MG_navbar($LANG_MG01['ftp_media'], $album_id), 'lang_title' => $LANG_MG01['title'], 'lang_description' => $LANG_MG01['description'], 'lang_parent_album' => $LANG_MG01['parent_album'], 'lang_filelist' => $LANG_MG01['file_list'], 'lang_quick_create' => $LANG_MG01['quick_create'], 'lang_checkall' => $LANG_MG01['check_all'], 'lang_uncheckall' => $LANG_MG01['uncheck_all'], 'dir' => $dir, 'purgefiles' => $purgefiles, 'recurse' => $recurse, 'album_id' => $album_id)); $filelist = MG_listDir($dir, $album_id, $purgefiles, $recurse, $session_id); $album_jumpbox = '<select name="parentaid">'; if (SEC_hasRights('mediagallery.admin')) { $album_jumpbox .= '<option value="0">' . $LANG_MG01['root_album'] . '</option>'; } else { $album_jumpbox .= '<option disabled value="0">' . $LANG_MG01['root_level'] . '</option>'; } $root_album = new mgAlbum(0); $root_album->buildJumpBox($album_jumpbox, 0, 3); $album_jumpbox .= '</select>'; $T->set_var(array('s_form_action' => $_MG_CONF['site_url'] . '/admin.php', 'action' => 'ftpprocess', 'lang_save' => $LANG_MG01['save'], 'lang_cancel' => $LANG_MG01['cancel'], 'parent_select' => $album_jumpbox, 'filelist' => $filelist)); $retval .= $T->finish($T->parse('output', 'admin')); return $retval; }
/** * Displays pick list of files to process... * * @param int album_id album_id save uploaded media * @return string HTML * */ function MG_FTPpickFiles($album_id, $dir, $purgefiles, $recurse) { global $MG_albums, $_CONF, $_TABLES, $_MG_CONF, $LANG_MG00, $LANG_MG01, $LANG_MG02, $LANG_MG03, $_POST; global $album_jumpbox; global $destDirCount; global $pCount; $destDirCount = 0; $pCount = 0; $retval = ''; $valid_albums = ''; $T = new Template(MG_getTemplatePath($album_id)); $T->set_file(array('admin' => 'ftpimport.thtml')); $T->set_var(array('lang_title' => $LANG_MG01['title'], 'lang_description' => $LANG_MG01['description'], 'lang_parent_album' => $LANG_MG01['parent_album'], 'lang_filelist' => $LANG_MG01['file_list'], 'lang_quick_create' => $LANG_MG01['quick_create'], 'lang_checkall' => $LANG_MG01['check_all'], 'lang_uncheckall' => $LANG_MG01['uncheck_all'], 'dir' => $dir, 'purgefiles' => $purgefiles, 'recurse' => $recurse, 'album_id' => $album_id)); $filelist = MG_listDir($dir, $album_id, $purgefiles, $recurse); $level = 0; $album_jumpbox = '<select name="parentaid">'; if (SEC_hasRights('mediagallery.admin')) { $album_jumpbox .= '<option value="0">' . $LANG_MG01['root_album'] . '</option>'; } else { $album_jumpbox .= '<option disabled value="0">' . $LANG_MG01['root_level'] . '</option>'; } $valid_albums += $MG_albums[0]->buildJumpBox(0, 3); $album_jumpbox .= '</select>'; $T->set_var(array('s_form_action' => $_MG_CONF['site_url'] . '/admin.php', 'action' => 'ftpprocess', 'lang_save' => $LANG_MG01['save'], 'lang_cancel' => $LANG_MG01['cancel'], 'parent_select' => $album_jumpbox, 'filelist' => $filelist)); $T->parse('output', 'admin'); $retval .= $T->finish($T->get_var('output')); return $retval; }