if (empty($tableData[$tableName]['_idkey'])) { die("Trying to edit a table {$tableName} without any ID key!\n"); } $query = $tableData[$tableName]['_view_sql_all'] . ' WHERE ' . $tableData[$tableName]['_idkey'] . '=' . MySQL_quote($idEdit); if (dodbg()) { echo 'Query: ' . $query . "<br />\n"; } global $MySQL_singleton_abort; $editData = MySQL_singletonassoc($query); if ($editData === $MySQL_singleton_abort) { die("Data abort! Query: {$query}\n"); } echo hiddeninput(fieldName($tableName, $tableData[$tableName]['_idkey']), $idEdit); } echo hiddeninput('table', $tableName); echo hiddeninput('perm', $perm); echo "\n"; ?> <table class="dataform"> <?php $data = NULL; if ($editData !== NULL) { $data = $editData; } foreach ($tableData[$tableName]['_view_cols'] as $itemkey) { formelement($tableName, $tableData, $itemkey, $data); } ?> </table> <?php echo submitinput('submit', 'Submit') . "\n";
function drawTableTopSQL($table, $oldwhere = '', $tablename = '') { $keylist = array('' => ''); foreach ($table as $key => $data) { if ($key[0] != '_') { $keylist[$key] = $data['longname']; } } echo '<form action="view.php" method="POST" class="title">'; echo hiddeninput('table', $tablename); echo html_form_label('orderbycol', 'Sort:'); echo selectinput('orderbycol', $keylist); echo html_form_label('wherecol', 'Search:'); echo selectinput('wherecol', $keylist); $searchtypes = array('substring' => 'Substring', 'sqlregex' => 'SQL Regex', 'gnuregex' => 'GNU Regex'); echo selectinput('wherefunc', $searchtypes); echo textinput('wheredata', '', 16); echo hiddeninput('wherecurrent', $oldwhere); echo submitinput('refresh', 'Refresh'); echo '</form>'; }
<?php /* $Id: login.inc.php,v 1.5 2003/06/12 17:43:47 robbat2 Exp $ */ /* $Source: /code/convert/cvsroot/infrastructure/rats/gui/login.inc.php,v $ */ //print_r(get_defined_vars()); ?> <form action="validate.php" method="POST" class="title"> <table class="title"> <tr><td> <label for="username">Username</label> </td> <td> <?php echo textinput('username', '', 32); echo hiddeninput('loginerror', '0'); ?> </td> </tr> <tr> <td> <label for="password">Password</label> </td> <td> <?php echo passwordinput('password', '', 32); ?> </td> </tr> <tr> <td>