[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] sync/inc/class.ui_outlook_import.inc.php, 1.1
From: |
nomail |
Subject: |
[Phpgroupware-cvs] sync/inc/class.ui_outlook_import.inc.php, 1.1 |
Date: |
Tue, 13 Jul 2004 20:24:30 +0200 |
Update of /sync/inc
Added Files:
Branch:
class.ui_outlook_import.inc.php
date: 2004/07/13 18:24:30; author: mkaemmerer; state: Exp;
Log Message:
- update
=====================================================================
<?php
/**
* vCard import and synchronizsation (oneway outlook to phpGW) plugin
*
* @author Markus Kämmerer <address@hidden>
* @copyright Copyright (C) 2004 Free Software Foundation http://www.fsf.org/
* @license http://www.fsf.org/licenses/gpl.html GNU General Public License
* @package sync
* @subpackage so
* @version $Id: class.ui_outlook_import.inc.php,v 1.1 2004/07/13 18:24:30
mkaemmerer Exp $
*/
/**
* @package sync
*/
class ui_outlook_import
{
var $template;
var $public_functions = array(
'import' => True,
);
var $cat;
function ui_outlook_import()
{
$this->template = $GLOBALS['phpgw']->template;
$this->cat = CreateObject('phpgwapi.categories');
$this->browser = CreateObject('phpgwapi.browser');
}
/* Return a select form element with the categories option
dialog in it */
function
cat_option($cat_id='',$notall=False,$java=True,$multiple=False)
{
if ($java)
{
$jselect = ' onChange="this.form.submit();"';
}
/* Setup all and none first */
$cats_link = "\n" .'<select
name="fcat_id'.($multiple?'[]':'').'"' .$jselect . ($multiple ? 'multiple
size="3"' : '') . ">\n";
if (!$notall)
{
$cats_link .= '<option value=""';
if ($cat_id=='all')
{
$cats_link .= ' selected';
}
$cats_link .= '>'.lang('all').'</option>'."\n";
}
/* Get global and app-specific category listings */
$cats_link .=
$this->cat->formated_list('select','all',$cat_id,True);
$cats_link .= '</select>'."\n";
return $cats_link;
}
function import()
{
if ($_REQUEST['convert'])
{
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
$bo = CreateObject('sync.bo_outlook_import');
$bo->sync(stripslashes($_REQUEST['tsvfile']),
$_REQUEST['fcat_id']);
}
else
{
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
set_time_limit(0);
$this->template->set_file(array('import' =>
'import.tpl'));
$this->template->set_var('lang_cancel',lang('Cancel'));
$this->template->set_var('lang_cat',lang('Select Category'));
$this->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/index.php','menuaction=sync.ui_sync.init'));
$this->template->set_var('navbar_bg',$GLOBALS['phpgw_info']['theme']['navbar_bg']);
$this->template->set_var('navbar_text',$GLOBALS['phpgw_info']['theme']['navbar_text']);
$this->template->set_var('import_text','Outlook
vCard Sync');
$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=sync.ui_outlook_import.import'));
$this->template->set_var('cat_link',$this->cat_option($this->cat_id,False,False));
$this->template->set_var('tsvfilename','');
$this->template->set_var('debug',lang('Debug
output in browser'));
$this->template->set_var('filetype',lang('LDIF'));
$this->template->set_var('download',lang('Submit'));
$this->template->set_var('start',$this->start);
$this->template->set_var('sort',$this->sort);
$this->template->set_var('order',$this->order);
$this->template->set_var('filter',$this->filter);
$this->template->set_var('query',$this->query);
$this->template->set_var('cat_id',$this->cat_id);
$this->template->pparse('out','import');
}
}
}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sync/inc/class.ui_outlook_import.inc.php, 1.1,
nomail <=