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

Revision 4362, 2.2 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
17
18
19$folderid = (isset($_GET['folderid'])) ? (int) $_GET['folderid'] : 1;
20
21//echo "<br>folderid".$folderid;
22//$folder = getFolder($folderid);
23if(!$folder = getFolder($folderid)) {
24$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!');
25               
26}
27
28if ($folder->getAccessMode($user) < M_READWRITE)
29$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!');
30
31
32printHTMLHead( getMLText("folder_title", array("foldername" => $folder->getName()) ) );
33?>
34
35<script language="JavaScript">
36function checkForm()
37{
38        msg = "";
39        if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
40        if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
41        if (msg != "")
42        {
43                alert(msg);
44                return false;
45        }
46        else
47                return true;
48}
49</script>
50
51<?php
52printTitleBar($folder);
53printFolderPageStart($folder);
54printPageHeader(lang(getMLText("add_subfolder")) . ": " . $folder->getName());
55
56printStartBox(lang(getMLText("add_subfolder")));
57?>
58
59<form action="../op/op.AddSubFolder.php" name="form1" onsubmit="return checkForm();">
60        <input type="Hidden" name="folderid" value="<?php print $folderid;?>">
61        <table border="0" width="100%">
62                <tr>
63                        <td class="inputDescription" width="150px"><?php echo lang("name");?>:</td>
64                        <td><input name="fname" style="width: 100%;"></td>
65                </tr>
66                <tr>
67                        <td valign="top" class="inputDescription"><?php echo lang("comment");?>:</td>
68                        <td><textarea name="comment" rows="4" style="width: 100%;"></textarea></td>
69                </tr>
70                <tr>
71                        <td class="inputDescription"><?php echo lang("sequence");?>:</td>
72                        <td><?php printSequenceChooser($folder->getSubFolders());?></td>
73                </tr>
74                <tr>
75                        <td colspan="2"><br><input type="Submit"></td>
76                </tr>
77        </table>
78</form>
79
80
81<?php
82
83printEndBox();
84printFolderPageEnd($folder);
85printHTMLFoot();
86
87?>
Note: See TracBrowser for help on using the repository browser.