filelist-1.3.diff

Administrator Admin, 2008-02-27 19:16

Download (41.8 KB)

View differences:

typo3/file_list.php (working copy)
58 58
require_once (PATH_t3lib.'class.t3lib_extfilefunc.php');
59 59
require_once (PATH_t3lib.'class.t3lib_recordlist.php');
60 60
require_once (PATH_t3lib.'class.t3lib_clipboard.php');
61
require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
61 62
require_once ('class.file_list.inc');
62 63
$BE_USER->modAccess($MCONF,1);
63 64

  
......
166 167
			// Initialize the template object
167 168
		$this->doc = t3lib_div::makeInstance('template');
168 169
		$this->doc->backPath = $BACK_PATH;
170
		$this->doc->setModuleTemplate('templates/file_list.html');
169 171
		$this->doc->docType = 'xhtml_trans';
170 172

  
171 173
			// Validating the input "id" (the path, directory!) and checking it against the mounts of the user.
......
176 178
		if ($access)	{
177 179

  
178 180
				// Create filelisting object
179
			$filelist = t3lib_div::makeInstance('fileList');
180
			$filelist->backPath = $BACK_PATH;
181
			$filelist->thumbs = $this->MOD_SETTINGS['displayThumbs']?1:$BE_USER->uc['thumbnailsByDefault'];
181
			$this->filelist = t3lib_div::makeInstance('fileList');
182
			$this->filelist->backPath = $BACK_PATH;
183
			$this->filelist->thumbs = $this->MOD_SETTINGS['displayThumbs']?1:$BE_USER->uc['thumbnailsByDefault'];
182 184

  
183 185
				// Create clipboard object and initialize that
184
			$filelist->clipObj = t3lib_div::makeInstance('t3lib_clipboard');
185
			$filelist->clipObj->fileMode=1;
186
			$filelist->clipObj->initializeClipboard();
186
			$this->filelist->clipObj = t3lib_div::makeInstance('t3lib_clipboard');
187
			$this->filelist->clipObj->fileMode=1;
188
			$this->filelist->clipObj->initializeClipboard();
187 189

  
188 190
			$CB = t3lib_div::_GET('CB');
189
			if ($this->cmd=='setCB') $CB['el'] = $filelist->clipObj->cleanUpCBC(array_merge(t3lib_div::_POST('CBH'),t3lib_div::_POST('CBC')),'_FILE');
191
			if ($this->cmd=='setCB') $CB['el'] = $this->filelist->clipObj->cleanUpCBC(array_merge(t3lib_div::_POST('CBH'),t3lib_div::_POST('CBC')),'_FILE');
190 192
			if (!$this->MOD_SETTINGS['clipBoard'])	$CB['setP']='normal';
191
			$filelist->clipObj->setCmd($CB);
192
			$filelist->clipObj->cleanCurrent();
193
			$filelist->clipObj->endClipboard();	// Saves
193
			$this->filelist->clipObj->setCmd($CB);
194
			$this->filelist->clipObj->cleanCurrent();
195
			$this->filelist->clipObj->endClipboard();	// Saves
194 196

  
195 197
				// If the "cmd" was to delete files from the list (clipboard thing), do that:
196 198
			if ($this->cmd=='delete')	{
197
				$items = $filelist->clipObj->cleanUpCBC(t3lib_div::_POST('CBC'),'_FILE',1);
199
				$items = $this->filelist->clipObj->cleanUpCBC(t3lib_div::_POST('CBC'),'_FILE',1);
198 200
				if (count($items))	{
199 201
						// Make command array:
200 202
					$FILE=array();
......
223 225

  
224 226
				// Start up filelisting object, include settings.
225 227
			$this->pointer = t3lib_div::intInRange($this->pointer,0,100000);
226
			$filelist->start($this->id,$this->pointer,$this->MOD_SETTINGS['sort'],$this->MOD_SETTINGS['reverse'],$this->MOD_SETTINGS['clipBoard']);
228
			$this->filelist->start($this->id,$this->pointer,$this->MOD_SETTINGS['sort'],$this->MOD_SETTINGS['reverse'],$this->MOD_SETTINGS['clipBoard']);
227 229

  
228
				// Write the header
229
			$filelist->writeTop($this->id);
230

  
231 230
				// Generate the list
232
			$filelist->generateList();
231
			$this->filelist->generateList();
233 232

  
234 233
				// Write the footer
235
			$filelist->writeBottom();
234
			$this->filelist->writeBottom();
236 235

  
237 236
				// Set top JavaScript:
238 237
			$this->doc->JScode=$this->doc->wrapScriptTags('
......
242 241
				window.location.href = URL;
243 242
			}
244 243

  
245
			'.$filelist->CBfunctions()	// ... and add clipboard JavaScript functions
244
			'.$this->filelist->CBfunctions()	// ... and add clipboard JavaScript functions
246 245
			);
247 246

  
248 247
				// This will return content necessary for the context sensitive clickmenus to work: bodytag events, JavaScript functions and DIV-layers.
249 248
			$this->doc->getContextMenuCode();
250 249

  
250
				// Setting up the buttons and markers for docheader
251
			list($buttons, $otherMarkers) = $this->filelist->getButtonsAndOtherMarkers($this->id);
252
			
253
				// add the folder info to the marker array
254
			$otherMarkers['FOLDER_INFO'] = $this->filelist->getFolderInfo();
255
			
256
			$docHeaderButtons = array_merge($this->getButtons(), $buttons);
257
			
258
				// Build the <body> for the module
259
			$this->content = $this->doc->startPage('Template Tools');
251 260

  
252 261
				// Create output
253
			$this->content='';
254
			$this->content.=$this->doc->startPage($LANG->getLL('files'));
255
			$this->content.= '<form action="'.htmlspecialchars($filelist->listURL()).'" method="post" name="dblistForm">';
256
			$this->content.= $filelist->HTMLcode;
257
			$this->content.= '<input type="hidden" name="cmd" /></form>';
258

  
259
				// FileList Module CSH:
260
			$this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_module', $GLOBALS['BACK_PATH'],'<br/>|');
261

  
262
			$this->content.='
263
				<!--
264
					"Upload" and "New" buttons
265
				-->
266
				<div id="typo3-filelist-buttons">
267
					<table border="0" cellpadding="4" cellspacing="0">
268
						<tr>
269
							<td>
270
								<form name="upload" action="'.$BACK_PATH.'file_upload.php">
271
									<input type="hidden" name="target" value="'.htmlspecialchars($this->id).'" />
272
									<input type="hidden" name="returnUrl" value="'.htmlspecialchars($filelist->listURL()).'" />
273
									<input type="submit" value="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.upload',1)).'" />
274
								</form>
275
							</td>
276
							<td>
277
								<form name="new" action="'.$BACK_PATH.'file_newfolder.php">
278
									<input type="hidden" name="target" value="'.htmlspecialchars($this->id).'" />
279
									<input type="hidden" name="returnUrl" value="'.htmlspecialchars($filelist->listURL()).'" />
280
									<input type="submit" value="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.new',1)).'" />
281
								</form>
282
							</td>
283
						</tr>
284
					</table>
285
				</div>
286
			';
287

  
288
			if ($filelist->HTMLcode)	{	// Making listing options:
289

  
290
				$this->content.='
291

  
262
			$pageContent='';
263
			$pageContent.=$this->doc->startPage($LANG->getLL('files'));
264
			$pageContent.= '<form action="'.htmlspecialchars($this->filelist->listURL()).'" method="post" name="dblistForm">';
265
			$pageContent.= $this->filelist->HTMLcode;
266
			$pageContent.= '<input type="hidden" name="cmd" /></form>';
267
		
268
		
269
			if ($this->filelist->HTMLcode)	{	// Making listing options:
270
		
271
				$pageContent.='
272
		
292 273
					<!--
293 274
						Listing options for clipboard and thumbnails
294 275
					-->
295 276
					<div id="typo3-listOptions">
296 277
				';
297

  
278
		
298 279
					// Add "display thumbnails" checkbox:
299
				$this->content.=t3lib_BEfunc::getFuncCheck($this->id,'SET[displayThumbs]',$this->MOD_SETTINGS['displayThumbs'],'file_list.php','','id="checkDisplayThumbs"').' <label for="checkDisplayThumbs">'.$LANG->getLL('displayThumbs',1).'</label><br />';
300

  
280
				$pageContent.=t3lib_BEfunc::getFuncCheck($this->id,'SET[displayThumbs]',$this->MOD_SETTINGS['displayThumbs'],'file_list.php','','id="checkDisplayThumbs"').' <label for="checkDisplayThumbs">'.$LANG->getLL('displayThumbs',1).'</label><br />';
281
		
301 282
					// Add clipboard button
302
				$this->content.=t3lib_BEfunc::getFuncCheck($this->id,'SET[clipBoard]',$this->MOD_SETTINGS['clipBoard'],'file_list.php','','id="checkClipBoard"').' <label for="checkClipBoard">'.$LANG->getLL('clipBoard',1).'</label>';
303

  
304
				$this->content.='
283
				$pageContent.=t3lib_BEfunc::getFuncCheck($this->id,'SET[clipBoard]',$this->MOD_SETTINGS['clipBoard'],'file_list.php','','id="checkClipBoard"').' <label for="checkClipBoard">'.$LANG->getLL('clipBoard',1).'</label>';
284
		
285
				$pageContent.='
305 286
					</div>
306 287
				';
307
				$this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_options', $GLOBALS['BACK_PATH']);
308

  
309

  
288
		
289
		
310 290
					// Set clipboard:
311 291
				if ($this->MOD_SETTINGS['clipBoard'])	{
312
					$this->content.=$filelist->clipObj->printClipboard();
313
					$this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_clipboard', $GLOBALS['BACK_PATH']);
292
					$pageContent.=$this->filelist->clipObj->printClipboard();
293
					$pageContent.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_clipboard', $GLOBALS['BACK_PATH']);
314 294
				}
315 295
			}
296
			
297
			$markerArray = array(
298
				'CSH' => $docHeaderButtons['csh'],
299
				'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
300
				'CONTENT' => $pageContent
301
			);
316 302

  
317
				// Add shortcut
318
			if ($BE_USER->mayMakeShortcut())	{
319
				$this->content.='<br /><br />'.$this->doc->makeShortcutIcon('pointer,id,target,table',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']);
320
			}
303
			$this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, array_merge($markerArray, $otherMarkers));
304
			$this->content.= $this->doc->endPage();
305
			$this->content = $this->doc->insertStylesAndJS($this->content);
306
			
321 307
		} else {
322 308
				// Create output - no access (no warning though)
323
			$this->content='';
324
			$this->content.=$this->doc->startPage($LANG->getLL('files'));
309
			$this->content = '';
310
			$this->content .= $this->doc->startPage($LANG->getLL('files'));
311
			$this->content .= $this->doc->endPage();
312
			$this->content = $this->doc->insertStylesAndJS($this->content);
325 313
		}
326 314

  
315

  
327 316
	}
328 317

  
329 318
	/**
......
332 321
	 * @return	void
333 322
	 */
334 323
	function printContent()	{
335
		$this->content.= $this->doc->endPage();
336
		$this->content = $this->doc->insertStylesAndJS($this->content);
337 324
		echo $this->content;
338 325
	}
326
	
327
	/**
328
	 * Create the panel of buttons for submitting the form or otherwise perform operations.
329
	 *
330
	 * @return	array	all available buttons as an assoc. array
331
	 */
332
	function getButtons()	{
333
		global $TCA, $LANG, $BACK_PATH, $BE_USER;
334
	
335
		$buttons = array(
336
			'csh' => '',
337
			'shortcut' => '',
338
			'upload' => '',
339
			'new' => '',
340
		);
341

  
342
			// Add shortcut
343
		if ($BE_USER->mayMakeShortcut())	{
344
			$buttons['shortcut'] = $this->doc->makeShortcutIcon('pointer,id,target,table',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']);
345
		}
346
	
347
			// FileList Module CSH:
348
		$buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_module', $GLOBALS['BACK_PATH']);
349
	
350
			// upload button
351
		$theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/upload.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.upload',1)).'" alt="" />';
352
		$buttons['upload'] = '<a href="'.$BACK_PATH.'file_upload.php?target='.htmlspecialchars($this->id).'&returnUrl='.htmlspecialchars($this->filelist->listURL()).'">'.$theIcon.'</a>';
353
	
354
		$theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_file.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.new',1)).'" alt="" />';
355
		$buttons['new'] = '<a href="'.$BACK_PATH.'file_newfolder.php?target='.htmlspecialchars($this->id).'&returnUrl='.htmlspecialchars($this->filelist->listURL()).'">'.$theIcon.'</a>';
356
		
357
		return $buttons;
358
	}
359
	
339 360
}
340 361

  
341 362
// Include extension?
typo3/class.file_list.inc (working copy)
140 140
	}
