= 0) {
try {
require_once('../rw_common/plugins/stacks/gridiron-3-vendor/autoload.php');
include_once('files/GridIron.php');
$key = trim('');
switch ('excel') {
case 'csv':
$key = realpath('');
break;
case 'excel':
$key = realpath('../resources/Glossar8.xlsx');
break;
// TotalCMS
case 'totalcms':
// Map the file extension to a path
$cmsid = trim('');
$files = [
'../cms-data/file/'.$cmsid.'.csv',
'../cms-data/file/'.$cmsid.'.CSV',
'../cms-data/file/'.$cmsid.'.xls',
'../cms-data/file/'.$cmsid.'.XLS',
'../cms-data/file/'.$cmsid.'.xlsx',
'../cms-data/file/'.$cmsid.'.XLSX'
];
// Filter any files that don't exist
$files = array_filter($files, 'file_exists');
// Use the first file from the list
if (!empty($files)) {
$key = realpath(array_shift($files));
}
break;
case 'mysql':
$key = 'mysql:';
break;
default:
break;
}
if (in_array('excel', ['csv', 'excel']) && !is_file($key)) {
throw new \Exception('Please select a'.('excel' == 'excel' ? 'n' : '').' '.strtoupper('excel').' file from the RapidWeaver resources');
} elseif (in_array('excel', ['google']) && empty($key)) {
throw new \Exception('No Google Spreadsheet key provided!');
} elseif (in_array('excel', ['totalcms']) && !is_file($key)) {
throw new \Exception('File not found with CMS-ID "'.trim('').'"');
} else {
//
}
$grid_iron_variables = [
'key' => $key,
'mysql' => [
'username' => trim(''),
'password' => trim(''),
'table' => trim(''),
'host' => trim('localhost'),
'port' => true ? trim('3306') : false,
'database' => trim('')
],
'gridiron' => true,
'json' => false,
'ajax' => false,
'responsive' => true,
'id' => 'stacks_in_1091213',
'cache' => false,
'ttl' => false ? 15 : 0,
'header' => true && !false, // Hardcoded to true. ,
'footer' => false && !false,
'gid' => '0',
'worksheetIndex' => 0,
'css' => [
'grid-iron-reset',
'grid-iron-',
'cell-border',
'',
],
];
\CDS\GridIron::RENDER($key, $grid_iron_variables);
} catch (Exception $e) { ?>
Oops. It looks like Grid Iron encountered an error. Please review the set up instructions
here.
getMessage()); ?>
PHP v5.6 or later is required to use Grid Iron. You are currently using
. Please contact your web host about upgrading you to a more
recent version of PHP.