Avatar billede mc.lucifer Praktikant
15. april 2002 - 11:45 Der er 11 kommentarer og
1 løsning

PHP gæstebog

Hejsa

Jeg har lige lagt firma billeder fra vores bowling tur op på min egen webserver, men vil gerne have en gæstebog på den så kolegaerne kan skive en hilsen om aftendenen

Men den phpBook kan åbenbart kun tillade en besked pr IP om dagen så hvis alle 30 ansatte skal skrive skal de være bag forskellige IP´er, hvordan vil en kode se ud som blokere for at den samme IP skriver flere gange

Eller skal jeg måske paster config filen her ?

MC
Avatar billede mc.lucifer Praktikant
15. april 2002 - 11:47 #1
<?php
/***************************************************************************
                          config.php  -  description
                            -------------------
    begin                : Sat June 17 2000
    copyright            : (C) 2001 The phpBB Group
    email                : support@phpbb.com

    $Id: config.php,v 1.68 2001/06/16 06:05:50 thefinn Exp $

***************************************************************************/

/***************************************************************************
*
*  This program is free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2 of the License, or
*  (at your option) any later version.
*
***************************************************************************/
// This is the only setting you should need to change in this file.
// You should set this to the web path to your phpBB installation.
// For example, if you have phpBB installed in:
// http://www.mysite.com/phpBB
// Leave this setting EXACTLY how it is, you're done.
// If you have phpBB installed in:
// http://www.mysite.com/forums
// Change this to:
// $url_phpbb = "/forums";
// Once this is set you should not need to modify anything else in this file.
$url_phpbb = "/phpBB";

// -- Edit the following ONLY if you cannot login and $url_phpbb is set correclty --
// You shouldn't have to change any of these 5.
$url_admin = "$url_phpbb/admin";
$url_images = "$url_phpbb/images";
$url_smiles = "$url_images/smiles";
$url_phpbb_index = $url_phpbb . '/index.' . $phpEx;
$url_admin_index = $url_admin . '/index.' . $phpEx;

/* -- Cookie settings (lastvisit, userid) -- */
// Most likely you can leave this be, however if you have problems
// logging into the forum set this to your domain name, without
// the http://
// For example, if your forum is at http://www.mysite.com/phpBB then
// set this value to
// $cookiedomain = "www.mysite.com";
$cookiedomain = "";
// It should be safe to leave this alone as well. But if you do change it
// make sure you don't set it to a variable already in use such as 'forum'.
$cookiename = "phpBB";
// It should be safe to leave these alone as well.
$cookiepath = $url_phpbb;
$cookiesecure = false;

/* -- Cookie settings (sessions) -- */
// This is the cookie name for the sessions cookie, you shouldn't have to change it
$sesscookiename = "phpBBsession";
// This is the number of seconds that a session lasts for, 3600 == 1 hour.
// The session will exprire if the user dosan't view a page on the forum within
// this amount of time.
$sesscookietime = 3600;

/**
* This setting is only for people running Microsoft IIS.
* If you're running IIS and your users cannot login using
* the "login" link on the main page, but they CAN login
* through other pages like preferences, then you should
* change this setting to 1. Otherwise, leave at set
* to 0, because this is an ugly hack around some IIS junk.
*/
// Change to "define('USE_IIS_LOGIN_HACK', 1);" if you need to.
define('USE_IIS_LOGIN_HACK', 0);

/* Stuff for priv msgs - not in DB yet: */
// Allow BBCode in private messages?
$allow_pmsg_bbcode = 1;
// Allow HTML in private message?
$allow_pmsg_html = 0;

/* -- You shouldn't have to change anything after this point */
/* -- Cosmetic Settings -- */
$FontColor = "#FFFFFF";
$textcolorMessage = "#FFFFFF";  // Message Font Text Color
$FontSizeMessage = "1";  // Message Font Text Size
$FontFaceMessage = "Arial";  // Message Font Text Face

/* -- Images -- */
$reply_wquote_image = "$url_images/quote.gif";

$folder_image = "$url_images/folder.gif";
$hot_folder_image = "$url_images/hot_folder.gif";
$newposts_image = "$url_images/red_folder.gif";
$hot_newposts_image = "$url_images/hot_red_folder.gif";

$posticon = "$url_images/posticon.gif";
$edit_image = "$url_images/edit.gif";
$profile_image = "$url_images/profile.gif";
$email_image = "$url_images/email.gif";

$locked_image = "$url_images/lock.gif";
$locktopic_image = "$url_images/lock_topic.gif";
$deltopic_image = "$url_images/del_topic.gif";
$movetopic_image = "$url_images/move_topic.gif";
$unlocktopic_image = "$url_images/unlock_topic.gif";
$ip_image = "$url_images/ip_logged.gif";

$www_image = "$url_images/www_icon.gif";
$icq_add_image = "$url_images/icq_add.gif";
$images_aim = "$url_images/aim.gif";
$images_yim = "$url_images/yim.gif";
$images_msnm = "$url_images/msnm.gif";

