📄 document.php
字号:
border-width: 0px;
}
</style>
<script language="JavaScript" type="text/javascript" src="<?php echo WP_WEB_DIRECTORY; ?>js/dialogEditorShared.js"></script>
<script language="JavaScript" type="text/javascript" src="<?php echo WP_WEB_DIRECTORY; ?>js/dialogShared.js"></script>
<script type="text/javascript">
<!--//
var CURRENT_HIGHLIGHT
function highlight(srcElement) {
if (CURRENT_HIGHLIGHT) {
CURRENT_HIGHLIGHT.style.backgroundColor='';
CURRENT_HIGHLIGHT.style.color='#003399';
}
srcElement.style.backgroundColor = 'highlight';
srcElement.style.color = 'highlighttext';
CURRENT_HIGHLIGHT = srcElement;
}
function insert_link() {
parentWindow.<?php
if (!empty($return_function)) {
echo $return_function.'(';
} else {
echo 'wp_hyperlink(obj,';
} ?>document.document_form.oHerf.value, "_blank", "");
top.window.close();
return false;
}
function preview(url) {
if (url!='') {
url = make_url_with_base (url);
if (wp_is_ie) {
document.frames('preview').location.replace(url);
} else {
document.getElementById('preview').contentWindow.location.replace(url);
}
} else {
if (wp_is_ie) {
document.frames('preview').location.replace('<?php echo WP_WEB_DIRECTORY; ?>no_preview.php?lang=<?php echo $lang_include; ?>');
} else {
document.getElementById('preview').contentWindow.location.replace('<?php echo WP_WEB_DIRECTORY; ?>no_preview.php?lang=<?php echo $lang_include; ?>');
}
}
}
function localLink(url,do_preview,fsize,type) {
document.document_form.oHerf.value=url;
document.getElementById('size').innerHTML = '<?php echo $lang['size']; ?> ' + fsize;
document.getElementById('type').innerHTML = '<?php echo $lang['type']; ?> ' + type;
if (do_preview == 0) {
if (wp_is_ie) {
document.frames('preview').location.replace('<?php echo WP_WEB_DIRECTORY; ?>no_preview.php?lang=<?php echo $lang_include; ?>');
} else {
document.getElementById('preview').contentWindow.location.replace('<?php echo WP_WEB_DIRECTORY; ?>no_preview.php?lang=<?php echo $lang_include; ?>');
}
} else {
preview(url);
}
if (document.getElementById('ok')) {
document.getElementById('ok').focus()
}
}
function initialize() {
if (parentWindow.wp_current_hyperlink) {
var current_href = parentWindow.wp_current_hyperlink;
if (current_href!="") {
document.document_form.oHerf.value=current_href;
if (document.getElementById(current_href)) {
highlight(document.getElementById(current_href));
document.getElementById(current_href).focus();
}
} else {
document.document_form.oHerf.value="http://";
}
}
}
function doConfirm(url,msg) {
if (confirm(msg)){
document.location.assign(url)
}
}
function upload_check() {
if (document.getElementById('document_field').value == '') {
alert("<?php echo $lang['click_browse']; ?>")
document.getElementById('document_field').focus();
return false;
} else {
return true;
}
}
function showUploadMessage() {
document.getElementById('uploadMessage').style.display = 'block'
}
function hideUploadMessage() {
document.getElementById('uploadMessage').style.display = 'none'
}
function cancelUpload() {
if (wp_is_ie) {
try {
document.execCommand('stop');
} catch (e) {
document.location.reload();
}
} else {
window.stop();
}
hideUploadMessage()
}
//-->
</script>
<?php
// script to make any uploaded images currently selected
if (!empty($name2)) {
echo '<script type="text/javascript">
<!--// Begin
function uploadedimage() {
localLink("'.$web_directory.$name2.'", "'.$preview.'", "'.$file_size.'", "'.$filetype.'");
highlight(document.getElementById("'.$web_directory.$name2.'"));
document.getElementById("'.$web_directory.$name2.'").focus();
}
// End -->
</script>
';
} else {
echo '<script type="text/javascript">
<!--// Begin
function uploadedimage() {
return true;
}
// End -->
</script>
';
}
?>
</head>
<body scroll="no" onLoad="<?php if ($in_wp) { ?>initialize(); <?php } ?>uploadedimage(); hideLoadMessage();">
<?php include('./includes/load_message.php'); ?>
<div align="center" id="uploadMessage">
<table width="100%" height="90%">
<tr>
<td align="center" valign="middle"><div id="uploadMessageText"><?php echo $lang['upload_in_progress']; ?> <?php echo $lang['please_wait']; ?><br><br>
<img src="images/load_bar.gif" height="12" width="251" alt="" class="inset"><br><br>
<input class="button" type="button" value="<?php echo $lang['cancel']; ?>" onClick="cancelUpload()"></div></td>
</tr>
</table>
</div>
<div class="dialog_content">
<div style="height:22px">
<?php
if ($message) {echo $message;} else {echo ' ';}
?>
</div>
<table border="0" cellpadding="1" cellspacing="3">
<tr>
<td rowspan="10" valign="top"> <fieldset>
<legend><?php echo $lang['select_document']; ?></legend>
<div align="left"><?php echo $lang['looking_in'] ; ?> <input class="disabledtextbox" type="text" name="imagename" value="<?php echo $web_directory.$folderpath; ?>" style="width:292px" readonly="readonly">
</div>
<table width="360" border="0" cellpadding="0" cellspacing="0" style="background-color:threedshadow;">
<tr>
<td> <p>
<?php
if ($folderpath != '') {
$array = explode ('/',$folderpath);
$array[sizeof($array)-1] = NULL;
$array[sizeof($array)-2] = NULL;
$foo = implode ('/', $array);
while (substr ($foo, strlen ($foo) - 1) == '/') {
$foo = substr ($foo, 0, strlen ($foo) - 1);
}
?>
<a style="color:highlighttext" href="<?php echo WP_WEB_DIRECTORY; ?>document.php<?php echo str_replace('folder='.$folderpath, 'folder='.$foo, $query_string) ?>">
<img src="<?php echo WP_WEB_DIRECTORY; ?>images/up.gif" width="23" height="22" alt="<?php echo $lang['up_one_level']; ?>" title="<?php echo $lang['up_one_level']; ?>" border="0" align="absmiddle"><?php echo $lang['parent_directory']; ?></a>
<?php
} else {
?>
<img src="<?php echo WP_WEB_DIRECTORY; ?>images/spacer.gif" width="23" height="22" alt="" border="0" align="absmiddle">
<?php
}
if ($create_directories) { ?>
</p></td>
<td align="right"> <p> <a style="color:highlighttext" href="<?php echo WP_WEB_DIRECTORY; ?>document.php<?php echo $query_string ?>&action=create_dir"><img src="<?php echo WP_WEB_DIRECTORY; ?>images/newfolder.gif" width="23" height="22" alt="<?php echo $lang['new_folder']; ?>" title="<?php echo $lang['new_folder']; ?>" border="0" align="absmiddle"><?php echo $lang['new_folder']; ?></a>
<?php } ?>
</p></td>
</tr>
</table>
<table width="360px" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="fileBar" width="190"><p><a href="<?php echo WP_WEB_DIRECTORY; ?>document.php<?php echo str_replace(array('sort_by='.$sort_by,'sort_dir='.$sort_dir), array('sort_by=name','sort_dir='.$name_sort_dir), $query_string) ?>"><?php echo $lang['name']; ?> <?php echo $name_arrow ?></a></p></td>
<td class="fileBar" width="100"><p><a href="<?php echo WP_WEB_DIRECTORY; ?>document.php<?php echo str_replace(array('sort_by='.$sort_by,'sort_dir='.$sort_dir), array('sort_by=type','sort_dir='.$type_sort_dir), $query_string) ?>"><?php echo $lang['type']; ?> <?php echo $type_arrow ?></a></p></td>
<td class="fileBar" width="70" style="border-right: 1px solid threedshadow"><p><?php echo $lang['action']; ?></p></td>
</tr>
</table>
<div class="inset" style="height:315; width:100%; overflow:auto; background-color:#FFFFFF">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<?php
$count = 0;
display_folders();
display_files();
?>
</table>
</div>
</fieldset></td>
<td rowspan="3"> </td>
<td colspan="3" valign="top">
<?php if ($upload_files) {?>
<fieldset>
<legend><?php echo $lang['upload_a_document']; ?></legend>
<form style="display:inline" enctype="multipart/form-data" action="<?php echo WP_WEB_DIRECTORY; ?>document.php" method="post" onsubmit="showUploadMessage()">
<input name="document_field" id="document_field" type="file" size="30" title="<?php echo $lang['click_browse']; ?>">
<input type="submit" class="button" value="<?php echo $lang['upload_file']; ?>" onClick="return upload_check()">
<?php echo $query_inputs ?>
</form>
<p><?php echo wp_var_replace($lang['documents_must_be'],array('max_size'=>$max_documentfile_size/1000)); ?></p>
</fieldset>
<?php } else { echo ' '; }?>
</td>
</tr>
<tr>
<td colspan="3" align="right" valign="top"> <div align="center">
<iframe id="preview" width="99%" height="170" frameborder="0" marginheight="0" marginwidth="0" class="previewWindow" src="<?php echo WP_WEB_DIRECTORY; ?>blank.php?lang=<?php echo $lang_include; ?>"></iframe>
</div></td>
</tr>
<tr>
<td colspan="3" valign="top"> <form name="document_form" id="document_form" style="display:inline" onsubmit="return insert_link()">
<fieldset>
<legend><?php echo $lang['document_information']; ?></legend>
<table height="73" border="0" cellspacing="3" cellpadding="1">
<tr>
<td><?php echo $lang['address']; ?></td>
<td width="100%"><input type="text" name="oHerf" id="oHerf" value="" style="width:200px" title="<?php echo $lang['type_document_address']; ?>"><button class="chooseImage" type="button" onClick="preview(document.getElementById('oHerf').value)" title="<?php echo $lang['preview']; ?>"><img src="<?php echo WP_WEB_DIRECTORY; ?>images/view.gif" width="16" height="16" align="absmiddle" title="<?php echo $lang['preview']; ?>" alt="<?php echo $lang['preview']; ?>"></button>
</td>
</tr>
<tr>
<td height="21" colspan="2"><span id="type"> </span> <span id="size">
</span> </td>
</tr>
</table>
</fieldset>
<?php
if ($in_wp) {
?>
<div align="center">
<p> </p>
<button id="ok" type="submit"><?php echo $lang['ok']; ?></button>
<button type="button" onClick="top.window.close();"><?php echo $lang['cancel']; ?></button>
</div>
<?php } ?>
</form></td>
</tr>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -