<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
global $configverssion_id; global $configapp_version; global $userID; global $server; global $LANG; $resellerID = getReseller();
//=== List page stuffs =============
$pag = $page = 1; $setLimit = 20;
if(isset($_GET["page"])) $page = (int)$_GET["page"];
$pageLimit = ($page * $setLimit) - $setLimit; 
if(isset($_GET["pag"])) $pag = (int)$_GET["pag"];
$pageLimit2 = ($pag * $setLimit) - $setLimit; 
$pageurl=$_SERVER['REQUEST_URI']."?";
if(count($_GET)) { $pageurl = $_SERVER['REQUEST_URI'].'&'; }
$trans = array("s=d_o" => "", "s=d_n" => "", "s=r_h" => "", "s=r_l" => "", "s=s_r" => "", "s=s_u" => "", "s=s_q" => "", "s=s_c" => "", "s=s_f" => "", "s=s_p" => "");
$pageurl = strtr($pageurl,$trans);
$pageurl = str_replace('&&','&',$pageurl);
define('TITLE','Settings');
//====End ==============
if(userRole()>1) {
	header('location: index.php');	
}

$today = date('Y-m-d'); $time = strtotime($today.'-1 months'); $lastMonth = date("Y-m", $time); $time = strtotime($today.'-1 years'); $lastYear = date("Y", $time);
?>
<?php
if(isset($_GET['exportd'])) {
	exportToCSV('Vouch_','vouchers','id,pin,credits,cost,used,validity'," WHERE customer_id = '0'");
	exit;
}
if(isset($_POST['action'])) {
  if($_POST['action']=='dvouch') {
	foreach($_POST['bulk'] as $inbid) { 
		mysqli_query($server,"DELETE FROM `vouchers` WHERE `id` = '$inbid' AND customer_id = '0'") or die(mysqli_error($server));
	}	
	logEvent($userID,'Deleted sms vouchers');
	$_SESSION['message'] = $LANG['The selected SMS Voucher(s) has been deleted'];
	header('location: setting?err=0&vouc');
  }
  if($_POST['action']=='delplan') {
	foreach($_POST['bulk'] as $inbid) { 
		mysqli_query($server,"DELETE FROM `sms_plans` WHERE `id` = '$inbid' AND customer_id = '0'") or die(mysqli_error($server));
	}	
	logEvent($userID,'Deleted sms plans');
	$_SESSION['message'] = $LANG['The selected SMS Plan(s) has been deleted'];
	header('location: setting?err=0&pack');
  }
  
}


if(isset($_REQUEST['dgt'])) {
	$tdelete = mysqli_real_escape_string($server,$_REQUEST['dgt']);
	mysqli_query($server,"DELETE FROM `paymentgateways` WHERE id = '$tdelete' AND customer_id = '0'") or die(mysqli_error($server));
	$_SESSION['message'] = $LANG['The selected payment gateway has been deleted'];
	header('location: setting?err=0&pay');
 }
if(isset($_REQUEST['dst'])) {
	$tdelete = mysqli_real_escape_string($server,$_REQUEST['dst']);
	mysqli_query($server,"DELETE FROM `sms_gateways` WHERE id = '$tdelete' AND customer_id = '0'") or die(mysqli_error($server));
	$_SESSION['message'] = $LANG['The selected SMS gateway has been deleted'];
	header('location: setting?err=0&sms');
 } 
 if(isset($_REQUEST['drt'])) {
	$tdelete = mysqli_real_escape_string($server,$_REQUEST['drt']);
	mysqli_query($server,"DELETE FROM `rates` WHERE id = '$tdelete' AND customer_id = '0'") or die(mysqli_error($server));
	$_SESSION['message'] = $LANG['The selected custom rate has been deleted'];
	header('location: setting?err=0&rate');
 }	

