示例#1
0
    $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('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('FIRST', $firstpost);
    $apx->tmpl->assign('ANNOUNCE', forum_access_announce($foruminfo));
    $apx->tmpl->assign('ATTACH', forum_access_addattachment($foruminfo));
    $apx->tmpl->assign('ID', $postinfo['postid']);
    $apx->tmpl->assign('HASH', $_POST['hash']);
    $apx->tmpl->parse('editpost');
    ////////////////////////////////////////////
    $threadpath = array(array('TITLE' => replace($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_EDITPOST'));
    titlebar($apx->lang->get('HEADLINE_EDITPOST'));
} elseif ($_REQUEST['action'] == 'delpost') {
    $apx->lang->drop('admin');
    $_REQUEST['id'] = (int) $_REQUEST['id'];
    if (!$_REQUEST['id']) {
        die('missing post-ID!');
    }
    $postinfo = post_info($_REQUEST['id']);
示例#2
0
    }
    $threadinfo = thread_info($postinfo['threadid']);
    if (!$threadinfo['threadid']) {
        message($apx->lang->get('MSG_THREADNOTEXIST'));
    }
    $foruminfo = forum_info($threadinfo['forumid']);
    if (!$foruminfo['forumid']) {
        message($apx->lang->get('MSG_FORUMNOTEXIST'));
    }
    if ($threadinfo['del'] && !($user->info['userid'] && ($user->is_admin() || in_array($user->info['userid'], $foruminfo['moderator'])))) {
        message($apx->lang->get('MSG_THREADNOTEXIST'));
    }
    if ($postinfo['del'] && !($user->info['userid'] && ($user->is_admin() || in_array($user->info['userid'], $foruminfo['moderator'])))) {
        message($apx->lang->get('MSG_POSTNOTEXIST'));
    }
    if (!forum_access_addattachment($foruminfo)) {
        tmessage('noright', array(), false, false);
    }
}
require BASEDIR . 'lib/class.mediamanager.php';
$mm = new mediamanager();
//Dateitypen
$typeinfo = array();
$data = $db->fetch("SELECT * FROM " . PRE . "_forum_filetypes ORDER BY ext ASC");
if (count($data)) {
    foreach ($data as $res) {
        $i++;
        $filedata[$i]['EXT'] = $res['ext'];
        $filedata[$i]['ICON'] = $res['icon'];
        $filedata[$i]['MAXSIZE'] = $res['size'];
        $typeinfo[$res['ext']] = array($res['size'] * 1024, $res['icon']);