Avatar billede hjml Nybegynder
29. juli 2003 - 19:54 Der er 21 kommentarer

Tagwall problem

Hejsa..jeg har et lille problem med en tagwall som er hentet fra thomaslunde.dk, problemet ligger i at jeg vil have et indlæg skal være i samme vindue som hvor man skriver osv...
i kan se problemet på : http://www.sonderborg-patriots.dk
  under tagwall
Avatar billede stalle Nybegynder
29. juli 2003 - 19:59 #1
i stedet for bare at linke til siderne, skal du include dem i din eksisterende side
Avatar billede hjml Nybegynder
29. juli 2003 - 20:03 #2
stalle> Hvad tænker du på...er ikke helt den stor haj til php...
Avatar billede stalle Nybegynder
29. juli 2003 - 20:15 #3
lav en side der hedder tagwall.php

i den skriver du:

<?php
include("gbook.php?cmd=form");
include("gbook.php");

?>

Så skriver du tagwall.php i menuen, i stedet for tagwall.html
Avatar billede hjml Nybegynder
29. juli 2003 - 20:31 #4
Det gik da helt galt ?....
Prøv at kigge
Avatar billede stalle Nybegynder
29. juli 2003 - 21:00 #5
Avatar billede hjml Nybegynder
29. juli 2003 - 21:06 #6
så skriver den :
Skriv et indlæg
Vis alle indlæg

Warning: Failed opening 'http://www.sonderborg-patriots.dk/gbook.php?cmd=form' for inclusion (include_path='') in d:\wwwroot\sonderborg-patriots\tagwallen.php on line 69




/ Sønderborg Patriots


Altså når jeg sætter :
<?php
include("http://www.sonderborg-patriots.dk/gbook.php?cmd=form");
?>

ind
Avatar billede stalle Nybegynder
29. juli 2003 - 21:10 #7
rent gæt-værk...
require_once("gbook.php?cmd=form");
Avatar billede hjml Nybegynder
29. juli 2003 - 21:13 #8
Det vil sige at man sætte det her ind :

<?php
include("http://www.sonderborg-patriots.dk/gbook.php?cmd=form");
require_once("gbook.php?cmd=form");
?>

Eller er det helt hen ?...
Avatar billede stalle Nybegynder
29. juli 2003 - 21:15 #9
require_once i stedet for include
Avatar billede hjml Nybegynder
29. juli 2003 - 21:17 #10
okay....prøver
Avatar billede hjml Nybegynder
29. juli 2003 - 21:19 #11
hmmm nu siger den :
Skriv et indlæg
Vis alle indlæg

Fatal error: Failed opening required 'gbook.php?cmd=form' (include_path='') in d:\wwwroot\sonderborg-patriots\tagwallen.php on line 69


