<?php require_once("includes/requireadminlogin.inc.php"); $mb_id=current_mb_id(); $pluginname=TGET('name'); if (strpbrk($pluginname,"\\/@:&|")) { header("HTTP/1.0 404 Not Found."); echo "Not Found"; die; } $pluginmeta=load_plugin_meta($pluginname); if (!$pluginmeta || !$pluginmeta->configpage || strpbrk($pluginmeta->configpage,"\\/@:&|")) { header("HTTP/1.0 404 Not Found."); echo "Not Found"; die; } $configscript=$Config->PluginBasePath.'/'.$pluginname.'/'.$pluginmeta->configpage; if (!is_readable($configscript)) { header("HTTP/1.0 404 Not Found."); echo "Not Found"; die; } define('PLUGIN_SETTING',1); $pluginEnv=compute_plugin_env($mb_id,$pluginname,$configscript); @mkdir($pluginEnv->datapath,750,true); function call_config_script_for_setting($pluginEnv) { ob_start(); include $pluginEnv->self; return ob_get_clean(); } $dataset['plugin.displayname']=$pluginmeta->name; $dataset['plugin.config.html']=call_config_script_for_setting($pluginEnv); ?>