Beispiel #1
0
 function sharchiv()
 {
     $tpl = new tpl('shbox4', 0);
     echo '<div>
              <h4 align="center" class="Chead">' . $this->version . ' Archiv</h4>
           </div>';
     $erg = db_query('SELECT * FROM `prefix_shbox4` ORDER BY `id` DESC');
     while ($row = db_fetch_assoc($erg)) {
         $text = $row['txt'];
         $text = $this->shtext($text);
         $ar = array('AUSGABE' => '<p class="Cdark" style="margin:0;">' . $this->shdate($row['time'], $row['uid']) . '</p>
                                           <p class="Cnorm" style="margin:0;">' . $this->colortext($this->sh_usercheck($row['uid']), $text) . '</p>
                                           <br />');
         $tpl->set_ar_out($ar, 2);
     }
     $tpl->set_ar(array('VERS' => $this->version()));
     $tpl->out(3);
 }
Beispiel #2
0
if (sizeof($news) == 0) {
    $newsout = $tpl->get("no news");
} else {
    foreach ($news as $new) {
        $newsout .= $tpl->list_get('news', array($new["id"], $new["title"]));
    }
}
// die neuen topics holen
$hottopics = get_topics_since_last_login();
$topicsout = "";
if (sizeof($hottopics) == 0) {
    $topicsout = $tpl->get("no topics");
} else {
    foreach ($hottopics as $hottopic) {
        $listar = array($hottopic["id"], $hottopic["title"], $hottopic["author"]);
        $listar[] = ceil(($hottopic['replies'] + 1) / $allgAr['Fpanz']);
        $listar[] = $hottopic["pid"];
        $topicsout .= $tpl->list_get('topics', $listar);
    }
}
$tpl->set('news', $newsout);
$tpl->set('topics', $topicsout);
// unsere templatevariable
$info = $_SESSION;
$info["lastlogin"] = formatdate($_SESSION["lastlogin"]);
$info["title"] = $allgAr["title"];
$tpl->set_ar($info);
// ausgabe
$tpl->out("actions");
$tpl->out("info");
$design->footer();
Beispiel #3
0
/**
 * gibt den link zu einem event aus
 *
 * @param tpl $calendartpl der tpl des kalenders (zugriff auf "event link")
 * @param  $view view, was angezeigt werden soll
 * @param array $eventinfo die info des events
 * @return den link
 */
function eventlink(&$calendartpl, $view, $eventinfo)
{
    $calendartpl->set_ar($eventinfo);
    $calendartpl->set("view", $view);
    return $calendartpl->get("event link");
}
Beispiel #4
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;
}
Beispiel #5
0
$class = 0;
$abf = "SELECT `id`,`besch`,`datei_name`,`endung` FROM `prefix_gallery_imgs` WHERE `cat` = " . $azk;
$erg = db_query($abf);
$i = 0;
while ($row = db_fetch_assoc($erg)) {
    $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
    $row['class'] = $class;
    if ($i != 0 and $i % $allgAr['gallery_imgs_per_line'] == 0) {
        echo '</tr><tr>';
    }
    $tpl->set_ar_out($row, 1);
    $i++;
}
// links
$tpl->out(2);
// cat
if ($menu->getA(1) == 'E') {
    $erg = db_query("SELECT `id`,`cat` as `Ccat`, `recht` as `Crecht`, `name` as `Cname`,`pos` as `Cpos`,`besch` as `Cdesc` FROM `prefix_gallery_cats` WHERE `id` = '" . $menu->getE(1) . "'");
    $_Cilch = db_fetch_assoc($erg);
    $_Cilch['Cpkey'] = $menu->getE(1);
} else {
    $_Cilch = array('Ccat' => '', 'Cpkey' => '', 'Cpos' => '', 'Cname' => '', 'Crecht' => '', 'Cdesc' => '');
}
// $_Cilch['Crecht'] = arlistee($_Cilch['Crecht'],getFuerAr());
gallery_admin_selectcats('0', '', $_Cilch['Ccat'], $_Cilch['Ccat']);
$_Cilch['Ccat'] = '<option value="0">Keine</option>' . $_Cilch['Ccat'];
$_Cilch['Crecht'] = dblistee($_Cilch['Crecht'], "SELECT `id`,`name` FROM `prefix_grundrechte` ORDER BY `id` DESC");
gallery_admin_showcats(0, '');
$tpl->set_ar($_Cilch);
$tpl->out(3);
$design->footer();
Beispiel #6
0
#   Support: www.ilch.de
defined('main') or die('no direct access');
if ($forum_rights['mods'] == FALSE) {
    $forum_failure[] = 'Keine Berechtigung dieses Forum zu moderiren';
    check_forum_failure($forum_failure);
}
$title = $allgAr['title'] . ' :: Forum :: ' . $aktForumRow['kat'] . ' :: ' . $aktForumRow['name'] . ' :: ' . $aktTopicRow['name'] . ' :: Beitrag l&ouml;schen';
$hmenu = $extented_forum_menu . '<a class="smalfont" href="index.php?forum">Forum</a><b> &raquo; </b><a class="smalfont" href="index.php?forum-showcat-' . $aktForumRow['cid'] . '">' . $aktForumRow['kat'] . '</a><b> &raquo; </b><a class="smalfont" href="index.php?forum-showtopics-' . $fid . '">' . $aktForumRow['name'] . '</a><b> &raquo; </b>';
$hmenu .= '<a class="smalfont" href="index.php?forum-showposts-' . $tid . '">' . $aktTopicRow['name'] . '</a> <b> &raquo; </b>Beitrag l&ouml;schen' . $extented_forum_menu_sufix;
$design = new design($title, $hmenu, 1);
$design->header();
$postid = escape($menu->get(3), 'integer');
$csrfCheck = chk_antispam('forum_del_post', true);
if (empty($_POST['delete']) || !$csrfCheck) {
    $tpl = new tpl('forum/del_post');
    $tpl->set_ar(array('tid' => $tid, 'get3' => $postid, 'antispam' => get_antispam('forum_del_post', 0, true)));
    $tpl->out(0);
} elseif ($csrfCheck) {
    $erstid = @db_result(db_query("SELECT erstid FROM `prefix_posts` WHERE id = " . $postid . " LIMIT 1"), 0);
    if ($erstid > 0) {
        db_query("UPDATE `prefix_user` SET posts = posts - 1 WHERE id = {$erstid}");
    }
    db_query("DELETE FROM `prefix_posts` WHERE id = " . $postid . " LIMIT 1");
    $erg = db_query("SELECT MAX(id) FROM prefix_posts WHERE tid = " . $tid);
    $max = db_result($erg, 0);
    db_query("UPDATE `prefix_topics` SET last_post_id = " . $max . ", `rep` = `rep` - 1 WHERE id = " . $tid);
    db_query("UPDATE `prefix_forums` SET last_post_id = " . $max . ", posts = posts - 1 WHERE id = " . $fid);
    $tpl = new tpl('forum/del_post');
    $tpl->set_out('tid', $tid, 1);
}
$design->footer();
Beispiel #7
0
$hmenu = $extented_forum_menu . '<a class="smalfont" href="index.php?forum">Forum</a><b> &raquo; </b>' . aktForumCats($aktForumRow['kat']) . $extented_forum_menu_sufix;
$design = new design($title, $hmenu, 1);
$design->header();
$tpl = new tpl('forum/show_cat');
$tpl->out(0);
$cid = escape($menu->get(2), 'integer');
$q = "SELECT\r\n  `a`.`id`, `a`.`cid`, `a`.`name`, `a`.`besch`,\r\n  `a`.`topics`, `a`.`posts`, `b`.`name` as `topic`,\r\n  `c`.`id` as `pid`, `c`.`tid`, `b`.`rep`, `c`.`erst`, `c`.`time`,\r\n  `a`.`cid`, `k`.`name` as `cname`\r\nFROM `prefix_forums` `a`\r\n  LEFT JOIN `prefix_forumcats` `k` ON `k`.`id` = `a`.`cid`\r\n  LEFT JOIN `prefix_posts` `c` ON `a`.`last_post_id` = `c`.`id`\r\n  LEFT JOIN `prefix_topics` `b` ON `c`.`tid` = `b`.`id`\r\n\r\n  LEFT JOIN `prefix_groupusers` `vg` ON `vg`.`uid` = " . $_SESSION['authid'] . " AND `vg`.`gid` = `a`.`view`\r\n  LEFT JOIN `prefix_groupusers` `rg` ON `rg`.`uid` = " . $_SESSION['authid'] . " AND `rg`.`gid` = `a`.`reply`\r\n  LEFT JOIN `prefix_groupusers` `sg` ON `sg`.`uid` = " . $_SESSION['authid'] . " AND `sg`.`gid` = `a`.`start`\r\n\r\nWHERE ((" . $_SESSION['authright'] . " <= `a`.`view` AND `a`.`view` < 1)\r\n   OR (" . $_SESSION['authright'] . " <= `a`.`reply` AND `a`.`reply` < 1)\r\n   OR (" . $_SESSION['authright'] . " <= `a`.`start` AND `a`.`start` < 1)\r\n\t OR `vg`.`fid` IS NOT NULL\r\n\t OR `rg`.`fid` IS NOT NULL\r\n\t OR `sg`.`fid` IS NOT NULL\r\n\t OR -9 >= " . $_SESSION['authright'] . ")\r\n  AND `k`.`id`     = " . $cid . "\r\nORDER BY `k`.`pos`, `a`.`pos`";
$erg1 = db_query($q);
$xcid = 0;
while ($r = db_fetch_assoc($erg1)) {
    $r['topicl'] = $r['topic'];
    $r['topic'] = html_enc_substr($r['topic'], 0, 23);
    $r['ORD'] = forum_get_ordner($r['time'], $r['id']);
    $r['mods'] = getmods($r['id']);
    $r['datum'] = post_date($r['time']);
    $r['page'] = ceil(($r['rep'] + 1) / $allgAr['Fpanz']);
    $tpl->set_ar($r);
    if ($r['cid'] != $xcid) {
        $tpl->out(1);
        // Unterkategorien
        $sql = db_query("SELECT DISTINCT `a`.`name` as `cname`, `a`.`id` as `cid` FROM `prefix_forumcats` `a` LEFT JOIN `prefix_forums` `b` ON `a`.`id` = `b`.`cid` WHERE `a`.`cid` = {$r['cid']} AND `a`.`id` = `b`.`cid` ORDER BY `a`.`pos`, `a`.`name`");
        while ($ucat = db_fetch_assoc($sql)) {
            $tpl->set_ar_out($ucat, 2);
        }
        // Unterkategorien - Ende
        $xcid = $r['cid'];
    }
    $tpl->out(3);
}
$tpl->out(4);
$design->footer();
Beispiel #8
0
 * @version $Id$
 */
