<?php require_once 'csvItem.php'; require_once 'config.php'; $files = csvItem::getCsvList(CSV_FOLDER); ?> <html> <head> <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.3.0/pure-min.css"> </head> <body> <div align="center"> <div id="table_div"> <table class="pure-table pure-table-bordered"> <thead> <tr><th>Filename (click to view details)</th></tr> </thead> <tbody> <?foreach($files as $file):?> <tr><td><a href="result.html?filename=<?php echo $file; ?> "><?php echo $file; ?> </a></td></tr> <?endforeach;?> </tbody> </table> </div> </div>
<?php require_once 'csvItem.php'; require_once 'config.php'; if (isset($_GET['filename'])) { $filename = $_GET['filename']; $files = csvItem::getCsvList(CSV_FOLDER); if (in_array($filename, $files)) { $item = new csvItem(CSV_FOLDER . "/" . $filename); echo $item->getGoogleChartJson(); } }