source: contrib/Dms/out/out.AddDocument.php @ 3526

Revision 3526, 3.1 KB checked in by afernandes, 13 years ago (diff)

Ticket #1416 - Disponibilizado modulos Timesheet e DMS 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
19if ($folder->getAccessMode($user) < M_READWRITE)
20        die("access denied");
21
22printHTMLHead( getMLText("folder_title", array("foldername" => $folder->getName()) ) );
23?>
24
25<script language="JavaScript">
26function checkForm()
27{
28        msg = "";
29        if (document.form1.userfile.value == "") msg += "<?php printMLText("js_no_file");?>\n";
30        //if (document.form1.fname.value == "") msg += "<?php printMLText("js_no_name");?>\n";
31        //if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
32        //if (document.form1.keywords.value == "") msg += "<?php printMLText("js_no_keywords");?>\n";
33        if (msg != "")
34        {
35                alert(msg);
36                return false;
37        }
38        else
39                return true;
40}
41</script>
42
43<?php
44printTitleBar($folder);
45printFolderPageStart($folder);
46printPageHeader(getMLText("add_document") . ": " . $folder->getName());
47
48printStartBox(getMLText("add_document"));
49?>
50
51<form action="../op/op.AddDocument.php" enctype="multipart/form-data" method="post" name="form1" onsubmit="return checkForm();">
52        <input type="Hidden" name="folderid" value="<?php print $folderid; ?>">
53        <table>
54                <tr>
55                        <td class="inputDescription"><?php printMLText("local_file");?>:</td>
56                        <td><input type="File" name="userfile"></td>
57                </tr>
58                <tr>
59                        <td class="inputDescription"><?php printMLText("name");?>:</td>
60                        <td><input name="fname"></td>
61                </tr>
62                <tr>
63                        <td valign="top" class="inputDescription"><?php printMLText("comment");?>:</td>
64                        <td><textarea name="comment" rows="4" cols="30"></textarea></td>
65                </tr>
66                <tr>
67                        <td valign="top" class="inputDescription"><?php printMLText("keywords");?>:</td>
68                        <td class="standardText">
69                                <textarea name="keywords" rows="4" cols="30"></textarea><br>
70                                <a href="javascript:chooseKeywords();"><?php printMLText("use_default_keywords");?></a>
71                                <script language="JavaScript">
72                                        var openDlg;
73                                       
74                                        function chooseKeywords() {
75                                                openDlg = open("out.KeywordChooser.php", "openDlg", "width=500,height=400,scrollbars=yes,resizable=yes");
76                                        }
77                                </script>
78                        </td>
79                </tr>
80                <tr>
81                        <td valign="top" class="inputDescription"><?php printMLText("expires");?>:</td>
82                        <td class="standardText">
83                                <input type="Radio" name="expires" value="false" checked><?php printMLText("does_not_expire");?><br>
84                                <input type="radio" name="expires" value="true"><?php printDateChooser(-1, "exp");?>
85                        </td>
86                </tr>
87                <tr>
88                        <td class="inputDescription"><?php printMLText("sequence");?>:</td>
89                        <td><?php printSequenceChooser($folder->getDocuments());?></td>
90                </tr>
91                <tr>
92                        <td colspan="2"><br><input type="Submit"></td>
93                </tr>
94        </table>
95</form>
96
97
98<?php
99
100printEndBox();
101printFolderPageEnd($folder);
102printHTMLFoot();
103
104?>
Note: See TracBrowser for help on using the repository browser.