[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property add_admin.php,1.3,1.4 workorder_admin.p
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property add_admin.php,1.3,1.4 workorder_admin.php,1.3,1.4 index.php,1.2,1.3 list_ticket.php,1.2,1.3 |
Date: |
Thu, 05 Sep 2002 12:48:17 -0400 |
Update of /cvsroot/phpgroupware/property
In directory subversions:/tmp/cvs-serv22560
Modified Files:
add_admin.php workorder_admin.php index.php list_ticket.php
Log Message:
no message
Index: add_admin.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_admin.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** add_admin.php 2 Sep 2002 15:22:23 -0000 1.3
--- add_admin.php 5 Sep 2002 16:48:15 -0000 1.4
***************
*** 112,115 ****
--- 112,117 ----
}
+
$GLOBALS['phpgw']->session->appsession('sub_module','property',$sub_module);
+
Header('Location: '
.$GLOBALS['phpgw']->link('/property/workorder_admin.php'));
Index: workorder_admin.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/workorder_admin.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** workorder_admin.php 1 Sep 2002 21:45:30 -0000 1.3
--- workorder_admin.php 5 Sep 2002 16:48:15 -0000 1.4
***************
*** 29,33 ****
$t->set_var('sub_module_url',$GLOBALS['phpgw']->link('/property/workorder_admin.php'));
-
$t->set_var('lang_select_sub_module',lang('Select sub-module'));
--- 29,32 ----
***************
*** 40,45 ****
. '<option value="can_add">' . lang('Add') .
'</option>' . "\n"
. '<option value="can_edit">' . lang('Edit') .
'</option>' . "\n"
! . '<option value="can_delete">' . lang('Delete') .
'</option>' . "\n";
!
if ($sub_module=='invoice')
--- 39,44 ----
. '<option value="can_add">' . lang('Add') .
'</option>' . "\n"
. '<option value="can_edit">' . lang('Edit') .
'</option>' . "\n"
! . '<option value="can_delete">' . lang('Delete') .
'</option>' . "\n"
! . '<option value="admin">' . lang('Admin') .
'</option>' . "\n";
if ($sub_module=='invoice')
***************
*** 57,60 ****
--- 56,65 ----
$t->set_var('hidden_vars',$hidden_vars);
+ if(!$sub_module)
+ {
+ $sub_module =
$GLOBALS['phpgw']->session->appsession('sub_module','property');
+ }
+
+ $GLOBALS['phpgw']->session->appsession('sub_module','property','');
if ($sub_module=='property'):
***************
*** 67,74 ****
$sub_module_sel[2]=' selected';
! elseif ($sub_module=='fm_tts'):
$sub_module_sel[3]=' selected';
! elseif ($sub_module=='activitiy'):
$sub_module_sel[4]=' selected';
--- 72,79 ----
$sub_module_sel[2]=' selected';
! elseif ($sub_module=='ticket'):
$sub_module_sel[3]=' selected';
! elseif ($sub_module=='activity'):
$sub_module_sel[4]=' selected';
***************
*** 82,87 ****
. '<option value="workorder"' . $sub_module_sel[1] .
'>' . lang('Workorder') . '</option>' . "\n"
. '<option value="equipment"' . $sub_module_sel[2] .
'>' . lang('Equipment') . '</option>' . "\n"
! . '<option value="fm_tts"' . $sub_module_sel[3] . '>' .
lang('fm_tts') . '</option>' . "\n"
! . '<option value="activitiy"' . $sub_module_sel[4] .
'>' . lang('Activitiy') . '</option>' . "\n"
. '<option value="invoice"' . $sub_module_sel[5] . '>'
. lang('Invoice') . '</option>' . "\n";
--- 87,92 ----
. '<option value="workorder"' . $sub_module_sel[1] .
'>' . lang('Workorder') . '</option>' . "\n"
. '<option value="equipment"' . $sub_module_sel[2] .
'>' . lang('Equipment') . '</option>' . "\n"
! . '<option value="ticket"' . $sub_module_sel[3] . '>' .
lang('fm_tts') . '</option>' . "\n"
! . '<option value="activity"' . $sub_module_sel[4] . '>'
. lang('Activity') . '</option>' . "\n"
. '<option value="invoice"' . $sub_module_sel[5] . '>'
. lang('Invoice') . '</option>' . "\n";
***************
*** 97,102 ****
$t->set_var('lang_rights',lang('Rights'));
-
-
if ($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
{
--- 102,105 ----
***************
*** 127,131 ****
if ($sub_module)
{
! $sql = "SELECT
janitor,supervisor,budget_responsible,transfer,fm_admin.account_id,account_lid,account_firstname,account_lastname,
account_type, can_read,can_add,can_edit,can_delete from fm_admin "
. " $join phpgw_accounts on
fm_admin.account_id=phpgw_accounts.account_id WHERE sub_module='$sub_module'
$querymethod ";
--- 130,134 ----
if ($sub_module)
{
! $sql = "SELECT
janitor,supervisor,budget_responsible,transfer,fm_admin.account_id,account_lid,account_firstname,account_lastname,
account_type, can_read,can_add,can_edit,can_delete,admin from fm_admin "
. " $join phpgw_accounts on
fm_admin.account_id=phpgw_accounts.account_id WHERE sub_module='$sub_module'
$querymethod ";
***************
*** 144,147 ****
--- 147,151 ----
'edit' =>
$GLOBALS['phpgw']->db->f('can_edit'),
'delete' =>
$GLOBALS['phpgw']->db->f('can_delete'),
+ 'admin' =>
$GLOBALS['phpgw']->db->f('admin'),
'janitor' =>
$GLOBALS['phpgw']->db->f('janitor'),
'supervisor' =>
$GLOBALS['phpgw']->db->f('supervisor'),
***************
*** 178,181 ****
--- 182,186 ----
// -------------------------- end header declaration
--------------------------------------
+ // print_r($admins);
for ($i=0;$i<count($admins);$i++)
{
***************
*** 205,208 ****
--- 210,218 ----
}
+ if ($admins[$i]['admin'])
+ {
+ $rights .=lang(Admin) .', ';
+ }
+
$roles = ' ';
if ($admins[$i]['janitor'])
***************
*** 249,251 ****
$GLOBALS['phpgw']->common->phpgw_footer();
! ?>
--- 259,261 ----
$GLOBALS['phpgw']->common->phpgw_footer();
! ?>
\ No newline at end of file
Index: index.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/index.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** index.php 1 Sep 2002 19:43:49 -0000 1.2
--- index.php 5 Sep 2002 16:48:15 -0000 1.3
***************
*** 15,25 ****
include('../header.inc.php');
-
-
-
$start_page=$GLOBALS['phpgw_info']['user']['preferences']['property']['default_start_page'];
$sub='p_' . $start_page;
// $GLOBALS['phpgw']->preferences->read_repository();
if ($start_page)
--- 15,91 ----
include('../header.inc.php');
$start_page=$GLOBALS['phpgw_info']['user']['preferences']['property']['default_start_page'];
$sub='p_' . $start_page;
// $GLOBALS['phpgw']->preferences->read_repository();
+
+ $account_id=$GLOBALS['phpgw_info']['user']['account_id'];
+
+ // $db2 = $GLOBALS['phpgw']->db;
+
+ {
+ $sql = "SELECT
sub_module,janitor,supervisor,budget_responsible,transfer,fm_admin.account_id,
can_read,can_add,can_edit,can_delete,admin from fm_admin "
+ . " where account_id = $account_id ";
+
+ // $db2->query($sql,__LINE__,__FILE__);
+ // $total_records = $db2->num_rows();
+ // echo 'total_records: '.$total_records .'<BR>';
+
+ $GLOBALS['phpgw']->db->query($sql,__LINE__,__FILE__);
+ $i = 0;
+ while ($GLOBALS['phpgw']->db->next_record())
+ {
+ $admins[] =array(
+ $GLOBALS['phpgw']->db->f('sub_module') => array(
+ 'read' =>
$GLOBALS['phpgw']->db->f('can_read'),
+ 'add' =>
$GLOBALS['phpgw']->db->f('can_add'),
+ 'edit' =>
$GLOBALS['phpgw']->db->f('can_edit'),
+ 'delete' =>
$GLOBALS['phpgw']->db->f('can_delete'),
+ 'admin' =>
$GLOBALS['phpgw']->db->f('admin'),
+ 'janitor' =>
$GLOBALS['phpgw']->db->f('janitor'),
+ 'supervisor' =>
$GLOBALS['phpgw']->db->f('supervisor'),
+ 'budget_responsible' =>
$GLOBALS['phpgw']->db->f('budget_responsible'),
+ 'transfer' =>
$GLOBALS['phpgw']->db->f('transfer')));
+
+ $sub_module=$GLOBALS['phpgw']->db->f('sub_module');
+
+ if ($sub_module=='property')
+ {
+ $property_order=$i;
+ }
+ if ($sub_module=='equipment')
+ {
+ $equipment_order=$i;
+ }
+ if ($sub_module=='workorder')
+ {
+ $workorder_order=$i;
+ }
+ if ($sub_module=='ticket')
+ {
+ $ticket_order=$i;
+ }
+ if ($sub_module=='invoice')
+ {
+ $invoice_order=$i;
+ }
+ if ($sub_module=='activity')
+ {
+ $activity_order=$i;
+ }
+ $i++;
+
+ }
+ }
+
+ $module_order=array('property'=>$property_order,
+ equipment=>$equipment_order,
+ workorder=>$workorder_order,
+ ticket=>$ticket_order,
+ invoice=>$invoice_order,
+ activity=>$activity_order);
+
+ $GLOBALS['phpgw']->session->appsession('admins','property',$admins);
+
$GLOBALS['phpgw']->session->appsession('module_order','property',$module_order);
if ($start_page)
Index: list_ticket.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_ticket.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** list_ticket.php 1 Sep 2002 19:43:49 -0000 1.2
--- list_ticket.php 5 Sep 2002 16:48:15 -0000 1.3
***************
*** 36,42 ****
$GLOBALS['phpgw']->template->set_var('lang_appname', lang('Trouble
Ticket System'));
! $GLOBALS['phpgw']->template->set_var('fm_tts_newticket_link',
$GLOBALS['phpgw']->link('/property/newticket.php','sub=ticket'));
! $GLOBALS['phpgw']->template->set_var('fm_tts_search_link',
$GLOBALS['phpgw']->link('/property/list_ticket.php','sub=ticket'));
! $GLOBALS['phpgw']->template->set_var('fm_tts_prefs_link',
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=fm_tts'));
$GLOBALS['phpgw']->template->set_var('lang_preferences',
lang('Preferences'));
$GLOBALS['phpgw']->template->set_var('lang_search', lang('search'));
--- 36,43 ----
$GLOBALS['phpgw']->template->set_var('lang_appname', lang('Trouble
Ticket System'));
! $GLOBALS['phpgw']->template->set_var('fm_tts_newticket_link',
$GLOBALS['phpgw']->link('/property/newticket.php','sub=p_ticket'));
! $GLOBALS['phpgw']->template->set_var('fm_tts_search_link',
$GLOBALS['phpgw']->link('/property/list_ticket.php','cat_id='.$cat_id.'&sub=p_ticket'));
! // $GLOBALS['phpgw']->template->set_var('fm_tts_prefs_link',
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=fm_tts'));
! $GLOBALS['phpgw']->template->set_var('fm_tts_prefs_link', '');
$GLOBALS['phpgw']->template->set_var('lang_preferences',
lang('Preferences'));
$GLOBALS['phpgw']->template->set_var('lang_search', lang('search'));
***************
*** 45,48 ****
--- 46,50 ----
$GLOBALS['phpgw']->template->set_var('fm_tts_notickets','');
$GLOBALS['phpgw']->template->set_var('lang_category',lang('Category'));
+ $GLOBALS['phpgw']->template->set_var('lang_all',lang('All'));
// select what tickets to view
***************
*** 57,65 ****
$GLOBALS['phpgw']->session->appsession('sub','property','p_ticket');
if($query)
{
$filter = 'search';
}
! // echo 'filter: '.$filter .'<BR>';
if (!$filter)
--- 59,86 ----
$GLOBALS['phpgw']->session->appsession('sub','property','p_ticket');
+
$GLOBALS['phpgw']->template->set_var('cat_url',$GLOBALS['phpgw']->link('/property/list_ticket.php',"sort=$sort&order=$order&filter=$filter&start=$start&searchfilter=$searchfilter&query=$query&sub=p_ticket"));
+
+ $c = CreateObject('phpgwapi.categories');
+ $c->app_name = 'p_ticket';
+
$GLOBALS['phpgw']->template->set_var('category_list',$c->formated_list('select','all',$cat_id,'True'));
+
+ /* if ($view=='viewopen'):
+ $view_sel[0]=' selected';
+
+ elseif ($view=='viewall'):
+ $view_sel[1]=' selected';
+
+ endif;
+
+ $view_list = '<option value="viewopen"' . $view_sel[0] . '>' .
lang('View only open tickets') . '</option>' . "\n"
+ . '<option value="viewall"' . $view_sel[1] . '>' .
lang('View all tickets') . '</option>' . "\n";
+ $GLOBALS['phpgw']->template->set_var('view_list',$view_list);
+ */
+
if($query)
{
$filter = 'search';
}
! echo 'view: '.$view .'<BR>';
if (!$filter)
***************
*** 68,71 ****
--- 89,93 ----
}
if ($filter == 'viewopen')
+ // if ($view == 'viewopen')
{
$filtermethod = "where ticket_status='O'";
***************
*** 88,91 ****
--- 110,125 ----
}
+ if($filtermethod)
+ {
+ $where_1='and';
+ }
+ else
+ {
+ $where_1='where';
+ }
+ if ($cat_id)
+ {
+ $filter_category= " $where_1 ticket_category='$cat_id' ";
+ }
if (!$sort)
{
***************
*** 110,114 ****
$db2 = $phpgw->db;
! $GLOBALS['phpgw']->db->query("select * from phpgw_fm_tts_tickets
$filtermethod $sortmethod",__LINE__,__FILE__);
$numfound = $GLOBALS['phpgw']->db->num_rows();
--- 144,148 ----
$db2 = $phpgw->db;
! $GLOBALS['phpgw']->db->query("select * from phpgw_fm_tts_tickets
$filtermethod $filter_category $sortmethod",__LINE__,__FILE__);
$numfound = $GLOBALS['phpgw']->db->num_rows();
***************
*** 127,136 ****
if ($filter != 'viewopen')
{
! $GLOBALS['phpgw']->template->set_var('fm_tts_changeview_link',
$GLOBALS['phpgw']->link('/property/list_ticket.php','sub=ticket'));
$GLOBALS['phpgw']->template->set_var('fm_tts_changeview',
lang('View only open tickets'));
}
else
{
! $GLOBALS['phpgw']->template->set_var('fm_tts_changeview_link',
$GLOBALS['phpgw']->link('/property/list_ticket.php','filter=viewall&sub=ticket'));
$GLOBALS['phpgw']->template->set_var('fm_tts_changeview',
lang('View all tickets'));
}
--- 161,170 ----
if ($filter != 'viewopen')
{
! $GLOBALS['phpgw']->template->set_var('fm_tts_changeview_link',
$GLOBALS['phpgw']->link('/property/list_ticket.php','filter=viewopen&sub=ticket&searchfilter='.$searchfilter.'&query='.$query.'&cat_id='.$cat_id));
$GLOBALS['phpgw']->template->set_var('fm_tts_changeview',
lang('View only open tickets'));
}
else
{
! $GLOBALS['phpgw']->template->set_var('fm_tts_changeview_link',
$GLOBALS['phpgw']->link('/property/list_ticket.php','filter=viewall&sub=ticket&searchfilter='.$searchfilter.'&query='.$query.'&cat_id='.$cat_id));
$GLOBALS['phpgw']->template->set_var('fm_tts_changeview',
lang('View all tickets'));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property add_admin.php,1.3,1.4 workorder_admin.php,1.3,1.4 index.php,1.2,1.3 list_ticket.php,1.2,1.3,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/inc header.inc.php,1.6,1.7
- Next by Date:
[Phpgroupware-cvs] CVS: property/inc functions.inc.php,1.4,1.5 class.fm_wrkorder.inc.php,1.3,1.4 class.fm_wo_activities.inc.php,1.2,1.3 hook_settings.inc.php,1.2,1.3
- Previous by thread:
[Phpgroupware-cvs] CVS: property/inc header.inc.php,1.6,1.7
- Next by thread:
[Phpgroupware-cvs] CVS: property/inc functions.inc.php,1.4,1.5 class.fm_wrkorder.inc.php,1.3,1.4 class.fm_wo_activities.inc.php,1.2,1.3 hook_settings.inc.php,1.2,1.3
- Index(es):