RVB I Reys
Grünschnabel
Hallo, ich brauche Hilfe um ein Ubload-Balken auf meinen Upload Formular zu machen.
Hier sind die Cods
die Datei heißt sendvideo.php
Template Datei
send.php
Ich würde gerne wissen wie ich jetzt den Upload-Balken mache?
Hier ist das Formular http://www.germangamerclanxbl.com/sendvideo.php
Hier sind die Cods
die Datei heißt sendvideo.php
Code:
define('APXRUN',true);
define('MODULE','videos');
define('PAGEID','sendvideo');
////////////////////////////////////////////////////////////////////////////////////////////////////////
require('lib/_start.php'); //////////////////////////////////////////////////////////// SYSTEMSTART ///
////////////////////////////////////////////////////////////////////////////////////////////////////////
$apx->module('videos');
$apx->lang->drop('send');
headline($apx->lang->get('HEADLINE'),mklink('sendvideo.php','sendvideo.html'));
titlebar($apx->lang->get('HEADLINE'));
////////////////////////////////////////////////////////////////////////////////////////////////////////
if ( $_POST['send'] ) {
list($spam)=$db->first("SELECT addtime FROM ".PRE."_videos ORDER BY addtime DESC");
//Captcha prüfen
if ( $set['videos']['captcha'] && !$user->info['userid'] ) {
require(BASEDIR.'lib/class.captcha.php');
$captcha=new captcha;
$captchafailed=$captcha->check();
}
if ( $captchafailed ) message($apx->lang->get('MSG_WRONGCODE'),'javascript:history.back()');
elseif ( ( !$_POST['send_username'] && !$user->info['userid'] ) || !$_POST['catid'] || !$_POST['title'] || !$_POST['text'] || !$_FILES['flvfile']['tmp_name'] ) message('back');
elseif ( ($spam+$set['videos']['spamprot']*60)>time() ) message($apx->lang->get('MSG_BLOCKSPAM',array('SEC'=>($spam+$set['videos']['spamprot']*60)-time())),'back');
else {
$ext=substr(strrchr($_FILES['flvfile']['name'],'.'),1);
list($special)=$db->first("SELECT special FROM ".PRE."_mediarules WHERE extension='".strtoupper($ext)."' LIMIT 1");
if ( $special=='block' ) message($apx->lang->get('MSG_NOTALLOWED'),'back');
require(BASEDIR.'lib/class.mediamanager.php');
$mm=new mediamanager;
$stamp=md5(microtime());
$mm->uploadfile($_FILES['flvfile'],'videos/flv',$stamp.'-'.$_FILES['flvfile']['name']);
if ( $user->info['userid'] ) {
$_POST['userid']=$user->info['userid'];
$_POST['send_username'] = $_POST['send_email'] = '';
}
else {
$_POST['userid'] = 0;
}
$_POST['flvfile']='videos/flv/'.$stamp.'-'.$_FILES['flvfile']['name'];
$_POST['tempfile']='videos/uploads/'.$stamp.'-'.$_FILES['flvfile']['name'];
$_POST['addtime']=time();
$_POST['local']=1;
$_POST['secid']='all';
$_POST['text']=strtr(strip_tags($_POST['text']),array(
"\r\n" => "<br />\r\n",
"\n" => "<br />\n"
));
$_POST['source'] ="apexx";
if ( $set['videos']['coms'] ) $_POST['allowcoms']=1;
if ( $set['videos']['ratings'] ) $_POST['allowrating']=1;
if ( checkmail($_POST['author_link']) ) $_POST['author_link']='mailto:'.$_POST['author_link'];
//eMail-Benachrichtigung
if ( $set['videos']['mailonnew'] ) {
$input=array('URL'=>HTTP);
sendmail($set['videos']['mailonnew'],'SENDVIDEO',$input);
}
//Captcha löschen
if ( $set['videos']['captcha'] && !$user->info['userid'] ) {
$captcha->remove();
}
$db->dinsert(PRE.'_videos','userid,secid,catid,flvfile,source,title,text,addtime,allowcoms,allowrating');
message($apx->lang->get('MSG_OK'),mklink('videos.php','videos.html'));
}
//SCRIPT BEENDEN
require('lib/_end.php');
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
require_once(BASEDIR.'lib/class.recursivetree.php');
$tree = new RecursiveTree(PRE.'_videos_cat', 'id');
$data = $tree->getTree(array('title', 'open'));
if ( count($data) ) {
foreach ( $data AS $res ) {
++$i;
$catdata[$i]['ID']=$res['id'];
$catdata[$i]['TITLE']=$res['title'];
$catdata[$i]['LEVEL']=$res['level'];
$catdata[$i]['OPEN']=$res['open'];
}
}
//Captcha erstellen
if ( $set['videos']['captcha'] && !$user->info['userid'] ) {
require(BASEDIR.'lib/class.captcha.php');
$captcha=new captcha;
$captchacode=$captcha->generate();
}
$posto=mklink('sendvideo.php','sendvideo.html');
$apx->tmpl->assign('CAPTCHA',$captchacode);
$apx->tmpl->assign('CATEGORY',$catdata);
$apx->tmpl->assign('POSTTO',$postto);
$apx->tmpl->assign('MAXUPLOAD',str_replace('M','MB',ini_get('upload_max_filesize')));
$apx->tmpl->parse('send');
////////////////////////////////////////////////////////////////////////////////////////////////////////
require('lib/_end.php'); /////////////////////////////////////////////////////////// SCRIPT BEENDEN ///
////////////////////////////////////////////////////////////////////////////////////////////////////////
?>
Template Datei
send.php
Code:
{*
Downloads: Datei einsenden
==========================
POSTTO = Formular senden an...
MAXUPLOAD = Maximale Uploadgröße
CAPTCHA = HTML-Code, um das Bild für die visuelle Bestätigung auszugeben
CATEGORY = Liste der Kategorien
CATEGORY.ID = Kategorie-ID
CATEGORY.TITLE = Kategorie-Titel
CATEGORY.OPEN = Dürfen in diese Kategorie News gepostet werden?
CATEGORY.LEVEL = Level (bei Unterkategorien)
Die Eingabefelder "send_username" und "send_email" werden nicht benötigt,
wenn der Benutzer angemeldet ist.
*}
<form action="{POSTTO}" method="post" enctype="multipart/form-data">
<table width="100%">
<colgroup><col width="30%" /><col width="70%" /></colgroup>
<tr><td class="header1" colspan="2">{LANG[HEADLINE]}</td></tr>
{if !LOGGED_ID}
<tr class="color">
<td>{LANG[USERNAME]}:</td>
<td><input type="text" name="send_username" size="40" maxlength="30" class="input" /></td>
</tr>
<tr class="color">
<td>{LANG[EMAIL]}: <span class="small">({LANG[OPTIONAL]})</span></td>
<td><input type="text" name="send_email" size="40" maxlength="255" class="input" /></td>
</tr>
{/if}
<tr class="color">
<td>{LANG[CATEGORY]}:</td>
<td><select name="catid"><option value=""></option>{list CATEGORY}
{if CATEGORY.OPEN}<option value="{CATEGORY.ID}" style="color:green;">{else}<option value="" style="color:grey;" disabled="disabled">{/if}{if CATEGORY.LEVEL==2} {/if}{if CATEGORY.LEVEL==3} {/if}{CATEGORY.TITLE}</option>
{/list}</select></td>
</tr>
<tr class="color">
<td>{LANG[TITLE]}:</td>
<td><input type="text" name="title" size="80" maxlength="255" class="input" /></td>
</tr>
<tr class="color">
<td>{LANG[TEXT]}:</td>
<td><textarea name="text" cols="80" rows="15" class="input"></textarea></td>
</tr>
<tr class="color">
<td>{LANG[FILE]}:<br /><span class="small">({LANG[MAXUPLOAD]}: {MAXUPLOAD})</span></td>
<td><input type="file" name="flvfile" size="60" class="input" /></td>
</tr>
{if CAPTCHA}<tr>
<td class="color">{LANG[CAPTCHA]}:</td>
<td class="color">{CAPTCHA} => <input type="text" name="captcha" size="15" class="input" /></td>
</tr>{/if}
<tr><td class="footer" colspan="2"><input type="submit" name="send" value="{LANG[SUBMIT]}" class="button" /></td></tr>
</table>
</form>
Ich würde gerne wissen wie ich jetzt den Upload-Balken mache?
Hier ist das Formular http://www.germangamerclanxbl.com/sendvideo.php
Zuletzt bearbeitet: