$arr = array($r0, $r1, $r2, $r3, $r4, $r5, $r0, $r1, $r2, $r3, $r4, $r5, $r0, $r1, $r2, $r3, $r4, $r5, $rend); /* load the 2D array into a text database */ ADOLoadCode('text'); $db =& ADONewConnection(); if (empty($db)) { die("Cannot create ADONewConnection"); } if (!$db->PConnect($arr, false, array('1stName', 'Surname', 'ID'))) { print 'Error:' . $db->ErrorMsg(); } /* * The id is very important. * All phpLens objects should have a different id */ $id = 'text_test'; $lens = new PHPLens($id, $db, 'select * from products'); if (empty($lens)) { die("Cannot create lens object id={$id}"); } // always prevent dynamic editing for security reasons $lens->dynEdit = 0; $lens->Render(); $lens->Close(); include_once './phplens-dynedit.inc.php'; $e = PHPLENS_DynEdit($lens); if ($e) { print $e->PrintV(); } ?> <h3>Support</h3> <p>For support goto the
phplens_win1 = window.open(url,'phplensmsgwindow',"height=400,width=700,scrollbars=yes,resizable=yes") } phplens_win1.focus() } </SCRIPT> <?php //print_r($HTTP_GET_VARS); if (!$gDB) { print "<h3>Cannot connect to ({$lens_qb_driver}): {$lens_qb_server} {$lens_qb_database}</h3>"; } if (!empty($tab) && $gDB) { $sep = '^'; $gLens_Cols = '*'; $lens = new PHPLens($lens_qb_id, $gDB, "select {$gLens_Cols} from {$tab}"); $lens->_idprefix = $gLens_Prefix; if (!empty($HTTP_GET_VARS['columns'])) { $help = <<<EOD <h4> 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> <a href={$PHPLENS_PATH}/help/ target=lensgridhelp>Help</a></div>";
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> <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>