Current File : //root/panel/modules/ssl_crt/module.zpm |
<div class="zmodule_content panel" id="zmodule_header_<@ ModuleName @>">
<div class="panel-heading">
<img src="<@ ModuleIcon @>" width="35" height="35" border="0" alt="<@ ModuleName @>">
<div class="zmodule_title">
<@ ModuleName @>
</div>
<div class="zmodule_desc" id="zmodule_desc_<@ ModuleName @>"><@ ModuleDesc @></div>
</div>
<style>
.helpicon {
display: block;
float: right;
border: 1px solid #ccc;
background-color: #f3f3f3;
padding: 5px 10px;
font-size: 12px;
margin-top:-121px;
margin-right:5px;
-webkit-box-shadow: -8px 7px 5px 0px rgba(204,204,204,1);
-moz-box-shadow: -8px 7px 5px 0px rgba(204,204,204,1);
box-shadow: -8px 7px 5px 0px rgba(204,204,204,1);
-webkit-box-shadow: 8px 7px 5px 0px rgba(204,204,204,1);
-moz-box-shadow: 8px 7px 5px 0px rgba(204,204,204,1);
box-shadow: 8px 7px 5px 0px rgba(204,204,204,1);
}
</style>
<div class="helpicon">
<a href="<@ helpicon @>" target="_blank"><img src="etc/styles/CstyleX-master/images/help.png" style="float:left;" ><span style="float:left;margin-top:8px;font-weight:bold;font-size:12px;" >Video Tutorial</span></a>
</div>
<div id="zform_wrapper">
<@ Result @>
</div>
<div id="zgrid_wrapper_call">
</div>
<% if isDeleteDomain %>
<div class="zform_wrapper alert alert-danger" Id="zgrid_wrapper4">
<h2><: Delete :>: <@ CurrentDomain @>?</h2>
<p><: Please confirm that you want to delete SSL for this domain. :></p>
<table class="none" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="right">
<input type="hidden" Id="inDelete" name="inDelete" value="<@ CurrentID @>">
<button class="delete btn btn-danger" type="submit" id="DelSSL" onclick="DelSSL()" ><: Delete :></button>
<button class="button-loader btn btn-default" type="button" onclick="window.location.href='./?module=ssl_crt';return false;"><: Cancel :></button>
</td>
</tr>
</table>
<@ CSFR_Tag @>
</div>
<% endif %>
<% if isEditDomain %>
<div class="zform_wrapper alert alert-danger" Id="zgrid_wrapper3">
<h2><: Edit :>: <@ CurrentDomain @>?</h2>
<p><: Please confirm that you want to Edit this domain. :></p>
<table class="none" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="right">
<input type="hidden" Id="inEdit" name="inEdit" value="<@ CurrentID @>">
<input type="hidden" Id="inEditDomain" name="inEditDomain" value="<@ CurrentDomain @>">
<button class="button-loader delete btn btn-danger" type="submit" id="EditSSL" onclick="EditSSL()" ><: Edit :></button>
<button class="button-loader btn btn-default" type="button" onclick="window.location.href='./?module=ssl_crt';return false;"><: Cancel :></button>
</td>
</tr>
</table>
<@ CSFR_Tag @>
</div>
<% endif %>
<div class="zgrid_wrapper" Id="zgrid_wrapper">
</div>
<div class="zgrid_wrapper" Id="zgrid_wrapper1">
<table class="none" width="100%" cellborder="0" cellspacing="0">
<tr valign="top">
<td>
<h2><: Upload a New Certificate :></h2>
<form action="./?module=ssl_crt&action=SaveSSL" enctype="multipart/form-data" method="post" id="register">
<table class="table table-striped">
<tr>
<th nowrap="nowrap"><: Paste the certificate into the following text box :>:</th>
</tr>
<tr>
<td><textarea style="width:600px;height:130px;" name="ca_bundle" id="ca_bundle"><& a_body &></textarea></td>
</tr>
<tr>
<th nowrap="nowrap"><: Description :>:</th>
</tr>
<tr>
<td><textarea style="width:600px;height:81px;" name="ca_desc" id="ca_desc"><& a_body &></textarea></td>
</tr>
<tr>
<th>
<button class="button-loader btn btn-primary" type="submit" name="SaveSSL" id="SaveSSL" value="inCreate"><: Save Certificate :></button>
</th>
<td></td>
<td></td>
</tr>
</table>
</form>
<@ CSFR_Tag @>
</td>
</tr>
</table>
</div>
<div class="zgrid_wrapper" Id="zgrid_wrapper2">
<table class="table table-striped">
<form action="./?module=ssl_crt&action=UploadSSL" enctype="multipart/form-data" method="post" id="register">
<tr>
<td><h2><: Upload a CRT files :></h2></td>
</tr>
<tr>
<td><: Choose a certificate file (*.crt). :> <b>Note:</b> Upload only CRT certificate file</td>
</tr>
<tr>
<td><input type="file" name="ca_file" id="ca_file" style="width:200px;"></td>
</tr>
<tr>
<th nowrap="nowrap"><: Description :>:</th>
</tr>
<tr>
<td><textarea style="width:600px;height:81px;" name="ca_fdesc" id="ca_fdesc"><& a_body &></textarea></td>
</tr>
<tr>
<th>
<button class="button-loader btn btn-primary" type="submit" name="UploadSSL" id="UploadSSL" value="inCreate"><: Upload Certificate :></button>
</th>
<td></td>
<td></td>
</tr>
</form>
</table>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
type: 'POST',
url: './?module=ssl_crt&action=SslCrtList',
success: function(data) {
$("#zgrid_wrapper").html(data);
},
error: function(ts) {
console.log(ts.responseText);
}
});
});
</script>
<script type="text/javascript">
function DelSSL()
{
$("#zloader_overlay").show();
$("#zloader").show();
var inDelete;
inDelete=$("#inDelete").val();
$.ajax({
url: './?module=ssl_crt&action=DeleteSslDomain',
type:'post',
async : false,
data: {inDelete:inDelete},
success: function(data) {
$('#close_button').trigger("click");
$.ajax({
type: 'POST',
async:false,
url: './?module=ssl_crt&action=SslCrtList',
success: function(data) {
$("#zgrid_wrapper").html(data);
},
error: function(ts) {
console.log(ts.responseText);
}
});
console.log (data);
data=data.replace("\n","");
if(data=="DONE")
{
$(".zform_wrapper").hide();
$("#zform_wrapper").prepend('<div class="alert alert-block alert-info"><button type="button" Id="close_button" onClick="CloseParent();" class="close" data-dismiss="alert">×</button><p><strong>Success:</strong> SSL Certificate successfully Deleted .</p></div>');
}
else
{
$(".zform_wrapper").hide();
$("#zform_wrapper").prepend('<div class="alert alert-block alert-info"><button type="button" Id="close_button" onClick="CloseParent();" class="close" data-dismiss="alert">×</button><p><strong>Failed:</strong> SSL Certificate Delete Failed .</p></div>');
}
$("#zloader_overlay").hide();
$("#zloader").hide();
},
error: function(ts) {
console.log(ts.responseText);
$("#zloader_overlay").hide();
$("#zloader").hide();
}
});
return false;
}
</script>
<script type="text/javascript">
function EditSSL()
{
$("#zloader_overlay").show();
$("#zloader").show();
var inEdit;
var inEditDomain;
inEdit=$("#inEdit").val();
inEditDomain=$("#inEditDomain").val();
$.ajax({
url: './?module=ssl_crt&action=EditSslDomain',
type:'post',
data: {inEdit:inEdit,inEditDomain:inEditDomain},
success: function(data) {
$('#close_button').trigger("click");
$.ajax({
type: 'POST',
url: './?module=ssl_crt&action=SslCrtList',
success: function(data) {
$("#zgrid_wrapper").html(data);
},
error: function(ts) {
console.log(ts.responseText);
}
});
console.log (data);
$("#zgrid_wrapper_call").html(data);
document.getElementById('zgrid_wrapper').style.display='none';
document.getElementById('zgrid_wrapper1').style.display='none';
document.getElementById('zgrid_wrapper2').style.display='none';
document.getElementById('zgrid_wrapper3').style.display='none';
$("#zloader_overlay").hide();
$("#zloader").hide();
},
error: function(ts) {
console.log(ts.responseText);
$("#zloader_overlay").hide();
$("#zloader").hide();
}
});
return false;
}
</script>
<script type="text/javascript">
function showManual() {
var x = document.getElementById('manual_config_dir');
x.style.display = 'table-row';
}
</script>