<!DOCTYPE HTML>
<head>
    <meta charset="utf-8" />
        <title>OAuth 2.0 - <?php echo $title; ?></title>
	<style type="text/css">
            * {
                font-family: "Open Sans",Arial,Helvetica,sans-serif;
            }
            body {
                background-color: #f9f9f9;
            }
            #biginfo {
                width: 90vw;
                max-width: 800px;
                margin: 8vh auto;
                padding: 1vh;
                text-align: center;
                background-color: #FFFFFF;
                border-radius: 7px;
            }
            #biginfo h1, #biginfo p {
                margin-top: 4vh;
                margin-bottom: 4vh;
            }
            #biginfo h1 {
                font-size: 30px;
            }
	</style>
        
        <?php if ($js_path === 'js') { ?>
            <script src="<?php echo site_url($js_path.'/jquery/jquery-2.2.4__'.$us_version_ue.'.js'); ?>" defer></script>
        <?php } else { ?>
            <script src="<?php echo site_url($js_path.'/jquery__'.$us_version_ue.'.js'); ?>" defer></script> 
        <?php } ?>

        <link rel="stylesheet" type="text/css" href="<?php echo site_url($css_path.'/basic__'.$us_version_ue.'.css'); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo site_url($css_path.'/icons__'.$us_version_ue.'.css'); ?>">
    </head>
    <body onLoad="setTimeout('<?php echo $action; ?>', <?php echo (isset($wait) ? $wait : 1000); ?>)"><?php /* Milliseconds wait */ ?>
        <div id="biginfo">
            <h1>OAuth 2.0 - <?php echo $title; ?></h1>

            <h4>Details:</h4>
            <p>
                <em>Account ID:</em> <?php echo $account_id; ?><br>
                <em>Expires:</em> <?php 
                    if ($expires===null) {
                        echo 'Missing expires date';
                    } else {
                        echo $expires->us_date_time();
                    }
                ?><br>
                <em>Expired status:</em> <?php echo ($expired ? 'expired' : 'not expired'); ?><br>
            </p>
            
            <h4>Resource Owner:</h4>
            <p style="text-align: left;">
                <?php echo ($resource_owner!=='' ? $resource_owner : 'No info in token'); ?>
            </p>

            <?php if (isset($calendar_connection_error)) { ?>
                <div style="margin-top:10px; margin-bottom:10px" class="showerror ui-corner-all">
                    <?php echo $calendar_connection_error; ?>
                </div>
            <?php } ?>

        </div>
    </body>
</html>
