Codice PHP:
mysql_select_db($data2) or die("
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<meta name=\"author\" content=\"Boris Carollo - BCSoft\">
<meta name=\"description\" content=\"BCSoft Scripts - Guestbook V0.1\">
<meta name=\"keywords\" content=\"bcsoft, scripts, free, php, guestbook, mysql, scripting\">
<meta http-equiv=\"Refresh\" content=\"2; url=javascript:history.back(1)\">
<title>BCSoft Guestbook V0.1</title>
<style type=\"text/css\">
body {
font-family:Verdana;
font-size:10px;
}
table {
font-family:Verdana;
font-size:10px;
}
input {
font-family:Verdana;
font-size:10px;
}
textarea {
font-family:Verdana;
font-size:10px;
}
</style>
</head>
<body bgcolor=\"#ffffff\" link=\"#000000\" alink=\"#000000\" vlink=\"#000000\">
<div align=\"center\">
<table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td width=\"500\" height=\"40\" bgcolor=\"#ffff99\">
<div align=\"center\">
Errore durante l'installazione dello script!

Assicurati di aver inserito i dati corretti.
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
"
);
$query1 "DROP TABLE IF EXISTS bcsoft_gbook";
$query2 "DROP TABLE IF EXISTS bcsoft_admin";
$query3 "CREATE TABLE bcsoft_gbook (ID int(10) unsigned not null auto_increment, Name varchar(30) not null, Title varchar(30) not null, Message varchar(255) not null, Date varchar(30) not null, Time varchar(30) not null, primary key (ID))";
$query4 "CREATE TABLE bcsoft_admin (Admin varchar(30) not null, Pass varchar(30) not null, Email varchar(30) not null, Home varchar(30) not null, Date varchar(30) not null, Time varchar(30) not null)";
$query5 "INSERT INTO bcsoft_gbook (Name, Title, Message, Date, Time) values ('$name1','Script installato!','Script installato con successo!','$date','$time')";
$query6 "INSERT INTO bcsoft_admin (Admin, Pass, Email, Home, Date, Time) values ('$name1','$pass3','$mail1','$home1','$date','$time')";
mysql_query($query1);
mysql_query($query2);
mysql_query($query3);
mysql_query($query4);
mysql_query($query5);
mysql_query($query6);
mysql_close($link);

