1 | <?php |
---|
2 | include("../inc/inc.Settings.php"); |
---|
3 | include("../inc/inc.AccessUtils.php"); |
---|
4 | include("../inc/inc.ClassAccess.php"); |
---|
5 | include("../inc/inc.ClassDocument.php"); |
---|
6 | include("../inc/inc.ClassFolder.php"); |
---|
7 | include("../inc/inc.ClassGroup.php"); |
---|
8 | include("../inc/inc.ClassUser.php"); |
---|
9 | include("../inc/inc.DBAccess.php"); |
---|
10 | include("../inc/inc.FileUtils.php"); |
---|
11 | include("../inc/inc.Language.php"); |
---|
12 | include("../inc/inc.OutUtils.php"); |
---|
13 | |
---|
14 | include("../inc/inc.Authentication.php"); |
---|
15 | |
---|
16 | $folderid = (isset($_GET['folderid'])) ? (int) $_GET['folderid'] : 1; |
---|
17 | //$folder = getFolder($folderid); |
---|
18 | |
---|
19 | |
---|
20 | if(!$folder = getFolder($folderid)) { |
---|
21 | $GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); |
---|
22 | |
---|
23 | } |
---|
24 | |
---|
25 | if ($folder->getAccessMode($user) < M_READWRITE) |
---|
26 | $GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); |
---|
27 | |
---|
28 | $parent = ($folder->getID() == $settings->_rootFolderID) ? false : $folder->getParent(); |
---|
29 | |
---|
30 | //if ($folder->getAccessMode($user) < M_READWRITE) |
---|
31 | //die ("Access denied"); |
---|
32 | |
---|
33 | |
---|
34 | printHTMLHead( getMLText("folder_title", array("foldername" => $folder->getName()) ) ); |
---|
35 | ?> |
---|
36 | |
---|
37 | <script language="JavaScript"> |
---|
38 | function checkForm() |
---|
39 | { |
---|
40 | msg = ""; |
---|
41 | if (document.form1.fname.value == "") msg += "<?php printMLText("js_no_name");?>\n"; |
---|
42 | if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n"; |
---|
43 | if (msg != "") |
---|
44 | { |
---|
45 | alert(msg); |
---|
46 | return false; |
---|
47 | } |
---|
48 | else |
---|
49 | return true; |
---|
50 | } |
---|
51 | </script> |
---|
52 | |
---|
53 | <?php |
---|
54 | printTitleBar($folder); |
---|
55 | printFolderPageStart($folder); |
---|
56 | printPageHeader(getMLText("edit_folder_props") . ": " . $folder->getName()); |
---|
57 | |
---|
58 | printStartBox(getMLText("edit_folder_props")); |
---|
59 | ?> |
---|
60 | |
---|
61 | <form action="../op/op.EditFolder.php" name="form1" onsubmit="return checkForm();"> |
---|
62 | <input type="Hidden" name="folderid" value="<?php print $folderid;?>"> |
---|
63 | <table> |
---|
64 | <tr> |
---|
65 | <td class="inputDescription"><?php printMLText("name");?>:</td> |
---|
66 | <td><input name="fname" value="<?php print $folder->getName();?>"></td> |
---|
67 | </tr> |
---|
68 | <tr> |
---|
69 | <td valign="top" class="inputDescription"><?php printMLText("comment");?>:</td> |
---|
70 | <td><textarea name="comment" rows="4" cols="30"><?php print $folder->getComment();?></textarea></td> |
---|
71 | </tr> |
---|
72 | <?php |
---|
73 | if ($parent && $parent->getAccessMode($user) > M_READ) |
---|
74 | { |
---|
75 | print "<tr>"; |
---|
76 | print "<td class=\"inputDescription\">" . getMLText("sequence") . ":</td>"; |
---|
77 | print "<td>"; |
---|
78 | printSequenceChooser($parent->getSubFolders(), $folder->getID()); |
---|
79 | print "</td></tr>"; |
---|
80 | } |
---|
81 | ?> |
---|
82 | <tr> |
---|
83 | <td colspan="2"><br><input type="Submit"></td> |
---|
84 | </tr> |
---|
85 | </table> |
---|
86 | </form> |
---|
87 | |
---|
88 | |
---|
89 | <?php |
---|
90 | |
---|
91 | printEndBox(); |
---|
92 | printFolderPageEnd($folder); |
---|
93 | printHTMLFoot(); |
---|
94 | |
---|
95 | ?> |
---|