$bi = $bib;
                    }
                    $row++;
                    echo "<tr bgcolor=#{$bg}><th bgcolor=#{$bi} align=left>{$c['0']}</th><td>{$c['1']}</td><td>{$c['2']}</td><td>{$c['3']}</td></tr>\n";
                }
                $nres = DbQuery(GenQuery($tab[0], "s"), $dblink);
                echo "<tr bgcolor=#{$bg2}><th colspan=4>" . DbNumRows($nres) . " Records</th></tr>";
                echo "</table></td>";
                $col++;
            }
            echo "</td></tr></table>\n";
        }
    }
}
// Now the database connection can be closed
@DbClose($dblink);
// This is the footer on the very bottom of the page
include_once "inc/footer.php";
//================================================================================
// Name: DbDump()
//
// Description: Creates a MySQL dump of a given set of database tables.
//              The dump is written to a file, whose name has to be passed to the function
//              when calling it
//
// Parameters:
//     $tables	- An array containing the names of the database tables that
//            	  should be included in the dump
//     $link	- A valid database connection identifier
//     $outfile	- The name of the file that should be created
//
Beispiel #2
0
$link = DbConnect($dbhost, $dbuser, $dbpass, $dbname);
$res  = DbQuery(GenQuery("$dbn[0]%","b","LIKE"), $link);
while($ss = DbFetchRow($res)){
	if ($row % 2){$bg = "txta"; $bi = "imga";}else{$bg = "txtb"; $bi = "imgb";}
	$row++;
	if($dbname == $ss[0]){
		$inactive = 0;
	}else{
		$inactive = 1;
	}
	$slnk = DbConnect($dbhost, $dbuser, $dbpass, $ss[0]);
	$devs = DbFetchRow(DbQuery(GenQuery('devices','s','count(*)'), $slnk));
	$cfgs = DbFetchRow(DbQuery(GenQuery('configs','s','count(*)'), $slnk));
	$nods = DbFetchRow(DbQuery(GenQuery('nodes','s','count(*)'), $slnk));
	$fdis = DbFetchRow(DbQuery(GenQuery('system','s','value','','',array('name'),array('='),array('first') ), $slnk));
	DbClose($slnk);

	TblRow($bg);
	echo "<th class=\"$bi\"> ";
	if($inactive){											# Only allow activate inactive DBs
?>
<a href="?sel=<?= urlencode($ss[0]) ?>">
<img src="img/16/bcls.png" title="DB <?= $sellbl ?>">
</a>
<?php 
	}else{
		echo "<img src=\"img/16/walk.png\" title=\"DB $stco[100]\">";
	}
?>
</th>
<td><b><?= $ss[0] ?></b></td>