if(isset($_GET['set'])) {
?>
<div class="row no-m-t no-m-b">
 	<div class="col s12 m12 l12">
        <div class="card red">
            <div class="card-content white-text"><?=$LANG['You have not completed initial setup yet!']?></div>
        </div>
    </div>
 </div>
<?php } ?> 
<div class="row no-m-t no-m-b">
	<div class="col s12 m12 l12 responsive-tabs">
            
      <h5><?=$LANG['General']?></h5>
      <div class="card card-white <?php if(isset($_GET['gen'])) echo ' responsive-tabs__panel--active'?>">
            <div class="card-content">
                <form action="" method="post" id=",ain-sett" onSubmit="return false;">
                	<div class="row no-m-t no-m-b">   
	                     <div class="col s12 m6 l6">
    	                     <h5><?=$LANG['Branding']?></h5>
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="businessName" type="text" required class="validate" value="<?=getSetting('businessName',$userID)?>">
                                       <label for="businessName"><?=$LANG['Business Name']?></label>
                                 </div>
                             </div>	 
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="companyAddress" type="text" required class="validate" value="<?=getSetting('companyAddress',$userID)?>">
                                       <label for="companyAddress"><?=$LANG['Business Address']?></label>
                                 </div>
                             </div>	 
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="companyEmail" type="email" required class="validate" value="<?=getSetting('companyEmail',$userID)?>">
                                       <label for="companyEmail"><?=$LANG['Support Email']?></label>
                                 </div>
                             </div>	 
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="companyPhone" type="text" required class="validate" value="<?=getSetting('companyPhone',$userID)?>">
                                       <label for="companyPhone"><?=$LANG['Support Phone']?></label>
                                 </div>
                             </div>	
                            <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="companyWebsite" type="url" class="validate" value="<?=getSetting('companyWebsite',$userID)?>">
                                       <label for="companyWebsite"><?=$LANG['Website']?></label>
                                 </div>
                             </div>	 
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="smsSender" type="text" class="validate" required value="<?=getSetting('smsSender',0)?>">
                                       <label for="smsSender"><?=$LANG['Default Sender ID']?></label>
                                 </div>
                             </div>	
                             <div class="row no-m-t no-m-b">
                                <div class="file-field input-field col s12">
                                    <div class="btn light-blue darken-4">
                                        <span><?=$LANG['Signature']?></span>
                                        <input id="files_sign" type="file" name="files_sign" accept="image/*">
                                    </div>
                                    <div class="file-path-wrapper">
                                        <input class="file-path validate" type="text" placeholder="<?=$LANG['Upload Invoice Signature']?>">
                                        <input type="hidden" id="invoiceSignature" value="<?=getSetting('invoiceSignature',$userID)?>">
                                    </div>
                                </div> 
							 </div>	
							<!--------------------------------- -->
                             <br>
                             <h5><?=$LANG['Appearance']?></h5>
                             <div class="row no-m-t no-m-b">
                                <div class="file-field input-field col s12">
                                    <div class="btn light-blue darken-4">
                                        <span><?=$LANG['Background']?></span>
                                        <input id="files_back" type="file" name="files_back" accept="image/*">
                                    </div>
                                    <div class="file-path-wrapper">
                                        <input class="file-path validate" type="text" placeholder="<?=$LANG['Upload Background Image']?>">
                                        <input type="hidden" id="siteBackground" value="<?=getSetting('siteBackground',$userID)?>">
                                    </div>
                                </div> 
							 </div>	
                             
                             <div class="row no-m-t no-m-b">
                                <div class="file-field input-field col s12">
                                    <div class="btn light-blue darken-4">
                                        <span><?=$LANG['Logo']?></span>
                                        <input id="files_logo" type="file" name="files_logo" accept="image/*">
                                    </div>
                                    <div class="file-path-wrapper">
                                        <input class="file-path validate" type="text" placeholder="<?=$LANG['Upload Your Logo']?>">
                                        <input type="hidden" id="siteLogo" value="<?=getSetting('siteLogo',$userID)?>">
                                    </div>
                                </div> 
							 </div>	
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s6"><?=$LANG['Background Color']?></div>
                                 <div class="input-field col s6">
                                       <input id="backgroundColor" type="color" pattern="#[a-f0-9]{6}" value="<?=getSetting('backgroundColor',$userID)?>">
                                 </div>
                             </div>	
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s6"><?=$LANG['Header Color']?></div>
                                 <div class="input-field col s6">
                                       <input id="headerColor" type="color" pattern="#[a-f0-9]{6}" value="<?=getSetting('headerColor',$userID)?>">
                                 </div>
                             </div>	                                       
                            <br>
                            <h5><?=$LANG['Site Settings']?></h5> 
                              <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="defaultCountry" required class="js-states browser-default"  style="width: 100%" >
                                            <?=getCountryList(getSetting('defaultCountry',$userID)) ?>                            
                                       </select>
                                       <label class="active"><?=$LANG['Default Country']?></label>
                                 </div>
                             </div>
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="timeZone" required class="js-states browser-default"  style="width: 100%" >
                                            <?=getTimeZoneList(getSetting('timeZone',$userID)) ?>                            
                                       </select>
                                       <label class="active"><?=$LANG['Default Time Zone']?></label>
                                 </div>
                             </div>
                              <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="defaultCurrency" required class="js-states browser-default"  style="width: 100%" >
                                            <?=getCurrencyList(getSetting('defaultCurrency',$userID)) ?>                            
                                       </select>
                                       <label class="active"><?=$LANG['Default Currency']?></label>
                                 </div>
                             </div>
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="facebook_api" type="text" class="validate" value="<?=getSetting('facebook_api',0)?>" placeholder="<?=$LANG['Leave empty to disable feature']?>">
                                       <label for="facebook_api"><?=$LANG['Facebook App ID']?></label>
                                 </div>
                             </div>
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="facebook_secrete" type="text" class="validate" value="<?=getSetting('facebook_secrete',0)?>" placeholder="<?=$LANG['Leave empty to disable feature']?>">
                                       <label for="facebook_secrete"><?=$LANG['Facebook App Secret']?></label>
                                 </div>
                             </div>

                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="google_recaptcha_sitekey" type="text" class="validate" value="<?=getSetting('google_recaptcha_sitekey',0)?>" placeholder="<?=$LANG['Leave empty to disable feature']?>">
                                       <label for="google_recaptcha_sitekey"><?=$LANG['Google ReCaptcha Key']?></label>
                                 </div>
                             </div>                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="google_recaptcha_secret" type="text" class="validate" value="<?=getSetting('google_recaptcha_secret',0)?>" placeholder="<?=$LANG['Leave empty to disable feature']?>">
                                       <label for="google_recaptcha_secret"><?=$LANG['Google ReCaptcha Secret']?></label>
                                 </div>
                             </div>

                              <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="redirectToSite" required class="validate">
                                            <option value="1" <?php if(getSetting('redirectToSite',$userID)=='1') echo 'selected';?>><?=$LANG['Yes']?></option>
                                            <option value="0" <?php if(getSetting('redirectToSite',$userID)=='0') echo 'selected';?>><?=$LANG['No']?></option>
                                       </select>
                                       <label><?=$LANG['Send customers to website after logout']?></label>
                                 </div>
                              </div>
                              <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="taxAmount" type="text" class="validate" value="<?=getSetting('taxAmount',$userID)?>" placeholder="<?=$LANG['Leave empty or set to Zero to disable']?>">
                                       <label for="taxAmount"><?=$LANG['Invoice Tax (%)']?></label>
                                 </div>
                             </div>
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="vatAmount" type="text" class="validate" value="<?=getSetting('vatAmount',$userID)?>" placeholder="<?=$LANG['Leave empty or set to Zero to disable']?>">
                                       <label for="vatAmount"><?=$LANG['Invoice VAT (%)']?></label>
                                 </div>
                             </div>
                             <br>
                             <!-- end of settings -->
                          </div>
                          
                          <div class="col s12 m6 l6">
    	                     <h5><?=$LANG['Manage Features']?></h5> 
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="affiliateEnabled" required class="validate">
                                            <option value="1" <?php if(getSetting('affiliateEnabled',$userID)=='1') echo 'selected';?>><?=$LANG['Yes']?></option>
                                            <option value="0" <?php if(getSetting('affiliateEnabled',$userID)=='0') echo 'selected';?>><?=$LANG['No']?></option>
                                       </select>
                                       <label><?=$LANG['Enable Affiliates']?></label>
                                 </div>
                              </div>
                              <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="affiliatePayType" required class="validate">
                                            <option value="percent" <?php if(getSetting('affiliatePayType',$userID)=='percent') echo 'selected';?>><?=$LANG['Percentage']?></option>
                                            <option value="fixed" <?php if(getSetting('affiliatePayType',$userID)=='fixed') echo 'selected';?>><?=$LANG['Fixed']?></option>
                                       </select>
                                       <label><?=$LANG['Affiliates Commission Type']?></label>
                                 </div>
                              </div>
                               <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="affiliatePayValue" type="text" class="validate" value="<?=getSetting('affiliatePayValue',$userID)?>">
                                       <label for="affiliatePayValue"><?=$LANG['Commission Value']?></label>
                                 </div>
                             </div>
                             
                              <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="saleContactEnabled" required class="validate">
                                            <option value="1" <?php if(getSetting('saleContactEnabled',$userID)=='1') echo 'selected';?>><?=$LANG['Yes']?></option>
                                            <option value="0" <?php if(getSetting('saleContactEnabled',$userID)=='0') echo 'selected';?>><?=$LANG['No']?></option>
                                       </select>
                                       <label><?=$LANG['Sale Marketing Lists to customers']?></label>
                                 </div>
                              </div>
                             <br> 
                             
                             <h5><?=$LANG['Messaging']?></h5>
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="sendRealTime" type="number" class="validate" value="<?=getSetting('sendRealTime',$userID)?>">
                                       <label for="sendRealTime"><?=$LANG['Max. Recipients to process in real-time']?></label>
                                 </div>
                             </div>
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="sendRate" type="number" class="validate" value="<?=getSetting('sendRate',$userID)?>">
                                       <label for="sendRate"><?=$LANG['Max. Message Per Cron Task']?></label>
                                 </div>
                             </div>
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="dynamicSenderEnabled" required class="validate">
                                            <option value="1" <?php if(getSetting('dynamicSenderEnabled',$userID)=='1') echo 'selected';?>><?=$LANG['Yes']?></option>
                                            <option value="0" <?php if(getSetting('dynamicSenderEnabled',$userID)=='0') echo 'selected';?>><?=$LANG['No']?></option>
                                       </select>
                                       <label><?=$LANG['Enable Dynamic Sender ID']?></label>
                                 </div>
                              </div> 
                             
                             <!-- -->
                              <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="MMSEnabled" required class="validate">
                                            <option value="1" <?php if(getSetting('MMSEnabled',$userID)=='1') echo 'selected';?>><?=$LANG['Yes']?></option>
                                            <option value="0" <?php if(getSetting('MMSEnabled',$userID)=='0') echo 'selected';?>><?=$LANG['No']?></option>
                                       </select>
                                       <label><?=$LANG['Enable MMS Messaging']?></label>
                                 </div>
                              </div> 
                              <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="watsappEnabled" required class="validate">
                                            <option value="1" <?php if(getSetting('watsappEnabled',$userID)=='1') echo 'selected';?>><?=$LANG['Yes']?></option>
                                            <option value="0" <?php if(getSetting('watsappEnabled',$userID)=='0') echo 'selected';?>><?=$LANG['No']?></option>
                                       </select>
                                       <label><?=$LANG['Enable WhatsApp Messaging']?></label>
                                 </div>
                              </div> 
                              <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="unicodeEnabled" required class="validate">
                                            <option value="1" <?php if(getSetting('unicodeEnabled',$userID)=='1') echo 'selected';?>><?=$LANG['Yes']?></option>
                                            <option value="0" <?php if(getSetting('unicodeEnabled',$userID)=='0') echo 'selected';?>><?=$LANG['No']?></option>
                                       </select>
                                       <label><?=$LANG['Enable Unicode Messaging']?></label>
                                 </div>
                              </div> 
                              <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="flashEnabled" required class="validate">
                                            <option value="1" <?php if(getSetting('flashEnabled',$userID)=='1') echo 'selected';?>><?=$LANG['Yes']?></option>
                                            <option value="0" <?php if(getSetting('flashEnabled',$userID)=='0') echo 'selected';?>><?=$LANG['No']?></option>
                                       </select>
                                       <label><?=$LANG['Enable Flash SMS']?></label>
                                 </div>
                              </div> 
                              <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="voiceEnabled" required class="validate">
                                            <option value="1" <?php if(getSetting('voiceEnabled',$userID)=='1') echo 'selected';?>><?=$LANG['Yes']?></option>
                                            <option value="0" <?php if(getSetting('voiceEnabled',$userID)=='0') echo 'selected';?>><?=$LANG['No']?></option>
                                       </select>
                                       <label><?=$LANG['Enable Voice Messaging']?></label>
                                 </div>
                              </div> 
                              <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="2wayEnabled" required class="validate">
                                            <option value="1" <?php if(getSetting('2wayEnabled',$userID)=='1') echo 'selected';?>><?=$LANG['Yes']?></option>
                                            <option value="0" <?php if(getSetting('2wayEnabled',$userID)=='0') echo 'selected';?>><?=$LANG['No']?></option>
                                       </select>
                                       <label><?=$LANG['Enable 2-Way Messaging']?></label>
                                 </div>
                              </div> 
                             <br>
                             <!-- -->
                             
                             <h5><?=$LANG['Outgoing Email Settings']?></h5> 
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="smtpServer" type="text" class="validate" value="<?=getSetting('smtpServer',$userID)?>">
                                       <label for="smtpServer"><?=$LANG['SMTP Server']?></label>
                                 </div>
                             </div>
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="smtpUsername" type="text" class="validate" value="<?=getSetting('smtpUsername',$userID)?>">
                                       <label for="smtpUsername"><?=$LANG['SMTP Username']?></label>
                                 </div>
                             </div>
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="smtpPassword" type="text" class="validate" value="<?=getSetting('smtpPassword',$userID)?>">
                                       <label for="smtpPassword"><?=$LANG['SMTP Password']?></label>
                                 </div>
                             </div>
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="smtpPort" type="text" class="validate" value="<?=getSetting('smtpPort',$userID)?>">
                                       <label for="smtpPort"><?=$LANG['SMTP Port']?></label>
                                 </div>
                             </div>
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="smtpSecurity" required class="validate">
                                            <option value="ssl" <?php if(getSetting('smtpSecurity',$userID)=='ssl') echo 'selected';?>>SSL</option>
                                            <option value="tls" <?php if(getSetting('smtpSecurity',$userID)=='tls') echo 'selected';?>>TLS</option>
                                       </select>
                                       <label><?=$LANG['SMTP Security']?></label>
                                 </div>
                             </div>
                          </div>
                          
                    </div>
                <br>
                <div class="card-action">
                       <button id="cus-button" class="btn green darken-4" type="submit"><i class="fa fa-save"></i> <?=$LANG['Save Settings']?> </button>
                       <span id="cus-spin" class="btn-flat" style="display: none;"><i class="fa fa-spinner fa-spin"></i> <strong><?=$LANG['Please wait']?>...</strong></span>
                 </div>          
                </form>
            </div>
      </div>     
      
      <h5><?=$LANG['SMS/Email Notifications']?></h5>
      <div class="card card-white <?php if(isset($_GET['notic'])) echo ' responsive-tabs__panel--active'?>">
           <div class="card-content">
 <div class="row no-m-t no-m-b">
 	<div class="col s12 m12 l12">
        <div class="card blue-grey">
            <div class="card-content white-text"><?=$LANG['notification_shortcodes']?></div>
        </div>
    </div>
 </div>           
           		<form>
           		<div class="row no-m-t no-m-b">   
                	 <div class="col s12 m6 l6">
    	                    <h5><?=$LANG['Email Notifications']?></h5>
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="newAccountVerifyEmailSubject" type="text" class="validate" value="<?=getSetting('newAccountVerifyEmailSubject',$userID)?>">
                                       <label for="newAccountVerifyEmailSubject"><?=$LANG['Account Verification Email']?> <?=$LANG['Subject']?></label>
                                 </div>
                             </div>
                             <div class="row no-m-t no-m-b">
                                <div class="input-field col s12">
                                      <textarea id="newAccountVerifyEmail" placeholder="<?=$LANG['Account Verification Email']?>" class="materialize-textarea"><?=getSetting('newAccountVerifyEmail',$userID)?></textarea>
                                </div>
                             </div>
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="newAccountEmailSubject" type="text" class="validate" value="<?=getSetting('newAccountEmailSubject',$userID)?>">
                                       <label for="newAccountEmailSubject"><?=$LANG['New Account Welcome Email']?> <?=$LANG['Subject']?></label>
                                 </div>
                             </div>
                             <div class="row no-m-t no-m-b">
                                <div class="input-field col s12">
                                      <textarea id="newAccountEmail" placeholder="<?=$LANG['New Account Welcome Email']?>" class="materialize-textarea"><?=getSetting('newAccountEmail',$userID)?></textarea>
                                </div>
                             </div>
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="newPasswordEmailSubject" type="text" class="validate" value="<?=getSetting('newPasswordEmailSubject',$userID)?>">
                                       <label for="newPasswordEmailSubject"><?=$LANG['Password Reset Email']?> <?=$LANG['Subject']?></label>
                                 </div>
                             </div>
                             <div class="row no-m-t no-m-b">
                                <div class="input-field col s12">
                                      <textarea id="newPasswordEmail" placeholder="<?=$LANG['Password Reset Email']?>" class="materialize-textarea"><?=getSetting('newPasswordEmail',$userID)?></textarea>
                                </div>
                             </div>
                             
                             <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="orderApproveEmailSubject" type="text" class="validate" value="<?=getSetting('orderApproveEmailSubject',$userID)?>">
                                       <label for="orderApproveEmailSubject"><?=$LANG['Order Confirmation Email']?> <?=$LANG['Subject']?></label>
                                 </div>
                             </div>
                             <div class="row no-m-t no-m-b">
                                <div class="input-field col s12">
                                      <textarea id="orderApproveEmail" placeholder="<?=$LANG['Order Confirmation Email']?>" class="materialize-textarea"><?=getSetting('orderApproveEmail',$userID)?></textarea>
                                </div>
                             </div>
                            
                      </div>
                      
                      <div class="col s12 m6 l6">
    	                    <h5><?=$LANG['SMS Notifications']?></h5>
                            <div class="row no-m-t no-m-b">
                                <div class="input-field col s12">
                                      <textarea id="newAccountVerifySMS" class="materialize-textarea" length="960"><?=getSetting('newAccountVerifySMS',$userID)?></textarea>
                                      <label for="newAccountVerifySMS"><?=$LANG['Account Verification SMS']?></label>
                                </div>
                             </div>
                             
                      		<div class="row no-m-t no-m-b">
                                <div class="input-field col s12">
                                      <textarea id="newAccountSMS" class="materialize-textarea" length="960"><?=getSetting('newAccountSMS',$userID)?></textarea>
                                      <label for="newAccountSMS"><?=$LANG['New Account Welcome SMS']?></label>
                                </div>
                             </div>
                             
                             <div class="row no-m-t no-m-b">
                                <div class="input-field col s12">
                                      <textarea id="newPasswordSMS" class="materialize-textarea" length="960"><?=getSetting('newPasswordSMS',$userID)?></textarea>
                                      <label for="newPasswordSMS"><?=$LANG['Password Reset SMS']?></label>
                                </div>
                             </div>
                             
                             <div class="row no-m-t no-m-b">
                                <div class="input-field col s12">
                                      <textarea id="orderApproveSMS" class="materialize-textarea" length="960"><?=getSetting('orderApproveSMS',$userID)?></textarea>
                                      <label for="orderApproveSMS"><?=$LANG['Order Confirmation SMS']?></label>
                                </div>
                             </div>
                      </div>       
                </div>
                <br>
                <div class="card-action">
                    <button id="not-button" class="btn green darken-4" type="submit"><i class="fa fa-save"></i> <?=$LANG['Save Settings']?> </button>
                    <span id="not-spin" class="btn-flat" style="display: none;"><i class="fa fa-spinner fa-spin"></i> <strong><?=$LANG['Please wait']?>...</strong></span>
                </div> 
                </form>             
            </div>
       </div>
                
      <h5><?=$LANG['SMS Rates']?></h5>
      <div class="card invoices-card <?php if(isset($_GET['rate'])) echo ' responsive-tabs__panel--active'?>">
      		<div class="row no-m-t no-m-b show-text">
                    <div class="col s12 m12 l12">
                        <div class="card black">
                           <div class="card-content white-text"><?=$LANG['rate_notes']?><br>
                           <a class='waves-effect waves-light btn teal accent-4 white-text' href="#" onclick="$('#import_rate').show('slow');"><i class="fa fa-file"></i> <?=$LANG['Import Rates From Excel']?></a>
                           </div>
                        </div>
                    </div>
                 </div>
                 
            <div class="card-content">
            	<div class="row no-m-t no-m-b">   
                
                     <div class="col s12 m6 l7">
                          <h5><?=$LANG['SMS Rates']?></h5> 
                     <?php
                    $query="SELECT * FROM rates WHERE reseller_id = '0' AND customer_id = 0 ORDER BY id DESC";
					$result = mysqli_query($server,$query) or die(mysqli_error($server));
					$x = mysqli_num_rows($result);
                    if($x < 1) {
                    ?><table>	   
                      <div class="col s12 m12 l12">
                            <div class="card blue lighten-5">
                                <div class="card-content">
                                     <h3 class="center-align"><i class="fa fa-exclamation-circle"></i></h3>
                                     <h5 class="center-align"><?=$LANG['You have not created any SMS rates']?></h5>
                                </div>
                            </div>
                        </div>
                       </table> 
                      <?php } else { ?>  
                      <table class="responsive-table bordered">
                          <thead>
                            <tr>
                                <th data-field="ref"><?=$LANG['Type']?></th>
                                <th data-field="date"><?=$LANG['Country']?></th>
                                <th data-field="credit"><?=$LANG['Operator Prefix']?></th>
                                <th data-field="status"><?=$LANG['Rate']?></th>
                                <th data-field="act"></th>
                             </tr>
                          </thead>
                          <tbody>
                          <?php
                        while ($rows = mysqli_fetch_assoc($result)) { 
						$link = '';
						$gateway = '';
						$operator = $rows['operator_code'];
						$country = countryName(getCountryByCode($rows['country_code']));
						if($rows['gateway_id'] < 1)	$gateway = $LANG['All'];
						if($rows['operator_code'] < 1)	$operator = $LANG['Any Operator'];
						if($rows['country_code'] < 1)	$country = $LANG['All'];
						if($rows['type']=='sms') $rows['type'] = 'text'
						?>
                             <tr>
                               	 <td><?=strtoupper($rows['type'])?></td>
                                 <td><?=$country?> </td>
                                 <td><?=$operator?></td>
                                 <td><?=userCurrencySymbol($userID).number_format($rows['rate'],4)?></td>
                                  <td><a class="hoverable red-text" onclick="return confirm('<?=$LANG['delete_confirm']?>');" href="setting?drt=<?=$rows['id']?>"><?=$LANG['Delete']?></a></td>
                             </tr>
                       <?php } ?>   
                          </tbody>
                      </table>
                      <?php } ?>
                      <br><br>
                     </div>
                
                     <div class="col s12 m6 l5 yellow lighten-5" style="border:1px solid black">
                          <form action="" method="post" id="credit-form" onSubmit="return false;">
                          	<h5><?=$LANG['Add New SMS Rate']?></h5> 
                            <div class="col s12 m12 l12">
                                <div class="card blue lighten-5">
                                    <div class="card-content"><?=$LANG['rate_tip']?></div>
                                </div>
                            </div>
                          	<div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <select id="type" required class="validate">
                                        <option value="sms"><?=$LANG['Text Message']?></option>
                                        <?php if(getSetting('unicodeEnabled',0)>0){?>
                                        <option value="unicode" ><?=$LANG['Unicode Message']?></option>
                                        <?php }?>
                                        <?php if(getSetting('voiceEnabled',0)>0){?>
                                        <option value="voice" ><?=$LANG['Voice Message']?></option>
                                        <?php } ?>
                                        <?php if(getSetting('watsappEnabled',0)>0){?>
                                        <option value="whatsapp" ><?=$LANG['WhatsApp Message']?></option>
                                        <?php } ?>
                                        <?php if(getSetting('mmsEnabled',0)>0){?>
                                        <option value="mms" ><?=$LANG['Multimedia Message']?></option>
                                        <?php } ?>
                                        <?php if(getSetting('flashEnabled',0)>0){?>
                                        <option value="flash" ><?=$LANG['Flash Message']?></option>
                                        <?php } ?>
                                   </select>
                                   <label><?=$LANG['Rate for']?></label>
                             </div>
                           </div>                      
                           <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <select id="country_code" required class="js-states browser-default"  style="width: 100%" >
                                       		<option value="0" ><?=$LANG['All Countries']?></option>
                                            <?=getCountryList('') ?>                            
                                       </select>
                                       <label class="active"><?=$LANG['Country']?></label>
                                 </div>
                             </div>
                           <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="operator_code" type="number" class="validate" value="" placeholder="Eg. 803 for MTN Nigeria, 82 for Vodaconn South-Africa" >
                                       <label for="operator_code"><?=$LANG['Operator Prefix']?></label>
                                 </div>
                            </div>
                            <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="rate" type="text" class="validate" required value="">
                                       <label for="rate"><?=$LANG['Rate']?> (<?=userCurrencyCode($userID)?>)</label>
                                 </div>
                            </div>
                           <div class="card-action">
                                <input id="customer_id2" value="0" type="hidden" >
                                <input id="gateway" value="0" type="hidden" >
                                <button id="rate-button" class="btn green darken-4" type="submit"><i class="fa fa-save"></i> <?=$LANG['Save Rate']?> </button>
                                <span id="rate-spin" class="btn-flat" style="display: none;"><i class="fa fa-spinner fa-spin"></i> <strong><?=$LANG['Please wait']?>...</strong></span>
                           </div>
                        </form>
                     </div>
                     
				</div>                
            </div>
      </div>  
      
      <h5><?=$LANG['SMS Plans']?></h5>
      <div class="card card-white <?php if(isset($_GET['pack'])) echo ' responsive-tabs__panel--active'?>">
           <div class="card-content">
            	<div class="card-title">
                 <div class="row no-m-t no-m-b">
                 	<div class="input-field col s12 m12 l12" >
                 	  <div class="switch m-b-md">
                    	 <label id="sch_swit" class="black-text"><?=$LANG['Disable SMS Plans']?> <input <?php if(getSetting('useSMSPackage',$userID)>0) { echo 'checked';} ?> type="checkbox" id="useSMSPackage"><span class="lever"></span><?=$LANG['Enable SMS Plans']?></label>
                   	  </div>
                    </div>
                 </div>
                </div>
                        
                <div class="row no-m-t no-m-b right"> 
                	<a class='waves-effect waves-light btn teal accent-4 white-text' href="#" onclick="$('#add_plan_pop').show('slow');"><i class="fa fa-plus-circle"></i> <?=$LANG['Create New Plan']?></a>
                    <a class='waves-effect waves-light btn red white-text'  href="#" onclick="bulkaction2('delplan','inbox-form2','<?=$LANG['delete_confirm']?>');"> <i class="fa fa-trash"></i> <?=$LANG['Delete Selected']?></a>
                </div>             	
                <div class="row no-m-t no-m-b">   
                     <div class="col s12 m12 l12">
                          <h5><?=$LANG['SMS Plans']?></h5> 
                    <?php
                    $query="SELECT * FROM sms_plans WHERE customer_id = '0' ORDER BY id DESC limit $pageLimit2,$setLimit";
					$result = mysqli_query($server,$query) or die(mysqli_error($server));
					$x = mysqli_num_rows($result);
                    if($x < 1) {
                    ?><table>	   
                      <div class="col s12 m12 l12">
                            <div class="card blue lighten-5">
                                <div class="card-content">
                                     <h3 class="center-align"><i class="fa fa-exclamation-circle"></i></h3>
                                     <h5 class="center-align"><?=$LANG['You have not created any SMS plans']?></h5>
                                </div>
                            </div>
                        </div>

                       </table> 
                      <?php } else { ?>  
                      <table class="responsive-table bordered">
                          <thead>
                            <tr>
                            	<th><input type="checkbox" class="filled-in" id="selectall2" /><label for="selectall2"></label></th>
                                <th data-field="ref"><?=$LANG['Plan']?></th>
                                <th data-field="date"><?=$LANG['Credits']?></th>
                                <th data-field="credit"><?=$LANG['Price']?></th>
                                <th data-field="valid"><?=$LANG['Validity']?></th>
                             </tr>
                          </thead>
                          <tbody>
                          <form action="setting?pack" method="post" id="inbox-form2">
                    	<input type="hidden" id="bulkaction2" name="action" value=""/>
                          <?php
                        while ($rows = mysqli_fetch_assoc($result)) { 
						$validity = $LANG['Life-time'];
						if($rows['validity'] > 0)	$validity = $rows['validity'].' '.$LANG['Day(s)'];
						?>
                             <tr>
                                 <td><input type="checkbox" class="filled-in bulk2" id="bulk<?=$rows['id']?>" value="<?=$rows['id']?>" name="bulk[<?=$rows['id']?>]"/> <label for="bulk<?=$rows['id']?>"></label></td> 

                               	 <td><?=$rows['title']?></td>
                                 <td><?=userCurrencySymbol($userID).number_format(toUserCurrency($rows['credits'],$userID,getSetting('defaultCurrency')),4)?></td>
                                 <td><?=userCurrencySymbol($userID).number_format(toUserCurrency($rows['price'],$userID,getSetting('defaultCurrency')),4)?></td>
                                 <td><?=$validity?> </td>
                             </tr>
                       <?php } ?>   
                       		</form>
                          </tbody>
                      </table>
                      <?php } ?>
                      <div class="col s12 m12 l12" style="margin-top: 5px;">
                          <?php displayPagination2($setLimit,$pag,$query,'pack');  ?>
                      </div>
                     </div>
                     
				</div>
            </div>
      </div>  
      
      <h5><?=$LANG['SMS Vouchers']?></h5>
      <div class="card card-white <?php if(isset($_GET['vouc'])) echo ' responsive-tabs__panel--active'?>">
           <div class="card-content">
            	<div class="card-title">
                 <div class="row no-m-t no-m-b">
                 	<div class="input-field col s12 m12 l12" >
                 	  <div class="switch m-b-md">
                    	 <label id="sch_swit2" class="black-text"><?=$LANG['Disable SMS Vouchers']?> <input <?php if(getSetting('useSMSVoucher',$userID)>0) { echo 'checked';} ?> type="checkbox" id="useSMSVoucher"><span class="lever"></span><?=$LANG['Enable SMS Vouchers']?></label>
                   	  </div>
                    </div>
                 </div>
                </div>
                <div class="row no-m-t no-m-b right"> 
                	<a class='waves-effect waves-light btn teal accent-4 white-text' href="#" onclick="$('#add_vouc_pop').show('slow');"><i class="fa fa-plus-circle"></i> <?=$LANG['Generate Vouchers']?></a>
                    <a class='waves-effect waves-light btn red white-text'  href="#" onclick="bulkaction('dvouch','inbox-form','<?=$LANG['delete_confirm']?>');"> <i class="fa fa-trash"></i> <?=$LANG['Delete Selected']?></a>
                    <a class='waves-effect waves-light btn green white-text' href='setting?exportd&vouc'><i class="fa fa-file-excel-o"></i> Export</a>
                </div>
             	
                <div class="row no-m-t no-m-b">   
                     <div class="col s12 m12 l12">
                          <h5><?=$LANG['SMS Vouchers']?></h5> 
                      <?php
                    $query="SELECT * FROM vouchers WHERE customer_id = '0' ORDER BY id DESC limit $pageLimit,$setLimit";
					$result = mysqli_query($server,$query) or die(mysqli_error($server));
					$x = mysqli_num_rows($result);
                    if($x < 1) {
                    ?><table>	   
                      <div class="col s12 m12 l12">
                            <div class="card blue lighten-5">
                                <div class="card-content">
                                     <h3 class="center-align"><i class="fa fa-exclamation-circle"></i></h3>
                                     <h5 class="center-align"><?=$LANG['You have not created any Vouchers yet']?></h5>
                                </div>
                            </div>
                        </div>
                       </table> 
                      <?php } else { ?>  
                      <table class="responsive-table bordered">
                          <thead>
                            <tr>
                            	<th><input type="checkbox" class="filled-in" id="selectall" /><label for="selectall"></label></th>
                                <th data-field="ref"><?=$LANG['PIN']?></th>
                                <th data-field="date"><?=$LANG['Credits']?></th>
                                <th data-field="credit"><?=$LANG['Price']?></th>
                                <th data-field="valid"><?=$LANG['Validity']?></th>
                                <th data-field="status"><?=$LANG['Status']?></th>
                             </tr>
                          </thead>
                          <tbody>
                          <form action="setting?vouc" method="post" id="inbox-form">
                    	<input type="hidden" id="bulkaction" name="action" value=""/>
                          <?php
                        while ($rows = mysqli_fetch_assoc($result)) { 
						$validity = $LANG['Life-time'];
						$status = $LANG['Unused'];
						if($rows['validity'] > 0)	$validity = $rows['validity'].' '.$LANG['Day(s)'];
						if($rows['used'] > 0)	$status = $LANG['Used'];
						?>
                             <tr>
                                 <td><input type="checkbox" class="filled-in bulk" id="bulk<?=$rows['id']?>" value="<?=$rows['id']?>" name="bulk[<?=$rows['id']?>]"/> <label for="bulk<?=$rows['id']?>"></label></td> 

                               	 <td><!--<?=substr($rows['pin'],0,-12) . '*****'?>-->
                                 <?=$rows['pin']?></td>
                                 <td><?=userCurrencySymbol($userID).number_format(toUserCurrency($rows['credits'],$userID,getSetting('defaultCurrency')),4)?></td>
                                 <td><?=userCurrencySymbol($userID).number_format(toUserCurrency($rows['cost'],$userID,getSetting('defaultCurrency')),4)?></td>
                                 <td><?=$validity?> </td>
                                 <td><?=$status?></td>
                             </tr>
                       <?php } ?>   
                       		</form>
                          </tbody>
                      </table>
                      <?php } ?>
                      <div class="col s12 m12 l12" style="margin-top: 5px;">
                          <?php displayPagination($setLimit,$page,$query,'vouc');  ?>
                      </div>
                         
                     </div>
				</div>
                
            </div>
      </div>  
	</div>
