Hi,also habe ein Problem. Habe mir das Videomodul geladen und habe damit ein Problem. Er speichert zwar den Namen den ich dem Video gebe aber nicht den Link zum Video. Wenn ich diesen aber direkt in der DB eintrage,dann speichert er den Link. Kann sich also mal jmd den Code anschauen weil ich habs ma versucht hin zu bekommen,aber nix wars
<?php
# Copyright: BöhserDavid
# Support: ICQ 305355951
defined ('main') or die ( 'no direct access' );
defined ('admin') or die ( 'only admin access' );
$design = new design ( 'Admins Area', 'Admins Area', 2 );
$design->header();
$um = '';
if (isset($_REQUEST['um'])) {
$um = $_REQUEST['um'];
}
if (!empty($_POST['sub'])) {
$vkat = escape($_POST['vkat'], 'string');
$vauthor = escape($_POST['vauthor'], 'string');
$vname = escape($_POST['vname'], 'string');
$vlink = escape($_POST['vlink'], 'string');
$start = escape($_POST['start'], 'string');
$sid = escape($_POST['sid'], 'integer');
if ( $_POST['start'] == 'aktiv') {
if ( empty($_POST['sid'])) {
db_query('UPDATE `prefix_video` SET vkat = "'.$vkat.'", vauthor = "'.$vauthor.'", vname = "'.$vname.'", vlink = "'.$vlink.'" WHERE id = "1"');
} else {
$sid = escape($_POST['sid'], 'integer');
db_query('UPDATE `prefix_video` SET vkat = "'.$vkat.'", vauthor = "'.$vauthor.'", vname = "'.$vname.'", vlink = "'.$vlink.'" WHERE id = "'.$sid.'"');
db_query('UPDATE `prefix_video` SET vkat = "'.$vkat.'", vauthor = "'.$vauthor.'", vname = "'.$vname.'", vlink = "'.$vlink.'" WHERE id = "1"');
}
} else {
if ( empty($_POST['sid'])) {
db_query('INSERT INTO `prefix_video` (vkat,vauthor,vname,vlink) VALUES ( "'.$vkat.'","'.$vauthor.'","'.$vname.'","'.$vlink.'" ) ' );
} else {
$sid = escape($_POST['sid'], 'integer');
db_query('UPDATE `prefix_video` SET vkat = "'.$vkat.'", vauthor = "'.$vauthor.'", vname = "'.$vname.'", vlink = "'.$vlink.'" WHERE id = "'.$sid.'"');
}
}
}
if (!empty($_GET['delete']) ) {
$delete = escape($_GET['delete'], 'integer');
db_query('DELETE FROM `prefix_video` WHERE id = "'.$delete.'" LIMIT 1');
}
if ( empty($_GET['sid']) ) {
$row = array();
$row['sub'] = 'Eintragen';
$row['vauthor'] = '';
$row['vlink'] = '';
$row['vname'] = '';
$row['vkat'] = dblistee($row['vkat'],"SELECT * FROM `prefix_videokat` ORDER by id");
$row['sid'] = '';
} else {
$abf = 'SELECT vkat,vauthor,vname,vlink,id as sid FROM prefix_video WHERE id = "'.$_GET['sid'].'"';
$erg = db_query($abf);
$row = db_fetch_assoc($erg);
$row['vkat'] = dblistee($row['vkat'],"SELECT * FROM `prefix_videokat` ORDER by id");
$row['sub'] = 'Ändern';
}
if (!empty($_POST['sub1'])) {
$kate1 = escape($_POST['kate1'], 'string');
if ( empty($_POST['sid1']) ) {
db_query('INSERT INTO `prefix_videokat` (kate) VALUES ( "'.$kate1.'" ) ' );
} else {
$sid1 = escape($_POST['sid1'], 'integer');
db_query('UPDATE `prefix_videokat` SET kate = "'.$kate1.'" WHERE id = "'.$sid1.'"');
}
}
if (!empty($_GET['delete1']) ) {
$delete1 = escape($_GET['delete1'], 'integer');
db_query('DELETE FROM `prefix_videokat` WHERE id = "'.$delete1.'" LIMIT 1');
}
if ( empty($_GET['sid1']) ) {
$row1 = array();
$row['sub1'] = 'Eintragen';
$row['kate1'] = '';
$row['sid1'] = '';
} else {
$abf1 = 'SELECT kate as kate1,id as sid1 FROM `prefix_videokat` WHERE id = "'.$_GET['sid1'].'"';
$erg1 = db_query($abf1);
$row1 = db_fetch_assoc($erg1);
$row['sub1'] = 'Ändern';
}
$clas = '';
$tpl = new tpl ( 'video', 1);
$tpl->set_ar_out($row,0);
$erg4 = db_query('SELECT prefix_videokat.kate,prefix_video.vkat,prefix_video.vauthor,prefix_video.vname,prefix_video.vname,prefix_video.id FROM `prefix_video` LEFT JOIN `prefix_videokat` ON prefix_video.vkat = prefix_videokat.id WHERE prefix_video.id = 1 ORDER by prefix_video.vkat,prefix_video.vauthor,prefix_video.vname');
while ($row = db_fetch_assoc($erg4) ) {
$clas = ($clas == 'Cmite' ? 'Cnorm' : 'Cmite' );
$row['class3'] = $clas;
$tpl->set_ar_out($row,1);
}
$erg2 = db_query('SELECT prefix_videokat.kate,prefix_video.vkat,prefix_video.vauthor,prefix_video.vname,prefix_video.vname,prefix_video.id FROM `prefix_video` LEFT JOIN `prefix_videokat` ON prefix_video.vkat = prefix_videokat.id WHERE prefix_video.id > 1 ORDER by prefix_video.vkat,prefix_video.vauthor,prefix_video.vname');
while ($row = db_fetch_assoc($erg2) ) {
$clas = ($clas == 'Cmite' ? 'Cnorm' : 'Cmite' );
$row['class1'] = $clas;
$tpl->set_ar_out($row,2);
}
$tpl->set_ar_out($row1,3);
$erg3 = db_query('SELECT * FROM `prefix_videokat` ORDER by id');
while ($row = db_fetch_assoc($erg3) ) {
$clas = ($clas == 'Cmite' ? 'Cnorm' : 'Cmite' );
$row['class2'] = $clas;
$tpl->set_ar_out($row,4);
}
$tpl->out(5);
$design->footer();
?>