<?php
/**
 *      [eminer] (C)20013-2099 eminer Inc.
 *      This is NOT a freeware, use is subject to license terms
 *      $Id: upload.php  September 21, 2014, 9:17 am Hogan $
 */
require(dirname(__FILE__)."/config.php"); ee7f2ef84(); if(!empty($_FILES)){ if(!empty($_POST['old'])){ @unlink( rtrim($GLOBALS['eeb7bde66'],'/').$_POST['old']); } $ee10b8ccb='/data/watermarkimg/'; if($e51c696ba = e8822d5f5($_FILES,$GLOBALS['eeb7bde66'],$ee10b8ccb)){   $e41d0e770= $e51c696ba; $e32981a13 = ''; $e64e1e1cb = 'parent.document.getElementById'; $e32981a13 .= 'try{'.$e64e1e1cb.'("d'.$fid.'").src="'.$e41d0e770.'";}catch(e){}'; $e32981a13 .= $e64e1e1cb.'("'.$fid.'").value="'.$e41d0e770.'";'; $e32981a13 .= 'window.parent.cDialog();'; require(eminerADMIN."/templets/alert.html"); exit; }else{ $e41d0e770=''; echo"<script>alert('文件上传失败，请重试!'); window.history.back();</script>"; exit; } }else{ echo"<script>alert('请选择上传文件!');
		window.history.back();</script>"; exit; } function e8822d5f5($e3d5ab9bc,$e421693c0,$ee10b8ccb) { foreach($e3d5ab9bc as $e2081beeb) { if (!empty($e2081beeb['name'])) {  $eabf77184= end(explode('.', $e2081beeb['name'])); $name=$e2081beeb["name"]; $e7a6532cb=$e2081beeb["tmp_name"]; $e599dcce2=$e2081beeb["type"]; $ef7bd60b7=$e2081beeb["size"]; } } $eab051f0a=5000*1024;  if($name=="")  { echo"<script>alert('请先选择要上传的图片文件!');
		//window.history.back();</script>"; exit; } if($e599dcce2!="image/pjpeg" && $e599dcce2!="image/jpeg" && $e599dcce2!="image/gif")  { echo"<script>alert('上传文件只可以是JPEG或GIF类型的!');
		//window.history.back();</script>"; exit; } if($ef7bd60b7>$eab051f0a)  { echo"<script>alert('上传文件大小不能超过500K! ');
		//window.history.back();</script>"; exit; } $e51c696ba =$ee10b8ccb.'water_'.time().'_'.$name; $e421693c0=rtrim($e421693c0,'/'); if(move_uploaded_file($e7a6532cb,$e421693c0.$e51c696ba)) return $e51c696ba; else if (copy($e7a6532cb,$e421693c0.$e51c696ba)) return $e51c696ba; else return false; } ?>