* Licensed under the GNU GPL. For full terms see the file COPYING. * * @package plugins * @subpackage useracl */ /** * Functions that output HTML markup, used for the presentation logic of the * plugin */ /** * Print permissions table header row * * @return void */ function useracl_print_table_header() { global $color; print '' . // '' . /* For checkbox */ '' . _("User") . '' . '' . _("None") . '' . '' . _("Read") . '' . '' . _("Append") . '' . '' . _("Delete") . '' . ' '; } /** * Print permissions table Add New User row * * @return void */ function useracl_print_addnew($formname = '') { global $color, $useracl_show_images ; print ''. // ''. // For checkbox ''; useracl_print_ldapsearchbutton(urlencode($formname)); print ''. ''; useracl_print_addnew_perms(); print ''; if($useracl_show_images) { print ''; } else { print ''; } print "\n"; } /** * Print permissions table New User permissions radio button columns * * @return void */ function useracl_print_addnew_perms() { print ''. ''. ''; } /** * Print permissions table row for existing user * * @param array $perm_array Array that describes this mailbox's ACLs * @param string $mbox Mailbox Name * * @return void */ function useracl_print_array($perm_array, $mbox){ global $color, $names, $mails, $useracl_show_images; $tabs[0] = "none"; $tabs[1] = "read"; $tabs[2] = "append"; $tabs[3] = "delete"; /* $tabs[0] = "read"; $tabs[1] = "append"; $tabs[2] = "delete"; */ $i=0; $toggle = false; foreach($perm_array as $user=>$perm){ echo "'; if(!$toggle) { $toggle = true; } elseif($toggle) { $toggle = false; } /* No checkbox. Instead we have the "none" radio button. */ /* echo '' . // ''. ''; */ echo ''; if(isset($mails[$user])) { $comp_uri = 'src/compose.php?mailbox='.$mbox.'&send_to='.urlencode($mails[$user]); } if(isset($names[$user])) { $disp = $names[$user] . ' ('.$user.')'; } else { $disp = $user; } if(isset($comp_uri) && isset($disp)) { echo makeComposeLink($comp_uri, $disp); } else { echo $disp; } echo ''; for($k=0;$k'. echo ''; if($perm == $tabs[$k]) { echo ''; } echo ''; } echo ''; if($useracl_show_images) { echo ''; } else { echo ''; } echo "\n"; echo ''; echo ''; $i++; } } /** * Print permissions table footer row * * @return void */ function useracl_print_table_footer() { global $useracl_enable_notify, $useracl_show_images; echo ' '; // ' Check All - Clear All ' . if($useracl_enable_notify) { echo ''; if($useracl_show_images) { echo '' . _('; } else { // ''; } } echo ''. '' . // FIXME // ''. ' '. ''; } /** * Print New User Row for separate table, with mailbox select * * @param string $mybox Optional parameter for preselected mailbox field * @param string $myuser Optional parameter for prefilled user field * @return void */ function useracl_print_addnew_separate($mybox = '', $myuser = '') { global $color, $boxes, $useracl_show_images ; print ''. ''. ''; useracl_print_ldapsearchbutton('form_addnew'); print ''; useracl_print_addnew_perms(); print ''; print ''; } function useracl_print_ldapsearchbutton($formname = 'form_addnew') { global $plugins, $useracl_show_images; if(in_array('directory', $plugins)) { echo ""; /* Non-javascript browsers not supported at the moment. */ /* echo "\n"; } else { echo ' ' . "\n"; } */ } } /** * HTML Output functions follow. */ function useracl_html_printheader($title) { global $color; print '
'. $title . ''; print '
'; } function useracl_html_print_all_sections_start() { echo ''; } function useracl_html_print_section_start($title) { global $color, $error; print ""; if(isset($error)) { print ''; } print "\n"; echo "\n"; } function useracl_html_print_all_sections_end() { echo "
". $title . "

'. $error . '

"; } function useracl_html_print_section_end() { global $color; echo "
 
"; } function useracl_html_printfooter() { print '
'; print '
'; } ?>