141 141

  
142 142
	/**
143
	 * Make the top of the list
143
	 * Return the buttons used by the file list to include in the top header
144 144
	 *
145
	 * @param	string		The path to list.
146
	 * @return	void
145
	 * @return	array
147 146
	 */
148
	function writeTop($path)	{
147
	function getButtonsAndOtherMarkers($path) {
148
		
149 149
			// Makes the code for the foldericon in the top
150 150
		$path = $GLOBALS['SOBE']->basicFF->is_directory($path);	// Cleaning name...
151 151

  
152 152
		if ($path)	{
153
			$out='';
153
			$otherMarkers = array(
154
				'PAGE_ICON' => '',
155
				'TITLE' => '',
156
			);
157
			
158
			$buttons = array(
159
				'level_up' => '',
160
				'refresh' => '',
161
				'title' => '',
162
				'page_icon' => '',
163
			);
164
			
154 165
			$theFile = $GLOBALS['SOBE']->basicFF->getTotalFileInfo($path);
155
			$root = $GLOBALS['SOBE']->basicFF->checkPathAgainstMounts($theFile['path']);
156
			$titleCol='path';
157
			$this->fieldArray = Array($titleCol,'up');
158 166

  
159 167
			list($title,$icon,$path) =  $this->dirData($theFile);
160 168

  
161 169
				// Start compiling the HTML
162
			$theData = Array();
163
			$theData[$titleCol] = $this->widthGif;
164

  
165 170
			$title = $GLOBALS['SOBE']->basicFF->blindPath($path);
166
			$theData['up']='<a href="'.htmlspecialchars($this->listURL()).'">'.
167
					'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/refresh_n.gif','width="14" height="14"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.reload',1).'" alt="" />'.
168
					'</a>';
169 171

  
170
			if ($root)	{
172
				// if this is some subpage under the mount root....
173
			if ($GLOBALS['SOBE']->basicFF->checkPathAgainstMounts($theFile['path'])) {
171 174
					// The icon with link
172
				$theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$icon,'width="18" height="16"').' title="'.htmlspecialchars($theFile['file']).'" alt="" />';
173
				if ($this->clickMenus) $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon,$path);
175
				$otherMarkers['PAGE_ICON'] = '<img'.t3lib_iconWorks::skinImg($this->backPath,$icon,'width="18" height="16"').' title="'.htmlspecialchars($theFile['file']).'" alt="" />';
176
				if ($this->clickMenus) $otherMarkers['PAGE_ICON'] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($otherMarkers['PAGE_ICON'],$path);
174 177

  
175
				$theData[$titleCol].='<br />'.t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20));	// No HTML specialchars here - HTML like <b> </b> is allowed
