<?php

//////////////////////////////////////////////////////////////
//===========================================================
// createssl_theme.php
//===========================================================
// SOFTACULOUS VIRTUALIZOR
// Version : 1.0
// Inspired by the DESIRE to be the BEST OF ALL
// ----------------------------------------------------------
// Started by: Alons
// Date:       8th Mar 2010
// Time:       23:00 hrs
// Site:       https://www.virtualizor.com/ (SOFTACULOUS VIRTUALIZOR)
// ----------------------------------------------------------
// Please Read the Terms of use at https://www.virtualizor.com
// ----------------------------------------------------------
//===========================================================
// (c)Softaculous Ltd.
//===========================================================
//////////////////////////////////////////////////////////////

if(!defined('VIRTUALIZOR')){

	die('Hacking Attempt');

}

function createssl_theme(){

global $theme, $globals, $kernel, $user, $l, $info, $error, $done;

softheader($l['<title>']);

$GLOBALS['breadcrumbs'] = ['dashboard', 'lm_ssl', 'lms_createssl'];
					
echo page_header(__('Create SSL Certificate'), 'fas fa-lock', '', 0, 0, '');

error_handle($error);

if(!empty($done)){
	show_alert(__('SSL files created and installed successfully, but you will need to restart the Web Server.'));
	//echo '<div class="notice"><b>NOTE : </b>&nbsp; '..'</div>';
}


echo '
<div class="card p-2 mx-3">
<div id="form-container">
<form accept-charset="'.$globals['charset'].'" name="createssl" method="post" action="" class="form-horizontal">
<div class="row mx-auto w-100 my-3">
		<div class="col-sm-12 col-md-6 col-lg-6">
			
		</div>
		<div class="col-sm-12 col-md-6 col-lg-6">
			
		</div>
		
</div>
<div class="row mx-auto w-100 my-3">
		<div class="col-sm-12 col-md-6 col-lg-6">
			<label class="control-label">'.__('Country Code').'&nbsp;<a class="info" data-placement="right" tooltip="'.__('2 letter abbreviation e.g. US or IN').'"><i class="fas text-primary fa-info-circle"></i></a></label><br><input type="text" class="form-control" name="country" id="country" size="30" value="'.POSTval('country', '').'" />
		</div>
		<div class="col-sm-12 col-md-6 col-lg-6">
			<label class="control-label">'.__('State').'&nbsp;<a class="info" data-placement="right" tooltip="'.__('Name of the state or province').'"><i class="fas text-primary fa-info-circle"></i></a></label><br><input type="text" class="form-control" name="state" id="state" size="30" value="'.POSTval('state', '').'" />
		</div>
		
</div>
<div class="row mx-auto w-100 my-3">
		<div class="col-sm-12 col-md-6 col-lg-6">
			<label class="control-label">'.__('Locality').'&nbsp;<a class="info" data-placement="right" tooltip="'.__('Name of the city or town').'"><i class="fas text-primary fa-info-circle"></i></a></label><br><input type="text" class="form-control" name="locality" id="locality" size="30" value="'.POSTval('locality', '').'" />
		</div>
		<div class="col-sm-12 col-md-6 col-lg-6">
			<label class="control-label">'.__('Company Name').'&nbsp;<a class="info" data-placement="right" tooltip="'.__('Name of your Company or Organization').'"><i class="fas text-primary fa-info-circle"></i></a></label><br><input type="text" class="form-control" name="organisation" id="organisation" size="30" value="'.POSTval('organisation', '').'" />
		</div>
		
</div>
<div class="row mx-auto w-100 my-3">
		<div class="col-sm-12 col-md-6 col-lg-6">
			<label class="control-label">'.__('Company Branch').'&nbsp;<a class="info" data-placement="right" tooltip="'.__('Name of the Organization branch or division').'"><i class="fas text-primary fa-info-circle"></i></a></label><br><input type="text" class="form-control" name="orgunit" id="orgunit" size="30" value="'.POSTval('orgunit', '').'" />
		</div>
		<div class="col-sm-12 col-md-6 col-lg-6">
			<label class="control-label">'.__('Host').'&nbsp;<a class="info" data-placement="right" tooltip="'.__('Your name or your servers name').'"><i class="fas text-primary fa-info-circle"></i></a></label><br><input type="text" class="form-control" name="comname" id="comname" size="30" value="'.POSTval('comname', '').'" />
		</div>
		
</div>
<div class="row mx-auto w-100 my-3">
		<div class="col-sm-12 col-md-6 col-lg-6">
			<label class="control-label">'.__('Email Address').'&nbsp;<a class="info" data-placement="right" tooltip="'.__('Your email address').'"><i class="fas text-primary fa-info-circle"></i></a></label><br><input type="text" class="form-control" name="email" id="email" size="30" value="'.POSTval('email', '').'" />
		</div>
		<div class="col-sm-12 col-md-6 col-lg-6">
			<label class="control-label">'.__('RSA Key Size').'</label><br><select class="custom-select" name="keysize" id="keysize">
			<option value="1024">1024</option>
			<option value="2048">2048</option>
		</select>
		</div>	
</div>
</div>
<br /><br />
<center><input type="submit" name="create" value="'.__('Create SSL').'" class="go_btn"></center>

<br /><br />
</form>
<div class="notebox">
<font class="bboxtxt"><b>'.__('Note').'</b> : <br />'.__('This utility will create the SSL Certificate Private Key, the Certificate Signing Request and the Certificate itself. If you want to obtain and install a Certificate issued by an SSL Certificate Provider, then you will need the Certificate Signing Request (virtualizor.csr) which can be obtained from <a href="index.php?act=ssl#csr">here</a>').'</font>
</div>
</div>
</div>
';
softfooter();

}

?>