</div>

<!--  //Popups  ---->
 <!--add rates -->
<div id="add_vouc_pop" style="display: none; overflow-x: hidden; width: 99.99%; height: 99.99%; z-index: 1000; position: fixed; top: 0; left: 0; background: rgba(0,0,0,0.7);">
   	 <div class="row"><br><br>
       	<div class="col s1 m2 l3"> </div>
        <div class="col s10 m8 l6 white"> 
             <h5><?=$LANG['Generate Vouchers']?> <span class="right"><a href="#" class="red-text" onclick="$('#add_vouc_form')[0].reset();$('#add_vouc_pop').hide('slow');"><i class="fa fa-times"></i></a></span></h5>
             <div class="card ">
                 <div class="card-content">
                 	<form action="" method="post" id="add_vouc_form" onSubmit="return false;">
                         <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <select id="quantity" required class="validate">
                                        <option value="1">1 <?=$LANG['Voucher']?></option>
                                        <option value="5">5 <?=$LANG['Vouchers']?></option>
                                        <option value="10">10 <?=$LANG['Vouchers']?></option>
                                        <option value="20">20 <?=$LANG['Vouchers']?></option>
                                        <option value="50">50 <?=$LANG['Vouchers']?></option>
                                        <option value="75">75 <?=$LANG['Vouchers']?></option>
                                        <option value="100">100 <?=$LANG['Vouchers']?></option>
                                   </select>
                                   <label><?=$LANG['Quantity']?></label>
                             </div>
                           </div>                      
                           
                           <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="credit" type="text" class="validate" required value="" >
                                       <label for="credit"><?=$LANG['Credits']?> (<?=userCurrencyCode($userID)?>)</label>
                                 </div>
                            </div>
                            <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="cost" type="text" class="validate" required value="">
                                       <label for="cost"><?=$LANG['Cost']?> (<?=userCurrencyCode($userID)?>)</label>
                                 </div>
                            </div>
                            <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="validity" type="number" class="validate" required value="" placeholder="<?=$LANG['validity_tip']?>" >
                                       <label for="validity"><?=$LANG['Validity in Days']?></label>
                                 </div>
                            </div>
                           <div class="card-action">
                                <button id="vouch-button" class="btn green darken-4" type="submit"><i class="fa fa-save"></i> <?=$LANG['Save Rate']?> </button>
                                <span id="vouch-spin" class="btn-flat" style="display: none;"><i class="fa fa-spinner fa-spin"></i> <strong><?=$LANG['Please wait']?>...</strong></span>
                            <a class="btn waves-effect waves-light red" href="#" onclick="$('#add_vouc_form')[0].reset();$('#add_vouc_pop').hide('slow');"><i class="fa fa-times"></i> <?=$LANG['Cancel']?></a>
                           </div>
                        </form>
                 </div>
              </div>
        </div>      
        <div class="col s1 m2 l3"> </div>  
     </div>
