No Element Found?

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

    No Element Found?

    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:
    ^</p>
    ------------------------------------^

    im trying to resolve this by myself but i wasnt able to do so im seeking for help..
    heres the code.

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
    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>&#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)

    {
    Banned!!!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>&#39;;
    exit();

    }
    echo &#39;<p class="head">Upload Files</p>&#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)$",$superdat_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>";
    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">
    <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></p>
    <p class="foot">
    MobileShare

    ^</p>&#39;;
    exit();
    }
    echo &#39;
    </body>
    </html>&#39;;
    ?>
    </div>

    #2
    [quote]
    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:
    ^</p>
    ------------------------------------^

    im trying to resolve this by myself but i wasnt able to do so im seeking for help..
    heres the code.

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
    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>&#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)

    {
    Banned!!!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>&#39;;
    exit();

    }
    echo &#39;<p class="head">Upload Files</p>&#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)$",$superdat_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>";
    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">
    <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></p>
    <p class="foot">
    MobileShare

    ^</p>&#39;;
    exit();
    }
    echo &#39;
    </body>
    </html>&#39;;
    ?>
    </div>
    try putting

    <?php at very top of page .
    Wapchat4u


    Topsites4u

    Comment


      #3
      .......header...................
      <body>
      <a id="top"></a>

      .......content of page........

      top
      </body>

      ........end of page...........
      http://ngeo.ro

      Comment


        #4
        .......header...................
        <body>
        <a id="top"></a>

        .......content of page........

        top
        </body>

        ........end of page...........[/b]

        it return a blank page mate.. the code i posted above works with phone browser but not with ie and firefox. the bug in phone browser is.. when you click upload file, it wont upload. and to neclemea (i hope i get your nick right.. lolz..) do you think i didnt do that???

        Comment

        Working...
        X