phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] sms inc/class.bocommon.inc.php inc/class.boconf...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] sms inc/class.bocommon.inc.php inc/class.boconf...
Date: Tue, 23 May 2006 13:02:12 +0000

CVSROOT:        /sources/phpgroupware
Module name:    sms
Branch:         
Changes by:     Sigurd Nes <address@hidden>     06/05/23 13:02:12

Modified files:
        inc            : class.bocommon.inc.php class.boconfig.inc.php 
                         class.menu.inc.php class.soconfig.inc.php 
                         class.uiconfig.inc.php class.uisms.inc.php 
        templates/base : config.xsl no_access.xsl sms.xsl 
Added files:
        inc            : class.socommon.inc.php 

Log message:
        

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/inc/class.bocommon.inc.php.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/inc/class.boconfig.inc.php.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/inc/class.menu.inc.php.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/inc/class.socommon.inc.php?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/inc/class.soconfig.inc.php.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/inc/class.uiconfig.inc.php.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/inc/class.uisms.inc.php.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/templates/base/config.xsl.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/templates/base/no_access.xsl.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/templates/base/sms.xsl.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: sms/inc/class.bocommon.inc.php
diff -u sms/inc/class.bocommon.inc.php:1.2 sms/inc/class.bocommon.inc.php:1.3
--- sms/inc/class.bocommon.inc.php:1.2  Tue May 16 19:45:49 2006
+++ sms/inc/class.bocommon.inc.php      Tue May 23 13:02:12 2006
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package hrm
        * @subpackage core
-       * @version $Id: class.bocommon.inc.php,v 1.2 2006/05/16 19:45:49 
sigurdne Exp $
+       * @version $Id: class.bocommon.inc.php,v 1.3 2006/05/23 13:02:12 
sigurdne Exp $
        */
 
        /**
@@ -55,11 +55,11 @@
                function bocommon()
                {
                        $this->currentapp               = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
-       //              $this->socommon                 = 
CreateObject($this->currentapp.'.socommon');
-                       $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
+                       $this->socommon                 = 
CreateObject($this->currentapp.'.socommon');
+                       $this->account                  = 
$GLOBALS['phpgw_info']['user']['account_id'];
 
                        $this->join                     = $this->socommon->join;
-                       $this->left_join        = $this->socommon->left_join;
+                       $this->left_join                = 
$this->socommon->left_join;
                        $this->like                     = $this->socommon->like;
 
                        switch($GLOBALS['phpgw_info']['server']['db_type'])
@@ -475,6 +475,6 @@
                }
 
                function new_db()
-               {
                        return $this->socommon->new_db();
+               {
                        return clone($GLOBALS['phpgw']->db);
                }
        }
Index: sms/inc/class.boconfig.inc.php
diff -u sms/inc/class.boconfig.inc.php:1.1 sms/inc/class.boconfig.inc.php:1.2
--- sms/inc/class.boconfig.inc.php:1.1  Mon May 22 08:50:44 2006
+++ sms/inc/class.boconfig.inc.php      Tue May 23 13:02:12 2006
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package sms
        * @subpackage config
-       * @version $Id: class.boconfig.inc.php,v 1.1 2006/05/22 08:50:44 
sigurdne Exp $
+       * @version $Id: class.boconfig.inc.php,v 1.2 2006/05/23 13:02:12 
sigurdne Exp $
        */
 
        /**
@@ -130,36 +130,76 @@
                }
 
 
-               function read()
+               function read_type()
                {
-                       $config_info = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
+                       $config_info = $this->so->read_type(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'allrows'=>$this->allrows));
                        $this->total_records = $this->so->total_records;
                        return $config_info;
                }
 
-               function read_single($id)
+               function read_single_type($id)
                {
-                       $values =$this->so->read_single($id);
-                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-                       if($values['entry_date'])
+                       $values =$this->so->read_single_type($id);
+                       return $values;
+               }
+
+
+               function save_type($values,$action='')
+               {
+
+                       if ($action=='edit')
                        {
-                               $values['entry_date']   = 
$GLOBALS['phpgw']->common->show_date($values['entry_date'],$dateformat);
+                               if ($values['type_id'] != '')
+                               {
+
+                                       $receipt = 
$this->so->edit_type($values);
+                               }
+                               else
+                               {
+                                       
$receipt['error'][]=array('msg'=>lang('Error'));
+                               }
                        }
+                       else
+                       {
+                               $receipt = $this->so->add_type($values);
+                       }
+
+                       return $receipt;
+               }
+
+               function delete_type($id)
+               {
+                       $this->so->delete_type($id);
+               }
+
+
+
+               function read_attrib($type_id)
+               {
+                       $config_info = $this->so->read_attrib(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
+                                                                               
        'allrows'=>$this->allrows, 'type_id'=>$type_id));
+                       $this->total_records = $this->so->total_records;
+                       return $config_info;
+               }
+
+               function read_single_attrib($type_id,$id)
+               {
+                       $values =$this->so->read_single_attrib($type_id,$id);
 
                        return $values;
                }
 
 
-               function save($values,$action='')
+               function save_attrib($values,$action='')
                {
 
                        if ($action=='edit')
                        {
-                               if ($values['type_id'] != '')
+                               if ($values['attrib_id'] != '')
                                {
 
-                                       $receipt = $this->so->edit($values);
+                                       $receipt = 
$this->so->edit_attrib($values);
                                }
                                else
                                {
@@ -168,17 +208,29 @@
                        }
                        else
                        {
-                               $receipt = $this->so->add($values);
+                               $receipt = $this->so->add_attrib($values);
                        }
 
                        return $receipt;
                }
 
-               function delete($id)
+               function delete_attrib($type_id,$id)
                {
-                       $this->so->delete($id);
+                       $this->so->delete_attrib($type_id,$id);
                }
 
+
+               function select_input_type_list($selected='')
+               {
+                       $input_type[0]['id'] = 'text';
+                       $input_type[0]['name'] = 'text';
+                       $input_type[1]['id'] = 'listbox';
+                       $input_type[1]['name'] = 'listbox';
+                       
+                       return 
$this->bocommon->select_list($selected,$input_type);
+
+               }
+               
                function select_category_list($format='',$selected='')
                {
 
Index: sms/inc/class.menu.inc.php
diff -u sms/inc/class.menu.inc.php:1.1 sms/inc/class.menu.inc.php:1.2
--- sms/inc/class.menu.inc.php:1.1      Mon May 15 13:22:39 2006
+++ sms/inc/class.menu.inc.php  Tue May 23 13:02:12 2006
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package sms
        * @subpackage core
-       * @version $Id: class.menu.inc.php,v 1.1 2006/05/15 13:22:39 sigurdne 
Exp $
+       * @version $Id: class.menu.inc.php,v 1.2 2006/05/23 13:02:12 sigurdne 
Exp $
        */
 
        /**
@@ -27,7 +27,10 @@
 
                function menu($sub='')
                {
-                       $this->sub              = $sub;
+                       if(!$sub)
+                       {
+                               $this->sub              = $sub;
+                       }
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                }
 
@@ -54,38 +57,30 @@
                        $menu['module'][$i]['name']                     =       
lang('outbox');
                        $menu['module'][$i]['statustext']       =       
lang('outbox');
                        $i++;
-/*
-                       if($sub=='.send')
+
+                       if($sub=='.config')
                        {
                                $menu['module'][$i]['this']=True;
                        }
-                       $menu['module'][$i]['link']                     =       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uisms.send_single');
-                       $menu['module'][$i]['name']                     =       
lang('send sms');
-                       $menu['module'][$i]['statustext']       =       
lang('Place');
+                       $menu['module'][$i]['link']                     =       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiconfig.index');
+                       $menu['module'][$i]['name']                     =       
lang('config');
+                       $menu['module'][$i]['statustext']               =       
lang('config');
                        $i++;
 
                        $j=0;
-                       if ($sub == '.send')
+                       if ($sub == '.config')
                        {
-                               if($page=='.send_single')
+                               if($page=='.config.type')
                                {
                                        $menu['sub_menu'][$j]['this']=True;
                                }
-                               $menu['sub_menu'][$j]['link']                   
=       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uisms.send_single');
-                               $menu['sub_menu'][$j]['name']                   
=       lang('send single');
-                               $menu['sub_menu'][$j]['statustext']             
=       lang('send single');
+                               $menu['sub_menu'][$j]['link']                   
=       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiconfig.index');
+                               $menu['sub_menu'][$j]['name']                   
=       lang('Type');
+                               $menu['sub_menu'][$j]['statustext']             
=       lang('Type');
                                $j++;
 
-                               if($page=='.send_group')
-                               {
-                                       $menu['sub_menu'][$j]['this']=True;
-                               }
-                               $menu['sub_menu'][$j]['link']                   
=       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uisms.send_group');
-                               $menu['sub_menu'][$j]['name']                   
=       lang('send group');
-                               $menu['sub_menu'][$j]['statustext']             
=       lang('send group');
-                               $j++;
                        }
-*/
+
                        return $menu;
                }
        }
