| 73 |
|
|
| 74 |
function import() |
function import() |
| 75 |
{ |
{ |
| 76 |
if ($_REQUEST['convert']) //&& ($_FILES['tsvfile']['error'] == UPLOAD_ERR_OK)) |
$conv_type_a = $GLOBALS['phpgw']->session->appsession('conv_type_values_i', 'addressbook'); |
| 77 |
|
if ($_REQUEST['convert'] && is_array($conv_type_a) && in_array($_REQUEST['conv_type'], $conv_type_a)) //&& ($_FILES['tsvfile']['error'] == UPLOAD_ERR_OK)) |
| 78 |
{ |
{ |
| 79 |
$buffer = $this->bo->import($_FILES['tsvfile']['tmp_name'],$_REQUEST['conv_type'],$_REQUEST['private'],$_REQUEST['fcat_id']); |
$buffer = $this->bo->import($_FILES['tsvfile']['tmp_name'],$_REQUEST['conv_type'],$_REQUEST['private'],$_REQUEST['fcat_id']); |
| 80 |
|
|
| 131 |
$fname = ereg_replace('_',' ',$myfilearray[$i]); |
$fname = ereg_replace('_',' ',$myfilearray[$i]); |
| 132 |
$conv .= '<OPTION VALUE="' . $myfilearray[$i].'">' . $fname . '</OPTION>'; |
$conv .= '<OPTION VALUE="' . $myfilearray[$i].'">' . $fname . '</OPTION>'; |
| 133 |
} |
} |
| 134 |
|
$GLOBALS['phpgw']->session->appsession('conv_type_values_i', 'addressbook', $myfilearray); |
| 135 |
$this->template->set_var('lang_cancel',lang('Cancel')); |
$this->template->set_var('lang_cancel',lang('Cancel')); |
| 136 |
$this->template->set_var('lang_cat',lang('Select Category')); |
$this->template->set_var('lang_cat',lang('Select Category')); |
| 137 |
$this->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); |
$this->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); |
| 174 |
|
|
| 175 |
//$entries = $this->bo->$get_data_function($fields, $this->limit, $this->start, $this->order, $this->sort, '', $criteria); |
//$entries = $this->bo->$get_data_function($fields, $this->limit, $this->start, $this->order, $this->sort, '', $criteria); |
| 176 |
|
|
| 177 |
if ($_REQUEST['convert']) |
$conv_type_a = $GLOBALS['phpgw']->session->appsession('conv_type_values_e', 'addressbook'); |
| 178 |
|
if ($_REQUEST['convert'] && is_array($conv_type_a) && in_array($_REQUEST['conv_type'], $conv_type_a)) |
| 179 |
{ |
{ |
| 180 |
if ($_REQUEST['conv_type'] == 'none') |
if ($_REQUEST['conv_type'] == 'none') |
| 181 |
{ |
{ |
| 250 |
$conv .= ' <option value="'.$myfilearray[$i].'">'.$fname.'</option>'."\n"; |
$conv .= ' <option value="'.$myfilearray[$i].'">'.$fname.'</option>'."\n"; |
| 251 |
} |
} |
| 252 |
|
|
| 253 |
|
$GLOBALS['phpgw']->session->appsession('conv_type_values_e', 'addressbook', $myfilearray); |
| 254 |
$this->template->set_var('lang_cancel',lang('Cancel')); |
$this->template->set_var('lang_cancel',lang('Cancel')); |
| 255 |
$this->template->set_var('lang_cat',lang('Select Category')); |
$this->template->set_var('lang_cat',lang('Select Category')); |
| 256 |
$this->template->set_var('cat_link',$this->cat_option($this->cat_id,False,False)); |
$this->template->set_var('cat_link',$this->cat_option($this->cat_id,False,False)); |