/* -- Other Settings -- */
$phpbbversion = "1.4.2";
$dbhost = "localhost";
$dbname = "phpBB";
$dbuser = "1234";
$dbpasswd = "123456";
?>


Den er som følger
Avatar billede milo Nybegynder
15. april 2002 - 11:48 #2
ja paste config eller smid url til phps sider
Avatar billede mc.lucifer Praktikant
15. april 2002 - 11:48 #3
Configen er for oven
MC
Avatar billede milo Nybegynder
15. april 2002 - 11:49 #4
der står intet om dette, der...
Avatar billede mc.lucifer Praktikant
15. april 2002 - 11:50 #5
he he forkert fil
Den rigtige kommer her

MC
Avatar billede mc.lucifer Praktikant
15. april 2002 - 11:51 #6
<?
#################################################################################################
#
#  project              : phpBook
#  filename              : config.php
#  version              : 1.46
#  last modified by      : Erich Fuchs
#  e-mail                : erich.fuchs@netone.at
#  purpose              : Configuration File
#  last modified        : 11/22/2001
#
#################################################################################################

// mySql Configuration
$server            = "localhost";              // Your mySQL Server, most cases "localhost"
$db_user            = "1234";              // Your mySQL Username
$db_pass              = "123456";              // Your mySQL Password
$database          = "pbjbowl";                // Database Name

// GB Parameters
$adminpass          = "4admin";                    // Password for Administration
$guestbook_head     = "PBJ_Superbowl";              // Guestbook Header (Name)
$gb_desc            = "Skriv en hilsen til dine kolegaer, På den måde bliver det sjovere for os alle";// Enter your description here
$url_to_start      = "http://www.romdata.dk/phpbook"; // NO trailing slashes
$gb_notify          = "ricky@romdata.dk";      // leave it empty -> disable notify

$language        = "danish.php";        // for e.g. German enter german.php (see languages sub-dir)
$locations        = "worldlong.inc";        // for e.g. Europe enter europe.inc (see locations sub-dir)
$lang_dir        = "languages";            // Language Directory, no trailing slashes
$loc_dir        = "locations";            // Locations Directory, no trailing slashes
$image_dir        = "images";            // Image Directory, no trailing slashes
$limit              = array(5 ,1000);              // Message Limits (min,max)
$timelimit        = "60";                // Submit timeout in minutes (Cookiebanning), disabled if "";
$perpage        = "5";                // how much Entry's per page
$pperpage        = "11";              // how much PageBreak's per page, should be like 5,7,9,11,13
$table_width        = "400";            // enter value in pix (e.g. "600") or in % (e.g. "80%")
$table_height        = "";                // "" means the table is variable
$table_align        = "center";
$dateformat        = "us";                // for european Date&Time-Format enter "eu"
$book_version        = "1.46";            // DO NOT CHANGE THIS
$show_sysinfo        = true;                // show the systeminformation on every bottom page
$supportpwd        = "4support";            // pwd for support-info, paranoid-setting is ""

#################################################################################################
#  End Configuration
#################################################################################################
#
#  !!! DO NOT EDIT ANYTHING BEHIND THIS LINE !!!
#
#################################################################################################


require ("$lang_dir/$language");
require ("$lang_dir/admin.php");

#  Functions
#################################################################################################

function str_repeats($input, $mult) {
    $ret = "";
    while ($mult > 0) {
    $ret .= $input;
    $mult --;
    }
    return $ret;
}

function died($message) {                //when we die, than with a nice screen ;-)                                              // tbd. NOT nice yet :-) btw. maybe next releases
    echo $message;
    exit;
}

function isbanned() {
    global $REMOTE_ADDR,$database;
    $ban_query = mysql_db_query($database, "SELECT * FROM banned_ips") or died("Database Query Error");
    while ($ip = mysql_fetch_row($ban_query)) {
        if ($ip["0"] == $REMOTE_ADDR) {
            return 1;
            exit;
        }
    }
    return 0;
}

function encode_msg ($msg) {
    global $image_dir,$database;
    if ($msg) {
        $msg = str_replace("\n", "<BR>", $msg);     // Replace newline with <br>
    $result = mysql_db_query($database, "SELECT * FROM smilies") or died("Query Error");
        while ($db = mysql_fetch_array($result)) {
        $msg = str_replace($db[code], "<img src=".$image_dir."/smilies/".$db[file].">", $msg); // Smilie
        }
    }
    return $msg;
}