Index: sms/inc/class.soconfig.inc.php
diff -u sms/inc/class.soconfig.inc.php:1.1 sms/inc/class.soconfig.inc.php:1.2
--- sms/inc/class.soconfig.inc.php:1.1  Mon May 22 08:50:44 2006
+++ sms/inc/class.soconfig.inc.php      Tue May 23 13:02:12 2006
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package sms
        * @subpackage config
-       * @version $Id: class.soconfig.inc.php,v 1.1 2006/05/22 08:50:44 
sigurdne Exp $
+       * @version $Id: class.soconfig.inc.php,v 1.2 2006/05/23 13:02:12 
sigurdne Exp $
        */
 
        /**
@@ -26,17 +26,17 @@
                function soconfig()
                {
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
-                       $this->account  = 
$GLOBALS['phpgw_info']['user']['account_id'];
+                       $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->bocommon         = 
CreateObject($this->currentapp.'.bocommon');
                        $this->db               = clone($GLOBALS['phpgw']->db);
                        $this->db2              = clone($this->db);
 
-                       $this->grants   = 
$GLOBALS['phpgw']->acl->get_grants('sms');
-                       $this->join                     = $this->db->join;
-                       $this->like                     = $this->db->like;
+                       $this->grants           = 
$GLOBALS['phpgw']->acl->get_grants('sms');
+                       $this->join             = $this->db->join;
+                       $this->like             = $this->db->like;
                }
 
-               function read($data)
+               function read_type($data)
                {
                        if(is_array($data))
                        {
@@ -102,7 +102,7 @@
                }
 
 
-               function read_single($id)
+               function read_single_type($id)
                {
                        $sql = 'SELECT * FROM phpgw_sms_config_type where id=' 
. intval($id);
 
@@ -111,42 +111,32 @@
                        if ($this->db->next_record())
                        {
                                $values['id']           = $id;
-                               $values['name'] = 
stripslashes($this->db->f('name'));
-                               $values['address']      = 
stripslashes($this->db->f('address'));
-                               $values['remark']       = 
stripslashes($this->db->f('remark'));
-                               $values['town'] = 
stripslashes($this->db->f('town'));
-                               $values['zip']  = $this->db->f('zip');
-                               $values['entry_date']   = 
$this->db->f('entry_date');
-                               $values['owner']        = $this->db->f('owner');
+                               $values['name']         = 
stripslashes($this->db->f('name'));
+                               $values['descr']        = 
stripslashes($this->db->f('descr'));
                        }
                        return $values;
                }
 
 
-               function add($values)
+               function add_type($values)
                {
                        $this->db->transaction_begin();
 
                        $values['name'] = 
$this->db->db_addslashes($values['name']);
-                       $values['address'] = 
$this->db->db_addslashes($values['address']);
-                       $values['town'] = 
$this->db->db_addslashes($values['town']);
                        $values['descr'] = 
$this->db->db_addslashes($values['descr']);
                        $values['type_id'] = 
$this->bocommon->next_id('phpgw_sms_config_type');
 
                        $insert_values=array(
                                $values['type_id'],
                                $values['name'],
-                               $values['address'],
-                               $values['zip'],
-                               $values['town'],
-                               $values['remark'],
+                               $values['descr'],
                                );
 
                        $insert_values  = 
$this->bocommon->validate_db_insert($insert_values);
-                       $this->db->query("INSERT INTO phpgw_sms_config_type 
(id,name,address,zip,town, remark) "
+                       $this->db->query("INSERT INTO phpgw_sms_config_type 
(id,name,descr) "
                                . "VALUES ($insert_values)",__LINE__,__FILE__);
 
-                       $receipt['message'][]=array('msg'=>lang('training item 
has been saved'));
+                       $receipt['message'][]=array('msg'=>lang('config type 
has been saved'));
                        $receipt['type_id']= $values['type_id'];
 
                        $this->db->transaction_commit();
@@ -154,35 +144,170 @@
                        return $receipt;
                }
 
-               function edit($values)
+               function edit_type($values)
                {
                        $this->db->transaction_begin();
 
-                       $value_set['name']                      = 
$this->db->db_addslashes($values['name']);
-                       $value_set['address']                   = 
$this->db->db_addslashes($values['address']);
-                       $value_set['zip']       = $values['zip'];
-                       $value_set['remark']            = 
$this->db->db_addslashes($values['remark']);
-                       $value_set['town']                      = 
$this->db->db_addslashes($values['town']);
+                       $value_set['name']              = 
$this->db->db_addslashes($values['name']);
+                       $value_set['descr']             = 
$this->db->db_addslashes($values['descr']);
 
                        $value_set      = 
$this->bocommon->validate_db_update($value_set);
 
-
                        $this->db->query("UPDATE phpgw_sms_config_type set 
$value_set WHERE id=" . $values['type_id'],__LINE__,__FILE__);
 
                        $this->db->transaction_commit();
 
-                       $receipt['message'][]=array('msg'=>lang('type item has 
been edited'));
+                       $receipt['message'][]=array('msg'=>lang('config type 
has been edited'));
 
                        $receipt['type_id']= $values['type_id'];
                        return $receipt;
                }
 
-               function delete($id)
+               function delete_type($id)
                {
 
                        $this->db->query('DELETE FROM phpgw_sms_config_type 
WHERE id='  . intval($id),__LINE__,__FILE__);
                }
 
+               function read_attrib($data)
+               {
+                       if(is_array($data))
+                       {
+                               if ($data['start'])
+                               {
+                                       $start=$data['start'];
+                               }
+                               else
+                               {
+                                       $start=0;
+                               }
+                               $query          = 
(isset($data['query'])?$data['query']:'');
+                               $sort           = 
(isset($data['sort'])?$data['sort']:'DESC');
+                               $order          = 
(isset($data['order'])?$data['order']:'');
+                               $allrows        = 
(isset($data['allrows'])?$data['allrows']:'');
+                               $type_id        = 
(isset($data['type_id'])?$data['type_id']:0);
+                       }
+
+                       if ($order)
+                       {
+                               $ordermethod = " order by $order $sort";
+
+                       }
+                       else
+                       {
+                               $ordermethod = ' order by name asc';
+                       }
+
+                       $table = 'phpgw_sms_config_attrib';
+
+                       if($query)
+                       {
+                               $query = ereg_replace("'",'',$query);
+                               $query = ereg_replace('"','',$query);
+
+                               $querymethod = " AND name $this->like 
'%$query%'";
+                       }
+
+                       $sql = "SELECT * FROM $table WHERE type_id = '$type_id' 
$querymethod";
+
+                       $this->db2->query($sql,__LINE__,__FILE__);
+                       $this->total_records = $this->db2->num_rows();
+
+                       if(!$allrows)
+                       {
+                               $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
+                       }
+                       else
+                       {
+                               $this->db->query($sql . 
$ordermethod,__LINE__,__FILE__);
+                       }
+
+                       while ($this->db->next_record())
+                       {
+                               $config_info[] = array
+                               (
+                                       'id'            => $this->db->f('id'),
+                                       'type_id'       => 
$this->db->f('type_id'),
+                                       'name'          => 
stripslashes($this->db->f('name')),
+                                       'descr'         => 
stripslashes($this->db->f('descr'))
+                               );
+                       }
+
+                       return $config_info;
+               }
+
+
+               function read_single_attrib($type_id,$id)
+               {
+                       $sql = 'SELECT * FROM phpgw_sms_config_attrib WHERE 
type_id =' . intval($type_id) . ' AND id=' . intval($id);
+
+                       $this->db->query($sql,__LINE__,__FILE__);
+
+                       if ($this->db->next_record())
+                       {
+                               $values['id']           = $id;
+                               $values['input_type']   = 
$this->db->f('input_type');
+                               $values['name']         = 
stripslashes($this->db->f('name'));
+                               $values['descr']        = 
stripslashes($this->db->f('descr'));
+                       }
+                       return $values;
+               }
+
+
+               function add_attrib($values)
+               {
+                       $this->db->transaction_begin();
+
+                       $values['name'] = 
$this->db->db_addslashes($values['name']);
+                       $values['descr'] = 
$this->db->db_addslashes($values['descr']);
+                       $values['attrib_id'] = 
$this->bocommon->next_id('phpgw_sms_config_attrib',array('type_id'=>$values['type_id']));
+
+                       $insert_values=array(
+                               $values['type_id'],
+                               $values['attrib_id'],
+                               $values['input_type'],
+                               $values['name'],
+                               $values['descr'],
+                               );
+
+                       $insert_values  = 
$this->bocommon->validate_db_insert($insert_values);
+                       $this->db->query("INSERT INTO phpgw_sms_config_attrib 
(type_id,id,input_type,name,descr) "
+                               . "VALUES ($insert_values)",__LINE__,__FILE__);
+
+                       $receipt['message'][]=array('msg'=>lang('config attrib 
has been saved'));
+                       $receipt['attrib_id']= $values['attrib_id'];
+
+                       $this->db->transaction_commit();
+
+                       return $receipt;
+               }
+
+               function edit_attrib($values)
+               {
+
+                       $this->db->transaction_begin();
+
+                       $value_set['name']      = 
$this->db->db_addslashes($values['name']);
+                       $value_set['descr']     = 
$this->db->db_addslashes($values['descr']);
+                       $value_set['input_type']        = $values['input_type'];
+
+                       $value_set      = 
$this->bocommon->validate_db_update($value_set);
+
+                       $this->db->query("UPDATE phpgw_sms_config_attrib set 
$value_set WHERE type_id =" . $values['type_id'] . " AND id=" . 
$values['attrib_id'],__LINE__,__FILE__);
+
+                       $this->db->transaction_commit();
+
+                       $receipt['message'][]=array('msg'=>lang('config attrib 
has been edited'));
+
+                       $receipt['attrib_id']= $values['attrib_id'];
+                       return $receipt;
+               }
+
+               function delete_attrib($type_id,$id)
+               {
+                       $this->db->query('DELETE_ FROM phpgw_sms_config_attrib 
WHERE type_id =' . intval($type_id) . ' AND id=' . 
intval($id),__LINE__,__FILE__);
+               }
+
                function select_conf_list()
                {
                        $this->db->query("SELECT * FROM phpgw_sms_config_type  
ORDER BY name ");
@@ -190,8 +315,8 @@
                        $i = 0;
                        while ($this->db->next_record())
                        {
-                               $type[$i]['id']                         = 
$this->db->f('id');
-                               $type[$i]['name']                               
= stripslashes($this->db->f('name'));
+                               $type[$i]['id']                 = 
$this->db->f('id');
+                               $type[$i]['name']               = 
stripslashes($this->db->f('name'));
                                $i++;
                        }
                        return $type;
Index: sms/inc/class.uiconfig.inc.php
diff -u sms/inc/class.uiconfig.inc.php:1.1 sms/inc/class.uiconfig.inc.php:1.2
--- sms/inc/class.uiconfig.inc.php:1.1  Mon May 22 08:50:44 2006
+++ sms/inc/class.uiconfig.inc.php      Tue May 23 13:02:12 2006
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package sms
        * @subpackage config
-       * @version $Id: class.uiconfig.inc.php,v 1.1 2006/05/22 08:50:44 
sigurdne Exp $
+       * @version $Id: class.uiconfig.inc.php,v 1.2 2006/05/23 13:02:12 
sigurdne Exp $
        */
 
        /**
@@ -28,11 +28,13 @@
 
                var $public_functions = array
                (
-                       'index'  => True,
-                       'view'   => True,
-                       'training'=> True,
-                       'edit'   => True,
-                       'delete' => True
+                       'index'                 => True,
+                       'view_type'             => True,
+                       'edit_type'             => True,
+                       'delete_type'           => True,
+                       'list_attrib'           => True,
+                       'edit_attrib'           => True,
+                       'delete_attrib'         => True,
                );
 
                function uiconfig()
@@ -44,7 +46,9 @@
                        $this->bo                               = 
CreateObject($this->currentapp.'.boconfig',true);
                        $this->bocommon                         = 
CreateObject($this->currentapp.'.bocommon');
                        $this->menu                             = 
CreateObject($this->currentapp.'.menu');
-                       $this->menu->sub                        ='config';
+                       $this->acl_location                     = '.config';
+
+                       $this->menu->sub                        
=$this->acl_location;
 
                        $this->start                            = 
$this->bo->start;
                        $this->query                            = 
$this->bo->query;
@@ -70,13 +74,12 @@
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('config','nextmatchs','menu',
                                                                                
'search_field'));
 
-
                        $receipt = 
$GLOBALS['phpgw']->session->appsession('session_data','sms_c_type_receipt');
                        
$GLOBALS['phpgw']->session->appsession('session_data','sms_c_type_receipt','');
 
-                       $links = $this->menu->links();
+                       $links = $this->menu->links('.config.type');
 
-                       $config_info = $this->bo->read();
+                       $config_info = $this->bo->read_type();
 
                        while (is_array($config_info) && list(,$entry) = 
each($config_info))
                        {
@@ -84,15 +87,18 @@
                                $content[] = array
                                (
                                        'name'                                  
=> $entry['name'],
-                                       'link_edit'                             
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.edit&type_id='
 . $entry['id']),
-                                       'link_delete'                           
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.delete&type_id='
 . $entry['id']),
-                                       'link_view'                             
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.view&type_id='
 . $entry['id']),
+                                       'link_attribute'                        
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.list_attrib&type_id='
 . $entry['id']),
+                                       'link_edit'                             
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.edit_type&type_id='
 . $entry['id']),
+                                       'link_delete'                           
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.delete_type&type_id='
 . $entry['id']),
+                                       'link_view'                             
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.view_type&type_id='
 . $entry['id']),
                                        'lang_view_config_text'                 
=> lang('view the config'),
                                        'lang_edit_config_text'                 
=> lang('edit the config'),
                                        'text_view'                             
=> lang('view'),
                                        'text_edit'                             
=> lang('edit'),
                                        'text_delete'                           
=> lang('delete'),
+                                       'text_attribute'                        
=> lang('attributes'),
                                        'lang_delete_config_text'               
=> lang('delete the config'),
+                                       'lang_attribute_text'                   
=> lang('attributes for this config type'),
                                );
                        }
 
@@ -111,9 +117,11 @@
                                                                                
                                'cat_id'        =>$this->cat_id,
                                                                                
                                'allrows' => $this->allrows)
                                                                                
)),
-                               'lang_delete'   => lang('delete'),
-                               'lang_edit'     => lang('edit'),
-                               'lang_view'     => lang('view'),
+                               'lang_name'             => lang('name'),
+                               'lang_delete'           => lang('delete'),
+                               'lang_edit'             => lang('edit'),
+                               'lang_view'             => lang('view'),
+                               'lang_attribute'        => lang('attribute'),
                        );
 
                        if(!$this->allrows)
@@ -137,9 +145,9 @@
 
                        $table_add[] = array
                        (
-                               'lang_add'                              => 
lang('add'),
+                               'lang_add'              => lang('add'),
                                'lang_add_statustext'   => lang('add a type'),
-                               'add_action'                    => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.edit'),
+                               'add_action'            => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.edit_type'),
                        );
 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
@@ -170,12 +178,12 @@
                        $function_msg                                   = 
lang('list type');
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
-                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data));
+                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_type' => $data));
                        $this->save_sessiondata();
                }
 
 
-               function edit()
+               function edit_type()
                {
                        $type_id        = 
get_var('type_id',array('POST','GET'));
                        $values         = get_var('values',array('POST'));
@@ -191,18 +199,6 @@
                                        {
                                                
$receipt['error'][]=array('msg'=>lang('Please enter a name !'));
                                        }
-                                       if(!$values['address'])
-                                       {
-                                               
$receipt['error'][]=array('msg'=>lang('Please enter an address !'));
-                                       }
-                                       if(!$values['zip'])
-                                       {
-                                               
$receipt['error'][]=array('msg'=>lang('Please enter a zip code !'));
-                                       }
-                                       if(!$values['town'])
-                                       {
-                                               
$receipt['error'][]=array('msg'=>lang('Please enter a town !'));
-                                       }
 
                                        if($type_id)
                                        {
@@ -212,7 +208,7 @@
 
                                        if(!$receipt['error'])
                                        {
-                                               $receipt = 
$this->bo->save($values,$action);
+                                               $receipt = 
$this->bo->save_type($values,$action);
                                                $type_id = $receipt['type_id'];
 
                                                if ($values['save'])
@@ -233,7 +229,7 @@
                        {
                                if(!$receipt['error'])
                                {
-                                       $values = 
$this->bo->read_single($type_id);
+                                       $values = 
$this->bo->read_single_type($type_id);
                                }
                                $function_msg = lang('edit type');
                                $action='edit';
@@ -246,7 +242,7 @@
 
                        $link_data = array
                        (
-                               'menuaction'    => 
$this->currentapp.'.uiconfig.edit',
+                               'menuaction'    => 
$this->currentapp.'.uiconfig.edit_type',
                                'type_id'       => $type_id
                        );
 
@@ -255,24 +251,15 @@
 
                        $data = array
                        (
-                               'value_title'                   => 
$values['title'],
-                               'value_entry_date'              => 
$values['entry_date'],
-                               'value_name'                    => 
$values['name'],
-                               'value_address'                 => 
$values['address'],
-                               'value_zip'                     => 
$values['zip'],
-                               'value_town'                    => 
$values['town'],
-                               'value_remark'                  => 
$values['remark'],
 
-                               'lang_entry_date'               => lang('Entry 
date'),
+                               'value_name'                    => 
$values['name'],
+                               'value_descr'                   => 
$values['descr'],
                                'lang_name'                     => lang('name'),
-                               'lang_address'                  => 
lang('address'),
-                               'lang_zip'                      => lang('zip'),
-                               'lang_town'                     => lang('town'),
-                               'lang_remark'                   => 
lang('remark'),
+                               'lang_descr'                    => 
lang('descr'),
 
                                'msgbox_data'                   => 
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
                                'form_action'                   => 
$GLOBALS['phpgw']->link('/index.php',$link_data),
-                               'lang_id'                       => 
lang('training ID'),
+                               'lang_id'                       => lang('ID'),
                                'lang_save'                     => lang('save'),
                                'lang_cancel'                   => 
lang('cancel'),
                                'value_id'                      => $type_id,
@@ -285,10 +272,10 @@
                        $appname                                        = 
lang('config');
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
-                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
+                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit_type' => $data));
                }
 
-               function view()
+               function view_type()
                {
                        $type_id        = 
get_var('type_id',array('POST','GET'));
                        $values         = get_var('values',array('POST'));
@@ -297,7 +284,7 @@
 
                        if ($type_id)
                        {
-                               $values = $this->bo->read_single($type_id);
+                               $values = $this->bo->read_single_type($type_id);
                                $function_msg = lang('view type');
                        }
                        else
@@ -308,21 +295,11 @@
 
                        $data = array
                        (
-                               'value_title'                   => 
$values['title'],
-                               'value_entry_date'              => 
$values['entry_date'],
                                'value_name'                    => 
$values['name'],
-                               'value_address'                 => 
$values['address'],
-                               'value_zip'                     => 
$values['zip'],
-                               'value_town'                    => 
$values['town'],
-                               'value_remark'                  => 
$values['remark'],
+                               'value_descr'                   => 
$values['descr'],
                                'lang_id'                       => lang('Type 
ID'),
-                               'lang_entry_date'               => lang('Entry 
date'),
                                'lang_name'                     => lang('name'),
-                               'lang_address'                  => 
lang('address'),
-                               'lang_zip'                      => lang('zip'),
-                               'lang_town'                     => lang('town'),
-                               'lang_remark'                   => 
lang('remark'),
-
+                               'lang_descr'                    => 
lang('descr'),
                                'form_action'                   => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.index'),
                                'lang_cancel'                   => 
lang('cancel'),
                                'value_id'                      => $type_id,
@@ -331,13 +308,246 @@
                        $appname                                        = 
lang('config');
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
-                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
+                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view_type' => $data));
+               }
+
+
+
+               function list_attrib()
+               {
+                       $type_id        = 
get_var('type_id',array('POST','GET'));
+                       
+                       if(!$type_id)
+                       {
+                               
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uiconfig.index');
+                       }
+                       
+                       
$GLOBALS['phpgw']->xslttpl->add_file(array('config','nextmatchs','menu',
+                                                                               
'search_field'));
+
+                       $receipt = 
$GLOBALS['phpgw']->session->appsession('session_data','sms_c_type_receipt');
+                       
$GLOBALS['phpgw']->session->appsession('session_data','sms_c_type_receipt','');
+
+                       $links = $this->menu->links();
+
+                       $config_info = $this->bo->read_attrib($type_id);
+
+                       while (is_array($config_info) && list(,$entry) = 
each($config_info))
+                       {
+
+                               $content[] = array
+                               (
+                                       'name'                                  
=> $entry['name'],
+                                       'link_values'                           
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.list_values&type_id='
 . $entry['type_id'] . '&attrib_id='  . $entry['id']),
+                                       'link_edit'                             
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.edit_attrib&type_id='
 . $entry['type_id'] . '&attrib_id='  . $entry['id']),
+                                       'link_delete'                           
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.delete_attrib&type_id='
 . $entry['type_id'] . '&attrib_id='  . $entry['id']),
+                                       'link_view'                             
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.view_attrib&type_id='
 . $entry['type_id'] . '&attrib_id='  . $entry['id']),
+                                       'lang_view_config_text'                 
=> lang('view the config'),
+                                       'lang_edit_config_text'                 
=> lang('edit the config'),
+                                       'text_view'                             
=> lang('view'),
+                                       'text_edit'                             
=> lang('edit'),
+                                       'text_delete'                           
=> lang('delete'),
+                                       'text_values'                   => 
lang('values'),
+                                       'lang_delete_config_text'               
=> lang('delete the config'),
+                                       'lang_values_text'                      
=> lang('values for this config type'),
+                               );
+                       }
+
+//_debug_array($content);
+
+                       $table_header[] = array
+                       (
+
+                               'sort_name'     => 
$this->nextmatchs->show_sort_order(array
+                                                                               
(
+                                                                               
        'sort'  => $this->sort,
+                                                                               
        'var'   =>      'name',
+                                                                               
        'order' =>      $this->order,
+                                                                               
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiconfig.index',
+                                                                               
                                'query'         =>$this->query,
+                                                                               
                                'cat_id'        =>$this->cat_id,
+                                                                               
                                'allrows' => $this->allrows)
+                                                                               
)),
+                               'lang_name'             => lang('name'),
+                               'lang_delete'           => lang('delete'),
+                               'lang_edit'             => lang('edit'),
+                               'lang_view'             => lang('view'),
+                               'lang_values'   => lang('values'),
+                       );
+
+                       if(!$this->allrows)
+                       {
+                               $record_limit   = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+                       }
+                       else
+                       {
+                               $record_limit   = $this->bo->total_records;
+                       }
+
+                       $type = $this->bo->read_single_type($type_id);
+                       
+                       $link_data = array
+                       (
+                               'menuaction'    => 
$this->currentapp.'.uiconfig.list_attrib',
+                                               'sort'                  
=>$this->sort,
+                                               'order'                 
=>$this->order,
+                                               'cat_id'                
=>$this->cat_id,
+                                               'filter'                
=>$this->filter,
+                                               'query'                 
=>$this->query,
+                                               'type_id'               
=>$type_id
+                       );
+
+                       $table_add[] = array
+                       (
+                               'lang_add'              => lang('add'),
+                               'lang_add_statustext'   => lang('add a value'),
+                               'add_action'            => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.edit_attrib&type_id='
 . $type_id),
+                       );
+
+                       $msgbox_data = $this->bocommon->msgbox_data($receipt);
+
+                       $data = array
+                       (
+                               'lang_type'                                     
=> lang('type'),
+                               'value_type_name'                               
=> $type['name'],
+                               'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
+                               'links'                                         
=> $links,
+                               'allow_allrows'                                 
=> True,
+                               'allrows'                                       
=> $this->allrows,
+                               'start_record'                                  
=> $this->start,
+                               'record_limit'                                  
=> $record_limit,
+                               'num_records'                                   
=> count($config_info),
+                               'all_records'                                   
=> $this->bo->total_records,
+                               'link_url'                                      
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
+                               'img_path'                                      
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
+                               'lang_searchfield_statustext'   => lang('Enter 
the search string. To show all entries, empty this field and press the SUBMIT 
button again'),
+                               'lang_searchbutton_statustext'  => lang('Submit 
the search string'),
+                               'query'                                         
=> $this->query,
+                               'lang_search'                                   
=> lang('search'),
+                               'table_header_attrib'                           
        => $table_header,
+                               'table_add'                                     
=> $table_add,
+                               'values_attrib'                                 
=> $content
+                       );
+
+                       $appname                                        = 
lang('config');
+;
+                       $function_msg                                   = 
lang('list attribute');
+
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
+                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_attrib' => $data));
+                       $this->save_sessiondata();
+               }
+
+
+               function edit_attrib()
+               {
+                       $type_id        = 
get_var('type_id',array('POST','GET'));
+                       $attrib_id      = 
get_var('attrib_id',array('POST','GET'));
+                       $values         = get_var('values',array('POST'));
+
+                       $GLOBALS['phpgw']->xslttpl->add_file(array('config'));
+
+                       if (is_array($values))
+                       {
+                               if ($values['save'] || $values['apply'])
+                               {
+
+                                       $values[type_id] = $type_id;
+                                       
+                                       if(!$values['name'])
+                                       {
+                                               
$receipt['error'][]=array('msg'=>lang('Please enter a name !'));
+                                       }
+
+                                       if($attrib_id)
+                                       {
+                                               $values['attrib_id']=$attrib_id;
+                                               $action='edit';
+                                       }
+
+                                       if(!$receipt['error'])
+                                       {
+                                               $receipt = 
$this->bo->save_attrib($values,$action);
+                                               $attrib_id = 
$receipt['attrib_id'];
+
+                                               if ($values['save'])
+                                               {
+                                                       
$GLOBALS['phpgw']->session->appsession('session_data','sms_c_attrib_receipt',$receipt);
+                                                       
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uiconfig.list_attrib&type_id='
 . $type_id);
+                                               }
+                                       }
+                               }
+                               else
+                               {
+                                       
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uiconfig.list_attrib&type_id='
 . $type_id);
+                               }
+                       }
+
+
+                       if ($attrib_id)
+                       {
+                               if(!$receipt['error'])
+                               {
+                                       $values = 
$this->bo->read_single_attrib($type_id,$attrib_id);
+                               }
+                               $function_msg = lang('edit attribute');
+                               $action='edit';
+                       }
+                       else
+                       {
+                               $function_msg = lang('add attribute');
+                               $action='add';
+                       }
+
+                       $link_data = array
+                       (
+                               'menuaction'    => 
$this->currentapp.'.uiconfig.edit_attrib',
+                               'type_id'       => $type_id,
+                               'attrib_id'     => $attrib_id
+                       );
+
+
+                       $type = $this->bo->read_single_type($type_id);
+                       
+                       $msgbox_data = $this->bocommon->msgbox_data($receipt);
+
+                       $data = array
+                       (
+
+                               'value_name'                    => 
$values['name'],
+                               'value_descr'                   => 
$values['descr'],
+                               'lang_name'                     => lang('name'),
+                               'lang_descr'                    => 
lang('descr'),
+                               'lang_input_type'               => lang('input 
type'),                          
+                               'input_type_list'               => 
$this->bo->select_input_type_list($values['input_type']),
+                               'lang_no_input_type'            => lang('no 
input type'),
+                               'lang_lang_input_type_status_text'=> 
lang('input type'),
+                               
+                               'msgbox_data'                   => 
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
+                               'form_action'                   => 
$GLOBALS['phpgw']->link('/index.php',$link_data),
+                               'lang_id'                       => lang('ID'),
+                               'lang_save'                     => lang('save'),
+                               'lang_cancel'                   => 
lang('cancel'),
+                               'lang_type'                     => lang('type'),
+                               'value_type'                    => 
$type['name'],
+                               'value_id'                      => $attrib_id,
+                               'lang_done_status_text'         => lang('Back 
to the list'),
+                               'lang_save_status_text'         => lang('Save 
the training'),
+                               'lang_apply'                    => 
lang('apply'),
+                               'lang_apply_status_text'        => lang('Apply 
the values'),
+                       );
+
+                       $appname                                        = 
lang('config');
+
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
+                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit_attrib' => $data));
                }
 
-               function delete()
+
+               function delete_type()
                {
                        $type_id        = 
get_var('type_id',array('POST','GET'));
-                       $confirm                = 
get_var('confirm',array('POST'));
+                       $confirm        = get_var('confirm',array('POST'));
 
                        $link_data = array
                        (
@@ -347,7 +557,7 @@
 
                        if (get_var('confirm',array('POST')))
                        {
-                               $this->bo->delete($type_id);
+                               $this->bo->delete_type($type_id);
                                Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php',$link_data));
                        }
 
@@ -356,7 +566,7 @@
                        $data = array
                        (
                                'done_action'                   => 
$GLOBALS['phpgw']->link('/index.php',$link_data),
-                               'delete_action'                 => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.delete&type_id='
 . $type_id),
+                               'delete_action'                 => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.delete_type&type_id='
 . $type_id),
                                'lang_confirm_msg'              => lang('do you 
really want to delete this entry'),
                                'lang_yes'                              => 
lang('yes'),
                                'lang_yes_statustext'   => lang('Delete the 
entry'),
@@ -371,4 +581,43 @@
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
                }
 
+               function delete_attrib()
+               {
+                       $type_id        = 
get_var('type_id',array('POST','GET'));
+                       $attrib_id      = 
get_var('attrib_id',array('POST','GET'));
+                       $confirm        = get_var('confirm',array('POST'));
+
+                       $link_data = array
+                       (
+                               'menuaction' => 
$this->currentapp.'.uiconfig.index',
+                               'type_id' => $type_id,
+                               'attrib_id' => $attrib_id
+                       );
+
+                       if (get_var('confirm',array('POST')))
+                       {
+                               $this->bo->delete_attrib($type_id,$attrib_id);
+                               Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php',$link_data));
+                       }
+
+                       
$GLOBALS['phpgw']->xslttpl->add_file(array('app_delete'));
+
+                       $data = array
+                       (
+                               'done_action'                   => 
$GLOBALS['phpgw']->link('/index.php',$link_data),
+                               'delete_action'                 => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiconfig.delete_type&type_id='
 . $type_id . '&attrib_id=' . $attrib_id),
+                               'lang_confirm_msg'              => lang('do you 
really want to delete this entry'),
+                               'lang_yes'                              => 
lang('yes'),
+                               'lang_yes_statustext'   => lang('Delete the 
entry'),
+                               'lang_no_statustext'    => lang('Back to the 
list'),
+                               'lang_no'                               => 
lang('no')
+                       );
+
+                       $appname                                        = 
lang('config');
+                       $function_msg                                   = 
lang('delete attribute');
+
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
+                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
+               }
+
        }
Index: sms/inc/class.uisms.inc.php
diff -u sms/inc/class.uisms.inc.php:1.8 sms/inc/class.uisms.inc.php:1.9
--- sms/inc/class.uisms.inc.php:1.8     Mon May 22 12:50:06 2006
+++ sms/inc/class.uisms.inc.php Tue May 23 13:02:12 2006
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package sms
        * @subpackage sms
-       * @version $Id: class.uisms.inc.php,v 1.8 2006/05/22 12:50:06 sigurdne 
Exp $
+       * @version $Id: class.uisms.inc.php,v 1.9 2006/05/23 13:02:12 sigurdne 
Exp $
        */
 
        /**
@@ -42,13 +42,13 @@
                        $this->currentapp                       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->nextmatchs                       = 
CreateObject('phpgwapi.nextmatchs');
                        $this->account                          = 
$GLOBALS['phpgw_info']['user']['account_id'];
-                       $this->bocommon                 = 
CreateObject($this->currentapp.'.bocommon');
+                       $this->bocommon                         = 
CreateObject($this->currentapp.'.bocommon');
 //                     $this->bocategory                       = 
CreateObject($this->currentapp.'.bocategory');
                        $this->config                           = 
CreateObject('phpgwapi.config');
                        $this->config->read_repository();
                        $this->gateway_number                   = 
$this->config->config_data['gateway_number'];
                        $this->bo                               = 
CreateObject($this->currentapp.'.bosms',False);
-
+                       $this->acl                              = 
CreateObject('phpgwapi.acl');
                        $this->menu                             = 
CreateObject($this->currentapp.'.menu');
                        $this->grants                           = 
$this->bo->grants;
                        $this->start                            = 
$this->bo->start;
@@ -77,12 +77,26 @@
                                                                                
'search_field'));
 
                        $acl_location = '.inbox';
+
+
                        $this->bo->acl_location = $acl_location;
                        $this->menu->sub = $acl_location;
                        $links = $this->menu->links();
 
+                       if(!$this->acl->check($acl_location, PHPGW_ACL_READ))
+                       {
+                               $this->bocommon->no_access($links);
+                               return;
+                       }
+
                        $sms_info = $this->bo->read_inbox();
 
+                       if($this->acl->check($acl_location, PHPGW_ACL_ADD))
+                       {
+                               $add_right = true;
+                       }
+
+
                        while (is_array($sms_info) && list(,$entry) = 
each($sms_info))
                        {
                                
if($this->bocommon->check_perms($entry['grants'], PHPGW_ACL_DELETE))
@@ -92,7 +106,7 @@
                                        $lang_delete_sms_text = lang('delete 
the sms from inbox');
                                }
 
-                               
if($this->bocommon->check_perms($entry['grants'], PHPGW_ACL_DELETE))
+                               if($add_right)
                                {
                                        $link_answer            = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uisms.send&p_num='
 . $entry['sender']);
                                        $text_answer            = 
lang('answer');
@@ -176,15 +190,20 @@
                                                'query'                 
=>$this->query
                        );
 
-                       $table_add[] = array
-                       (
-                               'lang_send'                     => lang('Send 
text SMS'),
-                               'lang_send_statustext'          => lang('send 
single'),
-                               'send_action'                   => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uisms.send&from=index'),
-                               'lang_send_group'               => lang('Send 
broadcast SMS'),
-                               'lang_send_group_statustext'    => lang('send 
group'),
-                               'send_group_action'             => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uisms.send_group&from=index'),
-                       );
+
+
+                       if($this->acl->check($acl_location, PHPGW_ACL_ADD))
+                       {
+                               $table_add[] = array
+                               (
+                                       'lang_send'                     => 
lang('Send text SMS'),
+                                       'lang_send_statustext'          => 
lang('send single'),
+                                       'send_action'                   => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uisms.send&from=index'),
+                                       'lang_send_group'               => 
lang('Send broadcast SMS'),
+                                       'lang_send_group_statustext'    => 
lang('send group'),
+                                       'send_group_action'             => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uisms.send_group&from=index'),
+                               );
+                       }
 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
 
@@ -227,6 +246,12 @@
                        $this->menu->sub = $acl_location;
                        $links = $this->menu->links();
 
+                       if(!$this->acl->check($acl_location, PHPGW_ACL_READ))
+                       {
+                               $this->bocommon->no_access($links);
+                               return;
+                       }
+
                        $receipt = 
$GLOBALS['phpgw']->session->appsession('session_data','sms_send_receipt');
                        
$GLOBALS['phpgw']->session->appsession('session_data','sms_send_receipt','');
 
@@ -305,15 +330,20 @@
                                                'query'                 
=>$this->query
                        );
 
-                       $table_add[] = array
-                       (
-                               'lang_send'                     => lang('Send 
text SMS'),
-                               'lang_send_statustext'          => lang('send 
single'),
-                               'send_action'                   => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uisms.send&from=outbox'),
-                               'lang_send_group'               => lang('Send 
broadcast SMS'),
-                               'lang_send_group_statustext'    => lang('send 
group'),
-                               'send_group_action'             => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uisms.send_group&from=outbox'),
-                       );
+
+                       if($this->acl->check($acl_location, PHPGW_ACL_ADD))
+                       {
+                               $table_add[] = array
+                               (
+                                       'lang_send'                     => 
lang('Send text SMS'),
+                                       'lang_send_statustext'          => 
lang('send single'),
+                                       'send_action'                   => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uisms.send&from=outbox'),
+                                       'lang_send_group'               => 
lang('Send broadcast SMS'),
+                                       'lang_send_group_statustext'    => 
lang('send group'),
+                                       'send_group_action'             => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uisms.send_group&from=outbox'),
+                               );
+                       }
+
 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
 
@@ -382,6 +412,7 @@
 
                                        if(!$receipt['error'])
                                        {
+                                               $from = 'outbox';
                                                $receipt = 
$this->bo->send_sms($values);
                                                $sms_id = $receipt['sms_id'];
 
Index: sms/templates/base/config.xsl
diff -u sms/templates/base/config.xsl:1.1 sms/templates/base/config.xsl:1.2
--- sms/templates/base/config.xsl:1.1   Mon May 22 08:50:44 2006
+++ sms/templates/base/config.xsl       Tue May 23 13:02:12 2006
@@ -1,24 +1,28 @@
-<!-- $Id: config.xsl,v 1.1 2006/05/22 08:50:44 sigurdne Exp $ -->
+<!-- $Id: config.xsl,v 1.2 2006/05/23 13:02:12 sigurdne Exp $ -->
 
        <xsl:template name="app_data">
                <xsl:choose>
-                       <xsl:when test="edit">
-                               <xsl:apply-templates select="edit"/>
+                       <xsl:when test="view_type">
+                               <xsl:apply-templates select="view_type"/>
                        </xsl:when>
-                       <xsl:when test="edit">
-                               <xsl:apply-templates select="view"/>
+                       <xsl:when test="edit_type">
+                               <xsl:apply-templates select="edit_type"/>
                        </xsl:when>
-                       <xsl:when test="training">
-                               <xsl:apply-templates select="training"/>
+                       <xsl:when test="edit_attrib">
+                               <xsl:apply-templates select="edit_attrib"/>
                        </xsl:when>
+
+                       <xsl:when test="list_attrib">
+                               <xsl:apply-templates select="list_attrib"/>
+                       </xsl:when>
+
                        <xsl:otherwise>
-                               <xsl:apply-templates select="list"/>
+                               <xsl:apply-templates select="list_type"/>
                        </xsl:otherwise>
                </xsl:choose>
        </xsl:template>
        
-       <xsl:template match="list">
-               
+       <xsl:template match="list_type">
                <xsl:call-template name="menu"/> 
                <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
                        <xsl:choose>
@@ -57,6 +61,9 @@
                                <a href="{$sort_name}"><xsl:value-of 
select="lang_name"/></a>
                        </td>
                        <td class="th_text" width="5%" align="center">
+                               <xsl:value-of select="lang_attribute"/>
+                       </td>
+                       <td class="th_text" width="5%" align="center">
                                <xsl:value-of select="lang_edit"/>
                        </td>
                        <td class="th_text" width="5%" align="center">
@@ -69,10 +76,111 @@
        </xsl:template>
 
        <xsl:template match="values">
-               <xsl:variable name="lang_view_place_text"><xsl:value-of 
select="lang_view_place_text"/></xsl:variable>
-               <xsl:variable name="lang_edit_place_text"><xsl:value-of 
select="lang_edit_place_text"/></xsl:variable>
-               <xsl:variable name="lang_delete_place_text"><xsl:value-of 
select="lang_delete_place_text"/></xsl:variable>
+               <xsl:variable name="lang_view_config_text"><xsl:value-of 
select="lang_view_config_text"/></xsl:variable>
+               <xsl:variable name="lang_edit_config_text"><xsl:value-of 
select="lang_edit_config_text"/></xsl:variable>
+               <xsl:variable name="lang_delete_config_text"><xsl:value-of 
select="lang_delete_config_text"/></xsl:variable>
+               <xsl:variable name="lang_attribute_text"><xsl:value-of 
select="lang_attribute_text"/></xsl:variable>
+                       <tr>
+                               <xsl:attribute name="class">
+                                       <xsl:choose>
+                                               <xsl:when test="@class">
+                                                       <xsl:value-of 
select="@class"/>
+                                               </xsl:when>
+                                               <xsl:when test="position() mod 
2 = 0">
+                                                       
<xsl:text>row_off</xsl:text>
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       
<xsl:text>row_on</xsl:text>
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </xsl:attribute>
+
+                               <td align="left">
+                                       <xsl:value-of select="name"/>
+                               </td>
+                               <td align="center">
+                                       <xsl:variable 
name="link_attribute"><xsl:value-of select="link_attribute"/></xsl:variable>
+                                       <a href="{$link_attribute}" 
onMouseover="window.status='{$lang_attribute_text}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_attribute"/></a>
+                               </td>
+                               <td align="center">
+                                       <xsl:variable 
name="link_edit"><xsl:value-of select="link_edit"/></xsl:variable>
+                                       <a href="{$link_edit}" 
onMouseover="window.status='{$lang_edit_config_text}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_edit"/></a>
+                               </td>
+                               <td align="center">
+                                       <xsl:variable 
name="link_view"><xsl:value-of select="link_view"/></xsl:variable>
+                                       <a href="{$link_view}" 
onMouseover="window.status='{$lang_view_config_text}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_view"/></a>
+                               </td>
+                               <td align="center">
+                                       <xsl:variable 
name="link_delete"><xsl:value-of select="link_delete"/></xsl:variable>
+                                       <a href="{$link_delete}" 
onMouseover="window.status='{$lang_delete_config_text}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_delete"/></a>
+                               </td>
+                       </tr>
+       </xsl:template>
+
+
+       <xsl:template match="list_attrib">
+               <xsl:call-template name="menu"/> 
+               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
+                       <xsl:choose>
+                               <xsl:when test="msgbox_data != ''">
+                                       <tr>
+                                               <td align="left" colspan="3">
+                                                       <xsl:call-template 
name="msgbox"/>
+                                               </td>
+                                       </tr>
+                               </xsl:when>
+                       </xsl:choose>
+                       <tr>
+                               <td align="left">
+                                       <xsl:value-of select="lang_type"/>
+                                       <xsl:text>: </xsl:text>
+                                       <xsl:value-of select="value_type_name"/>
+                               </td>
+                               <td align="right">
+                                       <xsl:call-template name="search_field"/>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td colspan="3" width="100%">
+                                       <xsl:call-template name="nextmatchs"/>
+                                       <!--    <xsl:with-param 
name="nextmatchs_params"/>
+                                       </xsl:call-template> -->
+                               </td>
+                       </tr>
+               </table>
+               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
+                               <xsl:apply-templates 
select="table_header_attrib"/>
+                               <xsl:apply-templates select="values_attrib"/>
+                               <xsl:apply-templates select="table_add"/>
+               </table>
+       </xsl:template>
+
+       <xsl:template match="table_header_attrib">
+               <xsl:variable name="sort_name"><xsl:value-of 
select="sort_name"/></xsl:variable>
+               <tr class="th">
+                       <td class="th_text" width="10%" align="left">
+                               <a href="{$sort_name}"><xsl:value-of 
select="lang_name"/></a>
+                       </td>
+                       <td class="th_text" width="5%" align="center">
+                               <xsl:value-of select="lang_values"/>
+                       </td>
+                       <td class="th_text" width="5%" align="center">
+                               <xsl:value-of select="lang_edit"/>
+                       </td>
+                       <td class="th_text" width="5%" align="center">
+                               <xsl:value-of select="lang_view"/>
+                       </td>
+                       <td class="th_text" width="5%" align="center">
+                               <xsl:value-of select="lang_delete"/>
+                       </td>
+               </tr>
+       </xsl:template>
 
+       <xsl:template match="values_attrib">
+               <xsl:variable name="lang_view_config_text"><xsl:value-of 
select="lang_view_config_text"/></xsl:variable>
+               <xsl:variable name="lang_edit_config_text"><xsl:value-of 
select="lang_edit_config_text"/></xsl:variable>
+               <xsl:variable name="lang_delete_config_text"><xsl:value-of 
select="lang_delete_config_text"/></xsl:variable>
+               <xsl:variable name="lang_values_text"><xsl:value-of 
select="lang_values_text"/></xsl:variable>
                        <tr>
                                <xsl:attribute name="class">
                                        <xsl:choose>
@@ -92,20 +200,25 @@
                                        <xsl:value-of select="name"/>
                                </td>
                                <td align="center">
+                                       <xsl:variable 
name="link_values"><xsl:value-of select="link_values"/></xsl:variable>
+                                       <a href="{$link_values}" 
onMouseover="window.status='{$lang_values_text}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_values"/></a>
+                               </td>
+                               <td align="center">
                                        <xsl:variable 
name="link_edit"><xsl:value-of select="link_edit"/></xsl:variable>
-                                       <a href="{$link_edit}" 
onMouseover="window.status='{$lang_edit_place_text}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_edit"/></a>
+                                       <a href="{$link_edit}" 
onMouseover="window.status='{$lang_edit_config_text}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_edit"/></a>
                                </td>
                                <td align="center">
                                        <xsl:variable 
name="link_view"><xsl:value-of select="link_view"/></xsl:variable>
-                                       <a href="{$link_view}" 
onMouseover="window.status='{$lang_view_place_text}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_view"/></a>
+                                       <a href="{$link_view}" 
onMouseover="window.status='{$lang_view_config_text}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_view"/></a>
                                </td>
                                <td align="center">
                                        <xsl:variable 
name="link_delete"><xsl:value-of select="link_delete"/></xsl:variable>
-                                       <a href="{$link_delete}" 
onMouseover="window.status='{$lang_delete_place_text}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_delete"/></a>
+                                       <a href="{$link_delete}" 
onMouseover="window.status='{$lang_delete_config_text}';return true;" 
onMouseout="window.status='';return true;"><xsl:value-of 
select="text_delete"/></a>
                                </td>
                        </tr>
        </xsl:template>
 
+
        <xsl:template match="table_add">
                        <tr>
                                <td height="50">
@@ -125,8 +238,8 @@
        </xsl:template>
 
 
-<!-- add / edit  -->
-       <xsl:template match="edit">
+<!-- add / edit type -->
+       <xsl:template match="edit_type">
                <div align="left">
                <xsl:variable name="form_action"><xsl:value-of 
select="form_action"/></xsl:variable>
                <form method="post" action="{$form_action}">
@@ -150,14 +263,6 @@
                                                <xsl:value-of 
select="value_id"/>
                                        </td>
                                </tr>
-                               <tr>
-                                       <td valign="top">
-                                               <xsl:value-of 
select="lang_entry_date"/>
-                                       </td>
-                                       <td>
-                                               <xsl:value-of 
select="value_entry_date"/>
-                                       </td>
-                               </tr>
                                </xsl:when>
                        </xsl:choose>   
                        <tr>
@@ -165,7 +270,7 @@
                                        <xsl:value-of select="lang_name"/>
                                </td>
                                <td>
-                                       <input type="text" size="60" 
name="values[name]" value="{value_name}" onMouseout="window.status='';return 
true;">
+                                       <input type="text" size="20" 
name="values[name]" value="{value_name}" onMouseout="window.status='';return 
true;">
                                                <xsl:attribute 
name="onMouseover">
                                                        
<xsl:text>window.status='</xsl:text>
                                                                <xsl:value-of 
select="lang_name_status_text"/>
@@ -176,52 +281,16 @@
                        </tr>
                        <tr>
                                <td valign="top">
-                                       <xsl:value-of select="lang_address"/>
-                               </td>
-                               <td>
-                                       <input type="text" size="60" 
name="values[address]" value="{value_address}" 
onMouseout="window.status='';return true;">
-                                               <xsl:attribute 
name="onMouseover">
-                                                       
<xsl:text>window.status='</xsl:text>
-                                                               <xsl:value-of 
select="lang_address_status_text"/>
-                                                       <xsl:text>'; return 
true;</xsl:text>
-                                               </xsl:attribute>
-                                       </input>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td valign="top">
-                                       <xsl:value-of select="lang_zip"/>
+                                       <xsl:value-of select="lang_descr"/>
                                </td>
                                <td>
-                                       <input type="text" size="6" 
name="values[zip]" value="{value_zip}" onMouseout="window.status='';return 
true;">
+                                       <textarea cols="60" rows="10" 
name="values[descr]" wrap="virtual" onMouseout="window.status='';return true;">
                                                <xsl:attribute 
name="onMouseover">
                                                        
<xsl:text>window.status='</xsl:text>
-                                                               <xsl:value-of 
select="lang_zip_status_text"/>
+                                                               <xsl:value-of 
select="lang_descr_status_text"/>
                                                        <xsl:text>'; return 
true;</xsl:text>
                                                </xsl:attribute>
-                                       </input>
-                                       <xsl:value-of select="lang_town"/>
-                                       <input type="text" size="40" 
name="values[town]" value="{value_town}" onMouseout="window.status='';return 
true;">
-                                               <xsl:attribute 
name="onMouseover">
-                                                       
<xsl:text>window.status='</xsl:text>
-                                                               <xsl:value-of 
select="lang_town_status_text"/>
-                                                       <xsl:text>'; return 
true;</xsl:text>
-                                               </xsl:attribute>
-                                       </input>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td valign="top">
-                                       <xsl:value-of select="lang_remark"/>
-                               </td>
-                               <td>
-                                       <textarea cols="60" rows="10" 
name="values[remark]" wrap="virtual" onMouseout="window.status='';return true;">
-                                               <xsl:attribute 
name="onMouseover">
-                                                       
<xsl:text>window.status='</xsl:text>
-                                                               <xsl:value-of 
select="lang_remark_status_text"/>
-                                                       <xsl:text>'; return 
true;</xsl:text>
-                                               </xsl:attribute>
-                                               <xsl:value-of 
select="value_remark"/>           
+                                               <xsl:value-of 
select="value_descr"/>            
                                        </textarea>
                                </td>
                        </tr>
@@ -265,28 +334,20 @@
        </xsl:template>
 
 
-<!-- view  -->
-       <xsl:template match="view">
+<!-- view_type  -->
+       <xsl:template match="view_type">
                <div align="left">
                <xsl:variable name="form_action"><xsl:value-of 
select="form_action"/></xsl:variable>
                <form method="post" action="{$form_action}">
                <table cellpadding="2" cellspacing="2" width="80%" 
align="center">
-                               <tr>
-                                       <td valign="top">
-                                               <xsl:value-of select="lang_id"/>
-                                       </td>
-                                       <td>
-                                               <xsl:value-of 
select="value_id"/>
-                                       </td>
-                               </tr>
-                               <tr>
-                                       <td valign="top">
-                                               <xsl:value-of 
select="lang_entry_date"/>
-                                       </td>
-                                       <td>
-                                               <xsl:value-of 
select="value_entry_date"/>
-                                       </td>
-                               </tr>
+                       <tr>
+                               <td valign="top">
+                                       <xsl:value-of select="lang_id"/>
+                               </td>
+                               <td>
+                                       <xsl:value-of select="value_id"/>
+                               </td>
+                       </tr>
                        <tr>
                                <td valign="top" width="10%">
                                        <xsl:value-of select="lang_name"/>
@@ -297,35 +358,133 @@
                        </tr>
                        <tr>
                                <td valign="top">
-                                       <xsl:value-of select="lang_address"/>
+                                       <xsl:value-of select="lang_descr"/>
                                </td>
                                <td>
-                                       <input type="text" readonly="true" 
size="60" name="values[address]" value="{value_address}"></input>
+                                       <textarea cols="60" readonly="true" 
rows="10">
+                                               <xsl:value-of 
select="value_descr"/>            
+                                       </textarea>
+                               </td>
+                       </tr>
+               </table>
+               <table cellpadding="2" cellspacing="2" width="80%" 
align="center">
+                       <tr height="50">
+                               <td align="left" valign="bottom">
+                                       <xsl:variable 
name="lang_cancel"><xsl:value-of select="lang_cancel"/></xsl:variable>
+                                       <input type="submit" 
name="values[cancel]" value="{$lang_cancel}" 
onMouseout="window.status='';return true;">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                               <xsl:value-of 
select="lang_cancel_status_text"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
+                               </td>
+                       </tr>
+               </table>
+               </form>
+               </div>
+       </xsl:template>
+       
+<!-- add / edit attribute -->
+       <xsl:template match="edit_attrib">
+               <div align="left">
+               <xsl:variable name="form_action"><xsl:value-of 
select="form_action"/></xsl:variable>
+               <form method="post" action="{$form_action}">
+               <table cellpadding="2" cellspacing="2" width="80%" 
align="center">
+                       <xsl:choose>
+                               <xsl:when test="msgbox_data != ''">
+                                       <tr>
+                                               <td align="left" colspan="3">
+                                                       <xsl:call-template 
name="msgbox"/>
+                                               </td>
+                                       </tr>
+                               </xsl:when>
+                       </xsl:choose>
+
+                       <tr>
+                               <td valign="top" width="30%">
+                                       <xsl:value-of select="lang_type"/>
+                               </td>
+                               <td align="left">
+                                       <xsl:value-of select="value_type"/>
+                               </td>
+                       </tr>
+
+                       <xsl:choose>
+                               <xsl:when test="value_id != ''">
+                               <tr>
+                               <td valign="top" width="30%">
+                                               <xsl:value-of select="lang_id"/>
+                                       </td>
+                                       <td align="left">
+                                               <xsl:value-of 
select="value_id"/>
+                                       </td>
+                               </tr>
+                               </xsl:when>
+                       </xsl:choose>   
+                       <tr>
+                               <td valign="top" width="10%">
+                                       <xsl:value-of select="lang_name"/>
+                               </td>
+                               <td>
+                                       <input type="text" size="20" 
name="values[name]" value="{value_name}" onMouseout="window.status='';return 
true;">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                               <xsl:value-of 
select="lang_name_status_text"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
                                </td>
                        </tr>
                        <tr>
                                <td valign="top">
-                                       <xsl:value-of select="lang_zip"/>
+                                       <xsl:value-of select="lang_input_type"/>
                                </td>
                                <td>
-                                       <input type="text" readonly="true" 
size="6" name="values[zip]" value="{value_zip}"></input>
-                                       <xsl:value-of select="lang_town"/>
-                                       <input type="text" readonly="true" 
size="40" name="values[town]" value="{value_town}"></input>
+                                       <xsl:variable 
name="lang_input_type_status_text"><xsl:value-of 
select="lang_input_type_status_text"/></xsl:variable>
+                                       <select name="values[input_type]" 
class="forms" onMouseover="window.status='{$lang_input_type_status_text}'; 
return true;" onMouseout="window.status='';return true;">
+                                               <option value=""><xsl:value-of 
select="lang_no_input_type"/></option>
+                                               <xsl:apply-templates 
select="input_type_list"/>
+                                       </select>
                                </td>
                        </tr>
                        <tr>
                                <td valign="top">
-                                       <xsl:value-of select="lang_remark"/>
+                                       <xsl:value-of select="lang_descr"/>
                                </td>
                                <td>
-                                       <textarea cols="60" readonly="true" 
rows="10" name="values[remark]">
-                                               <xsl:value-of 
select="value_remark"/>           
+                                       <textarea cols="60" rows="10" 
name="values[descr]" wrap="virtual" onMouseout="window.status='';return true;">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                               <xsl:value-of 
select="lang_descr_status_text"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                               <xsl:value-of 
select="value_descr"/>            
                                        </textarea>
                                </td>
                        </tr>
-               </table>
-               <table cellpadding="2" cellspacing="2" width="80%" 
align="center">
                        <tr height="50">
+                               <td colspan = "2" align = "center"><table><tr>
+                               <td valign="bottom">
+                                       <xsl:variable 
name="lang_save"><xsl:value-of select="lang_save"/></xsl:variable>
+                                       <input type="submit" 
name="values[save]" value="{$lang_save}" onMouseout="window.status='';return 
true;">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                               <xsl:value-of 
select="lang_save_status_text"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
+                               </td>
+                               <td valign="bottom">
+                                       <xsl:variable 
name="lang_apply"><xsl:value-of select="lang_apply"/></xsl:variable>
+                                       <input type="submit" 
name="values[apply]" value="{$lang_apply}" onMouseout="window.status='';return 
true;">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                               <xsl:value-of 
select="lang_apply_status_text"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
+                               </td>
                                <td align="left" valign="bottom">
                                        <xsl:variable 
name="lang_cancel"><xsl:value-of select="lang_cancel"/></xsl:variable>
                                        <input type="submit" 
name="values[cancel]" value="{$lang_cancel}" 
onMouseout="window.status='';return true;">
@@ -336,8 +495,22 @@
                                                </xsl:attribute>
                                        </input>
                                </td>
+                               </tr></table></td>
                        </tr>
                </table>
                </form>
                </div>
        </xsl:template>
+
+       
+       <xsl:template match="input_type_list">
+       <xsl:variable name="id"><xsl:value-of select="id"/></xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="selected">
+                               <option value="{$id}" 
selected="selected"><xsl:value-of disable-output-escaping="yes" 
select="name"/></option>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <option value="{$id}"><xsl:value-of 
disable-output-escaping="yes" select="name"/></option>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
Index: sms/templates/base/no_access.xsl
diff -u sms/templates/base/no_access.xsl:1.1 
sms/templates/base/no_access.xsl:1.2
--- sms/templates/base/no_access.xsl:1.1        Mon May 15 13:22:39 2006
+++ sms/templates/base/no_access.xsl    Tue May 23 13:02:12 2006
@@ -1,13 +1,5 @@
-<!-- $Id: no_access.xsl,v 1.1 2006/05/15 13:22:39 sigurdne Exp $ -->
+<!-- $Id: no_access.xsl,v 1.2 2006/05/23 13:02:12 sigurdne Exp $ -->
 
-       <xsl:template name="app_data">
-               <xsl:choose>
-                       <xsl:when test="no_access">
-                               <xsl:apply-templates select="no_access"/>
-                       </xsl:when>
-               </xsl:choose>
-       </xsl:template>
-       
        <xsl:template match="no_access">
                
                <xsl:choose>
Index: sms/templates/base/sms.xsl
diff -u sms/templates/base/sms.xsl:1.5 sms/templates/base/sms.xsl:1.6
--- sms/templates/base/sms.xsl:1.5      Mon May 22 12:50:06 2006
+++ sms/templates/base/sms.xsl  Tue May 23 13:02:12 2006
@@ -1,4 +1,4 @@
-<!-- $Id: sms.xsl,v 1.5 2006/05/22 12:50:06 sigurdne Exp $ -->
+<!-- $Id: sms.xsl,v 1.6 2006/05/23 13:02:12 sigurdne Exp $ -->
 
        <xsl:template name="app_data">
                <xsl:choose>
@@ -46,7 +46,11 @@
                <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
                                <xsl:apply-templates 
select="table_header_inbox"/>
                                <xsl:apply-templates select="values_inbox"/>
-                               <xsl:apply-templates select="table_add"/>
+                               <xsl:choose>
+                                       <xsl:when test="table_add != ''">
+                                               <xsl:apply-templates 
select="table_add"/>
+                                       </xsl:when>
+                               </xsl:choose>
                </table>
        </xsl:template>
 
@@ -153,7 +157,11 @@
                <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
                                <xsl:apply-templates 
select="table_header_outbox"/>
                                <xsl:apply-templates select="values_outbox"/>
-                               <xsl:apply-templates select="table_add"/>
+                               <xsl:choose>
+                                       <xsl:when test="table_add != ''">
+                                               <xsl:apply-templates 
select="table_add"/>
+                                       </xsl:when>
+                               </xsl:choose>
                </table>
        </xsl:template>
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]