Ich habe dir die zwei betroffenen Dateien angepasst und nur den BBCode eingebunden, welcher für eine problemlose Ausgabe möglich ist.
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="include/images/icons/admin/contentslider.png" /></td>
<td width="30"></td><td valign="bottom"><h1>Contentslider</h1></td>
</tr>
</table>
<a href="admin.php?contentslider" class="sliderbutton">Zurück</a>
<br style="clear:both;" />
<table width="100%">
<tr>
<td valign="top" width="60%">
<form action="admin.php?contentslider-post" enctype="multipart/form-data" method="post" name="form">
{ANTISPAM}
<input type="hidden" name="pkey" value="{pkey}">
<input type="hidden" name="action" value="{action}">
<table class="border" cellpadding="3" cellspacing="1" border="0">
<tr class="Chead">
<td colspan="2"><b>{head}</b></td>
</tr><tr>
<td width="150" class="Cmite">Titel</td>
<td class="Cnorm">
<!-- BB Code START -->
<script type="text/javascript" src="include/includes/js/interface.js"></script>
<a href="javascript:bbcode_insert('b','Gib hier den Text an der fett formatiert werden soll.')"><img src="include/images/icons/bbcode/bbcode_bold.png" alt="Fett formatieren" title="Fett formatieren" width="23" height="22" border="0"></a>
<a href="javascript:bbcode_insert('i','Gib hier den Text an der kursiv formatiert werden soll.')"><img src="include/images/icons/bbcode/bbcode_italic.png" alt="Kursiv formatieren" title="Kursiv formatieren" width="23" height="22" border="0"></a>
<a href="javascript:bbcode_insert('u','Gib hier den Text an der unterstrichen formatiert werden soll.')"><img src="include/images/icons/bbcode/bbcode_underline.png" alt="Unterstrichen formatieren" title="Unterstrichen formatieren" width="23" height="22" border="0"></a>
<a href="javascript:bbcode_insert('s','Gib hier den Text an der durchgestrichen formatiert werden soll..')"><img src="include/images/icons/bbcode/bbcode_strike.png" alt="Durchgestrichen formatieren" title="Durchgestrichen formatieren" width="23" height="22" border="0"></a>
<a href="javascript:bbcode_code_insert('emph','0')"><img src="include/images/icons/bbcode/bbcode_emph.png" alt="Text hervorheben" title="Text hervorheben" width="23" height="22" border="0"></a>
<a href="javascript:hide_color();"><img id="bbcode_color_button" src="include/images/icons/bbcode/bbcode_color.png" alt="Text färben" title="Text färben" width="23" height="22" border="0"></a>
<div style="position:absolute;">
<div style="display:none; position:relative; top:-30px; left:100px; width:200px; z-index:100;" id="colorinput">
<table width="100%" class="border" border="0" cellspacing="1" cellpadding="0">
<tr class="Chead" onclick="javascript:hide_color();"><td colspan="16"><b>Farbe wählen</b></td></tr>
<tr class="Cmite" height="15">
<td width="10" style="background-color: #FF0000;"><a href="javascript:bbcode_code_insert('color','#FF0000'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="red" title="red"></td>
<td width="10" style="background-color: #FFFF00;"><a href="javascript:bbcode_code_insert('color','#FFFF00'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="yellow" title="yellow"></td>
<td width="10" style="background-color: #008000;"><a href="javascript:bbcode_code_insert('color','#008000'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="green" title="green"></td>
<td width="10" style="background-color: #00FF00;"><a href="javascript:bbcode_code_insert('color','#00FF00'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="lime" title="lime"></td>
<td width="10" style="background-color: #008080;"><a href="javascript:bbcode_code_insert('color','#008080'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="teal" title="teal"></td>
<td width="10" style="background-color: #808000;"><a href="javascript:bbcode_code_insert('color','#808000'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="olive" title="olive"></td>
<td width="10" style="background-color: #0000FF;"><a href="javascript:bbcode_code_insert('color','#0000FF'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="blue" title="blue"></td>
<td width="10" style="background-color: #00FFFF;"><a href="javascript:bbcode_code_insert('color','#00FFFF'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="aqua" title="aqua"></td>
<td width="10" style="background-color: #000080;"><a href="javascript:bbcode_code_insert('color','#000080'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="navy" title="navy"></td>
<td width="10" style="background-color: #800080;"><a href="javascript:bbcode_code_insert('color','#800080'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="purple" title="purple"></td>
<td width="10" style="background-color: #FF00FF;"><a href="javascript:bbcode_code_insert('color','#FF00FF'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="fuchsia" title="fuchsia"></td>
<td width="10" style="background-color: #800000;"><a href="javascript:bbcode_code_insert('color','#800000'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="maroon" title="maroon"></td>
<td width="10" style="background-color: #C0C0C0;"><a href="javascript:bbcode_code_insert('color','#C0C0C0'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="grey" title="grey"></td>
<td width="10" style="background-color: #808080;"><a href="javascript:bbcode_code_insert('color','#808080'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="silver" title="silver"></td>
<td width="10" style="background-color: #000000;"><a href="javascript:bbcode_code_insert('color','#000000'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="black" title="black"></td>
<td width="10" style="background-color: #FFFFFF;"><a href="javascript:bbcode_code_insert('color','#FFFFFF'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="white" title="white"></td>
</tr>
</table>
</div>
</div>
<a href="javascript:bbcode_insert_with_value('size','Gib hier den Text an, der in einer anderen Schriftgröße formatiert werden soll.','Gib hier die Größe des textes in Pixel an. \n Pixellimit liegt bei 20px !!!')"><img src="include/images/icons/bbcode/bbcode_size.png" alt="Textgröße verändern" title="Textgröße verändern" width="23" height="22" border="0"></a>
<a href="javascript:bbcode_insert_with_value('url','Gib hier die Beschreibung für den Link an.','Gib hier die Adresse zu welcher verlinkt werden soll an.')"><img src="include/images/icons/bbcode/bbcode_url.png" alt="Hyperlink einfügen" title="Hyperlink einfügen" width="23" height="22" border="0"></a>
<a href="javascript:bbcode_insert_with_value('mail','Gib hier den namen des links an.','Gib hier die eMail - Adresse an.')"><img src="include/images/icons/bbcode/bbcode_email.png" alt="eMail hinzufügen" title="eMail hinzufügen" width="23" height="22" border="0"></a>
<!-- BB Code END --><br />
<input type="text" size="100" maxlength="100" name="txt" value="{txt}" />
</td>
</tr><tr>
<td class="Cmite">Banner</td>
<td class="Cnorm">{img}<input size="30" name="imgbig_file" type="file" /></td>
</tr><tr>
<td class="Cmite">Link</td>
<td class="Cnorm"><input type="text" size="100" name="link" value="{link}" /></td>
</tr><tr>
<td class="Cmite">Linkziel</td>
<td class="Cnorm">
<input type="radio" value="_self" id="target1" name="target" {target1} /><label for="target1"> selbe Seite </label>
<input type="radio" value="_blank" id="target2" name="target" {target2} /><label for="target2"> neues Fenster </label>
</td>
</tr><tr>
<td class="Cmite">Status</td>
<td class="Cnorm"><input type="checkbox" name="status" {_if_{status}=='1'}checked="checked"{/_endif} id="status" value="1" /><label for="status"> Aktiv/Inaktiv</label></td>
</tr><tr class="Cdark">
<td></td>
<td><input class="sub" type="submit" value="{atc}" name="sub" /></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
{EXPLODE}
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="include/images/icons/admin/contentslider.png" /></td>
<td width="30"></td><td valign="bottom"><h1>Contentslider</h1></td>
</tr>
</table>
<a href="admin.php?contentslider-post" class="sliderbutton">Neuer Eintrag</a>
<a href="admin.php?allg" class="sliderbutton">Konfiguration</a>
<br style="clear:both;" />
<table width="800" border="0" cellpadding="3" cellspacing="1" class="border">
<thead>
<tr class="Chead">
<td width="75" align="center" colspan="2">Position</td>
<td width="75" align="center">Status</td>
<td width="75" align="center">Entfernen</td>
<td width="75" align="center">Bearbeiten</td>
<td width="600" align="left">Name</td>
</tr>
</thead>
<tbody>
{EXPLODE}
<tr class="{class}">
<td width="25" align="center"><a href="admin.php?contentslider-{id}-o{pos}"><img src="include/images/icons/pfeilo.gif" border="0" title="oben" alt="oben"></a></td>
<td width="25" align="center"><a href="admin.php?contentslider-{id}-u{pos}"><img src="include/images/icons/pfeilu.gif" border="0" title="unten" alt="unten"></a></td>
<td width="50" align="center"><a href="admin.php?contentslider-show-{id}">{_if_{status}=='1'}<img src="include/images/icons/jep.gif" alt="aktiv" title="aktiv" border="0" />{_else_}<img src="include/images/icons/nop.gif" alt="inaktiv" title="inaktiv" border="0" />{/_endif}</a></td>
<td width="50" align="center"><a href="javascript:delcheck('{id}','{name}')"><img src="include/images/icons/del.gif" alt="löschen" title="löschen" border="0"></a></td>
<td width="50" align="center"><a href="admin.php?contentslider-post-e{id}"><img src="include/images/icons/edit.gif" alt="verändern" title="verändern" border="0"></a></td>
<td width="600" align="left">{name}</td>
</tr>
{EXPLODE}
</tbody>
</table>
{MPL}
<script type="text/javascript">
function delcheck(id, name) {
var frage = confirm("Willst du " + name + " wirklich entfernen?");
if ( frage == true ) {
document.location.href="?contentslider-del-"+id;
}
}
</script>
<?php
/**
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL)
* @copyright (C) 2000-2013 ilch.de
*/
defined('main') or die('no direct access');
defined('admin') or die('only admin access');
$ILCH_HEADER_ADDITIONS .= '<link rel="stylesheet" type="text/css" href="include/includes/css/contentslider/style.css" />' . "\n";
$ILCH_HEADER_ADDITIONS .= '<script type="text/javascript" src="include/includes/js/contentslider/slider.js"></script>' . "\n";
$design = new design ('Admins Area', 'Admins Area', 2);
$tpl = new tpl('contentslider.htm', 1);
$design->header();
$um = $menu->get(1);
switch ($um) {
default:
// verschieben
$direction = $menu->getA(2);
if ($direction === 'o' or $direction === 'u') {
$id = $menu->get(1);
$pos = $menu->getE(2);
$nps = ($direction === 'u' ? $pos + 1 : $pos - 1);
$anz = db_result(db_query("SELECT COUNT(*) FROM `prefix_contentslider`"), 0);
if ($nps < 0) {
db_query("UPDATE `prefix_contentslider` SET pos = " . $anz . " WHERE id = " . $id);
db_query("UPDATE `prefix_contentslider` SET pos = pos -1");
} elseif ($nps >= $anz) {
db_query("UPDATE `prefix_contentslider` SET pos = -1 WHERE id = " . $id);
db_query("UPDATE `prefix_contentslider` SET pos = pos +1");
} elseif ($nps < $anz) {
db_query("UPDATE `prefix_contentslider` SET pos = " . $pos . " WHERE pos = " . $nps);
db_query("UPDATE `prefix_contentslider` SET pos = " . $nps . " WHERE id = " . $id);
}
}
$tpl->out(1);
$page = ($menu->getA(1) == 'p' ? $menu->getE(1) : 1);
$limit = 15;
$class = 'Cnorm';
$MPL = db_make_sites($page, '', $limit, '?contentslider', 'contentslider');
$anfang = ($page - 1) * $limit;
$abf = sprintf("SELECT `id`,`name`,`link`,`pos`,`status`,`target` FROM `prefix_contentslider` ORDER BY `pos` ASC LIMIT %d,%d", $anfang, $limit);
$erg = db_query($abf);
while ($row = db_fetch_assoc($erg)) {
$class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite');
$status = $row['status'] == 1 ? '1' : '0';
$row['class'] = $class;
$row['status'] = $status;
$tpl->set_ar($row);
$tpl->out(2);
}
$tpl->set('MPL', $MPL);
$tpl->out(3);
break;
case 'post':
// aendern / eintragen
if (isset($_POST['sub']) AND chk_antispam('adminuser_action', true)) {
if (!empty($_POST['txt'])) {
$_POST['name'] = escape($_POST['txt'], 'string');
$_POST['link'] = get_homepage(escape($_POST['link'], 'string'));
$_POST['target'] = escape($_POST['target'], 'string');
$_POST['status'] = (isset($_POST['status'])) ? escape($_POST['status'], 'integer') : 0;
$_POST['pkey'] = escape($_POST['pkey'], 'integer');
$imgbig_update = "";
$imgbig_in = "";
$imgupdate = false;
$id = (empty($_POST['pkey']) ? db_result(db_query("SHOW TABLE STATUS FROM `" . DBDATE . "` LIKE 'prefix_contentslider'"), 0, 'Auto_increment') : $_POST['pkey']);
if (!empty($_FILES['imgbig_file']['name'])) {
$rile_type = ic_mime_type($_FILES['imgbig_file']['tmp_name']);
$parts = pathinfo(escape($_FILES['imgbig_file']['name'], 'string'));
$extension = trim($parts['extension']);
$exAr = array('gif', 'png', 'jpg', 'jpeg');
if (in_array($extension, $exAr) and substr($rile_type, 0, 6) == 'image/') {
$nname = strtolower('include/images/contentslider/' . $id . '_' . genkey(6) . '.' . $extension);
if (move_uploaded_file($_FILES['imgbig_file']['tmp_name'], $nname)) {
@chmod($nname, 0777);
$imgbig_update = "`banner` = '" . $nname . "',";
$imgbig_in = $nname;
$imgupdate = true;
}
}
}
if (empty($_POST['pkey']) and $_POST['action'] == 'new') {
$_POST['pos'] = db_result(db_query("SELECT COUNT(*) FROM `prefix_contentslider`"), 0);
$q = sprintf("INSERT INTO `prefix_contentslider` (`name`,`banner`,`link`,`target`,`pos`,`status`) VALUES ('%s','%s','%s','%s','%d','%d')", $_POST['name'], $imgbig_in, $_POST['link'], $_POST['target'], $_POST['pos'], $_POST['status']);
} else {
$q = db_query(sprintf("SELECT `id`,`banner`,`name` FROM `prefix_contentslider` WHERE `id` = '%d'", $_POST['pkey']));
$r = db_fetch_assoc($q);
if (db_num_rows($q) > 0) {
if ($imgupdate === true and file_exists($r['banner'])) {
@unlink($r['banner']);
}
if (file_exists($r['banner'])) {
$parts = pathinfo($r['banner']);
$nname = strtolower('include/images/contentslider/' . $r['id'] . '_' . genkey(6) . '.' . $parts['extension']);
$imgbig_update = "`banner` = '" . $nname . "',";
rename($r['banner'], $nname);
}
}
$q = sprintf("UPDATE `prefix_contentslider` SET `name` = '%s', %s `link` = '%s', `target` = '%s', `status` = '%d' WHERE `id` = %d", $_POST['name'], $imgbig_update, $_POST['link'], $_POST['target'], $_POST['status'], $_POST['pkey']);
}
db_query($q);
$wd = array('text' => empty($_POST['pkey']) ? $lang['insertsuccessful'] : 'Erfolgreich bearbeitet.', 'link' => 'contentslider');
} else {
$wd = array('text' => 'Bitte einen Titel angeben.', 'link' => empty($_POST['pkey']) ? 'contentslider-post' : 'contentslider-post-e' . $_POST['pkey']);
}
wd('admin.php?' . $wd['link'], $wd['text'], 1);
} else {
$tpl = new tpl('contentslider.htm', 1);
$tpl->set('ANTISPAM', get_antispam('adminuser_action', 0, true));
// aendern vorbereiten
if ($menu->getA(2) == 'e') {
$erg = db_query(sprintf("SELECT `id`,`name`,`banner`,`link`,`target`,`status` FROM `prefix_contentslider` WHERE `id` = %d", $menu->getE(2)));
$_ilch = db_fetch_assoc($erg);
$_ilch['pkey'] = $menu->getE(2);
$_ilch['action'] = 'edit';
if ($_ilch['target'] == '_self') {
$_ilch['target1'] = 'checked';
$_ilch['target2'] = '';
} else {
$_ilch['target1'] = '';
$_ilch['target2'] = 'checked';
}
if (file_exists($_ilch['banner'])) {
$imgbig = '<a href="#" class="sliderbutton slidertip" style="padding-left:30px;"><img src="include/images/icons/image.png" alt="Preview" title="Preview" />Preview<span class="sliderbanner"><img src="' . $_ilch['banner'] . '" alt="' . $_ilch['name'] . '" title="' . $_ilch['name'] . '" /></span></a>' . "\n";
} else {
$imgbig = '<div class="sliderbutton">Kein Banner vorhanden!</div>' . "\n";
}
$_ilch['img'] = $imgbig;
$_ilch['head'] = 'Eintrag bearbeiten';
$_ilch['atc'] = 'Bearbeiten';
$_ilch['txt'] = $_ilch['name'];
} else {
$_ilch = array(
'pkey' => '',
'id' => '',
'banner' => '',
'status' => '',
'txt' => '',
'link' => '',
'target1' => 'checked',
'target2' => '',
'img' => '',
'action' => 'new',
'head' => 'Neuen Eintrag',
'atc' => 'Eintragen'
);
}
$tpl->set_ar_out($_ilch, 0);
}
break;
case 'del':
// loeschen
$state = false;
$q = db_query(sprintf("SELECT `id`,`banner`,`pos` FROM `prefix_contentslider` WHERE `id` = '%d'", $menu->get(2)));
if (db_num_rows($q) > 0) {
$r = db_fetch_assoc($q);
if (file_exists($r['banner'])) {
@unlink($r['banner']);
}
db_query(sprintf("DELETE FROM `prefix_contentslider` WHERE `id` = '%d'", $r['id']));
db_query(sprintf("UPDATE `prefix_contentslider` SET `pos` = pos -1 WHERE `pos` > '%d'", $r['pos']));
$state = true;
}
wd('admin.php?contentslider', $state == true ? $lang['deletesuccessful'] : 'OoooOpss', 1);
break;
case 'show':
// aktiv / inaktiv
db_query(sprintf("UPDATE `prefix_contentslider` SET `status` = IF( `status` = 1,0,1 ) WHERE `id` = '%d' LIMIT 1", $menu->get(2)));
wd('admin.php?contentslider', 'Erfolgreich bearbeitet.', 2);
}
$design->footer();