summaryrefslogtreecommitdiffstats
path: root/admin/exportclases/class.xls.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/exportclases/class.xls.php')
-rw-r--r--admin/exportclases/class.xls.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/admin/exportclases/class.xls.php b/admin/exportclases/class.xls.php
new file mode 100644
index 0000000..ddea66e
--- /dev/null
+++ b/admin/exportclases/class.xls.php
@@ -0,0 +1,35 @@
+<?php
+
+include_once('../../settings.php');
+include_once('../../function.php');
+//include_once('class.xls.php');
+include_once('../../vendor/autoload.php');
+
+class xls {
+
+ private $xls_string = '';
+ private $row = 0;
+ private $col = 0;
+ private $filename = '';
+
+ function __construct($filename = false) {
+ if ($filename) {
+ $this->filename = $this->check_extension($filename);
+ } else {
+ $this->filename = 'XLS_download_' . date('dmY') . '.xls';
+ }
+ }
+
+
+ function display($filename, $output) {
+
+ header('Content-type: application/vnd.ms-excel; charset=windows-1250');
+ header('Content-Disposition: attachment; filename="'.$filename.'"');
+
+ echo $output;
+
+ exit;
+ }
+}
+
+?> \ No newline at end of file