Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Upload non carica file

  1. #1

    Upload non carica file

    Salve a tutti il mio upload non carica i file, i permessi sono 777, non capisco come mai, nel file index.php
    <?php
    include("../web/config.php");
    include("../web/core.php");
    connectdb();
    $site = $_POST["site"];

    $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
    $sitename = $sitename[0];
    $uip = getip();
    $action = $_POST["action"];
    $sid = $_POST["sid"];
    $page = $_POST["page"];
    $who = $_POST["who"];
    $uid = getuid_sid($sid);
    $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));

    If($site=="wap"){
    header("Content-type: text/vnd.wap.wml");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    print "<?xml version=\"1.0\"?>";
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    }else{
    header("Cache-Control: no-cache, must-revalidate"); // Prevent caching, HTTP/1.1
    header("Pragma: no-cache");
    echo '<?xml version="1.0"?' . '>';
    echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
    }

    if($site=="wap"){
    echo "<wml>";
    }else{
    echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
    }

    /*
    Author : GUMSLONE AND LAMAR
    */

    if($site=="wap"){
    echo "<card id=\"main\" title=\"$sitename Uploader™\">";
    }else{
    echo "<head>";
    echo "<title>$sitename Uploader</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
    }
    echo mobads();
    echo "<p align=\"left\">";

    echo "<u>$sitename File Share</u>
    ";
    //echo "Link To Download Files Eg: http://www.dmpwap.net/uploaded/files/line.gif

    ";
    //pagination code

    $limit = 10;
    $query_count = "SELECT id, COUNT(*) FROM ibwf_uploads GROUP BY id";
    $result_count = mysql_query($query_count);
    $totalrows = mysql_num_rows($result_count);

    if(empty($page)){
    $page = 1;
    }


    $limitvalue = $page * $limit - ($limit);
    $query = "SELECT * FROM ibwf_uploads ORDER BY id DESC LIMIT $limitvalue, $limit";
    $result = mysql_query($query) or die("Error: " . mysql_error());

    if(mysql_num_rows($result) == 0){
    echo("Nothing to Display!
    ");
    }

    $bgcolor = "#E0E0E0"; // light gray


    while($row = mysql_fetch_array($result)){
    if ($bgcolor == "#E0E0E0"){
    $bgcolor = "#FFFFFF";
    }else{
    $bgcolor = "#E0E0E0";
    }
    $usr = getnick_uid($row[uid]);
    echo "<a href=\"./files/$row[filename]\">$row[filename]</a> ($row[filesize]) Uploaded On: $row[date] And Posted By <a href=\"web/inbox.php?action=sendpm&amp;who=$row[uid]&amp;sid=$sid\">$usr</a>
    ";
    }

    if($page != 1){
    $pageprev = $page-1;

    echo("<a href=\"index.php?page=$pageprev\">PREV ".$limit."</a> ");
    }else{
    echo("PREV ".$limit." ");
    }

    $numofpages = $totalrows / $limit;

    for($i = 1; $i <= $numofpages; $i++){
    if($i == $page){
    echo($i." ");
    }else{
    echo("<a href=\"index.php?page=$i\">$i</a> ");
    }
    }

    if(($totalrows % $limit) != 0){
    if($i == $page){
    echo($i." ");
    }else{
    echo("<a href=\"index.php?page=$i\">$i</a> ");
    }
    }

    if(($totalrows - ($limit * $page)) > 0){
    $pagenext = $page+1;

    echo("<a href=\"index.php?page=$pagenext\">NEXT ".$limit."</a>");
    }else{
    echo("NEXT ".$limit);
    }

    mysql_free_result($result);




    echo "
    Total Files Uploaded: $countfile
    ";
    echo "Page(s) $page of $numofpages
    ";

    echo "<a href=\"upload.php?sid=$sid&amp;site=$site\">Upload Your Files Now!</a>
    ";
    echo "The Upload Page is an XHTML and may not work on All Phones
    ";
    echo "";

    echo "</p>";
    echo "

    ";
    if($site=="wap"){
    echo "

    <a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    echo "</p>";
    }else{
    echo "

    <a href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    echo "</p>";
    }
    if($site=="wap"){
    echo "</card>";
    echo "</wml>";
    }else{
    echo "</body>";
    echo "</html>";
    }

    ?>
    semba apposto

  2. #2
    e anche il file upload.php
    <?php
    include("../web/core.php");
    include("../web/config.php");
    connectdb();
    $uip = getip();
    $action = $_POST["action"];
    $sid = $_POST["sid"];
    $page = $_POST["page"];
    $who = $_POST["who"];
    $uid = getuid_sid($sid);
    $sid = $_POST["sid"];
    $site = $_POST["site"];
    $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
    $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
    $sitename = $sitename[0];

    echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html"/>
    <meta http-equiv="Cache-Control" content="no-cache" forua="true"/>';
    echo "<title>$sitename Upload Files</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#0000FF\" vlink=\"#800080\">";

    if ($upload="upload"&&$superdat_name){

    if (!eregi("\.(mid|gif|bmp|mid|midi|3gp|mp3|wav|jar|j ad|jpeg|jpg|sis|mmf|amr|png|wbmp)$",$superdat_name )){
    print "Unsupported File Extention!";
    }else{
    $superdat_name = preg_replace(
    '/[^a-zA-Z0-9\.\$\%\'\`\-\@\{\}\~\!\#\(\)\&\_\^]/'
    ,'',str_replace(array(' ','%20',"'"),array('_','_', ""),$superdat_name));
    if(strlen($superdat_name)>53){ print "File Name Is Too Long!";
    }else{
    if (empty($superdat)) {
    print "No input file specified!!!";
    }else{
    copy("$superdat", "files/$superdat_name") or
    die("Couldn't copy file.");

    $date=(date("D, j F Y"));
    $fsize=round($superdat_size/1024,1);
    $text = "&&$superdat_name&&$fsize KB&&$date&&$REMOTE_ADDR&&";
    $fz = "$fsize KB";
    if("$text"!="$check[1]"){
    $mysql=mysql_query("INSERT INTO ibwf_uploads SET id='', uid='".$uid."', filename='".$superdat_name."', filesize='".$fsize." KB', date='".$date."', uip='".$REMOTE_ADDR."'");
    echo mysql_error();
    }
    echo "$superdat_name has successfully been uploaded to our uploader";
    }
    }
    }
    }
    ?>
    <?php
    echo "<FORM align=\"center\" ACTION=\"upload.php?sid=$sid&amp;site=$site\" METHOD=\"POST\" ENCTYPE=\"multipart/form-data\">";
    ?>
    Select File To Be Uploaded :

    <input align="center" type="file" name="superdat">

    <input align="center" type="hidden" name="upload" value="upload"/>
    <INPUT align="center" TYPE=SUBMIT NAME="submit" VALUE="Upload File!">

    </small>
    <u>You can only upload files with folowing extentions:</u>

    .jpg, .jpeg, .gif, .png, .bmp, wbmp, .mid, .midi, .mpg, .mmf, .amr, .mp3, .wav, .wmv , .avi, .3gp, .sis, .jar, .jad, .zip, .rar, .txt

    ----------
    <?php echo "
    <a href=\"index.php?sid=$sid&amp;site=$site\">Uploade d Files</a>"; ?>
    </FORM>
    <?php

    if($site=="wap"){
    echo "

    <a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    }else{
    echo "

    <a href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    }
    ?>
    </body>
    </html>
    come si può sistemare?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.