Current File : //etc/zpanel/panel/modules/mailq_management/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>

<@ Result @>
    <div id="contentwrapper_phpinfo">
        <div class="zform_wrapper" style="width:100%">
	   <h2><: Mail Queue :></h2>
        <% if MailList %>
	
		<form action="./?module=mailq_management&action=EditMail" method="post">
		
		 <button class="button-loader delete btn btn-danger btn_right" type="submit" id="button" name="inDeleteAll" onClick="return Delete_All();" >Delete All</button>
		 		 <button class="button-loader delete btn btn-danger btn_right" type="submit" id="button" name="inDeleteAllDef" onClick="return Delete_All_Deferred();" >Delete All Deferred</button>
		 <button class="button-loader delete btn btn-danger btn_right" type="submit" id="button" name="inSelDelete" onClick="return Delete_selected_Validation();" >Delete Selected</button>
       
            <table class="table table-striped">
                <tr>
					<th><: &nbsp; :></th>
                    <th><: Mail Id :></th>
                    <th><: Recipient :></th>
					<th><: &nbsp; :></th>
                </tr>
                <% loop MailList %>
                <tr>
					<td><input type="checkbox" class="select_particular_checkbox" value="<& email_id &>" /></td>
                    <td><& email_id &></td>
					<td><& receipient &></td>
					<td>  
					<a href="javascript:void(0);" class="button-loader btn btn-default" type="button" id="button" name="inView_<& email_id &>" onClick='View_Validation("<& email_id &>");'>View</a>
					<button class="button-loader delete btn btn-danger" type="submit" id="button" name="inDelete_<& email_id &>" value="<& email_id &>" onClick="return Delete_Validation(this.value);" >Delete</button>
					</td>
                    
                </tr>
                <% endloop %>
				<input type="hidden" Id="do_operation" name="do_operation" value="" />
				<input type="hidden" Id="do_value" name="do_value" value="" />
            </table>
            <@ CSFR_Tag @>
        </form>
        <% else %>
        <: No Mail in Mail Queue. :>
        <% endif %>
        </div>
    </div>

</div>
<!-- The Modal -->
<div id="myModal" class="modal">

  <!-- Modal content -->
  <div class="modal-content">
    <span class="close" onClick="hideoverlay();">x</span>
   <div Id="model-content-show"> <p>Some text in the Modal..</p></div>
  </div>

</div>

<script type="text/javascript">
function View_Validation(val)
{
var modal = document.getElementById('myModal');
document.getElementById("do_operation").value="View";
document.getElementById("do_value").value=val;
document.getElementById('zloader_content').style.display = "block";
document.getElementById('zloader_overlay').style.display = "block";
document.getElementById('zloader').style.display = "block";
$.ajax({

     type: "POST",
     url: 'ajaxcall.php',
     data: "id=" + val, // appears as $_GET['id'] @ your backend side
     success: function(data) {
           // data is ur summary
		   
document.getElementById('zloader_content').style.display = "none";
document.getElementById('zloader_overlay').style.display = "none";
document.getElementById('zloader').style.display = "none";
          $('#model-content-show').html(data);
		  modal.style.display = "block";
     }

   });

}
function Delete_Validation(val)
{
document.getElementById("do_operation").value="Delete";
document.getElementById("do_value").value=val;
return true;
}
function Delete_All()
{
document.getElementById("do_operation").value="DeleteAll";
document.getElementById("do_value").value="All";
return true;
}
function Delete_All_Deferred()
{
document.getElementById("do_operation").value="DeleteAllDeferred";
document.getElementById("do_value").value="AllDeferred";
return true;
}
function Delete_selected_Validation()
{
var getval="";
$(".select_particular_checkbox:checked").each(function() {
getval+=this.value+",";
});
document.getElementById("do_operation").value="DeleteSelected";
document.getElementById("do_value").value=getval;
return true;
}
</script>
<style>
.btn_right
{
float:right;
margin:20px 10px;
}
/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 99999; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

/* The Close Button */
.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}
</style>

<script>
// Get the modal
var modal = document.getElementById('myModal');
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
    modal.style.display = "none";
	document.getElementById('zloader_overlay').style.display = "none";
	document.getElementById('zloader').style.display = "none";
	
}

// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
    if (event.target == modal) {
        modal.style.display = "none";
    }

	}
function hideoverlay()
{
    modal.style.display = "none";
	document.getElementById('zloader_overlay').style.display = "none";
	document.getElementById('zloader').style.display = "none";
}
	</script>