echo(
"
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<meta name=\"author\" content=\"Boris Carollo - BCSoft\">
<meta name=\"description\" content=\"BCSoft Scripts - Guestbook V0.1\">
<meta name=\"keywords\" content=\"bcsoft, scripts, free, php, guestbook, mysql, scripting\">
<meta http-equiv=\"Refresh\" content=\"2; url=index.php\">
<title>BCSoft Guestbook V0.1</title>
<style type=\"text/css\">
body {
font-family:Verdana;
font-size:10px;
}
table {
font-family:Verdana;
font-size:10px;
}
input {
font-family:Verdana;
font-size:10px;
}
textarea {
font-family:Verdana;
font-size:10px;
}
</style>
</head>
<body bgcolor=\"#ffffff\" link=\"#000000\" alink=\"#000000\" vlink=\"#000000\">
<div align=\"center\">
<table bgcolor=\"#c8c8c8\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td width=\"500\" height=\"40\" bgcolor=\"#ffff99\">
<div align=\"center\">
Script installato con successo!

Reindirizzamento alla Homepage...
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
"
);
}
}
if(
$qstr1 == "Delete") {
$link mysql_connect($host1$user1$pass1) or die("
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<meta name=\"author\" content=\"Boris Carollo - BCSoft\">
<meta name=\"description\" content=\"BCSoft Scripts - Guestbook V0.1\">
<meta name=\"keywords\" content=\"bcsoft, scripts, free, php, guestbook, mysql, scripting\">
<meta http-equiv=\"Refresh\" content=\"2; url=javascript:history.back(1)\">
<title>BCSoft Guestbook V0.1</title>
<style type=\"text/css\">
body {
font-family:Verdana;
font-size:10px;
}
table {
font-family:Verdana;
font-size:10px;
}
input {
font-family:Verdana;
font-size:10px;
}
textarea {
font-family:Verdana;
font-size:10px;
}
</style>
</head>
<body bgcolor=\"#ffffff\" link=\"#000000\" alink=\"#000000\" vlink=\"#000000\">
<div align=\"center\">
<table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td width=\"500\" height=\"40\" bgcolor=\"#ffff99\">
<div align=\"center\">
Errore durante l'installazione dello script!

Assicurati di aver inserito i dati corretti.
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
"
);
mysql_select_db($data1) or die("
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<meta name=\"author\" content=\"Boris Carollo - BCSoft\">
<meta name=\"description\" content=\"BCSoft Scripts - Guestbook V0.1\">
<meta name=\"keywords\" content=\"bcsoft, scripts, free, php, guestbook, mysql, scripting\">
<meta http-equiv=\"Refresh\" content=\"2; url=javascript:history.back(1)\">
<title>BCSoft Guestbook V0.1</title>
<style type=\"text/css\">
body {
font-family:Verdana;
font-size:10px;
}
table {
font-family:Verdana;
font-size:10px;
}
input {
font-family:Verdana;
font-size:10px;
}
textarea {
font-family:Verdana;
font-size:10px;
}
</style>
</head>
<body bgcolor=\"#ffffff\" link=\"#000000\" alink=\"#000000\" vlink=\"#000000\">
<div align=\"center\">
<table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td width=\"500\" height=\"40\" bgcolor=\"#ffff99\">
<div align=\"center\">
Errore durante l'installazione dello script!

Assicurati di aver inserito i dati corretti.
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
"
);
$admin $_REQUEST["admin"];
$apass $_REQUEST["apass"];
$query1 mysql_query("SELECT * FROM bcsoft_gbook");
$query2 mysql_query("SELECT * FROM bcsoft_admin");
while(
$row1 mysql_fetch_array($query1)) {
while(
$row2 mysql_fetch_array($query2)) {
if(
$qstr2 == $row1[ID]) {
if((
$admin == $row2[Admin]) || ($apass == $row2[Pass])) {
$query3 "DELETE FROM bcsoft_gbook WHERE ID=$row1[ID]";
mysql_query($query3);
echo(
"
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<meta name=\"author\" content=\"Boris Carollo - BCSoft\">
<meta name=\"description\" content=\"BCSoft Scripts - Guestbook V0.1\">
<meta name=\"keywords\" content=\"bcsoft, scripts, free, php, guestbook, mysql, scripting\">
<meta http-equiv=\"Refresh\" content=\"2 url=index.php\">
<title>BCSoft Guestbook V0.1</title>
<style type=\"text/css\">
body {
font-family:Verdana;
font-size:10px;
}
table {
font-family:Verdana;
font-size:10px;
}
input {
font-family:Verdana;
font-size:10px;
}
textarea {
font-family:Verdana;
font-size:10px;
}
</style>
</head>
<body bgcolor=\"#ffffff\" link=\"#000000\" alink=\"#000000\" vlink=\"#000000\">
<div align=\"center\">
<table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td width=\"500\" height=\"40\" bgcolor=\"#ffff99\">
<div align=\"center\">
Messaggio cancellato con successo!
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
"
);
} else {
echo(
"
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<meta name=\"author\" content=\"Boris Carollo - BCSoft\">
<meta name=\"description\" content=\"BCSoft Scripts - Guestbook V0.1\">
<meta name=\"keywords\" content=\"bcsoft, scripts, free, php, guestbook, mysql, scripting\">
<title>BCSoft Guestbook V0.1</title>
<style type=\"text/css\">
body {
font-family:Verdana;
font-size:10px;
}
table {
font-family:Verdana;
font-size:10px;
}
input {
font-family:Verdana;
font-size:10px;
}
textarea {
font-family:Verdana;
font-size:10px;
}
</style>
</head>
<body bgcolor=\"#ffffff\" link=\"#000000\" alink=\"#000000\" vlink=\"#000000\">
<div align=\"center\">
<form method=\"post\" action=\"index.php?act=Delete&cat=
$row1[ID]\">
<table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td width=\"500\" height=\"20\" bgcolor=\"#ffff99\" colspan=\"2\">
<div align=\"center\">
Autenticati
</div>
</td>
</tr>
<tr>
<td width=\"150\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
Admin
</div>
</td>
<td width=\"350\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
<input type=\"text\" name=\"admin\" size=\"30\" maxlength=\"12\">
</div>
</td>
</tr>
<tr>
<td width=\"150\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
Pass
</div>
</td>
<td width=\"350\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
<input type=\"text\" name=\"apass\" size=\"30\" maxlength=\"12\">
</div>
</td>
</tr>
</table>


<input type=\"submit\" value=\" Login \"> <input type=\"reset\" value=\" Cancella \">
</form>
</div>
</body>
</html>
"
);
}
}
}
}
mysql_close($link);
}

?>