Browse Source

后台选择文件错误修复

tags/6.2.12
tianya 8 months ago
parent
commit
3e8d313163
4 changed files with 7 additions and 4 deletions
  1. +1
    -0
      src/admin/dialog/select_media.php
  2. +2
    -0
      src/admin/dialog/select_soft.php
  3. +3
    -3
      src/admin/js/main.js
  4. +1
    -1
      src/install/update.txt

+ 1
- 0
src/admin/dialog/select_media.php View File

@@ -57,6 +57,7 @@ if (!empty($noeditor)) {
<td colspan="3">
<form name="myform" action="select_media_post.php" method="POST" enctype="multipart/form-data">
<input type="hidden" name="activepath" value="<?php echo $activepath ?>">
<?php $noeditor = !empty($noeditor) ? "<input type='hidden' name='noeditor' value='yes'>" : ''; echo $noeditor;?>
<input type="hidden" name="f" value="<?php echo $f ?>">
<input type="hidden" name="job" value="upload">
<input type="hidden" name="CKEditorFuncNum" value="<?php echo isset($CKEditorFuncNum) ? $CKEditorFuncNum : 1;?>">


+ 2
- 0
src/admin/dialog/select_soft.php View File

@@ -12,6 +12,7 @@ require_once(dirname(__FILE__)."/config.php");
if (empty($activepath)) {
$activepath = '';
}
$noeditor = isset($noeditor) ? $noeditor : '';
$activepath = str_replace('.', '', $activepath);
$activepath = preg_replace("#\/{1,}#", '/', $activepath);
if (strlen($activepath) < strlen($cfg_soft_dir)) {
@@ -56,6 +57,7 @@ if (!empty($noeditor)) {
<td colspan="3">
<form name="myform" action="select_soft_post.php" method="POST" enctype="multipart/form-data">
<input type="hidden" name="activepath" value="<?php echo $activepath ?>">
<?php $noeditor = !empty($noeditor) ? "<input type='hidden' name='noeditor' value='yes'>" : ''; echo $noeditor;?>
<input type="hidden" name="f" value="<?php echo $f ?>">
<input type="hidden" name="job" value="upload">
<input type="file" name="uploadfile" class="w-50">


+ 3
- 3
src/admin/js/main.js View File

@@ -53,15 +53,15 @@ function SeePicNew(f, imgdid, frname, hpos, acname) {
}
function SelectFlash() {
var pos = GetWinPos(800,600);
window.open("./dialog/select_media.php?f=form1.flashurl", "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top);
window.open("./dialog/select_media.php?f=form1.flashurl&noeditor=yes", "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top);
}
function SelectMedia(fname) {
var pos = GetWinPos(800,600);
window.open("./dialog/select_media.php?f=" + fname, "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top);
window.open("./dialog/select_media.php?f=" + fname + "&noeditor=yes", "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top);
}
function SelectSoft(fname) {
var pos = GetWinPos(800,600);
window.open("./dialog/select_soft.php?f=" + fname, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top);
window.open("./dialog/select_soft.php?f=" + fname+ "&noeditor=yes", "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top);
}
function SelectImage(fname, stype, imgsel="") {
var pos = GetWinPos(800,600);


+ 1
- 1
src/install/update.txt View File

@@ -143,4 +143,4 @@ CREATE TABLE `#@__search_sync` (
`add_at` int NULL DEFAULT NULL,
`update_at` int NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) TYPE = MyISAM;
) TYPE=MyISAM;

Loading…
Cancel
Save