defined('main') or die('no direct access');
if ($forum_rights['mods'] == false) {
    $forum_failure[] = 'Keine Berechtigung dieses Forum zu moderiren';
    check_forum_failure($forum_failure);
}
$title = $allgAr['title'] . ' :: Forum :: ' . $aktForumRow['kat'] . ' :: ' . $aktForumRow['name'] . ' :: ' . $aktTopicRow['name'] . ' :: Beitrag l&ouml;schen';
$hmenu = $extented_forum_menu . '<a class="smalfont" href="index.php?forum">Forum</a><b> &raquo; </b><a class="smalfont" href="index.php?forum-showcat-' . $aktForumRow['cid'] . '">' . $aktForumRow['kat'] . '</a><b> &raquo; </b><a class="smalfont" href="index.php?forum-showtopics-' . $fid . '">' . $aktForumRow['name'] . '</a><b> &raquo; </b>';
$hmenu .= '<a class="smalfont" href="index.php?forum-showposts-' . $tid . '">' . $aktTopicRow['name'] . '</a> <b> &raquo; </b>Beitrag l&ouml;schen' . $extented_forum_menu_sufix;
$design = new design($title, $hmenu, 1);
$design->header();
$get_3 = escape($menu->get(3), 'integer');
if (empty($_POST['delete'])) {
    $tpl = new tpl('forum/del_post');
    $tpl->set_ar(array('tid' => $tid, 'get3' => $get_3));
    $tpl->out(0);
} else {
    $erstid = @db_result(db_query("SELECT `erstid` FROM `prefix_posts` WHERE `id` = " . $get_3 . " LIMIT 1"), 0);
    if ($erstid > 0) {
        db_query("UPDATE `prefix_user` SET `posts` = `posts` - 1 WHERE id = " . $erstid);
    }
    db_query("DELETE FROM `prefix_posts` WHERE `id` = " . $get_3 . " LIMIT 1");
    $erg = db_query("SELECT MAX(`id`) FROM `prefix_posts` WHERE `tid` = " . $tid);
    $max = db_result($erg, 0);
    db_query("UPDATE `prefix_topics` SET `last_post_id` = " . $max . ", `rep` = `rep` - 1 WHERE `id` = " . $tid);
    db_query("UPDATE `prefix_forums` SET `last_post_id` = " . $max . ", `posts` = `posts` - 1 WHERE `id` = " . $fid);
    $tpl = new tpl('forum/del_post');
    $tpl->set_out('tid', $tid, 1);
}
$design->footer();
        $toHighlightArray = array_unique($toHighlightArray);
        if (isset($ignoredMatches[$phpFile])) {
            foreach ($ignoredMatches[$phpFile] as $ignoreMatch) {
                $found = array_search($ignoreMatch, $toHighlightArray);
                if ($found !== false) {
                    unset($toHighlightArray[$found]);
                }
            }
        }
        if (count($toHighlightArray)) {
            foreach ($toHighlightArray as $toHighlight) {
                if (version_compare(PHP_VERSION, '5.0') === -1) {
                    $fileContents = str_replace($toHighlight, '<span style="background: red; font-weight:bold;">' . $toHighlight . '</span>', $fileContents);
                    $replaces = 1;
                } else {
                    $fileContents = str_replace($toHighlight, '<span style="background: red; font-weight:bold;">' . $toHighlight . '</span>', $fileContents, $replaces);
                }
                $changes += $replaces;
            }
            $class = $class === 'Cmite' ? 'Cmite' : 'Cnorm';
            $tpl->set_ar(array('class' => $class, 'phpFile' => $phpFile, 'changes' => $changes, 'code' => $fileContents, 'id' => $i++));
            $tpl->out(2);
            $filesWithChanges++;
        }
    }
}
if ($filesWithChanges === 0) {
    $tpl->out(3);
}
$tpl->out(4);
$design->footer();
Beispiel #10
0
    }
    wd('admin.php?modrewrite', $mr['infotxt'], 2);
    $design->footer(1);
}
# contentbox "putten"
if (isset($_POST['submithtaccesscontentbox']) and chk_antispam('adminuser_action', true)) {
    if (is_readable('.htaccess') and is_writeable('.htaccess')) {
        $newcontent = escape($_POST['htaccesscontentbox'], 'textarea');
        if (file_put_contents('.htaccess', $newcontent)) {
            $mr['infotxt'] = '.htaccess erfolgreich gespeichert';
            wd('admin.php?modrewrite', $mr['infotxt'], 2);
            $design->footer(1);
        } else {
            $mr['infotype'] = 'warning';
            $mr['infotxt'] = 'oOops... da lief was schief';
            wd('admin.php?modrewrite', $mr['infotxt'], 2);
            $design->footer(1);
        }
    } else {
        $mr['infotxt'] = 'Datei ist nicht beschreibbar oder nicht vorhanden';
        wd('admin.php?modrewrite', $mr['infotxt'], 2);
        $design->footer(1);
    }
}
$tpl->set_ar($mr, 0);
$tpl->set('ANTISPAM', get_antispam('adminuser_action', 0, true));
$tpl->out(0);
$design->footer();
?>