RE: [PHPLIB] PHPLIB-7.2 released From: Andrzej Piasecki (robin <email protected>)
Date: 10/26/99

>
> On Tue, Oct 26, 1999 at 01:25:22PM +0200, Andrzej Piasecki wrote:
>
> AP> With 7.2 I have: 1. I can click logout 100 times and quit IE5.0.
> AP> Fine, but I start exploder again. Ok, I have login screen. Great! I
> AP> press login without user and password and of course I have logged !!!
> AP> Superb. Simply logout doesn't work at all. 2. I had nice filter for
> AP> my database browsing as registered array. Now it's not working. I
> AP> don't know why yet.
>
> Can you provide some code for testing?

Ok.

index.php3:

<?php
include "class_container.php3";
         page_open(array("sess" => "Example_Session", "auth" => "Example_Auth",
"perm" => "Example_Perm", "user" => "Example_User"));
// page access requires that the user is authenticated and has "admin"
permission
// printf("%d",$auth->is_authenticated());
        $perm->check("admin");

        $db = new DB_Example;
        $SelectF["Ekspedycja"]=array("name"=>"Ekspedycja","size"=>"1",
                        "tablename"=>"ekspedycje",
                        "viewfield"=>"Nazwa",
                        "setfield"=>"Skrot"
                        );
        $Con = new Container($db,"psd","Indeks",$SelectF,$user,15,1);
?>
<html>
<head>
<style type="text/css">
<?php $Con->GenerujStyl(); ?>
</style>
<title>Browsing</title>
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-2">
<META NAME="Language" CONTENT="pl">
</head>
<body background=gfx/patterns/whitemar.gif>
<?php
        $Con->Manager($akcja);
?>
<a href="logout.php3<?php $sess->purl(); ?>">Logout</a>
</body>
</html>
<?php
page_close();
?>

logout.php3 is standard logout file from phplib distribution.

Container is my class which declare classes extends table and form

>From container.php3:

<?php
include("table.inc");
include("oohforms.inc");

function Manager($akcja)
{
        global ${$this->con_start_record_name};
        global ${$this->con_record_filter_name};

        if($akcja=="edit") $this->con_edit();
        if($akcja=="update") $this->con_update();
        if($akcja=="brow_left") $this->con_browse_left();
        if($akcja=="brow_right") $this->con_browse_right();
        if($akcja=="filter_form") $this->con_filter_edit();

        if($akcja=="after_filter")
        {
                ${$this->con_record_filter_name}=$this->con_after_filter();
                ${$this->con_start_record_name}=0; $this->con_browse();
        }
        if($akcja=="browse") $this->con_browse();
        if($akcja=="") { ${$this->con_start_record_name}=0; $this->con_browse(); }

}

I add to links f.e. "?akcja=con_browse"

Ok. That's all I think is important.

I yesterday updated phplib to 7 pre5 form cvs and I have :
auth.inc 1.20
session.inc 1.44
ct_sql.inc 1.10
local.inc 1.21

and it's working.

Andrzej Piasecki
robin <email protected>
Member of World Federation of Mad Hackers

-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.