<?php

//////////////////////////////////////////////////////////////
//===========================================================
// import_theme.php
//===========================================================
// SOFTACULOUS 
// Version : 1.1
// Inspired by the DESIRE to be the BEST OF ALL
// ----------------------------------------------------------
// Started by: Alons
// Date:       10th Jan 2009
// Time:       21:00 hrs
// Site:       http://www.softaculous.com/ (SOFTACULOUS)
// ----------------------------------------------------------
// Please Read the Terms of use at http://www.softaculous.com
// ----------------------------------------------------------
//===========================================================
// (c)Softaculous Inc.
//===========================================================
//////////////////////////////////////////////////////////////

if(!defined('SOFTACULOUS')){

	die('Hacking Attempt');

}

function import_export_theme(){

global $theme, $globals, $user, $l, $error, $updated, $info, $report, $allusers, $imported;

softheader(__('$0 - Import Export Settings', array(APP)));

echo '<div class="container-fluid">
	<div class="container my-4">
		<div class="sai-page-title text-center">
			<h2>'.__('Import / Export Settings').'</h2>
		</div>
	</div>		
</div>';

error_handle($error);

if(!empty($imported)){
	echo '<div class="container-fluid width80">
			<div class="alert alert-success"><i class="fas fa-check sai_icons mr-2"></i>
			'.__('Settings successfully imported').'</div>
		</div>';
}

echo '<form accept-charset="'.$globals['charset'].'" name="importexport" method="post" action="" enctype="multipart/form-data" class="form-horizontal">
	<div class="container-fluid">
		<div class="row">
			<div class="col-12 col-lg-6">
				<div class="sai-card p-3 mb-3">
					<div class="sai_main_head">
						<h2 class="sai-heading mb-2">'.__('Import Settings').'</h2>
						<hr class = "sai_main_head_hr"/>
					</div>
					<div class="form-group">
						<p class="sai_exp2">'.__('Import the $0 settings using the previously exported file. <br /> (<b>Note</b> : It will replace your current settings)', array(APP)).'</p>
						<input type="file" name="import_file" class="d-block mb-2"/>
						<input type="submit" name="import_setting" value="'.__('Import Settings').'" class="flat-butt mt-2"/>
					</div>
				</div>			
			</div>
			<div class="col-12 col-lg-6">
				<div class="sai-card p-3 mb-3">
					<div class="sai_main_head">
						<h2 class="sai-heading mb-2">'.__('Export Settings').'</h2>
						<hr class = "sai_main_head_hr"/>
					</div>
					<div class="form-group">
						<span class="sai_exp2">'.__('Export the $0 settings that you can use to import in future or replicate over multiple servers.', array(APP)).'</span>
						<button class="flat-butt d-block my-3"><a href="'.$globals['ind'].'act=import_export&download=softaculous_settings.zip" class="text-decoration-none text-white">'.__('Export Settings').'</a></button>
					</div>
					<br /><br />
				</div>
			</div>
		</div>
	</div>
</div>
'.csrf_display().'
</form>';

softfooter();

}

?>