176
				$theData['up'].=$this->linkWrapDir('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/folder_up.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" />',$theFile['path']);
178
				$buttons['level_up'] .= $this->linkWrapDir('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/folder_up.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" />',$theFile['path']);
179
				$otherMarkers['TITLE'] .= t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20));	// No HTML specialchars here - HTML like <b> </b> is allowed
180

  
181
				// this is the root page
177 182
			} else {
178
					// root:0
179
				$theIcon='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_ftp.gif','width="18" height="16"').' alt="" />';
180
				$theData[$titleCol].='<br />'.htmlspecialchars(t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20)));
183
				$otherMarkers['PAGE_ICON'] = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_ftp.gif','width="18" height="16"').' alt="" />';
184
				if ($this->clickMenus) $otherMarkers['PAGE_ICON'] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($otherMarkers['PAGE_ICON'],$path);
185
				$otherMarkers['TITLE'] .= htmlspecialchars(t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20)));
181 186
			}
182

  
183
				// Adding top element
184
			$out.=$this->addelement(1,'',$theData,'','',$theIcon);
185

  
186
			$this->HTMLcode.='
187

  
188
		<!--
189
			Page header for file list
190
		-->
191
				<table border="0" cellpadding="0" cellspacing="0" id="typo3-filelist-top">
192
					'.$out.'
193
				</table>';
194 187
		}
188
		
189
		$buttons['refresh'] = '<a href="'.htmlspecialchars($this->listURL()).'">'.
190
				'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/refresh_n.gif','width="14" height="14"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.reload',1).'" alt="" />'.
191
				'</a>';
192
				
193
		return array($buttons, $otherMarkers);
195 194
	}
