<?php
// Copyright 1999-2022. Plesk International GmbH. All rights reserved.
?>
<?php if (0 < $this->peakList->count()): ?>
    <div class="form-row">
        <div class="field-name"><?php echo $this->lmsg('totalAttempts'); ?></div>
        <div class="text-value"><?php echo $this->attempts; ?></div>
    </div>
    <p><?php echo $this->lmsg('peaksListHint'); ?></p>
    <div class="list">
        <table><thead>
            <th><?php echo $this->lmsg('startedTitle'); ?></th>
            <th><?php echo $this->lmsg('backToNormalTitle'); ?></th>
            <th><?php echo $this->lmsg('numberOfAttemptsTitle'); ?></th>
            </thead>
            <?php $class = 'odd'; ?>
            <?php foreach($this->peakList as $peak): ?>
                <tr class="<?php echo $class; ?>">
                    <td><?php echo ldatetime(strtotime($peak->beginDate)); ?></td>
                    <td>
                        <?php if (!(int)$peak->endDate): ?>
                            <div class="b-intent"><span class="b-indent-icon"><img src="<?php echo $this->skinUrl("/icons/16/plesk/att.png") ?>" alt="att" title=""></span><nobr><?php echo $this->lmsg('stillNotSending'); ?></nobr></div>
                        <?php else: ?>
                            <?php echo ldatetime(strtotime($peak->endDate)); ?>
                        <?php endif;?>
                    </td>
                    <td align="right"><?php echo $peak->rejected; ?></td>
                </tr>
                <?php $class = ('even' == $class) ? 'odd' : 'even';?>
            <?php endforeach ?>
        </table>
    </div>
<?php else: ?>
    <p><?php echo $this->lmsg('noAttempts'); ?></p>
<?php endif;?>