Og ødelægger det hele.. :o(
Avatar billede stalle Nybegynder
29. juli 2003 - 21:28 #12
Prøv lige at paste indholdet af gbook.php her...
Avatar billede hjml Nybegynder
29. juli 2003 - 21:48 #13
<?php

  // -----------------------------------------------------------------------------------------------
  // File:      gbook.php
  // -----------------------------------------------------------------------------------------------
  // Project:  Filebased guestbook.
  // Author:    Copyright (c) Urs <urs@circle.ch>
  // Version:  1.1.3
  // Update:    10-03-2001
  // Licence:  GPL
  // PHP:      php-4.0.5-dev-win32
  //
  // -----------------------------------------------------------------------------------------------
  // Latest:
  //    V 1.1.3: [10-03-2001]
  //        - moved all languages to 'language' folder
  //        - moved config.inc.php and shared.inc.php to 'include' folder
  //        - modiefied config.inc.php and added a hash array for more easier understanding
  //        - removed passwd.txt and added a login/passwd array in config.inc.php
  //        - added 5 new languages: si, pt, br, sr and is. thanks to the translators!
  // -----------------------------------------------------------------------------------------------

  // -----------------------------------------------------------------------------------------------
  // definitions
  // -----------------------------------------------------------------------------------------------
  include_once ("include/config.inc.php");
  include_once ("include/shared.inc.php");

  // -----------------------------------------------------------------------------------------------
  // main
  // -----------------------------------------------------------------------------------------------

  if(empty($HTTP_GET_VARS[lang])) {
      $HTTP_GET_VARS[lang] = $conf[langdefault];
  }
  include_once ("language/lang.".$HTTP_GET_VARS[lang].".php" );

  switch($cmd) {
    case 'form':
      form();
      break;
    case 'admin':
      if(!authenticate()) {
          LoginForm();
      } else {
          del();
      };
      break;
    default:
      show();
      break;
  };

?>
Avatar billede stalle Nybegynder
29. juli 2003 - 22:44 #14
Der skal lige laves en del om.
Men paste også shared.inc.php, så skal jeg komme med et bud på en ombygning.
Avatar billede hjml Nybegynder
29. juli 2003 - 22:54 #15
<?php
// -----------------------------------------------------------------------------------------------
// Project:  Filebased guestbook.
// File:      shared.inc.php
// Topic:    shared resources
// Author:    urs@circle.ch
// -----------------------------------------------------------------------------------------------

            function getCOL($myFILE, $row, $arg) {        // $row->row; $arg=""->whole line, $arg=2->get arg 2

              $content = file($myFILE);                // read file

              if($arg == ""):
                return $content[$row];
                break;
              else:
                $myLINE = explode("|",$content[$row-1]);
                return $myLINE[$arg];
              endif;
            }

            function evalMAXid($file){
              global $id;

              $content = file($file);
              $size = count($content);

              $maxID = 0;
              for($line=1; $line<=$size; $line++):
                $tmpID = getCOL($file, $line, "0");
                if($tmpID > $maxID) { $maxID = $tmpID; }
              endfor;

              return $maxID;
            }

            function show(){

              global $PHP_SELF, $pos, $HTTP_GET_VARS;
              global $s_head, $s_new, $s_text, $s_url, $s_author, $s_date, $s_pages, $s_itmes;
              global $s_forward, $s_back;
              global $conf;

              if(isset($pos) == 0)
                $pos = 0;      // start position for the page indexer
              ?>
              <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRansitional//EN">
              <HTML>
              <HEAD>
              <TITLE><?php echo $s_head; ?></TITLE>
              </HEAD>

              <BODY style="font-family:verdana; font-size:10px">
              <FORM name="switchlang" action="<?php echo basename($PHP_SELF); ?>" METHOD="get">
              <CENTER>
                <TABLE border="0" cellspacing="0" cellpadding="0" width="100%">
                  <TR>
                    <TD align="CENTER"><h2><?php echo $s_head; ?></h2>
                    <TR align="CENTER">
                      <TD>
                      <TABLE border="0" width="80%">
                        <TR valign="top">
                          <TD colspan="4" >
                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
                              <TR valign="bottom">
                                <TD style="font-family:verdana; font-size:10px" width="100">
                                <a href="<?php echo basename($PHP_SELF)."?cmd=form"."&lang=".$HTTP_GET_VARS["lang"]; ?>">
                                <img src="./images/edit.gif" width="18" height="13" border="0"></a><?php echo $s_new; ?></TD>
                                <TD style="font-family:verdana; font-size:10px" width="*" align="center">&nbsp;</TD>
                               
                  <TD style="font-family:verdana; font-size:10px" width="200" align="right">
                    <?php
                                if($conf[langfeature] == "yes"):
                                ?>
                  <TD width="30" align="right">
                    <?php
                                endif;
                                ?>
                  </TD>
                              </TR>
                            </TABLE>
                          </TD>
                        </TR>
                        <TR valign="top">

                          <TD colspan=5 height="1">
                          <hr width="100%" noshade size="1"></TD>
                          </TR>
                          <?php
                          $content = file($conf[f_data] );
                          $size = count($content);

                          if($pos >= $size) $pos = 0;              // break at manipulated inputs on $pos

                          for($i=$pos; $i<($conf[itemsperpage]+$pos); $i++):
                            if($i > $size-1) break;                // break due to not existing contents
                              $text = explode("|",stripslashes($content[$size-$i-1]));
                              ?>
                              <TR valign="top">
                                <TD colspan=5>
                                <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                                  <TR>
                                   
                  <TD width="112" style="font-size: 10pt" valign="top">
                    <?php echo $s_text." ".$text[0]; ?>
                  <TD width="453" style="font-size: 10pt">
                    <?php echo $text[7]; ?>
                    <?php
                                  if(($text[6] != "http://") AND (!empty($text[6])) ):
                                  ?>
                <TR>
                                   
                  <TD width="112" style="font-size: 10pt" valign="top">
                    <?php echo $s_url; ?>
                  <TD width="453" style="font-size: 10pt"> <font size="-1"><a href='<?php echo $text[6]; ?>'>
                    <?php echo $text[6]; ?>
                    </a></font>
                    <?php
                                  endif;
                                  ?>
                <TR>
                                   
                  <TD width="112" style="font-size: 10pt" valign="top">
                    <?php echo $s_author; ?>
                  <TD width="453" style="font-size: 10pt"> <font size="-1"><a href='mailto:<?php echo $text[3]; ?>'>
                    <?php echo $text[2]; ?>
                    </a></font>
                <TR>
                                   
                  <TD width="112" style="font-size: 10pt" valign="top">
                    <?php echo $s_date; ?>
                  <TD width="453" style="font-size: 10pt">
                    <?php echo $text[1]; ?>
                <TR>
                                    <TD colspan="2"><hr width="100%" noshade size="1">
                                </TABLE>
                                </TD>
                              </TR>
                          <?php
                          endfor;
                          ?>

                        <!-- number of pages index -->
                        <TR>
                          <TD ALIGN="LEFT" valign="top" style="font-size: 8pt" width="30%"><?php echo $s_pages; ?>
                            <?php
                              for($j=0; $j<$size; $j++):
                                if(!($j % $conf[itemsperpage] )):
                                  ?>
                                  <a href="<?php echo basename($PHP_SELF)."?pos=".$j."&lang=".$HTTP_GET_VARS[lang]; ?>"><?php echo (($j/$conf[itemsperpage])+1); ?></a>
                                  <?php
                                endif;
                              endfor;
                              ?>
                              </TD>
                              <!-- forward / reverse -->
                              <TD ALIGN="center" valign="top" style="font-size: 8pt" width="30%"><?php echo $s_itmes; ?><?php echo $size;?></TD>
                              <TD ALIGN="right" valign="top" style="font-size: 8pt" width="30%">
                              <?php
                                if ($pos > 0):
                                  ?>
                                  <a href="<?php echo basename($PHP_SELF)."?pos=".($pos-$conf[itemsperpage] )."&lang=".$HTTP_GET_VARS[lang]; ?>"><?php echo $s_back; ?></a>
                                  <?php
                                endif;
                                if($size > $pos+$conf[itemsperpage] ):
                                  ?>
                                  <a href="<?php echo basename($PHP_SELF)."?pos=".($pos+$conf[itemsperpage] )."&lang=".$HTTP_GET_VARS[lang]; ?>"><?php echo $s_forward; ?></a>
                                  <?php
                                endif;
                                ?>
                            </TD>
                          </TR>
                          <TR>
                           
            <TD colspan="4" align="CENTER">&nbsp;
          </TR>
                        <!-- number of pages index -->

                      </TABLE>
                      </TD>
                    </TR>
                </TABLE>
              </CENTER>
              </BODY>
              </HTML>
              <?php
            }


            function form(){

              global $PHP_SELF, $pos, $go, $HTTP_GET_VARS;
              global $f_head, $f_title, $f_new, $f_text, $f_url, $f_author, $f_date, $f_pages, $f_itmes;
              global $f_country, $f_location, $f_email;
              global $f_forward, $f_back, $f_submit, $f_alert;
              global $author, $email, $beitrag, $ort, $land, $url;
              global $conf;

              if (!$go):
                ?>
                <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRansitional//EN">
                <HTML>
                <HEAD>
                <TITLE><?php echo $f_head; ?></TITLE>
                </HEAD>

                <BODY style="font-family:verdana; font-size:10pt">
                <CENTER>
                <TABLE border="0" cellspacing="0" cellpadding="0" width="100%">
                <TR>
                <TD>
                <CENTER>
                  <font face="Verdana" size="2"><b><?php echo $f_title; ?></b></font>
                </CENTER><BR>
                </TD>
                </TR>
                  <TR align="center">
                    <TD>
                    <TABLE border="0" width="400">
                      <form action="<?php echo basename($PHP_SELF)."?cmd=form"."&lang=".$HTTP_GET_VARS[lang]; ?>" method="post">
                      <TR>
                        <TD width="70"><?php echo $f_author; ?></TD>
                        <TD colspan="2">
                        <input type="Text" name="author" value="Skriv dit navn her">
                        </TD>
                      </TR>
                        <TR>
                        <TD valign=top width="70"><?php echo $f_text; ?></TD>
                        <TD colspan="2">
                        <textarea name="beitrag"  cols="25" rows="7"></textarea>
                        </TD>
                      </TR>
                      <TR>
                        <TD width="70"><?php echo $f_country; ?></TD>
                        <TD colspan="2">
                        <input type="Text" name="By" value="Hvor kommer du fra?">
                        </TD>
                      </TR>
                      <TR>
                        <TD width="70"><?php echo $f_email; ?></TD>
                        <TD colspan="2">
                        <input type="Text" name="email" value="Skriv din email her">
                        </TD>
                      </TR>
                      <TR>
                        <TD width="70">Hjemmeside:</TD>
                        <TD colspan="2">
                        <input type="Text" name="url" value="http://">
                        </TD>
                      </TR>
                      <TR>
                        <TD width="70">&nbsp;</TD>
                        <TD colspan="2">&nbsp;</TD>
                      </TR>
                      <TR>
                        <TD ALIGN="CENTER" width="70">&nbsp;</TD>
                        <TD align="left" colspan="2">
                        <INPUT type="Submit" value="<?php echo $f_submit; ?>" style="width:100; font:9pt">
                        <INPUT type="hidden" name="go" value=1>
                        </TD>
                      </TR>
                      </FORM>

                      <!-- start back button -->
                      <TR>
                      <TD align="CENTER" width="70">&nbsp;</TD>
                      <TD align="left">
                        <FORM method="get" action="<?php echo basename($PHP_SELF); ?>">
                          <INPUT TYPE="submit" value="<?php echo $f_back; ?>" style="width:100; font:9pt" >
                          <INPUT type="hidden" name="lang" value="<?php echo $HTTP_GET_VARS["lang"]; ?>" >
                        </FORM>
                      </TD>
                      </TR>
                      <!-- end back button -->

                      </TABLE>
                    </TD>
                  </TR>

                  </TABLE>

                  </CENTER>
                  </BODY>
                  </HTML>
                  <?php
                  else:
                      if($author=="" || $email=="" || $beitrag==""):

                    ?>
                    <script type="text/javascript">
                      window.alert('<?php echo $f_alert; ?>');
                      history.back(-1);
                    </script>
                    <?php

                    else:
                    // begin writing to the file
                    $datum = date("j.n.Y");
                    $content = file($conf[f_data] );
                    $size = count($content);

                    $id = evalMAXid($conf[f_data] )+1;

                    $beitrag = str_replace("|", "/", $beitrag);
                    $beitrag = str_replace("\n", "<br>", $beitrag);    // these 3 lines do not look sophisticated,
                    $beitrag = str_replace("\r", "", $beitrag);        // but it works properly
                    $beitrag = str_replace("\n", "", $beitrag);

                    $text = $id."|".$datum."|".$author."|".$email."|".$ort."|".$land."|".$url."|".$beitrag."|";
                    $content[$size] = $text;

                    $fp=@fopen($conf[f_data], "a");
                    if($fp <= 0):
                      ?>Error opening data file.<br><?php
                    endif;
                    fputs($fp, $content[$size]."\n");
                    fclose($fp);

                    if ($conf[feedback] == "yes") {
                        $title = "New Entry in myGBOOK";
                        $from =  "From: ".$email."\nX-Mailer: MyGBOOK";
                        @mail($conf[myemail], $title, $beitrag, $from);
                    };

                    // log authors ip/host, datetime and entry id
                    $log = new log_visitors("data/logauthors.txt", FALSE, $id );

                    ?>
                    <script type="text/javascript">
                      window.location.href="<?php echo basename($PHP_SELF)."?lang=".$HTTP_GET_VARS[lang]."&".md5(time()); ?>";
                    </script>
                    <?php
                  endif;
                endif;
            }

            /**
            * authenticate versus the $authentication array or cookie
            * urs_at_circle_dot_ch, 16-1-2001
            *
            */
            function authenticate(){
                global $PHP_SELF, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;
                global $conf, $authentication;

                // coming from login form
                if(strlen($HTTP_POST_VARS[sent] )) {
                  $login_ok = 0;
                  if (strlen($HTTP_POST_VARS[login] ) AND strlen($HTTP_POST_VARS[passwd] )) {
                    for($i=0; $i<count($authentication ); $i++) {
                      if ($authentication[$HTTP_POST_VARS[login]] == $HTTP_POST_VARS[passwd] ) {
                          if(!strlen($HTTP_POST_VARS[check_it])) $conf[cookielifetime] = "";
                          setcookie('login', $HTTP_POST_VARS[login], $conf[cookielifetime], "/", "", 0 );
                          setcookie('passwd', $HTTP_POST_VARS[passwd], $conf[cookielifetime], "/", "", 0 );
                          return 1; // authentication succeeded
                          $login_ok = 1;
                          break;
                      }
                    }
                  }
                  if(!$login_ok ) {
                    return 0;      // access denied
                  }
                // coming from anywhere else
                } else {
                  for($i=0; $i<count($authentication); $i++) {
                      if (($authentication[$HTTP_COOKIE_VARS[login]] == $HTTP_COOKIE_VARS[passwd] )
                                                            AND (strlen($HTTP_COOKIE_VARS[passwd]) ) ) {
                          return 1; // authentication succeeded
                          $login_ok = 1;
                          break;
                      }
                  }
                  if(!$login_ok ) {
                    return 0;      // access denied
                  }
                }
            }


            function LoginForm(){

              global $PHP_SELF, $login, $passwd, $loginform, $sent;

              $header = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE>ThomasLunde.dk</TITLE><link rel="stylesheet" href="style.php"></HEAD><BODY><CENTER>';
              $footer = '</CENTER></BODY></HTML>';

              echo $header;
              ?><form method="post" action="<?php echo basename($PHP_SELF); ?>" name=loginform  enctype="multipart/form-data">
              <input type="hidden" name="cmd" value="admin">
             

              <tr>
                <td align="left">
                <font face="Verdana" size="1"><font size="1">Brugernavn:</font></font>
                <td align="left">
                <input type="text" name="login" maxlength=50 size=10 style="width: 90px; font-size: 10px"><BR>
              <tr>
                <td align="left">
                <font face="Verdana" size="1"><font size="1">Password:</font></font>
                <td align="left">
                <input type="password" name="passwd" maxlength=50 size=10 style="width: 90px; font-size: 10px"><BR>
              <?php
              /*
              <tr>
                <td align="center">
                Logininformation speichern.
                <td align="center">
                <input name="check_it" value="1" type="checkbox" onclick="cookieREMARK()" >
              */
              ?>
              <tr>
                <td align="left">&nbsp;
                <td align="left">&nbsp;
              <tr>
                <td align="left">&nbsp;
               
                <td align="left">
                <input type="submit" value="login" name="sent" style="width: 30px; heigth: 18px; font-size: 10px">
              </table>
              </form>

              <script type="text/javascript">
              <!--
              if (document.loginform) {
                document.loginform.login.focus();
              }
              // -->
              </script>
              <?php
              echo $footer;
            }

            function redirect($cmd){

              global $PHP_SELF;
              ?>
              <SCRIPT type="text/javascript">
                window.location.href="<?php echo basename($PHP_SELF).$cmd; ?>";
              </SCRIPT>
              <?php
            }

            function getITEM($file, $row, $col){            // rows, cols, args

              $content = file($file);                      // read file
              $myROWS = count($content);                  // get number of lines

              for($i=0; $i<$myROWS; $i++):                // split by seperator "|"
                $myLINES[$i] = explode("|",$content[$i]);
              endfor;
              $myCOLS = count($myLINES[0]);                // get number of arguments per line

            }

            function del(){

              global $PHP_SELF, $emaildel, $valid, $email, $conf;
              ?>
              <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRansitional//EN">
              <HTML>
              <HEAD>
              <TITLE>ThomasLunde.dk</TITLE>
              </HEAD>

              <BODY style="font-family:verdana; font-size: 10px">
              <center>
              <font face="Verdana" size="1"><b><font size="2">Administrator / Slet indlæg i gæstebogen</font></b></font>
              <?php
              if(!$valid):
                $content = file($conf[f_data] );
                $myROWS = count($content);
                ?>
                <FORM action="<?php echo basename($PHP_SELF)."?cmd=admin&".md5(time()); ?>" method="POST" enctype="multipart/form-data">
                <TABLE align="center">
                <?php
                for($i=0; $i<$myROWS; $i++):                // split by seperator "|"
                  $myLINES[$i] = explode("|",$content[$i]);
                  ?>
                  <tr>
                    <td align="left" valign="top">
                    <INPUT TYPE="checkbox" NAME="emaildel[<?php echo $myLINES[$i][0]; ?>]" VALUE="1">
                    <td align="left"><?php echo $myLINES[$i][7]; ?>
                  <tr>
                    <td colspan="2"><hr>
                  <?
                endfor;
                ?>
                  <tr>
                    <td colspan="2" align="center">
                  <INPUT TYPE="submit" NAME="submit" VALUE="Slet">
                  <INPUT TYPE="hidden" name="valid" value="1">
                </TABLE>
                </FORM>
                <?
            else:
            ?>
            <center>
              <?php

              $fp = @fopen($conf[f_data], "r");
              if($fp <= 0):
                ?>Filen er enten beskadiget eller findes ikke!<br><?php
              else:
                $nfp = @fopen($conf[f_data].".tmp","w");
                while(feof($fp) == 0):
                  $line = chop(fgets($fp, 1000));
                  $items =  explode("|", $line);
                  if($line == "")
                    continue;
                  if($emaildel[$items[0]]):
                    echo $items; ?> erased. <br><?php
                  else:
                    fputs($nfp, $line."\n");
                  endif;
                endwhile;
                fclose($fp);
                fclose($nfp);
                unlink($conf[f_data] );
                rename($conf[f_data].".tmp", $conf[f_data] );
                ?>
                <p>Indlæg slettet!<br>
                <?php
              endif;
              ?>
              <br>
              <A HREF="<?php echo basename($PHP_SELF); ?>">back</A>
              <script type="text/javascript">
                window.location.href="<?php echo basename($PHP_SELF); ?>";
              </script>
            </center>
            <?php
            endif;
            ?>
            </CENTER>
            </FORM>
            </BODY>
            </HTML>
            <?php
          }

          /**
          * log visitors host and time
          * urs@circle.ch, 21-1-2001
          */
          class log_visitors {
              var $visited;

              function log_visitors ($logfile="data/logfile.txt", $unique=TRUE, $str="default" ) {
                  global $REMOTE_HOST, $REMOTE_ADDR;

                  $this->logfile          = $logfile;                    // can be configured
                  $this->unique          = $unique;                      // log unique visits
                  $this->str              = $str;                        // any other additional log string
                  $this->cookielifetime  = 864000;                      // 24 hours
                  $this->currentdate      = date("d.m.Y H:i:s", time() ); // 21.01.2001 16:50:32
                  $this->host            = isset($REMOTE_HOST ) ? $REMOTE_HOST : @gethostbyaddr($REMOTE_ADDR );

                  $this->log_write();
              }

              function log_write () {
                  global $HTTP_COOKIE_VARS, $HTTP_GET_VARS;
                  if($this->unique ) {
                      $this->log_setcookie(1);
                  } else {
                      $this->log_setcookie(0);
                  }

                  if($HTTP_COOKIE_VARS[visited] < 1 ) {
                      $fp = fopen("$this->logfile", "a+" );
                      fwrite($fp, "$this->currentdate, $this->str, $this->host, $HTTP_GET_VARS[lang]\n",
                                              strlen("$this->currentdate, $this->str, $this->host, $HTTP_GET_VARS[lang]\n" ));
                      fclose($fp);
                  }
              }

              function log_setcookie ($val) {
                  setcookie('visited', $val, time()+$this->cookielifetime, "/", "", 0 );
              }

          } // end class

?>
Avatar billede hjml Nybegynder
30. juli 2003 - 17:31 #16
Har du fundet ud af noget ?....
Avatar billede stalle Nybegynder
30. juli 2003 - 19:12 #17
Den nemme løsning ville vist være at lave om i gbook.php, så den ser sådan ud:

switch($cmd) {
    case 'form':
      form();
      break;
    case 'admin':
      if(!authenticate()) {
          LoginForm();
      } else {
          del();
      };
      break;
    default:
      form();
      show();
      break;
  };
Avatar billede hjml Nybegynder
30. juli 2003 - 20:58 #18
det virker ikke når gbook.php ser sådan her ud :

?php

  // -----------------------------------------------------------------------------------------------
  // File:      gbook.php
  // -----------------------------------------------------------------------------------------------
  // Project:  Filebased guestbook.
  // Author:    Copyright (c) Urs <urs@circle.ch>
  // Version:  1.1.3
  // Update:    10-03-2001
  // Licence:  GPL
  // PHP:      php-4.0.5-dev-win32
  //
  // -----------------------------------------------------------------------------------------------
  // Latest:
  //    V 1.1.3: [10-03-2001]
  //        - moved all languages to 'language' folder
  //        - moved config.inc.php and shared.inc.php to 'include' folder
  //        - modiefied config.inc.php and added a hash array for more easier understanding
  //        - removed passwd.txt and added a login/passwd array in config.inc.php
  //        - added 5 new languages: si, pt, br, sr and is. thanks to the translators!
  // -----------------------------------------------------------------------------------------------

  // -----------------------------------------------------------------------------------------------
  // definitions
  // -----------------------------------------------------------------------------------------------
  include_once ("include/config.inc.php");
  include_once ("include/shared.inc.php");

  // -----------------------------------------------------------------------------------------------
  // main
  // -----------------------------------------------------------------------------------------------

  if(empty($HTTP_GET_VARS[lang])) {
      $HTTP_GET_VARS[lang] = $conf[langdefault];
  }
  include_once ("language/lang.".$HTTP_GET_VARS[lang].".php" );

  switch($cmd) {
    case 'form':
      form();
      break;
    case 'admin':
      if(!authenticate()) {
          LoginForm();
      } else {
          del();
      };
      break;
    default:
      form();
      show();
      break;
  };

?>
Avatar billede stalle Nybegynder
30. juli 2003 - 21:04 #19
Du skal rette linket i menuen til at være gbook.php
Avatar billede hjml Nybegynder
04. august 2003 - 15:01 #20
stalle...okay det virkede faktisk..men kom helt fra det her..man lig lige et svar så for du point :o)
Avatar billede hjml Nybegynder
25. februar 2004 - 09:43 #21
lig lige et svar .o)
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