File: /www/exchange0old/exchange/admin/cache/%%E1^E19^E19E8C68%%certificate_history.html.php
<?php /* Smarty version 2.6.19, created on 2024-06-14 23:04:45
compiled from logs/certificate_history.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'siteUrl', 'logs/certificate_history.html', 9, false),array('modifier', 'date_format', 'logs/certificate_history.html', 77, false),)), $this); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>:: Credebt Exchange - Admin Panel ::</title>
<link rel="stylesheet" href="css/stylesheet.css" type="text/css" />
<link type="text/css" href="../css/bootstrap.min.css?ver=2" rel="stylesheet" />
<link rel="shortcut icon" href="<?php echo $_SESSION['base_url']; ?>
images/logo_favicon.ico" />
<link type="text/css" href="<?php echo ((is_array($_tmp='/css/ui-lightness/jquery-ui-1.10.4.custom.min.css')) ? $this->_run_mod_handler('siteUrl', true, $_tmp) : smarty_modifier_siteUrl($_tmp)); ?>
" rel="stylesheet" />
<script type="text/javascript" src="<?php echo ((is_array($_tmp='/js/jquery.js')) ? $this->_run_mod_handler('siteUrl', true, $_tmp) : smarty_modifier_siteUrl($_tmp)); ?>
"></script>
<script type="text/javascript" src="<?php echo ((is_array($_tmp='/js/jquery-ui-1.10.4.custom.js')) ? $this->_run_mod_handler('siteUrl', true, $_tmp) : smarty_modifier_siteUrl($_tmp)); ?>
"></script>
<script type="text/javascript" src="js/aj_admin_home.js"></script>
<style type="text/css">
#filter {
margin: 5px auto;
}
.fancybox{
background:#333;
opacity:0.5;
filter: alpha(opacity = 50);
position:absolute;
width:100%!important;
height: 100%!important;
display:none;
top:0;
left:0;
}
#assistantpopup input, textarea{
height: 20px;
margin-top: 10px;
}
#assistantpopup textarea{
height: 40px;
}
.error-trmsgbox {
background: url("<?php echo ((is_array($_tmp='/images/icon_error.png')) ? $this->_run_mod_handler('siteUrl', true, $_tmp) : smarty_modifier_siteUrl($_tmp)); ?>
") no-repeat 8px 6px #FFE1EA;
border: 1px solid #FF3A76;
border-radius: 4px 4px 4px 4px;
color: #000000;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 11px;
margin: 2px 0;
padding: 8px 5px 8px 28px;
text-align: left;
display: none;
}
.success-msgbox {
display: none;
}
</style>
</head>
<body style="background: none;">
<h4 style="color: #FFF;background: #555;margin: 0;padding: 15px 0 15px 0;">History of Generation</h4>
<div class="error-trmsgbox">Certificate not generated. <div id="errorTxt"></div></div>
<div class="success-msgbox">Certificate Generated Successfully</div>
<label for="filter">Filter</label>
<select id="filter" name="filter">
<option value="both"<?php if ($this->_tpl_vars['filter'] === 'both'): ?> selected<?php endif; ?>>All</option>
<option value="expired"<?php if ($this->_tpl_vars['filter'] === 'expired'): ?> selected<?php endif; ?>>Expired</option>
<option value="non_expired"<?php if ($this->_tpl_vars['filter'] === 'non_expired'): ?> selected<?php endif; ?>>Valid</option>
</select>
<button type="button" onclick="showCertificateForm()">Generate New Digital Certificate</button>
<table class="table table-striped table-responsive table-bordered">
<tr id="history-header">
<th>Created</th>
<th>Created By</th>
<th>Expiry Date</th>
<th>Name</th>
<th>Email</th>
<th>Actions</th>
</tr>
<?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
foreach ($_from as $this->_tpl_vars['item']):
?>
<tr>
<td><?php echo $this->_tpl_vars['item']['created_at']; ?>
</td>
<td><?php echo $this->_tpl_vars['item']['admin']; ?>
</td>
<td><?php echo ((is_array($_tmp=$this->_tpl_vars['item']['expired_at'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d") : smarty_modifier_date_format($_tmp, "%Y-%m-%d")); ?>
</td>
<td><?php echo $this->_tpl_vars['item']['user']; ?>
</td>
<td><?php echo $this->_tpl_vars['item']['email']; ?>
</td>
<td>
<button onclick="resendCertificate(<?php echo $this->_tpl_vars['item']['id']; ?>
)">Resend</button>
<button title="Remove Certificate" onclick="removeCertificate(<?php echo $this->_tpl_vars['item']['id']; ?>
)">-</button>
</td>
</tr>
<?php endforeach; endif; unset($_from); ?>
</table>
<div id="assistantpopup" class="clshide" style="display:none; margin:0 auto; width:693px;">
<div style="position:fixed; top:40%; width:500px; background: none repeat scroll 0% 0% #CCC; padding:5px; z-index:99; margin-top: auto; margin-left: 100px; margin-right: auto; vertical-align: middle;">
<form enctype="multipart/form-data" method="post" action="javascript:void(0);" name="form1" id="form1">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td class=""><table width="100%" cellspacing="0" cellpadding="5" border="0">
<tbody>
<tr>
<td align="center"><span>Generate New Digital Certificate</span></td>
<td valign="middle" align="right"><span style="cursor:pointer" class="closefile">X</span></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td><table width="100%" cellspacing="0" cellpadding="10" border="0">
<tbody>
<tr class="very_lite_gray">
<td valign="bottom" align="right" style="padding-left: 130px">Email : </td>
<td valign="top" align="left" style="padding-left: 20px">
<input style="width: 250px;" id="certificate-email" name="certificate-email" value="<?php echo $this->_tpl_vars['originator']['address_email']; ?>
">
<br>
<span style="color:#FF0000" id="error-email"> </span></td>
<td valign="top" align="right"> </td>
</tr>
<tr class="very_lite_gray">
<td valign="bottom" align="right" style="padding-left: 130px">First Name : </td>
<td valign="top" align="left" style="padding-left: 20px">
<input style="width: 250px;" id="certificate-first-name" name="certificate-first-name" value="<?php echo $this->_tpl_vars['originator']['first_name']; ?>
">
<br>
<span style="color:#FF0000" id="error-first-name"> </span></td>
<td valign="top" align="right"> </td>
</tr>
<tr class="very_lite_gray">
<td valign="bottom" align="right" style="padding-left: 130px">Last Name : </td>
<td valign="top" align="left" style="padding-left: 20px">
<input style="width: 250px;" id="certificate-last-name" name="certificate-last-name" value="<?php echo $this->_tpl_vars['originator']['last_name']; ?>
">
<br>
<span style="color:#FF0000" id="error-last-name"> </span></td>
<td valign="top" align="right"> </td>
</tr>
<tr>
<td valign="top" align="center" class="dark_gray_bg" colspan="3">
<input type="hidden" name="certificate-user-id" value="<?php echo $this->_tpl_vars['originator']['user_id']; ?>
">
<input type="button" value="Generate" id="chck" style="padding: 2px 12px;min-width: 60px;">
<input type="button" value="Cancel" id="cancel" style="margin-left: 20px;padding: 2px 12px;">
</td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<div class="fancybox"></div>
<script type="application/javascript">
function resendCertificate(id) {
if (confirm('Do you want to resend the certificate?')) {
$.ajax({
url: '?do=resendcertificate&id=' + id,
dataType: 'json',
success: function (data) {
if (data.success) {
alert('Certificate successfully sended');
} else {
alert('Failed to resend certificate');
}
}
});
}
}
function removeCertificate(id) {
if (confirm('Do you want to remove the certificate?')) {
$.ajax({
url: '?do=removecertificate&id=' + id,
dataType: 'json',
success: function (data) {
if (data.success) {
alert('Certificate successfully removed');
location.reload();
} else {
alert('Failed to remove certificate');
}
}
});
}
}
function showCertificateForm() {
$('#assistantpopup').fadeIn();
$('.fancybox').show();
}
$('.closefile,#cancel').on('click', function(e) {
$(this).closest('.clshide').fadeOut();
$('.fancybox').hide();
});
$('#chck').on('click', function () {
$('.success-msgbox').hide();
$('.error-trmsgbox').hide();
$.ajax({
url: '?do=generatecertificate',
type: 'POST',
dataType: 'json',
data: $(this).closest('form').serialize(),
success: function (data) {
if (data.success === false) {
$('#errorTxt').html('');
if (data.errors.length === 0) {
$('#assistantpopup').fadeOut();
$('.fancybox').hide();
$('.error-trmsgbox').show();
} else {
$('#assistantpopup').fadeOut();
$('.fancybox').hide();
$('#form1 span').html('');
var errMsg = '';
$.each(data.errors, function (i, val) {
errMsg += ' ' + val;
});
$('#errorTxt').html(errMsg);
$('.error-trmsgbox').show();
}
} else {
$('#assistantpopup').fadeOut();
$('.fancybox').hide();
$('.success-msgbox').show();
tr = '<tr>';
$.each(data.certificate, function (i, val) {
tr += '<td>' + val + '</td>';
});
tr += '<td><button onclick="resendCertificate(' + data.certificate_id + ')">Resend</button></td>';
tr += '</tr>';
$(tr).insertAfter('#history-header');
}
}
});
});
$('#filter').on('change', function () {
window.location.href = '?do=certificatehistory&user_id=<?php echo $_GET['user_id']; ?>
' + '&filter=' + $(this).val();
});
</script>
</body>
</html>