Date: 10/29/99
- Next message: athompso: "[PHPLIB-DEV] cvs commit"
- Previous message: Kristian Koehntopp: "Re: serialize() (was Re: [PHPLIB-DEV] Re: [PHPLIB] phplib - changes proposal)"
- Next in thread: athompso: "[PHPLIB-DEV] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: athompso
Date: Fri Oct 29 11:28:34 1999
Modified files:
php-lib/pages/admin/view_sessions.php3
Log message:
Added a Table subclass to make view_sessions useful "out of the box" for
anyone who hasn't grasped the base64 encoding _before_ the need to look at
the table for the first time...
Index: php-lib/pages/admin/view_sessions.php3
diff -u php-lib/pages/admin/view_sessions.php3:1.5 php-lib/pages/admin/view_sessions.php3:1.6
--- php-lib/pages/admin/view_sessions.php3:1.5 Thu Oct 14 12:38:22 1999
+++ php-lib/pages/admin/view_sessions.php3 Fri Oct 29 11:28:03 1999
@@ -7,9 +7,22 @@
page_open(array("sess" => "Example_Session", "auth" => "Example_Auth", "perm" => "Example_Perm"));
$perm->check("admin");
+ ## Create a subclass of table specifically to override table_cell in order to handle
+ ## the base64-encoded session data
+ class Base64_Table extends Table {
+ function table_cell($row, $col, $key, $val, $class="")
+ {
+ $this->table_cell_open($class);
+ if( $key=="val") { $val = base64_decode($val); };
+ printf("%s", $val);
+ $this->table_cell_close($class);
+ }
+ };
+
+
## We need a database connection and a table object for later...
$db = new DB_Example;
- $t = new Table;
+ $t = new Base64_Table;
$t->heading = "on";
$t->check = "sid";
?>
@@ -92,6 +105,6 @@
</table>
</form>
<?php page_close() ?>
-<!-- $Id: view_sessions.php3,v 1.5 1999/10/14 10:38:22 kk Exp $ -->
+<!-- $Id: view_sessions.php3,v 1.6 1999/10/29 09:28:03 athompso Exp $ -->
</body>
</html>
-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.
- Next message: athompso: "[PHPLIB-DEV] cvs commit"
- Previous message: Kristian Koehntopp: "Re: serialize() (was Re: [PHPLIB-DEV] Re: [PHPLIB] phplib - changes proposal)"
- Next in thread: athompso: "[PHPLIB-DEV] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

