[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc/class.custom_functions.inc.php, 1.1.2.1
From: |
nomail |
Subject: |
[Phpgroupware-cvs] property/inc/class.custom_functions.inc.php, 1.1.2.1 |
Date: |
Fri, 5 Nov 2004 16:09:49 +0100 |
Update of /property/inc
Added Files:
Branch: proposed-0_9_18-branch
class.custom_functions.inc.php
date: 2004/11/05 15:09:49; author: sigurdne; state: Exp; lines: +125 -0
Log Message:
no message
=====================================================================
<?php
/**************************************************************************\
* phpGroupWare - property
*
* http://www.phpgroupware.org
*
*
*
* Facilities Management
*
* Written by Sigurd Nes [sigurdne at online.no]
*
*
------------------------------------------------------------------------ *
* Copyright 2000 - 2003 Free Software Foundation, Inc
*
* This program is part of the GNU project, see http://www.gnu.org/
*
*
------------------------------------------------------------------------ *
* 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: class.custom_functions.inc.php,v 1.1.2.1 2004/11/05 15:09:49 sigurdne
Exp $ */
class custom_functions
{
var $public_functions = array(
'index' => True
);
function custom_functions ()
{
$GLOBALS['phpgw_info']['flags']['noheader'] = True;
$GLOBALS['phpgw_info']['flags']['nonavbar'] = True;
$GLOBALS['phpgw_info']['flags']['currentapp'] =
'property';
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$this->config =
CreateObject('phpgwapi.config',$this->currentapp);
}
function index($data='')
{
if(is_array($data))
{
$function = $data['function'];
}
else
{
$function =
get_var('function',array('POST','GET'));
}
include(PHPGW_SERVER_ROOT.'/'.'property'.'/inc/custom/'
. $function . '.php');
$custom = new $function;
$custom->$function($data);
}
function select_import_conv($selected='')
{
$dir_handle = @opendir(PHPGW_APP_INC . SEP . 'import');
$i=0; $myfilearray = '';
while ($file = readdir($dir_handle))
{
if ((substr($file, 0, 1) != '.') &&
is_file(PHPGW_APP_INC . SEP . 'import' . SEP . $file) )
{
$myfilearray[$i] = $file;
$i++;
}
}
closedir($dir_handle);
sort($myfilearray);
for ($i=0;$i<count($myfilearray);$i++)
{
$fname = ereg_replace('_',' ',$myfilearray[$i]);
$sel_file = '';
if ($myfilearray[$i]==$selected)
{
$sel_file = 'selected';
}
$conv_list[] = array
(
'id' => $myfilearray[$i],
'name' => $fname,
'selected' => $sel_file
);
}
for ($i=0;$i<count($conv_list);$i++)
{
if ($conv_list[$i]['selected'] != 'selected')
{
unset($conv_list[$i]['selected']);
}
}
return $conv_list;
}
function export($data)
{
$conv_type = $data['conv_type'];
$download = $data['download'];
$pre_transfer = $data['pre_transfer'];
include(PHPGW_SERVER_ROOT.'/'.'property'.'/inc/export/'
. $conv_type);
$invoice = new export_conv;
$buffer = $invoice->overfor($download,$pre_transfer);
return $buffer;
}
function export_cron($data)
{
if($data['enabled']==1)
{
$this->export($data);
}
}
}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc/class.custom_functions.inc.php, 1.1.2.1,
nomail <=