function urlcode_msg($msg) {
    if (get_magic_quotes_gpc()!=1) { $msg=addslashes($msg); }
    $msg = nl2br($msg);
    $msg = eregi_replace(quotemeta(""),quotemeta("<b>"),$msg);
    $msg = eregi_replace(quotemeta("
"),quotemeta("</b>"),$msg);
    $msg = eregi_replace(quotemeta(""),quotemeta("<i>"),$msg);
    $msg = eregi_replace(quotemeta("
"),quotemeta("</i>"),$msg);
    $msg = eregi_replace(quotemeta(""),quotemeta("<u>"),$msg);
    $msg = eregi_replace(quotemeta("
"),quotemeta("</u>"),$msg);
    $msg = eregi_replace("\\[url\\]www.([^\\[]*)\\[/url\\]", "<a href=\"http://www.\\1\" target=_blank>\\1</a>",$msg);
    $msg = eregi_replace("\\[url\\]([^\\[]*)\\[/url\\]","<a href=\"\\1\" target=_blank>\\1</a>",$msg);
    $msg = eregi_replace("\\[url=([^\\[]*)\\]([^\\[]*)\\[/url\\]","<a href=\"\\1\" target=_blank>\\2</a>",$msg);
    $msg = eregi_replace("\\[email\\]([^\\[]*)\\[/email\\]", "<a href=\"mailto:\\1\">\\1</a>",$msg);
    $msg=eregi_replace("\\[img\\]([^\\[]*)\\[/img\\]","<img src=\"\\1\" border=0>",$msg);
    $msg=eregi_replace("\\[swf width=([^\\[]*) height=([^\\[]*)\\]([^\\[]*)\\[/swf\\]","<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4\,0\,2\,0\" width=\"\\1\" height=\"\\2\"><param name=quality value=high><param name=\"SRC\" value=\"\\3\"><embed src=\"\\3\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"\\1\" height=\"\\2\"></embed></object>", $msg);
    return $msg;
}

function wordwrap_msg($msg, $maxwordlen=50) {
    $eachword = explode(" " , eregi_replace("<BR>"," ",$msg));
      for ($i=0; $i<count($eachword); $i++) {
    if (strlen($eachword[$i])>$maxwordlen) {
          $msg = eregi_replace($eachword[$i], chunk_split($eachword[$i],$maxwordlen), $msg);
    }
      }
    return $msg;
}

function censor_msg($msg, $admin=0) {  // Badword-Replacement
    global $database;
    $msg= urlcode_msg($msg);
    $msg= wordwrap_msg($msg);
    $eachword = explode(" " , eregi_replace("<BR>"," ",$msg));          // temp remove <BR>
    $result = mysql_db_query($database, "SELECT * FROM badwords") or died("Query Error");
    while ($db = mysql_fetch_array($result)) {
      for ($i=0; $i<count($eachword); $i++) {
    if (is_int(strpos($eachword[$i],$db[badword]))) {
          if($admin) {
            $msg = eregi_replace($eachword[$i], "<span class=\"censored\">".$eachword[$i]."</span>", stripslashes($msg)); // Badword
          } else {
            $msg = eregi_replace($eachword[$i], str_repeats("*", strlen($eachword[$i])), stripslashes($msg)); // Badword
          }
        }
      }
    }
    return $msg;
}

function decode_msg ($msg) {
    global $image_dir,$database;
    if ($msg) {
        $msg = str_replace("<BR>", "\n", $msg); // Replace newline with <br>
    $result = mysql_db_query($database, "SELECT * FROM smilies") or died("Query Error");
        while ($db = mysql_fetch_array($result)) {
        $msg = str_replace("<img src=".$image_dir."/smilies/".$db[file].">",$db[code],$msg); // Smilie
        }
    }
    return $msg;
}

function strip_array ($in) {  //foreach()-Replacement !!!
    reset($in);
    while ($array=each($in)) {
        $ckey=$array['key'];
        $cvalue=$array['value'];
        $cvalue = str_replace("'", "''", $cvalue);
        $cvalue = stripslashes($cvalue);
        $cvalue = strip_tags($cvalue);
        $out[$ckey] = $cvalue;
    }
    return $out;
}

#################################################################################################
#  EOF
Avatar billede milo Nybegynder
15. april 2002 - 11:54 #7
så vidt jeg kan se er der heller ikke noget der...
Avatar billede phrozia Juniormester
15. april 2002 - 11:59 #8
Hmm... Det ved jeg sq ikke ikke lige..

jeg har dog en anden guestbook, hvis det er interessant? tjek den på www.lifehousefan.net
Avatar billede otis Nybegynder
15. april 2002 - 12:03 #9
$timelimit        = "60";                // Submit timeout in minutes (Cookiebanning), disabled if "";
læs hvad der står ?
Avatar billede otis Nybegynder
15. april 2002 - 12:22 #10
hvis du nu fjerner "60"; og skriver ""; ved $timelimit istedet; er den så ikke fin nok ? :)
Avatar billede mc.lucifer Praktikant
15. april 2002 - 12:35 #11
Otis, Hvorfor helvede er du så Fucking Cool ??? det virker sku

MC

And the points go to Otis
Avatar billede otis Nybegynder
15. april 2002 - 12:44 #12
Det hjælper at læse :/
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester