$head->setTitle('PSA - query results'); $head->setCss('./css/psa.css'); $head->setJs('./js/PSA.js'); $head->build(); $body = new Body(); $body->build(); include_once './inc/menubar.php'; $body->line('Executed query : <br />'); $body->line('<p class="qs">' . $sessie->getS('psa-query-results') . '<hr />'); $sessie->unsetS('psa-query-results'); $titles = FALSE; if (!$res) { $body->line('no further feedback'); } else { $table = new Table(); $table->setClas('result'); $table->setId('listing'); $table->build(); $odd = TRUE; foreach ($res as $item) { if (!$titles) { $tr = new Th(); $names = array_keys(get_object_vars($item)); foreach ($names as $title) { $tr->add($title); } $tr->build(); $titles = TRUE; } $tr = new Tr(); if ($odd) {
$head->setCss('./css/psaprint.css', 'print'); $head->setjs('./js/PSA.js'); $head->build(); $body = new Body(); $body->build(); include_once './inc/menubar.php'; if (!$res) { $body->line('no tables defined yet'); } else { foreach ($res as $item) { $body->line('<div class="schema"><h3>' . $item->name . '</h3>'); $q_fields = "PRAGMA table_info('" . $item->name . "')"; $sql->qo($q_fields); $res_fields = $sql->fo(); $table = new Table(); $table->setClas('result_schema'); $table->setId('listing'); $table->build(); $th = new Th(); $th->add('name'); $th->add('type'); $th->add('size'); $th->add('null allowed'); $th->add('default'); $th->build(); $odd = TRUE; foreach ($res_fields as $item_fields) { $pos = strpos($item_fields->type, '('); if (!$pos) { $type = $item_fields->type; $size = '-';