<?php

	// security note:
	// this file won't run outside of the editor index page (the initialize() function will be undefined),
	// and the index page won't run unless we are logged in; this means users without a login won't be able to access this file for malicious purposes
	// we'll check for the presence of our variables now just in case (testing for a constant is harder because we'd have to append the namespace prefix)
	if (!isset($editor_index)) { exit; }

	// get the command requested from JavaScript, run it, and return the result
	$command = initialize("command", "get", "text");
	$command = stripslashes($command); // the decoding of the JavaScript escape command happens automatically, but we need to manually remove the slashes that are added to the GET variables
	eval(eval_namespace("\$result = $command;"));
	print $result;

?>
