<?php
include SYSTEM_PATH . 'sync/sync_constant.php';

$check_server = CommonFunctions::check_ping_ip(FTP_SERVER);
/* Check if server is offline */
if (!$check_server) {
?>
<div class="alert alert-danger" role="alert">
    <button class="close" data-dismiss="alert"></button>
    <strong><?php print CommonLanguage::getMessage('danger'); ?>: </strong><?php print CommonLanguage::getMessage('server_is_offline'); ?>! 
    <br>
</div>
<?php die(); }
?>
<style>
    #ledger_iframe{
        margin-left: -45px;
    }
</style>
<iframe id="ledger_iframe" src="about:blank" width="105%" height="700" frameborder="0"></iframe>
<script>
    var server_ledger_url = <?php echo json_encode(SERVER_trusto_URL . "ACC/statement_pos_customer?is_pop=1&smc__auto_login=" . CommonFunctions::encryptAutoLogin(SERVER_trusto_AUTO_LOGIN_USER, SERVER_trusto_AUTO_LOGIN_PASS));?>;
    $(function(){
        $('#ledger_iframe').attr('src',server_ledger_url);
    });
</script>
