<?php
/*
pre_common_friendlink
*/
if($start <= 1) {
	truncatetable('common_friendlink');
}

$query = $xc->db['source']->query("SELECT * FROM {$source_tablepre}bbslink ORDER BY id");

while($dvl = $xc->db['source']->fetch_assoc($query)) {
	$dvl	= array_change_key_case($dvl);
	//$id = 0;
	$displayorder = 0;
	$name = cutstr(@strip_tags(trim($dvl['boardname'])), 100);
	$url = cutstr(@strip_tags(trim($dvl['url'])), 100);
	$description = cutstr(@strip_tags(trim($dvl['readme'])), 200);
	$logo = cutstr(@strip_tags(trim($dvl['logo'])), 100);
	$type = 2;

	$field1	= array('displayorder','name','url','description','logo','type');
	$query1	= getinsertsql("{$discuz_tablepre}common_friendlink", $field1);

	if ($xc->db['discuz']->query($query1)) {
		$convertedrows ++;
	} else {
		reportlog("转换联盟论坛出错 url = $url");
	}
	$totalrows ++;
}
?>