download header.inc.php
Language: PHP
License: GPL
LOC: 210
Project Info
eGroupWare: Enterprise Collaboration(egroupware)
Server: SourceForge
Type: cvs
...re\egroupware\property\inc\
   calendar.html
   calendar.js
   class.boXport.inc.php
   class.event.inc.php
   ...m_wo_activities.inc.php
   class.fm_wrkorder.inc.php
   class.invoice.inc.php
   class.soXport.inc.php
   class.uiinfolog.inc.php
   class.uiXport.inc.php
   functions.inc.php
   header.inc.php
   hook_admin.inc.php
   hook_manual.inc.php
   hook_preferences.inc.php
   hook_settings.inc.php
   overlib.js

<?php
	/**************************************************************************\
	* This program is free software; you can redistribute it and/or modify it  *
	* under the terms of the GNU General Public License as published by the    *
	* Free Software Foundation; either version 2 of the License, or (at your   *
	* option) any later version.                                               *
	\**************************************************************************/
	/* $Id: header.inc.php,v 1.20 2003/08/28 14:29:15 ralfbecker Exp $ */

	$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
	$t->set_file(array('property_header' => 'header.tpl'));

	$admin_info = lang('Property');
	$t->set_var('bg_color',$GLOBALS['phpgw_info']['theme']['th_bg']);
	$t->set_var('tr_color1',$phpgw_info['theme']['row_on']);
	$t->set_var('tr_color2',$phpgw_info['theme']['row_off']);



	$this->cats						= CreateObject('phpgwapi.categories');
	$this->account					= $GLOBALS['phpgw_info']['user']['account_id'];
	$this->grants					= $GLOBALS['phpgw']->acl->get_grants('projects');
	$this->grants[$this->account]	= PHPGW_ACL_READ + PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;


	$admins = $GLOBALS['phpgw']->session->appsession('admins','property');
	$module_order = $GLOBALS['phpgw']->session->appsession('module_order','property');

	$admin_equipment=$admins[$module_order['equipment']]['equipment']['admin'];
	$admin_workorder=$admins[$module_order['workorder']]['workorder']['admin'];
	$admin_activity=$admins[$module_order['activity']]['activity']['admin'];
	$admin_invoice=$admins[$module_order['invoice']]['invoice']['admin'];

//	echo 'admin_invoice: '.$admin_invoice .'<BR>';
//	print_r($admins);

	if (!$sub)
	{
		$sub = $GLOBALS['phpgw']->session->appsession('sub','property');
	}

//	echo 'sub: '.$sub .'<BR>';


