2 require("../../../../config.php");
4 $id = optional_param('id', SITEID
, PARAM_INT
);
6 require_course_login($id);
7 @header
('Content-Type: text/html; charset=utf-8');
9 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
10 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
13 <title
><?php
print_string("insertlink","editor");?
></title
>
14 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8" />
15 <script type
="text/javascript">
23 function checkvalue(elm
,formname
) {
24 var el
= document
.getElementById(elm
);
26 alert("Nothing to do!");
32 function submit_form(dothis
) {
33 if(dothis
== "delete") {
34 window
.fbrowser
.document
.dirform
.action
.value
= "delete";
36 if(dothis
== "move") {
37 window
.fbrowser
.document
.dirform
.action
.value
= "move";
40 window
.fbrowser
.document
.dirform
.action
.value
= "zip";
43 window
.fbrowser
.document
.dirform
.submit();
48 <style type
="text/css">
49 html
, body
{ background
-color
: rgb(212,208,200); }
51 background
-color
: #ddddff;
53 border
-bottom
: 1px solid black
;
54 font
-family
: Tahoma
, sans
-serif
;
59 input
,select
{ font
-family
: Tahoma
, sans
-serif
; font
-size
: 11px
; }
60 legend
{ font
-family
: Tahoma
, sans
-serif
; font
-size
: 11px
; }
61 p
{ margin
-left
: 10px
;
62 background
-color
: transparent
; font
-family
: Tahoma
, sans
-serif
;
63 font
-size
: 11px
; color
: black
; }
64 td
{ font
-family
: Tahoma
, sans
-serif
; font
-size
: 11px
; }
65 button
{ width
: 70px
; font
-family
: Tahoma
, sans
-serif
; font
-size
: 11px
; }
66 #imodified,#itype,#isize {
67 background
-color
: rgb(212,208,200);
69 font
-family
: Tahoma
, sans
-serif
;
73 .space
{ padding
: 2px
; }
74 form
{ margin
-bottom
: 1px
; margin
-top
: 1px
; }
78 <div
class="title"><?php
print_string("insertlink","editor");?
></div
>
79 <table width
="450" border
="0" cellspacing
="0" cellpadding
="2">
81 <td width
="450" valign
="top"><fieldset
>
83 if(has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE
, $id))) {
84 print_string("filebrowser","editor");
89 <div
class="space"></div
>
90 <?php
print(has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE
, $id)))?
91 "<iframe id=\"fbrowser\" name=\"fbrowser\" src=\"../coursefiles.php?id=".$id."\" width=\"420\" height=\"180\"></iframe>":
95 <div
class="space"></div
>
96 </fieldset
> 
;</td
>
99 <table width
="100%" border
="0" cellpadding
="0" cellspacing
="0">
102 <table border
="0" cellpadding
="2" cellspacing
="0">
103 <tr
><td
><?php
print_string("selection","editor");?
>: </td
>
104 <td
><form id
="idelete">
105 <input name
="btnDelete" type
="submit" id
="btnDelete" value
="<?php print_string("delete
","editor
");?>" onclick
="return submit_form('delete');" /></form
></td
>
106 <td
><form id
="imove">
107 <input name
="btnMove" type
="submit" id
="btnMove" value
="<?php print_string("move
","editor
");?>" onclick
="return submit_form('move');" /></form
></td
>
109 <input name
="btnZip" type
="submit" id
="btnZip" value
="<?php print_string("zip
","editor
");?>" onclick
="return submit_form('zip');" /></form
></td
>
110 <td
><form id
="irename" method
="post" action
="../coursefiles.php" target
="fbrowser">
111 <input type
="hidden" name
="id" value
="<?php print($id);?>" />
112 <input type
="hidden" name
="wdir" value
="" />
113 <input type
="hidden" name
="file" value
="" />
114 <input type
="hidden" name
="action" value
="rename" />
115 <input type
="hidden" name
="sesskey" value
="<?php p($USER->sesskey) ?>" />
116 <input name
="btnRename" type
="submit" id
="btnRename" value
="<?php print_string("rename
","editor
");?>" /></form
></td
>
121 <button type
="button" name
="close" onclick
="return onCancel();"><?php
print_string("close","editor");?
></button
>
125 <table border
="0" cellpadding
="1" cellspacing
="1">
127 <td height
="22"><?php
128 if(has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE
, $id))) { ?
>
129 <form id
="cfolder" action
="../coursefiles.php" method
="post" target
="fbrowser">
130 <input type
="hidden" name
="id" value
="<?php print($id);?>" />
131 <input type
="hidden" name
="wdir" value
="" />
132 <input type
="hidden" name
="action" value
="mkdir" />
133 <input type
="hidden" name
="sesskey" value
="<?php p($USER->sesskey) ?>" />
134 <input name
="name" type
="text" id
="foldername" size
="35" />
135 <input name
="btnCfolder" type
="submit" id
="btnCfolder" value
="<?php print_string("createfolder
","editor
");?>" onclick
="return checkvalue('foldername','cfolder');" />
137 <form action
="../coursefiles.php?id=<?php print($id);?>" method
="post" enctype
="multipart/form-data" target
="fbrowser" id
="uploader">
138 <input type
="hidden" name
="MAX_FILE_SIZE" value
="<?php print($upload_max_filesize);?>" />
139 <input type
="hidden" name
="id" VALUE
="<?php print($id);?>" />
140 <input type
="hidden" name
="wdir" value
="" />
141 <input type
="hidden" name
="action" value
="upload" />
142 <input type
="hidden" name
="sesskey" value
="<?php p($USER->sesskey) ?>" />
143 <input type
="file" name
="userfile" id
="userfile" size
="35" />
144 <input name
="save" type
="submit" id
="save" onclick
="return checkvalue('userfile','uploader');" value
="<?php print_string("upload
","editor
");?>" />