Example #1
0
            $rs = $sessdb->Execute("select id from phplens where id='{$gLens_Prefix}{$zid}'");
            if ($rs) {
                if ($rs->EOF) {
                    $sessdb->Execute("update phplens set id='{$gLens_Prefix}{$zid}' where id='{$gLens_Prefix}{$lens_qb_id} '");
                    $lens_qb_id = $zid;
                }
                $rs->Close();
            }
        } else {
            $iderr = '<p>Invalid ID</p>';
        }
    }
}
if (!empty($HTTP_GET_VARS['table'])) {
    if ($gLens_Table != $HTTP_GET_VARS['table']) {
        $lens_qb_id = lens_qb_gen_id();
        $gLens_Table = $HTTP_GET_VARS['table'];
    }
}
if (isset($HTTP_GET_VARS['qb_id'])) {
    $lens_qb_id = $HTTP_GET_VARS['qb_id'];
}
$tab = $gLens_Table;
?>
<html>
<head>
<title>PHPLens</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF">
Example #2
0
To control which columns are visible, click on {$lens->dynEditTabIcon} on the far left.<br>
To edit column titles and other column stuff, click on {$lens->dynEditColIcon} next to the column titles.<br> 
For global changes, click on {$lens->dynEditIcon} in the navigation bar on the right.
</h4>
EOD;
        print $help;
        $lens->Reset();
    }
    ob_start();
    $cols = urlencode($gLens_Cols);
    print "<div align=center><a href='javascript:phplens_openwin(\"{$PHP_SELF}?lens_e_{$lens->id}=code&table={$tab}&qb_id={$lens_qb_id}&cols={$cols}\")'><b>Generate PHP Source Code</b></a> &nbsp; <a href={$PHPLENS_PATH}/help/ target=lensgridhelp>Help</a></div>";
    $lens->dynEdit = 2;
    $lens->Render();
    $rendered = ob_get_contents();
    ob_end_clean();
    $lens->Verify();
    print $rendered;
    $lens->Close();
}
print "<br>";
if ($isnew) {
    $lens_qb_id2 = lens_qb_gen_id();
}
$lens2 = new PHPLens($lens_qb_id2, $gDB, "select * from {$lens_qb_detail} where {$lens_qb_detail_key}={$lens_qb_at}");
$lens2->_idprefix = 't2';
$lens2->Render();
$lens2->Close();
?>
</body>
</html>