</div>  

 <!--add rates -->
<div id="add_plan_pop" style="display: none; overflow-x: hidden; width: 99.99%; height: 99.99%; z-index: 1000; position: fixed; top: 0; left: 0; background: rgba(0,0,0,0.7);">
   	 <div class="row"><br><br>
       	<div class="col s1 m2 l3"> </div>
        <div class="col s10 m8 l6 white"> 
             <h5><?=$LANG['Add New SMS Plan']?> <span class="right"><a href="#" class="red-text" onclick="$('#add_plan_form')[0].reset();$('#add_plan_pop').hide('slow');"><i class="fa fa-times"></i></a></span></h5>
            
             <div class="card ">
                 <div class="card-content">
                 	<form action="" method="post" id="add_plan_form" onSubmit="return false;">
                        	<div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="name" type="text" class="validate" required value="" >
                                       <label for="name"><?=$LANG['Title']?></label>
                                 </div>
                            </div>                    
                           
                           <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="credit2" type="text" class="validate" required value="" >
                                       <label for="credit2"><?=$LANG['Credits']?> (<?=userCurrencyCode($userID)?>)</label>
                                 </div>
                            </div>
                            <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="cost2" type="text" class="validate" required value="">
                                       <label for="cost2"><?=$LANG['Price']?> (<?=userCurrencyCode($userID)?>)</label>
                                 </div>
                            </div>
                            <div class="row no-m-t no-m-b">
                                 <div class="input-field col s12">
                                       <input id="validity2" type="number" class="validate" required value="" placeholder="<?=$LANG['validity_tip']?>" >
                                       <label for="validity2"><?=$LANG['Validity in Days']?></label>
                                 </div>
                            </div>
                            
                           <div class="card-action">
                                <button id="plan-button" class="btn green darken-4" type="submit"><i class="fa fa-save"></i> <?=$LANG['Save Rate']?> </button>
                                <span id="plan-spin" class="btn-flat" style="display: none;"><i class="fa fa-spinner fa-spin"></i> <strong><?=$LANG['Please wait']?>...</strong></span>
                            <a class="btn waves-effect waves-light red" href="#" onclick="$('#add_plan_form')[0].reset();$('#add_plan_pop').hide('slow');"><i class="fa fa-times"></i> <?=$LANG['Cancel']?></a>
                           </div>
                        </form>
                 </div>
              </div>
        </div>      
        <div class="col s1 m2 l3"> </div>
     </div>
