Visualizzazione dei risultati da 1 a 8 su 8
  1. #1
    Utente di HTML.it L'avatar di mybox
    Registrato dal
    Mar 2007
    Messaggi
    507

    servizio guestbook su questa base

    vorrei creare un servizio di creazione guestbook automatica su questa base.qualcuno sa aiutarmi???

    allego i file del gb:

    admin.php
    Codice PHP:
    <?
    include("config.php");
    include
    "header.php";
    print 
    "password: 

    <input title=\"pwd\" name=\"pwd\" maxlength=\"15\"/>

    <anchor title=\"Ok\">OK

    <go href=\"admin.php?gumsl=check\" method=\"post\">
    <postfield name=\"pwd\" value=\"$(pwd)\"/>
    </go>
    </anchor></p>"
    ;
    if (
    $gumsl=="check"){
         if(
    $pwd=="$pass"){
         print
    "


         <a href=\"admin.php?gumsl=2\">Ripulisci GuestBooK</a>:


         </p> "
    ;
         }else{ print
    "

    Password Errata!!!!</p> "
    ;   }
    }

    if(
    $gumsl=="2"){
    print
    "


    <a href=\"admin.php?gumsl=3\">Cancella Tutto!</a>
    </p>"
    ;
    }

    if(
    $gumsl=="3"){
    $fp fopen("gb.txt","w+");
    echo 
    "

    Guestbook Pulito!</p>"
    ;
    }

    print 
    '



    [size="1"]
    (c) MyBox[/size]</p>


    </card>
    </wml>
    '
    ;

    ?>

  2. #2
    Utente di HTML.it L'avatar di mybox
    Registrato dal
    Mar 2007
    Messaggi
    507
    say.php
    Codice PHP:
    <?
    echo("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n");
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
    <head>
    <title>MyBox ™ </title>
    <link rev="made" href="mailto:mybox@altervista.org" />      
    <link rev="start" href="mybox.altervista.org/." title="Home Page" />    
    <link rel="StyleSheet" type="text/css" href="style/style.css" />    
    <link rel="shortcut icon" type="image/x-icon" href="logo.gif" />    
    <meta http-equiv="Cache-Control" content="must-revalidate" />    
    <meta http-equiv="Cache-Control" content="no-cache" />    
    <meta name="description" content="mybox site " />    
    <meta name="keywords" content="italy" />
    </head>
    <body>
    <?
    echo "<onevent type=\"onenterforward\">\n";
    echo 
    "<refresh>\n";
    echo 
    "<setvar name=\"mess\" value=\"\"/>\n";
    echo 
    "</refresh>\n";
    echo 
    "</onevent>\n";
    echo 
    "<form method=\"POST\" action=\"add.php\">";
    echo 
    "

    "
    ;
    echo 
    "Nick:";
    echo 
    "<input title=\"name\" name=\"name\"/>
    "
    ;

    echo 
    "Email:";
    echo 
    "<input title=\"mail\" name=\"mail\"/>
    "
    ;

    echo 
    "Messaggio:";
    echo 
    "<input title=\"mess\" name=\"mess\"/>
    "
    ;

    echo 
    "<input type=\"submit\" name=\"Submit\" value=\"invia\"/>
    "
    ;

    echo 
    "

    <center>"
    ;
    echo 
    "(c) MyBox";
    echo 
    "</center></p>";
    ?>

  3. #3
    Utente di HTML.it L'avatar di mybox
    Registrato dal
    Mar 2007
    Messaggi
    507
    add.php
    Codice PHP:
    <?

    $this_day
    =(date("D, j F Y"));
    $lan $HTTP_ACCEPT_LANGUAGE;
    $user explode ('/'$HTTP_USER_AGENT);

    if(
    $name==""){
    header ('Location: history.php?npage=1');
    }
    elseif(
    $mess==""){
    header ('Location: history.php?npage=1');
    }
    else{
               
    $text "$name::$mess::$tz $this_day::$user[0] $lan::$mail::$HTTP_USER_AGENT::$REMOTE_ADDR::";

               
    $fp=@fopen("gb.txt","a");

               @
    fputs($fp,"$text \r\n");
               @
    fclose($fp);
    header ('Location: history.php?npage=1');
    }


    ?>

  4. #4
    Utente di HTML.it L'avatar di mybox
    Registrato dal
    Mar 2007
    Messaggi
    507
    history.php
    Codice PHP:
    <?

    include("config.php");



    $tn=date("H:i:s",time());

    echo(
    "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n");
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
    <head>
    <title>MyBox ™ </title>
    <link rev="made" href="mailto:mybox@altervista.org" />      
    <link rev="start" href="mybox.altervista.org/." title="Home Page" />    
    <link rel="StyleSheet" type="text/css" href="style/style.css" />    
    <link rel="shortcut icon" type="image/x-icon" href="logo.gif" />    
    <meta http-equiv="Cache-Control" content="must-revalidate" />    
    <meta http-equiv="Cache-Control" content="no-cache" />    
    <meta name="description" content="wap mybox " />    
    <meta name="keywords" content="italy" />
    </head>
    <body>
    <?
    ////////////////////////////////////////////////////////////
    echo "

    <center>"
    ;
    print 
    '[img]'.$image.'[/img]';
    print 
    "
    "
    ;


    echo 
    "[size="1"]Lascia un tuo commento  [b]oppure[/b], il link al tuo sito...";
    echo 
    "<hr>";
    print 
    "<a href=\"say.php\">[SCRIVI]</a>

    $line2";

      
    $xfile = @file("gb.txt");
     
    $total=count($xfile);


       if (
    $npage == ""){$npage "1";}
      
    $first count($xfile) - ($p * ($npage 1));
      
    $second count($xfile) - ($p $npage) + 1;
      if (
    $second 1) {$second 1;}
      
    $npages = (int)(count($xfile) / $p);
      if (
    $news_limiter>((int) ($npages*$p))) $npages $npages+1;
      if (
    $npage <= $npages and $npage>1$gline_rew "<small><a href=\"history.php?npage=".($npage-1)."\">&lt; Prec</a>[/size]";
      if (
    $npages and $npage<$npages$gline_next "[size="1"]<a href=\"history.php?npage=".($npage+1)."\">Succ &gt;</a>[/size]";

      for (
    $i $first-1$i >= $second-1$i--)
      {
       
    $ii $i;
       
    $ii++;
       
    $udata explode("::",$xfile[$i]);
       
    $udata[4] = ereg_replace(" """$udata[4]);
       
    $udata[4]=substr(trim($udata[4]),0,30);
        
    $udata[0]=substr(trim($udata[0]),0,30);



        
    $udata[1] = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)',
        
    '[url="\\1"]\\1[/url]'$udata[1]);
        
    $udata[1] = eregi_replace('([[:space:]()[{}])([url]www.[/url][-a-zA-Z0-9@:%_\+.~#?&//=]+)',
        
    '\\1[url="http://\\2"]\\2[/url]'$udata[1]);






          
    $dt explode (','$udata[2]);
          
    $this_day=(date(" j F Y"));
          
    $dt2 explode (' '$udata[2]);
          if(
    $dt[1]==$this_day){$udata[2]="$dt2[0] [b]Today[/b]";}else{}

       print 
    "[size="1"]$udata[2]
    Nick: [b]
    $udata[0][/b]
    "
    ;
       
    $e=$udata[4];
       if (
    $e==""){}else{
        
    $udata[4] = eregi_replace('([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})',
        
    '[email="\\1"]\\1[/email]'$udata[4]);
       print 
    "Email: $udata[4]
    "
    ; }
       print 
    "Phone: $udata[3]
    Messaggio: 
    $udata[1][/size]
    $line2";
       }



      print 
    $gline_rew."|".$gline_next."";
       print 
    "$line2
       
    $total Messaggi Inviati<hr>
      [size="
    1"][b]<a href=\"".$url."\">".$site."</a>[/b]


      [/size]
    "
    ;
    echo 
    "
    (c) MyBox"
    ;
    echo 
    "</center></p>";
    ?>
    </body>
    </html>

  5. #5
    Utente di HTML.it L'avatar di mybox
    Registrato dal
    Mar 2007
    Messaggi
    507
    config.php
    Codice PHP:
    <?
    $p 
    5//Messages to be displayed per page    
    $url="http://";
    $site="";
    $image="gb.gif";  //logo
    $line2="<hr>"//divide line
    $pass=""//  Administrators password for admin.php

    ?>
    spero che mi possiate aiutare... :master:

  6. #6
    Utente di HTML.it
    Registrato dal
    Jan 2004
    Messaggi
    378
    se ho capito bene per prima cosa devi creare una tabella per gli account degli utenti che si registreranno a questo servizio di guestbook,
    poi devi aggiungere un campo alle altre tabelle -account_id- autoincrement per tenere sotto controllo i valori relativi a quell'account,poi con qualche chiamata al database+unioni puoi fare quello che vuoi fare tu..ovviamente io stò parlando di un guestbook che memorizza i dati su un database e no su un file di testo..quindi devi modificare questo script prima cosa di tutto
    ciao

  7. #7
    Utente di HTML.it L'avatar di mybox
    Registrato dal
    Mar 2007
    Messaggi
    507
    sapete aiutarmi a creare un antiflood su questo gb e nell'amministrazione l'opzione d eliminare 1 solo mess per volta e non tutti come ora??

  8. #8
    Utente di HTML.it L'avatar di mybox
    Registrato dal
    Mar 2007
    Messaggi
    507
    up

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 © 2024 vBulletin Solutions, Inc. All rights reserved.