196 195

  
197 196
	/**
......
276 275
		$out.=$iOut;
277 276

  
278 277
			// half line is drawn
279
		$theData = Array();
280
		$theData[$titleCol] = $this->counter.' File(s), '.t3lib_div::formatSize($this->totalbytes).'bytes';
281
		$out.=$this->addelement(1,'',$theData);
282 278

  
283 279
			// finish
284 280
		return '
......
293 289
	}
294 290

  
295 291
	/**
292
	 * Gets the number of files and total size of a folder
293
	 *
294
	 * @return string
295
	 **/
296
	function getFolderInfo() {
297
		if($this->counter == 1) {
298
			$fileLabel = 'File';	
299
		} else {
300
			$fileLabel = 'Files';	
301
		}
302
		return $this->counter.' '.$fileLabel.', '.t3lib_div::formatSize($this->totalbytes).'bytes';
303
	}
304

  
305
	/**
296 306
	 * This returns tablerows for the directories in the array $items['sorting'].
297 307
	 *
298 308
	 * @param	array		Directory items
typo3/file_rename.php (working copy)
53 53
require('init.php');
54 54
require('template.php');
55 55
require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php');
56
require_once(PATH_t3lib.'class.t3lib_parsehtml.php');
56 57

  
57 58

  
58 59

  
......
63 64

  
64 65

  
65 66

  
66

  
67 67
/**
68 68
 * Script Class for the rename-file form.
69 69
 *
......
134 134
			default:		$this->icon = 'gfx/i/_icon_ftp.gif';	break;
135 135
		}
136 136

  
137
		$this->icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$this->icon,'width="18" height="16"').' title="" alt="" />';
138

  
137 139
			// Relative path to filemount, $key:
138 140
		$this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
139 141

  
140 142
			// Setting title:
141
		$this->title = $GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
143
		$this->title = $this->icon.$GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
142 144

  
143 145
			// Setting template object
144
		$this->doc = t3lib_div::makeInstance('smallDoc');
146
		$this->doc = t3lib_div::makeInstance('template');
145 147
		$this->doc->docType = 'xhtml_trans';
148
		$this->doc->setModuleTemplate('templates/file_rename.html');
146 149
		$this->doc->backPath = $BACK_PATH;
147
		$this->doc->form='<form action="tce_file.php" method="post" name="editform">';
148 150
		$this->doc->JScode=$this->doc->wrapScriptTags('
149 151
			function backToList()	{	//
150 152
				top.goToModule("file_list");
......
161 163
		global $LANG;
162 164

  
163 165
			// Make page header:
164
		$this->content='';
165
		$this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle'));
166
		$this->content.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle'));
167
		$this->content.=$this->doc->spacer(5);
168
		$this->content.=$this->doc->section('',$this->doc->getFileheader($this->title,$this->shortPath,$this->icon));
169
		$this->content.=$this->doc->divider(5);
166
		$this->content = $this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle'));
170 167

  
168
		$pageContent = $this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle'));
169
		$pageContent .= $this->doc->spacer(5);
170
		$pageContent .= $this->doc->divider(5);
171 171

  
172

  
173
		$code = '<form action="tce_file.php" method="post" name="editform">';
172 174
			// Making the formfields for renaming:
173
		$code='
175
		$code .= '
174 176

  
175 177
			<div id="c-rename">
176 178
				<input type="text" name="file[rename][0][data]" value="'.htmlspecialchars(basename($this->shortPath)).'"'.$GLOBALS['TBE_TEMPLATE']->formWidth(20).' />
......
187 189
			</div>
188 190
		';
189 191

  
190
			// CSH:
191
		$code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_rename', $GLOBALS['BACK_PATH'],'<br/>');
192 192

  
193 193
			// Add the HTML as a section:
194
		$this->content.= $this->doc->section('',$code);
194
		$pageContent .= $code;
195 195

  
196
		$docHeaderButtons = array();
197
		$docHeaderButtons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_rename', $GLOBALS['BACK_PATH']);
198

  
199
			// Add the HTML as a section:
200
		$markerArray = array(
201
			'CSH' => $docHeaderButtons['csh'],
202
			'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
203
			'CONTENT' => $pageContent,
204
			'PATH' => $this->title,
205
		);
206
		
207
		$this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
208
		$this->content.= $this->doc->endPage();
209
		$this->content = $this->doc->insertStylesAndJS($this->content);
196 210
	}
197 211

  
198 212
	/**
......
201 215
	 * @return	void
202 216
	 */
203 217
	function printContent()	{
204
		$this->content.= $this->doc->endPage();
205
		$this->content = $this->doc->insertStylesAndJS($this->content);
206 218
		echo $this->content;
207 219
	}
208 220
}
typo3/file_newfolder.php (working copy)
53 53
require('init.php');
54 54
require('template.php');
55 55
require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php');
56
require_once(PATH_t3lib.'class.t3lib_parsehtml.php');
56 57

  
57 58

  
58 59

  
......
63 64

  
64 65

  
65 66

  
66

  
67 67
/**
68 68
 * Script Class for the create-new script; Displays a form for creating up to 10 folders or one new text file
69 69
 *
......
136 136
			default:		$this->icon = 'gfx/i/_icon_ftp.gif';	break;
137 137
		}
138 138

  
139
		$this->icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$this->icon,'width="18" height="16"').' title="" alt="" />';
140
		
139 141
			// Relative path to filemount, $key:
140 142
		$this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
141 143

  
142 144
			// Setting title:
143
		$this->title = $GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
144

  
145
		$this->title = $this->icon.$GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
146
		
145 147
			// Setting template object
146
		$this->doc = t3lib_div::makeInstance('smallDoc');
148
		$this->doc = t3lib_div::makeInstance('template');
147 149
		$this->doc->docType = 'xhtml_trans';
150
		$this->doc->setModuleTemplate('templates/file_newfolder.html');
148 151
		$this->doc->backPath = $BACK_PATH;
149
		$this->doc->form='<form action="tce_file.php" method="post" name="editform">';
150 152
		$this->doc->JScode=$this->doc->wrapScriptTags('
151 153
			var path = "'.$this->target.'";
152 154

  
......
171 173
	 */