</div>           

<!--import_rate -->
 <div id="import_rate" style="display: none;overflow-x: hidden; width: 99.99%; height: 99.99%; z-index: 1000; position: fixed; top: 0; left: 0; background: rgba(0,0,0,0.7);">
   	 <div class="row"><br><br>
       	<div class="col s1 m2 l2"> </div>
           <div class="col s10 m8 l8 white"> 
             <h5><?=$LANG['Import Rates From Excel']?> <span class="right"><a href="#" class="red-text" onclick="$('#import_rate_form')[0].reset();$('#import_rate').hide('slow');"><i class="fa fa-times"></i></a></span></h5>
             <div class="card ">
                 <div class="card-content">
                    <form method="post" id="import_rate_form"  onSubmit="return false;">
                    <div class="row">
                      	<div class="row no-m-t no-m-b">
                            <div class="col s12 m12 l12">
                                <div class="card grey lighten-5 ">
                                    <div class="card-content black-text"><?=$LANG['upload_rates_tip']?><br>
                                    <a href="files/sample4.xls" class="btn cyan darken-4"><?=$LANG['download_sample']?></a></div>
                                </div>
                            </div>
                         </div>	
                         <div class="file-field input-field col s12">
                            <div class="btn light-blue darken-4">
                                <span><i class="fa fa-cloud-upload"></i></span>
                                <input id="files_raten" type="file" name="files" accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
                            </div>
                            <div class="file-path-wrapper">
                                <input class="file-path validate" type="text" placeholder="<?=$LANG['Upload an Excel or CSV file']?>">
                                <input type="hidden" id="files_holderR">
                           </div>
                         </div> 
                      </div>  
                       <div class="card-action">
                            <button id="impr-button" class="btn ight-blue darken-4" type="submit"><?=$LANG['Import Rates']?> </button>
                            <span id="impr-spin" class="btn-flat" style="display: none;"><i class="fa fa-spinner fa-spin"></i> <strong><?=$LANG['Please wait']?>...</strong></span>
                             <span id="upload-spin" class="btn-flat" style="display: none;"><i class="fa fa-spinner fa-spin"></i> <strong><?=$LANG['Uploading your files']?> <span id="progress-wrp">0%</span>...</strong></span>
                            <a class="btn waves-effect waves-light red" href="#" onclick="$('#import_rate_form')[0].reset();$('#import_rate').hide('slow');"><?=$LANG['Cancel']?></a>
                       </div>
                    </form>
                 </div>
             </div>
           </div>
       <div class="col s1 m2 l2"> </div>
	 </div>
 </div>          
