<commit_before><div class="box">
    <h1>{tr:download_page}</h1>
    
    <?php
    
    if(!array_key_exists('token', $_REQUEST))
        throw new TokenIsMissingException();
    
    $token = $_REQUEST['token'];
    if(!Utilities::isValidUID($token))
        throw new TokenHasBadFormatException($token);
    
    $recipient = Recipient::fromToken($token); // Throws
    $transfer = $recipient->transfer;
    
    if($transfer->isExpired()) throw new TransferExpiredException();
    
    if($transfer->status != TransferStatuses::AVAILABLE) throw new TransferNotAvailableException();
    
    ?>
    
    <div class="disclamer">
        {tr:download_disclamer}
    </div>
    
    <div class="general box" data-transfer-size="<?php echo $transfer->size ?>">
        <div class="from">{tr:from} : <?php echo Utilities::sanitizeOutput($transfer->user_email) ?></div>
        
        <div class="created">{tr:created} : <?php echo Utilities::sanitizeOutput(Utilities::formatDate($transfer->created)) ?></div>
        
        <div class="expires">{tr:expires} : <?php echo Utilities::sanitizeOutput(Utilities::formatDate($transfer->expires)) ?></div>
        
        <div class="size">{tr:size} : <?php echo Utilities::sanitizeOutput(Utilities::formatBytes($transfer->size)) ?></div>
        
        <?php if($transfer->subject) { ?>
        <div class="subject">{tr:subject} : <?php echo Utilities::sanitizeOutput($transfer->subject) ?></div>
        <?php } ?>
        
        <?php if($transfer->message) { ?>
        <div class="message">
            {tr:message} :
            <p>
                <?php echo Utilities::sanitizeOutput($transfer->message) ?>
            </p>
        </div>
        <?php } ?>
    </div>
    
    <div class="files box" data-count="<?php echo count($transfer->files) ?>">
        <div class="select_all">
            <span class="fa fa-lg fa-mail-reply fa-rotate-270"></span>
            <span class="select clickable">
                <span class="fa fa-2x fa-square-o" title="{tr:select_all_for_archive_download}"></span>
                <span>{tr:select_all_for_archive_download}</span>
            </span>
        </div>
    <?php foreach($transfer->files as $file) { ?>
        <div class="file" data-id="<?php echo $file->id ?>" >
            <span class="select clickable fa fa-2x fa-square-o" title="{tr:select_for_archive_download}"></span>
            <span class="name"><?php echo Utilities::sanitizeOutput($file->name) ?></span>
            <span class="size"><?php echo Utilities::formatBytes($file->size) ?></span>
            <a href="#" class="download" title="{tr:download_file}">
                <span class="fa fa-2x fa-download"></span>
                {tr:download}
            </a>
        </div>
    <?php } ?>
        <div class="archive">
            <div class="archive_message">{tr:archive_message}</div>
            
            <div class="mac_archive_message">
                {tr:mac_archive_message} : <a href="<?php echo Config::get('mac_unzip_link'); ?>" target="_blank"><?php echo Config::get('mac_unzip_name'); ?></a>.
            </div>
            
            <a href="#" class="archive_download" title="{tr:archive_download}">
                <span class="fa fa-2x fa-download"></span>
                {tr:archive_download}
            </a>
        </div>
        
        <div class='transfer' data-id="<?php echo $transfer->id ?>"></div>
    </div>
</div>

<script type="text/javascript" src="{path:js/download_page.js}"></script><commit_msg>Fix quotes<commit_after><div class="box">
    <h1>{tr:download_page}</h1>
    
    <?php
    
    if(!array_key_exists('token', $_REQUEST))
        throw new TokenIsMissingException();
    
    $token = $_REQUEST['token'];
    if(!Utilities::isValidUID($token))
        throw new TokenHasBadFormatException($token);
    
    $recipient = Recipient::fromToken($token); // Throws
    $transfer = $recipient->transfer;
    
    if($transfer->isExpired()) throw new TransferExpiredException();
    
    if($transfer->status != TransferStatuses::AVAILABLE) throw new TransferNotAvailableException();
    
    ?>
    
    <div class="disclamer">
        {tr:download_disclamer}
    </div>
    
    <div class="general box" data-transfer-size="<?php echo $transfer->size ?>">
        <div class="from">{tr:from} : <?php echo Utilities::sanitizeOutput($transfer->user_email) ?></div>
        
        <div class="created">{tr:created} : <?php echo Utilities::sanitizeOutput(Utilities::formatDate($transfer->created)) ?></div>
        
        <div class="expires">{tr:expires} : <?php echo Utilities::sanitizeOutput(Utilities::formatDate($transfer->expires)) ?></div>
        
        <div class="size">{tr:size} : <?php echo Utilities::sanitizeOutput(Utilities::formatBytes($transfer->size)) ?></div>
        
        <?php if($transfer->subject) { ?>
        <div class="subject">{tr:subject} : <?php echo Utilities::sanitizeOutput($transfer->subject) ?></div>
        <?php } ?>
        
        <?php if($transfer->message) { ?>
        <div class="message">
            {tr:message} :
            <p>
                <?php echo Utilities::sanitizeOutput($transfer->message) ?>
            </p>
        </div>
        <?php } ?>
    </div>
    
    <div class="files box" data-count="<?php echo count($transfer->files) ?>">
        <div class="select_all">
            <span class="fa fa-lg fa-mail-reply fa-rotate-270"></span>
            <span class="select clickable">
                <span class="fa fa-2x fa-square-o" title="{tr:select_all_for_archive_download}"></span>
                <span>{tr:select_all_for_archive_download}</span>
            </span>
        </div>
    <?php foreach($transfer->files as $file) { ?>
        <div class="file" data-id="<?php echo $file->id ?>" >
            <span class="select clickable fa fa-2x fa-square-o" title="{tr:select_for_archive_download}"></span>
            <span class="name"><?php echo Utilities::sanitizeOutput($file->name) ?></span>
            <span class="size"><?php echo Utilities::formatBytes($file->size) ?></span>
            <a href="#" class="download" title="{tr:download_file}">
                <span class="fa fa-2x fa-download"></span>
                {tr:download}
            </a>
        </div>
    <?php } ?>
        <div class="archive">
            <div class="archive_message">{tr:archive_message}</div>
            
            <div class="mac_archive_message">
                {tr:mac_archive_message} : <a href="<?php echo Config::get('mac_unzip_link'); ?>" target="_blank"><?php echo Config::get('mac_unzip_name'); ?></a>.
            </div>
            
            <a href="#" class="archive_download" title="{tr:archive_download}">
                <span class="fa fa-2x fa-download"></span>
                {tr:archive_download}
            </a>
        </div>
        
        <div class="transfer" data-id="<?php echo $transfer->id ?>"></div>
    </div>
</div>

<script type="text/javascript" src="{path:js/download_page.js}"></script>
{'fraction_non_alphanumeric': 0.18088882578446686, 'fraction_numerical': 0.002555729092716172, 'mean_word_length': 2.5865580448065173, 'pattern_counts': {'":': 0, '<': 169, '<?xml version=': 0, '>': 205, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2984268', 'n_tokens_mistral': 2087, 'n_tokens_neox': 2108, 'n_words': 370}