<?php // _genericMetaData.php // CAUTION: TODO: Work in progress require_once '../setup.inc.php'; $requestedAction = 'read'; $pageLocation = '1'; $browserTitle = 'MetaData'; $timers = array(); $wo = new WOOOF(); if (!$wo->constructedOk) { $wo->handleShowStopperError("1000 Failed to init WOOOF."); } $paramNames = array('_tableName'); $in = $wo->getMultipleGetPost($paramNames); //$in['where'] = "region='Greece'"; $tableName = $in['_tableName']; $table = new Generic($tableName, $wo); // requires view : __v_columnMetaData $res = $table->showMetaData($in); // if ( $tpl === FALSE ) { $wo->handleShowStopperError( print_r($errors,true) ); } if ($res === FALSE) { // $wo->handleShowStopperError( $error ); $tpl = array('browserTitle' => $browserTitle, 'content' => 'Sorry, smg went wrong', 'errorMessage' => nl2br($wo->getErrorsAsStringAndClear()), 'message' => ''); } else { $tpl = array('browserTitle' => $tableName . ' ' . $browserTitle, 'content' => $res, 'message' => ''); } $wo->fetchApplicationFragment('structural/generic_template.php'); // UNREACHEABLE: As generic_template.php exits at its end! // End of file _genericMetaData.php
<?php $__isAdminPage = true; $__isSiteBuilderPage = true; $__actualPath = dirname($_SERVER['SCRIPT_FILENAME']); $__actualPath = dirname($__actualPath); require_once $__actualPath . '/setup.inc.php'; $requestedAction = 'read'; $pageLocation = '1'; $pageTitle = 'Administration Back End'; $wo = new WOOOF(); $in = $wo->getMultipleGetPost(['table', 'class']); if (!$wo->hasContent($in['table']) or !$wo->hasContent($in['class'])) { die("You have to provice 'table' and 'class' parameters"); } $res = WOOOF_MetaData::createTplCodeForTable($wo, $in['table'], $in['class']); $res = '<textarea rows="50" cols="100">' . htmlentities($res) . "</textarea>"; echo $res; exit;