forked from extern/egroupware
using get_var()
This commit is contained in:
parent
4c74f7e463
commit
b56787e6cd
@ -73,16 +73,24 @@
|
||||
|
||||
function import()
|
||||
{
|
||||
if ($_POST['convert'])
|
||||
{
|
||||
$buffer = $this->bo->import($_FILES['tsvfile']['tmp_name'],$_POST['conv_type'],$_POST['private'],$_POST['fcat_id']);
|
||||
$tsvfile = get_var('tsvfile','FILES');
|
||||
$tsvfilename = get_var('tsvfilename','POST');
|
||||
$convert = get_var('convert','POST');
|
||||
$conv_type = get_var('conv_type','POST');
|
||||
$cat_id = get_var('cat_id','POST');
|
||||
$fcat_id = get_var('fcat_id','POST');
|
||||
$private = get_var('private','POST');
|
||||
|
||||
if ($_POST['download'] == '')
|
||||
if($convert)
|
||||
{
|
||||
if($_POST['conv_type'] == 'Debug LDAP' || $_POST['conv_type'] == 'Debug SQL' )
|
||||
$buffer = $this->bo->import($tsvfile['tmp_name'],$conv_type,$private,$fcat_id);
|
||||
|
||||
if($download == '')
|
||||
{
|
||||
if($conv_type == 'Debug LDAP' || $conv_type == 'Debug SQL' )
|
||||
{
|
||||
// filename, default application/octet-stream, length of file, default nocache True
|
||||
$GLOBALS['phpgw']->browser->content_header($_POST['tsvfilename'],'',strlen($buffer));
|
||||
$GLOBALS['phpgw']->browser->content_header($tsvfilename,'',strlen($buffer));
|
||||
echo $buffer;
|
||||
}
|
||||
else
|
||||
@ -102,7 +110,6 @@
|
||||
echo '<a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'). '">'.lang('OK').'</a>';
|
||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -157,9 +164,15 @@
|
||||
|
||||
function export()
|
||||
{
|
||||
if ($_POST['convert'])
|
||||
$convert = get_var('convert','POST');
|
||||
$conv_type = get_var('conv_type','POST');
|
||||
$cat_id = get_var('cat_id','POST');
|
||||
$download = get_var('download','POST');
|
||||
$tsvfilename = get_var('tsvfilename','POST');
|
||||
|
||||
if($convert)
|
||||
{
|
||||
if ($_POST['conv_type'] == 'none')
|
||||
if($conv_type == 'none')
|
||||
{
|
||||
$GLOBALS['phpgw_info']['flags']['noheader'] = False;
|
||||
$GLOBALS['phpgw_info']['flags']['noheader'] = True;
|
||||
@ -171,12 +184,12 @@
|
||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||
}
|
||||
|
||||
$buffer = $this->bo->export($_POST['conv_type'],$_POST['cat_id']);
|
||||
$buffer = $this->bo->export($conv_type,$cat_id);
|
||||
|
||||
if(($_POST['download'] == 'on') || ($_POST['conv_type'] == 'Palm_PDB') )
|
||||
if(($download == 'on') || ($conv_type == 'Palm_PDB') )
|
||||
{
|
||||
// filename, default application/octet-stream, length of file, default nocache True
|
||||
$this->browser->content_header($_POST['tsvfilename'],'application/x-octet-stream',strlen($buffer));
|
||||
$this->browser->content_header($tsvfilename,'application/x-octet-stream',strlen($buffer));
|
||||
echo $buffer;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user