i want host my UPLOAD ATCHMENT in imagehost how to?

Started by ridwans, May 29, 2006, 02:01:23 AM

Previous topic - Next topic

ridwans

hai all
im from indonesia
i new in SMF forum
i want to MY UPLOAD FILE go to imagehack.us [nofollow]
i have code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ImageShack® - Hosting</title>
<link rel="stylesheet" href="img/style-def.css" type="text/css">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<script type="text/javascript">

var url = "http://imageshack.us/";
var title = "ImageShack.us® - Image Hosting";

function highlight(field) {
field.focus();
  field.select();
}

function phpbb(){
   window.open ('phpbb.php', 'phpbb', config='height=450, width=720, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no');
}

function vb(){
   window.open ('vb.php', 'vb', config='height=450, width=720, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no');
}

function sm(){
   window.open ('sm.php', 'sm', config='height=450, width=720, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no');
}

function ipb(){
   window.open ('ipb.php', 'ipb', config='height=450, width=720, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no');
}

function favorites(){
if(document.all)
window.external.AddFavorite(url,title)
}

function disableme (what) {
what = document.getElementById(what);
what.disabled = true;
what.value="uploading...";
}


function validateForm(theForm)
{

    if (theForm.name.value=="" ||theForm.email.value=="" ||theForm.subj.value=="" ||theForm.idea.value==""||theForm.email.value.indexOf("@")==-1 || theForm.email.value.indexOf(".") == -1) {
                alert("ERROR: Either you did not fill the form out to completion, or your email address is incorrect.");
                return false;
        }

    if (theForm.corr.selectedIndex==0) {
                alert("You must select a 'Reason for Email' from the drop-down box.");
                return false;
        }

if (theForm.corr.selectedIndex==1 && theForm.idea.value.indexOf("http://")==-1) {
                 alert("You must include at least one link or URL pertaining to your request in the body of your email.\n The link or URL must begin with http://");
                 return false;
         }


}

var buttonname = '"Browse..."';
function showoptions(what) {
var ext = what.value.substr(what.value.length - 3,3).toLowerCase();
switch (ext) {
case 'jpg':
case 'peg':
case 'png':
case 'gif':
case 'bmp':
case 'tif':
case 'iff':
document.getElementById('resizeoptions').style.display='';
document.getElementById('filetypeerror').style.display='none';
document.getElementById('butan').disabled=false;
document.getElementById('butan').value='host it!';
break;
case 'swf':
document.getElementById('resizeoptions').style.display='none';
document.getElementById('filetypeerror').style.display='none';
document.getElementById('butan').disabled=false;
document.getElementById('butan').value='host it!';
break;
case '':
document.getElementById('butan').disabled=true;
document.getElementById('butan').value=buttonname;
default:
document.getElementById('resizeoptions').style.display='none';
document.getElementById('filetypeerror').style.display='';
document.getElementById('butan').disabled=true;
document.getElementById('butan').value='bad file type';
break;
}
}

function doload() {
what = document.getElementById('butan');
if (document.getElementById('fileupload').value == '') {
what.disabled=true;
what.value = 'select an image using ' + buttonname;
document.getElementById('resizeoptions').style.display='none';
}
document.getElementById('optsize').disabled = !document.getElementById('optimage').checked;
}

function toggleuploadmode(file) {
if (file) {
document.getElementById('upfile').style.display='block';
document.getElementById('upurl').style.display='none';
document.getElementById('upform').action='http://www.imageshack.us/index.php';
} else {
document.getElementById('upfile').style.display='none';
document.getElementById('upurl').style.display='block';
document.getElementById('upform').action='http://www.imageshack.us/transload.php';
}
}

function focusfield(fl) {
if (fl.value=="paste image url here") {
fl.value='';
fl.style.color='black';
}
}



-->
</script>

</head>
<body bgcolor="#F7F7F7">
<div class="don" style="color: #ccc">&nbsp;</div><table cellpadding="5" width="760" border="1" bordercolor="#CCCCCC" class="table_decoration" align="center"><tr><td valign="top">
<form method="post" action="http://imageshack.us/" enctype="multipart/form-data" onsubmit="disableme('butan')" id="upform">
<table cellspacing="0" cellpadding="0" border="0"><tr>

<td><p style="font-size: 11px;">upload: <input type="radio" name="uploadtype" onclick="toggleuploadmode(true);" checked>
file <input type="radio" name="uploadtype" onclick="toggleuploadmode(false);"> url</p></td>

<td width="2">&nbsp;</td>

<td><div id="upfile"><input type="file" name="fileupload" size="30" onchange="showoptions(this)" id="fileupload"></div>
<div id="upurl" style="display: none"><input type="text" id="fileupload" value="paste image url here" style="color: #888;"
onfocus="focusfield(this)" name="url" size="30"></div></td>

</tr></table>


<input type="hidden" name="MAX_FILE_SIZE" value="3145728">
<input type="hidden" name="refer" value="">
<input type="hidden" name="brand" value="">

<div id="resizeoptions">
  <input type="checkbox" name="optimage" id="optimage" value="1"  onclick="optsize.disabled=!this.checked">
Mengubah ukuran&nbsp;
  <select name="optsize" id="optsize">
    <option value="100x100" >100x75 (avatar)</option>
    <option value="150x150" >150x112 (thumbnail)</option>
    <option value="320x320" selected>320x240 (for websites and email)</option>
    <option value="640x640" >640x480 (for message boards)</option>
    <option value="800x800" >800x600 (15-inch monitor)</option>
    <option value="1024x1024" >1024x768 (17-inch monitor)</option>
    <option value="1280x1280" >1280x1024 (19-inch monitor)</option>
    <option value="1600x1600" >1600x1200 (21-inch monitor)</option>
    <option value="resample" >optimize without resizing</option>
  </select><br />


  <input type="checkbox" name="rembar" value="1" > hapus ukuran</div>

<div id="filetypeerror" style="display: none"> <b style="color: red;">Please
select only one of the supported file types:</b><br /></div>
<p>allowed: <b>jpg jpeg png gif bmp tif tiff swf</b>, less than <b>1024
kilobytes</b>.</p>

<input id="butan" style="width:150px" type="submit" value="Upload sekarang!">&nbsp;&nbsp;&nbsp;&nbsp;</form></td></tr></table>



and then
i want insert include 'uploadku.php'
where i can insert that?
in post i want like that when i post anything

can somebody help me?


Advertisement: