コード例 #1
0
function HandleM2MOptions ($pagename, $auth='read') {
	global $M2MDataDir, $M2MDir, $M2MUrl;
	$formats = WikiConverterFactory::availableTargetFormats();
	$targetformat = $_REQUEST['targetformat'];

	// read default options
	$options = new StylesheetOptions();
	$options->readXML("$M2MDir/options/$targetformat.xml");
	$datadir = "$M2MDataDir/$pagename";
	if (file_exists("$datadir/{$targetformat}opt.xml"))
		$options->readXML("$datadir/{$targetformat}opt.xml");

	print "<html><head><title>media2mult options</title>";
	print "<link rel='stylesheet' type='text/css' href='$M2MUrl/options/options.css'>";
	print "<body>";
	OptionPage::showForm($options, $formats[$targetformat], "$_SERVER[PHP_SELF]?n=$pagename&action=m2m-saveoptions", 3);
	print "</body></html>";
}