$s = $tableName . '.' . $wherecol . ' LIKE ' . MySQL_quote($wheredata); break; case 'gnuregex': $s = $tableName . '.' . $wherecol . ' REGEX ' . MySQL_quote($wheredata); break; } $newwhere .= $s; } else { $newwhere = $wherecurrent; } if ($newwhere != '') { $where = ' WHERE ' . $newwhere; } else { $where = ''; } $query = $tableData[$tableName]['_view_sql_final'] . $where . $orderby; if (dodbg(2)) { echo "Query: " . $query; } $headtmp = array_subkey($tableData[$tableName], 'longname'); $head = array(); foreach ($headtmp as $key => $value) { if ($key[0] != '_') { $head[$key] = $value; } } drawTableTopSQL($tableData[$tableName], $newwhere, $tableName); drawTableSQL($head, $query, TRUE, $tableName, $tablePerm['edit'], $tablePerm['delete']); } include './footer.inc.php'; /* vim: set ft=php expandtab shiftwidth=4 softtabstop=4 tabstop=4: */
<?php /* $Id: delete.php,v 1.2 2003/06/22 23:07:07 robbat2 Exp $ */ /* $Source: /code/convert/cvsroot/infrastructure/rats/delete.php,v $ */ include './header.inc.php'; $perm = v('perm', 'del'); include 'lib/commontable.inc.php'; if ($tablePerm[$perm]) { $idDel = v('id'); $tableDel = v('table'); $query = 'DELETE FROM ' . $tableName . ' WHERE ' . $tableData[$tableName]['_idkey'] . '=' . MySQL_quote($idDel); echo $query; $m = _MySQL_queryhelper($query); $m->checkerror(); $_SESSION['msg'] = 'Item deleted from ' . $tableName; if (!dodbg()) { httpredirect('view.php?table=' . $tableName); } } /* vim: set ft=php expandtab shiftwidth=4 softtabstop=4 tabstop=4: */
<?php /* $Id: admin.lib.php,v 1.21 2004/06/01 16:32:01 robbat2 Exp $ */ /* $Source: /code/convert/cvsroot/infrastructure/rats/lib/admin.lib.php,v $ */ global $sessionLoaded, $sessionInfo, $sessionDebug; $sessionLoaded = false; $sessionInfo = array(); $sessionDebug = dodbg(2); if (dodbg()) { error_reporting(E_ALL); } function printall($item) { global $sessionDebug, $sessionInfo; if ($sessionDebug) { echo 'Variable status at ' . $item . ' point. <br />' . "\n"; echo 'GET: '; print_r($_GET); echo '<br />' . "\n"; echo 'POST: '; print_r($_POST); echo '<br />' . "\n"; echo 'SESSION: '; print_r($_SESSION); echo '<br />' . "\n"; echo 'LOCAL SESSION: '; print_r($sessionInfo); echo '<br />' . "\n"; echo 'COOKIE: '; print_r($_COOKIE); echo '<br />' . "\n";