<?php
//15、转换词语过滤

truncatetable('common_word');

$query = $xc->db['source']->query("SELECT * FROM {$source_tablepre}words") or die("检索数据表 '{$source_tablepre}words' 错误！请将表 '{$source_tablepre}words' 字段类型为 nText 的改为 Text 类型。");

while ($w = $xc->db['source']->fetch_assoc($query)) {
	
	$w = daddslashes(array_change_key_case($w));

	$id			= $w['id'];
	$admin		= $w['admin'];
	$find		= $w['find'];
	$replacement = $w['replacement'];
	$extra		 = '';

	$fields1 = array('id', 'admin', 'find', 'replacement', 'extra');
	$query1 = getinsertsql("{$discuz_tablepre}common_word", $fields1);
	if ($xc->db['discuz']->query($query1)) {
		$convertedrows ++;
	} else {
		reportlog("插入 DZ 词语过滤数据出错 id = $id find = $find");
	}
	$totalrows ++;
}

?>