[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.uigab.inc.php class.bogab.in...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.uigab.inc.php class.bogab.in... |
Date: |
Mon, 03 Apr 2006 12:02:44 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/04/03 12:02:44
Modified files:
inc : class.uigab.inc.php class.bogab.inc.php
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.uigab.inc.php.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.bogab.inc.php.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
Patches:
Index: property/inc/class.bogab.inc.php
diff -u property/inc/class.bogab.inc.php:1.9
property/inc/class.bogab.inc.php:1.10
--- property/inc/class.bogab.inc.php:1.9 Fri Mar 31 11:24:22 2006
+++ property/inc/class.bogab.inc.php Mon Apr 3 12:02:44 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage location
- * @version $Id: class.bogab.inc.php,v 1.9 2006/03/31 11:24:22 sigurdne
Exp $
+ * @version $Id: class.bogab.inc.php,v 1.10 2006/04/03 12:02:44 sigurdne
Exp $
*/
/**
@@ -126,8 +126,13 @@
}
- function
read($loc1='',$gaards_nr='',$bruksnr='',$feste_nr='',$seksjons_nr='',$address='',$check_payments
= '')
+ function
read($loc1='',$gaards_nr='',$bruksnr='',$feste_nr='',$seksjons_nr='',$address='',$check_payments
= '',$allrows='')
{
+ if($allrows)
+ {
+ $this->allrows = true;
+ }
+
$gab = $this->so->read(array('start' =>
$this->start,'sort' => $this->sort,'order' =>
$this->order,'allrows'=>$this->allrows,
'cat_id' => $this->cat_id,'loc1' => $loc1,
'gaards_nr' => $gaards_nr,'bruksnr' => $bruksnr,'feste_nr' => $feste_nr,
Index: property/inc/class.uigab.inc.php
diff -u property/inc/class.uigab.inc.php:1.16
property/inc/class.uigab.inc.php:1.17
--- property/inc/class.uigab.inc.php:1.16 Sun Apr 2 10:21:14 2006
+++ property/inc/class.uigab.inc.php Mon Apr 3 12:02:44 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage location
- * @version $Id: class.uigab.inc.php,v 1.16 2006/04/02 10:21:14 sigurdne
Exp $
+ * @version $Id: class.uigab.inc.php,v 1.17 2006/04/03 12:02:44 sigurdne
Exp $
*/
/**
@@ -35,7 +35,8 @@
'list_detail' => True,
'view' => True,
'edit' => True,
- 'delete' => True
+ 'delete' => True,
+ 'excel' => True
);
function uigab()
@@ -85,6 +86,78 @@
$this->bo->save_sessiondata($data);
}
+ function excel()
+ {
+ $address =
get_var('address',array('POST','GET'));
+ $check_payments =
get_var('check_payments',array('POST','GET'));
+ $location_code =
get_var('location_code',array('POST','GET'));
+ $gaards_nr =
get_var('gaards_nr',array('POST','GET'));
+ $bruksnr =
get_var('bruksnr',array('POST','GET'));
+ $feste_nr =
get_var('feste_nr',array('POST','GET'));
+ $seksjons_nr =
get_var('seksjons_nr',array('POST','GET'));
+
+
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=1&acl_location='
. $this->acl2_location);
+ }
+
+ $gab_list =
$this->bo->read($location_code,$gaards_nr,$bruksnr,$feste_nr,$seksjons_nr,$address,$check_payments,$allrows=True);
+
+ $payment_date = $this->bo->payment_date;
+
+ $i=0;
+
+ while (is_array($gab_list) && list(,$gab) =
each($gab_list))
+ {
+ if(is_array($payment_date))
+ {
+ reset($payment_date);
+ }
+ $value_gaards_nr =
substr($gab['gab_id'],4,5);
+ $value_bruks_nr =
substr($gab['gab_id'],9,4);
+ $value_feste_nr =
substr($gab['gab_id'],13,4);
+ $value_seksjons_nr =
substr($gab['gab_id'],17,3);
+
+ $content[] = array
+ (
+ 'owner' =>
lang($gab['owner']),
+ 'hits' =>
$gab['hits'],
+ 'address' =>
$gab['address'],
+ 'gaards_nr' =>
$value_gaards_nr,
+ 'bruks_nr' =>
$value_bruks_nr,
+ 'feste_nr' =>
$value_feste_nr,
+ 'seksjons_nr' =>
$value_seksjons_nr,
+ 'location_code' =>
$gab['location_code'],
+ );
+
+ while (is_array($payment_date) && list(,$date)
= each($payment_date))
+ {
+ $content[$i][$date] =
$gab['payment'][$date];
+ }
+
+ $i++;
+ }
+
+ //_debug_array($content);
+ $table_header['name'] =
array('owner','hits','address','gaards_nr','bruks_nr','feste_nr','seksjons_nr','location_code');
+ $table_header['descr'] =
array(lang('owner'),lang('hits'),lang('address'),'gaards_nr','bruks_nr','feste_nr','seksjons_nr','location_code');
+
+ if(is_array($payment_date))
+ {
+ reset($payment_date);
+ }
+
+ while (is_array($payment_date) && list(,$date) =
each($payment_date))
+ {
+ $table_header['name'][] = $date;
+ $table_header['descr'][] = $date;
+ }
+
+
$this->bocommon->excel($content,$table_header['name'],$table_header['descr'],array());
+ }
+
+
function index()
{
if(!$this->acl_read)
@@ -305,6 +378,24 @@
'check_payments'
=>$check_payments
);
+
+ $link_excel = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uigab.excel',
+ 'sort' =>$this->sort,
+ 'order' =>$this->order,
+ 'cat_id' =>$this->cat_id,
+ 'filter' =>$this->filter,
+ 'location_code' =>$location_code,
+ 'gaards_nr' =>$gaards_nr,
+ 'bruksnr' =>$bruksnr,
+ 'feste_nr' =>$feste_nr,
+ 'seksjons_nr' =>$seksjons_nr,
+ 'address' =>$address,
+ 'check_payments'
=>$check_payments
+ );
+
+
if(!$this->allrows)
{
$record_limit =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
@@ -316,6 +407,11 @@
$data = array
(
+ 'lang_excel' =>
'excel',
+ 'link_excel' =>
$GLOBALS['phpgw']->link('/index.php',$link_excel),
+ 'lang_excel_help' =>
lang('Download table to MS Excel'),
+ 'overlib_source' =>
'./'.$this->currentapp.'/inc/overlib.js',
+
'search_field_header' =>
$search_field_header,
'links' =>
$links,
'allrows' =>
$this->allrows,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.uigab.inc.php class.bogab.in...,
Sigurd Nes <=