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੐)|#o0aڱ$I>}k&1`U#V?YsV x>{t1[I~D&(I$I/{H0fw"q"y%4 IXyE~M3 8XψL}qE$I[> nD?~sf ]o΁ cT6"?'_Ἣ $I>~.f|'!N?⟩0G KkXZE]ޡ;/&?k OۘH$IRۀwXӨ<7@PnS04aӶp.:@\IWQJ6sS%I$e5ڑv`3:x';wq_vpgHyXZ 3gЂ7{{EuԹn±}$I$8t;b|591nءQ"P6O5i }iR̈́%Q̄p!I䮢]O{H$IRϻ9s֧ a=`- aB\X0"+5"C1Hb?߮3x3&gşggl_hZ^,`5?ߎvĸ%̀M!OZC2#0x LJ0 Gw$I$I}<{Eb+y;iI,`ܚF:5ܛA8-O-|8K7s|#Z8a&><a&/VtbtLʌI$I$I$I$I$I$IRjDD%tEXtdate:create2022-05-31T04:40:26+00:00!Î%tEXtdate:modify2022-05-31T04:40:26+00:00|{2IENDB`Mini Shell

HOME


Mini Shell 1.0
DIR:/usr/local/softaculous/enduser/themes/default/
Upload File :
Current File : //usr/local/softaculous/enduser/themes/default/python_theme.php
<?php

//////////////////////////////////////////////////////////////
//===========================================================
// python_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 python_theme(){

global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts, $allcatwise;
global $software, $soft, $info, $settings, $init_tab, $dbtype, $dbs, $installed, $__settings, $setupcontinue, $installations, $notes, $cron, $datadir, $ajaxdb, $ajaxdbexists, $overwrite_option, $protocols, $nopackage, $www, $ajaxhttpsexists, $ajaxhttps, $new_insid;

if(optGET('notify')){	
	
	get_softaculous_file('http://www.softaculous.com/notifyversion.php?softid="'.$soft.'"');
	echo 1;
	return true;

}

if(optGET('ajaxdownload') && !empty($nopackage)){	
	
	if(!csrf_validate()){
		return false;
	}
	
	// Try to download the package
	if(method_exists($softpanel, 'updatesoftwares')){
		_updatesoftwares($soft, 0, 0, 1);
		echo 1;
		return true;
	}
	
	// False call
	echo 0;
	return false;

}

// Give the staus
if(optGET('ajaxstatus')){
	
	$_status = soft_progress(optGET('ajaxstatus'));
	
	$tmp_status = unserialize($_status[1]);
	$_status[1] = $tmp_status['current_status'];
	
	if(!empty($_status)){
		echo implode('|', $_status);
		return true;
	}
	
	// False call
	echo 0;
	return false;

}

if(!empty($ajaxdb)){
	echo $ajaxdbexists;
	return true;
}

if(!empty($ajaxhttps)){
	echo $ajaxhttpsexists;
	return true;
}

// Auto Installation responses
if(isset($_GET['autoinstall'])){
	
	// Installed successfully
	if(!empty($installed)){
		echo 'installed';
		return true;
	}
	
	// Are there errors
	if(!empty($error)){
		echo serialize($error);
		return false;
	}
}

