3 * Elgg Presentation tool
6 * @package mod_presentation
10 @require_once
("../../includes.php");
13 define("context","presentation");
15 // Load global variables
16 global $CFG, $PAGE, $USER, $page_owner, $profile_id;
21 $pres = optional_param('id',0,PARAM_INT
);
22 $title = run("profile:display:name", $profile_id) . " :: " . __gettext("Delete Presentation");
24 $presrec = get_record("presentations", "ident", $pres);
25 $page_owner = $presrec->owner
;
26 $profile_id = $page_owner;
28 templates_page_setup();
29 if ($presrec && $presrec->owner
== $USER->ident
) {
31 $body = '<p>' . sprintf(__gettext('Click Delete if you are sure you want to permanently delete the presentation "%s".'), htmlspecialchars($presrec->name
)) . '</p>';
33 $body .= "<form action=\"" . $CFG->wwwroot
. "mod/presentation/index.php\" method=\"post\" >";
35 $body .= "<input type=\"submit\" value=\"" . __gettext("Delete") . "\" />";
36 $body .= "<input type=\"hidden\" name=\"action\" value=\"presentation:delete\" />";
37 $body .= "<input type=\"hidden\" name=\"owner\" value=\"$page_owner\" />";
38 $body .= "<input type=\"hidden\" name=\"delete_presentation_ident\" value=\"$presrec->ident\" />";
44 $body = __gettext('Error: Presentation not found or not owned by you.');
48 // Output to the screen
49 $body = templates_draw(array(
50 'context' => 'contentholder',
56 echo templates_page_draw( array(