示例#1
0
                    $dowords = 0;
                } else {
                    $dowords = $data['dowords'];
                }
                $bbcode->setReplace($dowords);
                $data['formatted_comment'] = $bbcode->parse($data['comment']);
                $data['formatted_prefix'] = '';
                if (isset($prefix_arr[$data['prefix']])) {
                    $data['formatted_prefix'] = $prefix_arr[$data['prefix']]['value'];
                }
            }
        } else {
            $data = array('topic' => $info['topic'], 'comment' => $info['comment'], 'prefix' => $info['prefix'], 'dosmileys' => $info['dosmileys'], 'dowords' => $info['dowords'], 'about' => '');
        }
        if (count($prefix_arr) > 0 && $info['tstart'] == 1) {
            array_columnsort($prefix_arr, "value");
            if ($last['prefix'] == 0) {
                $prefix_arr = array($lang->phrase('prefix_empty')) + $prefix_arr;
            }
            $sel = $data['prefix'];
            $inner['index_prefix'] = $tpl->parse("edit/prefix");
        } else {
            $inner['index_prefix'] = '';
        }
        $inner['smileys'] = $bbcode->getsmileyhtml($config['smileysperrow']);
        $inner['bbhtml'] = $bbcode->getbbhtml();
        ($code = $plugins->load('edit_form_prepared')) ? eval($code) : null;
        echo $tpl->parse("edit/edit");
        ($code = $plugins->load('edit_form_end')) ? eval($code) : null;
    }
} else {
         $bbcode->setReplace($dowords);
         $data['formatted_comment'] = $bbcode->parse($data['comment']);
         $prefix = '';
         if (isset($prefix_arr[$data['prefix']])) {
             $prefix = $prefix_arr[$data['prefix']]['value'];
         }
     }
 } else {
     $data = array('prefix' => 0, 'vote' => '', 'replies' => '', 'name' => '', 'email' => '', 'comment' => '', 'dosmileys' => 1, 'dowords' => 1, 'topic' => '');
     $_GET['action'] = '';
 }
 if (count($prefix_arr) > 0) {
     array_columnsort($prefix_arr, "value");
     if ($last['prefix'] == 0) {
         $prefix_arr_standard = $prefix_arr;
         array_columnsort($prefix_arr_standard, "standard");
         $standard = end($prefix_arr_standard);
         if ($standard['standard'] == 1) {
             $sel = key($prefix_arr_standard);
         } else {
             $sel = 0;
         }
         unset($prefix_arr_standard, $standard);
         $prefix_arr = array($lang->phrase('prefix_empty')) + $prefix_arr;
     } else {
         $sel = -1;
     }
     if ($data['prefix'] > 0) {
         $sel = $data['prefix'];
     }
     $inner['index_prefix'] = $tpl->parse("newtopic/index_prefix");