<?php

	require_once 'auth.php';

	$sql = ("DROP TABLE ".$_POST['tableid']);
	echo "SQL: ".$sql."<br>";
	echo "RESULT: ";
	$rs = $adodb->Execute($sql);
	if (!$rs) echo $adodb->ErrorMsg();
	else {
		echo "Drop Success";
		echo "<script language=javascript>
		opener.document.forms[0].tableid.readOnly = false;
		opener.document.forms[0].tableid.style.color = 'black';
		</script>";
	}

	$adodb->Execute("DROP TABLE qb_temp_".$_POST['tableid']);
	$adodb->Execute("DROP TABLE ".$_POST['tableid']."_crc");

?>
