function add_default_data()
{
	global $vbulletin;
	require_once(DIR . "/install/cmsdefaultdata/default_data_queries.php");
	foreach($cms_data_queries AS $query)
	{
		$vbulletin->db->query_write($query);
	}

	//we need to truncate the grids table in order to make all of the ids line up
	require_once(DIR . "/includes/adminfunctions_cms.php");
	$vbulletin->db->query_write("TRUNCATE TABLE " . TABLE_PREFIX . "cms_grid");
	xml_import_grid(file_get_contents(DIR . "/install/vbulletin-grid.xml"), true);
}
示例#2
0
	{
		$xml = file_read($vbulletin->GPC['gridfile']['tmp_name']);
	}
	// no uploaded file - got a local file?
	else if (file_exists($vbulletin->GPC['serverfile']))
	{
		$xml = file_read($vbulletin->GPC['serverfile']);
	}
	// no uploaded file and no local file - ERROR
	else
	{
		print_stop_message('no_file_uploaded_and_no_local_file_found');
	}

	xml_import_grid($xml,
		$vbulletin->GPC['allowoverwrite']
	);

	print_cp_redirect("cms_admin.php?" . $vbulletin->session->vars['sessionurl'] . "do=grid");
}

if ($_REQUEST['do'] == 'grid_files')
{
	// download / upload grids  (xml, like styles)
	?>
	<script type="text/javascript">
	<!--
	function js_confirm_upload(tform, filefield)
	{
		if (filefield.value == "")
		{