📄 image.php
字号:
<?php
require_once(dirname(__FILE__).'/../../../dialog/config.php');
require_once(dirname(__FILE__).'/../../../image.func.php');
if(empty($dopost)) $dopost = '';
if(empty($imgwidthValue)) $imgwidthValue = 400;
if(empty($imgheightValue)) $imgheightValue = 300;
if(empty($urlValue)) $urlValue = '';
if(empty($imgsrcValue)) $imgsrcValue = '';
if(empty($imgurl)) $imgurl = '';
if(empty($dd)) $dd = '';
$imgHtml = '';
if($dopost=='upload')
{
$imgHtml = "<center>\r\n";
$oknum = 0;
for($i=1; $i <= $totalform; $i++)
{
$imgfile = ${'imgfile'.$i};
if(!is_uploaded_file($imgfile))
{
continue;
}
else
{
$imgfile_name = ${'imgfile'.$i.'_name'};
$imgfile_type = ${'imgfile'.$i.'_type'};
}
if(!eregi("\.(jpg|gif|png|bmp)$",$imgfile_name)) {
continue;
}
$sparr = Array('image/pjpeg','image/jpeg','image/gif','image/png','image/xpng','image/wbmp');
$imgfile_type = strtolower(trim($imgfile_type));
if(!in_array($imgfile_type,$sparr)) {
continue;
}
$nowtme = time();
$y = MyDate('ymd',$nowtme);
$filename = $cuserLogin->getUserID().'_'.MyDate('His',$nowtme).'_'.$i;
if(!is_dir($cfg_basedir.$cfg_medias_dir."/$y"))
{
MkdirAll($cfg_basedir.$cfg_medias_dir."/$y",0777);
CloseFtp();
}
$fs = explode('.',$imgfile_name);
if(eregi("php|asp|pl|shtml|jsp|cgi",$fs[count($fs)-1])) {
continue;
}
$bfilename = $cfg_medias_dir."/$y/".$filename.".".$fs[count($fs)-1];
$litfilename = $cfg_medias_dir."/$y/".$filename."_lit.".$fs[count($fs)-1];
$dbbigfile = $filename.".".$fs[count($fs)-1];
$dblitfile = $filename."_lit.".$fs[count($fs)-1];
$fullfilename = $cfg_basedir.$bfilename;
$full_litfilename = $cfg_basedir.$litfilename;
if(file_exists($fullfilename)) {
ShowMsg("鏈
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -