@@ -54,117 +54,88 @@ if (!empty($iseditor)) { | |||
<html> | |||
<head> | |||
<meta charset="utf-8"> | |||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |||
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"> | |||
<title>选择图片</title> | |||
<link rel="stylesheet" href="/static/web/css/font-awesome.min.css"> | |||
<link rel="stylesheet" href="/static/web/css/bootstrap.min.css"> | |||
<link rel="stylesheet" href="/static/web/css/admin.css"> | |||
<script src="/static/web/js/jquery.min.js"></script> | |||
</head> | |||
<body> | |||
<div class="upload-bg"> | |||
<div class="card shadow-sm"> | |||
<div class="card-header">选择图片</div> | |||
<div class="card-body"> | |||
<div class="table-responsive"> | |||
<table class="table table-borderless icon"> | |||
<thead> | |||
<tr> | |||
<td colspan="3"> | |||
<form name="myform" action="select_images_post.php" method="POST" enctype="multipart/form-data"> | |||
<?php $noeditor = !empty($noeditor) ? "<input type='hidden' name='noeditor' value='yes'>" : ''; echo $noeditor;?> | |||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | |||
<input type="hidden" name="f" value="<?php echo $f ?>"> | |||
<input type="hidden" name="v" value="<?php echo $v ?>"> | |||
<input type="hidden" name="iseditor" value="<?php echo $iseditor ?>"> | |||
<input type="hidden" name="imgstick" value="<?php echo $imgstick ?>"> | |||
<input type="hidden" name="CKEditorFuncNum" value="<?php echo isset($CKEditorFuncNum) ? $CKEditorFuncNum : 1;?>"> | |||
<input type="hidden" name="job" value="upload"> | |||
<input type="file" name="imgfile"> | |||
<label><input type="checkbox" name="needwatermark" value="1" <?php if ($photo_markup == '1') echo 'checked';?>> 水印</label> | |||
<label><input type="checkbox" name="resize" value="1"> 缩小</label> | |||
<label>宽:<input type="text" name="iwidth" value="<?php echo $cfg_ddimg_width ?>" class="admin-input-xs"></label> | |||
<label>高:<input type="text" name="iheight" value="<?php echo $cfg_ddimg_height ?>" class="admin-input-xs"></label> | |||
<button type="submit" class="btn btn-success btn-sm">上传</button> | |||
</form> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="col">文件名称</td> | |||
<td scope="col">文件大小</td> | |||
<td scope="col">修改时间</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = ''; | |||
$ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
if ($filesize < 0.1) { | |||
@list($ty1, $ty2) = explode("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||
} else { | |||
@list($ty1, $ty2) = explode("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
$line = "<tr> | |||
<td colspan='2'><a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td>当前目录:$activepath</td> | |||
</tr>"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode("$activepath/$file").$addparm."'><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(".$cfg_imgtype.")#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "text-danger"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td> | |||
<a href='$reurl' onclick=\"ReturnImg('$reurl');\" class=\"tipsimg $lstyle\"><img src='$reurl' title='$file'> $file</a> | |||
</td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(jpg)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "text-danger"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href='$reurl' onclick=\"ReturnImg('$reurl');\" class=\"tipsimg $lstyle\"><img src='$reurl' title='$file'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} | |||
} | |||
?> | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
<body class="p-3"> | |||
<div class="card shadow-sm mb-3"> | |||
<div class="card-body"> | |||
<form name="myform" action="select_images_post.php" method="POST" enctype="multipart/form-data"> | |||
<?php $noeditor = !empty($noeditor) ? "<input type='hidden' name='noeditor' value='yes'>" : ''; echo $noeditor;?> | |||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | |||
<input type="hidden" name="f" value="<?php echo $f ?>"> | |||
<input type="hidden" name="v" value="<?php echo $v ?>"> | |||
<input type="hidden" name="iseditor" value="<?php echo $iseditor ?>"> | |||
<input type="hidden" name="imgstick" value="<?php echo $imgstick ?>"> | |||
<input type="hidden" name="CKEditorFuncNum" value="<?php echo isset($CKEditorFuncNum) ? $CKEditorFuncNum : 1;?>"> | |||
<input type="hidden" name="job" value="upload"> | |||
<input type="file" name="imgfile"> | |||
<label><input type="checkbox" name="needwatermark" value="1" <?php if ($photo_markup == '1') echo 'checked';?>> 水印</label> | |||
<label><input type="checkbox" name="resize" value="1"> 缩小</label> | |||
<label><input type="text" name="iwidth" value="<?php echo $cfg_ddimg_width ?>" class="admin-input-xs"> 宽</label> | |||
<label><input type="text" name="iheight" value="<?php echo $cfg_ddimg_height ?>" class="admin-input-xs"> 高</label> | |||
<button type="submit" class="btn btn-success btn-sm">上传</button> | |||
</form> | |||
</div> | |||
</div> | |||
<div class="card shadow-sm"> | |||
<div class="card-header">选择图片</div> | |||
<div class="card-body opt"> | |||
<?php | |||
$dh = scandir($inpath); | |||
foreach ($dh as $file) { | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
$line = "<div class='d-flex justify-content-between mb-3'> | |||
<a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 返回上级</a> | |||
<span>当前目录:$activepath</span> | |||
</div>"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<div class='list'> | |||
<a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode("$activepath/$file").$addparm."'> | |||
<img src='/static/web/img/icon_dir.png'> | |||
<span>$file</span> | |||
</a> | |||
</div>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(".$cfg_imgtype.")#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<div class='list'> | |||
<a href='$reurl' onclick=\"ReturnImg('$reurl');\" $lstyle> | |||
<img src='$reurl' title='$file'> | |||
<span>$file</span> | |||
</a> | |||
</div>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(jpg)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<div class='list'> | |||
<a href='$reurl' onclick=\"ReturnImg('$reurl');\" $lstyle> | |||
<img src='$reurl' title='$file'> | |||
<span>$file</span> | |||
</a> | |||
</div>"; | |||
echo "$line"; | |||
} | |||
} | |||
?> | |||
</div> | |||
</div> | |||
<script> | |||
@@ -205,25 +176,6 @@ if (!empty($iseditor)) { | |||
} | |||
window.close(); | |||
} | |||
$(function() { | |||
var x = 10; | |||
var y = 10; | |||
$(".tipsimg").mouseover(function(e) { | |||
var toolimg = "<div id='toolimg'><img src='" + this.href + "'></div>"; | |||
$("body").append(toolimg); | |||
$("#toolimg").css({ | |||
"top": (e.pageY + y) + "px", | |||
"left": (e.pageX + x) + "px" | |||
}).show("fast"); | |||
}).mouseout(function() { | |||
$("#toolimg").remove(); | |||
}).mousemove(function(e) { | |||
$("#toolimg").css({ | |||
"top": (e.pageY + y) + "px", | |||
"left": (e.pageX + x) + "px" | |||
}); | |||
}); | |||
}); | |||
</script> | |||
</body> | |||
</html> |
@@ -44,131 +44,129 @@ if (!empty($noeditor)) { | |||
<html> | |||
<head> | |||
<meta charset="utf-8"> | |||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |||
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"> | |||
<title>选择多媒体</title> | |||
<link rel="stylesheet" href="/static/web/css/font-awesome.min.css"> | |||
<link rel="stylesheet" href="/static/web/css/bootstrap.min.css"> | |||
<link rel="stylesheet" href="/static/web/css/admin.css"> | |||
</head> | |||
<body> | |||
<div class="upload-bg"> | |||
<div class="card shadow-sm"> | |||
<div class="card-header">选择多媒体</div> | |||
<div class="card-body"> | |||
<div class="table-responsive"> | |||
<table class="table table-borderless icon"> | |||
<thead> | |||
<tr> | |||
<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;?>"> | |||
<input type="file" name="uploadfile"> | |||
<button type="submit" class="btn btn-success btn-sm">上传</button> | |||
</form> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="col">文件名称</td> | |||
<td scope="col">文件大小</td> | |||
<td scope="col">修改时间</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = ''; | |||
$ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
if ($filesize < 0.1) { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||
} else { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
//判断文件类型并作处理 | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
$line = "<tr> | |||
<td><a href='select_media.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td colspan='2'>当前目录:$activepath</td> | |||
</tr>"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href=select_media.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(swf|fly|fla|flv)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_flash.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(wmv|avi)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_video.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(rm|rmvb|mp3|mp4)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_rm.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(mp3|wma)#", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_music.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
<body class="p-3"> | |||
<div class="card shadow-sm mb-3"> | |||
<div class="card-body"> | |||
<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;?>"> | |||
<input type="file" name="uploadfile"> | |||
<button type="submit" class="btn btn-success btn-sm">上传</button> | |||
</form> | |||
</div> | |||
</div> | |||
<div class="card shadow-sm"> | |||
<div class="card-header">选择多媒体</div> | |||
<div class="card-body"> | |||
<div class="table-responsive"> | |||
<table class="table table-borderless icon"> | |||
<thead> | |||
<tr> | |||
<td scope="col">文件名称</td> | |||
<td scope="col">文件大小</td> | |||
<td scope="col">修改时间</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = ''; | |||
$ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
if ($filesize < 0.1) { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||
} else { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
//判断文件类型并作处理 | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
$line = "<tr> | |||
<td><a href='select_media.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td colspan='2'>当前目录:$activepath</td> | |||
</tr>"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href=select_media.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(swf|fly|fla|flv)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_flash.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(wmv|avi)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_video.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(rm|rmvb|mp3|mp4)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_rm.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(mp3|wma)#", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_music.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} | |||
?> | |||
</tbody> | |||
</table> | |||
</div> | |||
} | |||
?> | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -44,106 +44,104 @@ if (!empty($noeditor)) { | |||
<html> | |||
<head> | |||
<meta charset="utf-8"> | |||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |||
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"> | |||
<title>选择软件</title> | |||
<link rel="stylesheet" href="/static/web/css/font-awesome.min.css"> | |||
<link rel="stylesheet" href="/static/web/css/bootstrap.min.css"> | |||
<link rel="stylesheet" href="/static/web/css/admin.css"> | |||
</head> | |||
<body> | |||
<div class="upload-bg"> | |||
<div class="card shadow-sm"> | |||
<div class="card-header">选择软件</div> | |||
<div class="card-body"> | |||
<div class="table-responsive"> | |||
<table class="table table-borderless icon"> | |||
<thead> | |||
<tr> | |||
<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"> | |||
<label>改名:<input type="text" name="newname" class="admin-input-sm"></label> | |||
<button type="submit" class="btn btn-success btn-sm">保存</button> | |||
</form> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="col">文件名称</td> | |||
<td scope="col">文件大小</td> | |||
<td scope="col">修改时间</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = $ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
if ($filesize < 0.1) { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||
} else { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
//判断文件类型并作处理 | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
$line = "<tr> | |||
<td><a href='select_soft.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td colspan='2'>当前目录:$activepath</td> | |||
</tr>\r\n"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href=select_soft.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(zip|rar|tgr.gz)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_zip.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_exe.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} | |||
<body class="p-3"> | |||
<div class="card shadow-sm mb-3"> | |||
<div class="card-body"> | |||
<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"> | |||
<label>重命名:<input type="text" name="newname" class="admin-input-sm"></label> | |||
<button type="submit" class="btn btn-success btn-sm">保存</button> | |||
</form> | |||
</div> | |||
</div> | |||
<div class="card shadow-sm"> | |||
<div class="card-header">选择软件</div> | |||
<div class="card-body"> | |||
<div class="table-responsive"> | |||
<table class="table table-borderless icon"> | |||
<thead> | |||
<tr> | |||
<td scope="col">文件名称</td> | |||
<td scope="col">文件大小</td> | |||
<td scope="col">修改时间</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = $ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
if ($filesize < 0.1) { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||
} else { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
//判断文件类型并作处理 | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
$line = "<tr> | |||
<td><a href='select_soft.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td colspan='2'>当前目录:$activepath</td> | |||
</tr>\r\n"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href=select_soft.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(zip|rar|tgr.gz)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_zip.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_exe.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} | |||
?> | |||
</tbody> | |||
</table> | |||
</div> | |||
} | |||
?> | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -35,153 +35,151 @@ if (empty($comeback)) { | |||
<html> | |||
<head> | |||
<meta charset="utf-8"> | |||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |||
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"> | |||
<title>选择模板</title> | |||
<link rel="stylesheet" href="/static/web/css/font-awesome.min.css"> | |||
<link rel="stylesheet" href="/static/web/css/bootstrap.min.css"> | |||
<link rel="stylesheet" href="/static/web/css/admin.css"> | |||
</head> | |||
<body > | |||
<div class="upload-bg"> | |||
<div class="card shadow-sm"> | |||
<div class="card-header">选择模板</div> | |||
<div class="card-body"> | |||
<div class="table-responsive"> | |||
<table class="table table-borderless icon"> | |||
<thead> | |||
<tr> | |||
<td colspan="3"> | |||
<form name="myform" action="select_templets_post.php" method="POST" enctype="multipart/form-data"> | |||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | |||
<input type="hidden" name="f" value="<?php echo $f ?>"> | |||
<input type="hidden" name="job" value="upload"> | |||
<input type="file" name="uploadfile"> | |||
<label>改名:<input type="text" name="filename" class="admin-input-sm"></label> | |||
<button type="submit" class="btn btn-success btn-sm">保存</button> | |||
</form> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="col">文件名称</td> | |||
<td scope="col">文件大小</td> | |||
<td scope="col">修改时间</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = ''; | |||
$ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
if ($filesize < 0.1) { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||
} else { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
//判断文件类型并作处理 | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#", "", $activepath); | |||
$line = "<tr> | |||
<td><a href='select_templets.php?f=$f&activepath=".urlencode($tmp)."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td colspan='2'>当前目录:$activepath</td> | |||
</tr>\r\n"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href=select_templets.php?f=$f&activepath=".urlencode("$activepath/$file")."><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(htm|html)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_htm.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(css)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_css.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(js)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_js.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(jpg)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='$reurl'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(gif|png)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='$reurl'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(txt)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_text.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td></tr>"; | |||
echo "$line"; | |||
<body class="p-3"> | |||
<div class="card shadow-sm mb-3"> | |||
<div class="card-body"> | |||
<form name="myform" action="select_templets_post.php" method="POST" enctype="multipart/form-data"> | |||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | |||
<input type="hidden" name="f" value="<?php echo $f ?>"> | |||
<input type="hidden" name="job" value="upload"> | |||
<input type="file" name="uploadfile"> | |||
<label>重命名:<input type="text" name="filename" class="admin-input-sm"></label> | |||
<button type="submit" class="btn btn-success btn-sm">保存</button> | |||
</form> | |||
</div> | |||
</div> | |||
<div class="card shadow-sm"> | |||
<div class="card-header">选择模板</div> | |||
<div class="card-body"> | |||
<div class="table-responsive"> | |||
<table class="table table-borderless icon"> | |||
<thead> | |||
<tr> | |||
<td scope="col">文件名称</td> | |||
<td scope="col">文件大小</td> | |||
<td scope="col">修改时间</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = ''; | |||
$ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
if ($filesize < 0.1) { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||
} else { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
//判断文件类型并作处理 | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#", "", $activepath); | |||
$line = "<tr> | |||
<td><a href='select_templets.php?f=$f&activepath=".urlencode($tmp)."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td colspan='2'>当前目录:$activepath</td> | |||
</tr>\r\n"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href=select_templets.php?f=$f&activepath=".urlencode("$activepath/$file")."><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(htm|html)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_htm.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(css)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_css.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(js)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_js.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(jpg)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='$reurl'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(gif|png)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='$reurl'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(txt)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_text.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td></tr>"; | |||
echo "$line"; | |||
} | |||
?> | |||
</tbody> | |||
</table> | |||
</div> | |||
} | |||
?> | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -28,7 +28,7 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) | |||
//当前选中的栏目 | |||
if ($selid > 0) { | |||
$row = $dsql->GetOne("SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE id='$selid'"); | |||
if ($row['ispart'] == 1) $OptionArrayList .= "<option value='".$row['id']."' class='option1' selected='selected'>".$row['typename']."(封面栏目)</option>"; | |||
if ($row['ispart'] == 1) $OptionArrayList .= "<option value='".$row['id']."' class='opt-ion1' selected='selected'>".$row['typename']."(封面栏目)</option>"; | |||
else $OptionArrayList .= "<option value='".$row['id']."' selected='selected'>".$row['typename']."</option>"; | |||
} | |||
//是否限定会员管理的栏目 | |||
@@ -60,16 +60,16 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) | |||
$sonCats = ''; | |||
LogicGetOptionArray($row->id, '─', $channeltype, $dsql, $sonCats); | |||
if ($sonCats != '') { | |||
if ($row->ispart == 1) $OptionArrayList .= "<option value='".$row->id."' class='option1'>".$row->typename." - 封面栏目</option>"; | |||
else if ($row->ispart == 2) $OptionArrayList .= "<option value='".$row->id."' class='option1'>".$row->typename." - 外部栏目</option>"; | |||
else if (empty($channeltype) && $row->ispart != 0) $OptionArrayList .= "<option value='".$row->id."' class='option2'>".$row->typename."-".$channels[$row->channeltype]."</option>"; | |||
else $OptionArrayList .= "<option value='".$row->id."' class='option3'>".$row->typename."</option>"; | |||
if ($row->ispart == 1) $OptionArrayList .= "<option value='".$row->id."' class='opt-ion1'>".$row->typename." - 封面栏目</option>"; | |||
else if ($row->ispart == 2) $OptionArrayList .= "<option value='".$row->id."' class='opt-ion1'>".$row->typename." - 外部栏目</option>"; | |||
else if (empty($channeltype) && $row->ispart != 0) $OptionArrayList .= "<option value='".$row->id."' class='opt-ion2'>".$row->typename."-".$channels[$row->channeltype]."</option>"; | |||
else $OptionArrayList .= "<option value='".$row->id."' class='opt-ion3'>".$row->typename."</option>"; | |||
$OptionArrayList .= $sonCats; | |||
} else { | |||
if ($row->ispart == 0 && (!empty($channeltype) && $row->channeltype == $channeltype)) { | |||
$OptionArrayList .= "<option value='".$row->id."' class='option3'>".$row->typename."</option>"; | |||
$OptionArrayList .= "<option value='".$row->id."' class='opt-ion3'>".$row->typename."</option>"; | |||
} else if ($row->ispart == 0 && empty($channeltype)) { | |||
$OptionArrayList .= "<option value='".$row->id."' class='option3'>".$row->typename."</option>"; | |||
$OptionArrayList .= "<option value='".$row->id."' class='opt-ion3'>".$row->typename."</option>"; | |||
} | |||
} | |||
} | |||
@@ -85,9 +85,9 @@ function LogicGetOptionArray($id, $step, $channeltype, &$dsql, &$sonCats) | |||
continue; | |||
} | |||
if ($row->channeltype == $channeltype && $row->ispart == 1) { | |||
$sonCats .= "<option value='".$row->id."' class='option1'>└$step ".$row->typename."</option>"; | |||
$sonCats .= "<option value='".$row->id."' class='opt-ion1'>└$step ".$row->typename."</option>"; | |||
} else if (($row->channeltype == $channeltype && $row->ispart == 0) || empty($channeltype)) { | |||
$sonCats .= "<option value='".$row->id."' class='option3'>└$step ".$row->typename."</option>"; | |||
$sonCats .= "<option value='".$row->id."' class='opt-ion3'>└$step ".$row->typename."</option>"; | |||
} | |||
LogicGetOptionArray($row->id, $step.'─', $channeltype, $dsql, $sonCats); | |||
} | |||
@@ -75,7 +75,7 @@ | |||
<td colspan="3"> | |||
<input type="text" name="picname" id="picname" class="admin-input-lg"> | |||
<label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label> | |||
<span class="btn btn-success btn-sm fileinput-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button> | |||
<button type="button" id="btnClearAll" class="btn btn-sm btn-success delete">清空</button> | |||
<img src="/static/web/img/thumbnail.jpg" id="litPic" class="thumbnail-md ml-3"> | |||
@@ -163,7 +163,7 @@ | |||
</tr> | |||
<tr> | |||
<td>本地上传</td> | |||
<td colspan="3"><span class="btn btn-success btn-sm fileinput-button">上传多图<input type="file" name="files[]" id="iptAlbumImages" multiple></span></td> | |||
<td colspan="3"><span class="btn btn-success btn-sm opt-button">上传多图<input type="file" name="files[]" id="iptAlbumImages" multiple></span></td> | |||
</tr> | |||
<tr id="handfield"> | |||
<td colspan="4"><div id="gallery"></div></td> | |||
@@ -76,7 +76,7 @@ | |||
<td colspan="3"> | |||
<input type="text" name="picname" id="picname" value="<?php echo $arcRow['litpic']?>" class="admin-input-lg"> | |||
<label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label> | |||
<span class="btn btn-success btn-sm fileinput-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button> | |||
<button type="button" id="btnClearAll" class="btn btn-success btn-sm">清空</button> | |||
<img src="<?php if ($arcRow['litpic']!='') echo $arcRow['litpic']; else echo '/static/web/img/thumbnail.jpg';?>" id="litPic" class="thumbnail-md ml-3"> | |||
@@ -182,7 +182,7 @@ | |||
$fhtml .= "<input type='hidden' name='imgddurl{$j}' value='{$litimg}'>"; | |||
$fhtml .= "<div class='atlas-head'><img src='{$litimg}' id='lit{$j}'></div>"; | |||
$fhtml .= "<div class='atlas-body'><input type='text' name='imgmsg{$j}' value='".$ctag->GetAtt('text')."' class='atlas-input' placeholder='请输入图片注释'></div>"; | |||
$fhtml .= "<div class='atlas-foot'><span class='btn btn-success btn-sm fileinput-button'>更换<input type='file' name='imgfile{$j}' for='item{$j}' class='atlasedit'></span><a href=\"javascript:delAlbPicOld('$bigimg',$j)\" class=\"btn btn-danger btn-sm\">删除</a></div>"; | |||
$fhtml .= "<div class='atlas-foot'><span class='btn btn-success btn-sm opt-button'>更换<input type='file' name='imgfile{$j}' for='item{$j}' class='atlasedit'></span><a href=\"javascript:delAlbPicOld('$bigimg',$j)\" class=\"btn btn-danger btn-sm\">删除</a></div>"; | |||
$fhtml .= "</div>"; | |||
echo $fhtml; | |||
$j++; | |||
@@ -197,7 +197,7 @@ | |||
</tr> | |||
<tr> | |||
<td>本地上传</td> | |||
<td colspan="3"><span class="btn btn-success btn-sm fileinput-button">上传多图<input type="file" name="files[]" id="iptAlbumImages" multiple></span></td> | |||
<td colspan="3"><span class="btn btn-success btn-sm opt-button">上传多图<input type="file" name="files[]" id="iptAlbumImages" multiple></span></td> | |||
</tr> | |||
<tr> | |||
<td colspan="4"> | |||
@@ -71,7 +71,7 @@ | |||
<td colspan="3"> | |||
<input type="text" name="picname" id="picname" class="admin-input-lg"> | |||
<label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label> | |||
<span class="btn btn-success btn-sm fileinput-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button> | |||
<button type="button" id="btnClearAll" class="btn btn-success delete">清空</button> | |||
<img src="/static/web/img/thumbnail.jpg" id="litPic" class="thumbnail-md ml-3"> | |||
@@ -72,7 +72,7 @@ | |||
<td colspan="3"> | |||
<input name="picname" type="text" id="picname" value="<?php echo $arcRow['litpic']?>" class="admin-input-lg"> | |||
<label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label> | |||
<span class="btn btn-success btn-sm fileinput-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button> | |||
<button id="btnClearAll" type="button" class="btn btn-success btn-sm">清空</button> | |||
<img src="<?php if ($arcRow['litpic']!='') echo $arcRow['litpic']; else echo '/static/web/img/thumbnail.jpg';?>" id="litPic" class="thumbnail-md ml-3"> | |||
@@ -58,7 +58,7 @@ | |||
<td colspan="3"> | |||
<input type="text" name="picname" id="picname" class="admin-input-lg"> | |||
<label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label> | |||
<span class="btn btn-success btn-sm fileinput-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button> | |||
<button type="button" id="btnClearAll" class="btn btn-success btn-sm">清空</button> | |||
<img src="/static/web/img/thumbnail.jpg" id="litPic" class="thumbnail-md ml-3"> | |||
@@ -62,7 +62,7 @@ | |||
<td colspan="3"> | |||
<input type="text" name="picname" id="picname" class="admin-input-lg" value="<?php echo $addRow['litpic']?>"> | |||
<label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label> | |||
<span class="btn btn-success btn-sm fileinput-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button> | |||
<button type="button" id="btnClearAll" class="btn btn-success btn-sm">清空</button> | |||
<img src="<?php if ($addRow['litpic']!='') echo $addRow['litpic']; else echo '/static/web/img/thumbnail.jpg';?>" id="litPic" class="thumbnail-md ml-3"> | |||
@@ -70,7 +70,7 @@ | |||
<td colspan="3"> | |||
<input type="text" name="picname" id="picname" class="admin-input-lg"> | |||
<label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label> | |||
<span class="btn btn-success btn-sm fileinput-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button> | |||
<button type="button" id="btnClearAll" class="btn btn-success btn-sm">清空</button> | |||
<img src="/static/web/img/thumbnail.jpg" id="litPic" class="thumbnail-md ml-3"> | |||
@@ -77,7 +77,7 @@ | |||
<td colspan="3"> | |||
<input type="text" name="picname" id="picname" value="<?php echo $arcRow['litpic']?>" class="admin-input-lg"> | |||
<label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label> | |||
<span class="btn btn-success btn-sm fileinput-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button> | |||
<button id="btnClearAll" type="button" class="btn btn-success btn-sm">清空</button> | |||
<img src="<?php if ($arcRow['litpic']!='') echo $arcRow['litpic']; else echo '/static/web/img/thumbnail.jpg';?>" id="litPic" class="thumbnail-md ml-3"> | |||
@@ -87,7 +87,7 @@ | |||
<td colspan="3"> | |||
<input type="text" name="picname" id="picname" class="admin-input-lg"> | |||
<label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label> | |||
<span class="btn btn-success btn-sm fileinput-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button> | |||
<button type="button" id="btnClearAll" class="btn btn-success btn-sm">清空</button> | |||
<img src="/static/web/img/thumbnail.jpg" id="litPic" class="thumbnail-md ml-3"> | |||
@@ -88,7 +88,7 @@ | |||
<td colspan="3"> | |||
<input type="text" name="picname" id="picname" value="<?php echo $arcRow['litpic']?>" class="admin-input-lg"> | |||
<label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label> | |||
<span class="btn btn-success btn-sm fileinput-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button> | |||
<button type="button" id="btnClearAll" class="btn btn-success btn-sm">清空</button> | |||
<img src="<?php if ($arcRow['litpic']!='') echo $arcRow['litpic']; else echo '/static/web/img/thumbnail.jpg';?>" id="litPic" class="thumbnail-md ml-3"> | |||
@@ -99,7 +99,7 @@ | |||
<td colspan="3"> | |||
<input type="text" name="picname" id="picname" class="admin-input-lg"> | |||
<label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label> | |||
<span class="btn btn-success btn-sm fileinput-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button> | |||
<button type="button" id="btnClearAll" class="btn btn-success btn-sm">清空</button> | |||
<img id="litPic" src="/static/web/img/thumbnail.jpg" id="litPic" class="thumbnail-md ml-3"> | |||
@@ -98,7 +98,7 @@ | |||
<td colspan="3"> | |||
<input type="text" name="picname" id="picname" value="<?php echo $arcRow['litpic']?>" class="admin-input-lg"> | |||
<label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label> | |||
<span class="btn btn-success btn-sm fileinput-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span> | |||
<button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button> | |||
<button type="button" id="btnClearAll" class="btn btn-success btn-sm">清空</button> | |||
<img id="litPic" src="<?php if ($arcRow['litpic']!='') echo $arcRow['litpic']; else echo '/static/web/img/thumbnail.jpg';?>" id="litPic" class="thumbnail-md ml-3"> | |||
@@ -187,27 +187,27 @@ | |||
if ($topvalue % 500 != 0) $arr['issign'] = 2; | |||
?> | |||
<div class="card shadow-sm mb-3"> | |||
<div class="card-body"> | |||
<form action="stepselect_main.php" method="post"> | |||
<input type="hidden" name="action" value="addenum_save"> | |||
<input type="hidden" name="issign" value="<?php echo $arr['issign'];?>"> | |||
<input type="hidden" name="egroup" value="<?php echo $arr['egroup'];?>"> | |||
<select name="topvalue" onChange="ChangePage2(this);" class="admin-input-sm mr-2"> | |||
<option value="0"><?php echo $selgroup;?></option> | |||
<?php echo $options;?> | |||
</select> | |||
<input type="text" name="ename" class="admin-input-lg" placeholder="请填分类名称"> | |||
<button type="submit" class="btn btn-success btn-sm">添加分类</button> | |||
<?php if ($egroup=='nativeplace') {echo "<a href='stepselect_main.php?action=exarea' class='btn btn-success btn-sm'>导入默认地区</a>";}?> | |||
</form> | |||
</div> | |||
</div> | |||
<div class="card shadow-sm"> | |||
<div class="card-header"><?php echo $selgroup;?></div> | |||
<div class="card-body"> | |||
<div class="table-responsive"> | |||
<table class="table table-borderless table-hover"> | |||
<thead> | |||
<tr> | |||
<td colspan="8"> | |||
<form action="stepselect_main.php" method="post"> | |||
<input type="hidden" name="action" value="addenum_save"> | |||
<input type="hidden" name="issign" value="<?php echo $arr['issign'];?>"> | |||
<input type="hidden" name="egroup" value="<?php echo $arr['egroup'];?>"> | |||
<select name="topvalue" onChange="ChangePage2(this);" class="admin-input-sm mr-2"> | |||
<option value="0"><?php echo $selgroup;?></option> | |||
<?php echo $options;?> | |||
</select> | |||
<input type="text" name="ename" class="admin-input-lg" placeholder="请填分类名称"> | |||
<button type="submit" class="btn btn-success btn-sm">添加分类</button> | |||
<?php if ($egroup=='nativeplace') {echo "<a href='stepselect_main.php?action=exarea' class='btn btn-success btn-sm'>导入默认地区</a>";}?> | |||
</form> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="col">选择</td> | |||
<td scope="col">id</td> | |||
@@ -587,10 +587,6 @@ body.menu-show .body-right { | |||
display:flex; | |||
flex-wrap:wrap | |||
} | |||
.upload-bg { | |||
margin:1rem; | |||
background:var(--white) | |||
} | |||
.w-65 { | |||
width:65% | |||
} | |||
@@ -625,6 +621,10 @@ body.menu-show .body-right { | |||
margin-bottom:0; | |||
color:var(--gray) | |||
} | |||
.table.icon img { | |||
width:20px; | |||
height:20px | |||
} | |||
.table th,.table td { | |||
padding:0.5rem 1rem 0.5rem 0; | |||
vertical-align:middle | |||
@@ -636,25 +636,42 @@ body.menu-show .body-right { | |||
font-size:14px!important; | |||
color:inherit | |||
} | |||
.icon img { | |||
width:20px; | |||
height:20px | |||
.opt .list { | |||
display:inline-block; | |||
margin-right:1rem; | |||
margin-bottom:1rem; | |||
padding:1rem; | |||
width:134px; | |||
background:var(--light); | |||
text-align:center | |||
} | |||
.opt .list img { | |||
display:block; | |||
margin:0 auto 1rem; | |||
max-width:89px; | |||
max-height:50px | |||
} | |||
.opt .list span { | |||
display:block; | |||
overflow:hidden; | |||
text-overflow:ellipsis; | |||
white-space:nowrap | |||
} | |||
.option1 { | |||
.opt-ion1 { | |||
background:var(--gray-300) | |||
} | |||
.option2 { | |||
.opt-ion2 { | |||
background:var(--gray-500) | |||
} | |||
.option3 { | |||
.opt-ion3 { | |||
background:var(--white) | |||
} | |||
.fileinput-button { | |||
.opt-button { | |||
display:inline-block; | |||
position:relative; | |||
overflow:hidden | |||
} | |||
.fileinput-button input { | |||
.opt-button input { | |||
position:absolute; | |||
top:0; | |||
right:0; | |||
@@ -724,7 +741,7 @@ span.page-link { | |||
color:var(--white); | |||
background:var(--green) | |||
} | |||
input,select,textarea,.upload-bg,.colordlg,.pubdlg,.quickselitem .topcat,.mysource,.mywriter,#edsta,.cke_chrome,.cke_inner,.pagination,.card,.form-control,.btn,.alert,.rounded { | |||
input,select,textarea,.upload-bg,.colordlg,.pubdlg,.quickselitem .topcat,.mysource,.mywriter,.opt .list,#edsta,.cke_chrome,.cke_inner,.pagination,.card,.form-control,.btn,.alert,.rounded { | |||
border-radius:var(--b-radius)!important | |||
} | |||
.cke_top { | |||
@@ -171,7 +171,7 @@ class TypeLink | |||
$row = $this->dsql->GetOne("SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE id='$hid'"); | |||
$channeltype = $row['channeltype']; | |||
if ($row['ispart'] == 1) { | |||
$this->OptionArrayList .= "<option value='".$row['id']."' class='option1' selected>".$row['typename']."</option>\r\n"; | |||
$this->OptionArrayList .= "<option value='".$row['id']."' class='opt-ion1' selected>".$row['typename']."</option>\r\n"; | |||
} else { | |||
$this->OptionArrayList .= "<option value='".$row['id']."' selected>".$row['typename']."</option>\r\n"; | |||
} | |||
@@ -205,7 +205,7 @@ class TypeLink | |||
while ($row = $this->dsql->GetObject()) { | |||
if ($row->id != $hid) { | |||
if ($row->ispart == 1) { | |||
$this->OptionArrayList .= "<option value='".$row->id."' class='option1'>".$row->typename."</option>\r\n"; | |||
$this->OptionArrayList .= "<option value='".$row->id."' class='opt-ion1'>".$row->typename."</option>\r\n"; | |||
} else { | |||
$this->OptionArrayList .= "<option value='".$row->id."'>".$row->typename."</option>\r\n"; | |||
} | |||
@@ -234,7 +234,7 @@ class TypeLink | |||
if (!in_array($row->id, $oper)) continue; | |||
} | |||
if ($row->ispart == 1) { | |||
$this->OptionArrayList .= "<option value='".$row->id."' class='option1'>└$step ".$row->typename."</option>\r\n"; | |||
$this->OptionArrayList .= "<option value='".$row->id."' class='opt-ion1'>└$step ".$row->typename."</option>\r\n"; | |||
} else { | |||
$this->OptionArrayList .= "<option value='".$row->id."'>└$step ".$row->typename."</option>\r\n"; | |||
} | |||