/** * Zeigt das Formular an, in dem User ihre Einträge machen können * * @param $text Vorbelegung für den text * @param $mail Vorbelegung für die Emailadresse * @param $page Vorbelegung für die Homepage */ function showForm($text = "", $mail = "", $page = "", $fehler = "") { global $allgAr; $tpl = new tpl('gbook.htm'); $ar = array('uname' => $_SESSION['authname'], 'SMILIES' => getsmilies(), 'ANTISPAM' => get_antispam('gbook', 1), 'TXTL' => $allgAr['Gtxtl'], 'TEXT' => $text, 'PAGE' => $page, 'MAIL' => $mail, 'FEHLER' => $fehler); $tpl->set_ar_out($ar, "formular_eintrag"); if (!isset($_SESSION['klicktime_gbook'])) { $_SESSION['klicktime_gbook'] = 0; } }
$Ftxt = ''; $Fgrecht = ''; $FkatLis = ''; $Fsub = 'Eintragen'; } else { $row = db_fetch_object(db_query("SELECT * FROM `prefix_news` WHERE news_id = " . $menu->get(2))); $FnewsID = $row->news_id; $Faktion = 'change'; $Fueber = $row->news_title; $Ftxt = stripslashes($row->news_text); $Fgrecht = $row->news_recht; $FkatLis = $row->news_kat; $Fsub = 'Ändern'; } $tpl = new tpl('news', 1); $ar = array('NEWSID' => $FnewsID, 'AKTION' => $Faktion, 'MPL' => $MPL, '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); $tpl->set_ar_out($ar, 0); // e d i t , d e l e t e $abf = 'SELECT news_id,news_title FROM `prefix_news` ORDER BY news_time DESC LIMIT ' . $anfang . ',' . $limit; $erg = db_query($abf); $class = ''; 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), 1); } // e d i t , d e l e t e $tpl->set_ar_out(array('MPL' => $MPL), 2); }
# Support: www.ilch.de defined('main') or die('no direct access'); $title = $allgAr['title'] . ' :: Gästebuch'; $hmenu = 'Gästebuch'; $design = new design($title, $hmenu); $design->header(); # time sperre in sekunden $timeSperre = $allgAr['Gsperre']; /* gbook id , name , mail , page , ip , time , txt */ switch ($menu->get(1)) { case 1: $tpl = new tpl('gbook.htm'); $ar = array('uname' => $_SESSION['authname'], 'SMILIES' => getsmilies(), 'ANTISPAM' => get_antispam('gbook', 1), 'TXTL' => $allgAr['Gtxtl']); $tpl->set_ar_out($ar, 3); if (!isset($_SESSION['klicktime_gbook'])) { $_SESSION['klicktime_gbook'] = 0; } break; case 2: $dppk_time = time(); if ($_SESSION['klicktime_gbook'] + $timeSperre < $dppk_time and isset($_POST['name']) and isset($_POST['txt']) and trim($_POST['name']) != "" and trim($_POST['txt']) != "" and chk_antispam('gbook') and strlen($_POST['txt']) <= $allgAr['Gtxtl']) { $txt = escape($_POST['txt'], 'textarea'); $name = escape($_POST['name'], 'string'); $mail = escape($_POST['mail'], 'string'); $page = escape($_POST['page'], 'string'); db_query("INSERT INTO prefix_gbook (`name`,`mail`,`page`,`time`,`ip`,`txt`) VALUES ('" . $name . "', '" . $mail . "', '" . $page . "', '" . time() . "', '" . getip() . "', '" . $txt . "')"); $_SESSION['klicktime_gbook'] = $dppk_time; wd('index.php?gbook', $lang['insertsuccessful']);
if (isset($_POST['Gname'])) { $xnn = trim(escape_nickname($_POST['Gname'])); } if ($_SESSION['klicktime'] + 15 > $dppk_time or empty($topic) or empty($txt) or !empty($_POST['priview']) or empty($_POST['Gname']) and !loggedin() or !chk_antispam('newtopic')) { $design = new design($title, $hmenu, 1); $design->header($load); $tpl = new tpl('forum/newtopic'); $name = ''; if (!loggedin()) { $name = '<tr><td class="Cmite"0><b>' . $lang['name'] . '</b></td>'; $name .= '<td class="Cnorm"><input type="text" value="' . unescape($xnn) . '" maxlength="15" name="Gname"></td></tr>'; } if (isset($_POST['priview'])) { $tpl->set_out('txt', bbcode(unescape($txt)), 0); } $ar = array('name' => $name, 'txt' => escape_for_fields(unescape($txt)), 'topic' => escape_for_fields(unescape($topic)), 'fid' => $fid, 'SMILIES' => getsmilies(), 'antispam' => get_antispam('newtopic', 1)); $tpl->set_ar_out($ar, 1); } else { // save toipc $_SESSION['klicktime'] = $dppk_time; $design = new design($title, $hmenu, 0); $design->header($load); if (loggedin()) { $uid = $_SESSION['authid']; $erst = escape($_SESSION['authname'], 'string'); db_query("UPDATE `prefix_user` SET `posts` = `posts`+1 WHERE `id` = " . $uid); } else { $erst = $xnn; $uid = 0; } db_query("INSERT INTO `prefix_topics` (`fid`, `name`, `erst`, `stat`) VALUES ( " . $fid . ", '" . $topic . "', '" . $erst . "', 1 )");
if ($menu->getA(3) == 'z') { $row = db_fetch_object(db_query("SELECT txt,erst FROM prefix_posts WHERE id = " . $menu->getE(3))); $xtext = '[quote=' . escape_nickname($row->erst) . ']' . "\n" . $row->txt . "\n[/quote]"; } if ($menu->getA(3) == 'f') { $r = db_fetch_assoc(db_query("SELECT id,text,title FROM prefix_faqs WHERE id = " . $menu->getE(3))); $xtext = 'FAQ Artikel: [url=index.php?faqs-s' . $r['id'] . '#FAQ' . $r['id'] . ']' . $r['title'] . '[/url]' . "\n" . unescape($r['text']); } if (isset($_POST['priview'])) { $tpl->set_out('txt', bbcode(unescape($txt)), 0); } if (empty($txt)) { $txt = $xtext; } $tpl = new tpl('forum/newpost'); $ar = array('txt' => escape_for_fields(unescape($txt)), 'tid' => $tid, 'name' => $name, 'SMILIES' => getsmilies(), 'antispam' => get_antispam('newpost', 1)); $tpl->set_ar_out($ar, 1); $erg = db_query('SELECT erst, txt FROM `prefix_posts` WHERE tid = "' . $tid . '" ORDER BY time DESC LIMIT 0,5'); while ($row = db_fetch_assoc($erg)) { $row['txt'] = bbcode($row['txt']); $tpl->set_ar_out($row, 2); } $tpl->out(3); } else { # save post $_SESSION['klicktime'] = $dppk_time; $design = new design($title, $hmenu, 1); $design->header(); if (loggedin()) { $uid = $_SESSION['authid']; $erst = escape($_SESSION['authname'], 'string');
$show_formular = false; } else { echo 'Dieser Empfänger konnte nicht gefunden werden'; } } if ($show_formular === true) { $name = ''; $empfid = 0; if (isset($_REQUEST['empfid'])) { $empfid = escape($_REQUEST['empfid'], 'integer'); } $empfid = escape($empfid, 'integer'); if ($empfid > 0) { $name = db_result(db_query("SELECT `name` FROM `prefix_user` WHERE `id` = " . $empfid), 0); } $ar = array('name' => $name, 'SMILIES' => getsmilies(), 'TXT' => $txt, 'BET' => $bet); if (isset($_REQUEST['text'])) { $ar['TXT'] = unescape(escape($_REQUEST['text'], 'textarea')); } if (isset($_REQUEST['anhang'])) { $x = explode("\n", unescape(escape(urldecode($_REQUEST['anhang']), 'textarea'))); $n = ''; for ($i = 0; $i <= count($x); $i++) { if (empty($x[$i])) { continue; } $n .= '> ' . $x[$i] . "\n"; } $ar['TXT'] .= "\n\n" . $n; } if (isset($_POST['bet'])) {
if (!isset($_SESSION['klicktime'])) { $_SESSION['klicktime'] = 0; } $txt = ''; if (isset($_POST['txt'])) { $txt = trim(escape($_POST['txt'], 'textarea')); } if ($_SESSION['klicktime'] > $dppk_time - 15 or empty($txt) or !empty($_POST['priview'])) { $tpl = new tpl('forum/postedit'); if (isset($_POST['priview'])) { $tpl->set_out('txt', bbcode(unescape($txt)), 0); } if (empty($txt)) { $txt = $row->txt; } $ar = array('tid' => $tid, 'oid' => $oid, 'txt' => isset($_POST['priview']) ? escape_for_fields(unescape($txt)) : escape_for_fields($txt), 'SMILIES' => getsmilies()); $tpl->set_ar_out($ar, 1); $erg = db_query('SELECT `erst`, `txt` FROM `prefix_posts` WHERE `tid` = "' . $tid . '" ORDER BY `time` DESC LIMIT 0,5'); while ($row = db_fetch_assoc($erg)) { $row['txt'] = bbcode($row['txt']); $tpl->set_ar_out($row, 2); } $tpl->out(3); } else { $s = preg_quote($lang['postlastchangedby']); if (preg_match("/.*" . $s . " ([^\\ ])* am \\d\\d\\.\\d\\d\\.\\d\\d\\d\\d - \\d\\d:\\d\\d:\\d\\d\$/", $txt)) { $txt = preg_replace("/" . $s . " ([^\\ ])* am \\d\\d\\.\\d\\d\\.\\d\\d\\d\\d - \\d\\d:\\d\\d:\\d\\d\$/", $lang['postlastchangedby'] . ' ' . $_SESSION['authname'] . ' am ' . date("d.m.Y - H:i:s"), $txt); } else { $txt .= "\n\n\n" . $lang['postlastchangedby'] . ' ' . $_SESSION['authname'] . ' am ' . date("d.m.Y - H:i:s"); } db_query("UPDATE `prefix_posts` SET `txt` = '" . $txt . "' WHERE `id` = " . $oid);
function eingabe() { if ($this->shconfig('hgrund') == '1') { $ein = 'style="background-color:#' . $this->shconfig('hfinput') . '"'; } else { $ein = ''; } if (loggedin()) { if ($this->shconfig('smilies') == '1') { echo '<center>' . getsmilies() . '<br />'; if ($this->shconfig('bbfett') == '1') { echo '<a href="javascript:simple(\'b\')"><img src="include/images/icons/button.bold.gif" alt="Fett" border="0" /></a>'; } if ($this->shconfig('bbkursiv') == '1') { echo '<a href="javascript:simple(\'i\')"><img src="include/images/icons/button.italic.gif" alt="Kursiv" border="0" /></a>'; } if ($this->shconfig('bbunter') == '1') { echo '<a href="javascript:simple(\'u\')"><img src="include/images/icons/button.underline.gif" alt="Unterstrich" border="0" /></a>'; } if ($this->shconfig('bblink') == '1') { echo '<a href="javascript:simple(\'url\')"><img src="include/images/icons/button.link.gif" alt="Link" border="0" /></a>'; } echo '</center>'; } echo '<form autocomplete="off" style="display:inline" method="post" action="javascript: send();" id="form"> <input type="text" name="txt" ' . $ein . ' id="txt" autocomplete="off" size="' . $this->shconfig('size') . '" maxlength="' . $this->shconfig('mtext') . '" onselect="" onclick="" onkeyup=""> </form>'; } elseif ($this->shconfig('gast') == '1') { if ($this->shconfig('smilies') == '1') { echo getsmilies(); } echo '<form autocomplete="off" style="display:inline" method="post" action="javascript: sendG();" id="form">'; if ($this->shconfig('spam') == '1') { $text = '<p>Bitte Häckchen setzte, ansonsten wird ihr Eintrag nicht abgesendet</p>'; echo 'SpamSchutz:<br /> <a href="" onmouseout="hideTooltip()" onmouseover="showTooltip(event,\'' . $text . '\') ;return false"> ? </a> <input type="checkbox" name="checkbox" id="checkbox" value="aktive" /> <br />'; } echo '<input type="text" name="txt" ' . $ein . ' id="txt" autocomplete="off" size="' . $this->shconfig('size') . '" maxlength="' . $this->shconfig('mtext') . '" onselect="" onclick="" onkeyup=""> </form>'; } }
$Ftxt = ''; $Fgrecht = ''; $FkatLis = ''; $Fsub = 'Eintragen'; } else { $row = db_fetch_object(db_query("SELECT * FROM `prefix_news` WHERE `news_id` = " . $menu->get(2))); $FnewsID = $row->news_id; $Faktion = 'change'; $Fueber = $row->news_title; $Ftxt = stripslashes($row->news_text); $Fgrecht = $row->news_recht; $FkatLis = $row->news_kat; $Fsub = 'Ändern'; } $tpl = new tpl('news', 1); $ar = array('NEWSID' => $FnewsID, 'AKTION' => $Faktion, 'MPL' => $MPL, '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, 'ANTISPAM' => get_antispam('adminuser_action', 0, true)); $tpl->set_ar_out($ar, 0); // e d i t , d e l e t e $abf = 'SELECT `news_id`,`news_title` FROM `prefix_news` ORDER BY `news_time` DESC LIMIT ' . $anfang . ',' . $limit; $erg = db_query($abf); $class = ''; 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), 1); } // e d i t , d e l e t e $tpl->set_ar_out(array('MPL' => $MPL), 2); }