*** empty log message ***

svn path=/trunk/boinc/; revision=5137
This commit is contained in:
David Anderson 2005-01-18 22:47:08 +00:00
parent 3646066ad5
commit e7d78df6ae
3 changed files with 18 additions and 6 deletions

View File

@ -22894,3 +22894,9 @@ David 18 Jan 2005
white.css
sched/
db_dump.C
David 18 Jan 2005
- fix "added clauses" feature of admin web DB interface
html/inc/
db_ops.inc

View File

@ -118,8 +118,9 @@ class SqlQueryString {
}
function addclause($clause) {
if ($clause) {
$this->add($clause);
$this->urlquery .= "&clauses=".urlencode($clause);
$c = stripslashes(urldecode($clause));
$this->add("( $c )");
$this->urlquery .= "&clauses=$clause)";
}
}
function addeq($name) {
@ -197,8 +198,9 @@ class SqlQueryString {
$this->addeq_not_CHOOSE_ALL('outcome');
$this->addeq_not_CHOOSE_ALL('client_state');
$this->addeq_not_CHOOSE_ALL('validate_state');
if ($_GET['clauses']) {
$this->addclause("( " . urldecode($_GET['clauses']) . " )");
$clauses = $_GET['clauses'];
if ($clauses) {
$this->addclause($clauses);
}
$this->addsort('sort_by');
}

View File

@ -103,8 +103,12 @@
$show_aggregate = $_GET['show_aggregate'];
if ($show_aggregate) {
$query = "select sum(d_total) as tot_sum, sum(d_free) as free_sum, sum(m_nbytes) as tot_mem from host";
if ($_GET['clauses']) {
$query = $query." WHERE " . urldecode($_GET['clauses']);
$clauses = $_GET['clauses'];
if ($clauses) {
echo "$clauses<br>";
$clauses = stripslashes(urldecode($clauses));
echo "$clauses<br>";
$query = "$query WHERE $clauses";
}
$result = mysql_query($query);
$disk_info = mysql_fetch_object($result);