[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 include ("../inc/inc.Settings.php"); 3 include ("../inc/inc.AccessUtils.php"); 4 include ("../inc/inc.ClassAccess.php"); 5 include ("../inc/inc.ClassFolder.php"); 6 include ("../inc/inc.ClassDocument.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 $document = getDocument($documentid); 17 $notifyList = $document->getNotifyList(); 18 19 if ($document->getAccessMode($user) < M_READWRITE) 20 die("access denied"); 21 22 23 printHTMLHead( getMLText("document_title", array("documentname" => $document->getName()) ) ); 24 ?> 25 26 <script language="JavaScript"> 27 function checkForm() 28 { 29 msg = ""; 30 if ((document.form1.userid.options[document.form1.userid.selectedIndex].value == -1) && 31 (document.form1.groupid.options[document.form1.groupid.selectedIndex].value == -1)) 32 msg += "<?php printMLText("js_select_user_or_group");?>\n"; 33 if (msg != "") 34 { 35 alert(msg); 36 return false; 37 } 38 else 39 return true; 40 } 41 </script> 42 43 <?php 44 printTitleBar($document->getFolder()); 45 printDocumentPageStart($document); 46 printPageHeader(getMLText("edit_document_notify") . ": " . $document->getName()); 47 48 printStartBox(getMLText("edit_existing_notify")); 49 ?> 50 51 <table border="0" cellpadding="5" cellspacing="0"> 52 <?php 53 if ((count($notifyList["users"]) == 0) && (count($notifyList["groups"]) == 0)) 54 { 55 print "<tr><td class=\"notifylist\">".getMLText("empty_notify_list")."</td></tr>"; 56 } 57 else 58 { 59 print "<tr>\n"; 60 print " <td style=\"border-bottom: 1pt solid #000080;\"> </td>\n"; 61 print " <td style=\"border-bottom: 1pt solid #000080;\" class=\"notifylist\"><i>".getMLText("name")."</i></td>\n"; 62 print " <td style=\"border-bottom: 1pt solid #000080;\"> </td>\n"; 63 print "</tr>\n"; 64 foreach ($notifyList["users"] as $userNotify) 65 { 66 print "<tr>"; 67 print "<td><img src=\"images/usericon.gif\" width=16 height=16></td>"; 68 print "<td class=\"notifylist\">" . $userNotify->getFullName() . "</td>"; 69 print "<td><a href=\"../op/op.DocumentNotify.php?documentid=". $documentid . "&action=delnotify&userid=".$userNotify->getID()."\"><img src=\"images/del.gif\" width=15 height=15 border=0></a>"; 70 print "</tr>"; 71 } 72 73 foreach ($notifyList["groups"] as $groupNotify) 74 { 75 print "<tr>"; 76 print "<td><img src=\"images/groupicon.gif\" width=16 height=16 border=0></td>"; 77 print "<td class=\"notifylist\">" . $groupNotify->getName() . "</td>"; 78 print "<td><a href=\"../op/op.DocumentNotify.php?documentid=". $documentid . "&action=delnotify&groupid=".$groupNotify->getID()."\"><img src=\"images/del.gif\" width=15 height=15 border=0></a>"; 79 print "</tr>"; 80 } 81 } 82 ?> 83 </table> 84 85 <?php 86 printNextBox(getMLText("add_new_notify")); 87 ?> 88 89 90 <form action="../op/op.DocumentNotify.php" name="form1" onsubmit="return checkForm();"> 91 <input type="Hidden" name="documentid" value="<?php print $documentid?>"> 92 <input type="Hidden" name="action" value="addnotify"> 93 <table> 94 <tr> 95 <td class="inputDescription"><?php printMLText("user");?>:</td> 96 <td> 97 <select name="userid"> 98 <option value="-1"><?php printMLText("select_one");?> 99 <option value="-1">------------------------------- 100 <?php 101 $allUsers = getAllUsers(); 102 foreach ($allUsers as $userObj) 103 { 104 if ($userObj->getID() == $settings->_guestID) 105 continue; 106 print "<option value=\"".$userObj->getID()."\">" . $userObj->getFullName() . "\n"; 107 } 108 ?> 109 </select> 110 </td> 111 </tr> 112 <tr> 113 <td class="inputDescription"><?php printMLText("group");?>:</td> 114 <td> 115 <select name="groupid"> 116 <option value="-1"><?php printMLText("select_one");?> 117 <option value="-1">------------------------------- 118 <?php 119 $allGroups = getAllGroups(); 120 foreach ($allGroups as $groupObj) 121 print "<option value=\"".$groupObj->getID()."\">" . $groupObj->getName() . "\n"; 122 ?> 123 </select> 124 </td> 125 </tr> 126 <tr> 127 <td colspan="2"><br><input type="Submit"></td> 128 </tr> 129 </table> 130 </form> 131 132 <?php 133 printEndBox(); 134 printDocumentPageEnd($document); 135 printHTMLFoot(); 136 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |