Dont Want To Upload

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Dont Want To Upload

    Its working well in html but ive get errors after trying to modify it to xhtml.  When i try to check it to a validator to get the errors and fix it, i just ended up getting more errors and 1 of the error is, the UPLOAD Button doesnt work.

    Can sumone help me fix it? Ill be thankful if anyone will do. Btw, heres the code..

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php
    header("Content-Type: application/xhtml+xml");
    echo &#39;<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
    <meta http-equiv="cache-Control" content="no-cache" />
    <title>MobileShare :: Upload Files</title>
    <link rel="shortcut icon" href="data/favicon.ico" type="image/x-icon" />
    <link href="upload_script.css" rel="stylesheet" type="text/css"/>
    </head><body>
    <div><a accesskey="2" id="top"></a></div>
    <p class="head">Upload Files</p>&#39;;
    include &#39;config.php&#39;;
    include &#39;count.php&#39;;
    $brws = explode(" ",$_SERVER[HTTP_USER_AGENT] );
    $ubr = $brws[0];
    $ip=getenv(&#39;REMOTE_ADDR&#39;);
    $brws2= mysql_fetch_array(mysql_query("SELECT * FROM ipban WHERE browser=&#39;".$ubr."&#39; and ip=&#39;".$ip."&#39;"));
    if ($brws2){
    echo &#39;<title>Banned!!!</title>



    [img]images/exit.gif[/img]

    If u see this this means your IP and browser has been banned from uploading

    </p>
    </body></html>&#39;;
      exit();
    }
    echo &#39;<title>Upload Files</title>&#39;;
    if ($upload="upload"&&$superdat_name){
    if (!eregi("\.(mid|gif|bmp|midi|3gp|mp4|avi|mp3|m4a|a ac|wav|mpn|nth|mpc|jar|jpeg|jpg|sis
    sisx|mmf|amr|thm|png|wbmp){:content:}quot;,$superd at_name)){
    echo "

    Unsuported File extention!!!";
    }else{
    $superdat_name = preg_replace(
      &#39;/[^a-zA-Z0-9\.\$\%\&#39;\`\-\@\{\}\~\!\#\(\)\&\_\^]/&#39;
      ,&#39;&#39;,str_replace(array(&#39; &#39;,&#39;%20&#39;),array(&#39;_&#39;,&#39;_&#39; ),$superdat_name));
    if(strlen($superdat_name)>53){
    echo "File Name to long!!!";
    }else{
    if (empty($superdat)) {
    echo "No input file specified!!!";
    }else{
    if (file_exists("".$dir."/".$superdat.""))
    {
    echo "File already exists!!!

    <a href=\"upload.php\">Upload xhtml</a>

    <a href=\"index.php\">File Categories</a></p>
    <p class=&#39;foot&#39;>
    ^
    </p>
    </body>
    </html>";
    exit();
    }

    copy("$superdat", "$dir/$superdat_name") or
    die("Couldn&#39;t copy file.");
      $fsize=round($superdat_size/1024,1);
      $brws = explode(" ",$_SERVER[HTTP_USER_AGENT] );
      $ubr = $brws[0];
      $ip=getenv(&#39;REMOTE_ADDR&#39;);
      $rev = strrev ($superdat_name);
      $exp = explode (".", $rev);
      $true = strrev ($exp[0]);
      $trueext = strtolower ($true);
      $adds=mysql_query("INSERT INTO upload SET file=&#39;".$superdat_name."&#39;,name=&#39;".$nam e."&#39;,description=&#39;".$desc."&#39;,size=&#39 ;".$fsize."&#39;,filename=&#39;".$fname."&#39;,fty pe=&#39;".$trueext."&#39;,dir=&#39;".$dir."&#39;,b rowser=&#39;".$ubr."&#39;,ip=&#39;".$ip."&#39;");
      if ($adds) {

      echo "Added

      File: $superdat_name

      File Name: $fname

      Name: $name

      Description: $desc

      File Size: $fsize KB

      File Type:*.$trueext
    ";
      } else {

      echo "Please try again
    ";
      }

    echo "File has been successfully uploaded";
    }
    }
    }
    }
    echo &#39;<form action="upload.php" method="post" ENCTYPE="multipart/form-data" />
    Your Name:
    <input type="text" name="name" size="30" />


    File Name:
    <input type="text" name="fname" size="30" />


    Description:
    <textarea name="desc" rows="3" cols="40"></textarea>


    File to be uploaded:
    <input type="file" name="superdat" size="30"/>

    Upload files with folowing extentions: *.mid *.gif *.bmp *.midi *.3gp *.mp4 *.avi *.mp3 *.m4a *.aac *.wav *.mpn *.nth *.mpc *.jar *.jpeg *.jpg *.sis *.sisx *.mmf *.amr *.thm *.png *.wbmp


    Select Category:

    <select name="dir" value="">
    <option value="">Select Here</option>
    <option value="wallpapers">Wallpapers/Photos</option>
    <option value="videos">Videos</option>
    <option value="games">Games</option>
    <option value="ringtones">Ringtones</option>
    <option value="applications">Applications</option>
    <option value="themes">Themes</option>
    <option value="personal">PersonalPhotos/Videos</option>
    <option value="other">Other</option>
    <option value="adultp">Adult Wallpapers/Photos 18+</option>
    <option value="adultv">Adult Videos 18+</option>
    </select>
    <input type="submit" value="Upload File"/>
    <p class="foot">
    MobileShare

    ^
    </p>
    </body>
    </html>&#39;;
    ?>
    </div>

    #2
    whats the site addy wer the uplodaer is,
    Want something coded email me at sales@webnwaphost.com for a prices.




    Comment


      #3
      whats the site addy wer the uplodaer is,[/b]
      Here mate.. 

      Comment


        #4
        free host dont like upload lol
        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
        Visit: WapMasterz Coming Back Soon!
        _______
        SCRIPTS FOR SALE BY SUBZERO
        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          #5
          free host dont like upload lol[/b]

          its workin fine with the html. i just make it to xhtml and got those overlapping closing tags errors. i did able to resolve that. but some of the code that shouldnt be edited or remove (which is, i dont know which code) was remove.

          Comment

          Working...
          X