| [ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /** 3 * eGroupWare - resources 4 * http://www.egroupware.org 5 * 6 * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License 7 * @package resources 8 * @author Cornelius Weiss <egw@von-und-zu-weiss.de> 9 * @version $Id: default_records.inc.php 19821 2005-11-14 18:16:56Z nelius_weiss $ 10 */ 11 12 $resources_table_prefix = 'egw_resources'; 13 14 // Add a general category for resources 15 $GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->cats_table,array('cat_parent' => 0, 'cat_owner' => -1,'cat_access' => 'public','cat_appname' => 'resources','cat_name' => 'General resources','cat_description' => 'This category has been added by setup','last_mod' => time()),false,__LINE__,__FILE__); 16 $cat_id = $GLOBALS['egw_setup']->db->get_last_insert_id($GLOBALS['egw_setup']->cats_table,'cat_id'); 17 18 // Give default group all rights to this general cat 19 $defaultgroup = $GLOBALS['egw_setup']->add_account('Default','Default','Group',False,False); 20 $GLOBALS['egw_setup']->add_acl('resources','run',$defaultgroup); 21 $GLOBALS['egw_setup']->add_acl('resources',"L$cat_id",$defaultgroup,399); 22 23 // Add two rooms to give user an idea of what resources is... 24 $oProc->query("INSERT INTO {$resources_table_prefix} (name,cat_id,bookable,picture_src,accessory_of) VALUES ( 'Meeting room 1',$cat_id,1,'cat_src',-1)"); 25 $oProc->query("INSERT INTO {$resources_table_prefix} (name,cat_id,bookable,picture_src,accessory_of) VALUES ( 'Meeting room 2',$cat_id,1,'cat_src',-1)"); 26 $res_id = $oProc->m_odb->get_last_insert_id($resources_table_prefix,'res_id'); 27 $oProc->query("INSERT INTO {$resources_table_prefix} (name,cat_id,bookable,picture_src,accessory_of) VALUES ( 'Fixed Beamer',$cat_id,0,'cat_src',$res_id)"); 28 29
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 |