[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] projects/inc/class.uistatistics.inc.php, 1.51
From: |
nomail |
Subject: |
[Phpgroupware-cvs] projects/inc/class.uistatistics.inc.php, 1.51 |
Date: |
Wed, 12 May 2004 23:52:02 +0200 |
Update of /projects/inc
Modified Files:
Branch:
class.uistatistics.inc.php
date: 2004/05/12 21:52:02; author: ceb; state: Exp; lines: +62 -13
Log Message:
update
=====================================================================
Index: projects/inc/class.uistatistics.inc.php
diff -u projects/inc/class.uistatistics.inc.php:1.50
projects/inc/class.uistatistics.inc.php:1.51
--- projects/inc/class.uistatistics.inc.php:1.50 Tue May 11 13:53:47 2004
+++ projects/inc/class.uistatistics.inc.php Wed May 12 21:52:02 2004
@@ -38,11 +38,12 @@
var $public_functions = array
(
- 'list_projects' => True,
- 'list_users' => True,
- 'user_stat' => True,
- 'project_gantt' => True,
- 'show_stat' => True
+ 'list_projects' => True,
+ 'list_users' => True,
+ 'user_stat' => True,
+ 'project_gantt' => True,
+ 'show_stat' => True,
+ 'get_screen_size' => True
);
function uistatistics()
@@ -697,12 +698,50 @@
$this->bostatistics->show_graph($project_id);
}
+
+ function get_screen_size()
+ {
+ $project_id =
get_var('project_id',array('GET','POST'));
+ $start = get_var('start',array('GET','POST'));
+ $end = get_var('end',array('GET','POST'));
+ $action = get_var('action',array('GET','POST'));
+ $sessionid =
get_var('sessionid',array('GET','POST'));
+
+ $link_data = array
+ (
+ 'menuaction' =>
'projects.uistatistics.project_gantt',
+ 'action' => $action,
+ 'project_id' => $project_id,
+ 'gantt_popup' => True,
+ 'start' => $start,
+ 'end' => $end
+ );
+
+ $GLOBALS['phpgw']->template->set_file(array('screen' =>
'stats_gant_popup_intro.tpl'));
+
+
$GLOBALS['phpgw']->template->set_var('sessionid',$sessionid);
+
$GLOBALS['phpgw']->template->set_var('project_id',$project_id);
+ $GLOBALS['phpgw']->template->set_var('action',$action);
+
$GLOBALS['phpgw']->template->set_var('redirect_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
+
+ $GLOBALS['phpgw']->template->pfp('out','screen');
+ }
+
function project_gantt()
{
$project_id =
get_var('project_id',array('GET','POST'));
$sdate =
get_var('sdate',array('GET','POST'));
$edate =
get_var('edate',array('GET','POST'));
- $gantt_popup =
get_var('gantt_popup',array('GET','POST'));
+ $start =
get_var('start',array('GET','POST'));
+ $end =
get_var('end',array('GET','POST'));
+ $gantt_popup =
get_var('gantt_popup',array('POST','GET'));
+ $action =
get_var('action',array('POST','GET'));
+
+ $screen_width =
get_var('screen_width',array('POST','GET'));
+ $screen_height =
get_var('screen_height',array('POST','GET'));
+
+ //echo 'WIDTH=' . $screen_width;
+ //echo 'HEIGHT=' . $screen_height;
if (! $project_id)
{
@@ -738,7 +777,9 @@
'menuaction' =>
'projects.uistatistics.project_gantt',
'action' => $action,
'project_id' => $project_id,
- 'gantt_popup' => $gantt_popup
+ 'gantt_popup' => $gantt_popup,
+ 'screen_width' => $screen_width,
+ 'screen_height' => $screen_height
);
if(is_array($sdate))
@@ -746,12 +787,19 @@
$start_array =
$jscal->input2date($sdate['str']);
$start_val = $start_array['raw'];
}
-
+ elseif($start)
+ {
+ $start_val = $start;
+ }
if(is_array($edate))
{
$end_array =
$jscal->input2date($edate['str']);
$end_val = $end_array['raw'];
}
+ elseif($end)
+ {
+ $end_val = $end;
+ }
$start =
$start_val?$start_val:mktime(12,0,0,date('m'),date('d'),date('Y'));
$end =
$end_val?$end_val:mktime(12,0,0,date('m'),date('d')+30,date('Y'));
@@ -761,8 +809,8 @@
$GLOBALS['phpgw']->template->set_var('css_file',$GLOBALS['phpgw_info']['server']['webserver_url']
. SEP . 'phpgwapi' . SEP . 'templates'
. SEP . 'idots' . SEP . 'css' . SEP .
'idots.css');
-
$GLOBALS['phpgw']->template->set_var('gantt_link',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uistatistics.project_gantt&action='
. $action
-
. '&project_id=' . $project_id .
'&gantt_popup=True'));
+
$GLOBALS['phpgw']->template->set_var('gantt_link',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uistatistics.get_screen_size&action='
. $action
+
. '&project_id=' . $project_id .
'&gantt_popup=True&start=' . $start . '&end=' . $end));
@@ -772,11 +820,12 @@
//_debug_array($project_array);
- $this->bostatistics->show_graph(array('project_array'
=> $project_array,'sdate' => $start, 'edate' => $end));
+ $img_file =
$this->bostatistics->show_graph(array('project_array' => $project_array,'sdate'
=> $start, 'edate' => $end,'width' => $screen_width,
+
'height' => $screen_height,'gantt_popup' => $gantt_popup));
$GLOBALS['phpgw']->template->set_var('lang_close_window',lang('close window'));
$GLOBALS['phpgw']->template->set_var('lang_show_gantt_in_new_window',lang('show
gantt chart in new window'));
-
$GLOBALS['phpgw']->template->set_var('pix_src',$GLOBALS['phpgw_info']['server']['webserver_url']
. SEP . 'phpgwapi' . SEP . 'images' . SEP . 'draw_tmp.png');
+
$GLOBALS['phpgw']->template->set_var('pix_src',$GLOBALS['phpgw_info']['server']['webserver_url']
. SEP . 'phpgwapi' . SEP . 'images' . SEP . $img_file);
$GLOBALS['phpgw']->template->pfp('out','project_stat');
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] projects/inc/class.uistatistics.inc.php, 1.51,
nomail <=