<?php
/*
论坛公告
pre_forum_announcement
*/


truncatetable('forum_announcement');


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

	$id		= $a['id'];
	$author		= $a['poster'];
	$subject	= $a['title'];
	$type		= 0;
	$displayorder	= 0;
	$starttime	= timetounix($a['starttime']);
	$endtime	= timetounix($a['endtime']);
	$message	= $a['message'];
	$groups		= '';


	$field1		=	array('id','author','subject','type','displayorder','starttime', 'endtime', 'message', 'groups');
	$query1		=	getinsertsql("{$discuz_tablepre}forum_announcement", $field1);

	$xc->db['discuz']->query($query1);

	$convertedrows ++;
	$totalrows ++;
}
?>