<html> <body> echo "Resetting DB...<br>" <?php include '../config.php'; include PRJ_CLASS_PATH . 'tzn_generic.php'; include PRJ_CLASS_PATH . TZN_DB_CLASS; include PRJ_CLASS_PATH . 'pkg_aat.php'; $db = new TznDb('zzz'); $db->getConnection(); $handle = fopen("reset_db.sql", "r"); if ($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); if (trim($buffer) != "") { echo "{$buffer}<br>"; $db->query(trim($buffer)); } } fclose($handle); } ?> </body> </html>
function loadList($testbed, $limit = NULL) { // currently we only support testbeds, no testbed pools if (preg_match("/TB:/", $testbed)) { $testbed = preg_replace("/TB:/", "", $testbed); } $sql = "SELECT " . "testbeds.testbedType, " . "launchServer.launchServerIP, " . "launchServer.pshellDIR " . "from " . "testbeds," . "launchServer " . "where " . "testbeds.testbed = '{$testbed}' and " . "testbeds.launchServerID = launchServer.launchServerID"; parent::loadList($sql, $limit); }
{ if (get_magic_quotes_gpc() && $value) { return stripslashes($value); } else { return $value; } } $pReload = false; if ($_REQUEST['mode'] == 'purge') { $objType = new Type(); $objType->delete("type=" . TznDb::zValueToSql(getHttp($_REQUEST['type'])) . " AND " . "((finishDate < '" . strftime(TZN_DATE_SQL, PRJ_DTE_NOW) . "' " . " AND status = " . AAT_STATUS_LEVELS . ") OR (status = " . AAT_STATUS_LEVELS . "))"); $pReload = true; } else { if ($_REQUEST['mode'] == 'delete') { $objType = new Type(); $objType->delete("type=" . TznDb::zValueToSql(getHttp($_REQUEST['type']))); $pReload = true; } else { if ($_REQUEST['mode'] == 'purgeAll') { $objType = new Type(); $objType->delete("(finishDate < " . "'" . strftime(TZN_DATE_SQL, PRJ_DTE_NOW) . "'" . " AND status = " . AAT_STATUS_LEVELS . ") OR (status = " . AAT_STATUS_LEVELS . ")"); $pReload = true; } else { if ($_REQUEST['mode'] == 'deleteAll') { $objType = new Type(); $objType->emptyTable(); $pReload = true; } } } }