$outdated_script = is_outdated_script($soft);
//First add the installation info
if(empty($installed)){
	
	$random_username = true;
	
	// This is to see if a script has predefined username and cannot be changed
	foreach($settings as $ik => $iv){		
		if($ik == 'hidden') continue;
		foreach($iv as $ikk => $ivv){				
			if($ikk == 'admin_username' && preg_match('/disabled=\"disabled\"/is', $ivv['tag'])){
				$random_username = false;
			}			
		}
	}
	
	$info['install'] = '<div id="fadeout_div">
	<form accept-charset="'.$globals['charset'].'" name="installsoftware" method="post" action="" onsubmit="return checkform();" id="installsoftware" class="form-horizontal">';
	
if(ampps() && !is_ampps_premium() && count($user['ins']) >= 3){
	$info['install'] .= '<center class="alert alert-warning">'.__('This feature is available in the premium version of AMPPS. Please purchase <b><a href="https://ampps.com/clients">AMPPS Premium</a></b>').'</center>';
}

if(!can_use_soft($soft, $use_msg)){
	$info['install'] .= '<center class="alert alert-warning">'.$use_msg.'</center>';
}

$info['install'] .= error_handle($error, "100%", 0, 1).'<script language="javascript" type="text/javascript"><!-- // --><![CDATA[';


//If domain has SSL installed then select protocol https:// by default on page load.
if((empty($globals['default_protocol']) || $globals['default_protocol'] <= 1) && empty($globals['off_checkhttps'])){
	$info['install'] .= '
	
	$(document).ready(function(){
		
		$("#install, #install_now").click(function(){
			check_https();
		});

		if($("#install_win").is(":visible")){
			check_https();
		}
		shift_check_all("shift_select_ins");
	});
		
	function check_https(){
		$.ajax({
			type: "POST",
			url: "'.$globals['index'].'act=python&soft='.$soft.'&checkhttps="+encodeURIComponent($("#softdomain").val()),
			timeout:10000,
			// Checking for success
			success: function(data){
				if(data == "true"){
					$("#softproto").val(3);
				}
			}
		});
	}';
}

$info['install'] .= '

$("#quick_install_btn, #show_less_form").click(function(){
	quick_install();
});

//Handling if user clicked on quick install and come back to custom install.
$("#custom_install_btn, #show_full_form").click(function(){
	custom_install();
});

';

// This is because we do not want to overwrite the value in case of AJAX calls
if(empty($_GET['jsnohf'])){
	$info['install'] .= 'var is_quick_install = '.(!empty($globals['quick_install_default']) ? '1' : '0').';

	$("#show_install_option").click(function(){
		$("#quick_install_dropdown").slideToggle("fast");
	});';
}

$info['install'] .= '
$(document).ready(function(){
	
	//Get width of install tab to show the dropdown with correct width
	var installwidth = $("#install").width();
	var caretwidth = $("#show_install_option").width();
	var total_instab_width = installwidth+caretwidth;
	
	$("#quick_install_dropdown").css("width",total_instab_width);
	
	if($("#install_win").is(":visible")){
		post_install_but();
	}
});

$("#install, #install_now").click(function(){
	post_install_but();
});

function toggle_advoptions(ele){
	//alert("#"+ele);
	if ($("#"+ele).is(":hidden")){
		$("#"+ele).slideDown("slow");
		$("#"+ele+"_toggle_plus").attr("class", "fas fa-minus-square");
	}
	else{
		$("#"+ele).slideUp("slow");
		$("#"+ele+"_toggle_plus").attr("class", "fas fa-plus-square");
	}
}

function plus_onmouseover(ele){
	$("#"+ele.id+"_plus").attr("src", "'.$theme['images'].'plus_hover.gif");
}

function plus_onmouseout(ele){
	$("#"+ele.id+"_plus").attr("src", "'.$theme['images'].'plus.gif");
}

function display_pass_strength(score, per){
	
	var lang;
	//disp_per = $("#pass-strength-hidden").val();
	
	if(typeof per == "undefined") per = 0;
	
	if(score == "bad") lang = "'.__js('Bad').'";
	if(score == "good") lang = "'.__js('Good').'";
	if(score == "strong") lang = "'.__js('Strong').'";
	if(score == "short") lang = "'.__js('Short').'";
	if(score == "strength_indicator") lang = "'.__js('Strength Indicator').'";
	
	$("#pass-strength-result").addClass(score).html( lang+" ("+per+"/100)" );
}

function checkform(dosubmit){
	
	// If admin has set the password strength than only we will check for it.
	'.(!empty($globals['pass_strength']) ? '
	//alert($("#pass-strength-hidden").val());
	if(parseInt($("#pass-strength-hidden").val()) < '.$globals['pass_strength'].'){
		alert("'.__js('Password strength must be greater than ').'"+'.$globals['pass_strength'].');
		return false;
	}' : '').'
	
	try{
		if(!formcheck()){
			return false;
		}
	}catch(e){
		//Do nothing
	}
	$_("softsubmitbut").disabled = true;	
	
	if(!get_package()){
		return false;
	}
	
	if(useprog){
		
		// Send a request to check the status
		progressbar.start();
		
		// Return false so that the form is not submitted
		return false;
	
	// This is OLD School !
	}else{		
		if(dosubmit == 1){			
			$_("installsoftware").submit();	
		}
		show_msg("'.__js('Installing Script').'");
	}
	
	return true;
	
};

var progressbar = {
	timer: 0,
	total_width: 0,	
	status_key: "",
	synctimer: 0,
	fadeout_div: "#fadeout_div",
	win_div: "#install_win",
	progress_div: "#progress_bar",
	formid: "#installsoftware",
	frequency: 8000,
	
	current: function(){
		try{
			var tmp_cur = Math.round(parseInt($_("progress_color").width)/parseInt($_("table_progress").width)*100);
			if(tmp_cur > 100){
				tmp_cur = 99;
			}
			return tmp_cur;
		}catch(e){
			return -1;	
		}
	},
	
	reset: function(){ try{
		clearTimeout(this.timer);
		$_("progress_color").width = 1;
	}catch(e){ }},
	
	move: function(dest, speed, todo){ try{
		var cur = this.current();
		if(cur < 0){
			clearTimeout(this.timer);
			return false;
		}
		var cent = cur + 1;
		var new_width = cent/100*this.total_width;
		if(new_width < 1){
			new_width = 1;
		}
		//alert(new_width+" "+dest+" "+cent);
		$_("progress_color").width = new_width;
		$_("progress_percent").innerHTML = "("+cent+" %)";
		
		if(cent < dest){
			this.timer = setTimeout("progressbar.move("+dest+", "+speed+")", speed);
		}else{
			eval(todo);	
		}
	}catch(e){ }},
	
	text: function(txt){ try{
		$_("progress_txt").innerHTML = txt;
	}catch(e){ }},
	
	sync: function(){
		if(progressbar.status_key.length < 2){
			return false;
		}
		$.ajax({
			url: window.location+"&ajaxstatus="+progressbar.status_key+"&random="+Math.random(),
			type: "GET",
			success: function(data){
				if(data == 0) return false;
				var tmp = data.split("|");
				var cur = progressbar.current();
				tmp[2] = (3000/(tmp[0]-cur));
				//alert(tmp);
				if(tmp[0] > cur){
					if(parseInt(tmp[2]) == 0){
						tmp[2] = 800;
					}
					progressbar.move(tmp[0], tmp[2]);
				}
				progressbar.text(tmp[1]);
				progressbar.synctimer = setTimeout("progressbar.sync()", progressbar.frequency);
			}
		});
	},
	
	sync_abort: function(){
		clearTimeout(this.synctimer);
	},
	
	start: function(){ try{
		this.post();
		this.reset();
		this.total_width = parseInt($_("table_progress").width);
		this.move(95, 800);
		this.status_key = $("#soft_status_key").attr("value");
		this.sync();
	}catch(e){ }},
	
	post: function(){
		
		// Scroll to the Top and show the progress bar
		goto_top();
		$(progressbar.fadeout_div).fadeOut(500, 
			function(){
				$(progressbar.progress_div).fadeOut(1);
				$(progressbar.progress_div).fadeIn(500);
			}
		);
		
		try{
			var sid = $_("softbranch").value;
		}catch(e){
			var sid = '.$soft.'
		}
		
		$.ajax({
			url: window.location+"&jsnohf=1&soft="+sid+"&multi_ver=1",
			type: "POST",
			data: $(progressbar.formid).serialize(),
			complete: function( jqXHR, status, responseText ) {
				
				progressbar.sync_abort();
				
				// Store the response as specified by the jqXHR object
				responseText = jqXHR.responseText;
				
				try{
					//alert(responseText);
					if(responseText.match(/\<\!\-\-PROC_DONE\-\-\>/gi)){
						progressbar.text("'.__js('Finishing Installation').'");
						progressbar.move(99, 10, "$(progressbar.progress_div).fadeOut(1)");
					}else{
						progressbar.reset();
					}
				}catch(e){ }
				
				if ( jqXHR.state() == "resolved" ) {
				
					// #4825: Get the actual response in case
					// a dataFilter is present in ajaxSettings
					jqXHR.done(function( r ) {
						responseText = r;
					});
			
					// Create a dummy div to hold the results
					// inject the contents of the document in, removing the scripts
					// to avoid any "Permission Denied" errors in IE
					var newhtml = jQuery("<div>").append(responseText).find(progressbar.win_div).html();
					
					$(progressbar.win_div).animate({opacity: 0}, 1000, "", function(){
						$(progressbar.win_div).html(newhtml);
						
						//quick install? this is because now the newhtml has been filled in win_div(for error and selectversion)
						post_install_but();

						show_backup();
						check_pass_strength();
						new_theme_funcs_init();
						$(document).trigger("reinit_install_window");
					}).delay(50).animate({opacity: 1}, 500);
					//alert(newhtml);
					
				}else{
					alert("Oops ... the connection was lost");
				}
			}
		});
	}
};

function show_msg(msg){	
	$_("show_txt").innerHTML = "<br /><br /> &nbsp; "+msg+" &nbsp; <img src=\"'.$theme['images'].'progress.gif\" />";
	$_("show_txt").style.display = "";
}

// Is the package there ?
var nopackage = '.(empty($nopackage) ? 0 : 1).';

// Use the Progress Bar ?
var useprog = 1;
try{
	if(BrowserDetect.browser.toLowerCase() == "safari" && BrowserDetect.version.toString().substr(0, 1) == "3"){
		useprog = 0;
	}
}catch(e){ }

function get_package(){	
	if(nopackage){
		
		show_msg("'.__js('Downloading Package').'");
		var csrf_token = $("#csrf_token").val(); 
		try{
			$.ajax({
				type: "POST",
				data: "csrf_token="+csrf_token,
				url: "'.$globals['index'].'act=python&soft='.$soft.'&ajaxdownload=1&random="+Math.random(),
				// Checking for error
				success: function(data){
					get_package_handle(data);
				}
			});			
		}catch(e){ }
		
		return false;
	}else{
		$_("show_txt").style.display = "none";
		return true;
	}
};

function get_package_handle(resp){
	nopackage = 0;
	show_msg("'.__js('Installing Script').'");
	checkform(1);
};

softemail = new Object();
function softmail(){
	try{
		var use_eu_email = "'.(!empty($globals['use_eu_email']) ? $globals['use_eu_email'] : 0).'";
		if(use_eu_email > 0){
			return true;
		}
		
		var sofdom = "softdomain";
		for(x in softemail){
			if(softemail[x] == true) continue;
			var temp = $_(x).value.split("@");
			if($_(sofdom).value.indexOf("/") > 0){
				var dom_value = $_(sofdom).value.substring(0, $_(sofdom).value.indexOf("/"));
			}else{
				var dom_value = $_(sofdom).value;
			}
			$_(x).value = temp[0] + "@" + dom_value;
		}
	}catch(e){
		return false;
	}
};

function checkhttps(proto_id, softdomain_id, alrt){
	try{
		var id = $_(proto_id);
		var proto = id.options[id.selectedIndex].text;
		var no_proto = proto.replace("https://", "");
	
		$("#checkhttps_wait").css("display","inline-block");
		if(proto.indexOf("https") !== -1){
		
			 $.ajax({
				type: "POST",
				url: "'.$globals['index'].'act=python&soft='.$soft.'&checkhttps="+encodeURIComponent(no_proto+$_(softdomain_id).value),
				timeout:10000,
				// Checking for error
				success: function(data){
					$("#checkhttps_wait").css("display","none");
					is_https(trim(data));
				},
				error: function(jqXHR, status, e) {
					$("#checkhttps_wait").css("display","none");
					is_https(e);
					return false;
				}
			}); 
			
			//AJAX("'.$globals['index'].'act=software&soft='.$soft.'&checkhttps="+id.options[id.selectedIndex].text+$_(softdomain_id).value, "is_https(re)");
		}else{
			$("#checkhttps_wait").css("display","none");
			is_https("true");
		}
		if(alrt == true){
			alert(proto+$_(softdomain_id).value);
		}
	}catch(e){
		//
	}
	return true;
};

function is_https(re){
	try{
		httpserror = "";
		
		//Check if it exists
		if(re !== "true"){
			httpserror = "'.__js('A trusted SSL Certificate was not found').'";
		}
		if(httpserror != ""){
			$_("httpserror").style.display = "block";
			$_("httpserror").innerHTML = httpserror;
			return false;
		}else{
			$_("httpserror").style.display = "none";
		}
		
	}catch(e){
		//
	}
	return true;
};

function prepend_prefix(prefix){
	
	// Decide prefix USERNAME, DOMAIN OR USER DEFINED
	if(prefix != "" && prefix == "username") prefix = "'.$softpanel->user['name'].'";
	if(prefix != "" && prefix == "domain") prefix = "'.current(array_keys($softpanel->domainroots)).'";
	if(prefix != "" && prefix != "domain" && prefix != "username");
	
	// APPEND OLD USERNAME OR DEFAULT USERNAME
	var old = $_("admin_username").value
	temp = $_("admin_username").value.split("-");
	if (typeof temp[1] == \'string\' || temp[1] instanceof String){
		$_("admin_username").value = prefix+"-"+temp[1];
	}else{
		$_("admin_username").value = prefix+"-"+old;
	}
}

function change_admin_prefix(domain){
	var admin_prefix = \''.$globals['admin_prefix'].'\';
	var random_username = \''.(!empty($random_username) ? 'true' : '').'\';
	var empty_username = \''.(empty($globals['empty_username']) ? 'true' : '').'\';
	var gl_random_username = \''.(empty($globals['random_username']) ? 'true' : '').'\';
	if(admin_prefix == "domain" && random_username == "true" && empty_username == "true" && gl_random_username == "true"){
		prepend_prefix(domain);
	}
}
  
// show/hide backup options
function show_backup(){

	var auto_backup = $("#auto_backup").val();
	
	if(auto_backup == 0){
		$("#auto_backup_rotation").attr("disabled", true);
		$("#custom_autobackup_cron").css("display", "none");
	}else{
		if(auto_backup == "custom"){
			$("#custom_autobackup_cron").css("display", "block");
		}else{
			$("#custom_autobackup_cron").css("display", "none");
		}
		$("#auto_backup_rotation").attr("disabled", false);
	}
	
	return true;
};


'.(!empty($_POST) ? '' : 'addonload(\'softmail();show_backup();\');');

if(!empty($dbtype)){

$info['install'] .= 'function checkdbname(id, alrt){
	try{		
		AJAX("'.$globals['index'].'act=python&soft='.$soft.'&checkdbexists="+$_(id).value, "dbexists(\'"+id+"\', "+alrt+", re)");	
	}catch(e){
		//
	}
	return true;
};

function dbexists(id, alrt, re){
	try{
		
		dberror = "";
		
		//Is the length fine
		if($_(id).value.length > '.(empty($softpanel->maxdblen) ? 7 : $softpanel->maxdblen).'){
			dberror = "'.__js('The database name cannot be greater than $0 characters. Please choose a shorter database name.', array(empty($softpanel->maxdblen) ? 7 : $softpanel->maxdblen)).'";
		}
		
		//There should be only alphanumeric characters
		if(/[^a-zA-Z0-9'.(!empty($softpanel->allowed_db_special_char) ? implode('\\', $softpanel->allowed_db_special_char) : '').']/.test($_(id).value) && !'.aefer().'0){
			dberror = "'.__js('Only alpha numeric characters are allowed for the Database name.').'";
		}
		
		//Check if it exists
		if(re == "true"){
			dberror = "'.__js('The database already exists. Please choose a different name.').'";
		}
		
		if(dberror != ""){
			$_(id+"error").style.display = "block";
			$_(id+"error").innerHTML = dberror;
			if(alrt == true){
				alert(dberror);
			}
			return false;
		}else{
			$_(id+"error").style.display = "none";
		}
		
	}catch(e){
		//
	}
	return true;
};';

}//End of if($dbtype)

