<?php
require_once XCONVERT_ROOT.'./data/'.$xc->config['info']['childtype'].'/'.$xc->config['info']['child'].'/config.php';
if(file_exists(XCONVERT_ROOT.'./data/'.$xc->config['info']['childtype'].'/'.$xc->config['info']['child'].'/function.php')) {
	require_once XCONVERT_ROOT.'./data/'.$xc->config['info']['childtype'].'/'.$xc->config['info']['child'].'/function.php';
}

$lockdir = dir(XCONVERT_ROOT.'./cache/lock/');
while($entry = $lockdir->read()) {
	if(is_file(XCONVERT_ROOT.'./cache/lock/'.$entry) && substr($entry, 0, 9) == 'progress_') {
		unlink(XCONVERT_ROOT.'./cache/lock/'.$entry);
	}
}
$lockdir->close();

$steps = count($operations);

if(!isset($step) && !isset($is_standard)) {
	$validdata = implode('£¬', $operations);
	is_array($invaliddata) && $invaliddata = implode('</li><li>', $invaliddata);
	$statements =  $xc->language['statements1'].$source_ver.$xc->language['statements2'].$source_ver.$xc->language['statements3'].$discuz_ver.$xc->language['statements4'].$discuz_ver.$xc->language['statements5'];
	$validdata_message = $xc->language['validdata_header'].$validdata.$xc->language['validdata_footer'];
	if ($invaliddata) {
		$invaliddata_message = $xc->language['invaliddata_header'].$invaliddata.$xc->language['invaliddata_footer'];
	}
	$attention_message = $xc->language['beforeconvert'];
		
	include_once template('stepselect');
} else {
	$allowmulti = 0;
	$multinum = count($multidos);
	if($is_standard == 2 && $multinum > 0) {
		$allowmulti = 1;
	}
	
	include_once template('convert');
}
?>