[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /***************************************************************************\ 3 * eGroupWare - FeLaMiMail * 4 * http://www.linux-at-work.de * 5 * http://www.phpgw.de * 6 * http://www.egroupware.org * 7 * Written by : Lars Kneschke [lkneschke@linux-at-work.de] * 8 * ------------------------------------------------- * 9 * This program is free software; you can redistribute it and/or modify it * 10 * under the terms of the GNU General Public License as published by the * 11 * Free Software Foundation; either version 2 of the License, or (at your * 12 * option) any later version. * 13 \***************************************************************************/ 14 /* $Id: class.uibaseclass.inc.php 18876 2005-07-23 15:52:49Z ralfbecker $ */ 15 16 class uibaseclass 17 { 18 var $public_functions = array( 19 'accounts_popup' => True, 20 'create_html' => True 21 ); 22 23 function accounts_popup($_appName) 24 { 25 $GLOBALS['egw']->accounts->accounts_popup($_appName); 26 } 27 28 function create_html() 29 { 30 if(!isset($GLOBALS['egw_info']['server']['deny_user_grants_access']) || !$GLOBALS['egw_info']['server']['deny_user_grants_access']) 31 { 32 $accounts = $GLOBALS['egw']->acl->get_ids_for_location('run',1,'calendar'); 33 $users = Array(); 34 # $this->build_part_list($users,$accounts,$event['owner']); 35 36 $str = ''; 37 @asort($users); 38 @reset($users); 39 40 switch($GLOBALS['egw_info']['user']['preferences']['common']['account_selection']) 41 { 42 case 'popup': 43 while (is_array($event['participants']) && list($id) = each($event['participants'])) 44 { 45 if($id != intval($event['owner'])) 46 { 47 $str .= '<option value="' . $id.$event['participants'][$id] . '"'.($event['participants'][$id]?' selected':'').'>('.$GLOBALS['egw']->accounts->get_type($id) 48 .') ' . $GLOBALS['egw']->common->grab_owner_name($id) . '</option>' . "\n"; 49 } 50 } 51 $var[] = array 52 ( 53 'field' => '<input type="button" value="' . lang('Participants') . '" onClick="accounts_popup();">' . "\n" 54 . '<input type="hidden" name="accountid" value="' . $accountid . '">', 55 'data' => "\n".' <select name="participants[]" multiple size="7">' . "\n" . $str . '</select>' 56 ); 57 break; 58 default: 59 foreach($users as $id => $user_array) 60 { 61 if($id != intval($event['owner'])) 62 { 63 $str .= ' <option value="' . $id.$event['participants'][$id] . '"'.($event['participants'][$id]?' selected':'').'>('.$user_array['type'].') '.$user_array['name'].'</option>'."\n"; 64 } 65 } 66 $var[] = array 67 ( 68 'field' => lang('Participants'), 69 'data' => "\n".' <select name="participants[]" multiple size="7">'."\n".$str.' </select>' 70 ); 71 break; 72 } 73 } 74 75 } 76 } 77 ?>
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 |