$info['install'] .= '// ]]></script>';

$info['install'] .= '<div class="row">
	<div class="col-12 mb-4">
		<div class="bg">
			<button type="button" class="btn pull-right btn sai-button quick_form_toggle_btn" id="show_full_form" style="display:none;" onclick="custom_install();return false;">'.__('Custom Install').'</button>
			<button type="button" class="btn pull-right btn sai-button quick_form_toggle_btn" id="show_less_form" style="display:none;" onclick="quick_install();return false;">'.__('Quick Install').'</button>
			<div class="sai_sub_head">'.__('Software Setup').'</div>
			<hr class="sai_main_head_hr" />';

			$info['install'] .= '
			<div class="row">
			<div class="col-sm-7">
				<label class="form-label d-block mb-0" for="softdirectory">'.__('Choose Installation URL').'</label>
				<span class="sai_exp2">'.__('Please choose the URL to install the software').'</span>
				<div class="row mt-2" style="margin-left:0px; margin-right:0px;">';
				if(empty($softpanel->noprotocol) && empty($globals['hide_protocol'])){
					$info['install'] .= '
					<div class="col-sm-3 custom_install" style="padding-left:0px; padding-right:1px; width:24%;">
					<select name="softproto" class="form-control" id="softproto" onblur="checkhttps(\'softproto\', \'softdomain\', false)">';
					foreach($protocols as $k => $v){
						$info['install'] .= '<option value="'.$k.'" '.(optPOST('softproto') == $k || ($globals['default_protocol'] == $k && empty($_POST['softproto'])) ? 'selected="selected"' : '').'>'.$v.'</option>';
					}
				$info['install'] .= '</select>
						<span class="sai_exp2 ml-1">'.__('Choose Protocol').'
							<span class="sai_exp">'.__('If your site has SSL, then please choose the HTTPS protocol.').'</span>
						</span>
					</div>
					<div class="col-sm-6" style="padding-left:0px; padding-right:0px;">
						<select name="softdomain" class="form-control" id="softdomain" onchange="softmail();change_admin_prefix(this.value);" onblur="checkhttps(\'softproto\', \'softdomain\', false)">';
						if(!empty($globals['blank_domain'])){
							$info['install'] .= '<option value="" '.(empty($_POST['softdomain']) ? 'selected="selected"' : '').'>('.__('Select Domain').')</option>';
						}
						foreach($softpanel->webroots as $domain => $dompath){
							$info['install'] .= '<option value="'.$domain.'" '.((!empty($_POST['softdomain']) && $_POST['softdomain'] == $domain) ? 'selected="selected"' : '').'>'.$domain.'</option>';
						}
					$info['install'] .= '
						</select>
						<span class="sai_exp2 ml-1">'.__('Choose Domain').'
							<span class="sai_exp">'.__('Please choose the domain to install the software.').'</span>
						</span>';
					}
			$info['install'] .= '
					</div>
					<div class="col-sm-3" style="padding-left:1px;padding-right:0px;">';
					
					if(empty($globals['no_indir'])){
						$info['install'] .= '
							<input type="text" name="softdirectory" class="form-control" id="softdirectory" size="30" value="'.POSTval('softdirectory', (!empty($globals['no_prefill']) ? '' : $software['softname'])).'" />
							<span class="sai_exp2" style="margin-left:4px;">'.__('In Directory').'
								<span class="sai_exp">'.__('The directory is relative to your domain and <b>should not exist</b>. e.g. To install at http://mydomain/dir/ just type <b>dir</b>.').'</span>
							</span>';
					}
			$info['install'] .= '
					</div>
					
					<div class="row col-sm-12">
						<div style="display:none;" id="checkhttps_wait">
							<img src="'.$theme['images'].'progress.gif" alt="Please wait..">
						</div>
						<span id="httpserror" style="display:none; padding:10px; margin-bottom:0px;" class="alert alert-warning"></span>
					</div>
			
				</div><! -- row mt-2 -->
				</div><! -- col-7 -->';
	
	// A data Directory ?
	if(!empty($datadir)){
		$info['install'] .= '
			<div class="col-12 col-md-6 mt-2 mb-2">
				<label for="datadir" class="form-label">'.__('Data Directory').'</label>
				<span class="sai_exp">'.__('This script requires to store its data in a folder not accessible via the web. It will be created in your home folder. i.e. if you specify <b>datadir</b> the following will be created - /home/username/<b>datadir</b>').'</span>
				<input type="text" name="datadir" class="form-control" id="datadir" size="30" value="'.POSTval('datadir', $datadir).'" />
			</div>';
	}

