HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.34
System: Linux atalantini.com 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64
User: root (0)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /var/www/html/www.uscornatese.it/wp-content/plugins/angwp/excel.php
<?php                  
require_once('../../../wp-load.php');
header("Content-Type:   application/vnd.ms-excel; charset=utf-8");
header("Content-Disposition: attachment; filename=export_stats.xls");  //File name extension was wrong
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);

                        echo "<table border=1 class='table table-stripped' style='width:700px;'><tr><th>Banner</th><th>Impressions</th><th>Clicks</th><th>CTR</th></tr>";
                        global $wpdb;
                        $rs = $wpdb->get_results("SELECT post_title, sum(hits) as hits, sum(clicks) as clicks FROM wp_posts, wp_banner_stats where post_type = 'adni_banners' and banner_id = wp_posts.ID group by post_title;");
                        foreach ( $rs as $line ) {
                                echo "<tr>";
                                echo "<td>" . $line->post_title . "</td>";
                                echo "<td>" . $line->hits . "</td>";
                                echo "<td>" . $line->clicks . "</td>";
                                echo "<td>" . round(($line->clicks/$line->hits),4) . "</td>";
                                echo "</tr>";
                        }
                        echo "</table>";
?>