//	$isadmin = ispropertyadmin();

	$t->set_var('link_property',$GLOBALS['phpgw']->link('/property/list_property.php','sub=p_property'));
	$t->set_var('lang_property',lang('Property'));
	$t->set_var('link_equipment',$GLOBALS['phpgw']->link('/property/list_equipment.php','sub=p_equipment'));
	$t->set_var('lang_equipment',lang('Equipment'));
	$t->set_var('link_requirement',$GLOBALS['phpgw']->link('/property/list_requirement.php'));
	$t->set_var('lang_requirement',lang('Requirement'));
	$t->set_var('link_request',$GLOBALS['phpgw']->link('/property/list_request.php'));
	$t->set_var('lang_request',lang('Request'));
	$t->set_var('link_documents',$GLOBALS['phpgw']->link('/property/list_documents.php'));
	$t->set_var('lang_documents',lang("Documents"));
	$t->set_var('link_events',$GLOBALS['phpgw']->link('/calendar/index.php'));
	$t->set_var('lang_events',lang('Events'));
	$t->set_var('link_helpdesk',$GLOBALS['phpgw']->link('/property/list_ticket.php','sub=p_ticket'));
	$t->set_var('lang_helpdesk',lang('Helpdesk'));
	$t->set_var('link_workorder',$GLOBALS['phpgw']->link('/property/list_workorder.php','sub=p_workorder'));
	$t->set_var('lang_workorder',lang('Workorder'));
	$t->set_var('link_invoice',$GLOBALS['phpgw']->link('/property/list_invoice.php','sub=p_invoice'));
	$t->set_var('lang_invoice',lang('Invoice'));
	$t->set_var('link_activities',$GLOBALS['phpgw']->link('/property/list_vendors_activities.php','sub=p_activity'));
	$t->set_var('lang_activities',lang('Activities'));
	$t->set_var('link_documentation',$GLOBALS['phpgw']->link('/property/list_documentation.php','sub=p_documentation'));
	$t->set_var('lang_documentation',lang('Documentation'));

	if ($sub == p_ticket)
	{
		$admin_info = lang('Fm Ticket System');
	}

	if ($sub == p_equipment)
	{
		$t->set_var('sublink_equipment',$GLOBALS['phpgw']->link('/property/list_equipment.php','sub=p_equipment'));
		$t->set_var('sublang_equipment',lang('Equipment'));
		$admin_info = lang('equipment');
		if ($admin_equipment)
		{
			$t->set_var('sublink_equipment_type',$GLOBALS['phpgw']->link('/property/list_equipment_type.php','sub=p_equipment'));
			$t->set_var('sublang_equipment_type',lang('Equipment type'));
		}
		else
		{
			$t->set_var('sublink_equipment_type','');
			$t->set_var('sublang_equipment_type','');
		}
	}
	else
	{
		$t->set_var('sublink_equipment','');
		$t->set_var('sublang_equipment','');
		$t->set_var('sublink_equipment_type','');
		$t->set_var('sublang_equipment_type','');
	}

	if ($sub == p_property)
	{
		$t->set_var('sublink_property',$GLOBALS['phpgw']->link('/property/list_property.php','sub=p_property'));
		$t->set_var('sublang_property',lang('Property'));
		$t->set_var('sublink_building',$GLOBALS['phpgw']->link('/property/list_building.php','sub=p_property'));
		$t->set_var('sublang_building',lang('Building'));
		$t->set_var('sublink_entrance',$GLOBALS['phpgw']->link('/property/list_entrance.php','sub=p_property'));
		$t->set_var('sublang_entrance',lang('Entrance'));
		$t->set_var('sublink_apartment',$GLOBALS['phpgw']->link('/property/list_apartment.php','sub=p_property'));
		$t->set_var('sublang_apartment',lang('Apartment'));
		$t->set_var('sublink_drawing',$GLOBALS['phpgw']->link('/property/list_drawing.php','sub=p_property'));
		$t->set_var('sublang_drawing',lang('Drawing'));
		$t->set_var('sublink_gabnr',$GLOBALS['phpgw']->link('/property/list_gabnr.php','sub=p_property'));
		$t->set_var('sublang_gabnr',lang('gabnr'));
		$admin_info = lang('property');

	}
	else
	{
		$t->set_var('sublink_property','');
		$t->set_var('sublang_property','');
	    $t->set_var('sublink_building','');
	    $t->set_var('sublang_building','');
	    $t->set_var('sublink_entrance','');
        $t->set_var('sublang_entrance','');
	    $t->set_var('sublink_apartment','');
        $t->set_var('sublang_apartment','');
	    $t->set_var('sublink_drawing','');
        $t->set_var('sublang_drawing','');
	    $t->set_var('sublink_gabnr','');
        $t->set_var('sublang_gabnr','');

	}

	if ($sub == p_invoice)
	{
		$t->set_var('sub_invoice_list',$phpgw->link('/property/list_invoice.php','sub=p_invoice'));
		$t->set_var('sub_invoice_paid',$phpgw->link('/property/invoice_paid.php','sub=p_invoice'));
		$t->set_var('sub_invoice_powermeter',$phpgw->link('/property/list_power_meter.php','sub=p_invoice'));
		$t->set_var('sub_invoice_consume',$phpgw->link('/property/invoice_consume.php','sub=p_invoice'));
		$t->set_var('sub_invoice_property_value',$phpgw->link('/property/list_property_value.php','sub=p_invoice'));
		$t->set_var('sublang_invoice_list',lang('Invoice'));
		$t->set_var('sublang_invoice_paid',lang('Paid'));
		$t->set_var('sublang_invoice_powermeter',lang('Power meter'));
		$t->set_var('sublang_invoice_consume',lang('consume'));
		$t->set_var('sublang_invoice_property_value',lang('Property value'));
		$t->set_var('tr_color2',$phpgw_info['theme']['row_off']);
		$admin_info = lang('Invoice');
		if ($admin_invoice)
		{
			$t->set_var('sub_invoice_investment_value',$phpgw->link('/property/list_investment_value.php','sub=p_invoice'));
			$t->set_var('sublang_invoice_investment_value',lang('Investment value'));
			$t->set_var('sub_invoice_import',$phpgw->link('/index.php','menuaction=property.uiXport.import&sub=p_invoice'));
			$t->set_var('sublang_invoice_import',lang('Import invoice'));
			$t->set_var('sub_invoice_export',$phpgw->link('/index.php','menuaction=property.uiXport.export&sub=p_invoice'));
			$t->set_var('sublang_invoice_export',lang('Export invoice'));
		}
		else
		{
			$t->set_var('sublang_invoice_investment_value','');
			$t->set_var('sublang_invoice_import','');
			$t->set_var('sublang_invoice_export','');
		}

	}
	else
	{
		$t->set_var('sub_invoice_list','');
		$t->set_var('sub_invoice_paid','');
        $t->set_var('sub_invoice_powermeter','');
		$t->set_var('sublang_invoice_paid','');
		$t->set_var('sub_invoice_consume','');
        $t->set_var('sublang_invoice_list','');
        $t->set_var('sublang_invoice_powermeter','');
		$t->set_var('sublang_invoice_consume','');
		$t->set_var('sub_invoice_investment_value','');
		$t->set_var('sublang_invoice_investment_value','');
		$t->set_var('sublang_invoice_import','');
		$t->set_var('sub_invoice_import','');
		$t->set_var('sublang_invoice_export','');
	}
	if ($sub == p_activity && $admin_activity)
	{
		$t->set_var('sub_activities_list',$phpgw->link('/property/list_activity.php','sub=p_activity'));
		$t->set_var('sub_vendor_activities',$phpgw->link('/property/list_vendors_activities.php','sub=p_activity'));
		$t->set_var('sub_list_agreement',$phpgw->link('/property/list_agreement.php','sub=p_activity'));
		$t->set_var('sublang_activities_list',lang('Activities'));
		$t->set_var('sublang_vendor_activities',lang('Vendors'));
		$t->set_var('sublang_agreement',lang('Agreement'));
		$t->set_var('tr_color2',$phpgw_info['theme']['row_off']);
		$admin_info = lang('Activity');
	}
	else
	{
		$t->set_var('sub_activities_list','');
		$t->set_var('sub_vendor_activities','');
        $t->set_var('sub_list_agreement','');
        $t->set_var('sublang_activities_list','');
        $t->set_var('sublang_vendor_activities','');
        $t->set_var('sublang_agreement','');
	}
	if ($sub == p_workorder)
	{
		$t->set_var('sub_workorder_list',$phpgw->link('/property/list_workorder.php','sub=p_workorder'));
		$t->set_var('sub_workorder_request',$phpgw->link('/property/list_request.php','sub=p_workorder'));
		$t->set_var('sub_workorder_archive',$phpgw->link('/property/list_workorder.php','sub=p_workorder&status=Avsluttet'));
		$t->set_var('sub_workorder_template',$phpgw->link('/property/list_wo_template.php','sub=p_workorder'));
		$t->set_var('sub_workorder_project',$phpgw->link('/property/list_project.php','sub=p_workorder'));
		$t->set_var('sublang_workorder_project',lang('Project'));
		$t->set_var('sublang_workorder_list',lang('Workorder'));
		$t->set_var('sublang_workorder_request',lang('Request'));
		$t->set_var('sublang_workorder_archive',lang('Archive'));
		$t->set_var('sublang_workorder_template',lang('Workorder template'));
		$t->set_var('tr_color2',$phpgw_info['theme']['row_off']);
		$admin_info = lang('Workorder');
		if($admin_workorder)
		{
			$t->set_var('sub_workorder_event',$phpgw->link('/property/list_event.php','sub=p_workorder'));
			$t->set_var('sublang_workorder_event',lang('Event'));
		}
		else
		{
			$t->set_var('sub_workorder_event','');
			$t->set_var('sublang_workorder_event','');
		}
	}
	else
	{
		$t->set_var('sub_workorder_list','');
		$t->set_var('sub_workorder_request','');
        $t->set_var('sub_workorder_archive','');
        $t->set_var('sub_workorder_template','');
        $t->set_var('sub_workorder_project','');
        $t->set_var('sublang_workorder_list','');
        $t->set_var('sublang_workorder_request','');
        $t->set_var('sublang_workorder_archive','');
        $t->set_var('sublang_workorder_template','');
        $t->set_var('sublang_workorder_project','');
		$t->set_var('sub_workorder_event','');
		$t->set_var('sublang_workorder_event','');


	}



	$t->set_var('admin_info',$admin_info);




	$t->pparse('out','property_header');
?>

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us