172 174
	function main()	{
173 175
		global $LANG;
174

  
176
		
177
			// start content compilation
178
		$this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle'));
179
		
180
		
175 181
			// Make page header:
176
		$this->content='';
177
		$this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle'));
178
		$this->content.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle'));
179
		$this->content.=$this->doc->spacer(5);
180
		$this->content.=$this->doc->section('',$this->doc->getFileheader($this->title,$this->shortPath,$this->icon));
181
		$this->content.=$this->doc->divider(5);
182
		$pageContent='';
183
		$pageContent.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle'));
184
		$pageContent.=$this->doc->spacer(5);
185
		$pageContent.=$this->doc->divider(5);
182 186

  
183 187

  
188
		$code = '<form action="tce_file.php" method="post" name="editform">';
184 189
			// Making the selector box for the number of concurrent folder-creations
185 190
		$this->number = t3lib_div::intInRange($this->number,1,10);
186
		$code='
191
		$code .= '
187 192
			<div id="c-select">
188 193
				<select name="number" onchange="reload(this.options[this.selectedIndex].value);">';
189 194
		for ($a=1;$a<=$this->folderNumber;$a++)	{
......
221 226
			// CSH:
222 227
		$code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_newfolder', $GLOBALS['BACK_PATH'],'<br/>');
223 228

  
224
		$this->content.= $this->doc->section('',$code);
229
		$pageContent.= $code;
225 230

  
226 231

  
227 232

  
228 233
			// Add spacer:
229
		$this->content.= $this->doc->spacer(10);
234
		$pageContent.= $this->doc->spacer(10);
230 235

  
231 236
			// Switching form tags:
232
		$this->content.= $this->doc->sectionEnd();
233
		$this->content.= '</form><form action="tce_file.php" method="post" name="editform2">';
237
		$pageContent.= $this->doc->sectionEnd();
238
		$pageContent.= '</form><form action="tce_file.php" method="post" name="editform2">';
234 239

  
235 240
			// Add form fields for creation of a new, blank text file:
236 241
		$code='
......
252 257

  
253 258
			// CSH:
254 259
		$code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_newfile', $GLOBALS['BACK_PATH'],'<br/>');
260
		$pageContent.= $this->doc->section($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.newfile'),$code);
255 261

  
262
		$docHeaderButtons = array();
263

  
256 264
			// Add the HTML as a section:
257
		$this->content.= $this->doc->section($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.newfile'),$code);
265
		$markerArray = array(
266
			'CSH' => $docHeaderButtons['csh'],
267
			'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
268
			'CONTENT' => $pageContent,
269
			'PATH' => $this->title,
270
		);	
258 271

  
272
		$this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);	
273
		$this->content.= $this->doc->endPage();
274

  
275
		$this->content = $this->doc->insertStylesAndJS($this->content);
259 276
	}
260 277

  
261 278
	/**
......
264 281
	 * @return	void
265 282
	 */
266 283
	function printContent()	{
267
		$this->content.= $this->doc->endPage();
268
		$this->content = $this->doc->insertStylesAndJS($this->content);
269 284
		echo $this->content;
270 285
	}
271 286
}
typo3/file_edit.php (working copy)
52 52
require('init.php');
53 53
require('template.php');
54 54
require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php');
55
require_once(PATH_t3lib.'class.t3lib_parsehtml.php');
55 56

  
56 57

  
57 58

  
......
63 64

  
64 65

  
65 66

  
66

  
67 67
/**
68 68
 * Script Class for rendering the file editing screen
69 69
 *
......
130 130
			case 'group':	$this->icon = 'gfx/i/_icon_ftp_group.gif';	break;
131 131
			default:		$this->icon = 'gfx/i/_icon_ftp.gif';	break;
132 132
		}
133
		
134
		$this->icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$this->icon,'width="18" height="16"').' title="" alt="" />';
135

  
136
			// Relative path to filemount, $key:
133 137
		$this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
134
		$this->title = $GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
135 138

  
139
			// Setting title:
140
		$this->title = $this->icon.$GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
141
		
136 142
		// ***************************
137 143
		// Setting template object
138 144
		// ***************************
139 145
		$this->doc = t3lib_div::makeInstance('template');
140 146
		$this->doc->docType = 'xhtml_trans';
147
		$this->doc->setModuleTemplate('templates/file_edit.html');		
141 148
		$this->doc->backPath = $BACK_PATH;
142 149
		$this->doc->JScode=$this->doc->wrapScriptTags('
143 150
			function backToList()	{	//
......
154 161
	 */
155 162
	function main()	{
156 163
		global $BE_USER, $LANG, $TYPO3_CONF_VARS;
164
		$docHeaderButtons = $this->getButtons();
165
		
166
		$this->content = $this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.pagetitle'));
157 167

  
158
		$this->content='';
159
		$this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.pagetitle'));
160
		$this->content.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.pagetitle'));
161
		$this->content.=$this->doc->spacer(5);
162
		$this->content.=$this->doc->section('',$this->doc->getFileheader($this->title,$this->shortPath,$this->icon));
163
		$this->content.=$this->doc->divider(5);
168
		$pageContent = $this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.pagetitle'));
169
		$pageContent .= $this->doc->spacer(2);
164 170

  
165 171
		$fI = pathinfo($this->target);
166 172
		$extList=$TYPO3_CONF_VARS['SYS']['textfile_ext'];
......
171 177

  
172 178
				// making the formfields
173 179
			$hValue = 'file_edit.php?target='.rawurlencode($this->origTarget).'&returnUrl='.rawurlencode($this->returnUrl);
174
			$code = '';
175
			$code.='
176
				<div id="c-submit">
177
					<input type="hidden" name="redirect" value="'.htmlspecialchars($hValue).'" />
178
					<input type="submit" value="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.submit',1).'" />
179
					<input type="submit" value="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.saveAndClose',1).'" onclick="document.editform.redirect.value=\''.htmlspecialchars($this->returnUrl).'\';" />
180
					<input type="submit" value="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.cancel',1).'" onclick="backToList(); return false;" />
181
				</div>
182
				';
183 180

  
184 181
				// Edit textarea:
185 182
			$code.='
......
188 185
					t3lib_div::formatForTextarea($fileContent).
189 186
					'</textarea>
190 187
					<input type="hidden" name="file[editfile][0][target]" value="'.$this->target.'" />
188
					<input type="hidden" name="redirect" value="'.htmlspecialchars($hValue).'" />
191 189
				</div>
192 190
				<br />';
193 191

  
194
				// CSH:
195
			$code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_edit', $GLOBALS['BACK_PATH'],'|<br/>');
196

  
197 192
				// Make shortcut:
198 193
			if ($BE_USER->mayMakeShortcut())	{
199 194
				$this->MCONF['name']='xMOD_file_edit.php';
200
				$code.= '<br />'.$this->doc->makeShortcutIcon('target','',$this->MCONF['name'],1);
195
				$docHeaderButtons['shortcut'] = $this->doc->makeShortcutIcon('target','',$this->MCONF['name'],1);
201 196
			}
202 197
		} else {
203 198
			$code.=sprintf($LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.coundNot'), $extList);
204 199
		}
205 200

  
206 201
			// Ending of section and outputting editing form:
207
		$this->content.= $this->doc->sectionEnd();
208
		$this->content.=$code;
202
		$pageContent.= $this->doc->sectionEnd();
203
		$pageContent.=$code;
209 204

  
205
			// Add the HTML as a section:
206
		$markerArray = array(
207
			'CSH' => $docHeaderButtons['csh'],
208
			'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
209
			'BUTTONS' => $docHeaderButtons,
210
			'CONTENT' => $pageContent,
211
			'PATH' => $this->title,
212
		);
213
		
214
		$this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
215
		$this->content.= $this->doc->endPage();
216
		$this->content = $this->doc->insertStylesAndJS($this->content);
217
		
218
		
210 219
	}
211 220

  
212 221
	/**
......
215 224
	 * @return	void
216 225
	 */
217 226
	function printContent()	{
218
		$this->content.= $this->doc->endPage();
219
		$this->content = $this->doc->insertStylesAndJS($this->content);
220 227
		echo $this->content;
221 228
	}
229
	
230
	/**
231
	 * Builds the buttons for the docheader and returns them as an array
232
	 *
233
	 * @return array
234
	 **/
235
	function getButtons() {
236
		
237
		$buttons = array();
238
		
239
			// CSH button
240
		$buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_edit', $GLOBALS['BACK_PATH']);
241

  
242
			// Save button
243
		$theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/savedok.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.submit',1)).'" alt="" />';
244
		$buttons['SAVE'] = '<a href="#" onclick="document.editform.submit();">'.$theIcon.'</a>';
245

  
246
			// Save and Close button
247
		$theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/saveandclosedok.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.saveAndClose',1)).'" alt="" />';
248
		$buttons['SAVE_CLOSE'] = '<a href="#" onclick="document.editform.redirect.value=\''.htmlspecialchars($this->returnUrl).'\'; document.editform.submit();">'.$theIcon.'</a>';
249
		
250
			// Cancel button
251
		$theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/closedok.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.cancel',1)).'" alt="" />';
252
		$buttons['CANCEL'] = '<a href="#" onclick="backToList(); return false;">'.$theIcon.'</a>';
253
		
254
		return $buttons;
255
	}
222 256
}
223 257

  
224 258
// Include extension?
typo3/stylesheet.css (working copy)
128 128

  
129 129
body#typo3-alt-doc-php, body#typo3-db-list-php, body#ext-cms-layout-db-layout-php, body#ext-tstemplate-ts-index-php, body#typo3-mod-web-perm-index-php, body#typo3-mod-web-info-index-php, body#typo3-mod-web-func-index-php, body#ext-version-cm1-index-php, body#ext-setup-mod-index-php, body#typo3-mod-user-ws-index-php, body#typo3-mod-user-ws-workspaceforms-php, body#typo3-mod-php, body#ext-tsconfig-help-mod1-index-php, body#typo3-mod-tools-em-index-php, body#ext-lowlevel-dbint-index-php, body#ext-lowlevel-config-index-php { padding: 0; margin: 0; overflow: hidden; height: 100%; }
130 130

  
131
/* Set body styles for Filelist module */
132
BODY#typo3-file-newfolder-php, BODY#typo3-file-list-php, BODY#typo3-file-edit-php, BODY#typo3-file-rename-php, BODY#typo3-file-upload-php { margin: 0;}
131 133

  
132 134
/****************************************
133 135
 * SPECIFIC WRAPPERS
typo3/templates/file_upload.html (revision 0)
1
<!-- ###FULLDOC### begin -->
2
<div class="typo3-fullDoc">
3
	<!-- Page header with buttons, path details and csh -->
4
	<div id="typo3-docheader">
5
		<div id="typo3-docheader-row1">
6
			<div class="buttonsleft">###BUTTONLIST_LEFT###</div>
7
			<div class="buttonsright">###BUTTONLIST_RIGHT######FUNC_MENU###</div>
8
		</div>
9
		<div id="typo3-docheader-row2">
10
			<div class="pagepath">###PATH###</div>
11
			<div class="infooptions"></div>
12
		</div>
13
	</div>
14
	<!-- Content of module, for instance listing, info or editing -->
15
	<div id="typo3-docbody">
16
		###CONTENT###
17
	</div>
18
</div>
19
<!-- ###FULLDOC### end -->
20

  
21
<!-- Grouping the icons on top -->
22

  
23
<!-- ###BUTTON_GROUP_WRAP### -->
24
	<div class="buttongroup">###BUTTONS###</div>
25
<!-- ###BUTTON_GROUP_WRAP### -->
26

  
27
<!-- ###BUTTON_GROUPS_LEFT### -->
28
<!-- ###BUTTON_GROUP4### --><!-- ###BUTTON_GROUP4### -->
29
<!-- ###BUTTON_GROUPS_LEFT### -->
30

  
31
<!-- ###BUTTON_GROUPS_RIGHT### -->
32
<!-- ###BUTTON_GROUP1### --><!-- ###BUTTON_GROUP1### -->
33
<!-- ###BUTTON_GROUPS_RIGHT### -->
typo3/templates/file_edit.html (revision 0)
1
<!-- ###FULLDOC### begin -->
2
<div class="typo3-fullDoc">
3
	<!-- Page header with buttons, path details and csh -->
4
	<div id="typo3-docheader">
5
		<div id="typo3-docheader-row1">
6
			<div class="buttonsleft">###BUTTONLIST_LEFT###</div>
7
			<div class="buttonsright">###BUTTONLIST_RIGHT######FUNC_MENU###</div>
8
		</div>
9
		<div id="typo3-docheader-row2">
10
			<div class="pagepath">###CSH###&nbsp;###PATH###</div>
11
			<div class="infooptions"></div>
12
		</div>
13
	</div>
14
	<!-- Content of module, for instance listing, info or editing -->
15
	<div id="typo3-docbody">
16
		###CONTENT###
17
	</div>
18
</div>
19
<!-- ###FULLDOC### end -->
20

  
21
<!-- Grouping the icons on top -->
22

  
23
<!-- ###BUTTON_GROUP_WRAP### -->
24
	<div class="buttongroup">###BUTTONS###</div>
25
<!-- ###BUTTON_GROUP_WRAP### -->
26

  
27
<!-- ###BUTTON_GROUPS_LEFT### -->
28
<!-- ###BUTTON_GROUP4### -->###SAVE######SAVE_CLOSE######CANCEL###<!-- ###BUTTON_GROUP4### -->
29
<!-- ###BUTTON_GROUPS_LEFT### -->
30

  
31
<!-- ###BUTTON_GROUPS_RIGHT### -->
32
<!-- ###BUTTON_GROUP1### -->###SHORTCUT###<!-- ###BUTTON_GROUP1### -->
33
<!-- ###BUTTON_GROUPS_RIGHT### -->
typo3/templates/file_newfolder.html (revision 0)
1
<!-- ###FULLDOC### begin -->
2
<div class="typo3-fullDoc">
3
	<!-- Page header with buttons, path details and csh -->
4
	<div id="typo3-docheader">
5
		<div id="typo3-docheader-row1">
6
			<div class="buttonsleft">###BUTTONLIST_LEFT###</div>
7
			<div class="buttonsright">###BUTTONLIST_RIGHT######FUNC_MENU###</div>
8
		</div>
9
		<div id="typo3-docheader-row2">
10
			<div class="pagepath">###PATH###</div>
11
			<div class="infooptions"></div>
12
		</div>
13
	</div>
14
	<!-- Content of module, for instance listing, info or editing -->
15
	<div id="typo3-docbody">
16
		###CONTENT###
17
	</div>
18
</div>
19
<!-- ###FULLDOC### end -->
20

  
21
<!-- Grouping the icons on top -->
22

  
23
<!-- ###BUTTON_GROUP_WRAP### -->
24
	<div class="buttongroup">###BUTTONS###</div>
25
<!-- ###BUTTON_GROUP_WRAP### -->
26

  
27
<!-- ###BUTTON_GROUPS_LEFT### -->
28
<!-- ###BUTTON_GROUP4### --><!-- ###BUTTON_GROUP4### -->
29
<!-- ###BUTTON_GROUPS_LEFT### -->
30

  
31
<!-- ###BUTTON_GROUPS_RIGHT### -->
32
<!-- ###BUTTON_GROUP1### --><!-- ###BUTTON_GROUP1### -->
33
<!-- ###BUTTON_GROUPS_RIGHT### -->
typo3/templates/file_rename.html (revision 0)
1
<!-- ###FULLDOC### begin -->
2
<div class="typo3-fullDoc">
3
	<!-- Page header with buttons, path details and csh -->
4
	<div id="typo3-docheader">
5
		<div id="typo3-docheader-row1">
6
			<div class="buttonsleft">###BUTTONLIST_LEFT###</div>
7
			<div class="buttonsright">###BUTTONLIST_RIGHT######FUNC_MENU###</div>
8
		</div>
9
		<div id="typo3-docheader-row2">
10
			<div class="pagepath">###CSH###&nbsp;###PATH###</div>
11
			<div class="infooptions"></div>
12
		</div>
13
	</div>
14
	<!-- Content of module, for instance listing, info or editing -->
15
	<div id="typo3-docbody">
16
		###CONTENT###
17
	</div>
18
</div>
19
<!-- ###FULLDOC### end -->
20

  
21
<!-- Grouping the icons on top -->
22

  
23
<!-- ###BUTTON_GROUP_WRAP### -->
24
	<div class="buttongroup">###BUTTONS###</div>
25
<!-- ###BUTTON_GROUP_WRAP### -->
26

  
27
<!-- ###BUTTON_GROUPS_LEFT### -->
28
<!-- ###BUTTON_GROUP4### --><!-- ###BUTTON_GROUP4### -->
29
<!-- ###BUTTON_GROUPS_LEFT### -->
30

  
31
<!-- ###BUTTON_GROUPS_RIGHT### -->
32
<!-- ###BUTTON_GROUP1### --><!-- ###BUTTON_GROUP1### -->
33
<!-- ###BUTTON_GROUPS_RIGHT### -->
typo3/templates/file_list.html (revision 0)
1
<!-- ###FULLDOC### begin -->
2
<div class="typo3-fullDoc">
3
	<!-- Page header with buttons, path details and csh -->
4
	<div id="typo3-docheader">
5
		<div id="typo3-docheader-row1">
6
			<div class="buttonsleft">###BUTTONLIST_LEFT###</div>
7
			<div class="buttonsright">###BUTTONLIST_RIGHT######FUNC_MENU###</div>
8
		</div>
9
		<div id="typo3-docheader-row2">
10
			<div class="pagepath">###CSH######TITLE###</div>
11
			<div class="infooptions">###FOLDER_INFO###&nbsp;###PAGE_ICON###</div>
12
		</div>
13
	</div>
14
	<!-- Content of module, for instance listing, info or editing -->
15
	<div id="typo3-docbody">
16
		###CONTENT###
17
	</div>
18
</div>
19
<!-- ###FULLDOC### end -->
20

  
21
<!-- Grouping the icons on top -->
22

  
23
<!-- ###BUTTON_GROUP_WRAP### -->
24
	<div class="buttongroup">###BUTTONS###</div>
25
<!-- ###BUTTON_GROUP_WRAP### -->
26

  
27
<!-- ###BUTTON_GROUPS_LEFT### -->
28
<!-- ###BUTTON_GROUP4### -->###UPLOAD######NEW###<!-- ###BUTTON_GROUP4### -->
29
<!-- ###BUTTON_GROUPS_LEFT### -->
30

  
31
<!-- ###BUTTON_GROUPS_RIGHT### -->
32
<!-- ###BUTTON_GROUP1### -->###REFRESH######LEVEL_UP######SHORTCUT###<!-- ###BUTTON_GROUP1### -->
33
<!-- ###BUTTON_GROUPS_RIGHT### -->
typo3/file_upload.php (working copy)
54 54
require('template.php');
55 55
$LANG->includeLLFile('EXT:lang/locallang_misc.xml');
56 56
require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php');
57
require_once(PATH_t3lib.'class.t3lib_parsehtml.php');
57 58

  
58 59

  
59 60

  
......
66 67

  
67 68

  
68 69

  
69

  
70 70
/**
71 71
 * Script Class for display up to 10 upload fields
72 72
 *
......
145 145
			default:		$this->icon = 'gfx/i/_icon_ftp.gif';	break;
146 146
		}
147 147

  
148
		$this->icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$this->icon,'width="18" height="16"').' title="" alt="" />';
149
		
148 150
			// Relative path to filemount, $key:
149 151
		$this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
150 152

  
151 153
			// Setting title:
152
		$this->title = $GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
154
		$this->title = $this->icon.$GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
153 155

  
154 156
			// Setting template object
155
		$this->doc = t3lib_div::makeInstance('smallDoc');
157
		$this->doc = t3lib_div::makeInstance('template');
156 158
		$this->doc->docType = 'xhtml_trans';
159
		$this->doc->setModuleTemplate('templates/file_upload.html');
157 160
		$this->doc->backPath = $BACK_PATH;
158
		$this->doc->form='<form action="tce_file.php" method="post" name="editform" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'">';
159 161

  
160 162
		if($GLOBALS['BE_USER']->jsConfirmation(1))	{
161 163
			$confirm = ' && confirm('.$LANG->JScharCode($LANG->sL('LLL:EXT:lang/locallang_core.php:mess.redraw')).')';
......
187 189
		global $LANG;
188 190

  
189 191
			// Make page header:
190
		$this->content='';
191
		$this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle'));
192
		$this->content.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle'));
193
		$this->content.=$this->doc->spacer(5);
194
		$this->content.=$this->doc->section('',$this->doc->getFileheader($this->title,$this->shortPath,$this->icon));
195
		$this->content.=$this->doc->divider(5);
192
		$this->content = $this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle'));
196 193

  
194
		$pageContent.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle'));
195
		$pageContent.=$this->doc->spacer(5);
196
		$pageContent.=$this->doc->divider(5);
197 197

  
198

  
199
		$code = '<form action="tce_file.php" method="post" name="editform" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'">';
198 200
			// Making the selector box for the number of concurrent uploads
199 201
		$this->number = t3lib_div::intInRange($this->number,1,10);
200
		$code='
202
		$code .= '
201 203
			<div id="c-select">
202 204
				<select name="number" onchange="reload(this.options[this.selectedIndex].value);">';
203 205
		for ($a=1;$a<=$this->uploadNumber;$a++)	{
......
245 247
		$code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_upload', $GLOBALS['BACK_PATH'],'<br/>');
246 248

  
247 249
			// Add the HTML as a section:
248
		$this->content.= $this->doc->section('',$code);
250
		$pageContent.= $this->doc->section('',$code);
251
		
252
		$docHeaderButtons = array();
253

  
254
			// Add the HTML as a section:
255
		$markerArray = array(
256
			'CSH' => $docHeaderButtons['csh'],
257
			'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
258
			'CONTENT' => $pageContent,
259
			'PATH' => $this->title,
260
		);
261
		
262
		$this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
263
		$this->content.= $this->doc->endPage();
264
		$this->content = $this->doc->insertStylesAndJS($this->content);
249 265
	}
250 266

  
251 267
	/**
......
254 270
	 * @return	void
255 271
	 */
256 272
	function printContent()	{
257
		$this->content.= $this->doc->endPage();
258
		$this->content = $this->doc->insertStylesAndJS($this->content);
259 273
		echo $this->content;
260 274
	}
261 275
}