{$ADMIN_HEADER}
{php}
require_once INCLUDE_DIR."/datepicker/class/class.oCalendarPicker.php";
$aMonthNames=array(
"FR"=>array("Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"),
"EN"=>array("January","February","March","April","May","June","July","August","September","October","November","December")
);
$aDaysNames=array(
"FR"=>array("Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"),
"EN"=>array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")
);
$sDateFormat=array(
"FR"=>"m/d/Y",
//"EN"=>"m/d/Y"
"EN"=>"Y-m-d"
);
$sDate=(!empty($_GET['sDate']))?$_GET['sDate']:date("Ymd");
{/php}
{literal}
<script language="javascript">
function ShowDateControl(check)
{
var CheckBoxControl = document.getElementById(check);
var DateTable = document.getElementById('tlbDate');
var DivNotes = document.getElementById('divnotes');
var FromDate = document.getElementById('txtBeginDate');
var EndDate = document.getElementById('txtEndDate');
if(CheckBoxControl.checked)
{
DateTable.style.display = 'none';
DivNotes.style.display = 'none';
}
else
{
DateTable.style.display = '';
DivNotes.style.display = '';
FromDate.value = '';
EndDate.value = '';
}
}
function CheckDateDiff(begindate,enddate)
{
var IsRequired = document.getElementById('date_check').checked;
if(!IsRequired)
{
date1 = begindate.replace(/-/g,'');
date2 = enddate.replace(/-/g,'');
if(date1 > date2)
{
alert('Invalid date range.');
return false;
}
else
{
return true;
}
}
else
{
return true;
}
}
</script>
{/literal}
<div id="content" class="setdiv">
{if $msg neq ''}
<div class="errormsg" style="width:290px">
{$msg}
</div>
{/if}
<div id="full-contentdiv">
<div class="righttop">
<h2 align="center">
Export
{if $ShowContent neq ''}
Result
{/if}
</h2>
</div>
<div class="whole-page clear">
<div {if $ShowContent eq ''}style="display:none;"{/if} class="formformat" style="overflow:scroll;width:100%">
{$ShowResult}
</div>
<div class="formformat" {if $ShowContent neq ''}style="display:none"{/if}>
<form name="frmExport" id="frmExport" action="admin_export.php?action=generateCSV" method="post">
<table border="0" cellpadding="0" cellspacing="0" style="width:650px;" align="center">
<tr>
<td class="right-side-text" style="width:250px"><label>
Members Fields
</label>
<div class="FieldLabelNote">
Hold down the Control Key to select multiple fields
</div>
</td>
<td class="left-side-text">
<select id="ddlMemberFields[]" name="ddlMemberFields[]" multiple="multiple" size="10" class="selectcss" style="width:170px">
<option label="Username" value="username" selected="selected">Username</option>
<option label="Password" value="password">Password</option>
<option label="Firstname" value="firstname">Firstname</option>
<option label="Lastname" value="lastname">Lastname</option>
<option label="Email" value="Email">Email</option>
<option label="Country" value="country">Country</option>
<option label="State" value="state">State</option>
<option label="City" value="city">City</option>
<option label="Address" value="address1">Address</option>
<option label="ZipCode" value="zipcode">ZipCode</option>
<option label="Contact" value="phone_main">Contact</option>
<option label="Is Approved" value="isapproved">Is Approved</option>
<option label="Is Lockedout" value="islockedout">Is Lockedout</option>
<option label="Created Date" value="createdon">Created Date</option>
<option label="Modified Date" value="modifiedon">Modified Date</option>
<option label="Shipping Country" value="billing_country">Shipping Country</option>
<option label="Shipping State" value="billing_state">Shipping State</option>
<option label="Shipping City" value="billing_city">Shipping City</option>
<option label="Shipping Address" value="billing_address">Shipping Address</option>
<option label="Shipping ZipCodes" value="billing_zip">Shipping ZipCode</option>
<option label="Shipping Contact" value="billing_phone">Shipping Contact</option>
<option label="Is UnSubscription From Emails" value="isunsubscribedfromemails">Is UnSubscription From Emails</option>
</select>
</td>
</tr>
<tr>
<td class="right-side-text"><label>
Subscriptions Fields
</label>
<div class="FieldLabelNote">
Hold down the Control Key to select multiple fields
</div>
</td>
<td class="left-side-text">
<select id="ddlSubFields[]" name="ddlSubFields[]" multiple="multiple" size="10" class="selectcss" style="width:205px">
<option label="Payment Amount" value="amount" selected="selected">Payment Amount</option>
<option label="From Date" value="fromdate">From Date</option>
<option label="Update Date" value="uptodate">Update Date</option>
<option label="Is Life Time" value="islifetime">Is Life Time</option>
<option label="Paygear eTransaction ID" value="paygear_etransactionid">Paygear eTransaction ID</option>
<option label="Paygear Payment Gateway" value="paygear_paymentgetway">Paygear Payment Gateway</option>
<option label="Paygear Payment Gateway Response" value="paygear_paymentgetwayresponse">Paygear Payment Gateway Response</option>
<option label="Paygear ePayment Status" value="paygear_epaymentstatus">Paygear ePayment Status</option>
<option label="Paygear Vendor Payment Status" value="paygear_vendorpaymentstatus">Paygear Vendor Payment Status</option>
<option label="Paygear Payment Method" value="paygear_paymentmethod">Paygear Payment Method</option>
<option label="Paygear Order ID" value="paygear_orderid">Paygear Order ID</option>
<option label="Paygear Paid On" value="paygear_paidon">Paygear Paid On</option>
</select>
</td>
</tr>
<tr>
<td class="right-side-text"><label>
Records Selection
</label>
<div class="FieldLabelNote">
Hold down the Control Key to select multiple fields
</div>
</td>
<td class="left-side-text">
<select id="ddlRecordSelect[]" name="ddlRecordSelect[]" multiple="multiple" class="selectcss" style="width:205px">
<option label="All subscriptions only" value="any" selected="selected">All subscriptions only</option>
<option label="Active subscriptions only" value="active">Active subscriptions only</option>
<option label="Pending subscriptions only" value="not_completed">Pending subscriptions only</option>
<option label="Expired subscriptions only" value="expired">Expired subscriptions only</option>
</select>
</td>
</tr>
<tr>
<td class="right-side-text"><label>
Date Range
</label>
<div class="FieldLabelNote" id="divnotes" style="display:none">
Choose the beginning and the end of the range
</div>
</td>
<td class="left-side-text">
<input type="checkbox" class="chkcss" value="on" name="date_check" id="date_check" checked="" onclick="ShowDateControl(this.id);"/>All date data<br/>
<table class="borderless" border="0" cellpadding="0" cellspacing="2" id="tlbDate" style="display:none">
<tbody><tr>
<td class="right-side-text"><label>Begin Date :</label></td>
<td class="left-side-text">
<input type="text" class="txtcss" name="txtBeginDate" readonly="" style="float:left" id="txtBeginDate"/>
<input type="button" value='' style='background:url({$ADMIN_IMAGE_DIR}/calendar1.gif) no-repeat;height:20px;width:21px;border:0px;' onclick="displayCalendar(document.forms[0].txtBeginDate,'yyyy/mm/dd',this)">
</td>
</tr>
<tr>
<td class="right-side-text"><label>End Date :</label></td>
<td class="left-side-text">
<input type="text" class="txtcss" name="txtEndDate" readonly="readonly" id="txtEndDate"/>
<input type="button" value='' style='background:url({$ADMIN_IMAGE_DIR}/calendar1.gif) no-repeat;height:20px;width:21px;border:0px;' onclick="displayCalendar(document.forms[0].txtEndDate,'yyyy/mm/dd',this)">
</td>
</tr>
</tbody>
</table>
{*
<div style="float:left;margin:5px;font-weight:bold;clear:both"> To </div>
*}
</td>
</tr>
<tr>
<td class="right-side-text"><label>
Product List
</label>
<div class="FieldLabelNote">
Hold down the Control Key to select multiple fields
</div>
</td>
<td class="left-side-text">
<select id="ddlProductList[]" name="ddlProductList[]" multiple="multiple" class="selectcss" style="width:170px">
{*
<option label="Gold Membership" value="1">Gold Membership</option>
<option label="26 Newsletter Premium Pack" value="2">26 Newsletter Premium Pack</option>
<option label="Gold_Membership" value="3">Gold_Membership</option>
<option label="Peel Opt-in Direct" value="5">Peel Opt-in Direct</option>
<option label="Gold Special" value="6">Gold Special</option>
*}
{foreach from=$ProductList item=ProductListItems}
<option label="{$ProductListItems.name}" value="{$ProductListItems.id}">{$ProductListItems.name}</option>
{/foreach}
</select>
</td>
</tr>
<!--
<tr>
<td class="right-side-text"><label>
Multiple subscriptions
</label>
<div class="FieldLabelNote">
how to handle multiple subscriptions for customer
</div>
</td>
<td class="left-side-text">
<select id="ddlMultipleSub[]" name="ddlMultipleSub[]" class="selectcss" style="width:260px" multiple="multiple">
<option label="Discard additional subscriptions, use first one" value="discard" selected="selected">Discard additional subscriptions, use first one</option>
<option label="Output additional rows for every subscription" value="rows">Output additional rows for every subscription</option>
<option label="Output additional columns for every subscription" value="cols">Output additional columns for every subscription</option>
</select>
</td>
</tr>
-->
<tr>
<td class="right-side-text"><label>
Output File Format
</label>
<div class="FieldLabelNote">
Select what delimited field you wish to use to divide the data
</div>
</td>
<td class="left-side-text">
<div style="float:left;margin-top:3px;">Select what delimited field you wish to use to divide the data</div>
<input type="text" value="," id="txtDelim" name="txtDelim" style="width:15px;" maxlength="1" class="txtcss"><br>
Fields quoted by " if contains delimiter:
<input name="chkquote" id="chkquote" value="1" checked="checked" type="checkbox" class="chkcss"><br>
Export in Excel CSV format
<input name="chksend_file" id="chksend_file" value="1" checked="checked" type="checkbox" class="chkcss"><br>
</td>
</tr>
<tr>
<td/>
<td class="buttontd">
<input type="submit" class="btncss" name="submit" {if $IsEdit eq 'yes'}value="Save"{else}value="Submit"{/if} onclick="return CheckDateDiff(document.getElementById('txtBeginDate').value,document.getElementById('txtEndDate').value)">
<input type="button" class="btncss" name="btnBack" value="Cancel" onclick="window.history.go(-1);">
</td>
</tr>
</table>
</form>
</div>
<script language="JavaScript" type="text/javascript">
//You should create the validator only after the definition of the HTML form
var frmvalidator = new Validator("frmExport");
frmvalidator.EnableMsgsTogether();
//frmvalidator.EnableOnPageErrorDisplaySingleBox();
/*
frmvalidator.addValidation("txtThemeName","req","Please enter theme name.");
frmvalidator.addValidation("txtThemeName","maxlen=45", "Max length for theme name is 45 character.");
frmvalidator.addValidation("txtThemeName","alnum_s","Alphabetic chars only");
frmvalidator.addValidation("txtDescription","req","Please enter theme description.");
frmvalidator.addValidation("txtDescription","maxlen=200","Max length for theme description is 200 character.");
*/
// frmvalidator.addValidation("ddlStatus","dontselect=''","Please select theme status.");
</script>
</div>
</div>
</div>
{$ADMIN_FOOTER}