Current File : //etc/zpanel/panel/modules/sub_domains/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>
#inDestination{min-width:200px;min-height:35px;}
.helpicon {
display: block;
float: right;
border: 1px solid #ccc;
background-color: #f3f3f3;
padding: 5px 10px;
font-size: 12px;
margin-top:-80px;
margin-right:6px;
-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>
<@ Result @>
<% if isDeleteDomain %>
<div class="zform_wrapper alert alert-danger">
<h2><: Delete :>: <@ CurrentDomain @>?</h2>
<p><: Please confirm that you want to delete this domain. :></p>
<form action="./?module=sub_domains&action=DeleteSubDomain" method="post">
<table class="none" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="right">
<input type="hidden" name="inDelete" value="<@ CurrentID @>">
<button class="button-loader delete btn btn-danger" type="submit" ><: Delete :></button>
<button class="button-loader btn btn-default" type="button" onclick="window.location.href='./?module=sub_domains';return false;"><: Cancel :></button>
</td>
</tr>
</table>
<@ CSFR_Tag @>
</form>
</div>
<% endif %>
<% if isEditSubDomain %>
<div class="zform_wrapper">
<h2><: Edit Domain :>: <@ EditCurrentSubDomain @></h2>
<form action="./?module=sub_domains&action=UpdateSubDomain" method="post" autocomplete="off" >
<table class="table table-striped">
<tr>
<th style="width: 165px;"><: Home directory :>:</th>
<td><input name="inAutoHome" type="radio" id="inAutoHome" value="2" onclick="show_div('showdomainselect')&hideManual();" /> <: Use existing home directory :></td>
</tr>
<tr id="showdomainselect" style="display:none;" >
<th style="width: 165px;"> </th>
<td>
<select name="inDestination" id="inDestination">
<option value="">/</option>
<% loop SubDomainDirsList %>
<option value="<& domains &>">/<& domains &></option>
<% endloop %>
</select>
</td>
</tr>
<tr>
<th nowrap="nowrap"> </th>
<td><input name="inAutoHome" type="radio" id="inAutoHome" value="3" onclick="hide_div('showdomainselect')&showManual();" /> <: Manual Config :></td>
</tr>
<tr id="manual_config_dir" style="display:none;">
<th style="width: 165px;"> </th>
<td>
<div class="lblcls"><: Directory :>:</div>
<input type="text" id="default_path" name ="default_path" value="<@ UserName @>/public_html/" readonly="readonly" style="height: 29px;"/>
<input name="inDir" type="text" id="inDir" size="30" maxlength="50" style="height: 29px;"/>
</td>
</tr>
<tr>
<td> </td>
<td>
<button class="button-loader btn btn-primary" type="submit" name="inSave" value="<@ EditID @>"><: Save :></button>
<button class="button-loader btn btn-default" type="button" onclick="window.location.href='./?module=sub_domains';return false;"><: Cancel :></button>
</td>
<td></td>
</tr>
</table>
<@ CSFR_Tag @>
</form>
</div>
<% endif %>
<div class="zgrid_wrapper">
<h2><: Current Sub-domains :></h2>
<% if SubDomainList %>
<form action="./?module=sub_domains&action=EditSubDomain" method="post">
<table class="table table-striped">
<tr>
<th><: Sub-domain :></th>
<th><: Home directory :></th>
<th><: Status :></th>
<th></th>
<th></th>
</tr>
<% loop SubDomainList %>
<tr>
<td><a href="http://<& subname &>/" target="_blank"><& subname &></a></td>
<td><& subdirectory &></td>
<& substatus &>
<td><button class="button-loader btn btn-default" type="submit" name="inEdit_<& subid &>" id="inEdit_<& subid &>" value="inEdit_<& subid &>"><: Edit :></button>
<button class="button-loader delete btn btn-danger" type="submit" id="button" name="inDelete_<& subid &>" id="inDelete_<& subid &>" value="inDelete_<& subid &>"><: Delete :></button></td>
</tr>
<% endloop %>
</table>
<@ CSFR_Tag @>
</form>
<% else %>
<: You currently do not have any Sub-domains configured. Create a Sub-domain using the form below. :>
<% endif %>
</div>
<div class="zform_wrapper">
<table class="none" width="100%" cellborder="0" cellspacing="0">
<tr valign="top">
<td>
<h2>Create a new sub-domain</h2>
<% if CreateSubDomain %>
<form action="./?module=sub_domains&action=CreateSubDomain" method="post" name="CreateDomain">
<table class="table table-striped">
<tr>
<th nowrap="nowrap"><: Sub-domain :>:</th>
<td nowrap="nowrap"><input name="inSub" type="text" id="inSub" style="width: 48%;" /> . <select name="inDomain" id="inDomain" style="width: 50%;">
<% loop DomainList %>
<option value="<& name &>"><& name &></option>
<% endloop %>
</select>
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Home directory :>:</th>
<td><input name="inAutoHome" type="radio" id="inAutoHome" value="1" onclick="hide_div('showdomainselect')&hideManual();" CHECKED /> <: Create a new home directory :></td>
</tr>
<tr>
<th style="width: 165px;"> </th>
<td><input name="inAutoHome" type="radio" id="inAutoHome" value="2" onclick="show_div('showdomainselect')&hideManual();" /> <: Use existing home directory :></td>
</tr>
<tr id="showdomainselect" style="display:none;">
<th style="width: 165px;"> </th>
<td>
<div>
<select name="inDestination" id="inDestination">
<option value="">/</option>
<% loop SubDomainDirsList %>
<option value="<& domains &>">/<& domains &></option>
<% endloop %>
</select>
</div>
</td>
</tr>
<tr>
<th nowrap="nowrap"> </th>
<td><input name="inAutoHome" type="radio" id="inAutoHome" value="3" onclick="hide_div('showdomainselect')&showManual();" /> <: Manual Config :></td>
</tr>
<tr id="manual_config_dir" style="display:none;">
<th style="width: 165px;"> </th>
<td>
<div class="lblcls"><: Directory :>:</div>
<input type="text" id="default_path" name ="default_path" value="<@ UserName @>/public_html/" readonly="readonly" style="height: 29px;"/>
<input name="inDir" type="text" id="inDir" size="30" maxlength="50" style="height: 29px;"/>
</td>
</tr>
<tr>
<th></th>
<td><button class="button-loader btn btn-primary" type="submit" id="button" name="CreateSubDomain" value="1">Create</button></td>
</tr>
</table>
<@ CSFR_Tag @>
</form>
<% else %>
<: You have reached your Sub-domains limit! :>
<% endif %>
</td>
<td align="right"><@ SubDomainUsagepChart @></td>
</tr></table>
</div>
</div>
<script type="text/javascript">
function showManual() {
var x = document.getElementById('manual_config_dir');
x.style.display = 'table-row';
}
function hideManual() {
var x = document.getElementById('manual_config_dir');
x.style.display = 'none';
}
<!--
function show_div(id) {
var e = document.getElementById(id);
if(e.style.display == 'none')
e.style.display = 'table-row';
}
//-->
</script>
<script type="text/javascript">
<!--
function hide_div(id) {
var e = document.getElementById(id);
if(e.style.display.trim() == 'block' || e.style.display.trim() == 'table-row' )
e.style.display = 'none';
}
//-->
</script>