Files
moodle/lib/editor/htmlarea/popups/preview.php
T
skodak 1e94fe068c Editor related fixes:
MDL-7545 HTML Editor does not send http headers for character encoding;
MDL-8323 added proper require_course_login()
+ fixed javascript in coursefiles broken by XHTML strict
+ general cleanup and fixing in coursefiles (themes, javascript, obsoleted functions, etc.)
2007-01-27 23:23:44 +00:00

32 lines
801 B
PHP

<?php // $Id$ preview for insert image dialog
require("../../../../config.php");
$id = optional_param('id', SITEID, PARAM_INT);
$imageurl = required_param('imageurl', PARAM_RAW);
require_login($id);
require_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $id));
@header('Content-Type: text/html; charset=utf-8');
$imagetag = clean_text('<img src="'.htmlSpecialChars(stripslashes_safe($imageurl)).'" alt="" />');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php echo get_string('preview') ?></title>
<style type="text/css">
body { margin: 2px; }
</style>
</head>
<body bgcolor="#ffffff">
<?php echo $imagetag ?>
</body>
</html>