Can anyone help me with this PLEASE?? Im getting an error sumthing like this.. XML Parsing Error: no element found Line Number 33, Column 37: ^
------------------------------------^ im trying to resolve this by myself but i wasnt able to do so im seeking for help.. heres the code.
CODE 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>';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)
{ Banned!!!echo '<title>Banned!!!</title>
If u see this this means your IP and browser has been banned from uploading
'; exit();
} echo ' Upload Files '; 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)$",$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>
^
"; 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"> <input type="hidden" name="MAX_FILE_SIZE" value="20000" /> 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"/></form>^
';
exit();
}
echo '