<?php
// QuickTalk 2.5 build:20100731
session_start();
// INITIALISATION
include('../bin/qt_lib_db.php');
include('../bin/config.php');
define ('TABMESSAGE', $qtg_prefix.'qtgmessage');
if ( isset($_SESSION['qtg_dbopwd']) )
{
$qtg_user = $_SESSION['qtg_dbologin'];
$qtg_pwd = $_SESSION['qtg_dbopwd'];
}
$strAppl = 'QuickTalk guestbook 2.0';
include('qtg_lang_en.php');
// --------
// HTML START
// --------
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" lang="en">
<head>
<title>Uninstalling ',$strAppl,'</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
<link rel="stylesheet" href="qtg_setup.css">
</head>
<body>
<!-- PAGE CONTROL -->
<div class="qtg_page">
<table class="qtg_page" width="750" cellspacing="0" style="margin:5px">
<tr class="qtg_page">
<td class="qtg_page">
<!-- PAGE CONTROL -->
<!-- HEADER BANNER -->
<div class="banner">
<div class="banner_in">
<img src="qtg_logo.gif" width="175" height="50" style="border-width:0" alt="QuickTalk" title="QuickTalk"/>
</div>
</div>
<!-- END HEADER BANNER -->
<!-- BODY MAIN -->
<table class="body" width="100%" cellspacing="0" style="border-style:solid;border-color:#AAAAAA;border-width:1px;">
<tr class="body">
<td class="body" style="padding:5px">
<!-- BODY MAIN -->
';
echo '<br/>1. <b>Opening database connection</b>... ';
$oDB = new cDB($qtg_dbsystem,$qtg_host,$qtg_database,$qtg_user,$qtg_pwd,$qtg_port,$qtg_dsn);
if ( !empty($oDB->error) ) die ('<p style="color:red">Connection with database failed.<br/>Check that server is up and running.<br/>Check that the settings in the file <b>bin/config.php</b> are correct for your database.</p>');
echo 'done<br/><br/>';
// SUBMITTED
if ( isset($_GET['a']) )
{
switch ($_GET['a'])
{
case 'Drop table Message':
echo ' Dropping qtgmessage...'; $oDB->Query('DROP TABLE '.TABMESSAGE); echo 'done.<br/>';
break;
}
}
// Tables do drop
echo '<br/>2. <b>Drop the tables</b><br/>';
echo '<form action="qtg_droptables.php" method="get">';
echo '<input type="submit" name="a" value="Drop table Message"/> ',TABMESSAGE,'<br/>';
echo '</form>';
echo '<p><a href="qtg_setup.php">install »</a></p>';
// --------
// HTML END
// --------
echo '
<!-- END BODY MAIN -->
</td>
</tr>
</table>
<!-- END BODY MAIN -->
<div class="div_footer_copy">
<span class="p_footer_copy">powered by <a href="http://www.qt-cute.org" class="a_footer_copy">QT-cute</a></span>
</div>
<!-- END PAGE CONTROL -->
</td>
</tr>
</table>
</div>
<!-- END PAGE CONTROL -->
</body>
</html>';
?>