Codice PHP:
while(list($mus,$folder) = each($emoticons)) {
$message2 str_replace($mus"<img src=\"$folder\">"$message2);
}
if((
$name2 == "") || ($title2 == "") || ($message2 == "")) {
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=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\">
Tutti i campi sono obbligatori! Reindirizzamento al form...
</div>
</td>
</tr>
</table>


</div>
</body>
</html>
"
);
} else {
$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=index.php?act=Install\">
<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 la selezione 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=index.php?act=Install\">
<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 la selezione dello script!

Assicurati di aver inserito i dati corretti.
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
"
);
$query1 "INSERT INTO bcsoft_gbook (Name, Title, Message, Date, Time) values ('$name2','$title2','$message2','$date','$time')";
mysql_query($query1);
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\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td width=\"500\" height=\"40\" bgcolor=\"#ffff99\">
<div align=\"center\">
Messaggio inserito con successo! Reindirizzamento alla home page...
</div>
</td>
</tr>
</table>


</div>
</body>
</html>
"
);
}
}
}
if(
$qstr1 == "Install") {
if(
$qstr2 == "") {
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=Install&cat=Make\">
<table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td width=\"500\" height=\"20\" bgcolor=\"#ffff99\" colspan=\"2\">
<div align=\"center\">
Installazione
</div>
</td>
</tr>
<tr>
<td width=\"150\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
Host
</div>
</td>
<td width=\"350\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
<input type=\"text\" name=\"host\" size=\"30\" maxlength=\"12\" value=\"
$host1\">
</div>
</td>
</tr>
<tr>
<td width=\"150\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
User
</div>
</td>
<td width=\"350\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
<input type=\"text\" name=\"user\" size=\"30\" maxlength=\"12\" value=\"
$user1\">
</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=\"pass\" size=\"30\" maxlength=\"12\">
</div>
</td>
</tr>
<tr>
<td width=\"150\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
Database
</div>
</td>
<td width=\"350\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
<input type=\"text\" name=\"data\" size=\"30\" maxlength=\"12\" value=\"
$data1\">
</div>
</td>
</tr>
</table>


<table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td width=\"500\" height=\"20\" bgcolor=\"#ffff99\" colspan=\"2\">
<div align=\"center\">
Admin
</div>
</td>
</tr>
<tr>
<td width=\"150\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
Nome
</div>
</td>
<td width=\"350\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
<input type=\"text\" name=\"name\" 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>
<tr>
<td width=\"150\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
E-mail
</div>
</td>
<td width=\"350\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
<input type=\"text\" name=\"email\" size=\"30\" maxlength=\"30\">
</div>
</td>
</tr>
<tr>
<td width=\"150\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
Homepage
</div>
</td>
<td width=\"350\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
<input type=\"text\" name=\"home\" size=\"30\" maxlength=\"30\" value=\"http://\">
</div>
</td>
</tr>
</table>


<input type=\"submit\" value=\" Installa \"> <input type=\"reset\" value=\" Cancella \">
</form>
</div>
</body>
</html>
"
);
}
if(
$qstr2 == "Make") {
$host2 $_REQUEST["host"];
$user2 $_REQUEST["user"];
$pass2 $_REQUEST["pass"];
$data2 $_REQUEST["data"];
$name1 $_REQUEST["name"];
$pass3 $_REQUEST["apass"];
$mail1 $_REQUEST["email"];
$home1 $_REQUEST["home"];
$date date("d/m/Y");
$time date("H:i");

$link mysql_connect($host2$user2$pass2) 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>
"
);