예제 #1
0
function misc_comments_report()
{
    global $apx, $db, $set, $user;
    $_REQUEST['id'] = (int) $_REQUEST['id'];
    if (!$_REQUEST['id']) {
        die('missing ContentID!');
    }
    $apx->lang->drop('report', 'comments');
    $apx->tmpl->loaddesign('blank');
    headline($apx->lang->get('HEADLINE_REPORT'), str_replace('&', '&', $_SERVER['REQUEST_URI']));
    titlebar($apx->lang->get('HEADLINE_REPORT'));
    //Absenden
    if ($_POST['send']) {
        //Kommentar auslesen
        list($commenttext) = $db->first("SELECT text FROM " . PRE . "_comments WHERE id='" . $_REQUEST['id'] . "' LIMIT 1");
        if (!$_POST['text']) {
            message('back');
        } elseif (!$commenttext) {
            message('invalid comment-ID!');
        } else {
            //eMail senden
            if ($set['comments']['reportmail']) {
                $input['URL'] = $_POST['url'];
                $input['REASON'] = $_POST['text'];
                $input['TEXT'] = $commenttext;
                sendmail($set['comments']['reportmail'], 'REPORT', $input);
            }
            message($apx->lang->get('MSG_OK'));
        }
    } else {
        $apx->tmpl->assign('POSTTO', HTTPDIR . 'misc.php?action=comments_report');
        $apx->tmpl->assign('URL', compatible_hsc($_REQUEST['url']));
        $apx->tmpl->assign('ID', $_REQUEST['id']);
        $apx->tmpl->parse('report', 'comments');
    }
}
예제 #2
0
$apx->tmpl->assign('THREADSPERPAGE', $user->info['forum_tpp']);
//Rechte
$apx->tmpl->assign('LOGGED_IS_ADMIN', iif($user->info['gtype'] == 'admin', 1, 0));
$apx->tmpl->assign('LOGGED_IS_MODERATOR', iif(in_array($user->info['userid'], $foruminfo['moderator']), 1, 0));
//Aktivität
forum_activity('forum', $foruminfo['forumid']);
list($userCount, $guestCount, $activelist) = forum_get_activity('forum', $foruminfo['forumid'], $foruminfo['moderator']);
$apx->tmpl->assign('ACTIVITY_USERS', $userCount);
$apx->tmpl->assign('ACTIVITY_GUESTS', $userCount);
$apx->tmpl->assign('ACTIVITY', $activelist);
$apx->tmpl->parse('forum');
////////////////////////////////////////////////////////////////////////////////////////////////////////
$apx->tmpl->assign_static('STYLESHEET', compatible_hsc($foruminfo['stylesheet']));
$apx->tmpl->assign('PATH', forum_path($foruminfo));
$apx->tmpl->assign('PATHEND', replace($foruminfo['title']));
titlebar($foruminfo['title']);
///////////////////////////////////////////////////////////////////////////////////////////////// GELESEN-STATUS
$isread = true;
//Fieser Hack: Verwende die Daten, die forum_assign.php erzeugt hat,
//denn da steht schon die lastposttime des Forums (inklusive Unterforen) drin.
foreach ($forumRec as $forum) {
    if (forum_access_visible($forum) && forum_access_read($forum) && correct_forum_password($forum)) {
        $forumLastview = max(array($user->info['forum_lastonline'], forum_readtime($forum['forumid'])));
        if ($forumLastview < $forum['lastposttime']) {
            $isread = false;
            break;
        }
    }
}
//Themen brauchen wir nur anzuschauen, wenn die Unterforen alle gelesen sind
if ($isread) {
예제 #3
0
<?php

$apx->lang->drop('avatar');
headline($apx->lang->get('HEADLINE_AVATAR'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_AVATAR'));
$extensions = array('GIF', 'JPG', 'JPE', 'JPEG', 'PNG');
if ($_POST['send']) {
    //Neuen Avatar hochladen
    if (is_uploaded_file($_FILES['avatar']['tmp_name'])) {
        require BASEDIR . 'lib/class.mediamanager.php';
        $mm = new mediamanager();
        $ext = $mm->getext($_FILES['avatar']['name']);
        $newfile = 'avatar_' . $user->info['userid'] . '_' . time() . '.' . strtolower($ext);
        //AVATARE AUTOMATISCH VERKLEINERN
        if ($set['user']['avatar_resize']) {
            require BASEDIR . 'lib/class.image.php';
            $img = new image();
            if (!in_array($ext, $extensions)) {
                message($apx->lang->get('MSG_NOTALLOWED'), 'javascript:history.back()');
            } else {
                $tempname = 'avatar_' . md5(microtime()) . '.tmp';
                $mm->uploadfile($_FILES['avatar'], 'temp', $tempname);
                $info = getimagesize(BASEDIR . getpath('uploads') . 'temp/' . $tempname);
                //Kein Bild => löschen und Ende
                if ($info[0] == 0 || $info[1] == 0) {
                    $mm->deletefile('temp/' . $tempname);
                    message($apx->lang->get('MSG_MAXDIM'), 'javascript:history.back()');
                    require 'lib/_end.php';
                }
                //Bild zu groß => verkleinern
                if ($info[0] > $set['user']['avatar_maxdim'] || $info[1] > $set['user']['avatar_maxdim']) {
예제 #4
0
<?php

$apx->lang->drop('ignorelist');
headline($apx->lang->get('HEADLINE_IGNORELIST'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_IGNORELIST'));
$_REQUEST['del'] = (int) $_REQUEST['del'];
if ($_REQUEST['add']) {
    if ($_POST['send']) {
        if (!$_POST['username']) {
            message('back');
        } else {
            list($userid) = $db->first("SELECT userid FROM " . PRE . "_user WHERE LOWER(username)='" . addslashes(strtolower($_POST['username'])) . "'");
            $data = $db->fetch("SELECT ignored FROM " . PRE . "_user_ignore WHERE userid='" . $user->info['userid'] . "'");
            $existing = get_ids($data, 'ignored');
            if (!$userid) {
                message($apx->lang->get('MSG_NOMATCH'), 'back');
            } elseif (in_array($userid, $existing)) {
                message($apx->lang->get('MSG_EXISTS'), 'back');
            } elseif ($userid == $user->info['userid']) {
                message($apx->lang->get('MSG_NOTSELF'), 'back');
            } else {
                $db->query("INSERT INTO " . PRE . "_user_ignore (userid,ignored,reason) VALUES ('" . $user->info['userid'] . "','" . $userid . "','" . addslashes($_POST['reason']) . "')");
                $goto = mklink('user.php?action=ignorelist', 'user,ignorelist.html');
                message($apx->lang->get('MSG_ADD_OK'), $goto);
            }
        }
    } else {
        tmessage('addignore', array('USERNAME' => compatible_hsc($_REQUEST['username'])));
    }
} elseif ($_REQUEST['del']) {
    if ($_POST['del']) {
예제 #5
0
    //Bewertungen
    if ($apx->is_module('ratings') && $set['videos']['ratings'] && $res['allowrating']) {
        require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php';
        $rate = new ratings('videos', $res['id']);
        $rate->assign_ratings($parse);
    }
    $apx->tmpl->parse('detail');
    require 'lib/_end.php';
}
//////////////////////////////////////////////////////////////////////////////////////////////////////// SUCHE
if ($_REQUEST['action'] == 'search') {
    $apx->lang->drop('list');
    $apx->lang->drop('search');
    //ERGEBNIS ANZEIGEN
    if ($_REQUEST['searchid']) {
        titlebar($apx->lang->get('HEADLINE_SEARCH'));
        //Suchergebnis auslesen
        $resultIds = '';
        list($resultIds) = getSearchResult('videos', $_REQUEST['searchid']);
        //Keine Ergebnisse
        if (!$resultIds) {
            message($apx->lang->get('MSG_NORESULT'), 'javascript:history.back();');
            require 'lib/_end.php';
        }
        //SUCHE AUSFÜHREN
        $parse = $apx->tmpl->used_vars('search_result');
        //Seitenzahlen generieren
        list($count) = $db->first("SELECT count(id) FROM " . PRE . "_videos AS a WHERE a.status='finished' AND '" . time() . "' BETWEEN starttime AND endtime AND id IN (" . implode(', ', $resultIds) . ") " . section_filter());
        pages(mklink('videos.php?action=search&amp;searchid=' . $_REQUEST['searchid'], 'videos.html?action=search&amp;searchid=' . $_REQUEST['searchid']), $count, $set['videos']['searchepp']);
        //Keine Ergebnisse
        if (!$count) {
예제 #6
0
<?php

$apx->lang->drop('register');
headline($apx->lang->get('HEADLINE_REGISTER'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_REGISTER'));
if ($_POST['send']) {
    $_POST['email1'] = trim($_POST['email1']);
    $_POST['email2'] = trim($_POST['email2']);
    $check = $check2 = false;
    list($check) = $db->first("SELECT username_login FROM " . PRE . "_user WHERE LOWER(username_login)='" . addslashes(strtolower($_POST['username'])) . "' LIMIT 1");
    if (!$set['user']['mailmultiacc']) {
        list($check2) = $db->first("SELECT email FROM " . PRE . "_user WHERE LOWER(email)='" . addslashes(strtolower($_POST['email1'])) . "' LIMIT 1");
    }
    $blockname = $user->block_username($_POST['username']);
    //Captcha prüfen
    if ($set['user']['captcha']) {
        require BASEDIR . 'lib/class.captcha.php';
        $captcha = new captcha();
        $captchafailed = $captcha->check();
    }
    if ($captchafailed) {
        message($apx->lang->get('MSG_WRONGCODE'), 'javascript:history.back()');
    } elseif (!$_POST['username'] || !$_POST['pwd1'] || !$_POST['pwd2'] || !$_POST['email1'] || !$_POST['email2']) {
        message('back');
    } elseif ($_POST['pwd1'] != $_POST['pwd2']) {
        message($apx->lang->get('MSG_PWNOMATCH'), 'javascript:history.back()');
    } elseif ($set['user']['userminlen'] && strlen($_POST['username']) < $set['user']['userminlen']) {
        message($apx->lang->get('MSG_USERLENGTH', array('LENGTH' => $set['user']['userminlen'])), 'javascript:history.back()');
    } elseif ($set['user']['pwdminlen'] && strlen($_POST['pwd1']) < $set['user']['pwdminlen']) {
        message($apx->lang->get('MSG_PWDLENGTH', array('LENGTH' => $set['user']['pwdminlen'])), 'javascript:history.back()');
    } elseif ($_POST['email1'] != $_POST['email2']) {
예제 #7
0
<?php

if (!$set['user']['blog']) {
    die('function disabled!');
}
$apx->lang->drop('myblog');
headline($apx->lang->get('HEADLINE_MYBLOG'), mklink('user.php?action=myblog', 'user,myblog.html'));
titlebar($apx->lang->get('HEADLINE_MYBLOG'));
//ERSTELLEN
if ($_REQUEST['do'] == 'add') {
    if ($_POST['send']) {
        if (!$_POST['title'] || !$_POST['text']) {
            message('back');
        } else {
            $_POST['userid'] = $user->info['userid'];
            $_POST['time'] = time();
            $db->dinsert(PRE . '_user_blog', 'userid,title,text,time,allowcoms');
            message($apx->lang->get('MSG_ADD_OK'), mklink('user.php?action=myblog', 'user,myblog.html'));
        }
    } else {
        //Vorschau
        if ($_POST['preview']) {
            $text = $_POST['text'];
            $text = badwords($text);
            $text = replace($text, 1);
            $text = dbsmilies($text);
            $text = dbcodes($text);
            $apx->tmpl->assign('PREVIEW', $text);
        }
        $apx->tmpl->assign('TITLE', compatible_hsc($_POST['title']));
        $apx->tmpl->assign('TEXT', compatible_hsc($_POST['text']));
예제 #8
0
        message($apx->lang->get('MSG_MAILNOTVALID'), 'back');
    } else {
        $goto = HTTP . $set['forum']['directory'] . '/' . mkrellink('thread.php?id=' . $threadinfo['threadid'], 'thread,' . $threadinfo['threadid'] . ',1' . urlformat($threadinfo['title']) . '.html');
        mail($_POST['toemail'], $_POST['subject'], $_POST['text'], 'From: ' . $_POST['username'] . '<' . $_POST['email'] . '>');
        message($apx->lang->get('MSG_OK'), $goto);
    }
} else {
    $url = HTTP . $set['forum']['directory'] . '/' . mkrellink('thread.php?id=' . $threadinfo['threadid'], 'thread,' . $threadinfo['threadid'] . ',1' . urlformat($threadinfo['title']) . '.html');
    //Captcha erstellen
    if ($set['main']['tellcaptcha'] && !$user->info['userid']) {
        require BASEDIR . 'lib/class.captcha.php';
        $captcha = new captcha();
        $captchacode = $captcha->generate();
    }
    $apx->tmpl->assign('POSTTO', $_SERVER['REQUEST_URI']);
    $apx->tmpl->assign('TITLE', trim(compatible_hsc(strip_tags(forum_get_prefix($threadinfo['prefix']) . ' ') . $threadinfo['title'])));
    $apx->tmpl->assign('TEXT', compatible_hsc($apx->lang->get('MAIL_TELL_TEXT', array('URL' => $url))));
    $apx->tmpl->assign('CAPTCHA', $captchacode);
    $apx->tmpl->parse('tell');
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
$threadpath = array(array('TITLE' => trim(compatible_hsc(strip_tags(forum_get_prefix($threadinfo['prefix']) . ' ') . $threadinfo['title'])), 'LINK' => mkrellink('thread.php?id=' . $threadinfo['threadid'], 'thread,' . $threadinfo['threadid'] . ',1' . urlformat($threadinfo['title']) . '.html')));
$apx->tmpl->assign('PATH', array_merge(forum_path($foruminfo, 1), $threadpath));
$apx->tmpl->assign('PATHEND', $apx->lang->get('HEADLINE_TELL'));
titlebar($apx->lang->get('HEADLINE_TELL'));
////////////////////////////////////////////////////////////////////////////////////////////////////////
require 'lib/_end.php';
///////////////////////////////////////////////////////////////////////////
require '../lib/_end.php';
//////////////////////////////////////////////////////// SCRIPT BEENDEN ///
////////////////////////////////////////////////////////////////////////////////////////////////////////
예제 #9
0
            $searchid = saveSearchResult('articles', $resultIds);
            header("HTTP/1.1 301 Moved Permanently");
            header('Location: ' . str_replace('&amp;', '&', mklink('articlearchive.php?action=search&searchid=' . $searchid, 'articlearchive.html?action=search&searchid=' . $searchid)));
        }
    }
    require 'lib/_end.php';
}
//////////////////////////////////////////////////////////////////////////////////////////////////////// ARTIKEL AUFLISTEN
if ($_REQUEST['month']) {
    //Verwendete Variablen auslesen
    $parse = $apx->tmpl->used_vars('archive_index');
    //Headline
    $month = substr($_REQUEST['month'], 0, 2);
    $year = substr($_REQUEST['month'], 2);
    headline(getcalmonth($month) . ' ' . $year, mklink('articlearchive.php?month=' . $month . $year, 'articlearchive,' . $month . ',' . $year . ',1.html'));
    titlebar($apx->lang->get('HEADLINE_ARCHIVE') . ': ' . getcalmonth($month) . ' ' . $year);
    //Seitenzahlen generieren
    list($count) = $db->first("SELECT count(id) FROM " . PRE . "_articles WHERE ( ( ( " . time() . " BETWEEN starttime AND endtime ) AND starttime BETWEEN '" . (mktime(0, 0, 0, intval($month), 1, intval($year)) + TIMEDIFF) . "' AND '" . (mktime(0, 0, 0, intval($month + 1), 1, intval($year)) - 1 + TIMEDIFF) . "' ) " . $filter . " " . section_filter() . " )");
    pages(mklink('articlearchive.php?month=' . $_REQUEST['month'], 'articlearchive,' . $month . ',' . $year . ',{P}.html'), $count, $set['articles']['archiveepp']);
    //Artikel ausgeben
    if ($set['articles']['archiveentrysort'] == 1) {
        $orderby = ' starttime DESC ';
    } else {
        $orderby = ' starttime ASC';
    }
    $data = $db->fetch("SELECT a.*,b.userid,b.username,b.email,b.pub_hidemail FROM " . PRE . "_articles AS a LEFT JOIN " . PRE . "_user AS b USING(userid) WHERE ( ( ( " . time() . " BETWEEN starttime AND endtime ) AND starttime BETWEEN '" . (mktime(0, 0, 0, intval($month), 1, intval($year)) + TIMEDIFF) . "' AND '" . (mktime(0, 0, 0, intval($month + 1), 1, intval($year)) - 1 + TIMEDIFF) . "' ) " . $filter . " " . section_filter() . " ) ORDER BY " . $orderby . " " . getlimit($set['articles']['archiveepp']));
    $data = articles_extend_data($data, $parse);
    //Datensatz erweitern durch Preview/Review-Daten
    //Kategorien auslesen
    if (in_array('ARTICLE.CATTITLE', $parse) || in_array('ARTICLE.CATICON', $parse) || in_array('ARTICLE.CATLINK', $parse)) {
        $catinfo = articles_catinfo(get_ids($data, 'catid'));
예제 #10
0
function main_set_titlebar($title = '')
{
    if (!$title) {
        return;
    }
    titlebar($title);
}
예제 #11
0
     $_REQUEST['letter'] = 0;
 }
 //Buchstabenfilter
 if ($_REQUEST['letter']) {
     if ($_REQUEST['letter'] == 'spchar') {
         $letterfilter = " AND title NOT REGEXP(\"^[a-zA-Z]\")";
     } else {
         $letterfilter = " AND title LIKE '" . $_REQUEST['letter'] . "%'";
     }
 }
 //Kategorie-Info auslesen
 $catinfo = $db->first("SELECT * FROM " . PRE . "_glossar_cat WHERE id='" . $_REQUEST['catid'] . "' LIMIT 1");
 $catlink = mklink('glossar.php?catid=' . $catinfo['id'], 'glossar,' . $catinfo['id'] . ',0,1' . urlformat($catinfo['title']) . '.html');
 //Headline
 headline($catinfo['title'], $catlink);
 titlebar($apx->lang->get('HEADLINE') . ': ' . $catinfo['title']);
 //Seitenzahlen
 list($count) = $db->first("SELECT count(id) FROM " . PRE . "_glossar WHERE ( catid='" . $_REQUEST['catid'] . "' AND starttime!=0 " . $letterfilter . " )");
 pages(mklink('glossar.php?catid=' . $catinfo['id'] . '&amp;letter=' . $_REQUEST['letter'], 'glossar,' . $catinfo['id'] . ',' . $_REQUEST['letter'] . ',{P}' . urlformat($catinfo['title']) . '.html'), $count, $set['glossar']['epp']);
 //Begriffe auslesen
 $data = $db->fetch("SELECT * FROM " . PRE . "_glossar WHERE ( catid='" . $_REQUEST['catid'] . "' AND starttime!=0 " . $letterfilter . " ) ORDER BY title ASC " . getlimit($set['glossar']['epp']));
 $index = array();
 if (count($data)) {
     //Nach Buchstaben sortieren
     $letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ#';
     for ($i = 0; $i < strlen($letters); $i++) {
         $index[$letters[$i]] = array();
     }
     foreach ($data as $res) {
         $letter = glossar_letter($res['title']);
         $index[$letter][] = $res;
예제 #12
0
    tmessage('profileregonly', array(), false, false);
    require 'lib/_end.php';
}
//Benutzernamen auslesen
$profileInfo = $db->first("SELECT userid,username,pub_usegb,pub_profileforfriends FROM " . PRE . "_user WHERE userid='" . $_REQUEST['id'] . "' LIMIT 1");
list($userid, $username, $usegb, $friendonly) = $profileInfo;
$apx->tmpl->assign('USERID', $userid);
$apx->tmpl->assign('USERNAME', replace($username));
//Nur für Freunde
if ($friendonly && !$user->is_buddy_of($userid) && $user->info['userid'] != $userid && $user->info['groupid'] != 1) {
    message($apx->lang->get('MSG_FRIENDSONLY'));
    require 'lib/_end.php';
}
$apx->lang->drop('gallery');
headline($apx->lang->get('HEADLINE_GALLERY'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_GALLERY'));
//Links zu den Profil-Funktionen
user_assign_profile_links($apx->tmpl, $profileInfo);
//Galerie ausgewählt
if ($_REQUEST['galid']) {
    $galid = $_REQUEST['galid'];
    //Zugangsrechte?
    $gallery = $db->first("SELECT * FROM " . PRE . "_user_gallery WHERE id='" . $galid . "' AND owner='" . $_REQUEST['id'] . "' LIMIT 1");
    if (!$gallery['id']) {
        die('access denied!');
    }
    //Passwortschutz
    if ($gallery['password']) {
        $password = $gallery['password'];
        $pwdid = $gallery['id'];
    }
예제 #13
0
<?php

$apx->lang->drop('usermap');
headline($apx->lang->get('HEADLINE_USERMAP'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_USERMAP'));
$tabledata = array();
$topleft_x = $set['user']['usermap_topleft_x'];
$topleft_y = $set['user']['usermap_topleft_y'];
$bottomright_x = $set['user']['usermap_bottomright_x'];
$bottomright_y = $set['user']['usermap_bottomright_y'];
$mapwidth = $set['user']['usermap_width'];
$mapheight = $set['user']['usermap_height'];
//Orte auslesen
$posids = array();
$location = array();
$data = $db->fetch("SELECT userid,username,locid FROM " . PRE . "_user WHERE locid!=0 ORDER BY username ASC");
if (count($data)) {
    foreach ($data as $res) {
        $locationid = $res['locid'];
        if (!isset($location[$locationid])) {
            $location[$locationid] = array();
        }
        $location[$locationid][] = array('userid' => $res['userid'], 'username' => $res['username']);
        $posids[] = $locationid;
    }
}
//Positionen auslesen
if (count($location)) {
    $posids = array_unique($posids);
    $position = $db->fetch_index("SELECT id,name,l,b FROM " . PRE . "_user_locations WHERE id IN ('" . implode("','", $posids) . "')", 'id');
    if (count($position)) {
예제 #14
0
<?php

$apx->lang->drop('userlist');
headline($apx->lang->get('HEADLINE_USERLIST'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_USERLIST'));
$where = '';
//Verwendete Variablen auslesen
$parse = $apx->tmpl->used_vars('list');
//Link zur Usersuche
$searchlink = mklink('user.php?action=search', 'user,search.html');
$apx->tmpl->assign('LINK_SEARCH', $searchlink);
//Anzahl
if (in_array('USERCOUNT', $parse)) {
    list($totalcount) = $db->first("SELECT count(*) FROM " . PRE . "_user WHERE active=1");
    $apx->tmpl->assign('USERCOUNT', $totalcount);
}
if (in_array('TODAYCOUNT', $parse)) {
    list($todaycount) = $db->first("SELECT count(*) FROM " . PRE . "_user WHERE active=1 AND reg_time>='" . mktime(0, 0, 0, date('n', time() - TIMEDIFF), date('d', time() - TIMEDIFF), date('Y', time() - TIMEDIFF)) . "'");
    $apx->tmpl->assign('TODAYCOUNT', $todaycount);
}
if (!$_REQUEST['letter']) {
    $_REQUEST['letter'] = '0';
}
//Buchstaben-Liste
letters(mklink('user.php?action=list&amp;sortby=' . $_REQUEST['sortby'], 'user,list,{LETTER},1.html' . iif($_REQUEST['sortby'], '?sortby=' . $_REQUEST['sortby'])));
if ($_REQUEST['letter']) {
    if ($_REQUEST['letter'] == 'spchar') {
        $where = "AND username NOT REGEXP(\"^[a-zA-Z]\")";
    } else {
        $where = "AND username LIKE '" . addslashes($_REQUEST['letter']) . "%'";
    }
예제 #15
0
<?php

$apx->lang->drop('friends');
headline($apx->lang->get('HEADLINE_FRIENDS'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_FRIENDS'));
//Seitenzahlen
list($count) = $db->first("SELECT count(userid) FROM " . PRE . "_user WHERE ( active='1' " . $where . " )");
$pagelink = mklink('user.php?action=list&amp;sortby=' . $_REQUEST['sortby'] . '&amp;letter=' . $_REQUEST['letter'], 'user,list,' . $_REQUEST['letter'] . ',{P}.html' . iif($_REQUEST['sortby'], '?sortby=' . $_REQUEST['sortby']));
pages($pagelink, $count, $set['user']['friendsepp']);
//Buddyliste
$userdata = array();
$buddies = $user->get_buddies();
if (count($buddies)) {
    $data = $db->fetch("SELECT userid,username,groupid,realname,gender,city,plz,country,city,lastactive,pub_invisible,avatar,avatar_title,custom1,custom2,custom3,custom4,custom5,custom6,custom7,custom8,custom9,custom10 FROM " . PRE . "_user WHERE userid IN (" . implode(',', $buddies) . ") ORDER BY username ASC" . getlimit($set['user']['friendsepp']));
    if (count($data)) {
        foreach ($data as $res) {
            ++$i;
            $userdata[$i]['ID'] = $res['userid'];
            $userdata[$i]['USERID'] = $res['userid'];
            $userdata[$i]['USERNAME'] = replace($res['username']);
            $userdata[$i]['GROUPID'] = $res['groupid'];
            $userdata[$i]['ONLINE'] = iif(!$res['pub_invisible'] && $res['lastactive'] + $set['user']['timeout'] * 60 >= time(), 1, 0);
            $userdata[$i]['REALNAME'] = replace($res['realname']);
            $userdata[$i]['GENDER'] = $res['gender'];
            $userdata[$i]['CITY'] = replace($res['city']);
            $userdata[$i]['PLZ'] = replace($res['plz']);
            $userdata[$i]['COUNTRY'] = $res['country'];
            $userdata[$i]['LASTACTIVE'] = $res['lastactive'];
            $userdata[$i]['AVATAR'] = $user->mkavatar($res);
            $userdata[$i]['AVATAR_TITLE'] = $user->mkavtitle($res);
            //Custom-Felder
예제 #16
0
    die('missing ID!');
}
//Benutzernamen auslesen
$profileInfo = $db->first("SELECT userid,username,pub_usegb,pub_profileforfriends FROM " . PRE . "_user WHERE userid='" . $_REQUEST['id'] . "' LIMIT 1");
list($userid, $username, $usegb, $friendonly) = $profileInfo;
$apx->tmpl->assign('USERID', $userid);
$apx->tmpl->assign('USERNAME', replace($username));
//Nur für Freunde
if ($friendonly && !$user->is_buddy_of($userid) && $user->info['userid'] != $userid && $user->info['groupid'] != 1) {
    message($apx->lang->get('MSG_FRIENDSONLY'));
    require 'lib/_end.php';
}
//Links zu den Profil-Funktionen
user_assign_profile_links($apx->tmpl, $profileInfo);
headline($apx->lang->get('HEADLINE_COLLECTION'), $apx->tmpl->parsevars['LINK_COLLECTION']);
titlebar($apx->lang->get('HEADLINE_COLLECTION'));
////////////////////////////////////////////////////////////////////////////////////////// PRODUKT-LISTE
//Verwendete Variablen auslesen
$parse = $apx->tmpl->used_vars('collection');
$where = '';
if (!in_array($_REQUEST['type'], $types)) {
    $_REQUEST['type'] = 0;
}
//Typ-Filter
if ($_REQUEST['type']) {
    $where .= " AND type='" . addslashes($_REQUEST['type']) . "' ";
}
if ($_REQUEST['genre']) {
    $where .= " AND genre='" . addslashes($_REQUEST['genre']) . "' ";
}
if ($_REQUEST['system']) {
예제 #17
0
<?php

$_REQUEST['id'] = (int) $_REQUEST['id'];
if (!$_REQUEST['id']) {
    die('missing ID!');
}
$apx->lang->drop('readpm');
headline($apx->lang->get('HEADLINE_READPM'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_READPM'));
$res = $db->first("SELECT a.id,a.subject,a.text,a.time,a.addsig,b.userid,b.username,b.signature FROM " . PRE . "_user_pms AS a LEFT JOIN " . PRE . "_user AS b ON a.fromuser=b.userid WHERE ( a.id='" . $_REQUEST['id'] . "' AND ( a.touser='******'userid'] . "' OR a.fromuser='******'userid'] . "' ) ) LIMIT 1");
if (!$res['id']) {
    die('you can only read your own messages!');
}
$text = $res['text'];
if ($set['user']['pm_badwords']) {
    $text = badwords($text);
}
$text = replace($text, 1);
if ($set['user']['pm_allowsmilies']) {
    $text = dbsmilies($text);
}
if ($set['user']['pm_allowcode']) {
    $text = dbcodes($text);
}
$postto = mklink('user.php?action=readpm', 'user,readpm.html');
$answer = mklink('user.php?action=newpm&amp;answer=' . $res['id'], 'user,newpm.html?answer=' . $res['id']);
$delete = mklink('user.php?action=delpm&amp;id=' . $res['id'], 'user,delpm,' . $res['id'] . '.html');
$ignore = mklink('user.php?action=ignorelist&amp;add=1&amp;username='******'username']), 'user,ignorelist.html?add=1&amp;username='******'username']));
$apx->tmpl->assign('ID', $res['id']);
$apx->tmpl->assign('SUBJECT', $res['subject']);
$apx->tmpl->assign('TEXT', $text);
예제 #18
0
if ($year < $minyear) {
    $year = $minyear;
}
if ($month > 12) {
    $month = 12;
}
if ($month < 1) {
    $month = 1;
}
//Verwendete Variablen auslesen
$parse = $apx->tmpl->used_vars('calendar_month');
//Headline und Titlebar
$firstdaystamp = mktime(0, 0, 0, $month, 1, $year) + TIMEDIFF;
$monthtitle = getcalmonth(date('F', $firstdaystamp - TIMEDIFF)) . ' ' . date('Y', $firstdaystamp - TIMEDIFF);
headline($monthtitle, mklink('calendar.php?month=' . $month . '&amp;year=' . $year . iif($_REQUEST['mode'] == 'private', '&amp;mode=private'), 'calendar,' . $_REQUEST['mode'] . ',month' . sprintf('%02d', $month) . $year . '.html'));
titlebar($apx->lang->get('HEADLINE') . ': ' . $monthtitle);
//Tage des vorherigen Monats auffüllen
$startday = 1;
$timestamp = mktime(0, 0, 0, $month, 1, $year) + TIMEDIFF;
$subday = (date('w', $timestamp - TIMEDIFF) + 6) % 7;
//Tage des nächsten Monats auffüllen
$monthdays = (int) date('t', $timestamp - TIMEDIFF);
$timestamp = mktime(0, 0, 0, $month, $monthdays, $year) + TIMEDIFF;
$weekday = date('w', $timestamp - TIMEDIFF);
$adddays = (7 - $weekday) % 7;
//Tage des gewählten Monats durchlaufen
$monthdata = array();
$firstweekofmonth = '';
for ($day = 1 - $subday; $day <= $monthdays + $adddays; $day++) {
    ++$i;
    $timestamp = mktime(0, 0, 0, $month, $day, $year) + TIMEDIFF;
예제 #19
0
 }
 //Titel
 $headline = array();
 $tt = explode('->', $res['title']);
 $number = count($tt);
 foreach ($tt as $one) {
     ++$hi;
     if ($number == $hi) {
         headline(trim($one), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
     } else {
         headline(trim($one));
     }
     $last = $one;
     $headline[] = array('TEXT' => trim($one));
 }
 titlebar(strip_tags($last));
 //Alte Platzhalter für Abwärtskompatiblität
 $apx->tmpl->assign('USERID', $res['userid']);
 $apx->tmpl->assign('USERNAME', replace($res['username']));
 $apx->tmpl->assign('EMAIL', replace(iif(!$res['pub_hidemail'], $res['email'])));
 $apx->tmpl->assign('EMAIL_ENCRYPTED', replace(iif(!$res['pub_hidemail'], cryptMail($res['email']))));
 //Autor
 $apx->tmpl->assign('AUTHOR_USERID', $res['userid']);
 $apx->tmpl->assign('AUTHOR_USERNAME', replace($res['username']));
 $apx->tmpl->assign('AUTHOR_EMAIL', replace(iif(!$res['pub_hidemail'], $res['email'])));
 $apx->tmpl->assign('AUTHOR_EMAIL_ENCRYPTED', replace(iif(!$res['pub_hidemail'], cryptMail($res['email']))));
 //Letzte Änderung
 $apx->tmpl->assign('LASTCHANGE_TIME', $res['lastchange']);
 $apx->tmpl->assign('LASTCHANGE_USERID', $res['lastchange_userid']);
 $apx->tmpl->assign('LASTCHANGE_USERNAME', replace($res['lc_username']));
 $apx->tmpl->assign('LASTCHANGE_EMAIL_ENCRYPTED', replace(iif(!$res['lc_pub_hidemail'], cryptMail($res['email']))));
예제 #20
0
<?php

$apx->lang->drop('login');
headline($apx->lang->get('HEADLINE_LOGIN'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_LOGIN'));
if ($_POST['send']) {
    if (!$_POST['login_user'] || !$_POST['login_pwd']) {
        message('back');
    } else {
        $res = $db->first("SELECT userid,password,salt,active,reg_key FROM " . PRE . "_user WHERE LOWER(username_login)='" . addslashes(strtolower($_POST['login_user'])) . "' LIMIT 1");
        list($failcount) = $db->first("SELECT count(time) FROM " . PRE . "_loginfailed WHERE ( userid='" . $res['userid'] . "' AND time>='" . (time() - 15 * 60) . "' )");
        if ($failcount >= 5) {
            message($apx->lang->get('MSG_BLOCK'), 'javascript:history.back()');
        } elseif (!$res['userid'] || $res['password'] != md5(md5($_POST['login_pwd']) . $res['salt'])) {
            if ($res['userid']) {
                $db->query("INSERT INTO " . PRE . "_loginfailed VALUES ('" . $res['userid'] . "','" . time() . "')");
            }
            if ($count == 4) {
                message($apx->lang->get('MSG_BLOCK'), 'javascript:history.back()');
            } else {
                message($apx->lang->get('MSG_FAIL'), 'javascript:history.back()');
            }
        } elseif (!$res['active']) {
            message($apx->lang->get('MSG_BANNED'), 'javascript:history.back()');
        } elseif ($set['user']['useractivation'] == 2 && $res['reg_key'] == 'BYADMIN') {
            message($apx->lang->get('MSG_ADMINACTIVATION'), 'javascript:history.back()');
        } elseif ($set['user']['useractivation'] == 3 && $res['reg_key']) {
            message($apx->lang->get('MSG_NOTACTIVE'), 'javascript:history.back()');
        } else {
            setcookie($set['main']['cookie_pre'] . '_userid', $res['userid'], time() + 100 * 24 * 3600, '/');
            setcookie($set['main']['cookie_pre'] . '_password', $res['password'], time() + 100 * 24 * 3600, '/');
예제 #21
0
<?php

$_REQUEST['id'] = (int) $_REQUEST['id'];
if (!$_REQUEST['id']) {
    die('missing ID!');
}
$apx->lang->drop('profile');
headline($apx->lang->get('HEADLINE_PROFILE'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_PROFILE'));
//Nur für Registrierte
if ($set['user']['profile_regonly'] && !$user->info['userid']) {
    tmessage('profileregonly', array(), false, false);
    require 'lib/_end.php';
}
//Userinfo auslesen
$res = $db->first("SELECT * FROM " . PRE . "_user WHERE userid='" . $_REQUEST['id'] . "' LIMIT 1");
$userid = $res['userid'];
if (!$res['userid']) {
    filenotfound();
}
//Nur für Freunde
if ($res['pub_profileforfriends'] && !$user->is_buddy_of($res['userid']) && $user->info['userid'] != $res['userid'] && $user->info['groupid'] != 1) {
    message($apx->lang->get('MSG_FRIENDSONLY'));
    require 'lib/_end.php';
}
//Verwendete Variablen auslesen
$parse = $apx->tmpl->used_vars('profile');
//Besucher aufzeichnen und ausgeben
if (in_array('VISITOR', $parse)) {
    if ($_REQUEST['id'] != $user->info['userid']) {
        user_count_visit('profile', $_REQUEST['id']);
예제 #22
0
     $password = $gallery['password'];
     $pwdid = $gallery['id'];
 } else {
     $parentIds = dash_unserialize($gallery['parents']);
     if ($parentIds) {
         list($pwdid, $password) = $db->first("SELECT id,password FROM " . PRE . "_gallery WHERE id='" . $parentIds[0] . "' LIMIT 1");
     }
 }
 if ($password && $password == $_POST['password']) {
     setcookie('gallery_pwd_' . $pwdid, $_POST['password'], time() + 1 * 24 * 3600);
 } elseif ($password && $_COOKIE['gallery_pwd_' . $pwdid] != $password) {
     tmessage('pwdrequired', array('ID' => $_REQUEST['id'], 'PIC' => $_REQUEST['pic']));
 }
 //Headline + Titlebar
 headline(strip_tags($gallery['title']), mklink('gallery.php?id=' . $_REQUEST['id'] . '&amp;p=' . $_REQUEST['p'], 'gallery,list' . $_REQUEST['id'] . ',' . iif($_REQUEST['p'], $_REQUEST['p'], 1) . urlformat($gallery['title']) . '.html'));
 titlebar($apx->lang->get('HEADLINE') . ': ' . strip_tags($gallery['title']));
 //Unter-Galerien auslesen, die veröffentlicht sind
 if ($set['gallery']['subgals'] && $gallery['children']) {
     $openData = $db->fetch("SELECT id FROM " . PRE . "_gallery WHERE id IN (" . implode(', ', $gallery['children']) . ") AND '" . time() . "' BETWEEN starttime AND endtime");
     $openIds = array_merge(get_ids($openData), array($gallery['id']));
 } else {
     $openIds = array($gallery['id']);
 }
 //////////////////// UNTERGALERIEN
 if ($set['gallery']['subgals']) {
     require_once BASEDIR . 'lib/class.recursivetree.php';
     $tree = new RecursiveTree(PRE . '_gallery', 'id');
     $data = $tree->getLevel(array('*'), $_REQUEST['id'], "'" . time() . "' BETWEEN starttime AND endtime");
     if (count($data)) {
         foreach ($data as $res) {
             ++$i;
예제 #23
0
<?php

//Nur für Benutzer oder Gäste explizit erlaubt
if (!($user->info['userid'] || $set['user']['sendmail_guests'])) {
    filenotfound();
    return;
}
$apx->lang->drop('newmail');
headline($apx->lang->get('HEADLINE_NEWMAIL'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_NEWMAIL'));
$_REQUEST['touser'] = (int) $_REQUEST['touser'];
if ($_POST['send']) {
    list($touser, $email) = $db->first("SELECT userid,email FROM " . PRE . "_user WHERE username='******'touser']) . "' LIMIT 1");
    //Captcha prüfen
    if (!$user->info['userid']) {
        require BASEDIR . 'lib/class.captcha.php';
        $captcha = new captcha();
        $captchafailed = $captcha->check();
    }
    if ($captchafailed) {
        message($apx->lang->get('MSG_WRONGCODE'), 'javascript:history.back()');
    } elseif (!$_POST['touser'] || !$_POST['subject'] || !$_POST['text'] || !$user->info['userid'] && (!$_POST['name'] || !$_POST['email'])) {
        message('back');
    } elseif ($user->info['userid'] && $user->ignore($touser, $reason)) {
        if ($reason) {
            message($apx->lang->get('MSG_IGNORED_REASON', array('REASON' => $reason)), 'javascript:history.back()');
        } else {
            message($apx->lang->get('MSG_IGNORED'), 'javascript:history.back()');
        }
    } elseif (!$touser) {
        message($apx->lang->get('MSG_NOTEXISTS'), 'javascript:history.back()');
예제 #24
0
<?php

//Forum-Modul muss aktiv sein!
if (!$apx->is_module('forum')) {
    filenotfound();
    return;
}
$apx->module('forum');
//Diese Aktion gehört dem Forum
$apx->lang->drop('subscribe');
headline($apx->lang->get('HEADLINE_SUBSCRIPTIONS'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_SUBSCRIPTIONS'));
require_once BASEDIR . getmodulepath('forum') . 'basics.php';
//Abonnement-IDs auslesen
$data = $db->fetch("SELECT id,source,notification FROM " . PRE . "_forum_subscriptions WHERE type='forum' AND userid='" . $user->info['userid'] . "'");
$subscr_forums = get_ids($data, 'source');
if (count($data)) {
    foreach ($data as $res) {
        $subsrcinfo_forums[$res['source']] = $res;
    }
}
$data = $db->fetch("SELECT id,source,notification FROM " . PRE . "_forum_subscriptions WHERE type='thread' AND userid='" . $user->info['userid'] . "'");
$subscr_threads = get_ids($data, 'source');
if (count($data)) {
    foreach ($data as $res) {
        $subsrcinfo_threads[$res['source']] = $res;
    }
}
//Foren auslesen
function get_forum_info($id)
{
예제 #25
0
<?php

$apx->lang->drop('newpm');
headline($apx->lang->get('HEADLINE_NEWPM'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_NEWPM'));
$_REQUEST['answer'] = (int) $_REQUEST['answer'];
$_REQUEST['touser'] = (int) $_REQUEST['touser'];
//Eigenen Speicher prüfen
list($pmcount_own) = $db->first("SELECT count(id) FROM " . PRE . "_user_pms WHERE ( ( touser='******'userid'] . "' AND del_to='0' ) OR ( fromuser='******'userid'] . "' AND del_from='0' ) )");
if ($pmcount_own >= $set['user']['maxpmcount']) {
    message($apx->lang->get('MSG_OWNFULL'), 'javascript:history.back()');
    require 'lib/_end.php';
}
if ($_POST['send']) {
    //EmpfängerInfos auslesen
    list($touser, $email, $pop, $mailpm) = $db->first("SELECT userid,email,pub_poppm,pub_mailpm FROM " . PRE . "_user WHERE username='******'touser']) . "' LIMIT 1");
    //Speicher des Empfängers prüfen
    if ($touser) {
        list($pmcount_rec) = $db->first("SELECT count(id) FROM " . PRE . "_user_pms WHERE ( ( touser='******' AND del_to='0' ) OR ( fromuser='******' AND del_from='0' ) )");
        if ($pmcount_rec >= $set['user']['maxpmcount']) {
            $input['USERNAME'] = $user->info['username'];
            $input['WEBSITE'] = $set['main']['websitename'];
            sendmail($email, 'FULL', $input);
            message($apx->lang->get('MSG_FULL'), 'javascript:history.back()');
            require 'lib/_end.php';
        }
    }
    if (!$_POST['touser'] || !$_POST['subject'] || !$_POST['text']) {
        message('back');
    } elseif (!$touser) {
        message($apx->lang->get('MSG_NOTEXISTS'), 'javascript:history.back()');
예제 #26
0
<?php

$apx->lang->drop('onlinelist');
headline($apx->lang->get('HEADLINE_ONLINELIST'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_ONLINELIST'));
//Verwendete Variablen
$parse = $apx->tmpl->used_vars('online');
list($count['users']) = $db->first("SELECT count(*) FROM " . PRE . "_user WHERE lastactive>=" . (time() - $set['user']['timeout'] * 60));
list($count['inv']) = $db->first("SELECT count(*) FROM " . PRE . "_user WHERE lastactive>=" . (time() - $set['user']['timeout'] * 60) . " AND pub_invisible=1");
if ($set['user']['onlinelist']) {
    list($count['guests']) = $db->first("SELECT count(*) FROM " . PRE . "_user_online WHERE userid=0");
} else {
    $count['guests'] = 0;
}
$count['total'] = $count['users'] + $count['guests'];
$data = $db->fetch("SELECT b.userid,b.username,b.email,b.pub_hidemail,b.groupid,b.realname,b.gender,b.city,b.plz,b.country,b.city,b.lastactive,b.pub_invisible,b.avatar,b.avatar_title FROM " . PRE . "_user AS b WHERE ( b.lastactive>=" . (time() - $set['user']['timeout'] * 60) . " AND b.pub_invisible='0' ) ORDER BY b.username ASC");
if (count($data)) {
    foreach ($data as $res) {
        ++$i;
        $age = 0;
        if ($res['birthday']) {
            $bd = explode('-', $res['birthday']);
            $birthday = intval($bd[0]) . '. ' . getcalmonth($bd[1]) . iif($bd[2], ' ' . $bd[2]);
            if ($bd[2]) {
                $age = date('Y') - $bd[2];
                if (intval(sprintf('%02d%02d', $bd[1], $bd[0])) > intval(date('md'))) {
                    $age -= 1;
                }
            }
        }
        $tabledata[$i]['ID'] = $res['userid'];
예제 #27
0
            $fromdata[$i]['POSTS'] = $res['posts'];
        }
    }
    //Weitere IPs des Benutzers
    if ($postinfo['userid']) {
        $data = $db->fetch("SELECT ip,count(postid) AS posts FROM " . PRE . "_forum_posts WHERE userid='" . $postinfo['userid'] . "' GROUP BY ip ORDER BY posts DESC");
        foreach ($data as $res) {
            ++$i;
            $otherdata[$i]['IP'] = $res['ip'];
            $otherdata[$i]['POSTS'] = $res['posts'];
        }
    }
    $apx->tmpl->assign('USERNAME', replace($postinfo['username']));
    $apx->tmpl->assign('USERID', $postinfo['userid']);
    $apx->tmpl->assign('THISIP', $postinfo['ip']);
    $apx->tmpl->assign('FROMIP', $fromdata);
    $apx->tmpl->assign('OTHER', $otherdata);
    $apx->tmpl->parse('ipstats');
    ////////////////////////////////////////////////////////////////////////////////////////////////////////
    $apx->tmpl->assign('PATH', forum_path($foruminfo, 1));
    $apx->tmpl->assign('PATHEND', iif($threadinfo['sticky'], $threadinfo['sticky_text'] . ': ') . $threadinfo['title']);
    titlebar($threadinfo['title']);
} else {
    die('action does not exist!');
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
require 'lib/_end.php';
///////////////////////////////////////////////////////////////////////////
require '../lib/_end.php';
//////////////////////////////////////////////////////// SCRIPT BEENDEN ///
////////////////////////////////////////////////////////////////////////////////////////////////////////
예제 #28
0
$apx->tmpl->assign('TEXT', compatible_hsc($_POST['text']));
$apx->tmpl->assign('ICON', iif($_POST['icon'] === 'none', $_POST['icon'], (int) $_POST['icon']));
$apx->tmpl->assign('ICONLIST', $icondata);
$apx->tmpl->assign('SMILEYLIST', $smiledata);
$apx->tmpl->assign('STICKY_TYPE', compatible_hsc($_POST['sticky_type']));
$apx->tmpl->assign('STICKY_TEXT', compatible_hsc($_POST['sticky_text']));
$apx->tmpl->assign('TRANSFORM_LINKS', (int) $_POST['transform_links']);
$apx->tmpl->assign('ATTACHMENTS', $attachments);
$apx->tmpl->assign('ATTACHMENT_TYPES', implode(', ', $filetypes));
$apx->tmpl->assign('SUBSCRIPTION', $_POST['subscription']);
$apx->tmpl->assign('ALLOWCODES', (int) $_POST['allowcodes']);
$apx->tmpl->assign('ALLOWSMILIES', (int) $_POST['allowsmilies']);
$apx->tmpl->assign('ALLOWSIG', (int) $_POST['allowsig']);
$apx->tmpl->assign('SET_CODES', $set['forum']['codes']);
$apx->tmpl->assign('SET_SMILIES', $set['forum']['smilies']);
$apx->tmpl->assign('ANNOUNCE', forum_access_announce($foruminfo));
$apx->tmpl->assign('ATTACH', forum_access_addattachment($foruminfo));
$apx->tmpl->assign('ID', $foruminfo['forumid']);
$apx->tmpl->assign('HASH', $_POST['hash']);
$apx->tmpl->parse('newthread');
////////////////////////////////////////////////////////////////////////////////////////////////////////
$apx->tmpl->assign_static('STYLESHEET', compatible_hsc($foruminfo['stylesheet']));
$apx->tmpl->assign('PATH', forum_path($foruminfo, 1));
$apx->tmpl->assign('PATHEND', $apx->lang->get('HEADLINE_NEWTHREAD'));
titlebar($apx->lang->get('HEADLINE_NEWTHREAD'));
////////////////////////////////////////////////////////////////////////////////////////////////////////
require 'lib/_end.php';
///////////////////////////////////////////////////////////////////////////
require '../lib/_end.php';
//////////////////////////////////////////////////////// SCRIPT BEENDEN ///
////////////////////////////////////////////////////////////////////////////////////////////////////////
예제 #29
0
|                  http://www.stylemotion.de                    |
|                                                               |
|---------------------------------------------------------------|
| THIS SOFTWARE IS NOT FREE! MAKE SURE YOU OWN A VALID LICENSE! |
| DO NOT REMOVE ANY COPYRIGHTS WITHOUT PERMISSION!              |
| SOFTWARE BELONGS TO ITS AUTHORS!                              |
\***************************************************************/
define('APXRUN', true);
////////////////////////////////////////////////////////////////////////////////////////////////////////
require 'lib/_start.php';
//////////////////////////////////////////////////////////// SYSTEMSTART ///
////////////////////////////////////////////////////////////////////////////////////////////////////////
$apx->module('user');
$apx->lang->drop('team');
headline($apx->lang->get('HEADLINE'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE'));
//Daten erzeugen
function createTeamData($res, $parse)
{
    global $apx, $db, $set, $user;
    $userdata = array();
    if ($res['birthday']) {
        $bd = explode('-', $res['birthday']);
        $birthday = intval($bd[0]) . '. ' . getcalmonth($bd[1]) . iif($bd[2], ' ' . $bd[2]);
        if ($bd[2]) {
            $age = date('Y') - $bd[2];
            if (intval(sprintf('%02d%02d', $bd[1], $bd[0])) > intval(date('md'))) {
                $age -= 1;
            }
        }
    }
예제 #30
0
        $db->query("DELETE FROM " . PRE . "_user_guestbook WHERE id='" . $_POST['del'] . "' AND owner='" . $user->info['userid'] . "' LIMIT 1");
        $goto = mklink('user.php?action=guestbook&amp;id=' . $user->info['userid'], 'user,guestbook,' . $user->info['userid'] . ',1.html');
        message($apx->lang->get('MSG_DEL_OK'), $goto);
    } else {
        tmessage('delguestbook', array('ID' => $_REQUEST['del']));
    }
    return;
}
////////////////////
$_REQUEST['id'] = (int) $_REQUEST['id'];
if (!$_REQUEST['id']) {
    die('missing ID!');
}
$apx->lang->drop('guestbook');
headline($apx->lang->get('HEADLINE_GUESTBOOK'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_GUESTBOOK'));
//Benutzernamen auslesen
$profileInfo = $db->first("SELECT userid,username,pub_usegb,pub_profileforfriends FROM " . PRE . "_user WHERE userid='" . $_REQUEST['id'] . "' LIMIT 1");
list($userid, $username, $usegb, $friendonly) = $profileInfo;
$apx->tmpl->assign('USERID', $userid);
$apx->tmpl->assign('USERNAME', replace($username));
//Nur für Freunde
if ($friendonly && !$user->is_buddy_of($userid) && $user->info['userid'] != $userid && $user->info['groupid'] != 1) {
    message($apx->lang->get('MSG_FRIENDSONLY'));
    require 'lib/_end.php';
}
//Gästebuch vom Benutzer deaktiviert
if (!$usegb) {
    message($apx->lang->get('MSG_DISABLED'));
    require 'lib/_end.php';
} elseif ($usegb == 2 && $user->info['userid'] != $userid && $user->info['groupid'] != 1) {