[3526] | 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 | |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | $folderid = (isset($_GET['folderid'])) ? (int) $_GET['folderid'] : 1; |
---|
| 20 | |
---|
[4362] | 21 | //echo "<br>folderid".$folderid; |
---|
| 22 | //$folder = getFolder($folderid); |
---|
| 23 | if(!$folder = getFolder($folderid)) { |
---|
| 24 | $GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); |
---|
| 25 | |
---|
| 26 | } |
---|
[3526] | 27 | |
---|
| 28 | if ($folder->getAccessMode($user) < M_READWRITE) |
---|
[4362] | 29 | $GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); |
---|
[3526] | 30 | |
---|
| 31 | |
---|
| 32 | printHTMLHead( getMLText("folder_title", array("foldername" => $folder->getName()) ) ); |
---|
| 33 | ?> |
---|
| 34 | |
---|
| 35 | <script language="JavaScript"> |
---|
| 36 | function 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 |
---|
| 52 | printTitleBar($folder); |
---|
| 53 | printFolderPageStart($folder); |
---|
| 54 | printPageHeader(lang(getMLText("add_subfolder")) . ": " . $folder->getName()); |
---|
| 55 | |
---|
| 56 | printStartBox(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 | |
---|
| 83 | printEndBox(); |
---|
| 84 | printFolderPageEnd($folder); |
---|
| 85 | printHTMLFoot(); |
---|
| 86 | |
---|
| 87 | ?> |
---|