📄 img.php
字号:
<?php
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />\r\n<LINK rel=\"stylesheet\" type=\"text/css\" href=\"dialog.css\">\r\n<title>图片</title>\r\n";
echo "<s";
echo "tyle type=\"text/css\">\r\n<!--\r\nbody {\r\n\tmargin-left: 0px;\r\n\tmargin-top: 0px;\r\n\tmargin-right: 0px;\r\n\tmargin-bottom: 0px;\r\n}\r\n-->\r\n</style>\r\n";
echo "<s";
echo "cript>\r\n//lxl 2006-6-15 增加上传图片的功能\r\nfunction setimg() {\r\n\tvar imgobj=window.parent.document.getElementById(\"imageshow\");\r\n\tvar urlobj = window.parent.document.getElementById(\"url\");\r\n\tvar upimgpbj = document.all.uploadfile;\r\n\tif(upimgpbj.value!=\"\"){\r\n\t imgobj.src=upimgpbj.value;\r\n\t\tif (imgobj.width > 100 ) {\r\n\t\t \r\n\t\t imgscale = imgobj.width/100;\r\n\t\t\timgwidth = 100;\r\n\t\t\timgheight ";
echo "= imgobj.height/imgscale;\r\n\t\t\t\r\n\t\t imgobj.width = imgwidth;\r\n\t\t\timgobj.height = imgheight;\t\t\r\n\t\t}\r\n\t}\r\n\telse if (urlobj.value != \"\"){\r\n\t imgobj.src=urlobj.value;\r\n\t\tif (imgobj.width > 100 ) {\r\n\t\t \r\n\t\t imgscale = imgobj.width/100;\r\n\t\t\timgwidth = 100;\r\n\t\t\timgheight = imgobj.height/imgscale;\r\n\t\t\t\r\n\t\t imgobj.width = imgwidth;\r\n\t\t\timgobj.height = imgheight;\r\n\t\t}\r\n\t}\r\n}\r\nfunction CheckUpl";
echo "oad(){\r\n if (document.formup.uploadfile.value == ''){\r\n\t return false;\r\n\t}\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getUploadImg(url_value){\r\n\tvar imgobj = window.parent.document.getElementById(\"imageshow\");\r\n\tvar urlobj = window.parent.document.getElementById(\"url\");\r\n\turlobj.value = url_value;\r\n\timgobj.src = url_value;\r\n\r\n\tif (imgobj.width > 100 ) {\r\n\t\t\r\n\t\timgscale = imgobj.width/100;\r\n\t\timgwidth ";
echo "= 100;\r\n\t\timgheight = imgobj.height/imgscale;\r\n\t\t\r\n\t\timgobj.width = imgwidth;\r\n\t\timgobj.height = imgheight;\r\n\t}\r\n\t\t\t\r\n}\r\n";
if ( $_REQUEST['iurl'] != "" )
{
echo "getUploadImg('".$_REQUEST['iurl']."');";
}
if ( $_REQUEST['errmsg'] != "" )
{
}
echo "\r\n</script>\r\n\r\n\r\n</head>\r\n\r\n<body onMouseOver=\"setimg()\">\r\n<form name=\"formup\" enctype=\"multipart/form-data\" method=\"post\" onSubmit=\"return CheckUpload();\" action=\"upload.php\">\r\n <input name=\"uploadfile\" type=\"file\" onChange=\"setimg()\" id=\"uploadfile\" size=\"25\" />\r\n <input name=\"submit\" type=\"submit\" title=\"上传\" value=\"上传\" />\r\n</form>\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -