function listtag($listoptions, $text, $tagname)
{
    require_once libfile('function/post');
    $text = preg_replace('/<li>((.(?!<\\/li))*)(?=<\\/?ol|<\\/?ul|<li|\\[list|\\[\\/list)/siU', '<li>\\1</li>', $text) . (isopera() ? '</li>' : NULL);
    $text = recursion('li', $text, 'litag');
    if ($tagname == 'ol') {
        $listtype = fetchoptionvalue('type=', $listoptions) ? fetchoptionvalue('type=', $listoptions) : 1;
        if (in_array($listtype, array('1', 'a', 'A'))) {
            $opentag = '[list=' . $listtype . ']';
        }
    } else {
        $opentag = '[list]';
    }
    return $text ? $opentag . recursion($tagname, $text, 'listtag') . '[/list]' : FALSE;
}
Beispiel #2
0
    }
    $trade = array();
    if (($action == 'newthread' || $action == 'reply') && $special == 2) {
        $query = $db->query("SELECT alipay FROM {$tablepre}memberfields WHERE uid='{$discuz_uid}'");
        $trade['account'] = $db->result($query, 0);
        $trade['amount'] = 1;
        $trade['transport'] = 2;
    }
    $currtime = gmdate("{$dateformat} {$timeformat}", $timestamp + $timeoffset * 3600);
    if (empty($previewpost)) {
        $subject = $message = $polloptions = '';
    } else {
        $subject = stripslashes($subject);
        $message = stripslashes($message);
        $message_preview = discuzcode($message, !empty($smileyoff), !empty($bbcodeoff), !empty($htmlon), $forum['allowsmilies'], $forum['allowbbcode'], $forum['allowimgcode'], $forum['allowhtml'], 0, 1);
        $message = $editormode == 1 && $bbinsert && !(isopera() && isopera() < 9) ? $message_preview : dhtmlspecialchars($message);
        $urloffcheck = !empty($parseurloff) ? 'checked="checked"' : '';
        $usesigcheck = !empty($usesig) ? 'checked="checked"' : '';
        $smileyoffcheck = !empty($smileyoff) ? 'checked="checked"' : '';
        $codeoffcheck = !empty($bbcodeoff) ? 'checked="checked"' : '';
        $htmloncheck = !empty($htmlon) ? 'checked="checked"' : '';
        $emailcheck = !empty($emailnotify) ? 'checked="checked"' : '';
        $topicsubmit = $replysubmit = $editsubmit = '';
    }
} else {
    if ((!empty($topicsubmit) || !empty($replysubmit)) && ($seccodecheck && !isset($seccodeverify) || $secqaacheck && !isset($secanswer))) {
        if ($seccodecheck) {
            $seccode = random(6, 1) + $seccode[0] * 1000000;
        }
        if ($secqaacheck) {
            $seccode = random(1, 1) * 1000000 + substr($seccode, -6);