Visualizzazione dei risultati da 1 a 6 su 6
  1. #1

    [freephp]BCSoft Guestbook V0.1

    Premettendo che di programmazione capisco ben poco, ho dei problemi con questo script, che è una bacheca.
    Il problema è che quando provo a cancellare i messaggi, la procedura funziona solo col più vecchio e non con uno qualsiasi; in particolare, col messaggio vecchio (ID più basso), compare la schermata con la richiesta di autenticazione; con gli altri, non compare proprio nulla: schermata bianca.
    A cosa è dovuto?

    Vi ringrazio per la disponibilità.

  2. #2
    se posti il codice, magari riusciamo a darti qualche consiglio.

    ciao

  3. #3
    scusate l'ignoranza, col fatto che l'ho scaricato da questo sito, pensavo che non occorresse.
    Sempre per ignoranza, sono costretto a postare tutto il codice, perché non so quale sia la parte incriminata

    Codice PHP:
    <?php

    /* - - - - - - - - - - - - - - -
    | BCSoft Scripts
    | Guestbook V0.1
    | Boris Carollo
    | [email]bcsoft@lycos.it[/email]
    - - - - - - - - - - - - - - - */

    // NON MODIFICARE NIENTE DOPO QUESTA LINEA -- DO NOT MODIFY ANYTHING AFTER THIS LINE

    require("mysql.inc.php");

    $qstr1 $_REQUEST["act"];
    $qstr2 $_REQUEST["cat"];

    if(
    $qstr1 == "") {
    $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 l'installazione dello script!

    Assicurati di aver inserito i dati corretti.
    </div>
    </td>
    </tr>
    </table>
    </div>
    </body>
    </html>
    "
    );
    $query1 mysql_query("SELECT COUNT(Message) FROM bcsoft_gbook");
    $query2 mysql_query("SELECT * FROM bcsoft_gbook ORDER BY ID DESC");
    while(
    $row1 mysql_fetch_array($query1)) {
    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\">
    <table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
    <tr>
    <td width=\"150\" height=\"20\" bgcolor=\"#ffff99\">
    Messaggi: [b]
    $row1[0][/b]
    </td>
    <td width=\"350\" height=\"20\" bgcolor=\"#ffff99\">
    <div align=\"right\">
    <img src=\"emoticons/write.gif\" border=\"0\"> <a href=\"index.php?act=Write\">[ Scrivi ]</a>
    </div>
    </td>
    </tr>
    "
    );
    }
    while(
    $row2 mysql_fetch_array($query2)) {
    echo(
    "
    <tr>
    <td width=\"150\" height=\"50\" bgcolor=\"#ffffff\">
    Nome: [b]
    $row2[Name][/b]

    Data: [b]
    $row2[Date][/b]

    Ora: [b]
    $row2[Time][/b]
    </td>
    <td width=\"350\" height=\"50\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]
    $row2[Title][b]
    </div>
    $row2[Message]
    <div align=\"right\">
    <img src=\"emoticons/drop.gif\" border=\"0\"> <a href=\"index.php?act=Delete&cat=
    $row2[ID]\">[ Cancella ]</a>
    </td>
    </tr>
    "
    );
    }
    echo(
    "
    </table>


    </div>
    </body>
    </html>
    "
    );
    mysql_close($link);
    }
    if(
    $qstr1 == "Write") {
    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=Write&cat=Post\">
    <table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
    <tr>
    <td width=\"500\" height=\"20\" bgcolor=\"#ffff99\" colspan=\"2\">
    <div align=\"center\">
    Scrivi
    </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\">
    Titolo
    </div>
    </td>
    <td width=\"350\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <input type=\"text\" name=\"title\" size=\"30\" maxlength=\"30\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"150\" height=\"80\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    Messaggio

    <a href=\"index.php?act=Write&cat=Emoticons\">[ Smilies ]</a>
    </div>
    </td>
    <td width=\"350\" height=\"80\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <textarea type=\"text\" name=\"message\" cols=\"40\" rows=\"4\"></textarea>
    </div>
    </td>
    </tr>
    </table>


    <input type=\"submit\" value=\" Invia \"> <input type=\"reset\" value=\" Cancella \">
    </form>
    "
    );
    if(
    $qstr2 == "Emoticons") {
    echo(
    "


    <table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
    <tr>
    <td width=\"250\" height=\"20\" bgcolor=\"#ffff99\">
    <div align=\"center\">
    Scrivi...
    </div>
    </td>
    <td width=\"250\" height=\"20\" bgcolor=\"#ffff99\">
    <div align=\"center\">
    ... e compare
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:)[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/01.gif\" border=\"0\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:([/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/02.gif\" border=\"0\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:D[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/03.gif\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:F[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/04.gif\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:@[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/05.gif\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:O[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/06.gif\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:cry:[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/07.gif\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:sbav:[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/08.gif\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:stordita:[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/09.gif\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:mad:[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/10.gif\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b];)[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/11.gif\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:z[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/12.gif\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:sbonk[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/13.gif\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:?[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/14.gif\">
    </div>
    </td>
    </tr>
    <tr>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    [b]:sexpulp:[/b]
    </div>
    </td>
    <td width=\"250\" height=\"40\" bgcolor=\"#ffffff\">
    <div align=\"center\">
    <img src=\"emoticons/15.gif\">
    </div>
    </td>
    </tr>
    </table>
    </div>
    </body>
    </html>
    "
    );
    }
    if(
    $qstr2 == "Post") {
    $name2 $_REQUEST["name"];
    $title2 $_REQUEST["title"];
    $message2 $_REQUEST["message"];
    $date date("d/m/Y");
    $time date("H:i");

    $message2 stripslashes($message2);
    $title2 stripslashes($title2);
    $name2 stripslashes($name2);
    $name2 eregi_replace("<","&lt;",$name2);
    $name2 eregi_replace("'","'",$name2);
    $title2 eregi_replace("<","&lt;",$title2);
    $message2 eregi_replace("<","&lt;",$message2);
    $message2 eregi_replace("'","'",$message2);

    $emoticons = array (
    ":)" => "emoticons/01.gif",
    ":(" => "emoticons/02.gif",
    ":D" => "emoticons/03.gif",
    ":F" => "emoticons/04.gif",
    ":@" => "emoticons/05.gif",
    ":O" => "emoticons/06.gif",
    ":cry:" => "emoticons/07.gif",
    ":sbav:" => "emoticons/08.gif",
    ":stordita:" => "emoticons/9.gif",
    ":mad:" => "emoticons/10.gif",
    ";)" => "emoticons/11.gif",
    ":z" => "emoticons/12.gif",
    ":sbonk:" => "emoticons/13.gif",
    ":?" => "emoticons/14.gif",
    ":sexpulp" => "emoticons/15.gif"
    );

  4. #4
    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>
    "
    ); 

  5. #5
    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);
    }

    ?> 

  6. #6
    Ho notato che certe volte questo scherzo lo fa, invece che col più vecchio, col più nuovo...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.