Ejemplo n.º 1
0
 if (!forum_access_editpost($foruminfo, $threadinfo, $postinfo)) {
     tmessage('noright', array(), false, false);
 }
 //Ist der Beitrag der erste Beitrag im Thema?
 if ($threadinfo['firstpost'] == $postinfo['postid']) {
     $firstpost = true;
 } else {
     $firstpost = false;
 }
 //VORSCHAU
 if ($_POST['preview']) {
     $preview = $_POST['text'];
     if ($_POST['transform_links']) {
         $preview = transform_urls($preview);
     }
     $preview = forum_replace($preview, $_POST['allowcodes'], $_POST['allowsmilies']);
     $apx->tmpl->assign('PREVIEW', $preview);
 } elseif ($_POST['send']) {
     if (!$_POST['text'] || $firstpost && !$_POST['title'] || !$postinfo['userid'] && !$_POST['username'] || $firstpost && $_POST['sticky_type'] == 'own' && !$_POST['sticky_text']) {
         message('back');
     } else {
         //Benutzername
         if (!$postinfo['userid']) {
             $addpostfield = 'username,';
             $addthreadfield = 'opener,';
             $_POST['opener'] = $_POST['username'];
         }
         //Links parsen
         if ($_POST['transform_links']) {
             $_POST['text'] = transform_urls($_POST['text']);
         }
Ejemplo n.º 2
0
check_forum_password($foruminfo);
//Lastvisit für dieses Thema bestimmen
$lastvisit = max(array($user->info['forum_lastonline'], thread_readtime($threadinfo['threadid']), forum_readtime($foruminfo['forumid'])));
///////////////////////////////////////////////////////////////////////////////////////// BEITRAG
$res = $postinfo;
require_once BASEDIR . 'lib/class.mediamanager.php';
$mm = new mediamanager();
//Userinfo auslesen
if ($res['userid']) {
    $userdat = $db->first("SELECT a.userid,a.groupid,a.reg_time,a.forum_posts,a.avatar,a.avatar_title,a.signature,a.homepage,a.city,a.icq,a.aim,a.yim,a.msn,a.skype,a.forum_lastactive,a.pub_invisible,a.custom1,a.custom2,a.custom3,a.custom4,a.custom5,a.custom6,a.custom7,a.custom8,a.custom9,a.custom10,b.gtype FROM " . PRE . "_user AS a LEFT JOIN " . PRE . "_user_groups AS b USING(groupid) WHERE a.userid='" . $res['userid'] . "' LIMIT 1");
} else {
    $userdat = array();
}
$mods = $foruminfo['moderator'];
//Text
$text = forum_replace($postinfo['text'], $postinfo['allowcodes'], $postinfo['allowsmilies']);
//Benutzerkennzeichen
$siganture = $avatar = $avatar_title = '';
if ($postinfo['userid']) {
    if ($postinfo['allowsig']) {
        $signature = $user->mksig($userdat);
    }
    if ($userdat['avatar']) {
        $avatar = $user->mkavatar($userdat);
        $avatar_title = $user->mkavtitle($userdat);
    }
}
//Anhänge auslesen
$atttable = array();
$imgatttable = array();
$attdata = $db->fetch("SELECT id,postid,hash,file,thumbnail,name,size FROM " . PRE . "_forum_attachments WHERE postid='" . $_REQUEST['id'] . "' ORDER BY name ASC");
Ejemplo n.º 3
0
$apx->tmpl->assign('TRANSFORM_LINKS', (int) $_POST['transform_links']);
$apx->tmpl->assign('ATTACHMENT_TYPES', implode(', ', $filetypes));
$apx->tmpl->assign('ATTACHMENTS', $attachments);
$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']);
//Die letzten 10 Beiträge
$data = $db->fetch("SELECT postid,userid,username,text,time,allowcodes,allowsmilies FROM " . PRE . "_forum_posts WHERE ( del=0 AND threadid='" . $threadinfo['threadid'] . "' ) ORDER BY time DESC LIMIT 10");
if (count($data)) {
    foreach ($data as $res) {
        ++$i;
        //Text
        $text = forum_replace($res['text'], $res['allowcodes'], $res['allowsmilies']);
        $postdata[$i]['ID'] = $res['postid'];
        $postdata[$i]['USERID'] = $res['userid'];
        $postdata[$i]['USERNAME'] = replace($res['username']);
        $postdata[$i]['TEXT'] = $text;
        $postdata[$i]['TIME'] = $res['time'];
    }
}
$apx->tmpl->assign('POST', $postdata);
$apx->tmpl->assign('ATTACH', forum_access_addattachment($foruminfo));
$apx->tmpl->assign('ID', $threadinfo['threadid']);
$apx->tmpl->assign('HASH', $_POST['hash']);
$apx->tmpl->parse('newpost');
////////////////////////////////////////////////////////////////////////////////////////////////////////
$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_static('STYLESHEET', compatible_hsc($foruminfo['stylesheet']));
Ejemplo n.º 4
0
        tmessage('noright', array(), false, false);
    }
}
//Lastvisit für dieses Thema bestimmen
$lastvisit = max(array($user->info['forum_lastonline'], announcement_readtime($anninfo['id'])));
announcement_isread($anninfo['id']);
///////////////////////////////////////////////////////////////////////////////////////// BEITRAG
//Userinfo auslesen
if ($anninfo['userid']) {
    $userdat = $db->first("SELECT a.userid,a.username,a.groupid,a.reg_time,a.forum_posts,a.avatar,a.avatar_title,a.signature,a.homepage,a.city,a.icq,a.aim,a.yim,a.msn,a.skype,a.forum_lastactive,a.pub_invisible,a.custom1,a.custom2,a.custom3,a.custom4,a.custom5,a.custom6,a.custom7,a.custom8,a.custom9,a.custom10,b.gtype FROM " . PRE . "_user AS a LEFT JOIN " . PRE . "_user_groups AS b USING(groupid) WHERE a.userid='" . $anninfo['userid'] . "' LIMIT 1");
} else {
    $userdat = array();
}
$mods = dash_unserialize($foruminfo['moderator']);
//Text
$text = forum_replace($anninfo['text'], true, true);
//Benutzerkennzeichen
$siganture = $avatar = $avatar_title = '';
if ($anninfo['userid']) {
    if ($anninfo['allowsig']) {
        $signature = $user->mksig($userdat);
    }
    if ($userdat['avatar']) {
        $avatar = $user->mkavatar($userdat);
        $avatar_title = $user->mkavtitle($userdat);
    }
}
//Rang
$rankinfo = get_rank($userdat);
$apx->tmpl->assign('ID', $anninfo['postid']);
$apx->tmpl->assign('TITLE', replace($anninfo['title']));