HEX
Server: Apache/2.2.15 (CentOS)
System: Linux ip-10-0-2-146.eu-west-1.compute.internal 2.6.32-754.35.1.el6.centos.plus.x86_64 #1 SMP Sat Nov 7 11:33:42 UTC 2020 x86_64
User: root (0)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /www/exchange0old/exchange/admin/cache/%%85^85D^85D2B2DB%%transactions.html.php
<?php /* Smarty version 2.6.19, created on 2024-06-17 08:38:09
         compiled from investors/transactions.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'siteUrl', 'investors/transactions.html', 90, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script>
    $('document').ready(function(){
    current_table=$('.dynamicTable').dataTable({
         "sPaginationType": "full_numbers",
         "bAutoWidth": false,
         "bLengthChange": false,
         "bProcessing": true,
         "bServerSide": true,
         "sAjaxSource": "adminindex.php?do=investor_transactions",
         "fnServerData": function ( sSource, aoData, fnCallback ) {
            $.getJSON( sSource, aoData, function (json) { fnCallback(json) } );
         },
         "aoColumns" : [
                       { "mData": "realname" },
                       { "mData": "investor_ref_id" },
                       { "mData": "intermediary_ref_id" },
                       { "mData": "transaction_name" },
                       { "mData": "currency_code" },
                       { "mData": "amount" },
                       { "mData": "investment_date" },
                       { "mData": "status" },
                       { "mData": "actions","bSortable": false },
         ],
         "order": [[7, "asc"], [6, "desc"]],
         // "order": [[ 6, "desc" ]],
         "aoColumnDefs": [
            {
                "aTargets": [0],
                "mData": "realname",
                "mRender": function ( data, type, full ) {
                    return '<a class="btn-link" href="adminindex.php?do=investor_statement&investor_id='+full.investor_id+'" target="_blank">'+data+'</a>';
                }
            },
            {
                "aTargets": [7],
                "mData": "status",
                "mRender": function ( data, type, full ) {
                    if (data=='1')
                    {
                        return '<span class="label label-warning" title="Authorised"><i class="glyphicon glyphicon-ok color_white"></i></span>';
                    }else if(data=='2')
                    {
                        return '<span class="label label-default" title="Removed"><i class="glyphicon glyphicon-remove color_white"></i></span>';
                    }
                    
                    return '<span class="label label-success" title="Created"><i class="glyphicon glyphicon-log-in color_white"></i></span>';
                }
            },
            {
                "aTargets": [8],
                "mData": "actions",
                "mRender": function ( data, type, full ) {
                    var result='<button onclick="mytra=window.open(\'adminindex.php?do=investor_transaction_view&id='+full.investment_id+' \',\'mytra\',\'scrollbars=yes,width=980,height=1286\');mytra.focus();" class="btn btn-default btn-sm" title="View"><i class="glyphicon glyphicon-search" ></i></button>'

                    result += '<button style="margin-left: 3px;" onclick="statement=window.open(\'adminindex.php?do=investor_statement&investor_id='+full.investor_id+'\');statement.focus();" class="btn btn-default btn-sm" title="Statement"><i class="glyphicon glyphicon-list-alt" ></i></button>';

                    if (full.status=='0')
                    {
                        result+='&nbsp;<button onclick="changeStatus('+full.investment_id+',1);" class="btn btn-default btn-sm" title="Authorise"><i class="glyphicon glyphicon-ok" ></i></button>';
                    }
                    else if((full.investment_type=='<?php echo @INVESTMENT_RPA; ?>
' || full.investment_type=='<?php echo @INVESTMENT_COUPON; ?>
' || full.investment_type=='<?php echo @INVESTMENT_REDEMPTION; ?>
'  || full.investment_type=='<?php echo @INVESTMENT_ADDITION; ?>
'   || full.investment_type=='<?php echo @INVESTMENT_REDEEMED; ?>
' ) &&  full.status=='1')
                    {
                        result+=('&nbsp;<a href="adminindex.php?do=print_investment&investment_id='+full.investment_id+'" class="btn btn-default btn-sm" title="Print Receipt"><i class="glyphicon glyphicon-print" ></i></a>');
                    }
                    
                    if (full.status!='2' && (full.is_latest=='1' && (full.investment_type=='<?php echo @INVESTMENT_COMPOUND; ?>
' || full.investment_type=='<?php echo @INVESTMENT_CONTINUE; ?>
') || full.investment_type=='<?php echo @INVESTMENT_RPA; ?>
'))
                    {
                        result+='&nbsp;<button onclick="mytra=window.open(\'adminindex.php?do=investor_transaction_edit&id='+full.investment_id+' \',\'mytra\',\'scrollbars=yes,width=980,height=1286\');mytra.focus();" class="btn btn-default btn-sm" title="Edit"><i class="glyphicon glyphicon-edit" ></i></button>';
                    }
                    
                    if (full.status!='2')
                    {
                        result+='&nbsp;<button onclick="removeTransaction('+full.investment_id+');" class="btn btn-default btn-sm" title="Delete"><i class="glyphicon glyphicon-remove" ></i></button>';
                    }
                    
                    return result;
                }
            } 
         ]
    });
    
    $('#remove_transaction_button').click(function(){
        if ($("#investment_id").val()=='')
        {
            alert('Please select transaction to remove');
            return false;
        }
        
        $('#remove_transaction_dialog .modal-footer').html('<img src="<?php echo ((is_array($_tmp='/images/loading1.gif')) ? $this->_run_mod_handler('siteUrl', true, $_tmp) : smarty_modifier_siteUrl($_tmp)); ?>
" />Please wait...');
        $('#remove_transaction_form').submit();
    })
})

function changeStatus(id)
{
    if(confirm('Are you sure want to authorise?'))
    {
        window.location = "?do=auth_investor_transaction&investment_id="+id;
    }
}

function removeTransaction(id)
{
    $('#investment_id').val(id);
    $('#remove_transaction_dialog').modal('show');
}

</script>
<div id="body_portion">
  <div id="admin_menu">
    <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "left.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
    <div id="left_menu1" class="folded" style="display:none;"> <a href="javascript:void(0)" class="panel_open" onclick="showLeftPanel('left_menu','left_menu1','body_portion');"></a>
      <div class="top_menu"> <a href="#" class="dashboard">&nbsp;</a> </div>
      <div class="center_menu"> <a href="#" class="user">&nbsp;</a> </div>
      <div class="center_menu"> <a href="#" class="location">&nbsp;</a></div>
      <div class="center_menu"> <a href="#" class="cms">&nbsp;</a> </div>
      <div class="center_menu"> <a href="#" class="prayer">&nbsp;</a> </div>
      <div class="center_menu"> <a href="#" class="group">&nbsp;</a> </div>
      <div class="center_menu"> <a href="#" class="event">&nbsp;</a> </div>
      <div class="center_menu"> <a href="#" class="message">&nbsp;</a> </div>
      <div class="center_menu"> <a href="#" class="news">&nbsp;</a> </div>
      <div class="center_menu"> <a href="javascript:void(0)" class="settings" onmouseover="showLeft_DD_Mnu('left_dd_Mnu','aele_id1');" id="aele_id1" onmouseout="HideLeft_DD_Mnu('left_dd_Mnu');">&nbsp;</a> </div>
      <div class="bottom_menu"> <a href="#" class="logs">&nbsp;</a> </div>
    </div>
    <div id="right_content" >
      
      <?php if (! empty ( $_SESSION['success_transactions'] )): ?>
            <div class="success-msgbox">
                <span>
                    <?php echo $_SESSION['success_transactions']; ?>

                    <br>
                </span>
            </div>
        <?php endif; ?>
      
      <?php if (! empty ( $_SESSION['error_transaction'] )): ?>
        <div class="error-trmsgbox">
            <?php echo $_SESSION['error_transaction']; ?>

        </div>
      <?php endif; ?> 
	  
	  <?php if ($this->_tpl_vars['errors']): ?>
      <div class="errors-msgbox">
        <?php $_from = $this->_tpl_vars['errors']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['err'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['err']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['err']):
        $this->_foreach['err']['iteration']++;
?>
        <span><?php echo $this->_tpl_vars['err']; ?>
</span><br>
        <?php endforeach; endif; unset($_from); ?>
      </div>
      <?php endif; ?>
      
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="left" valign="top"><table cellpadding="0" cellspacing="0" border="0" width="100%" class="margin_table">
              <tr>
                <td valign="top" align="left" width="2%" class="hdr_tl">&nbsp;</td>
                <td valign="top" align="left" class="hdr_tc">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="430px">Investor Transactions</td>
                          <td align="right">
                              <a href="javascript:void(0);" onclick="javascript:mytra=window.open('adminindex.php?do=add_investor_transaction','mytra','scrollbars=yes,width=800,height=1286');mytra.focus();" class="under_blue">Add New Transaction</a>
                          </td>
                        </tr>
                    </table>
                </td>
                <td valign="middle" align="right" class="hdr_tr" width="20">&nbsp;</td>
              </tr>
              <tr>
                <td valign="top" align="left" colspan="3" class="hdr_center">
                    <table cellpadding="0" cellspacing="0" border="0" width="100%" class="table table-hover table-striped table-responsive dynamicTable">
                        <thead>
                            <tr>
                                <th width="13%" align="left" valign="top">Investor name</th>
                                <th width="4%"  align="left" valign="top">Investor ID</th>
                                <th width="4%"  align="left" valign="top">Intermediary ID</th>
                                <th width="6%" align="left" valign="top">Type</th>
                                <th width="6%"  align="center" valign="top">Currency</th>
                                <th width="4%"  align="center" valign="top">Amount</th>
                                <th width="6%"  align="center" valign="top">Date</th>
                                <th width="2%"  align="center" valign="top">Status</th>
                                <th width="10%" align="left" valign="top">Actions</th>
                            </tr>
                        </thead>
                        <tbody></tbody>
                    </table>
                </td>
              </tr>
              <tr>
                <td valign="top" align="left" width="2%" class="hdr_bl">&nbsp;</td>
                <td valign="top" align="left" width="96%" class="hdr_bc">&nbsp;</td>
                <td valign="top" align="left" width="2%" class="hdr_br">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table>
    </div>
    <div class="clear"></div>
  </div>
</div>

<div class="modal fade" tabindex="-1" role="dialog" id="remove_transaction_dialog">
  <div class="modal-dialog">
    <div class="modal-content">
        <form action="adminindex.php?do=remove_investment" method="POST" id="remove_transaction_form">
            <input type="hidden" name="investment_id" id="investment_id" value="">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">Remove transaction</h4>
          </div>
          <div class="modal-body">
            <div class="form-group">
                <label for="reason" class="control-label">Reason to remove:</label>
                <textarea rows="3" name="reason" class="form-control" id="reason" style="padding: 0;"></textarea>
              </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            <button type="button" class="btn btn-primary" id="remove_transaction_button">Remove</button>
          </div>
      </form>
    </div>
  </div>
</div>

<style>
    .error-trmsgbox {
        background: url('<?php echo ((is_array($_tmp='/images/icon_error.gif')) ? $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;
    }
    </style>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>