Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 3 of 3

Thread: Need Help!

  1. #1
    Join Date
    Jul 2005
    Location
    North-East Scotland
    Posts
    4,885
    Tokens
    282

    Latest Awards:

    Default Need Help!

    OK this is the script for my upload.php and PNG files are the problem they don't work in IE but they do in FF can anyone think of a reason why
    PHP Code:
    <?
    include "header.php";
    ?>
    <?
    include "config.php";
    if (!isset(
    $HTTP_POST_FILES['userfile'])) exit;
    if (
    is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) {
    if (
    $HTTP_POST_FILES['userfile']['size']>$ms) {
    echo 
    "Your File Size is too big, please reduce the size and try again.<br>\n"; exit; }
    if((
    $HTTP_POST_FILES['userfile']['type']=="image/gif") || 
    (
    $HTTP_POST_FILES['userfile']['type']=="image/pjpeg") || ($HTTP_POST_FILES['userfile']['type']=="image/jpeg") || 
    (
    $HTTP_POST_FILES['userfile']['type']=="image/jpg") || 
    (
    $HTTP_POST_FILES['userfile']['type']=="image/jpg") || 
    (
    $HTTP_POST_FILES['userfile']['type']=="image/bmp") || 
    (
    $HTTP_POST_FILES['userfile']['type']=="image/JPEG") ||
    (
    $HTTP_POST_FILES['userfile']['type']=="image/PNG") ||
    (
    $HTTP_POST_FILES['userfile']['type']=="image/png")) {
    if (
    file_exists("./".$path $HTTP_POST_FILES['userfile']['name'])) {
    echo 
    "File name exists please rename then try again.<br>\n"; exit; }
    $zufall rand(1,99999);
    $fupl "$zufall";
    $res copy($HTTP_POST_FILES['userfile']['tmp_name'], "./" .$path .$fupl .$HTTP_POST_FILES['userfile']['name']);
    if (!
    $res) { echo "Upload Failed, please try again<br>\n"; exit; } else {
    ?>
    <br>
    <?php
    //set url variable
    $domst "";
    $drecks "/";
    $imgf $fupl.$HTTP_POST_FILES['userfile']['name'];
    $thbf $tpath.$imgf;
    $urlf $domst .$domain .$drecks .$path .$imgf;
    //create thumbnails
    function LoadWBMP($imgname)
    {
    $im = @imagecreatefromwbmp($imgname); /* Attempt to open */
    if (!$im) { /* See if it failed */
    $im  imagecreatetruecolor (2020); /* Create a blank image */
    $bgc imagecolorallocate($im255255255);
    $tc  imagecolorallocate($im000);
    imagefilledrectangle($im001010$bgc);
    /* Output an errmsg */
    imagestring($im155"Error loading $imgname"$tc);
    }
    return 
    $im;
    }
    ?> 
    <table border='0'>
    <link rel="STYLESHEET" type="text/css" href="style.css">
    <center>
    <FORM action="nowhere" method="post">
    <center>
    <tr><td><input type="text" name="thetext" style="width: 500px" size="70" value="&lt;a href=&quot;<?echo $url ;?>/v.php?id=<? echo $imgf?>&quot;&gt;&lt;img src=&quot;<?echo $url ;?>/images<? echo $domst.$domain.$drecks.$tpath.$imgf?>&quot; border=&quot;0&quot /&gt;&lt;/a&gt;"><td>
     Thumbnail for Websites</td></td></tr>
    <tr><td><input type="text" name="thetext" style="width: 500px" size="70"  value="[url=<?echo $url ;?>/v.php?id=<? echo $imgf?>][IMG]<?echo $url ;?>/images<? echo $domst.$domain.$drecks.$tpath.$imgf?>[/IMG][/url]"><td> 
     
    Thumbnail for forums (1)</td></td></tr>
    <tr><td><input type="text" name="thetext" style="width: 500px" size="70"  value="[url=<?echo $url ;?>/v.php?id=<? echo $imgf?>][img=<?echo $url ;?>/images<? echo $domst.$domain.$drecks.$tpath.$imgf?>][/url]"><td>
     
    Thumbnail for forums (2)</td></td></tr>
    <tr><td><input type="text" name="thetext" style="width: 500px" size="70"  value="Thanks to <?echo $name;?> for &lt;a href=&quot;<?echo $url ;?>&quot;&gt;Free Image Hosting&lt;/a&gt;"><td>
    Link back to <a href="<?echo $url ;?>"><?echo $name ;?></a></td></td></tr>
    <tr><td><input type="text" name="thetext" style="width: 500px" size="70"  value="[url=<?echo $url ;?>][IMG]<?echo $url ;?><? echo $domst.$domain.$drecks.$tpath.$imgf?>[/IMG][/url]"><td>
     
    Hotlink for forums (1)</td></td></tr>
    <tr><td><input type="text" name="thetext" style="width: 500px" size="70"  value="[url=<?echo $url ;?>][img=<?echo $url ;?>/images<? echo $domst.$domain.$drecks.$tpath.$imgf?>][/url]"><td>
    Hotlink for forums (2)</td></td></tr>
    <tr><td><input type="text" name="thetext" style="width: 500px" size="70"  value="&lt;a href=&quot;<?echo $url ;?>&quot;&gt;&lt;img src=&quot;<?echo $url ;?>/images<? echo $domst.$domain.$drecks.$tpath.$imgf?>&quot; border=&quot;0&quot /&gt;&lt;/a&gt;"><td>
    Hotlink for Websites</td></td></tr>
    <tr><td><input type="text" name="thetext" style="width: 500px" size="70" value='<?echo $url ;?>/v.php?id=<? echo $imgf?>'><td>
    <a href="<?echo $url ;?>/v.php?id=<? echo $imgf?>"><b>Show</b></a> image to friends</td></td></tr>
    <tr><td><input type="text" name="thetext" style="width: 500px" size="70"  value="<?echo $url ;?><? echo $urlf?>"><td>Direct link to image</td></tr>
    <BR>
     
    <a href="<?echo $url ;?>/v.php?id=<? echo $imgf?>"><img src="<?echo $url ;?><? echo $urlf?>" alt="iNetScripts" border="0" height="31" width="88" /></a> Click <a href="<?echo $url ;?>/v.php?id=<? echo $imgf?>">HERE</a> to view image</td></td><BR>
    <?
    }
    } else { echo 
    "Sorry we dont allow that file type.!<br>Please go back and try again!\n"; exit; }
    }
    ?>
    </table>
    <br><br>
    </body></center>
    <center><?
    include "adverts.php";
    ?></center><BR><?
    include "footer.php";
    ?>
    I'm an alcoholic student, I troll naked with a parrot on my shoulder call Jeff.



  2. #2
    Join Date
    Dec 2006
    Location
    Doncaster, UK
    Posts
    4,244
    Tokens
    0

    Latest Awards:

    Default

    IE doesn't support transparency.
    A collection of forum users' views on obesity
    Quote Originally Posted by mynameisjake View Post
    sounds good
    Quote Originally Posted by Stephen View Post
    Just google it.
    Quote Originally Posted by jesus View Post
    jesus christ
    Quote Originally Posted by Alexicles. View Post
    It will probably soon go away.

  3. #3
    Join Date
    Jul 2005
    Location
    North-East Scotland
    Posts
    4,885
    Tokens
    282

    Latest Awards:

    Default

    its fixed IE shows it as x-png thats all sorry thread can get closed
    I'm an alcoholic student, I troll naked with a parrot on my shoulder call Jeff.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •