[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.boowner.inc.php,1.3,1.4 class
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.boowner.inc.php,1.3,1.4 class.soowner.inc.php,1.3,1.4 class.uiowner.inc.php,1.5,1.6 class.uireport.inc.php,1.5,1.6 |
Date: |
Fri, 23 May 2003 06:11:50 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv18688/inc
Modified Files:
class.boowner.inc.php class.soowner.inc.php
class.uiowner.inc.php class.uireport.inc.php
Log Message:
no message
Index: class.boowner.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boowner.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.boowner.inc.php 23 May 2003 08:40:19 -0000 1.3
--- class.boowner.inc.php 23 May 2003 10:11:48 -0000 1.4
***************
*** 235,239 ****
for ($i=0; $i<count($owner); $i++)
{
! $owner[$i]['entry_date'] =
$GLOBALS['phpgw']->common->show_date($owner[$i]['date'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
}
return $owner;
--- 235,239 ----
for ($i=0; $i<count($owner); $i++)
{
! $owner[$i]['entry_date'] =
$GLOBALS['phpgw']->common->show_date($owner[$i]['entry_date'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
}
return $owner;
Index: class.soowner.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soowner.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.soowner.inc.php 22 May 2003 20:04:16 -0000 1.3
--- class.soowner.inc.php 23 May 2003 10:11:48 -0000 1.4
***************
*** 67,71 ****
else
{
! $ordermethod = ' order by name DESC';
}
--- 67,71 ----
else
{
! $ordermethod = ' order by org_name DESC';
}
***************
*** 84,88 ****
$query = ereg_replace('"','',$query);
! $querymethod = " $where name LIKE '%$query%'";
}
--- 84,88 ----
$query = ereg_replace('"','',$query);
! $querymethod = " $where ( abid = '$query' or
org_name LIKE '%$query%')";
}
***************
*** 106,112 ****
(
'owner_id' =>
$this->db->f('owner_id'),
'entry_date' =>
$this->db->f('entry_date'),
! 'category' =>
$this->db->f('category'),
! 'name' =>
stripslashes($this->db->f('name')),
);
}
--- 106,114 ----
(
'owner_id' =>
$this->db->f('owner_id'),
+ 'abid' =>
$this->db->f('abid'),
+ 'org_name' =>
stripslashes($this->db->f('org_name')),
+ 'remark' =>
stripslashes($this->db->f('remark')),
'entry_date' =>
$this->db->f('entry_date'),
! 'category' =>
$this->db->f('category')
);
}
***************
*** 121,125 ****
{
$owner['id'] =
(int)$this->db->f('owner_id');
! $owner['name'] =
stripslashes($this->db->f('name'));
$owner['entry_date'] =
$this->db->f('entry_date');
$owner['cat_id'] =
(int)$this->db->f('category');
--- 123,129 ----
{
$owner['id'] =
(int)$this->db->f('owner_id');
! $owner['abid'] =
$this->db->f('abid');
! $owner['org_name'] =
stripslashes($this->db->f('org_name'));
! $owner['remark'] =
stripslashes($this->db->f('remark'));
$owner['entry_date'] =
$this->db->f('entry_date');
$owner['cat_id'] =
(int)$this->db->f('category');
***************
*** 133,138 ****
$owner['name'] =
$this->db->db_addslashes($owner['name']);
! $this->db->query("INSERT INTO fm_owner
(entry_date,name,category) "
! . "VALUES ('" . time() . "','" . $owner['name']
. "','" . $owner['cat_id'] .
"')",__LINE__,__FILE__);
--- 137,142 ----
$owner['name'] =
$this->db->db_addslashes($owner['name']);
! $this->db->query("INSERT INTO fm_owner
(entry_date,remark,abid,org_name,category) "
! . "VALUES ('" . time() . "','" .
$owner['remark'] . "','" . $owner['abid'] . "','" . $owner['org_name']
. "','" . $owner['cat_id'] .
"')",__LINE__,__FILE__);
***************
*** 146,150 ****
$owner['name'] =
$this->db->db_addslashes($owner['name']);
! $this->db->query("UPDATE fm_owner set name='" .
$owner['name'] . "', entry_date='" . time() . "', category='"
. $owner['cat_id'] . "'
WHERE owner_id=" . intval($owner['owner_id']),__LINE__,__FILE__);
--- 150,154 ----
$owner['name'] =
$this->db->db_addslashes($owner['name']);
! $this->db->query("UPDATE fm_owner set remark='" .
$owner['remark'] . "', entry_date='" . time() . "', abid='" . $owner['abid'] .
"', org_name='" . $owner['org_name'] . "', category='"
. $owner['cat_id'] . "'
WHERE owner_id=" . intval($owner['owner_id']),__LINE__,__FILE__);
Index: class.uiowner.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiowner.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.uiowner.inc.php 23 May 2003 08:40:19 -0000 1.5
--- class.uiowner.inc.php 23 May 2003 10:11:48 -0000 1.6
***************
*** 82,86 ****
(
'owner_id'
=> $owner['owner_id'],
! 'name'
=> $owner['name'],
'entry_date'
=> $owner['entry_date'],
'category'
=> $owner['category'],
--- 82,86 ----
(
'owner_id'
=> $owner['owner_id'],
! 'name'
=> $owner['org_name'],
'entry_date'
=> $owner['entry_date'],
'category'
=> $owner['category'],
***************
*** 108,112 ****
(
'sort' => $this->sort,
!
'var' => 'name',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiowner.index',
--- 108,112 ----
(
'sort' => $this->sort,
!
'var' => 'org_name',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiowner.index',
***************
*** 209,252 ****
}
function edit()
{
$owner_id =
get_var('owner_id',array('POST','GET'));
$values = get_var('values',array('POST'));
$GLOBALS['phpgw']->xslttpl->add_file(array('owner'));
! if (is_array($values))
{
! if ($values['save'] || $values['apply'])
{
! if(!$values['cat_id'])
! {
!
$receipt['error'][]=array('msg'=>lang('Please select a category !'));
! }
! if(!$values['name'])
! {
!
$receipt['error'][]=array('msg'=>lang('Please enter a name !'));
! }
! if(!$receipt['error'])
{
! $values['owner_id'] =
$owner_id;
! $receipt =
$this->bo->save($values);
! $owner_id =
$receipt['owner_id'];
! $this->cat_id =
($values['cat_id']?$values['cat_id']:$this->cat_id);
!
! if ($values['save'])
! {
!
$GLOBALS['phpgw']->session->appsession('session_data','owner_receipt',$receipt);
!
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uiowner.index');
! }
}
}
! else
! {
!
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uiowner.index');
! }
}
--- 209,283 ----
}
+ function initiate_ui_addr_lookup($data)
+ {
+ //_debug_array($data);
+
+ if($data['type']=='view')
+ {
+
$GLOBALS['phpgw']->xslttpl->add_file(array('abook_view'));
+ }
+ else
+ {
+
$GLOBALS['phpgw']->xslttpl->add_file(array('abook_form'));
+ }
+
+ $owner['value_abid'] =
$data['abid'];
+ $owner['value_org_name'] =
$data['org_name'];
+
+ if($data['abid'] && !$data['org_name'])
+ {
+ $abook_data
=
$this->contacts->read_single_entry($data['abid'],array('org_name'=>'org_name','email'=>'email'));
+ $owner['value_org_name'] =
$abook_data[0]['org_name'];
+ }
+
+ $owner['abook_link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.addressbook');
+ $owner['lang_contact']
= lang('contact');
+ $owner['lang_select_contact_help'] =
lang('Klick this link to select owner from the addressbook');
+ $owner['lang_org_name'] =
lang('Name');
+
+ //_debug_array($owner);
+ return $owner;
+ }
+
+
function edit()
{
$owner_id =
get_var('owner_id',array('POST','GET'));
$values = get_var('values',array('POST'));
+ $values['abid'] =
get_var('vendor_id',array('POST'));
+ $values['org_name'] =
get_var('vendor_name',array('POST'));
$GLOBALS['phpgw']->xslttpl->add_file(array('owner'));
! if ($values['save'] || $values['apply'])
{
! if(!$values['cat_id'])
{
+
$receipt['error'][]=array('msg'=>lang('Please select a category !'));
+ }
! if(!$values['abid'])
! {
!
$receipt['error'][]=array('msg'=>lang('Please select a contact !'));
! }
! if(!$receipt['error'])
! {
! $values['owner_id'] = $owner_id;
! $receipt = $this->bo->save($values);
! $owner_id = $receipt['owner_id'];
! $this->cat_id =
($values['cat_id']?$values['cat_id']:$this->cat_id);
! if ($values['save'])
{
!
$GLOBALS['phpgw']->session->appsession('session_data','owner_receipt',$receipt);
!
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uiowner.index');
}
}
! }
!
! if ($values['cancel'])
! {
!
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uiowner.index');
}
***************
*** 258,261 ****
--- 289,298 ----
}
+
+ $abook_data=$this->initiate_ui_addr_lookup(array(
+ 'abid' =>
$owner['abid'],
+ 'org_name' =>
$owner['org_name']));
+
+
$link_data = array
(
***************
*** 263,267 ****
'owner_id' => $owner_id
);
- //_debug_array($link_data);
$msgbox_data = $this->bocommon->msgbox_data($receipt);
--- 300,303 ----
***************
*** 270,284 ****
(
'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
'edit_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
! 'lang_owner_id'
=> lang('Owner ID'),
'value_owner_id'
=> $owner_id,
! 'lang_name'
=> lang('name'),
'lang_category'
=> lang('category'),
'lang_save'
=> lang('save'),
'lang_cancel'
=> lang('cancel'),
'lang_apply'
=> lang('apply'),
! 'value_name'
=> $owner['name'],
'value_cat'
=> $owner['cat'],
! 'lang_name_statustext' => lang('Enter
the name of the owner'),
'lang_apply_statustext' =>
lang('Apply the values'),
'lang_cancel_statustext' =>
lang('Leave the owner untouched and return back to the list'),
--- 306,321 ----
(
'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
+ 'abook_data'
=> $abook_data,
'edit_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
! 'lang_owner_id'
=> lang('ID'),
'value_owner_id'
=> $owner_id,
! 'lang_remark'
=> lang('remark'),
'lang_category'
=> lang('category'),
'lang_save'
=> lang('save'),
'lang_cancel'
=> lang('cancel'),
'lang_apply'
=> lang('apply'),
! 'value_remark'
=> $owner['remark'],
'value_cat'
=> $owner['cat'],
! 'lang_remark_statustext' =>
lang('Enter a remark for this owner'),
'lang_apply_statustext' =>
lang('Apply the values'),
'lang_cancel_statustext' =>
lang('Leave the owner untouched and return back to the list'),
Index: class.uireport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uireport.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.uireport.inc.php 23 May 2003 08:40:19 -0000 1.5
--- class.uireport.inc.php 23 May 2003 10:11:48 -0000 1.6
***************
*** 64,69 ****
'order' => $this->order,
'filter' =>
$this->filter,
! 'cat_id' => $this->cat_id
! 'part_of_town_id' =>
$this->part_of_town_id
'district_id' => $this->district_id
);
--- 64,69 ----
'order' => $this->order,
'filter' =>
$this->filter,
! 'cat_id' =>
$this->cat_id,
! 'part_of_town_id' =>
$this->part_of_town_id,
'district_id' => $this->district_id
);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.boowner.inc.php,1.3,1.4 class.soowner.inc.php,1.3,1.4 class.uiowner.inc.php,1.5,1.6 class.uireport.inc.php,1.5,1.6,
Sigurd Nes <address@hidden> <=