📄 template_file_selector.php
字号:
<?php/* Copyright Intermesh 2003 Author: Merijn Schering <mschering@intermesh.nl> Version: 1.0 Release date: 08 July 2003 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. *///load Group-Officerequire_once("../../Group-Office.php");//authenticate the user$GO_SECURITY->authenticate();//see if the user has access to this module//for this to work there must be a module named 'example'$GO_MODULES->authenticate('cms');//load the CMS module class libraryrequire_once($GO_MODULES->class_path.'cms.class.inc');$cms = new cms();//get the language filerequire_once($GO_LANGUAGE->get_language_file('cms'));require_once($GO_THEME->theme_path.'header.inc');echo '<input type="hidden" name="template_file_id" />';echo '<input type="hidden" name="task" />';echo '<table border="0" cellpadding="3" cellspacing="0"><tr>';echo '<td width="16"> </td>';echo '<td width="100" nowrap><h3>'.$strName.'</h3></td>';echo '<td width="100" nowrap><h3>'.$strType.'</h3></td></tr>';require_once($GO_CONFIG->class_path.'filesystem.class.inc');$fs = new filesystem();$template_file_path = $GO_CONFIG->local_path.'cms/templates/'.$_REQUEST['template_id'].'/'; //list the files$total_size = 0;$files = $fs->get_files($template_file_path);foreach($files as $file){ $total_size += $file['size']; $short_name = cut_string($file['name'], 30); echo '<tr class="Table1">'; echo '<td><img width="16" height="16" border="0" src="'.get_filetype_image(get_extension($file['name'])).'" /></td>'; echo '<td nowrap> <a href="javascript:paste_url(\''.addslashes($GO_CONFIG->local_url.'cms/templates/'.$_REQUEST['template_id'].'/'.$file['name']).'\')" title="'.$file['name'].'">'.$short_name.'</a> </td>'; echo '<td nowrap>'.get_filetype_description(get_extension($file['name'])).' </td></tr>';}echo '<tr><td colspan="99" height="18"> '.count($files).' '.$cms_items.'</td></tr>';echo '</table><script type="text/javascript">function paste_url(url){ var textarea = opener.document.forms[0].'.$_REQUEST['SET_FIELD'].'; if (document.all) { textarea.value=url+"\r\n"+textarea.value }else { textarea.value=textarea.value.substring(0,textarea.selectionStart)+url+textarea.value.substring(textarea.selectionEnd,textarea.value.length); } window.close();}</script>';require_once($GO_THEME->theme_path.'footer.inc');?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -