Da hängt ein bisschen mehr dran ...
241-244 Definierung/Datenabfrage für MPL
360 Einschränkung Optionen
313/390 Übergaben ans Template
Ich habe es mal angepasst, aber nicht getestet.
Eigene Daten vor dem Test sichern!
<?php
// Copyright by: Manuel Staechele
// Support: www.ilch.de
// Modded by Mairu für News Extended
defined ('main') or die ('no direct access');
defined ('admin') or die ('only admin access');
if (!isset($_SESSION['allowFCKUpload'])) {
$_SESSION['allowFCKUpload'] = true;
}
// -----------------------------------------------------------|
// #
// ##
// ###
// #### F u n k t i o n e n
function dz_timestamp($d, $t = '00:00') {
$d = trim($d);
$t = trim($t);
if (preg_match('/^\d{1,2}.\d{1,2}.(\d{2}|\d{4})$/', $d) == false OR preg_match('/^\d{1,2}:\d\d$/', $t) == false) {
return false;
}
$d = explode('.', $d);
$t = explode(':', $t);
if ($o = mktime($t[0], $t[1], 0, $d[1], $d[0], $d[2])) {
return $o;
} else {
return false;
}
}
function getKats ($akt , $addkat = '', $self = false) {
$katAr = array();
if ($self) {
$katAr['#0#'] = 'selbst wählen';
}
$katAr['Allgemein'] = 'Allgemein';
$kats = '';
$erg = db_query("SELECT DISTINCT news_kat FROM `prefix_news`");
while ($row = db_fetch_object($erg)) {
$katAr[$row->news_kat] = $row->news_kat;
}
if (!empty($addkat) AND $addkat != '#0#') {
$katAr[$addkat] = $addkat;
}
$katAr = array_unique($katAr);
foreach($katAr as $k => $a) {
if (trim($k) == trim($akt)) {
$sel = 'selected="selected"';
} else {
$sel = '';
}
$kats .= '<option value="' . $k . '" ' . $sel . '>' . $a . '</option>';
}
return ($kats);
}
function vorschau($form) {
global $info;
$resp = new xajaxResponse();
$txt = bbcode($form['txt']);
$resp->assign('vorschau_td', 'innerHTML' , $txt);
$resp->script("document.getElementById('vorschau').style.display = 'block';");
if (isset($info['ImgMaxBreite'])) {
$resp->script("ResizeBBCodeImages()");
}
return $resp;
}
function vorschau_id($id) {
global $info;
$resp = new xajaxResponse();
$txt = @db_result($q = db_query("SELECT news_text, html FROM prefix_news WHERE news_id = '$id'"), 0, 0);
if (@db_result($q, 0, 1) == 0) {
$txt = bbcode($txt);
}
$resp->assign('vorschau_td', 'innerHTML' , $txt);
$resp->script("document.getElementById('vorschau').style.display = 'block';");
if (isset($info['ImgMaxBreite'])) {
$resp->script("ResizeBBCodeImages()");
}
return $resp;
}
function tn_koms() {
$resp = new xajaxResponse();
$now = @db_result(db_query('SELECT v2 FROM prefix_allg WHERE k = "news"'), 0);
db_query('UPDATE prefix_allg SET v2 = IF(v2=1,0,1) WHERE k = "news"');
$linktxt = $now == '0' ? 'ja' : 'nein';
$resp->assign('tn_koms', 'innerHTML' , $linktxt);
return $resp;
}
function saveopts($newsempf, $kat) {
$resp = new xajaxResponse();
if (!db_query("UPDATE prefix_allg SET v3 = '$newsempf', v4 = '$kat' WHERE k = 'News'")) {
$resp->alert("Fehler aufgetreten:\n" . mysql_error());
}
return $resp;
}
function setArchiv($id, $old) {
$resp = new xajaxResponse();
$new = $old == 'A' ? 0 : 1;
if (db_query("UPDATE prefix_news SET archiv = $new WHERE news_id = '$id'")) {
$resp->assign('archiv_link_' . $id, 'innerHTML' , $old == 'A' ? 'N' : 'A');
} else {
$resp->alert("Fehler:\n" . mysql_error());
}
return $resp;
}
// xajax für vorschau
$xajax = new xajax();
$xajax->configureMany(array('decodeUTF8Input' => true ,'characterEncoding' => 'ISO-8859-1', 'requestURI' => 'admin.php?news-ajax'));
$xajax->register(XAJAX_FUNCTION, 'vorschau');
$xajax->register(XAJAX_FUNCTION, 'vorschau_id');
$xajax->register(XAJAX_FUNCTION, 'tn_koms');
$xajax->register(XAJAX_FUNCTION, 'saveopts');
$xajax->register(XAJAX_FUNCTION, 'setArchiv');
$xajax->processRequest();
// #### F u n k t i o n
// ###
// ##
// #
// #
// ##
// ###
// #### A k t i o n e n
$design = new design ('Admins Area', 'Admins Area', 2);
$design->header();
if (!empty($_REQUEST['um'])) {
$um = $_REQUEST['um'];
$newscreatetime = time();
$newschangesqladd = '';
$archiv = 0;
// Sperre
if ($_POST['gesperrt'] != 'on') {
$show = dz_timestamp($_POST['datum'], $_POST['zeit']);
if (!$show) {
$show = 1;
} elseif (isset($_POST['set_time'])) {
$newscreatetime = $show;
$newschangesqladd .= ',news_time = FROM_UNIXTIME(' . $show . '), editor_id = NULL, edit_time = NULL';
debug('TEST: ' . $newscreatetimech);
}
} else {
$show = 0;
}
// Enddatum
if ($_POST['close'] == '0') {
$endtime = 'NULL';
} elseif ($_POST['close'] == '1') {
$endtime = dz_timestamp($_POST['cdatum'], $_POST['czeit']);
} else {
$endtime = dz_timestamp($_POST['cdatum'], $_POST['czeit']);
$archiv = 2;
}
//Grundrechte + Gruppen
if ($um == 'insert' or $um == 'change') {
$grecht = 0;
for($i=0; $i<10; $i++) {
if (isset($_POST['grecht_'.$i])) {
$grecht = $grecht | pow(2, $i);
}
}
$groups = 0;
$sql = db_query("SELECT id FROM prefix_groups");
while ($r = db_fetch_assoc($sql)){
if (isset($_POST['groups_'.$r['id']])) {
$groups = $groups | pow(2, $r['id']);
}
}
}
if ($um == 'insert') {
// insert
$text = escape($_POST['txt'], 'textarea');
if ($_POST['katLis'] == 'neu') {
$_POST['katLis'] = $_POST['kat'];
}
db_query("INSERT INTO `prefix_news` (news_title,user_id,news_time,news_recht,news_groups,news_kat,news_text,html,`show`,archiv,endtime)
VALUES ('" . $_POST['titel'] . "'," . $_SESSION['authid'] . ",FROM_UNIXTIME(".$newscreatetime.")," . $grecht . "," . $groups . ",'" . $_POST['katLis'] . "','" . $text . "','" . $_POST['html'] . "',$show,$archiv,$endtime)");
// insert
} elseif ($um == 'change') {
// edit
$text = escape($_POST['txt'], 'textarea');
if ($_POST['katLis'] == 'neu') {
$_POST['katLis'] = $_POST['kat'];
}
db_query('UPDATE `prefix_news` SET
news_title = "' . escape($_POST['titel'], 'string') . '",
editor_id = "' . $_SESSION['authid'] . '",
edit_time = NOW(),
news_recht = "' . $grecht . '",
news_groups = "' . $groups . '",
news_kat = "' . $_POST['katLis'] . '",
html = "' . $_POST['html'] . '",
`show` = ' . $show . ',
archiv = ' . $archiv . ',
endtime = ' . $endtime . ',
news_text = "' . $text . '"' . $newschangesqladd . ' WHERE news_id = "' . $_POST['newsID'] . '" LIMIT 1');
$edit = $_POST['newsID'];
}
}
// edit
// del
if ($menu->get(1) == 'del') {
db_query('DELETE FROM `prefix_news` WHERE news_id = "' . $menu->get(2) . '" LIMIT 1');
}
// del
// Sperren/Freischalten
if ($menu->getA(1) == 's') {
db_query('UPDATE `prefix_news` SET `show` = IF(`show`>0,0,1) WHERE news_id = "' . $menu->getE(1) . '" LIMIT 1');
}
// Sperren/Freischalten
// Topnews
if ($menu->getA(1) == 't') {
db_query('UPDATE `prefix_allg` SET `v1` = "' . $menu->getE(1) . '" WHERE k = "news" LIMIT 1');
}
// Topnews
// #### A k t i o n e n
// ###
// ##
// #
// #
// ##
// ###
// #### h t m l E i n g a b e n
if (empty ($doNoIn)) {
if ($menu->get(1) != 'edit') {
$FnewsID = '';
$Faktion = 'insert';
$Fueber = '';
$Fstext = '';
$Ftxt = '';
$Fgrecht = 1023;
$Fgroups = 0;
$FkatLis = '';
$Fsub = 'Eintragen';
$Fhtml = '';
$sel0 = 'checked="checked"';
$sel1 = '';
$sel_show = 'checked="checked"';
$datum = date('d.m.Y');
$zeit = date('H:i');
$csel0 = 'checked="checked"';
$csel1 = '';
$csel2 = '';
$cdatum = date('d.m.Y', time() + 604800);
$czeit = date('H:i');
} else {
$row = db_fetch_object(db_query("SELECT * FROM `prefix_news` WHERE news_id = " . $menu->get(2)));
$FnewsID = $row->news_id;
$Faktion = 'change';
$Fueber = str_replace('"', '"', $row->news_title);
$Ftxt = stripslashes($row->news_text);
$Fgrecht = $row->news_recht;
$Fgroups = $row->news_groups;
$FkatLis = $row->news_kat;
$Fsub = 'Ändern';
$Fhtml = $row->html == 1 ? 'switch_html();' : '';
if ($row->show == 0) {
$sel_gesperrt = 'checked="checked"';
$datum = '';
$zeit = '';
} else {
$sel_gesperrt = '';
$row->show = $row->show < 10000 ? time() : $row->show;
$datum = date('d.m.Y', $row->show);
$zeit = date('H:i', $row->show);
}
$sel0 = $sel1 = '';
if ($row->html) {
$sel1 = 'checked="checked"';
} else {
$sel0 = 'checked="checked"';
}
$csel0 = $csel1 = $csel2 = '';
if ($row->archiv == 1) {
$csel2 = 'checked="checked"';
$row->endtime = time() - 1000;
} elseif (is_null($row->endtime)) {
$csel0 = 'checked="checked"';
$row->endtime = time() + 604800;
} elseif ($row->archiv == 2) {
$csel2 = 'checked="checked"';
} else {
$csel1 = 'checked="checked"';
}
$cdatum = date('d.m.Y', $row->endtime);
$czeit = date('H:i', $row->endtime);
}
$tpl = new tpl ('news', 1);
$ar = array (
'NEWSID' => $FnewsID,
'AKTION' => $Faktion,
'UEBER' => $Fueber,
'txt' => $Ftxt,
'SMILIS' => getsmilies(),
// 'grecht' => dbliste($Fgrecht,$tpl,'grecht',"SELECT id,name FROM prefix_grundrechte ORDER BY id DESC"),
'KATS' => getKats($FkatLis),
'FSUB' => $Fsub,
'sel0' => $sel0,
'sel1' => $sel1,
'sel_gesperrt' => $sel_gesperrt,
'datum' => $datum,
'zeit' => $zeit,
'csel0' => $csel0,
'csel1' => $csel1,
'csel2' => $csel2,
'cdatum' => $cdatum,
'czeit' => $czeit,
'xajax' => $xajax->getJavascript()
);
// Grundrechte
$ar['grecht'] = '';
$qry = db_query('SELECT ABS(id) as id, name FROM prefix_grundrechte ORDER BY id');
while ($r = db_fetch_assoc($qry)) {
$ar['grecht'] .= '<span style="white-space: nowrap; margin-right: 5px;"><input type="checkbox" id="grecht_' . $r['id'] . '" name="grecht_' . $r['id'] . '" ' .
(($Fgrecht == ($Fgrecht | pow(2, $r['id']))) ? 'checked="checked"' : '') . ' />' .
'<label for="grecht_' . $r['id'] . '">' . $r['name'] . "</label></span>\n";
}
// Groups
$ar['groups'] = '';
$qry = db_query('SELECT id, name FROM prefix_groups ORDER BY id');
while ($r = db_fetch_assoc($qry)) {
$ar['groups'] .= '<span style="white-space: nowrap; margin-right: 5px;"><input type="checkbox" id="groups_' . $r['id'] . '" name="groups_' . $r['id'] . '" ' .
(($Fgroups == ($Fgroups | pow(2, $r['id']))) ? 'checked="checked"' : '') . ' />' .
'<label for="groups_' . $r['id'] . '">' . $r['name'] . "</label></span>\n";
}
$tpl->set_ar_out($ar, 0);
if (isset($info['ImgMaxBreite'])) {
$tpl->out(2); //BBCode 2.0 Modul
} else {
$tpl->out(1); //BBCode vom Ilchscript
}
$tpl->set_ar_out($ar, 3);
// e d i t , d e l e t e
$abf = 'SELECT * FROM `prefix_news` ORDER BY news_time DESC';
$erg = db_query($abf);
$class = '';
$opts = db_fetch_object(db_query("SELECT v1 as topnews, v2 as koms,v3 as pmempf,v4 as kat FROM prefix_allg WHERE k = 'news'"));
while ($row = db_fetch_object($erg)) {
$class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite');
$tpl->set_ar_out(array ('ID' => $row->news_id,
'class' => $class,
'TITEL' => $row->news_title,
'sperre' => $row->show >= 1 ? 'jep' : 'nop',
'klicks' => $row->klicks,
'sperren' => $row->show >= 1 ? 'Sperren' : 'Freischalten',
'title' => "Ersteller: " . get_n($row->user_id) . " ($row->news_time)" . (is_null($row->editor_id) ? '' : "\nGeändert von: " . get_n($row->editor_id) . " ($row->edit_time)"),
'topnews' => $row->news_id == $opts->topnews ? 'ok' : 'leer',
'archiv' => (($row->archiv == 1) OR ($row->archiv == 2 AND $row->endtime < time())) ? 'A' : 'N'
) , 4);
}
// e d i t , d e l e t e
// Mögliche PM-Empfänger
$pmq = db_query("SELECT a.id, a.name FROM prefix_user a LEFT JOIN prefix_modulerights b ON b.mid = 2 AND b.uid = a.id WHERE a.recht <= -8 OR b.mid IS NOT NULL");
$pmempf = '';
$pmar = explode('#', $opts->pmempf);
while ($r = db_fetch_object($pmq)) {
$sel = in_array($r->id, $pmar) ? 'selected="selected"' : '';
$pmempf .= "<option value=\"$r->id\" $sel>$r->name</option>";
} // while
$tpl->set_ar_out(array (
'html' => $Fhtml,
'tn_koms' => $opts->koms == '1' ? 'ja' : 'nein',
'nadd_kat' => getKats($opts->kat, $opts->kat , true),
'pmempf' => $pmempf
) , 5);
}
$design->footer();
?>
<style type="text/css">
#scrolldiv {
width:400px;
height:600px;
overflow:scroll;
}
</style>
<script type="text/javascript" src="include/includes/ckeditor/ckeditor.js"></script>
<script language="JavaScript" type="text/javascript"><!--
function delcheck ( DELID ) {
var frage = confirm ( "Willst du diesen Eintrag wirklich löschen?" );
if ( frage == true ) {
document.location.href="?news-del-"+DELID;
}
}
function delKcheck ( DELID , NID) {
var frage = confirm ( "Willst du dieses Kommentar wirklich löschen?" );
if ( frage == true ) {
document.location.href="?news-sKoms-"+NID+"-Kdel-"+DELID+"#"+NID;
}
}
function sichtbar(){
if( document.form.katLis.value=="neu"){
document.form.kat.style.visibility="visible";
} else {
document.form.kat.style.visibility="hidden";
}
}
var datum, zeit;
function switch_datum_zeit(){
if (document.forms["form"].gesperrt.checked == false) {
document.forms["form"].datum.disabled = false;
document.forms["form"].zeit.disabled = false;
document.forms["form"].datum.value = datum;
document.forms["form"].zeit.value = zeit;
} else {
datum = document.forms["form"].datum.value;
zeit = document.forms["form"].zeit.value;
document.forms["form"].datum.value = '';
document.forms["form"].zeit.value = '';
document.forms["form"].datum.disabled = true;
document.forms["form"].zeit.disabled = true;
}
}
function switch_html(){
var div = document.getElementById('txtdiv');
var txtarea = document.getElementById('txt');
if (document.forms["form"].html[1].checked || switch_html.arguments[0] == 'true') {
var oldtxt = txtarea.value;
document.getElementById('bbcode_buttons').style.display = 'none';
document.getElementById('smilies').style.display = 'none';
document.getElementById('btn_vorschau').style.display = 'none';
var objCKE = CKEDITOR.replace( 'txt', {
baseHref: 'include/includes/ckeditor/',
height : 400,
filebrowserBrowseUrl: 'include/includes/filemanager/index.html',
filebrowserUploadUrl: 'include/includes/filemanager/index.html'
}) ;
if (switch_html.arguments[0] == 'true') {
document.forms["form"].html[1].checked = true;
objCKE.setData( document.getElementById('vorschau_td').innerHTML );
} else {
objCKE.setData( oldtxt );
}
document.getElementById('vorschau').style.display = 'none';
} else {
var objCKE = CKEDITOR.instances['txt'];
var oldtxt = objCKE.getData();
CKEDITOR.remove(objCKE);
div.innerHTML = '<textarea id="txt" name="txt" rows="15" cols="93" tabindex="2">' + oldtxt + '</textarea>';
document.getElementById('bbcode_buttons').style.display = 'block';
document.getElementById('smilies').style.display = 'block';
document.getElementById('btn_vorschau').style.display = 'inline';
}
}
function close_vorschau(){
document.getElementById('vorschau').style.display = 'none';
}
function show_opts(){
document.getElementById('news_opts_tbl').style.display = 'block';
}
function save_opts(){
var kat = document.forms["news_opts"].nadd_kat.value;
var newsempf = '';
var sel = document.getElementById('pmempf');
var len = sel.options.length
for (var i = 0; i < len; i++) {
if (sel.options[i].selected) {
newsempf += sel.options[i].value + '#';
}
}
xajax_saveopts(newsempf,kat);
document.getElementById('news_opts_tbl').style.display = 'none';
}
function close_opts(){
document.getElementById('news_opts_tbl').style.display = 'none';
}
function new_kat(){
document.getElementById('nadd_kat_td').innerHTML = '<input type="text" value="" name="nadd_kat" />';
document.forms["news_opts"].nadd_kat.focus();
}
//--></script>
{xajax}
<script type="text/javascript" src="include/includes/js/bbcode.js"></script>
<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/news.png" /></td><td width="30"></td><td valign="bottom"><h1>News</h1></td></tr></table>
<hr style="width: 400px; margin: 0px;">
<br /><br />
<table border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">
<table id="vorschau" cellpadding="2" cellspacing="1" border="0" class="border" style="display:none; margin-bottom:10px; width:600px;">
<tr class="Chead" align="center"><td width="600">Vorschau</td></tr>
<tr><td id="vorschau_td" class="Cmite"></td></tr>
<tr class="Cdark"><td><input type="button" value="Schließen" onclick="close_vorschau();" style="margin-left:200px;" /> <input type="button" value="BBCode -> HTML" onclick="switch_html('true');" /></td></tr>
</table>
<form method="POST" name="form" id="form" action="?news">
<input type="hidden" name="um" value="{AKTION}">
<input type="hidden" name="newsID" value="{NEWSID}">
<table cellpadding="2" cellspacing="1" border="0" class="border">
<tr>
<td class="Cmite" align="right"><strong>Titel : </strong></td>
<td class="Cnorm"><input size="50" type="text" name="titel" value="{UEBER}" tabindex="1"></td>
</tr><tr>
<td class="Cmite" align="right" valign="top" height="20"><strong>News : </strong></td>
<td width="600" class="Cnorm" rowspan="2" id="txttd">
<div style="display:block;" id="bbcode_buttons">
<!-- BB Code START -->
{EXPLODE}
<a href="javascript:void(0);" onclick="simple('b')"><img style="padding-left: 4%; float: left;" src="include/images/icons/button.bold.gif" alt="b" title="{_lang_bold}" border="0"></a>
<a href="javascript:void(0);" onclick="simple('i')"><img style="padding-left: 4%; float: left;" src="include/images/icons/button.italic.gif" alt="i" title="{_lang_italic}" border="0"></a>
<a href="javascript:void(0);" onclick="simple('u')"><img style="padding-left: 4%; float: left;" src="include/images/icons/button.underline.gif" alt="u" title="{_lang_underlined}" border="0"></a>
<a href="javascript:void(0);" onclick="simple('code')"><img style="padding-left: 4%; float: left;" src="include/images/icons/button.code.gif" alt="Code" title="{_lang_code}" border="0"></a>
<a href="javascript:void(0);" onclick="simple_liste()"><img style="padding-left: 4%; float: left;" src="include/images/icons/button.insertunorderedlist.gif" alt="{_lang_list}" title="{_lang_list}" border="0"></a>
<a href="javascript:void(0);" onclick="simple('url')"><img style="padding-left: 4%; float: left;" src="include/images/icons/button.link.gif" alt="Url" title="{_lang_link}" border="0"></a>
<a href="javascript:void(0);" onclick="simple('img')"><img style="padding-left: 4%; float: left;" src="include/images/icons/button.image.gif" alt="{_lang_picture}" title="{_lang_picture}" border="0"></a>
<!-- BB Code ENDE -->
{EXPLODE}<script type="text/javascript" src="include/includes/js/BBCodeGlobal.js"></script>{__BBCodeButtons__}{EXPLODE}<br /><br /></div>
<div id="txtdiv"><textarea tabindex="2" id="txt" name="txt" rows="15" cols="93" tabindex="2">{txt}</textarea></span>
</td>
</tr><tr>
<td valign="top" class="Cmite"><div id="smilies" style="display:block;">{SMILIS}</div></td>
</tr><tr>
<td class="Cmite" align="right"><strong>Sichtbar für: </strong><br /><small>(Grundrechte)</small></td>
<td class="Cnorm">{grecht}</td>
</tr><tr>
<td class="Cmite" align="right"><strong>Sichtbar für: </strong><br /><small>(Gruppen/Teams)</small></td>
<td class="Cnorm">{groups}</td>
</tr><tr>
<td class="Cmite" align="right"><strong>Kategorie : </strong></td>
<td class="Cnorm"><select onChange="sichtbar()" name="katLis">{KATS}<option value="neu">Neu:</option></select> <input type="text" name="kat" size="40"></td>
</tr><tr>
<td class="Cmite" align="right"><strong>HTML : </strong></td>
<td class="Cnorm"><input type="radio" name="html" value="0" onchange="switch_html();" {sel0} /><label for="html">BBCode</label><input type="radio" name="html" value="1" onchange="switch_html();" {sel1} /><label for="html">HTML (CKEditor)</label></td>
</tr><tr>
<td class="Cmite" align="right"><strong>gesperrt: </strong></td>
<td class="Cnorm"><input type="checkbox" name="gesperrt" {sel_gesperrt} onchange="switch_datum_zeit();" /> <label for="datum" title="Zeitpunkt ab dem die News sichtbar ist, falls die News nicht gesperrt wird">Datum (TT:MM.YYYY)</label> <input type="input" name="datum" value="{datum}" /> <label for="zeit">Uhrzeit (HH:MM)</label> <input type="input" name="zeit" value="{zeit}" /><br />
<input type="checkbox" name="set_time" id="set_time" /> <label for="set_time">Erstellungszeit der News auf Erscheinungszeit setzen</label> <small>(beim Ändern einer News mit dieser Option wird der Username vom Editierenden und die Editierzeit gelöscht)</small>
</td>
</tr><tr>
<td class="Cmite" align="right"><strong>läuft aus: </strong></td>
<td class="Cnorm"><input type="radio" name="close" value="0" {csel0} /><label for="close">nein</label> <input type="radio" name="close" value="1" {csel1} /><label for="close">sperren</label> <input type="radio" name="close" value="2" {csel2} /><label for="close">Archiv</label>
<br /><label for="cdatum">Datum</label> <input type="input" name="cdatum" value="{cdatum}" /> <label for="czeit">Uhrzeit</label> <input type="input" name="czeit" value="{czeit}" /></td>
</tr><tr class="Cdark">
<td></td>
<td><input type="submit" value="{FSUB}" name="submit"> <input type="button" value="Vorschau" onclick="xajax_vorschau(xajax.getFormValues('form'));" id="btn_vorschau" style="display:inline;" /></td>
</tr>
</table>
</form>
</td><td width="20"> </td><td valign="top">
<table cellpadding="3" cellspacing="1" border="0" class="border">
<tr class="Cdark">
<td><a href="admin.php?news">Neue News erstellen</a></td>
</tr>
</table>
<div id="scrolldiv">
<table cellpadding="3" cellspacing="1" border="0" class="border">
{EXPLODE}
<tr class="{class}">
<td><a href="javascript:void(0);" onclick="xajax_vorschau_id({ID});" title="{title}">{TITEL}</a></td>
<td><a href="#" name="{ID}"></a><a href="javascript:void(0);" onclick="delcheck({ID})"><img src="include/images/icons/del.gif" alt="Löschen" title="Löschen" border="0"></a></td>
<td><a href="?news-edit-{ID}"><img src="include/images/icons/edit.gif" alt="Verändern" title="Verändern" border="0"></a></td>
<td><a href="?news-s{ID}"><img src="include/images/icons/{sperre}.gif" alt="{sperren}" title="{sperren}" border="0"></a></td>
<td align="center"><a href="?news-t{ID}"><img src="include/images/icons/{topnews}.gif" alt="Als Topnews setzen" title="Als Topnews setzen" border="0"></a></td>
<td align="center"><a href="?news-t{ID}"><img src="" alt="" title="" border="0">{klicks}</a></td>
<td><a id="archiv_link_{ID}" href="javascript:void(0);" onclick="xajax_setArchiv({ID},document.getElementById('archiv_link_{ID}').innerHTML);">{archiv}</a></td>
</tr>
{EXPLODE}
</table>
</div>
<table cellpadding="3" cellspacing="1" border="0" class="border">
<tr class="Cdark">
<td><a href="?news-t0">Topnews entfernen</a> | <a href="javascript:void(0);" onclick="show_opts();">Optionen</a></td>
</tr>
</table>
</td></tr></table>
<form id="news_opts">
<table cellpadding="3" cellspacing="1" border="0" class="border" id="news_opts_tbl" style="position:absolute; top:150px; left:540px; width:450px; height:178px; display:none">
<tr height="30" class="Chead"><th colspan="2">News Optionen</th></tr>
<tr height="30"><td class="Cmite" width="250">Kommentare bei Topnews zulassen</td><td width="200" class="Cnorm"><a href="javascript:void(0);" onclick="xajax_tn_koms();" id="tn_koms">{tn_koms}</a></td></tr>
<tr height="30"><td class="Cmite">Kategorie für News einsenden</td><td class="Cnorm" id="nadd_kat_td"><select id="nadd_kat" name="nadd_kat">{nadd_kat}<option onclick="new_kat();">Neu</option></select></td></tr>
<tr height="30"><td class="Cmite">PM-Empfänger bei Newseinsendungen</td><td class="Cnorm"><select id="pmempf" multiple="multiple" name="pmempf[]" />{pmempf}</select></td></tr>
<tr height="30"><td class="Cdark" colspan="2"><input type="button" value="Speichern" onclick="save_opts();" /> <input type="button" value="Schließen" onclick="close_opts();" /></td></tr>
</table></form>
<table cellpadding="0" cellspacing="0"><tr><td>
<div class="info_box" style="height: 85px;">
<b>Kategorie Bild</b>
<br />
<span class="smalfont">
Das Kategorie Bild muss in den Ordner include/images/news/
<br />
Das Bild muss genau wie die Kategorie heissen z.B. wenn die Kategorie
Allgemein heisst dann muss das Bild Allgemein heissen;)...
<br />
Die Endung muss entweder .jpg oder .gif sein bei uns also z.B. Allgemein.jpg
</span>
</div>
</td><td>
<div class="info_box" style="height: 85px;">
<b>Vorschau Funktion</b>
<br />
<span class="smalfont">
Soll nur ein kleinerer Vorschautext angezeigt werden, einfach erst die Vorschau
eingeben und nach der Vorschau dann <b>[PREVIEWENDE]</b> schreiben. Dann den langen
Text eintragen.<br />
Falls Bilder nicht verkleinert werden einfach nochmal auf den Vorschaubutton klicken.
</span>
</div>
</td></tr><tr><td>
<div class="info_box" style="height: 95px;">
<b>BBCode / HTML</b>
<br />
<span class="smalfont">
Du kannst zwischen HTML (FCK Editor) und BBCode umschalten, beachte dass eine direkte Umwandlung
der beiden Formate untereinander nicht möglich ist, also keine Formatierung übernommen werden.<br />
BBCode-News können auch zu HTML News umgewandelt werden (Vorschau benutzen), aber nur diese Richtung ist möglich.
</span>
</div>
</td><td>
<div class="info_box" style="height: 95px;">
<b>Topnews</b>
<br />
<span class="smalfont">
Du kannst genau eine News als Topnews markieren, diese wird dann falls
die Newsseite aufgerufen wird immer oben angezeigt. Das Aussehen ist durch das Template include/templates/news_top.htm festgelegt.
Die News bei dem <img src="include/images/icons/ok.gif" /> steht ist die derzeitige Topnews, durch drücken
auf das leere Feld bei einer News kannst du diese zur Topnews machen.
</span>
</div>
</td></tr>
<tr><td>
<div class="info_box" style="height: 95px;">
<b>Sperren</b>
<br />
<span class="smalfont">
Du kannst eine News sperren (<img src="include/images/icons/nop.gif" />), dann wird sie nicht angezeigt, eingesendete News sind automatisch gesperrt.
Wenn eine News nicht gesperrt ist (<img src="include/images/icons/jep.gif" />), kannst du ein Datum angeben, ab dem die News angezeigt wird.<br />
<u>Beachte:</u> Falls eine News mit Datum gesperrt wird, geht dieses Datum verloren.
</span>
</div>
</td><td>
<div class="info_box" style="height: 95px;">
<b>Archiv</b>
<br />
<span class="smalfont">
Wenn eine News schon etwas älter ist, kannst du sie ins Archiv schieben, damit wird sie nicht mehr bei News angezeigt, sondern im Newsarchiv.<br />
Das ist die Spalte ganz rechts, A steht für ist im Archiv und N für normal bei den News.
</span>
</div>
</td></tr>
<tr><td>
<div class="info_box" style="height: 60px;">
<b>Ablaufdatum</b>
<br />
<span class="smalfont">
Du kannst eine News zu einer bestimmten Zeit ablaufen lassen, sie wird dann entweder gesperrt oder ins Archiv verschoben.
</span>
</div>
</td></tr>
</table>
<script language="JavaScript" type="text/javascript">
<!--
sichtbar();
{html}
//-->
</script>