⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class.tx_rtehtmlarea_browse_links.php

📁 Typo3, 开源里边最强大的
💻 PHP
📖 第 1 页 / 共 3 页
字号:
					}				}				$content.= '			<!--			Wrapper table for folder tree / file list:			-->					<table border="0" cellpadding="0" cellspacing="0" id="typo3-linkFiles">						<tr>							<td class="c-wCell" valign="top">'.$this->barheader($LANG->getLL('folderTree').':').$tree.'</td>							<td class="c-wCell" valign="top">'.$files.'</td>						</tr>					</table>					';			break;			case 'spec':				if (is_array($this->thisConfig['userLinks.']))	{					$subcats=array();					$v=$this->thisConfig['userLinks.'];					reset($v);					while(list($k2)=each($v))	{						$k2i = intval($k2);						if (substr($k2,-1)=='.' && is_array($v[$k2i.'.']))	{								// Title:							$title = trim($v[$k2i]);							if (!$title)	{								$title=$v[$k2i.'.']['url'];							} else {								$title=$LANG->sL($title);							}								// Description:							$description=$v[$k2i.'.']['description'] ? $LANG->sL($v[$k2i.'.']['description'],1).'<br />' : '';								// URL + onclick event:							$onClickEvent='';							if (isset($v[$k2i.'.']['target']))	$onClickEvent.="setTarget('".$v[$k2i.'.']['target']."');";							$v[$k2i.'.']['url'] = str_replace('###_URL###',$this->siteURL,$v[$k2i.'.']['url']);							if (substr($v[$k2i.'.']['url'],0,7)=="http://" || substr($v[$k2i.'.']['url'],0,7)=='mailto:')	{								$onClickEvent.="cur_href=unescape('".rawurlencode($v[$k2i.'.']['url'])."');link_current();";							} else {								$onClickEvent.="link_spec(unescape('".$this->siteURL.rawurlencode($v[$k2i.'.']['url'])."'));";							}								// Link:							$A=array('<a href="#" onclick="'.htmlspecialchars($onClickEvent).'return false;">','</a>');								// Adding link to menu of user defined links:							$subcats[$k2i]='								<tr>									<td class="bgColor4">'.$A[0].'<strong>'.htmlspecialchars($title).($this->curUrlInfo['info']==$v[$k2i.'.']['url']?'<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/blinkarrow_right.gif','width="5" height="9"').' class="c-blinkArrowR" alt="" />':'').'</strong><br />'.$description.$A[1].'</td>								</tr>';						}					}						// Sort by keys:					ksort($subcats);						// Add menu to content:					$content.= '			<!--				Special userdefined menu:			-->						<table border="0" cellpadding="1" cellspacing="1" id="typo3-linkSpecial">							<tr>								<td class="bgColor5" class="c-wCell" valign="top"><strong>'.$LANG->getLL('special',1).'</strong></td>							</tr>							'.implode('',$subcats).'						</table>						';				}			break;			case 'page':			default:				$content.=$this->addAttributesForm();								$pagetree = t3lib_div::makeInstance('tx_rtehtmlarea_pageTree');				$tree=$pagetree->getBrowsableTree();				$cElements = $this->expandPage();				$content.= '			<!--				Wrapper table for page tree / record list:			-->					<table border="0" cellpadding="0" cellspacing="0" id="typo3-linkPages">						<tr>							<td class="c-wCell" valign="top">'.$this->barheader($LANG->getLL('pageTree').':').$tree.'</td>							<td class="c-wCell" valign="top">'.$cElements.'</td>						</tr>					</table>					';			break;		}			// End page, return content:		$content.= $this->doc->endPage();		return $content;	}		function addAttributesForm() {		$ltargetForm = '';			// Add target and class selector box and title field:		$ltarget = $this->addTargetSelector();		$lclass = $this->addClassSelector();		$ltitle = $this->addTitleSelector();		if ($ltarget || $lclass || $ltitle) {			$ltargetForm = $this->wrapInForm($ltarget.$lclass.$ltitle);		}		return $ltargetForm;	}		function wrapInForm($string) {		global $LANG;				$form = '			<!--				Selecting target for link:			-->				<form action="" name="ltargetform" id="ltargetform">					<table border="0" cellpadding="2" cellspacing="1" id="typo3-linkTarget">'. $string;		if ((($this->act == 'page' && $this->curUrlInfo['act']=='page') || ($this->act == 'file' && $this->curUrlInfo['act']=='file') || ($this->act == 'url' && $this->curUrlInfo['act']!='page')) && $this->curUrlArray['href']) {			$form .='						<tr>							<td>							</td>							<td colspan="3">								<input type="submit" value="'.$LANG->getLL('update',1).'" onclick="return link_current();" />							</td>						</tr>';		}		$form .= '					</table>				</form>';		return $form;	}		function addTargetSelector() {		global $LANG;				$targetSelectorConfig = array();		$popupSelectorConfig = array();		if (is_array($this->buttonConfig['targetSelector.'])) {			$targetSelectorConfig = $this->buttonConfig['targetSelector.'];		}		if (is_array($this->buttonConfig['popupSelector.'])) {			$popupSelectorConfig = $this->buttonConfig['popupSelector.'];		}				$ltarget = '';		if ($this->act != 'mail')	{			if (!($targetSelectorConfig['disabled'] && $popupSelectorConfig['disabled'])) {				$ltarget .= '						<tr>							<td>'.$LANG->getLL('target',1).':</td>							<td><input type="text" name="ltarget" onchange="setTarget(this.value);" value="'.htmlspecialchars($this->setTarget).'"'.$this->doc->formWidth(10).' /></td>';				$ltarget .= '							<td colspan="2">';				if (!$targetSelectorConfig['disabled']) {					$ltarget .= '								<select name="ltarget_type" onchange="setTarget(this.options[this.selectedIndex].value);document.ltargetform.ltarget.value=this.options[this.selectedIndex].value;this.selectedIndex=0;">									<option></option>									<option value="_top">'.$LANG->getLL('top',1).'</option>									<option value="_blank">'.$LANG->getLL('newWindow',1).'</option>								</select>';				}				$ltarget .= '							</td>';			}						$ltarget .= '						</tr>';			if (!$popupSelectorConfig['disabled']) {								$selectJS = 'if (document.ltargetform.popup_width.options[document.ltargetform.popup_width.selectedIndex].value>0 && document.ltargetform.popup_height.options[document.ltargetform.popup_height.selectedIndex].value>0)	{					document.ltargetform.ltarget.value = document.ltargetform.popup_width.options[document.ltargetform.popup_width.selectedIndex].value+\'x\'+document.ltargetform.popup_height.options[document.ltargetform.popup_height.selectedIndex].value;					setTarget(document.ltargetform.ltarget.value);					document.ltargetform.popup_width.selectedIndex=0;					document.ltargetform.popup_height.selectedIndex=0;				}';				$ltarget.='						<tr>							<td>'.$LANG->getLL('target_popUpWindow',1).':</td>							<td colspan="3">								<select name="popup_width" onchange="'.$selectJS.'">									<option value="0">'.$LANG->getLL('target_popUpWindow_width',1).'</option>									<option value="300">300</option>									<option value="400">400</option>									<option value="500">500</option>									<option value="600">600</option>									<option value="700">700</option>									<option value="800">800</option>								</select>								x								<select name="popup_height" onchange="'.$selectJS.'">									<option value="0">'.$LANG->getLL('target_popUpWindow_height',1).'</option>									<option value="200">200</option>									<option value="300">300</option>									<option value="400">400</option>									<option value="500">500</option>									<option value="600">600</option>								</select>							</td>						</tr>';			}		}		return $ltarget;	}		function addClassSelector() {		global $LANG;				$selectClass = '';		if ($this->classesAnchorJSOptions[$this->act]) {			$selectClassJS = '					document.ltargetform.anchor_class.value = document.ltargetform.anchor_class.options[document.ltargetform.anchor_class.selectedIndex].value;					if(document.ltargetform.anchor_class.value && editor.classesAnchorSetup) {						for (var i = editor.classesAnchorSetup.length; --i >= 0;) {							var anchorClass = editor.classesAnchorSetup[i];							if (anchorClass[\'name\'] == document.ltargetform.anchor_class.value) {								if(anchorClass[\'titleText\'] && document.ltargetform.anchor_title) document.ltargetform.anchor_title.value = anchorClass[\'titleText\'];								break;							}						}					}					setClass(document.ltargetform.anchor_class.value);				';			$selectClass ='						<tr>							<td>'.$LANG->getLL('anchor_class',1).':</td>							<td colspan="3">								<select name="anchor_class" onchange="'.$selectClassJS.'">									' . $this->classesAnchorJSOptions[$this->act] . '								</select>							</td>						</tr>';		}		return $selectClass;	}		function addTitleSelector() {		global $LANG;				return '						<tr>							<td>'.$LANG->getLL('anchor_title',1).':</td>							<td colspan="3">								<input type="text" name="anchor_title" value="' . ($this->setTitle?$this->setTitle:($this->thisConfig['classesAnchor']?$this->classesAnchorDefaultTitle[$this->act]:'')) . '" ' . $this->doc->formWidth(30) . ' />							</td>						</tr>';	}		/**	 * For TBE: Makes an upload form for uploading files to the filemount the user is browsing.	 * The files are uploaded to the tce_file.php script in the core which will handle the upload.	 *	 * @param	string		Absolute filepath on server to which to upload.	 * @return	string		HTML for an upload form.	 */	function uploadForm($path)	{		global $BACK_PATH;		$count=3;			// Create header, showing upload path:		$header = t3lib_div::isFirstPartOfStr($path,PATH_site)?substr($path,strlen(PATH_site)):$path;		$code=$this->barheader($GLOBALS['LANG']->getLL('uploadImage').':');		$code.='			<!--				Form, for uploading files:			-->			<form action="'.$BACK_PATH.'tce_file.php" method="post" name="editform" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'">				<table border="0" cellpadding="0" cellspacing="3" id="typo3-uplFiles">					<tr>						<td><strong>'.$GLOBALS['LANG']->getLL('path',1).':</strong> '.htmlspecialchars($header).'</td>					</tr>					<tr>						<td>';			// Traverse the number of upload fields (default is 3):		for ($a=1;$a<=$count;$a++)	{			$code.='<input type="file" name="upload_'.$a.'"'.$this->doc->formWidth(35).' size="50" />				<input type="hidden" name="file[upload]['.$a.'][target]" value="'.htmlspecialchars($path).'" />				<input type="hidden" name="file[upload]['.$a.'][data]" value="'.$a.'" /><br />';		}			// Make footer of upload form, including the submit button:		$redirectValue = $this->thisScript.'?act='.$this->act.'&editorNo='.$this->editorNo.'&mode='.$this->mode.'&expandFolder='.rawurlencode($path).'&bparams='.rawurlencode($this->bparams);		$code.='<input type="hidden" name="redirect" value="'.htmlspecialchars($redirectValue).'" />'.				'<input type="submit" name="submit" value="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.submit',1).'" />';		$code.='			<div id="c-override">				<input type="checkbox" name="overwriteExistingFiles" value="1" /> '.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:overwriteExistingFiles',1).'			</div>		';		$code.='</td>					</tr>				</table>			</form>';		return $code;	}		/**	 * For TBE: Makes a form for creating new folders in the filemount the user is browsing.	 * The folder creation request is sent to the tce_file.php script in the core which will handle the creation.	 *	 * @param	string		Absolute filepath on server in which to create the new folder.	 * @return	string		HTML for the create folder form.	 */	function createFolder($path)	{		global $BACK_PATH;			// Create header, showing upload path:		$header = t3lib_div::isFirstPartOfStr($path,PATH_site)?substr($path,strlen(PATH_site)):$path;		$code=$this->barheader($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle').':');		$code.='			<!--				Form, for creating new folders:			-->			<form action="'.$BACK_PATH.'tce_file.php" method="post" name="editform2">				<table border="0" cellpadding="0" cellspacing="3" id="typo3-crFolder">					<tr>						<td><strong>'.$GLOBALS['LANG']->getLL('path',1).':</strong> '.htmlspecialchars($header).'</td>					</tr>					<tr>						<td>';			// Create the new-folder name field:		$a=1;		$code.='<input'.$this->doc->formWidth(20).' type="text" name="file[newfolder]['.$a.'][data]" />'.				'<input type="hidden" name="file[newfolder]['.$a.'][target]" value="'.htmlspecialchars($path).'" />';			// Make footer of upload form, including the submit button:		$redirectValue = $this->thisScript.'?act='.$this->act.'&editorNo='.$this->editorNo.'&mode='.$this->mode.'&expandFolder='.rawurlencode($path).'&bparams='.rawurlencode($this->bparams);		$code.='<input type="hidden" name="redirect" value="'.htmlspecialchars($redirectValue).'" />'.				'<input type="submit" name="submit" value="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.submit',1).'" />';		$code.='</td>					</tr>				</table>			</form>';		return $code;	}}if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php'])	{	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php']);}?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -