<?php

require_once 'nucommon.php';
$jsonID = $_GET['i'];
$t = nuRunQuery("SELECT deb_message AS json FROM zzzsys_debug WHERE zzzsys_debug_id = ? ", array($jsonID));
$r = db_fetch_object($t);
$JSON = json_decode($r->json);
$style = nuBuildStyle($JSON);
$table = nuBuildTable($JSON);
$h .= "\n        \n<html>\n        \n<style>\n\n\ntable    {border-width:1px;border-style:solid;border-color:grey}\ntr       {border-width:1px;border-style:solid;border-color:grey}\nth       {border-width:1px;border-style:solid;border-color:grey;background-color:lightgrey}\ntd       {border-width:1px;border-style:solid;border-color:grey}\n.id      {border-width:0px;border-style:none;width:1px;font-size:0px}\n{$style}\n\n\n</style>\n\n<body>\n\n{$table}\n\n</body>\n</html>\n\n";
print $h;
nuRunQuery("DROP TABLE {$JSON->records}");
function nuBuildStyle($J)
{
    $h = '';
    $a['l'] = 'left';
    $a['r'] = 'right';
    $a['c'] = 'center';
    for ($i = 0; $i < count($J->objects); $i++) {
        $A = $a[$J->objects[$i]->align];
        $W = $J->objects[$i]->width . 'px';
        $h .= ".s{$i}      {text-align:{$A};width:{$W}}\n";
    }
    return $h;
}
function nuBuildTable($J)
{
    $h = '';
    $h .= "<table>";
    $h .= "<tr>";
    $h .= "<th class='id'>ID</th>";
Beispiel #2
0
function nuGetBrowseHTML($hashData)
{
    $formID = nuV('form_id');
    $pageNo = nuV('page_number');
    $J['session'] = nuV('session_id');
    $J['breadcrumb'] = nuV('breadcrumb');
    $J['call_type'] = nuV('call_type');
    $J['edit_browse'] = nuV('edit_browse');
    $J['form_id'] = nuV('form_id');
    $J['nu_user_name'] = nuV('nu_user_name');
    $t = nuRunQuery("SELECT * FROM zzzsys_form WHERE zzzsys_form_id = ? ", array(nuV('form_id')));
    if (nuErrorFound()) {
        return;
    }
    $r = db_fetch_object($t);
    $J['search'] = nuV('search');
    $J['filter'] = nuV('filter');
    $J['form_title'] = nuF('sfo_title');
    $J['set_title'] = nuV('set_title');
    $beforeBrowse = nuReplaceHashes(nuF('sfo_custom_code_run_before_browse'), $hashData);
    eval($beforeBrowse);
    return nuBuildTable($formID, $pageNo, $hashData);
}