• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

mong admin, mod giúp minh về code upload ảnh

thanlaem

New Member
minh có code úp ảnh nhưng không có úp bằng url anh admin , mod giúp em thêm úp bằng url với
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http:/www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html>
<head>
<meta name="description" content="Up Anh Mien Phi" />
<meta name="keywords" content="uphinh, up anh, image hosting, photo upload" />
<meta name="copyright" content="(c) uploadanh.mobi" />
<meta name="author" content="Võ Phước Tiến" />
<meta name="email" content="ts2hmm@gmail.com" />
<meta name="Charset" content="UTF-8" />
<meta name="Distribution" content="Global" />
<meta name="Rating" content="General" />
<meta name="Robots" content="INDEX,FOLLOW" />
<link rel="shortcut icon" href="favico.ico">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="mobile.css" rel="stylesheet" type="text/css" />
<?
require_once("config.php");
print <<<EOF
<title>$title</title>
</head>
<body>
<div class="bodywrapping">
<div class="vpt_head"><a href="/"><span><i>Uploadanh<b>.Mobi</b></i></span></a></div>
<div class="navbar"><b>Upload ảnh online</b></div>
<div class="stas2">Chỉ tải lên ảnh dưới 2MB</div>


<form action="" enctype="multipart/form-data" method="post">
EOF;
for($i=1;$i<=5;$i++){
echo ("<div class='stas'><input type='file' name='file{$i}' class='submit'></div>");}
echo '<div class="stas1"><input id="btn" type="submit" class="submit" value="Upload ảnh"><input type="hidden" name="upanh" value="xong"></form></div>';
if($_POST['upanh']=="xong")
{
for($i=1;$i<=5;$i++){
$ten=$_FILES["file{$i}"]["name"];
$name=$file_name.$ten;
$tmp=$_FILES["file{$i}"]["tmp_name"];
$sizekb=round($_FILES["file{$i}"]['size']/1024,0);
$duoi=substr($_FILES["file{$i}"]['type'],0,5);
if ($duoi=="image"){
if($sizekb>$max_size){
echo ("<div class='titlebg'>Dung lượng giới hạn là 2MB. File <b>{$ten}</b> đã vượt quá giới hạn cho phép</div>");
}
elseif(move_uploaded_file($tmp,"$path/".$name)) {
echo <<<EOT
<div class="navbar">Tập tin <b><a href="$path/$name" target="_blank">$ten</a></b> đã upload thành công</div>
<div class="stas4"><a href="$path/$name" title="$name" target="_blank"><img src="$path/$name" title="$name" border="0"/></a></div>


<div class="titlebg">Thông tin</div>
<div class="stas">Tên file: <b>$name</b><br>Dung lượng: <b>$sizekb KB</b></div>
<div class="stas2">Chia sẻ hình</div>
<div class="stas">Link ảnh: <textarea wrap="virtual" name="message" rows="10" cols="10" style="height:30px;width:98%" tabindex="1">http://$url$path/$name</textarea></div>
<div class="stas">HTML: <textarea wrap="virtual" name="message" rows="10" cols="10" style="height:30px;width:98%" tabindex="1"><img src="http://$url$path/$name" border="0" /></textarea></div>
<div class="stas">FORUM: <textarea wrap="virtual" name="message" rows="10" cols="10" style="height:30px;width:98%" tabindex="1"></textarea></div>
EOT;
}}}}
?>
<div class=navbar><a href="index.php">Trang chủ</a></div>
<div class=stas align=center>Mobile Style &copy; 2012</div></div>
</body>
</html>
 

Facebook Comments

New posts New threads New resources

Back
Top