source: contrib/Dms/out/out.EditFolder.php @ 4362

Revision 4362, 2.5 KB checked in by afernandes, 13 years ago (diff)

Ticket #1416 - Disponibilizado módulo de recursos para a comunidade

  • Property svn:executable set to *
Line 
1<?php
2include("../inc/inc.Settings.php");
3include("../inc/inc.AccessUtils.php");
4include("../inc/inc.ClassAccess.php");
5include("../inc/inc.ClassDocument.php");
6include("../inc/inc.ClassFolder.php");
7include("../inc/inc.ClassGroup.php");
8include("../inc/inc.ClassUser.php");
9include("../inc/inc.DBAccess.php");
10include("../inc/inc.FileUtils.php");
11include("../inc/inc.Language.php");
12include("../inc/inc.OutUtils.php");
13
14include("../inc/inc.Authentication.php");
15
16$folderid = (isset($_GET['folderid'])) ? (int) $_GET['folderid'] : 1;
17//$folder = getFolder($folderid);
18
19
20if(!$folder = getFolder($folderid)) {
21$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!');
22               
23}
24
25if ($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
34printHTMLHead( getMLText("folder_title", array("foldername" => $folder->getName()) ) );
35?>
36
37<script language="JavaScript">
38function 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
54printTitleBar($folder);
55printFolderPageStart($folder);
56printPageHeader(getMLText("edit_folder_props") . ": " . $folder->getName());
57
58printStartBox(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
91printEndBox();
92printFolderPageEnd($folder);
93printHTMLFoot();
94
95?>
Note: See TracBrowser for help on using the repository browser.