function show_sitemap($q, $lv, $table, $menu, $where, $was) { $limit = 200; $page = $menu->getA(2) == 'p' ? $menu->getE(2) : 1; $MPL = db_make_sites($page, $where, $limit, '?sitemap-' . $menu->get(1), $table); $anfang = ($page - 1) * $limit; $q = db_query($q . " LIMIT " . $anfang . "," . $limit); $tpl = new tpl('sitemap'); $l = ''; while ($r = db_fetch_row($q)) { $l .= $tpl->list_get('links', array(str_replace('{id}', $r[0], $lv), $r[1])); } $tpl->set_ar_out(array('MPL' => $MPL, 'site' => $was, 'links' => $l), 1); }
$lang['vote']; ?> </b></td> </tr> <?php $breite = 200; if ($_SESSION['authright'] <= -1) { $woR = '>= "1"'; } else { $woR = '= "1"'; } $limit = 3; // Limit $page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1; $MPL = db_make_sites($page, 'WHERE `recht` ' . $woR, $limit, "?vote", 'poll'); $anfang = ($page - 1) * $limit; $class = ''; $erg = db_query('SELECT * FROM `prefix_poll` WHERE `recht` ' . $woR . ' ORDER BY `poll_id` DESC LIMIT ' . $anfang . ',' . $limit); while ($fraRow = db_fetch_object($erg)) { $maxRow = db_fetch_object(db_query('SELECT MAX(`res`) as `res` FROM `prefix_poll_res` WHERE `poll_id` = "' . $fraRow->poll_id . '"')); $gesRow = db_fetch_object(db_query('SELECT SUM(`res`) as `res` FROM `prefix_poll_res` WHERE `poll_id` = "' . $fraRow->poll_id . '"')); $max = $maxRow->res; $ges = $gesRow->res; $textAr = explode('#', $fraRow->text); if ($fraRow->recht == 2) { $inTextAr = $_SESSION['authid']; } elseif ($fraRow->recht == 1) { $inTextAr = $_SERVER['REMOTE_ADDR']; } echo '<tr><td class="Cdark"><b>' . $fraRow->frage . '</b></td></tr>';
} else { echo 'Datum stimmt nicht, bitte im Format DD.MM.YYYY eingeben also z.B. 29.12.2005<br />'; } } if (!empty($_REQUEST['pkey'])) { $erg = db_query("SELECT `id`,DATE_FORMAT(`date`,'%d.%m.%Y') as `date`,`title`,`txt` FROM `prefix_history` WHERE `id` = '" . $_GET['pkey'] . "'"); $_ilch = db_fetch_assoc($erg); $_ilch['pkey'] = $_REQUEST['pkey']; } else { $_ilch = array('pkey' => '', 'date' => date('d.m.Y'), 'title' => '', 'txt' => ''); } $_ilch['ANTISPAM'] = get_antispam('adminuser_action', 0, true); $tpl->set_ar_out($_ilch, 0); if (empty($_GET['page'])) { $_GET['page'] = 1; } $limit = 20; $class = ''; $MPL = db_make_sites($_GET['page'], '', $limit, 'admin.php?history', 'history'); $anfang = ($_GET['page'] - 1) * $limit; $abf = "SELECT `id`,DATE_FORMAT(`date`,'%d.%m.%Y') as `date`,`title` FROM `prefix_history` ORDER BY `date` LIMIT " . $anfang . "," . $limit; $erg = db_query($abf); while ($row = db_fetch_assoc($erg)) { $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite'; $row['class'] = $class; $tpl->set_ar($row); $tpl->out(1); } $tpl->set('MPL', $MPL); $tpl->out(2); $design->footer();
$q2 = "SELECT DISTINCT `b`.`id` as `fid`, `a`.`name` as `titel`, `a`.`id` as `id`, MIN(`c`.`id`) AS `firstnew`, `d`.`name` as `author`\n FROM `prefix_topics` `a`\n LEFT JOIN `prefix_forums` `b` ON `b`.`id` = `a`.`fid`\n LEFT JOIN `prefix_posts` `c` ON `c`.`tid` = `a`.`id`\n LEFT JOIN `prefix_user` `d` ON `c`.`erstid` = `d`.`id`\n LEFT JOIN `prefix_groupusers` `vg` ON `vg`.`uid` = " . $_SESSION['authid'] . " AND `vg`.`gid` = `b`.`view`\n LEFT JOIN `prefix_groupusers` `rg` ON `rg`.`uid` = " . $_SESSION['authid'] . " AND `rg`.`gid` = `b`.`reply`\n LEFT JOIN `prefix_groupusers` `sg` ON `sg`.`uid` = " . $_SESSION['authid'] . " AND `sg`.`gid` = `b`.`start`\n WHERE (((`b`.`view` >= " . $_SESSION['authright'] . " AND `b`.`view` <= 0) OR\n (`b`.`reply` >= " . $_SESSION['authright'] . " AND `b`.`reply` <= 0) OR\n (`b`.`start` >= " . $_SESSION['authright'] . " AND `b`.`start` <= 0)) OR\n (`vg`.`fid` IS NOT NULL OR `rg`.`fid` IS NOT NULL OR `sg`.`fid` IS NOT NULL OR " . $_SESSION['authright'] . " = -9))\n AND `c`.`time` >= " . $_SESSION['lastlogin'] . "\n GROUP BY `b`.`id`,`a`.`id`, `a`.`name`\n ORDER BY `c`.`time` DESC"; $x = time() - 3600 * 24 * 360; if ($such == 'aubt') { $where = "`c`.`time` >= " . $x . " AND `a`.`rep` = 0"; $gAnz = @db_result(db_query(str_replace('{WHERE}', $where, str_replace('{SELECT}', ' COUNT(DISTINCT `a`.`id`)', $q))), 0); $q = str_replace('{WHERE}', $where, str_replace('{SELECT}', $s, $q)); } elseif ($such == 'augt') { $where = "`c`.`time` >= " . $x . " AND `c`.`time` >= " . $_SESSION['lastlogin']; $gAnz = @db_result(db_query(str_replace('{WHERE}', $where, str_replace('{SELECT}', ' COUNT(DISTINCT `a`.`id`)', $q))), 0); $q = str_replace('{WHERE}', $where, str_replace('{SELECT}', $s, $q2)); } elseif ($such == 'aeit') { $where = "`c`.`time` >= " . $x . " AND `c`.`erstid` = " . $uid; $gAnz = @db_result(db_query(str_replace('{WHERE}', $where, str_replace('{SELECT}', ' COUNT(DISTINCT `a`.`id`)', $q))), 0); $q = str_replace('{WHERE}', $where, str_replace('{SELECT}', $s, $q)); } $MPL = db_make_sites($page, "", $limit, 'index.php?forum-' . $such . ($such == 'aeit' ? '-' . $uid : ''), "", $gAnz); $tpl = new tpl('forum/search'); $q = db_query($q . " LIMIT " . $anfang . "," . $limit); $class = ''; $tpl->set_out('gAnz', $gAnz, 0); while ($r = db_fetch_assoc($q)) { $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite'; $r['class'] = $class; $r['ctime'] = db_result(db_query("SELECT MAX(`time`) FROM `prefix_posts` WHERE `tid` = " . $r['id']), 0, 0); $r['ord'] = forum_get_ordner($r['ctime'], $r['id'], $r['fid']); $r['link'] = 'forum-showposts-' . $r['id']; if ($menu->get(1) == 'aeit') { $r['author'] = ''; } elseif ($such == 'aubt') { $r['author'] = ' ' . $lang['from'] . ' ' . $r['author']; } else {
$wheres[] = 'mtyp = "' . escape($_POST['typ'], 'string') . '"'; } else { $mtyp = dblistee('', "SELECT DISTINCT `mtyp`,`mtyp` FROM `prefix_wars` " . (count($wheres) ? $sqla . implode(' AND ', $wheres) : '') . " ORDER BY `mtyp`"); } $tpl->set_ar_out(array('tid' => $teams, 'game' => $game, 'typ' => $mtyp, 'wlp' => $wlp), 3); if ($menu->get(1) == 'last') { $tpl->out(4); $sqla = 'WHERE status = 3 ' . (!empty($wheres) ? ' AND ' . implode(' AND ', $wheres) : ''); // seiten funktion $limit = $allgAr['wars_last_limit']; // Limit if (isset($_POST['page']) and is_numeric($_POST['page']) and $_POST['page'] >= 1) { $menu->set_url(2, 'p' . intval($_POST['page'])); } $page = $menu->getA(2) == 'p' ? $menu->getE(2) : 1; $MPL = db_make_sites($page, $sqla, $limit, "?wars-last", 'wars'); $MPL = preg_replace('%-p(\\d+)"%', '$0 onclick="return loadLWPage($1);"', $MPL); $anfang = ($page - 1) * $limit; // seiten funktion $farbe1wlpar = array(1 => 'C8E1B8', 2 => 'D8B9B9', 3 => 'FDFBB7'); $farbe2wlpar = array(1 => '00FF00', 2 => 'FF0000', 3 => 'FFFF00'); $erg = db_query("SELECT a.owp,a.opp,a.wlp,a.land,a.mtyp,a.game,a.id,a.gegner,a.page,b.name as team,DATE_FORMAT(datime,'%d.%m.%Y') as time FROM prefix_wars a left join prefix_groups b ON a.tid = b.id " . $sqla . " ORDER BY a.datime DESC, id DESC LIMIT " . $anfang . "," . $limit); while ($row = db_fetch_assoc($erg)) { $row['erg'] = $row['opp'] . ':' . $row['owp']; $row['farbe'] = $farbe1wlpar[$row['wlp']]; $row['farbe2'] = $farbe2wlpar[$row['wlp']]; if ($class == 'Cmite') { $class = 'Cnorm'; } else { $class = 'Cmite'; }
$design = new design($title, $hmenu, 1); $design->addheader('<link rel="stylesheet" type="text/css" href="include/includes/css/uprofil/uprofil.css">'); $design->addheader('<script type="text/javascript" src="include/includes/js/uprofil.js"></script>'); $design->addheader('<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>'); $design->addheader('<script type="text/javascript" src="include/includes/js/jquery.textareaAutoResize.js"></script>'); $design->addheader('<script type="text/javascript" src="include/includes/js/bbcode.js"></script>'); $design->header(); //Header include __DIR__ . DIRECTORY_SEPARATOR . 'header.php'; $tpl = new tpl('uprofil/friends.htm'); $FAnzahl = db_count_query('SELECT count(id) FROM prefix_friends WHERE uid = ' . $uid); $limit = 6; // Limit $page = $menu->getA(3) == 'p' ? $menu->getE(3) : 1; $anfang = ($page - 1) * $limit; $MPL = db_make_sites($page, 'WHERE uid = ' . $uid, $limit, '?user-friends-' . $uid, 'friends'); $abfF = 'SELECT u.*, f.* FROM prefix_friends f LEFT JOIN prefix_user u ON u.id = f.fid WHERE f.uid = ' . $uid . ' ORDER BY f.id ASC LIMIT ' . $anfang . ',' . $limit; $ergF = db_query($abfF); if ($FAnzahl > 0) { $tpl->out(0); while ($rowF = db_fetch_assoc($ergF)) { $rowF['FNAME'] = '<a href="?user-details-' . $rowF['fid'] . '">' . $rowF['name'] . '</a>'; if (file_exists($rowF['avatar'])) { $rowF['AVATAR'] = '<img src="' . $rowF['avatar'] . '" width="80" height="80" border="0">'; } else { $rowF['AVATAR'] = '<img src="include/images/userprofil/avatar/nouser.png" width="75" height="75" border="0">'; } $countFriends = db_count_query('SELECT count(id) FROM prefix_friends WHERE uid = ' . $rowF['fid']); if ($countFriends == 1) { $langFriends = 'Freund'; } else {
@chmod($bild_url, 0777); db_query("INSERT INTO prefix_usergallery (uid,name,endung,besch) VALUES (" . $uid . ",'" . $name . "','" . $endung . "','" . $besch . "')"); $bild_thumb = 'include/images/usergallery/img_thumb_' . $id . '.' . $endung; create_thumb($bild_url, $bild_thumb, $allgAr['gallery_preview_width']); @chmod($bild_thumb, 0777); echo '<b>Datei ' . $name . '.' . $endung . ' erfolgreich hochgeladen</b><br />'; $page = $_SERVER["HTTP_HOST"] . dirname($_SERVER["SCRIPT_NAME"]); echo 'Bildlink: <a target="_blank" href="http://' . $page . '/' . $bild_url . '">http://' . $page . '/' . $bild_url . '</a><br />'; echo 'Oder klein: <a target="_blank" href="http://' . $page . '/' . $bild_thumb . '">http://' . $page . '/' . $bild_thumb . '</a><br /><br />'; } } } // bilder abfragen $limit = $img_per_site; $page = $menu->getA(3) == 'p' ? $menu->getE(3) : 1; $MPL = db_make_sites($page, '', $limit, 'index.php?user-usergallery-' . $uid, "usergallery` WHERE uid = " . $uid); $anfang = ($page - 1) * $limit; $erg = db_query("SELECT `name`, `besch`, `endung`, `id` FROM `prefix_usergallery` WHERE `uid` = " . $uid . " ORDER BY `id` DESC LIMIT " . $anfang . "," . $limit); $tpl->set('imgperline', $allgAr['gallery_imgs_per_line']); $tpl->set('MPL', $MPL); $tpl->out(0); $class = 'Cnorm'; $i = 0; if (db_num_rows($erg) > 0) { while ($row = db_fetch_assoc($erg)) { $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite'; $row['class'] = $class; $row['besch'] = unescape($row['besch']); if (loggedin() and (is_siteadmin() or $uid == $_SESSION['authid'])) { $row['besch'] = '<a href=\'index.php?user-usergallery-' . $uid . '-p' . $page . '-d' . $row['id'] . '\'><img src=\'include/images/icons/del.gif\' border=\'0\' alt=\'löschen\' title=\'löschen\' /></a> ' . $row['besch']; }
} } } else { echo 'antihack'; } exit; } } $title = $allgAr['title'] . ' :: Shoutbox ' . $lang['archiv']; $hmenu = 'Shoutbox ' . $lang['archiv']; $design = new design($title, $hmenu); $design->header(); $data = array(); $page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1; $limit = $allgAr['sb_archive_limit']; $mpl = db_make_sites($page, '', $limit, 'index.php?shoutbox', 'shoutbox'); $erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC LIMIT ' . ($page - 1) * $limit . ', ' . $limit); while ($row = db_fetch_assoc($erg)) { $row['textarea'] = BBCode_onlySmileys($row['textarea'], $allgAr['sb_maxwordlength']); $time = strtotime($row['time']); if ($time != 0) { $dateformat = date('d.m.Y') == date('d.m.Y', $time) ? 'H:i' : 'd.m. - H:i'; $row['time'] = date($dateformat, $time); } else { $row['time'] = 0; } $data[$row['id']] = $row; } require_once 'include/includes/class/iSmarty.php'; $smarty = new iSmarty(); $smarty->assign(array('data' => $data, 'lang' => $lang, 'siteadmin' => is_siteadmin(), 'antihack' => get_antispam('shoutboxarchive', 0, true), 'multipages' => $mpl));
<?php defined('main') or die('no direct access'); $uid = intval($menu->get(2)); $limit = 5; // Limit $page = $menu->getA(3) == 'p' ? $menu->getE(3) : 1; $anfang = ($page - 1) * $limit; $MPL = db_make_sites($page, 'WHERE uid = ' . $uid, $limit, '?user-details-' . $uid, 'usergbook'); $abfGB = 'SELECT * FROM prefix_usergbook WHERE uid = ' . $uid . ' ORDER BY datetime DESC LIMIT ' . $anfang . ',' . $limit; $ergGB = db_query($abfGB); $GBAnzahl = db_count_query('SELECT count(uid) FROM prefix_usergbook WHERE uid = ' . $uid); $tpl = new tpl('uprofil/pinnwand.htm'); if (loggedin()) { if ($_SESSION['authid'] == $uid) { $textareaStatus = 'Schreib, was Du gerade machst.'; } else { $textareaStatus = 'Hinterlasse eine Nachricht.'; } // gibt die Smilies zurück function getPinnwadSmilies() { global $lang; $i = 0; $b = '<script language="JavaScript" type="text/javascript">function moreSmilies () { var x = window.open("about:blank", "moreSmilies", "width=250,height=200,status=no,scrollbars=yes,resizable=yes"); '; $a = ''; $erg = db_query('SELECT emo, ent, url FROM `prefix_smilies`'); while ($row = db_fetch_object($erg)) { $b .= 'x.document.write ("<a href=\\"javascript:opener.put(\'' . addslashes(addslashes($row->ent)) . '\')\\">");'; $b .= 'x.document.write ("<img style=\\"border: 0px; padding: 5px;\\" src=\\"include/images/smiles/' . $row->url . '\\" title=\\"' . $row->emo . '\\"></a>");'; if ($i < 15) {
$Frecht = ''; $Fsub = 'Eintragen'; } $arm = array(); for ($i = 0; $i < 60; $i++) { $arm[$i] = $i; } $ars = array(); for ($i = 0; $i < 24; $i++) { $ars[$i] = $i; } $tpl = new tpl('kalender.htm', 1); $limit = 30; // Limit $page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1; $MPL = db_make_sites($page, '', $limit, "?kalender", 'kalender'); $anfang = ($page - 1) * $limit; $aus = array('AKTION' => $Faktion, 'MPL' => $MPL, 'EID' => $Fid, 'TITLE' => $Ftitle, 'TEXT' => $Ftext, 'stunden' => arliste($Fhours, $ars, $tpl, 'stunden'), 'minuten' => arliste($Fmins, $arm, $tpl, 'minuten'), 'zende' => $Fzende, 'begind' => $Fbegind, 'recht' => dbliste($Frecht, $tpl, 'recht', "SELECT id,name FROM prefix_grundrechte ORDER BY id DESC"), 'FSUB' => $Fsub); $tpl->set_ar_out($aus, 0); if (!isset($_GET['edit'])) { $tpl->out(1); } else { $tpl->out(2); } $tpl->out(3); unset($aus); //Liste $result = db_query('SELECT gid,id,title,time FROM `prefix_kalender` ORDER BY time DESC LIMIT ' . $anfang . ',' . $limit); while ($row = db_fetch_assoc($result)) { $aus = array('ID' => $row['id'], 'DATE' => date('d.m.Y', $row['time']), 'TIME' => date('H:i', $row['time']), 'TITLE' => $row['title'], 'GID' => $row['gid']); $tpl->set_ar_out($aus, 4);
$q = ''; if (isset($_REQUEST['q'])) { $q = escape($_REQUEST['q'], 'string'); } $tpl = new tpl('user/user', 1); $tpl->set('anzmods', db_result(db_query("SELECT COUNT(*) FROM `prefix_modules` WHERE `fright` = 1"), 0)); $tpl->set('ANTISPAM', get_antispam('adminuser_action', 0, true)); $tpl->set_out('q', unescape($q), 0); $q = str_replace('*', '%', $q); if (strpos($q, '%') === false) { $q = $q . '%'; } $limit = 15; // Limit $page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1; $MPL = db_make_sites($page, "WHERE `name` LIKE '" . $q . "'", $limit, 'admin.php?user', 'user'); $anfang = ($page - 1) * $limit; $class = ''; $grundrechte = simpleArrayFromQuery('SELECT `id`,`name` FROM `prefix_grundrechte` ORDER BY `id` ASC'); $users = allRowsFromQuery('SELECT `name`,`recht`,`id` FROM `prefix_user` WHERE `name` LIKE "' . $q . '" ORDER BY `recht`,`posts` DESC LIMIT ' . $anfang . ',' . $limit, 'id'); $userids = array_keys($users); $modulerights = allRowsFromQuery('SELECT * FROM `prefix_modulerights` WHERE `uid` < 1 OR `uid` IN (' . implode(',', $userids) . ') ORDER BY `uid`'); $modulenames = simpleArrayFromQuery('SELECT `id`, `name` FROM `prefix_modules` WHERE `fright` = 1'); foreach ($users as $row) { $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite'; $row['class'] = $class; $row['grouplist'] = user_get_group_list($row['id']); $row['modslist'] = user_get_mod_list($row['id'], $row['recht'], $modulenames, $modulerights); if (strlen($row['modslist']) > 90) { $row['modslist'] = substr($row['modslist'], 0, 87) . '...'; }
$tpl->set_ar_out($outar, 1); $design->footer(); } break; default: // Gegnerliste ausgeben $limit = 15; $page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1; $anfang = ($page - 1) * $limit; if (isset($_POST['submit'])) { $suchstr = escape($_POST['suche'], 'string'); $WHERE = "WHERE name LIKE '%" . $suchstr . "%' OR tag LIKE '%" . $suchstr . "%'"; } else { $WHERE = ''; } $outar['siteindex'] = db_make_sites($page, $WHERE, $limit, 'admin.php?opponents', 'opponents'); $listqry = db_query("SELECT * FROM `prefix_opponents` " . $WHERE . " ORDER BY name LIMIT " . $anfang . ", " . $limit . " "); while ($listrow = db_fetch_assoc($listqry)) { $outar['gegnerliste'] .= ' <tr> <td><img src="include/images/opponents/thumb_' . $listrow['logo'] . '" /></td> <td><a href="admin.php?opponents-edit-' . $listrow['id'] . '"><img src="include/images/icons/edit.png" onClick="openEditOpp();"/></a> <img src="include/images/icons/del.png" style="cursor: pointer; cursor: hand;" onClick="openloschfrage(' . $listrow['id'] . ')"/></td> <td><b>' . $listrow['name'] . '</b></td> <td>' . $listrow['tag'] . '</td> <td><a href="' . $listrow['page'] . '" target="_blank">' . $listrow['page'] . '</a></td> <td><img src="http://status.icq.com/online.gif?icq=' . $listrow['icq'] . '&img=5" />' . $listrow['icq'] . '</td> </tr> '; } $outar['ANTISPAM'] = get_antispam('adminuser_action', 0, true);
$tpl->set_ar_out($_ilch, 0); $page = $menu->getA(2) == 'p' ? $menu->getE(2) : 1; $class = ''; if ($page == 1) { $abf = "SELECT `id`,`gegner`,`game` FROM `prefix_wars` WHERE `status` = 1 ORDER BY `id` DESC"; $erg = db_query($abf); while ($r = db_fetch_assoc($erg)) { $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite'; $r['class'] = $class; $r['game'] = get_wargameimg($r['game']); $tpl->set_ar($r); $tpl->out(1); } } $limit = 20; $MPL = db_make_sites($page, 'WHERE status = 2', $limit, 'admin.php?wars-next', 'wars'); $anfang = ($page - 1) * $limit; $abf = "SELECT `id`,`gegner`,`game` FROM `prefix_wars` WHERE `status` = 2 ORDER BY `id` DESC LIMIT " . $anfang . "," . $limit; $erg = db_query($abf); while ($row = db_fetch_assoc($erg)) { $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite'; $row['class'] = $class; $row['game'] = get_wargameimg($row['game']); $tpl->set_ar($row); $tpl->out(2); } $tpl->set('MPL', $MPL); $tpl->out(3); $design->footer(); break; case 'info':
$tpl->set('msgColor', '#FF0000'); $tpl->set('Message', 'Badword existiert schon in der Datenbank!'); } else { db_query("INSERT INTO\r\n\t\t\t\t\t\t\tprefix_bbcode_badword\r\n\t\t\t\t\t\t\t\t(fcBadPatter,fcBadReplace)\r\n\t\t\t\t\t\t\tVALUES\r\n\t\t\t\t\t\t\t\t('" . $_POST['BBCode_BadPatter'] . "','" . $_POST['BBCode_BadReplace'] . "');"); $tpl->set('msgColor', '#0033FF'); $tpl->set('Message', 'Badword wurde erfolgreich gespeichert!'); } } // > Badword Löschen! if ($menu->get(2) == "delete") { db_query('DELETE FROM `prefix_bbcode_badword` WHERE `fnBadwordNr` = "' . $menu->get(3) . '"'); } // > Ausgabe der Liste! $limit = 15; $page = $menu->getA(2) == 'p' ? $menu->getE(2) : 1; $MPL = db_make_sites($page, '', $limit, "admin.php?bbcode-badword", 'bbcode_badword'); $anfang = ($page - 1) * $limit; // > Seitenzahlen ausgeben! $tpl->set_ar_out(array('MPL' => $MPL), 0); unset($sql); $sql = db_query("SELECT\r\n\t\t\t\t\t\t\t`fnBadwordNr`,\r\n\t\t\t\t\t\t\t`fcBadPatter`,\r\n\t\t\t\t\t\t\t`fcBadReplace`\r\n\t\t\t\t\t\t FROM\r\n\t\t\t\t\t\t\t `prefix_bbcode_badword`\r\n\t\t\t\t\t\t ORDER BY\r\n\t\t\t\t\t\t \t`fnBadwordNr` DESC\r\n\t\t\t\t\t\t LIMIT " . $anfang . "," . $limit); $class = ''; while ($row = db_fetch_object($sql)) { $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite'; $tpl->set_ar_out(array('dbId' => $row->fnBadwordNr, 'CLASS' => $class, 'dbBadword' => $row->fcBadPatter, 'dbReplace' => $row->fcBadReplace), 1); } // > Seitenzahlen ausgeben! $tpl->set_ar_out(array('MPL' => $MPL), 2); break; } if (!isset($design)) {
$r1['zahl'] = $anz - $i; $r1['text'] = bbcode($r1['text']); if (has_right(-7, 'gbook')) { $r1['text'] .= '<a href="index.php?gbook-show-' . $id . '-d' . $r1['id'] . '"><img src="include/images/icons/del.gif" alt="' . $lang['delete'] . '" border="0" title="' . $lang['delete'] . '" /></a>'; } $tpl->set_ar_out($r1, 5); $i++; } $tpl->out(6); } break; default: $limit = $allgAr['gbook_posts_per_site']; // Limit $page = $menu->getA(1) == 'p' ? escape($menu->getE(1), 'integer') : 1; $MPL = db_make_sites($page, "", $limit, "?gbook", 'gbook'); $anfang = ($page - 1) * $limit; $tpl = new tpl('gbook.htm'); $ei1 = @db_query("SELECT COUNT(ID) FROM prefix_gbook"); $ein = @db_result($ei1, 0); $ar = array('EINTRAGE' => $ein); $tpl->set_ar_out($ar, 0); $erg = db_query("SELECT * FROM prefix_gbook ORDER BY time DESC LIMIT " . $anfang . "," . $limit) or die(db_error()); while ($row = db_fetch_object($erg)) { $page = ''; $mail = ''; if ($row->page) { $row->page = get_homepage($row->page); $page = ' <a href="' . $row->page . '" target="_blank"><img src="include/images/icons/page.gif" border="0" alt="Homepage ' . $lang['from'] . ' ' . $row->name . '"></a>'; } if ($row->mail) {
/** * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) * @copyright (C) 2000-2010 ilch.de * @version $Id$ */ defined('main') or die('no direct access'); // check ob ein fehler aufgetreten ist. check_forum_failure($forum_failure); $title = $allgAr['title'] . ' :: Forum :: ' . aktForumCats($aktForumRow['kat'], 'title') . ' :: ' . $aktForumRow['name']; $hmenu = $extented_forum_menu . '<a class="smalfont" href="index.php?forum">Forum</a><b> » </b>' . aktForumCats($aktForumRow['kat']) . '<b> » </b>' . $aktForumRow['name'] . $extented_forum_menu_sufix; $design = new design($title, $hmenu, 1); $design->header(); $limit = $allgAr['Ftanz']; // Limit $page = $menu->getA(3) == 'p' ? $menu->getE(3) : 1; $MPL = db_make_sites($page, "WHERE fid = '" . $fid . "'", $limit, '?forum-showtopics-' . $fid, 'topics'); $anfang = ($page - 1) * $limit; $tpl = new tpl('forum/showtopic'); if ($forum_rights['start'] == true) { $tpl->set('NEWTOPIC', '<b>[ <a href="index.php?forum-newtopic-' . $fid . '">' . $lang['newtopic'] . '</a> ]</b>'); } else { $tpl->set('NEWTOPIC', ''); } $tpl->set('MPL', $MPL); $tpl->set_out('FID', $fid, 0); $q = "SELECT `a`.`id`, `a`.`name`, `a`.`rep`, `a`.`erst`, `a`.`hit`, `a`.`art`, `a`.`stat`, `b`.`time`, `b`.`erst` as `last`, `b`.`id` as `pid`\r\n\tFROM `prefix_topics` `a`\r\n\tLEFT JOIN `prefix_posts` `b` ON `a`.`last_post_id` = `b`.`id`\r\n\tWHERE `a`.`fid` = {$fid}\r\n\tORDER BY `a`.`art` DESC, `b`.`time` DESC\r\n\tLIMIT " . $anfang . "," . $limit; $erg = db_query($q); if (db_num_rows($erg) > 0) { while ($row = db_fetch_assoc($erg)) { if ($row['stat'] == 0) { $row['ORD'] = 'cord';
$tpl = new tpl('gallery'); $erg = db_query("SELECT id,name,`besch` FROM prefix_gallery_cats WHERE recht >= {$_SESSION['authright']} AND cat = " . $cid . " ORDER BY pos"); if (db_num_rows($erg) > 0) { $tpl->out(1); $class = 'Cnorm'; while ($row = db_fetch_assoc($erg)) { $row['gallery'] = count_files($row['id']); $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite'; $row['class'] = $class; $tpl->set_ar_out($row, 2); } $tpl->out(3); } $limit = $img_per_site; $page = $menu->getA(2) == 'p' ? escape($menu->getE(2), 'integer') : 1; $MPL = db_make_sites($page, '', $limit, '?gallery-' . $cid, "gallery_imgs LEFT JOIN prefix_gallery_cats ON prefix_gallery_imgs.cat = prefix_gallery_cats.id WHERE prefix_gallery_imgs.cat = " . $cid . " AND (recht >= " . $_SESSION['authright'] . " OR recht IS NULL)"); $anfang = ($page - 1) * $limit; $erg = db_query("SELECT prefix_gallery_imgs.id,prefix_gallery_imgs.cat,datei_name,endung,prefix_gallery_imgs.`besch`,klicks,vote_wertung,vote_klicks FROM prefix_gallery_imgs LEFT JOIN prefix_gallery_cats ON prefix_gallery_imgs.cat = prefix_gallery_cats.id WHERE prefix_gallery_imgs.cat = " . $cid . " AND (recht >= " . $_SESSION['authright'] . " OR recht IS NULL) ORDER BY id ASC LIMIT " . $anfang . "," . $limit); if (db_num_rows($erg) > 0) { $tpl->set('imgperline', $allgAr['gallery_imgs_per_line']); $tpl->set('cname', $cname); $tpl->set('breite', $allgAr['gallery_normal_width'] + 30); $tpl->set('MPL', $MPL); $tpl->out(4); $class = 'Cnorm'; $i = 0; while ($row = db_fetch_assoc($erg)) { $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite'; $row['class'] = $class; $row['anz_koms'] = db_result(db_query("SELECT COUNT(*) FROM prefix_koms WHERE uid = " . $row['id'] . " AND cat = 'GALLERYIMG'"), 0); $row['besch'] = unescape($row['besch']);
$Frecht = ''; $Fsub = 'Eintragen'; } $arm = array(); for ($i = 0; $i < 60; $i++) { $arm[$i] = $i; } $ars = array(); for ($i = 0; $i < 24; $i++) { $ars[$i] = $i; } $tpl = new tpl('kalender.htm', 1); $limit = 30; // Limit $page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1; $MPL = db_make_sites($page, '', $limit, "admin.php?kalender", 'kalender'); $anfang = ($page - 1) * $limit; $aus = array('AKTION' => $Faktion, 'MPL' => $MPL, 'EID' => $Fid, 'TITLE' => $Ftitle, 'TEXT' => $Ftext, 'stunden' => arliste($Fhours, $ars, $tpl, 'stunden'), 'minuten' => arliste($Fmins, $arm, $tpl, 'minuten'), 'zende' => $Fzende, 'begind' => $Fbegind, 'recht' => dbliste($Frecht, $tpl, 'recht', "SELECT `id`,`name` FROM `prefix_grundrechte` ORDER BY `id` DESC"), 'FSUB' => $Fsub, 'ANTISPAM' => get_antispam('adminuser_action', 0, true)); $tpl->set_ar_out($aus, 0); if (!isset($_GET['edit'])) { $tpl->out(1); } else { $tpl->out(2); } $tpl->out(3); unset($aus); // Liste $result = db_query('SELECT `gid`,`id`,`title`,`time` FROM `prefix_kalender` ORDER BY `time` DESC LIMIT ' . $anfang . ',' . $limit); while ($row = db_fetch_assoc($result)) { $aus = array('ID' => $row['id'], 'DATE' => date('d.m.Y', $row['time']), 'TIME' => date('H:i', $row['time']), 'TITLE' => $row['title'], 'GID' => $row['gid']); $tpl->set_ar_out($aus, 4);
$csrfCheck = chk_antispam('forum_edit_forum', true); if ((isset($_POST['del']) or isset($_POST['shift']) or isset($_POST['status'])) and (empty($_POST['in']) or isset($_POST['in']) and (!is_array($_POST['in']) or count($_POST['in']) < 1))) { wd('index.php?forum-editforum-' . $fid, 'Es wurden keine Themen gewählt.', 2); } elseif (isset($_POST['status']) && $csrfCheck) { foreach ($_POST['in'] as $k => $v) { $k = escape($k, 'integer'); $astat = db_result(db_query("SELECT stat FROM prefix_topics WHERE id = " . $k), 0, 0); $nstat = $astat == 1 ? 0 : 1; db_query("UPDATE `prefix_topics` SET stat = '" . $nstat . "' WHERE id = " . $k); } wd('index.php?forum-showtopics-' . $fid, 'Status geändert', 2); } elseif (!$csrfCheck || empty($_POST['del']) && empty($_POST['shift'])) { $limit = $allgAr['Ftanz']; // Limit $page = $menu->getA(3) == 'p' ? $menu->getE(3) : 1; $MPL = db_make_sites($page, "WHERE fid = '{$fid}'", $limit, '?forum-editforum-' . $fid, 'topics'); $anfang = ($page - 1) * $limit; $q = "SELECT a.id, a.name, a.rep, a.erst, a.hit, a.art, a.stat, b.time, b.erst as last, b.id as pid\r\n FROM prefix_topics a\r\n \tLEFT JOIN prefix_posts b ON a.last_post_id = b.id\r\n \tWHERE a.fid = {$fid}\r\n \tORDER BY a.art DESC, b.time DESC\r\n \tLIMIT " . $anfang . "," . $limit; $tpl = new tpl('forum/editforum.htm'); $tpl->set('id', $fid); $tpl->set('antispam', get_antispam('forum_edit_forum', 0, true)); $tpl->set_out('MPL', $MPL, 0); $erg = db_query($q); while ($row = db_fetch_assoc($erg)) { $row['date'] = date('d.m.y - H:i', $row['time']); $tpl->set_ar_out($row, 1); } $tpl->out(2); } elseif (isset($_POST['del']) and isset($_POST['dely']) and $_POST['dely'] == 'yes' and $csrfCheck) { $pmin = 0; $tmin = 0;
db_query("UPDATE prefix_partners SET pos = " . $pos . " WHERE pos = " . $nps); db_query("UPDATE prefix_partners SET pos = " . $nps . " WHERE id = " . $id); } } // aendern vorbereiten. if ($menu->getA(2) == 'e') { $erg = db_query("SELECT id,name,banner,link FROM prefix_partners WHERE id = '" . $menu->getE(2) . "'"); $_ilch = db_fetch_assoc($erg); $_ilch['pkey'] = $menu->getE(2); } else { $_ilch = array('pkey' => '', 'id' => '', 'banner' => '', 'name' => '', 'link' => ''); } $tpl->set_ar_out($_ilch, 0); $page = $menu->getA(2) == 'p' ? $menu->getE(2) : 1; $limit = 20; $class = 'Cnorm'; $MPL = db_make_sites($page, '', $limit, '?archiv-partners', 'partners'); $anfang = ($page - 1) * $limit; $abf = "SELECT id,name,link, pos FROM prefix_partners ORDER BY pos ASC LIMIT " . $anfang . "," . $limit; $erg = db_query($abf); while ($row = db_fetch_assoc($erg)) { $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite'; $row['class'] = $class; $tpl->set_ar($row); $tpl->out(1); } $tpl->set('MPL', $MPL); $tpl->out(2); $design->footer(); break; }
*/ defined('main') or die('no direct access'); // check ob ein fehler aufgetreten ist. check_forum_failure($forum_failure); $title = $allgAr['title'] . ' :: Forum :: ' . $aktTopicRow['name'] . ' :: Beiträge zeigen'; $hmenu = $extented_forum_menu . '<a class="smalfont" href="index.php?forum">Forum</a><b> » </b>' . aktForumCats($aktForumRow['kat']) . '<b> » </b><a class="smalfont" href="index.php?forum-showtopics-' . $fid . '">' . $aktForumRow['name'] . '</a><b> » </b>'; $hmenu .= $aktTopicRow['name'] . $extented_forum_menu_sufix; $design = new design($title, $hmenu, 1); $design->header(); // Topic Hits werden eins hochgesetzt. db_query('UPDATE `prefix_topics` SET `hit` = `hit` + 1 WHERE `id` = "' . $tid . '"'); // mehrere seiten fals gefordert $limit = $allgAr['Fpanz']; // Limit $page = $menu->getA(3) == 'p' ? $menu->getE(3) : 1; $MPL = db_make_sites($page, "WHERE tid = " . $tid, $limit, 'index.php?forum-showposts-' . $tid, 'posts'); $anfang = ($page - 1) * $limit; $antworten = ''; if ($aktTopicRow['stat'] == 1 and $forum_rights['reply'] == true or ($_SESSION['authright'] <= '-7' or $forum_rights['mods'] == true)) { $antworten = '<b>[ <a href="index.php?forum-newpost-' . $tid . '">' . $lang['answer'] . '</a> ]</b>'; } $class = 'Cmite'; $tpl = new tpl('forum/showpost'); $ar = array('SITELINK' => $MPL, 'tid' => $tid, 'ANTWORTEN' => $antworten, 'TOPICNAME' => $aktTopicRow['name']); $tpl->set_ar_out($ar, 0); $i = $anfang + 1; $ges_ar = array('wurstegal', 'maennlich', 'weiblich'); $erg = db_query("SELECT `geschlecht`, `prefix_posts`.`id`,`txt`,`time`,`erstid`,`erst`,`sig`,`avatar`,`posts`,`prefix_user`.`sperre` FROM `prefix_posts` LEFT JOIN `prefix_user` ON `prefix_posts`.`erstid` = `prefix_user`.`id` WHERE `tid` = " . $tid . " ORDER BY `time` LIMIT " . $anfang . "," . $limit); while ($row = db_fetch_assoc($erg)) { $class = $class == 'Cnorm' ? 'Cmite' : 'Cnorm'; // define some vars.
} elseif ($_GET['in'] == 3) { $str_downs_a .= "`creater` LIKE '%" . $autor . "%' AND "; } } // 1 = forum, ist immer standart $q = "\n\t SELECT DISTINCT\n `a`.`fid` as `fid`,\n `a`.`name` as `titel`,\n 'foru' as `typ`,\n `a`.`id` as `id`,\n `time`,\n\t\t`c`.`erst` as `autor`\n FROM `prefix_posts` `c`\n LEFT JOIN `prefix_topics` `a` ON `a`.`id` = `c`.`tid`\n LEFT JOIN `prefix_forums` `b` ON `b`.id = `a`.`fid`\n LEFT JOIN `prefix_groupusers` `vg` ON `vg`.`uid` = " . $_SESSION['authid'] . " AND `vg`.`gid` = `b`.`view`\n LEFT JOIN `prefix_groupusers` `rg` ON `rg`.`uid` = " . $_SESSION['authid'] . " AND `rg`.`gid` = `b`.`reply`\n LEFT JOIN `prefix_groupusers` `sg` ON `sg`.`uid` = " . $_SESSION['authid'] . " AND `sg`.`gid` = `b`.`start`\n WHERE (((`b`.`view` >= " . $_SESSION['authright'] . " AND `b`.`view` <= 0) OR\n (`b`.`reply` >= " . $_SESSION['authright'] . " AND `b`.`reply` <= 0) OR\n (`b`.`start` >= " . $_SESSION['authright'] . " AND `b`.`start` <= 0)) OR\n (`vg`.`fid` IS NOT NULL OR `rg`.`fid` IS NOT NULL OR `sg`.`fid` IS NOT NULL OR " . $_SESSION['authright'] . " = -9))\n AND (" . $str_forum . " 1 = 1)\n\t\tAND (" . $str_forum_a . " 1 = 1)\n AND (time >= " . $x . ")\n GROUP BY `a`.`id`\n\t ORDER BY `time` DESC"; if (isset($_GET['in'])) { if ($_GET['in'] == 2) { $q = "\n\t SELECT DISTINCT\n '0' as `fid`,\n `news_title` as `titel`,\n 'news' as `typ`,\n `news_id` as `id`,\n `news_time` as `time`,\n\t\t`prefix_user`.`name` as `autor`\n FROM `prefix_news`\n\t \tLEFT JOIN `prefix_user` ON `prefix_news`.`user_id` = `prefix_user`.`id`\n WHERE (" . $str_news . " 1 = 1)\n\t \tAND (" . $str_news_a . " 1 = 1)\n AND (`news_time` >= " . $x . ")\n\t ORDER BY `time` DESC"; } elseif ($_GET['in'] == 3) { $q = "\n\t SELECT DISTINCT\n '0' as `fid`,\n CONCAT( `name`, ' ', `version` ) AS `titel`,\n 'down' as `typ`,\n `id`,\n UNIX_TIMESTAMP(`time`) as `time`,\n\t\t`creater` as `autor`\n FROM `prefix_downloads`\n WHERE ((" . $str_downs . " 1 = 1)\n\t \tOR (" . $str_downs_ . " 1 = 1))\n\t\tAND (" . $str_downs_a . " 1 = 1)\n AND (UNIX_TIMESTAMP(`time`) >= " . $x . ")\n\t ORDER BY UNIX_TIMESTAMP(`time`) DESC"; } } $gAnz = db_num_rows(db_query($q)); $q .= " LIMIT " . $anfang . "," . $limit; $MPL = db_make_sites($page, "", $limit, "index.php?search=" . urlencode($such) . "&autor=" . urlencode($autor) . "&in=" . $_GET['in'] . "&days=" . $days . "&page=", "", $gAnz); $tpl->set_ar_out(array('MPL' => $MPL, 'gAnz' => $gAnz), 1); $q = db_query($q); $class = ''; while ($r = db_fetch_assoc($q)) { $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite'; $r['class'] = $class; if ($r['typ'] == 'foru') { $r['ctime'] = db_result(db_query("SELECT MAX(`time`) FROM `prefix_posts` WHERE `tid` = " . $r['id']), 0, 0); $r['ord'] = forum_get_ordner($r['ctime'], $r['id'], $r['fid']); $r['link'] = 'forum-showposts-' . $r['id']; } elseif ($r['typ'] == 'news') { $r['ord'] = 'ord'; $r['link'] = 'news-' . $r['id']; } elseif ($r['typ'] == 'down') { $r['ord'] = 'ord';
$page = $menu->getA(3) == 'p' ? $menu->getE(3) : 1; $filtername = escape($menu->get(2), 'string'); } else { $page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1; } $anfang = ($page - 1) * $limit; $tpl = new tpl('user/memb_list.htm'); if (isset($_GET['filtername']) and !empty($_GET['filtername'])) { $filtername = escape($_GET['filtername'], 'string'); } if (!empty($filtername)) { $sql_search = " WHERE prefix_user.name LIKE '%" . $filtername . "%'"; $MPL = db_make_sites($page, $sql_search, $limit, '?user-filtername-' . $filtername, 'user'); } else { $sql_search = ""; $MPL = db_make_sites($page, "", $limit, '?user', 'user'); } $tpl->set_out('SITELINK', $MPL, 0); $class = ''; $erg = db_query("SELECT\r\n posts,\r\n prefix_user.id,\r\n prefix_grundrechte.name as recht_name,\r\n regist,\r\n prefix_user.name\r\nFROM prefix_user\r\n LEFT JOIN prefix_grundrechte ON prefix_user.recht = prefix_grundrechte.id\r\n {$sql_search}\r\nORDER by recht,prefix_user.posts DESC LIMIT " . $anfang . "," . $limit); while ($row = db_fetch_object($erg)) { if ($class == 'Cmite') { $class = 'Cnorm'; } else { $class = 'Cmite'; } $ar = array('NAME' => $row->name, 'RANG' => userrang($row->posts, $row->id), 'CLASS' => $class, 'POSTS' => $row->posts, 'UID' => $row->id, 'DATE' => date('d.m.Y', $row->regist), 'GRUPE' => $row->recht_name); $tpl->set_ar_out($ar, 1); } $tpl->set_out('filtername', $filtername ? $filtername : '', 2); $design->footer();
} } else { echo 'Datum stimmt nicht, bitte im Format DD.MM.YYYY eingeben also z.B. 29.12.2005<br />'; } } if (!isset($IdToDelete)) { if ($menu->getA(1) == 'e' and is_numeric($menu->getE(1)) and empty($IdToEdit)) { $IdToEdit = escape($menu->getE(1), 'integer'); $erg = db_query("SELECT id,DATE_FORMAT(date,'%d.%m.%Y') as date,title,txt FROM prefix_history WHERE id = '" . $IdToEdit . "'"); $_ilch = db_fetch_assoc($erg); $_ilch['pkey'] = $IdToEdit; } else { $_ilch = array('pkey' => '', 'date' => date('d.m.Y'), 'title' => '', 'txt' => ''); } $tpl->set_ar_out($_ilch, 0); $limit = 20; $page = $menu->getA(1) == 'p' ? escape($menu->getE(1), 'integer') : 1; $MPL = db_make_sites($page, 'ORDER BY `date` DESC', $limit, '?history', 'history'); $anfang = ($page - 1) * $limit; $abf = "SELECT `id`,`date`,`title` FROM prefix_history ORDER BY `date` DESC LIMIT " . $anfang . "," . $limit; $erg = db_query($abf); while ($row = db_fetch_assoc($erg)) { $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite'; $row['class'] = $class; list($y, $m, $d) = explode('-', $row['date']); $row['date'] = $d . '.' . $m . '.' . $y; $tpl->set_ar_out($row, 1); } $tpl->set_out('MPL', $MPL, 2); } $design->footer();
$tpl->set_ar_out(array('FEEDTITLE' => $allgAr['title'], 'UPDATED' => $last_update, 'SITEURL' => 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF'])), 0); while ($row = db_fetch_assoc($erg)) { if ($feed_type == 'atom') { $Z = (date('Z') > 0 ? '+' : '') . date('H:i:s', date('Z') + 23 * 3600); $row['datum'] = str_replace(' ', 'T', $row['datum']) . $Z; } $a = explode('[PREVIEWENDE]', $row['text']); $tpl->set_ar_out(array('TITLE' => $row['title'], 'TXT' => bbcode($a[0]), 'LINK' => 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/index.php?news-' . $row['id'], 'AUTHOR' => $row['username'], 'DATE' => $row['datum']), 1); } $tpl->out(2); exit; } else { $design->header(); $limit = $allgAr['Nlimit']; $page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1; $MPL = db_make_sites($page, "WHERE news_recht >= " . $_SESSION['authright'], $limit, '?news', 'news'); $anfang = ($page - 1) * $limit; $tpl = new tpl('news.htm'); $abf = "SELECT\r\n a.news_title as title,\r\n a.news_id as id,\r\n DATE_FORMAT(a.news_time,'%d. %m. %Y') as datum,\r\n DATE_FORMAT(a.news_time,'%W') as dayofweek,\r\n a.news_kat as kate,\r\n a.news_text as text,\r\n b.name as username\r\n FROM prefix_news as a\r\n LEFT JOIN prefix_user as b ON a.user_id = b.id\r\n WHERE " . $_SESSION['authright'] . " <= a.news_recht\r\n OR a.news_recht = 0\r\n ORDER BY news_time DESC\r\n LIMIT " . $anfang . "," . $limit; #echo '<pre>'.$abf.'</pre>'; $erg = db_query($abf); while ($row = db_fetch_assoc($erg)) { $k0m = db_query("SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = " . $row['id'] . " AND cat = 'NEWS'"); $row['kom'] = db_result($k0m, 0); $row['kate'] = news_find_kat($row['kate']); $row['datum'] = $lang[$row['dayofweek']] . ' ' . $row['datum']; if (strpos($row['text'], '[PREVIEWENDE]') !== FALSE) { $a = explode('[PREVIEWENDE]', $row['text']); $row['text'] = $a[0]; $row['readwholenews'] = '» <a href="index.php?news-' . $row['id'] . '">' . $lang['readwholenews'] . '</a> «'; } else {
if (isset($_REQUEST['q'])) { $q = escape($_REQUEST['q'], 'string'); } $tpl = new tpl('user/user', 1); $tpl->set('modlall', user_get_all_mod_list()); $tpl->set('anzmods', db_result(db_query("SELECT COUNT(*) FROM prefix_modules WHERE fright = 1"), 0)); $tpl->set('action_antispam', get_antispam('adminuser_action', 0, true)); $tpl->set_out('q', unescape($q), 0); $q = str_replace('*', '%', $q); if (strpos($q, '%') === false) { $q = $q . '%'; } $limit = 15; // Limit $page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1; $MPL = db_make_sites($page, "WHERE name LIKE '" . $q . "'", $limit, '?user', 'user'); $anfang = ($page - 1) * $limit; $class = ''; $q = "SELECT name,recht,id FROM `prefix_user` WHERE name LIKE '" . $q . "' ORDER by recht,posts DESC LIMIT " . $anfang . "," . $limit; $erg = db_query($q); while ($row = db_fetch_object($erg)) { if ($class == 'Cmite') { $class = 'Cnorm'; } else { $class = 'Cmite'; } $ar = array('name' => $row->name, 'class' => $class, 'id' => $row->id, 'grouplist' => user_get_group_list($row->id), 'recht' => dblistee($row->recht, "SELECT id,name FROM prefix_grundrechte ORDER BY id ASC"), 'modslist' => user_get_mod_change_list($row->id)); $tpl->set_ar_out($ar, 1); } $tpl->set_out('MPL', $MPL, 2); $design->footer();
db_query('DELETE FROM `prefix_news` WHERE news_id = "' . $menu->get(2) . '" LIMIT 1'); } // del // #### A k t i o n e n // ### // ## // # // # // ## // ### // #### h t m l E i n g a b e n if (empty($doNoIn)) { $limit = 20; // Limit $page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1; $MPL = db_make_sites($page, '', $limit, "?news", 'news'); $anfang = ($page - 1) * $limit; if ($menu->get(1) != 'edit') { $FnewsID = ''; $Faktion = 'insert'; $Fueber = ''; $Fstext = ''; $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;
db_query('DELETE FROM `prefix_news` WHERE `news_id` = "' . $menu->get(2) . '" LIMIT 1'); } // del // #### A k t i o n e n // ### // ## // # // # // ## // ### // #### h t m l E i n g a b e n if (empty($doNoIn)) { $limit = 20; // Limit $page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1; $MPL = db_make_sites($page, '', $limit, "admin.php?news", 'news'); $anfang = ($page - 1) * $limit; if ($menu->get(1) != 'edit') { $FnewsID = ''; $Faktion = 'insert'; $Fueber = ''; $Fstext = ''; $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;