beim uplaod ne statuß anzeige

Dieses Thema im Forum "Webentwicklung" wurde erstellt von DerFreak, 28. November 2006 .

Schlagworte:
Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 28. November 2006
    Hallo ich habe hier ein movie script für webspelll,jetzt würde ich gerne ne status anzeige einbauen das man sieht wie lange es dauert bist der clip hochgeladen wird,ich habe auch schon ne anzeige doch leider weiss ich nicht wo ich es einbauen muss,und ob der befehl reicht,die xp_progress.js datei habe ich auch,weiss jemand weiter?

    <script language="javascript" src="xp_progress.js"></script>
    Upload in progress. Please Wait...
    <BR><BR>

    <?
    include("_mysql.php");
    mysql_connect($host, $user, $pwd);
    mysql_select_db($db);
    if(isfileadmin($userID)) {
    $action='<a href="?site=movies&action=add">Neues Movie</a>';
    } else {
    $action="";
    }
    if(!isset($_GET['action'])) {
    $res=mysql_query("SELECT * FROM ".PREFIX."movies ORDER BY movID DESC");
    if(mysql_num_rows($res)) {
    $anzclips=mysql_num_rows($res);
    } else $anzclips="0";
    echo(''.$action.'<br>
    <div align="right">Es wurden <b>'.$anzclips.'</b> Clips in der Datenbank gefunden.</div>
    <table width="100%" border="0" bgcolor="#333333">
    <tr><td class="title">Name:</td><td class="title">Beschreibung:</td><td class="title">Hits:</td></tr>
    ');
    while($ar=mysql_fetch_array($res)) {
    echo('<tr><td bgcolor="#333333"><a href="?site=movies&action=detail&id='.$ar[movID].'">'.$ar[movheadline].'</a></font></td><td bgcolor="#333333">'.$ar[movdescription].'</td><td bgcolor="#333333">'.$ar[hits].'</tr>');
    }
    echo('</table>');
    } elseif($_GET['action'] == "detail") {
    $id=$_GET['id'];
    $res=mysql_query("SELECT * FROM ".PREFIX."movies WHERE movID=$id");
    $ar=mysql_fetch_array($res);
    mysql_query("UPDATE ".PREFIX."movies SET hits=hits+1 WHERE movID=$id");
    if(isfeedbackadmin($userID)) {
    $a='<a href="?site=movies&action=delete&id='.$id.'">Movie löschen</a>';
    } else {
    $a='';
    }
    echo('
    <table width="100%"><tr><td class="title"><a href="?site=movies"><b>Clips</b></a> <b>></b> '.$ar[movheadline].'</td></tr></table><br>
    <center>
    <embed name="RAOCXplayer" src="movies/'.$ar[movfile].'" autostart="True" type="application/x-mplayer2" width="360" height="260" showcontrols="1" showstatusbar="0" loop="True" enablecontextmenu="0" displaysize="0" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"></embed>
    </center>
    <br><br><br>'.$a.'
    ');
    if($_POST['submit']) {
    $aID=$userID;
    function escape($string) {
    if(get_magic_quotes_gpc) $string=$string; else $string=addslashes($string); return $string; }
    mysql_query("INSERT INTO ".PREFIX."mov_comments ( movID, autorID, content, date ) VALUES ( '".$id."', '".$aID."', '".nl2br(htmlspecialchars(espace($_POST['content'])))."', '".time()."' )");
    echo('<meta http-equiv="refresh" content="1; URL=?site=movies&action=detail&id='.$id.'"><font color="#ff0000">Eintrag erfolgreich!</font>');
    }
    $res2=mysql_query("SELECT * FROM ".PREFIX."mov_comments WHERE movID=$id ORDER BY comID DESC");
    echo('<table width="100%"><tr><td class="title"><b>Kommentare</b></td></tr></table><br>');
    while($as=mysql_fetch_array($res2)) {
    $uID=$as[autorID];
    $res3=mysql_query("SELECT * FROM ".PREFIX."user WHERE userID=$uID");
    $at=mysql_fetch_array($res3);
    $date=date("d.m.Y, H:i", $as[date]);
    echo('<table width="100%">
    <tr>
    <td class="title"><a href="?site=profile&id='.$at[userID].'">'.$at[nickname].'</a> &bull; '.$date.'</td></tr>
    <tr>
    <td bgcolor="#aaaaaa">'.$as[content].'</td></tr>
    </table>');
    }
    if($loggedin) {
    echo('<center><form action="?site=movies&action=detail&id='.$id.'" method="post"><table width="100%" align="center">
    <tr><td align="center"><textarea name="content" cols="60" rows="7"></textarea></td></tr>
    <tr>
    <td align="center"><b>Optionen:</b>&nbsp;&nbsp;<span class="small"> • HTML ist <b><u>AUS</u></b> &nbsp;&nbsp;&nbsp;• <a href="javascript:MM_openBrWindow(\'code.php\',\'BBCode\',\'scrollbars=yes,width=600,height=500\')">BBCode</a>
    ist <b><u>AN</u></b> &nbsp;&nbsp;&nbsp;• <a href="javascript:MM_openBrWindow(\'smileys.php\',\'Smileys\',\'scrollbars=yes,width=340,height=500\')">Smilies</a>
    sind <b><u>AN</u></b></span> </td>

    </tr>
    <tr><td><input type="submit" name="submit" value="Kommentar speichern!"></td></tr>
    </table></center>');
    }
    } elseif($_GET['action'] == "add") {
    if(!isfeedbackadmin($userID)) die('Kein Zugriff!');
    echo('
    <form action="?site=movies&action=save" method="post" enctype="multipart/form-data">
    <table width="100%">
    <tr><td>Name:</td><td><input type="text" name="name"></td></tr>
    <tr><td>Beschreibung:</td><td><textarea name="description" cols="60" rows="7"></textarea></td></tr>
    <tr><td>Clip:</td><td><input type="file" name="file"></td></tr>
    <tr><td><input type="submit"></td></tr></table></form>');
    } elseif($_GET['action']=="save") {
    $name=$_POST['name'];
    $desc=nl2br($_POST['description']);
    $file=$_FILES['file'];
    $path="./movies/";
    move_uploaded_file($file['tmp_name'], $path.$file['name']);
    chmod($path.$file['name'], 0755);
    mysql_query("INSERT INTO ".PREFIX."movies (movheadline, movdescription, movfile) VALUES ('".$name."', '".$desc."', '".$file['name']."')");
    echo('Der Film wurde erfolgreich eingetragen!');
    } elseif($_GET['action'] == "delete") {
    if(!isfeedbackadmin($userID)) die('Kein Zugriff!');
    $id=$_GET['id'];
    mysql_query("DELETE FROM ".PREFIX."movies WHERE movID=$id");
    echo('Film wurde erfolgreich gelöscht!');
    }
    ?>
     
  2. 28. November 2006
    AW: beim uplaod ne statuß anzeige

    Schau mal hier:
    Search for results | Zend Developer Zone

    Ausführliche Anleitungen, Diskussionen und Tests verschiedener Progress Bars.
     
  3. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.