mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-28 08:49:00 +01:00
Add cat selection to export
This commit is contained in:
parent
d8c21b2961
commit
c17201687a
@ -47,10 +47,12 @@
|
|||||||
sort($myfilearray);
|
sort($myfilearray);
|
||||||
for ($i=0;$i<count($myfilearray);$i++) {
|
for ($i=0;$i<count($myfilearray);$i++) {
|
||||||
$fname = ereg_replace('_',' ',$myfilearray[$i]);
|
$fname = ereg_replace('_',' ',$myfilearray[$i]);
|
||||||
$conv .= '<OPTION VALUE="'.$myfilearray[$i].'">'.$fname.'</OPTION>';
|
$conv .= ' <OPTION VALUE="'.$myfilearray[$i].'">'.$fname.'</OPTION>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$t->set_var("lang_cancel",lang("Cancel"));
|
$t->set_var("lang_cancel",lang("Cancel"));
|
||||||
|
$t->set_var("lang_cat",lang("Select Category"));
|
||||||
|
$t->set_var("cat_id",cat_option($cat_id,'ncat_id',True));
|
||||||
$t->set_var("cancel_url",$phpgw->link("/addressbook/index.php"));
|
$t->set_var("cancel_url",$phpgw->link("/addressbook/index.php"));
|
||||||
$t->set_var("navbar_bg",$phpgw_info["theme"]["navbar_bg"]);
|
$t->set_var("navbar_bg",$phpgw_info["theme"]["navbar_bg"]);
|
||||||
$t->set_var("navbar_text",$phpgw_info["theme"]["navbar_text"]);
|
$t->set_var("navbar_text",$phpgw_info["theme"]["navbar_text"]);
|
||||||
@ -88,7 +90,7 @@
|
|||||||
$this->qfields = $this->stock_contact_fields;# + $extrafields;# + $customfields;
|
$this->qfields = $this->stock_contact_fields;# + $extrafields;# + $customfields;
|
||||||
}
|
}
|
||||||
|
|
||||||
$buffer = $this->export_start_file($buffer);
|
$buffer = $this->export_start_file($buffer,$ncat_id);
|
||||||
|
|
||||||
for ($i=0;$i<count($this->ids);$i++) {
|
for ($i=0;$i<count($this->ids);$i++) {
|
||||||
$buffer = $this->export_start_record($buffer);
|
$buffer = $this->export_start_record($buffer);
|
||||||
|
@ -85,14 +85,16 @@
|
|||||||
var $vcard = '';
|
var $vcard = '';
|
||||||
|
|
||||||
// Read full list of user's contacts only to get id's for each
|
// Read full list of user's contacts only to get id's for each
|
||||||
function export_start_file($buffer) {
|
function export_start_file($buffer,$ncat_id='') {
|
||||||
$this->id=-1;
|
$this->id=-1;
|
||||||
|
if ($ncat_id) { $filter = "tid=n,cat_id=".$ncat_id; }
|
||||||
|
else { $filter = "tid=n"; }
|
||||||
// Setup the contact and vcard objects, and the export fields var
|
// Setup the contact and vcard objects, and the export fields var
|
||||||
$this->contacts = CreateObject('phpgwapi.contacts');
|
$this->contacts = CreateObject('phpgwapi.contacts');
|
||||||
$this->vcard = CreateObject("phpgwapi.vcard");
|
$this->vcard = CreateObject("phpgwapi.vcard");
|
||||||
$this->export = $this->vcard->export;
|
$this->export = $this->vcard->export;
|
||||||
|
|
||||||
$tmp = $this->contacts->read();
|
$tmp = $this->contacts->read('','',array('id'=>'id'),'',$filter);
|
||||||
for ($i=0;$i<count($tmp);$i++) {
|
for ($i=0;$i<count($tmp);$i++) {
|
||||||
$this->ids[$i] = $tmp[$i]['id'];
|
$this->ids[$i] = $tmp[$i]['id'];
|
||||||
}
|
}
|
||||||
|
@ -51,10 +51,13 @@
|
|||||||
var $contacts = '';
|
var $contacts = '';
|
||||||
|
|
||||||
// Read full list of user's contacts only to get id's for each
|
// Read full list of user's contacts only to get id's for each
|
||||||
function export_start_file($buffer) {
|
function export_start_file($buffer,$ncat_id='') {
|
||||||
$this->id=-1;
|
$this->id=-1;
|
||||||
|
if ($ncat_id) { $filter = "tid=n,cat_id=".$ncat_id; }
|
||||||
|
else { $filter = "tid=n"; }
|
||||||
$this->contacts = CreateObject('phpgwapi.contacts');
|
$this->contacts = CreateObject('phpgwapi.contacts');
|
||||||
$tmp = $this->contacts->read();
|
|
||||||
|
$tmp = $this->contacts->read('','',array('id'=>'id'),'',$filter);
|
||||||
for ($i=0;$i<count($tmp);$i++) {
|
for ($i=0;$i<count($tmp);$i++) {
|
||||||
$this->ids[$i] = $tmp[$i]['id'];
|
$this->ids[$i] = $tmp[$i]['id'];
|
||||||
}
|
}
|
||||||
|
@ -68,10 +68,13 @@
|
|||||||
// This will store the contacts object
|
// This will store the contacts object
|
||||||
var $contacts = '';
|
var $contacts = '';
|
||||||
|
|
||||||
function export_start_file($buffer) {
|
function export_start_file($buffer,$ncat_id='') {
|
||||||
$this->id=-1;
|
$this->id=-1;
|
||||||
|
if ($ncat_id) { $filter = "tid=n,cat_id=".$ncat_id; }
|
||||||
|
else { $filter = "tid=n"; }
|
||||||
$this->contacts = CreateObject('phpgwapi.contacts');
|
$this->contacts = CreateObject('phpgwapi.contacts');
|
||||||
$tmp = $this->contacts->read();
|
|
||||||
|
$tmp = $this->contacts->read('','',array('id'=>'id'),'',$filter);
|
||||||
for ($i=0;$i<count($tmp);$i++) {
|
for ($i=0;$i<count($tmp);$i++) {
|
||||||
$this->ids[$i] = $tmp[$i]['id'];
|
$this->ids[$i] = $tmp[$i]['id'];
|
||||||
}
|
}
|
||||||
|
@ -63,10 +63,13 @@
|
|||||||
var $contacts = '';
|
var $contacts = '';
|
||||||
|
|
||||||
// Read full list of user's contacts only to get id's for each
|
// Read full list of user's contacts only to get id's for each
|
||||||
function export_start_file($buffer) {
|
function export_start_file($buffer,$ncat_id='') {
|
||||||
$this->id=-1;
|
$this->id=-1;
|
||||||
|
if ($ncat_id) { $filter = "tid=n,cat_id=".$ncat_id; }
|
||||||
|
else { $filter = "tid=n"; }
|
||||||
$this->contacts = CreateObject('phpgwapi.contacts');
|
$this->contacts = CreateObject('phpgwapi.contacts');
|
||||||
$tmp = $this->contacts->read();
|
|
||||||
|
$tmp = $this->contacts->read('','',array('id'=>'id'),'',$filter);
|
||||||
for ($i=0;$i<count($tmp);$i++) {
|
for ($i=0;$i<count($tmp);$i++) {
|
||||||
$this->ids[$i] = $tmp[$i]['id'];
|
$this->ids[$i] = $tmp[$i]['id'];
|
||||||
}
|
}
|
||||||
|
@ -85,10 +85,13 @@
|
|||||||
var $contacts = '';
|
var $contacts = '';
|
||||||
|
|
||||||
// Read full list of user's contacts only to get id's for each
|
// Read full list of user's contacts only to get id's for each
|
||||||
function export_start_file($buffer) {
|
function export_start_file($buffer,$ncat_id='') {
|
||||||
$this->id=-1;
|
$this->id=-1;
|
||||||
|
if ($ncat_id) { $filter = "tid=n,cat_id=".$ncat_id; }
|
||||||
|
else { $filter = "tid=n"; }
|
||||||
$this->contacts = CreateObject('phpgwapi.contacts');
|
$this->contacts = CreateObject('phpgwapi.contacts');
|
||||||
$tmp = $this->contacts->read();
|
|
||||||
|
$tmp = $this->contacts->read('','',array('id'=>'id'),'',$filter);
|
||||||
for ($i=0;$i<count($tmp);$i++) {
|
for ($i=0;$i<count($tmp);$i++) {
|
||||||
$this->ids[$i] = $tmp[$i]['id'];
|
$this->ids[$i] = $tmp[$i]['id'];
|
||||||
}
|
}
|
||||||
|
@ -84,10 +84,13 @@
|
|||||||
var $contacts = '';
|
var $contacts = '';
|
||||||
|
|
||||||
// Read full list of user's contacts only to get id's for each
|
// Read full list of user's contacts only to get id's for each
|
||||||
function export_start_file($buffer) {
|
function export_start_file($buffer,$ncat_id='') {
|
||||||
$this->id=-1;
|
$this->id=-1;
|
||||||
|
if ($ncat_id) { $filter = "tid=n,cat_id=".$ncat_id; }
|
||||||
|
else { $filter = "tid=n"; }
|
||||||
$this->contacts = CreateObject('phpgwapi.contacts');
|
$this->contacts = CreateObject('phpgwapi.contacts');
|
||||||
$tmp = $this->contacts->read();
|
|
||||||
|
$tmp = $this->contacts->read('','',array('id'=>'id'),'',$filter);
|
||||||
for ($i=0;$i<count($tmp);$i++) {
|
for ($i=0;$i<count($tmp);$i++) {
|
||||||
$this->ids[$i] = $tmp[$i]['id'];
|
$this->ids[$i] = $tmp[$i]['id'];
|
||||||
}
|
}
|
||||||
|
@ -8,36 +8,27 @@
|
|||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
<TD>
|
<TD>
|
||||||
<TABLE WIDTH=85%>
|
<FORM ENCTYPE="multipart/form-data" action="{action_url}" method="POST">
|
||||||
<TR>
|
<OL>
|
||||||
<TD><FORM ENCTYPE="multipart/form-data" action="{action_url}" method="post">
|
<LI>Select the type of conversion:
|
||||||
<OL>
|
<SELECT NAME="conv_type">
|
||||||
<LI>Select the type of conversion (Debug will display output in browser.):<BR>
|
<OPTION VALUE="none"><none></OPTION>
|
||||||
<SELECT NAME="conv_type">
|
{conv} </SELECT><P></LI>
|
||||||
<OPTION VALUE="none"><none></OPTION>
|
<LI>{filename}:<INPUT NAME="tsvfilename" VALUE="export.txt"></LI>
|
||||||
{conv}
|
<LI>{lang_cat}:{cat_id}</LI>
|
||||||
</SELECT><P></LI>
|
<LI><INPUT NAME="download" TYPE="checkbox" checked>Download export file (Uncheck to debug output in browser)</LI>
|
||||||
<LI>{filename}:
|
<LI><INPUT NAME="convert" TYPE="submit" VALUE="{download}"></LI>
|
||||||
<INPUT NAME="tsvfilename" VALUE="conversion.txt"></LI>
|
</OL>
|
||||||
<LI><INPUT NAME="download" TYPE="checkbox" checked>Download export file (Uncheck to debug output in browser)</LI>
|
</FORM>
|
||||||
<LI><INPUT NAME="convert" TYPE="submit" VALUE="{download}"></LI>
|
</TD>
|
||||||
</OL>
|
</TR>
|
||||||
</FORM></TD>
|
<TR>
|
||||||
</TR>
|
<TD>
|
||||||
</TABLE>
|
<FORM action="{cancel_url}" method="post">
|
||||||
|
<INPUT type="submit" name="Cancel" value="{lang_cancel}">
|
||||||
|
</FORM>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<tr>
|
|
||||||
<td width="8%">
|
|
||||||
<div align="left">
|
|
||||||
<form action="{cancel_url}" method="post">
|
|
||||||
<input type="submit" name="Cancel" value="{lang_cancel}">
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td width="64%"> </td>
|
|
||||||
<td width="32"> </td>
|
|
||||||
</tr>
|
|
||||||
</TABLE>
|
</TABLE>
|
||||||
</CENTER>
|
</CENTER>
|
||||||
<!-- END import -->
|
<!-- END import -->
|
||||||
|
Loading…
Reference in New Issue
Block a user