ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilWebDAVMountInstructionsGUI.php
Go to the documentation of this file.
1<?php
2
3include_once "Services/WebDAV/classes/class.ilWebDAVMountInstructions.php";
4
15{
16
22 protected $base_url;
23 protected $ref_id;
25
26 public function __construct()
27 {
28 $this->mount_instruction = new ilWebDAVMountInstructions();
29 }
30
31 public function showMountInstructionPage()
32 {
33 global $DIC;
34
35 $instruction_tpl = $this->getInstructionTemplate();
36 $instruction_text = $this->mount_instruction->setInstructionPlaceholders($instruction_tpl);
37 $this->displayInstructionPage($instruction_text);
38
39 exit;
40 }
41
42 protected function displayInstructionPage($instruction_text)
43 {
44 global $DIC;
45
46 header('Content-Type: text/html; charset=UTF-8');
47 echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
48 echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN\"\n";
49 echo " \"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd\">\n";
50 echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
51 echo " <head>\n";
52 echo " <title>" . sprintf($DIC->language()->txt('webfolder_instructions_titletext'), $this->mount_instruction->getWebfolderTitle()) . "</title>\n";
53 echo " </head>\n";
54 echo " <body>\n";
55 echo $instruction_text;
56 echo " </body>\n";
57 echo "</html>\n";
58 }
59
60 protected function getInstructionTemplate()
61 {
62 global $DIC;
63
64 $settings = new ilSetting('file_access');
65 $instruction_tpl = '';
66
67 if ($this->mount_instruction->instructionsTplFileExists()) {
68 $instruction_tpl = $this->mount_instruction->getInstructionsFromTplFile();
69 } elseif ($settings->get('custom_webfolder_instructions_enabled')) {
70 $instruction_tpl = $this->mount_instruction->getCustomInstruction();
71 }
72
73 if (strlen($instruction_tpl) == 0) {
74 $instruction_tpl = $this->mount_instruction->getDefaultInstruction();
75 }
76
77 return utf8_encode($instruction_tpl);
78 }
79}
exit
Definition: backend.php:16
An exception for terminatinating execution or to throw for unit testing.
ILIAS Setting Class.
Class ilWebDAVMountInstructionsGUI.
Class ilWebDAVMountInstructions.
global $DIC
Definition: saml.php:7