Dont Want To Upload

Started on the old forum in November 2007 · view the original in the archive · old links redirect here

4 replies · 586 views · started 19 years ago · 1 min read

3 participants
modfiles Developer · 200 posts #1

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. External image (may be gone)

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

CODE<?php header("Content-Type: application/xhtml+xml"); echo '<?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> <a accesskey="2" id="top"></a>

Upload Files '; include 'config.php'; include 'count.php'; $brws = explode(" ",$_SERVER[HTTP_USER_AGENT] ); $ubr = $brws[0]; $ip=getenv('REMOTE_ADDR'); $brws2= mysql_fetch_array(mysql_query("SELECT * FROM ipban WHERE browser='".$ubr."' and ip='".$ip."'")); if ($brws2){ echo '<title>Banned!!!</title>

External image (may be gone)

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

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

Unsuported File extention!!!"; }else{ $superdat_name = preg_replace(   '/[^a-zA-Z0-9.$%'`-@{}~!#()&_^]/'   ,'',str_replace(array(' ','%20'),array('',''),$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>

^

</body> </html>"; exit(); }

copy("$superdat", "$dir/$superdat_name") or die("Couldn't copy file.");   $fsize=round($superdat_size/1024,1);   $brws = explode(" ",$_SERVER[HTTP_USER_AGENT] );   $ubr = $brws[0];   $ip=getenv('REMOTE_ADDR');   $rev = strrev ($superdat_name);   $exp = explode (".", $rev);   $true = strrev ($exp[0]);   $trueext = strtolower ($true);   $adds=mysql_query("INSERT INTO upload SET file='".$superdat_name."',name='".$name."',description='".$desc."',size='".$fsize."',filename='".$fname."',ftype='".$trueext."',dir='".$dir."',browser='".$ubr."',ip='".$ip."'");   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 '<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"/>

MobileShare

^

</body> </html>'; ?>
modfiles Developer · 200 posts #3

whats the site addy wer the uplodaer is,

Here mate.. 

subzero Super moderator Fellow · 3,954 posts #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... _______…

modfiles Developer · 200 posts #5

free host dont like upload lol

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.

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close