showsubtitle(array('', 'misc_censor_word', 'misc_censor_replacement', 'operator')); $query = $db->query("SELECT * FROM {$tablepre}words ORDER BY find ASC LIMIT {$startlimit}, {$ppp}"); while ($censor = $db->fetch_array($query)) { $censor['replacement'] = stripslashes($censor['replacement']); $disabled = $adminid != 1 && $censor['admin'] != $discuz_userss ? 'disabled' : NULL; showtablerow('', array('class="td25"', 'class="td26"', 'class="td26"'), array("<input class=\"checkbox\" type=\"checkbox\" name=\"delete[]\" value=\"{$censor['id']}\" {$disabled}>", "<input type=\"text\" class=\"txt\" size=\"30\" name=\"find[{$censor['id']}]\" value=\"{$censor['find']}\" {$disabled}>", "<input type=\"text\" class=\"txt\" size=\"30\" name=\"replace[{$censor['id']}]\" value=\"{$censor['replacement']}\" {$disabled}>", $censor['admin'])); } showtablerow('', array('class="td25"', 'class="td26"', 'class="td26"'), array(lang('add_new'), '<input type="text" class="txt" size="30" name="newfind">', '<input type="text" class="txt" size="30" name="newreplace">', '')); showsubmit('censorsubmit', 'submit', 'del', '', $multipage); showtablefooter(); showformfooter(); showtagfooter('div'); showtagheader('div', 'import', $anchor == 'import'); showformheader("misc&operation=censor&page={$page}", 'fixpadding'); showtableheader('', 'fixpadding', 'importform'); showtablerow('', 'class="vtop rowform"', '<br /><textarea name="addcensors" class="tarea" rows="10" cols="80"></textarea><br /><br />' . mradio('overwrite', array(0 => lang('misc_censor_batch_add_no_overwrite'), 1 => lang('misc_censor_batch_add_overwrite'), 2 => lang('misc_censor_batch_add_clear')), '', FALSE)); showsubmit('addcensorsubmit'); showtablefooter(); showformfooter(); showtagfooter('div'); } else { if ($ids = implodeids($delete)) { $db->query("DELETE FROM\t{$tablepre}words WHERE id IN ({$ids}) AND ('{$adminid}'='1' OR admin='{$discuz_user}')"); } if (is_array($find)) { foreach ($find as $id => $val) { $find[$id] = $val = trim(str_replace('=', '', $find[$id])); if (strlen($val) < 3) { cpmsg('censor_keywords_tooshort', '', 'error'); } $replace[$id] = daddslashes(str_replace("\\\\'", '\'', $replace[$id]), 1);
\t\t\t[1,''], \t\t\t[1,'<input type="text" class="txt" size="30" name="newtypename[]">'] \t\t] \t]; \t</script> EOT; echo '<tr><td></td><td colspan="4"><div><a href="###" onclick="addrow(this, 0)" class="addtr">' . $lang['add_new'] . '</a></div></td></tr>'; showsubmit('censorsubmit', 'submit', 'del', '', $multipage, false); showtablefooter(); showformfooter(); showtagfooter('div'); showtagheader('div', 'import', $anchor == 'import'); showformheader("misc&operation=censor&page={$page}", 'fixpadding'); showtableheader('', 'fixpadding', 'importform'); showtablerow('', 'class="vtop rowform"', "<select name=\"wordtype_select\"><option value='0'>" . cplang('misc_censor_word_default_typename') . "</option>{$word_type_option}</select>"); showtablerow('', 'class="vtop rowform"', '<br /><textarea name="addcensors" class="tarea" rows="10" cols="80" onkeyup="textareasize(this)" onkeydown="textareakey(this, event)"></textarea><br /><br />' . mradio('overwrite', array(0 => cplang('misc_censor_batch_add_no_overwrite'), 1 => cplang('misc_censor_batch_add_overwrite'), 2 => cplang('misc_censor_batch_add_clear')), '', FALSE)); showsubmit('addcensorsubmit'); showtablefooter(); showformfooter(); showtagfooter('div'); showtagheader('div', 'wordtype', $anchor == 'wordtype'); showformheader("misc&operation=censor", 'fixpadding'); showtableheader('', 'fixpadding', 'wordtypeform'); showsubtitle(array('', 'misc_censor_wordtype_name')); if ($wordtypecount = C::t('common_word_type')->count()) { foreach (C::t('common_word_type')->fetch_all() as $result) { showtablerow('', array('class="td25"', ''), array("<input class=\"checkbox\" type=\"checkbox\" name=\"delete[]\" value=\"{$result['id']}\" {$disabled}>", "<input type=\"text\" class=\"txt\" size=\"10\" name=\"typename[{$result['id']}]\" value=\"{$result['typename']}\">")); } } echo '<tr><td></td><td colspan="2"><div><a href="###" onclick="addrow(this, 1)" class="addtr">' . $lang['add_new'] . '</a></div></td></tr>'; showsubmit('wordtypesubmit', 'submit', 'del', '', '', false);
showsetting('jswizard_charsetr', array('parameter[jscharset]', array(array(0, $lang['none']), array(1, 'GBK'), array(2, 'BIG5'))), intval($parameter['jscharset']), 'mradio'); } } showsetting('jswizard_boardurl', 'parameter[boardurl]', $parameter['boardurl'], 'text'); echo '<tr><td colspan="2">' . $editext . '<br /><input type="submit" class="btn" name="jssubmit"' . ($type == 'side' ? ' onclick="selectall()"' : '') . ' value="' . $lang['preview'] . '"> <input type="button" class="btn" onclick="this.form.preview.value=0;this.form.jssubmit.click()" value="' . $lang['submit'] . '"><input name="preview" type="hidden" value="1"></td></tr>'; showtablefooter(); showformfooter(); } } elseif ($operation == 'import') { if (!submitcheck('importsubmit')) { shownav('tools', 'nav_javascript'); showsubmenu('nav_javascript', array(array('config', 'jswizard&operation=config', 0), $infosidemenu, array('admin', 'jswizard', 0), array(array('menu' => 'jswizard_addmodule', 'submenu' => $addmenu), '', 0), array('jswizard_module', 'jswizard&type=module', 0), array('import', 'jswizard&operation=import', 1))); showformheader('jswizard&operation=import', 'enctype'); showtableheader('jswizard_import'); showimportdata(); showtablerow('', 'class="rowform"', mradio('importrewrite', array(0 => lang('jswizard_import_default'), 1 => lang('jswizard_import_norewrite'), 2 => lang('jswizard_import_rewrite')), 0, FALSE)); showsubmit('importsubmit'); showtablefooter(); showformfooter(); } else { $importarray = getimportdata(0); $keys = implode("','", array_keys($importarray)); if ($importrewrite != 2) { $query = $db->query("SELECT variable FROM {$tablepre}request WHERE variable IN ('{$keys}')"); $existkeyarray = array(); while ($existkey = $db->fetch_array($query)) { if ($importrewrite == 1) { unset($importarray[$existkey['variable']]); } else { $existkeyarray[] = $existkey['variable']; }