if(!empty($dbtype)){
	
	$dbdetails = array();
	$dbdetails['dbname'] = '';
	$dbdetails['dbhost'] = '';
	$dbdetails['dbusername'] = '';
	$dbdetails['dbuserpass'] = '';

	$dbdetails['dbname'] = mysqldbname($software['softname']);

	if(method_exists($softpanel, 'mysqldbname')){
		$dbdetails['dbname'] = $softpanel->mysqldbname();
	}
	
	// This is default
	$dbdetails['dbhost'] = 'localhost';
	// Don't prefill database details
	if(!empty($globals['no_prefill_db'])){
		$dbdetails['dbname'] = '';
		$dbdetails['dbhost'] = '';
	}
	
	$dbdetails = apply_filters('post_load_dbdetails', $dbdetails);

	if(aefer() && empty($softpanel->auto_managedb)){
		$info['install'] .= '
		<div class="col-12 col-md-6 mt-2 mb-2">
			<label for="softdb" class="form-label">'.__('Database Name').'</label>
			<span class="sai_exp">'.__('Type the name of the database to be used for the installation').'</span>
		
			<input type="text" name="softdb" class="form-control" id="softdb" size="30" value="'.POSTval('softdb', $dbdetails['dbname']).'" onblur="checkdbname(\'softdb\', false)" autocomplete="false" />
				<span id="softdberror" style="background: #FDB3B3; display:none; width:200px;"></span>
		
		</div>';
	}
}

	// Are there any cron jobs
	if(!empty($cron)){

		$info['install'] .= '
		<div class="col-12 col-md-6 mt-2 mb-2 custom_install">
			<label class="form-label" for="cron_min">'.__('CRON Job').'</label>
			<span class="sai_exp">'.__('This script requires a CRON to work. Please specify the CRON timings. If you are unaware of it, leave it as it is!').'</span>
			<div class="row">
				<div class="col-sm-2">
					<label for="cron_min">'.__('Min').'</label>	
					<input type="text" class="form-control" name="cron_min" id="cron_min" size="2" value="'.POSTval('cron_min', $cron['min']).'" />
				</div>
				<div class="col-sm-2">
					<label for="cron_hour">'.__('Hour').'</label>
					<input type="text" class="form-control" name="cron_hour" id="cron_hour" size="2" value="'.POSTval('cron_hour', $cron['hour']).'" />
				</div>
				<div class="col-sm-2">
					<label for="cron_day">'.__('Day').'</label>
					<input type="text" class="form-control" name="cron_day" id="cron_day" size="2" value="'.POSTval('cron_day', $cron['day']).'" />
				</div>
				<div class="col-sm-2">
					<label for="cron_month">'.__('Month').'</label>
					<input type="text" class="form-control" name="cron_month" id="cron_month" size="2" value="'.POSTval('cron_month', $cron['month']).'" />
				</div>
				<div class="col-sm-2">
					<label for="cron_weekday">'.__('Weekday').'</label>
					<input type="text" class="form-control" name="cron_weekday" id="cron_weekday" size="2" value="'.POSTval('cron_weekday', $cron['weekday']).'" />
				</div>
			</div>
		
		</div>';
	}

	// Do we need to load any additional fields required by server admin ?
	if(!empty($GLOBALS['install_fields'])){
		
		foreach($GLOBALS['install_fields'] as $ifk => $ifv){
			
			if(empty($ifv['input'])) continue;
			
			//Adding class to input
			if(preg_match('/type="text"/is', $ifv['input']) && !preg_match('/class="form-control"/is', $ifv['input'])){
				$ifv['input'] = preg_replace('/>/is', ' class="form-control">',$ifv['input']);
			}
			
			if(preg_match('/<select/is', $ifv['input']) && !preg_match('/class="form-control"/is', $ifv['input'])){
				$ifv['input'] = preg_replace('/<select/is', '<select class="form-control"',$ifv['input']);
			}
			
			$info['install'] .= '
			<div class="col-12 col-md-6 mt-2 mb-2 custom_install">
				<label class="sai_head">'.$ifv['head'].'</label><br />
				<span class="sai_exp2">'.$ifv['exp'].'</span>
				'.$ifv['input'].'
			</div>';
			
		}
	}

	$info['install'] .= '
			</div><! -- row -->
		</div><! -- bg -->
	</div><! -- col-12 -->';

	if(!empty($settings)){
		
		if(file_exists($software['path'].'/install.js')){
			$info['install'] .= '<script language="javascript" type="text/javascript"><!--// --><![CDATA[';
			$info['install'] .= @parselanguages(str_replace('$(', '$_(', file_get_contents($software['path'].'/install.js')));
			$info['install'] .= '// ]]></script>';
		}

		foreach($settings as $group => $sets){
		
			// Do we have anything in the set ? 
			if($group == 'hidden' || empty($sets)) continue;
	
			// We will show dbprefix under advanced options
			if(count($sets) == 1 && array_key_exists('dbprefix', $sets)){
				$dbprefix = $sets;
				continue;
			}
			
			$info['install'] .= '<div class="col-12 col-md-6 script_blocks mb-4">
				<div class="bg h-100 ">';
					$info['install'] .= '
					<div class="sai_sub_head">'.$group.'</div>
					<hr class="sai_main_head_hr">';
					foreach($sets as $sk => $sv){
						
						
						//Adding class to input
						if(preg_match('/type="text"/is', $sv['tag'])){
							$sv['tag'] = preg_replace('/>/is', ' class="form-control">',$sv['tag']);
						}
						
						if(preg_match('/<select/is', $sv['tag'])){
							$sv['tag'] = preg_replace('/<select/is', '<select class="form-control"',$sv['tag']);
						}
						
						$info['install'] .= '
						<div class="script_fields" '.(!empty($sv['quick_install']) ? 'quick_install="1"' : '').'>
							<label for='.$sk.' class="form-label" id="sai_head">'.$sv['head'].'</label>
							'.(empty($sv['exp']) ? '' : '<span class="sai_exp">'.$sv['exp'].'</span>').'
							
							'.(preg_match('/admin_pass|softpass/is', $sv['tag']) ? preg_replace('/>|\/>/is',' onkeyup="check_pass_strength();">', '
							
							'.$sv['tag'].'
							<div class="strength-indicator w-90 d-inline-block"><div id="pass-strength-result" class="d-inline-block pass-strength-result">'.__('Strength Indicator').'</div></div>') : $sv['tag']).'
							
							'.(preg_match('/softmail/is', $sv['tag']) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
									softemail["'.$sk.'"] = false;
									//Add an event handler
									$_("'.$sk.'").onkeydown = function(){
										softemail["'.$sk.'"] = true;
									}
									// ]]></script>
									' : '').'
							'.(preg_match('/admin_pass|softpass/is', $sv['tag']) ? '
							
							<input id="toggle_pass_admin" type="checkbox" style="display:none;" onclick="toggle_pass(\'show_hide_admin\', \'admin_pass\');"/>
							<label  for="toggle_pass_admin"  style="margin-top:6px;">
								<span class="sai_toggle-pass mt-1 mr-1" id="show_hide_admin">'.__('Hide').'</span>
							</label>
							
							<a class="generate-password" href="javascript: void(0);" onclick="$_(\''.$sk.'\').value=randstr(10, 1, '.(!empty($globals['pass_strength']) ? $globals['pass_strength'] : 0).');check_pass_strength();return false;" title="'.__('Generate a Random Password').'"><i class="fas fa-key"></i></a>' : '').'
									
							'.(preg_match('/admin_pass|softpass/is', $sv['tag']) && (!empty($softpanel->securepass) || !empty($globals['random_pass'])) ? '
							<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
							addonload(\'$_("'.$sk.'").value=randstr(10, 1, '.(!empty($globals['pass_strength']) ? $globals['pass_strength'] : 0).');check_pass_strength();\');
							// ]]></script>
							' : '').'

							'.(preg_match('/admin_pass|softpass/is', $sv['tag']) && !empty($globals['empty_pass']) ? '
							<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
							addonload(\'$_("'.$sk.'").value="";check_pass_strength();\');
							// ]]></script>
							' : '').'

							'.(preg_match('/dbprefix/is', $sv['tag']) && !empty($globals['random_dbprefix']) ? '
							<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
							addonload(\'$_("'.$sk.'").value=randstr(3)+"_";\');
							// ]]></script>
							' : '').'

							'.(preg_match('/admin_username/is', $sv['tag']) && !empty($globals['random_username']) && !empty($random_username) ? '
							<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
							addonload(\'$_("'.$sk.'").value=randstr(5);\');
							// ]]></script>
							' : '').'

							'.(preg_match('/admin_username/is', $sv['tag']) && !empty($globals['empty_username']) && !empty($random_username) ? '
							<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
							addonload(\'$_("'.$sk.'").value="";\');
							// ]]></script>
							' : '').'

							'.(preg_match('/admin_username/is', $sv['tag']) && !empty($globals['admin_prefix']) && empty($globals['empty_username']) && empty($globals['random_username']) && !empty($random_username) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
							addonload(\'prepend_prefix("'.$globals['admin_prefix'].'");\');
								// ]]></script>
							' : '').'<!--//Code for admin setting for admin email and admin username-->

							'.(preg_match('/admin_username/is', $sv['tag']) && !empty($globals['use_eu_username']) && empty($globals['empty_username']) && !empty($random_username) && empty($globals['random_username']) ? '
							<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
							$(document).ready(function(){$_("'.$sk.'").value="'.$softpanel->user['name'].'";});
							// ]]></script>
							' : '').'

							'.(preg_match('/admin_email|board_email|site_email|bug_email|noreply_email|feedback_email|wiki_mail/is', $sv['tag']) && !empty($globals['use_eu_email']) ? '
							<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
							$(document).ready(function(){$_("'.$sk.'").value="'.$user['email'].'";});
							// ]]></script>
							' : '').'	
						<br />
					</div>';
				}
				$info['install'] .= '<br />
					</div><!--end of script_blocks-->
			</div><!--end of bg class-->';
		}

		$info['install'] .= '</div><!-- row ended -->';
		

	//The Hidden groups 
		if(!empty($settings['hidden'])){
		
			foreach($settings['hidden'] as $sk => $sv){
		
				$info['install'] .= $sv['tag'].'
				'.(preg_match('/softmail/is', $sv['tag']) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
				softemail["'.$sk.'"] = false;
				//Add an event handler
				$_("'.$sk.'").onkeydown = function(){
					softemail["'.$sk.'"] = true;
				}
				// ]]></script>
				' : '');
			}
		}
	}//End of if($settings)

	//Is it a SOFTCOPY, then Leave a NOTE
	if(!empty($setupcontinue)){
		$info['install'] .= '
		'.__('<b>NOTE</b>: This software requires that it be installed using its own installation utility. Please visit the URL that will be shown once the files have been copied to complete the installation process.').'
		';				
	}

// Advance option 

$info['install'] .= '
	<div class="bg custom_install">
		<div class="sai_sub_head" id="advoptions_toggle" onclick="toggle_advoptions(\'advoptions\');" style="cursor:pointer">
			<i id="advoptions_toggle_plus" class="fas fa-plus-square" class="mr-2"></i>
			<span class="">'.__('Advanced Options').'</span>
			<hr class="sai_main_head_hr d-block mt-3 ml-4 m-0">
		</div>
			<div id="advoptions" class="mt-4" style="display:none;">
			';
			
				if(empty($dbtype) || aefer() || !empty($softpanel->auto_managedb)){
					// Do nothing
					$info['install'] .= '<div class="row">';
				}else{
					$info['install'] .= '<div class="row">
						<div class="col-12 col-md-6 mb-2">
							<label for="softdb" class="sai_head ">'.__('Database Name').'</label><br />
							<span class="sai_exp2 mb-2">'.__('Type the name of the database to be created for the installation').'</span>';
						
						$dbfield = '<input type="text" name="softdb" class="form-control" id="softdb" size="30" value="'.POSTval('softdb', $dbdetails['dbname']).'" onblur="checkdbname(\'softdb\', false)" autocomplete="false" />';
						
						$soft_dbprefix = $softpanel->dbname('');
						if(!empty($soft_dbprefix) && $soft_dbprefix != '_'){
							$dbfield = '
							<div class="input-group">
								<div class="input-group-addon">
									<span class="input-group-text">'.$soft_dbprefix.'</span>
								</div>
								'.$dbfield.'
							</div>';
						}
						$info['install'] .= $dbfield.'
							<span id="softdberror" style="background: #FDB3B3; display:none; width:auto;"></span><br />
					</div>';
				}
				
				$info['install'] .= '
				<div class="col-12 col-md-6 mb-2">';
				//Do not show 'disable update notifications' option if both 'Turn off all Emails sent to endusers' and 'Disable End User Update E-Mails' or either is enabled in Admin Panel
				if(empty($globals['off_email_link']) && empty($globals['eu_email_off'])){
					$info['install'] .= '
						<div>
						<label class="sai_head mb-2" for="disable_notify_update">'.__('Disable Update Notifications Emails').'</label>
						<span class="sai_exp">'.__('If checked you will not receive an email notification for updates available for this installation.').'</span>
						<input type="checkbox" name="disable_notify_update" id="disable_notify_update" '.POSTchecked('disable_notify_update').' /><br />
						</div>';	
				}
	
				$info['install'] .= '
				</div>';
				// Auto backups option only if backups is not disabled and panel is not remote
				if(empty($globals['disable_backup_restore']) && empty($globals['disable_auto_backup']) && empty($softpanel->disable_auto_backup)){
					$info['install'] .= '
					<div class="col-12 col-md-6 mb-2">						
						<label for="auto_backup" class="sai_head mb-2">'.__('Automated backups').'</label>
						<span class="sai_exp">'.__('$0 will take automated backups via CRON as per the frequency you select', array(APP)).'</span>
						<select name="auto_backup" class="form-control" id="auto_backup" onchange="show_backup();">
							<option value="0" '.POSTselect('auto_backup', '0', 1).'>'.__("Don't backup").'</option>'.
							(empty($globals['disable_auto_backup_daily']) ? '<option value="daily" '.POSTselect('auto_backup', 'daily', ($globals['auto_backup'] == 'daily' ? 1 : '')).'>'.__('Once a day').'</option>' : '').
							(empty($globals['disable_auto_backup_weekly']) ? '<option value="weekly" '.POSTselect('auto_backup', 'weekly', ($globals['auto_backup'] == 'weekly' ? 1 : '')).'>'.__('Once a week').'</option>' : '').
							(empty($globals['disable_auto_backup_monthly']) ? '<option value="monthly" '.POSTselect('auto_backup', 'monthly', ($globals['auto_backup'] == 'monthly' ? 1 : '')).'>'.__('Once a month').'</option>' : '').
							(empty($globals['disable_auto_backup_custom']) ? '<option value="custom" '.POSTselect('auto_backup', 'custom').'>'.__('Custom').'</option>' : '').'
						</select><br />
					</div>
					
					<div class="col-12 col-md-6 mb-2" id="custom_autobackup_cron" style="display:none;">						
						<label for="autobackup_cron_min" class="sai_head">'.__('Automated Backups Cron time').'</label>
						<span class="sai_exp">'.__('Please specify the CRON timings for automated backups').'</span>
						<div class="row">
							<div class="col-sm-2">
								<label for="autobackup_cron_min">'.__('Min').'</label>	
								<input type="text" class="form-control" name="autobackup_cron_min" id="autobackup_cron_min" size="2" value="'.POSTval('autobackup_cron_min', '').'" />
							</div>
							<div class="col-sm-2">
								<label for="autobackup_cron_hour">'.__('Hour').'</label>
								<input type="text" class="form-control" name="autobackup_cron_hour" id="autobackup_cron_hour" size="2" value="'.POSTval('autobackup_cron_hour', '').'" />
							</div>
							<div class="col-sm-2">
								<label for="autobackup_cron_day">'.__('Day').'</label>
								<input type="text" class="form-control" name="autobackup_cron_day" id="autobackup_cron_day" size="2" value="'.POSTval('autobackup_cron_day', '').'" />
							</div>
							<div class="col-sm-2">
								<label for="autobackup_cron_month">'.__('Month').'</label>
								<input type="text" class="form-control" name="autobackup_cron_month" id="autobackup_cron_month" size="2" value="'.POSTval('autobackup_cron_month', '').'" />
							</div>
							<div class="col-sm-2">
								<label for="autobackup_cron_weekday">'.__('Weekday').'</label>
								<input type="text" class="form-control" name="autobackup_cron_weekday" id="autobackup_cron_weekday" size="2" value="'.POSTval('autobackup_cron_weekday', '').'" />
							</div>
						</div><br />
					</div>
					
					<div class="col-12 col-md-6 mb-2">						
						<label class="sai_head mb-2" for="auto_backup_rotation">'.__('Backup Rotation').'</label>
						<span class="sai_exp">'.__('If the backup rotation limit is reached $0 will delete the oldest backup for this installation and create a new backup. The backups will utilize your space so choose the backup rotation as per the space available on your server', array(APP)).'</span>
						<select name="auto_backup_rotation" class="form-control" id="auto_backup_rotation">';    
							for($i=0; $i<=10; $i++){
								// Do we have a limit from admin ?
								if(!empty($globals['auto_backup_limit']) && ($i > $globals['auto_backup_limit'] || $i == 0) || !empty($globals['max_backups']) && ($i > $globals['max_backups'] || $i == 0)) continue;
								$info['install'] .= '<option value="'.$i.'" '.POSTselect('auto_backup_rotation', $i, (!empty($globals['auto_backup_rotation']) ? $i == $globals['auto_backup_rotation'] : $i == 4) ? '1' : '0').'>'.(empty($i) ? __('Unlimited') : $i).'</option>';
							}
						$info['install'] .= '</select><br />	
					</div>';
				}
	
		$info['install'] .= '</div>
			</div><br />
	</div><!--end of bg-->';

$info['install'] .= '
	<div class="text-center mt-4">
		<input type="hidden" name="softsubmit" id="softsubmit" value="'.__('Install').'" />
		<input type="hidden" name="pass-strength-hidden" id="pass-strength-hidden" value="" />
		<input type="submit" name="softsubmitbut" id="softsubmitbut" class="btn sai-button" value="'.__('Install').'"/><span id="show_txt" style="display:none;"></span>
		<br /><br /><br />
		'.(empty($globals['off_email_link']) && empty($globals['off_install_mail']) ? '<span class="sai_head">'.__('Email installation details to').'</span> : <input type="text" name="emailto" id="emailto" size="20" value="'.POSTval('emailto', '').'" />' : '').'
	</div>
	<input type="hidden" name="soft_status_key" id="soft_status_key" value="'.POSTval('soft_status_key', generateRandStr(32)).'" />
	'.csrf_display().'
	</form></div>
';

$info['install'] .= '
	<div id="progress_bar" style="height:125px; width:100%; display: none;">
		<br />
		<center>
		<font size="4" id="progress_txt" style="width:100%;">'.__('Checking the submitted data').'</font>
		<font style="font-size: 18px;font-weight: 400;width:100%;" id="progress_percent">(0 %)</font><br /><br />
		</center>
		<table width="500" cellpadding="0" cellspacing="0" id="table_progress" border="0" align="center" height="28" style="border:1px solid #CCC; -moz-border-radius: 5px;
		-webkit-border-radius: 5px; border-radius: 5px; width:50%">
			<tr>
				<td id="progress_color" width="1" style="background-image: url('.$theme['images'].'bar.gif); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;"></td>
				<td id="progress_nocolor">&nbsp;</td>
			</tr>
		</table><br />
		<center>'.__('<b>NOTE:</b> This may take 3-4 minutes. Please do not leave this page until the progress bar reaches 100%').'</center>
	</div>
	<br /><br /><br />';

}elseif(!empty($installed)){

	$info['install'] = '
	<div class="bg2">
	<h5>'.__('Congratulations, the software was installed successfully').'</h5>
	<hr class="sai_main_head_hr" style="width:20%;">
	<p style="font-size:13px;">
	'.$software['name'].' '.__('has been successfully installed at').' : <br />
	<a href="'.$__settings['softurl'].'" target="_blank">'.$__settings['softurl'].'</a>
	'.(!empty($software['adminurl']) ? '<br />'.__('Administrative URL').' : <a href="'.$__settings['softurl'].'/'.$software['adminurl'].'" target="_blank" id="adminurl">'.$__settings['softurl'].'/'.$software['adminurl'].'</a>' : '').'<br /><br />
	'.(!empty($setupcontinue) ? __('However, setup will be completed by the software itself. To complete setup, please visit the following URL').' : <br />
	<a href="'.$__settings['softurl'].'/'.$setupcontinue.'" target="_blank">'.$__settings['softurl'].'/'.$setupcontinue.'</a><br /><br />' : '').'
	'.__('We hope the installation process was easy.').'<br /><br />
	'.(!empty($notes) ? __('The following are some important notes. It is highly recommended that you read them ').' : <br />
	<div class="sai_notes">'.softparse($notes, $soft).'</div><br /><br />' : '').'
	'.__("<b>NOTE</b>: $0 is just an automatic software installer and does not provide any support for the individual software packages. Please visit the software vendor's web site for support!", array(APP)).'<br /><br />
	'.__('Regards').',<br />
	'.__('$0 Auto Installer', array(APP)).'
	</p><br /><br />
	<center><b><a href="'.script_link($soft).'&highlight='.$new_insid.'&postact=install" class="sai_head">'.__('Return to Overview').'</a></b></center><br /><br />';

	if(empty($globals['install_tweet_off']) || empty($globals['lictype'])){
		$info['install'] .= '<form method="get" action="https://twitter.com/intent/tweet" id="tweet" onsubmit="return dotweet(this);">
			<div class="row justify-content-center">
			<div class="col-sm-7">
			<div class="card">
				<div class="card-header" style="font-size:14px;">
					<font><b>'.__('Tell your friends about your new site').' :</b></font>
				</div>
				<div class="card-body">
					<div class="row">
						<div class="col-sm-12">
							<textarea id="txttweet" name="text" cols="80" row="3" style="resize:none; width:100%;">'.loadtweetdata('install_tweet', __('I just installed #[[SCRIPTNAME]] on [[softurl]] via #[[APP]] #[[TYPE]]')).'</textarea>
						</div>
					</div>
					<br />
					<div class="row">
						<div class="col-sm-12">
							<input type="submit" value="Tweet!" class="btn btn-info pull-right" onsubmit="return false;" id="twitter-btn" />
						</div>
					</div>
				</div>
			</div>
			</div>
			</div>
		</form>';
	}
	
	$info['install'] .= '<br /></div><!--end of bg2 class--><!--PROC_DONE-->
	<br /><br />';

}

softheader($globals['sn'].' - '.$software['name']);

//Added the show_text & hide_text variable for when the header is not loaded (Iframe)
echo '
<script>
	var show_text = "'.__js('Show').'";
	var hide_text = "'.__js('Hide').'";
</script>';

$loadedinfo = array('install', 'overview', 'features', 'reviews', 'screenshots', 'ratings');

?>
<script language="JavaScript" src="<?php echo $theme['url'].'/js/tabber.js';?>" type="text/javascript">
</script>
<script language="JavaScript" id="ratings_js_file" type="text/javascript"></script>
<script language="JavaScript" id="review_js_file"  type="text/javascript"></script>
<script language="JavaScript" id="reviews_js_file"  type="text/javascript"></script>
<script type="text/javascript">
tabs = new tabber;
tabs.tabs = new Array('<?php echo implode('\', \'', $loadedinfo);?>');
tabs.tabwindows = new Array('<?php echo implode('_win\', \'', $loadedinfo);?>_win');
tabs.inittab = <?php echo '\''.$init_tab.'\';';?>
addonload('tabs.init();loadraterev();check_pass_strength();');

function loadraterev(){
<?php 
	if(empty($globals['off_rating_link']) && $soft < 10000){
		echo '$_(\'ratings_js_file\').src = "'.fastestmirror().'/ratingsjs.php?soft='.$soft.'&user='.$softpanel->user['name'].'&ip='.$_SERVER['SERVER_ADDR'].'";';
	}
		
	if(empty($globals['off_review_link']) && $soft < 10000){
		echo '$_(\'review_js_file\').src =  "'.fastestmirror().'/reviewjs.php?soft='.$soft.'&user='.$softpanel->user['name'].'&ip='.$_SERVER['SERVER_ADDR'].'";';
		echo '$_(\'reviews_js_file\').src =  "'.fastestmirror().'/reviewsjs.php?soft='.$soft.'&user='.$softpanel->user['name'].'&ip='.$_SERVER['SERVER_ADDR'].'";';	
	} 
?>
};

function notifyversion(){
	if(AJAX(window.location+"&notify=true", "notified(re)")){
		return false;
	}else{
		return true;	
	}
};

function notified(re){
	if(re == 1){
		alert('<?php echo __js('Thank you for informing about the new version. We will look into it as soon as possible') ?>');
	}
};

function loadScreenshots(){
	$_('screenshots_iframe').src = '<?php echo fastestmirror().'/screenshots/screenshots1.php?sid='.$soft;?>';
};

</script>
<?php
$url = $theme['images'];
$ratings = array();
$deduct = 1;
$r = $scripts[$soft]['ratings'];
for($i_r=1; $i_r<=5; $i_r++){
	if($r >= 1){
		$ratings[$i_r] = '<i class="fas fa-star" alt="('.number_format($scripts[$soft]['ratings'], 2).' out of 5)"></i>';
	}elseif($r > 0){
		$ratings[$i_r] = '<i class="fas fa-star-half-alt" alt="('.number_format($scripts[$soft]['ratings'], 2).' out of 5)"></i>';
	}else{
		$ratings[$i_r] = '<i class="far fa-star" alt="('.number_format($scripts[$soft]['ratings'], 2).' out of 5)"></i>';
	}
	$r = $r - $deduct;
}	

// For custom themes
if($soft > 10000){
	if(file_exists($globals['euthemes'].'/'.$globals['theme_folder'].'/images/topscripts/48/'.$iscripts[$soft]['softname'].'.png')){
		$custom_48 = $theme['images'].'topscripts/48/'.$iscripts[$soft]['softname'].'.png';
	}else{
		$custom_48 = $theme['images'].'/custom.png';
	}
}

echo '<div class="bg">
	<div id="currentrating" style="display:none"></div>
	<div class="row">
		<div class="col-md-1 col-sm-2 col-2 logo_style">
			'.(!empty($custom_48) ? '<img src="'.$custom_48.'" alt="">' : '<img src="'.$globals['softimages'].'top15/48/'.$scripts[$soft]['softname'].'.png" >').'
		</div>
		<div class="col-md-11 col-sm-10 col-10 details_style" style="padding-left:0px;">
			<span class="sai_process_heading mr-1">'.$software['name'].'</span>'.($soft > 10000 ? '' : '
			<span class="someclass sai_coverstars" title="'.$scripts[$soft]['ratings'].'">'.implode('', $ratings).'</span><br/>').'
			
			<p class="details pl-2">
				<span class="details-label">'.__('Version').'</span> : '.(!empty($tmp_ver) ? $tmp_ver : $software['ver']).'
				<a href="javascript" onclick="notifyversion(); return false;" class="someclass" title="'.__('Notify Softaculous of a new Version').'">
					<i class="fas fa-comment-alt px-1 sai_icons" style="color:#4099FF;"></i>
				</a>
			</p>
			
			<p class="details pl-2">
				<span class="details-label">'.(!empty($info['release_date']) ? __('Release Date').'</span> : '.$info['release_date'] : '').'
				'.(!empty($info['changelog']) ? '
				<a href="" data-toggle="modal" data-target="#changelog_div" class="sai_changelogbut">'.__('Changelog').'</a>' : '').'
			</p>
		</div>
	</div><br />
	
	<style>
	
		.logo_style{
			padding-left: 25px !important;
			padding-top: 12px !important;
		}
		
		@media screen and (min-width: 360px) and (max-width: 767px){
			.logo_style{
				padding: 18px 0px 10px 8px !important;
			}
			.related_scripts{
				padding-left: 0px !important;
			}
		}
		@media screen and (min-width: 768px) and (max-width: 799px){
			.logo_style{
				padding: 18px 0px 10px 8px !important;
			}
		}
	</style>
	
	<script type=text/javascript>';
	if(!empty($softpanel->pheader)){
		if(is_cp_theme('x3')){
			echo '
			$(document).ready(function(){
				
				// This is as per new method. Required
				$(".details_style").css("padding-left","40px");
				
				$(".ver_style").css("margin-left","0px");
				$(".release_style").css("margin-left","0px");
				$(".change_style").css({"margin-left":"0px", "margin-top":"-15px"});
			});';
		}else{
			echo '
			$(document).ready(function(){
				$(".ver_style").css("margin-left","0px");
				$(".release_style").css("margin-left","0px");
				$(".change_style").css({"margin-left":"0px", "margin-top":"-10px"});
			});';
		}
	}

	echo '
	</script>
	
	<div class="old_tab">
		<div class="sai_tabs row">
			<div class="sai_single-tab" style="width:14%">
				<a href="javascript:tabs.tab(\'install\')" class="sai_tab" id="install">'.__('Install').'</a>
			</div>
			<div>
				<a class="sai_insbut" id="show_install_option"><span class="caret" style="cursor:pointer; padding:6px;"></span></a>
			</div>
			<div class="sai_single-tab" style="width:14%">
				<a href="javascript:tabs.tab(\'overview\')" class="sai_tab" id="overview">'.__('Overview').'</a>
			</div>
			<div class="sai_single-tab" style="width:14%">
				<a href="javascript:tabs.tab(\'features\')" class="sai_tab" id="features">'.__('Features').'</a>
			</div>
			'.(empty($globals['off_screenshot_link']) ? '<div class="sai_single-tab" style="width:14%"><a href="javascript:tabs.tab(\'screenshots\'); loadScreenshots();" class="sai_tab" id="screenshots">'.__('Screenshots').'</a></div>' : '').'
			'.(empty($globals['off_demo_link']) ? '<div class="sai_single-tab" style="width:14%"><a href="'.($soft >= 10000 && !empty($info['demo']) ? $info['demo'] : $globals['ind'].'act=demos&soft='.$soft).'" class="sai_tab" id="demo" target="_blank">'.__('Demo').'</a></div>' : '').'
			'.(empty($globals['off_rating_link']) && $soft < 10000 ? '<div class="sai_single-tab" style="width:14%"><a href="javascript:tabs.tab(\'ratings\')" class="sai_tab" id="ratings">'.__('Ratings').'</a></div>' : '').'
			'.(empty($globals['off_review_link']) && $soft < 10000 ? '<div class="sai_single-tab" style="width:14%"><a href="javascript:tabs.tab(\'reviews\')" class="sai_tab" id="reviews">'.__('Reviews').'</a></div>' : '').'
			'.((empty($info['import']) || !empty($globals['disable_import'])) ? '' : '<div class="sai_single-tab" style="width:14%"><a href="'.$globals['ind'].'act=import&soft='.$soft.'" class="sai_tab" id="import">'.__('Import').'</a></div>').'
		</div>
		<div class="quick_install_dropdown sai_single-tab" id="quick_install_dropdown" style="display:none;">
			<div id="quick_install_btn" class="quick_install_dropdown_btn">
				<a href="javascript:tabs.tab(\'install\')">'.__('Quick Install').'</a>
			</div>
			<div id="custom_install_btn" class="quick_install_dropdown_btn">
				<a href="javascript:tabs.tab(\'install\')">'.__('Custom Install').'</a>
			</div>
		</div>
	</div><br />
	
	<div class="new_tab">
		<nav class="navbar navbar-default p-0">
			<div class="navbar-header w-100 p-3">
				<button type="button" class="navbar-toggle d-inline-block pull-right" data-toggle="collapse" data-target="#myNavbar">
					<i class="fas fa-bars"></i>
				</button>
				<ul class="nav">
					<li class="active">
						<a href="javascript:tabs.tab(\'install\')" id="install" class="sai_tab2 text text-decoration-none" style="height:40px; top:5px;">'.__('Install').'</a>
					</li>
					<li class="nav-item dropdown">
						<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="font-size:16px;">

						</a>
						<div class="dropdown-menu" aria-labelledby="navbarDropdown">
							<a href="javascript:tabs.tab(\'install\')" id="quick_install_btn" class="dropdown-item sai_tab2 text-decoration-none">'.__('Quick Install').'</a>
							<div class="dropdown-divider"></div>
							<a href="javascript:tabs.tab(\'install\')" id="custom_install_btn" class="dropdown-item sai_tab2 text-decoration-none">'.__('Custom Install').'</a>
						</div>
				  </li>
				</ul>
			</div>
			<div class="collapse navbar-collapse soft-options p-2 px-3" id="myNavbar" data-toggle="collapse" data-target=".navbar-collapse">
				<ul class="nav navbar-nav">
					<a href="javascript:tabs.tab(\'overview\')" id="overview" class="sai_tab2 text-decoration-none">
					<li>
						'.__('Overview').'
					</li>
					</a>
					<div class="dropdown-divider"></div>
					<a href="javascript:tabs.tab(\'features\')" id="features" class="sai_tab2 text-decoration-none">
					<li>
						'.__('Features').'
					</li>
					</a>
					<div class="dropdown-divider"></div>
					'.(empty($globals['off_screenshot_link']) ? '
						<a href="javascript:tabs.tab(\'screenshots\'); loadScreenshots();" class="sai_tab2 text-decoration-none" id="screenshots">
					<li>
					'.__('Screenshots').'
					</li>
					</a>' : '').'
					<div class="dropdown-divider"></div>
					'.(empty($globals['off_demo_link']) ? '
						<a href="'.($soft >= 10000 && !empty($info['demo']) ? $info['demo'] : $globals['ind'].'act=demos&soft='.$soft).'" class="sai_tab2 text-decoration-none" id="demo" target="_blank">
					<li>
					'.__('Demo').'
					</li>
					</a>' : '').'
					<div class="dropdown-divider"></div>
					'.(empty($globals['off_rating_link']) && $soft < 10000 ? '
						<a href="javascript:tabs.tab(\'ratings\')" class="sai_tab2 text-decoration-none" id="ratings">
					<li>
					'.__('Ratings').'
					</li>
					</a>' : '').'
					<div class="dropdown-divider"></div>
					'.(empty($globals['off_review_link']) && $soft < 10000 ? '
						<a href="javascript:tabs.tab(\'reviews\')" class="sai_tab2 text-decoration-none" id="reviews">
					<li>
					'.__('Reviews').'
					</li>
					</a>' : '').'
					<div class="dropdown-divider"></div>
					'.((empty($info['import']) || !empty($globals['disable_import'])) ? '' : '
						<a href="'.$globals['ind'].'act=import&soft='.$soft.'" class="sai_tab2 text-decoration-none" id="import">
					<li>
					'.__('Import').'
					</li>
					</a>').'
				</ul>
			</div>
		</nav>
	</div>';
	
	apply_filters('pre_software_overview_theme', $soft);

	//Maximum Installation Limit per script
	if(!empty($globals['max_ins_script']) && $ins_count_per_script >= $globals['max_ins_script']){
		echo '<br />
		<div class="alert alert-danger">
			<a href="#close" class="close" data-dismiss="alert" aria-label="close">&times;</a>
			<center>'.__('You have reached the maximum number of (<b>$0</b>) Installations allowed per script', array($globals['max_ins_script'])).'</center>
		</div>';	
	}
	
	if(!empty($outdated_script)){
		echo '<div class="alert alert-warning text-center mt-2">'.__('<b>$0</b> has not been updated for more than two years and may no longer be maintained or supported by the script vendor', array($software['name'])).'</div>';
	}
	
	echo '

<script type="text/javascript">
$_(tabs.inittab).className = tabs.tabbedclass;
var softid = '.$soft.'

tabs.override = function(id){
	if(id == \'install\'){
		$_(\'install\').className = \'sai_insbutclicked\';
	}else{
		$_(\'install\').className = \'sai_insbut\';
	}
};
</script>';

if(!empty($scripts[$soft]['screenshots'])){
	$screenshot_src = $globals['mirror_images'].'softimages/screenshots/'.$soft.'_screenshot1.gif';
}elseif($soft >= 10000){
	if(file_exists($theme['images'].'topscripts/screenshots/'.$soft.'_screenshot1.gif')){
		$screenshot_src = $theme['images'].'topscripts/screenshots/'.$soft.'_screenshot1.gif';
	}
}


//Parse and take care of images
$info['overview'] = (!empty($info['changelog']) ? '
<div class="modal fade" id="changelog_div" role="dialog">
    <div class="modal-dialog modal-lg">
      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
		<h4 class="modal-title">Changelog</h4>
          	<button type="button" class="close" data-dismiss="modal">&times;</button>          
        </div>
        <div class="modal-body">
          '.$info['changelog'].'
        </div>
      </div>
    </div>
</div>' : '').'
<div class="bg2">
	<div class="row">
		'.(!empty($screenshot_src) && (empty($softpanel->pheader) || (!empty($softpanel->pheader) && is_cp_theme('paper_lantern'))) ? '
		<div class="col-12 col-sm-6 col-md-6 col-xl-6">
			<div id="overview_img" class="overview-img"> 
				<img src="'.$screenshot_src.'" class="img-fluid" alt=""> 
			</div>
			<div class="row mt-4 text-center">
				<div class="offset-0 offset-lg-2 col-6 col-lg-4">
					<a href="javascript:tabs.tab(\'install\')" id="install_now">
						<span class="btn sai-button">'.__('Install Now').'</span>
					</a>
				</div>
				<div class="col-6 col-lg-4">
					<a href="javascript:tabs.tab(\'overview\')" id="my_app">
						<span class="btn sai-button">'.__('My Apps').'</span>
					</a>
				</div>
			</div>	
		</div>
		<div class="col-sm-6 col-md-6 col-12">': '<div class="col-sm-12 col-12">').'
			<p class="softphrase-overview">'.softparse($info['overview'], $soft).'</p>
			<div class="row">
				<div class="col-sm-12 col-md-6 col-xs-12">					
					<span class="sai-icon-style">
						<i class="fas fa-inbox"></i>
					</span>					
					<span class="sai_head">'.__('Space Required').'</span>
					<span class="sai_exp2 mt-2 d-block">'.
						(!empty($globals['off_available_space']) ? '' : __('Available Space').' : '.(is_numeric($softpanel->spaceremain) ? number_format($softpanel->spaceremain/1024/1024, 2) : $softpanel->spaceremain).' '.__('MB').'<br />')
						.__('Required Space').' : '.number_format($software['spacereq']/1024/1024, 2).' '.__('MB')
					.'</span>
				</div>
				<div class="col-sm-12 col-md-6 col-xs-12">					
					<a href="'.$info['support'].'" class="text-decoration-none">
						<span class="sai-icon-style">
							<i class="fas fa-question-circle"></i>
						</span>
					</a>					
					<span class="sai_head">'.__('Software Support').'</span><br/>
					<a class="mt-2 d-block support-link" href="'.$info['support'].'" target="_blank">'.__('Visit Support Site').'</a>
					<span class="sai_exp2">'.__('Note: Softaculous does not provide support for any software.').'</span>
				</div>
			</div>';
			$info['overview'] .='
		</div>
	</div>
</div><!--end of bg2 class-->';

if((!empty($installations[$soft]) || array_intersect(array_keys($installations), array_keys($software['branch']))) && empty($globals['disable_current_ins'])){
	
	$info['overview'] .= '
	<div class="row mt-5">
		<div class="col-12">
			<div class="text-center">
				<span class="sai_newhead d-block" id="current_ins">'.__('Current Installations').'</span>
				<hr class="sai_main_head_hr">
			</div>
			<div class="table-responsive">';
	$info['overview'] .= '
		<table class="table table-hover installation-list-table">			
			<thead class="sai_head2">
				<tr>
					<th>'.__('Link').'</th>
					<th>'.__('Admin').'</th>
					<th>'.__('Installation Time').'</th>
					<th>'.__('Version').'</th>
					<th style="text-align:center;">'.__('Options').'</th>
					<th><input type="checkbox" id="check_all"></th>
				</tr>
			</thead>';
		$i=1;
		
		$highlight = optGET('highlight');
		$action = optGET('postact');

	foreach($installations[$soft] as $ik => $iv){
	
		$iv['sid'] = get_sid_by_version($iv['ver'], $iv['sid']);
		$is_cloneable = is_cloneable($iv['sid']);
		
		$is_upgradable = is_upgradable($ik);
		
		$info['overview'] .= '<tr id="trid' . $ik . '">
					<td class="endurl"><a href="'.$iv['softurl'].'" target="_blank" id="insurl'.$ik.'">'.$iv['softurl'].'</a>'.(($highlight == $ik && !empty($action)) ? '<span id="highlight" class="ml-1"><b class="sai_highlight">'.$l['act_'.$action].'</b></span>' : '').'</td>
					
					<td>
						<a href="'.$iv['softurl'].'/'.(!empty($iv['admin_folder']) ? $iv['admin_folder'] : admin_folder($iv['sid'])).'" target="_blank" title="'.__('Login as admin').'" class="someclass"><i class="fas fa-user px-1 sai_icons"></i></a></a>
					</td>
					<td>
				'.datify($iv['itime']).'
			</td>
			<td>
						'.$iv['ver'].(!empty($is_upgradable) ? ' <a href="'.$globals['ind'].'act=upgrade&insid='.$ik.'" title="'.__('Upgrade to Version').' '.implode(' or ', $is_upgradable).'" class="someclass"><i class="fas fa-sync-alt px-1 sai_icons" style="color:#1565C0; font-size:1.2em;"></i></a>' : '').'
			</td>
			<td align="right">'.
				(!empty($is_cloneable) ? ' <a href="'.$globals['ind'].'act=sclone&insid='.$ik.'" title="'.__('Clone').'" class="someclass mr-1"><i class="fas fa-copy px-1 sai_icons" style="color:#1565C0;"></i></a>' : '').
				(empty($globals['disable_backup_restore']) ? '<a href="'.$globals['ind'].'act=backup&insid='.$ik.'" title="'.__('Backup').'" class="someclass mr-1"><i class="fas fa-file-archive px-1 sai_icons" style="color:#119768;"></i></a>' : '').
				'<a href="'.$globals['ind'].'act=editdetail&insid='.$ik.'" title="'.__('Edit Details').'" class="someclass"><i class="fas fa-pencil-alt px-1 sai_icons" style="color:#FF5D00;"></i></a>
				<a href="'.$globals['ind'].'act=remove&insid='.$ik.'" title="'.__('Remove').'" class="someclass"><i class="fas fa-trash-alt sai_icons" style="color:red;"></i></a>
			<td>
				<input type="checkbox" name="insids[]" id="'.$iv['softurl'].'" value="'.$ik.'" class="shift_select_ins soft_inslist">
			</td>
				</tr>';
				$i++;
	}

	$info['overview'] .= '</table>
						</div>
					</div>		
				</div>
		<p class="text-right">
			<span class="sai_head">'.__('With Selected').':</span>
			<select name="multi_options" id="multi_options" class="mr-1">
				<option name="todo" id="todo" value="0">---</option>
				<option name="todo" id="todo" value="mult_rem">'.__('Remove Completely').'</option>
				<option name="todo" id="todo" value="mult_rem_info">'.__('Remove from $0', array(APP)).'</option>
			</select>

			<input type="button" value="'.__('Go').'" onclick="show_confirm()" class="btn sai-button">
		</p>
		<div id="rem_div"></div>
	
<script language="javascript" type="text/javascript"><!-- // --><![CDATA[
insids = new Array();
removed = new Object();

function show_confirm(){
	
	insids = new Array();
	removed = new Object();
	
	$sel_opt = $_("multi_options").value;
	
	if($sel_opt != "mult_rem" && $sel_opt != "mult_rem_info"){
		return false;
	}

	// Build the list of Installations to remove
	var field = document.getElementsByName(\'insids[]\');
		insids = new Array();
		var c = 0;
		for(i = 0; i < field.length; i++){
			if(field[i].checked == true){
				insids[c] = field[i].value;
				c++;
			}
		
	}
	//alert(insids);
	
	if(c == 0){
		alert("'.__js('No installation(s) selected to remove.').'");
		return false;
	}
	
	var r = confirm("'.__js('Are you sure you wish to remove the selected installations ? The action will be irreversible. No further confirmations will be asked.').'");
	if(r != true){
		return false;
	}
	
	if($sel_opt == "mult_rem_info"){
		remove_by_id(insids[0], "", 0, 1);
	}else{
		remove_by_id(insids[0], "", 0);
	}
}

function remove_by_id(insid, re, oldinsid, info_only){

	removed[insid] = false;
	info_only = info_only || 0;
	
	if(re.length > 0 && oldinsid > 0){
		if(re == "removed"){
			removed[insid] = true;
		}
	}
	
	nextinsid = 0;
	
	// Find the next INSTALLATION to remove
	for(i = 0; i < insids.length; i++){
		if(typeof(removed[insids[i]]) != "undefined"){
			continue;
		}
		nextinsid = insids[i];
		break;
	}
	
	// If there is something left to be removed
	if(insid != 0){
		var csrf_token = $("#csrf_token").val(); 
		
		try{

			$.ajax({
				type: "POST",
				data: "csrf_token="+csrf_token,
				url: "'.$globals['index'].'act=remove&insid="+insid+"&ajax=1&ssk="+randomstring(32)+"&random="+Math.random()+"&info_only="+info_only,
				// Checking for error
				success: function(data){
					remove_by_id(nextinsid, data, insid, info_only);
				}
			});
			
			$_("rem_div").innerHTML = "<br /><br /><p align=\"center\"><img src=\"' . $theme['images'] . 'ajax_remove.gif\"> <br />'.__js('Removing Installation - '). ' ID: " +insid+ ", URL: " + $_("insurl"+insid)+"<br /></p>";
			return true;
		}catch(e){
			return false;
		}
	}
	$_("rem_div").innerHTML = "";
	alert("'.__js('The selected installation(s) have been removed. The page will now be reloaded !').'");
	location.reload(true);
	return true;
}

$(document).ready(function(){
	$("#check_all").on("click", function(event){
		if(this.checked == true){
			$(".soft_inslist").prop("checked", true);
		}else{
			$(".soft_inslist").prop("checked", false);
		}
	});
	
	$(".sai_altrowstable tr").mouseover(function(){
		var old_class = $(this).attr("class");
		
		if(old_class == "nohover") return;
		
		//alert(old_class);
		$(this).attr("class", "sai_tr_bgcolor");
		
		$(this).mouseout(function(){
			$(this).attr("class", old_class);
		});
		
	});
	
	$("#my_app").click(function(){
		goto_id("current_ins");
	});';
	
// If we get anything in $highlight than only we have to call this JS function other wise it will cause the JS error.
if(!empty($highlight)){
	$info['overview'] .= 'goto_id("insurl'.$highlight.'");
	$("#highlight").fadeOut(10000);';
}
	
$info['overview'] .= '});

// ]]></script>';
	
}

if(count($allcatwise[$software['type']][$software['cat']]) > 2 && $software['cat'] != 'others' && empty($globals['disable_related_scripts'])){

	$info['overview'] .= '
	<div class="bg2">
		<div class="row mt-2">
			<div class="col-12 ">
				<span class="sai_newhead d-block" id="current_ins">'.__('Related Scripts').'</span>
				<hr class="sai_main_head_hr">
			</div>		
		</div>
		
		<div class="row related_scripts">';
				
		$i = 0;

		foreach($allcatwise[$software['type']][$software['cat']] as $k => $v){

			if(($k == $soft) || (!empty($scripts[$k]['parent']) && !empty($iscripts[$scripts[$k]['parent']]))){
				continue;
			}
			
			// Show only 5 scripts
			if($i == 5){
				break;
			}
			
			$info['overview'] .='
			<div class="col-sm-3 col-md-2 col-6">
				<a href="'.script_link($k).'" title="'.$v['desc'].'" alt="" class="someclass softtooltip related-scripts">
					<div class="sai_blog_script">
						<div class="sai_demo_script_logo">
							<img src="'.$globals['softimages'].'top15/48/'.$v['softname'].'.png" >	
						</div>
						<div class="sai_script_name">'.$v['name'].'</div>
					</div>
				</a>
			</div>';
			
			$i++;
		
		}
	$info['overview'] .='</div><!--end of row-->
	</div><!--end of bg2 class-->';
}

//Parse and take care of images
$info['features'] = '<div class="bg2"><br />'.softparse($info['features'], $soft).'</div><!--end of bg2 class-->';
$info['ratings'] = '';
$info['screenshots'] = '<div class="row">
		<div class="col-12 mx-auto">
			<iframe src="" id="screenshots_iframe" class="screenshots_iframe" frameborder="0" scrolling="no"></iframe>
		</div>	
	</div>';
	
$info['reviews'] = '<div class="bg2"><div id="allreviews"></div></div><!--end of bg2 class-->';

foreach($info as $k => $v){
	
	if(in_array($k, array('demo', 'support', 'import', 'changelog'))) continue;
		echo '<div id="'.$k.'_win" style="display: '.($init_tab == $k ? "block" : "none").'; width:100%;"><br />
				'.$v.'
			</div>';

}
echo '</div>';
	

softfooter();

}
?>