From f94170a65c5585a2c955d14360becd3e2ca98ac2 Mon Sep 17 00:00:00 2001
From: Christophe Nowicki
Date: Thu, 23 Sep 2004 16:00:54 +0000
Subject: Group misc functions into misc.php on the idp and sp Add Federation
Terminaison metadata on the idp and sp Add view off federation on the sp Add
cancel federation button on the sp and idp Defederation is not working yet
---
php/Attic/examples/sample-idp/view_session.php | 121 +++++++++++++++++++++++++
1 file changed, 121 insertions(+)
create mode 100644 php/Attic/examples/sample-idp/view_session.php
(limited to 'php/Attic/examples/sample-idp/view_session.php')
diff --git a/php/Attic/examples/sample-idp/view_session.php b/php/Attic/examples/sample-idp/view_session.php
new file mode 100644
index 00000000..cdd62c98
--- /dev/null
+++ b/php/Attic/examples/sample-idp/view_session.php
@@ -0,0 +1,121 @@
+
+ *
+ * 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 program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+ require_once 'DB.php';
+
+ if (!file_exists('config.inc'))
+ {
+?>
+Service Provider Configuration file is not available
+Please run the setup script :
+Lasso Service Provider Setup
+You can get more informations about Lasso at
+http://lasso.entrouvert.org/
+getMessage());
+
+ $query = "SELECT nameidentifiers.user_id,users.username,ip ";
+ $query .= "FROM nameidentifiers,sso_sessions,users ";
+ $query .= "WHERE sso_sessions.name_identifier = nameidentifiers.name_identifier ";
+ $query .= "AND nameidentifiers.user_id = users.user_id";
+
+ $res =& $db->query($query);
+ if (DB::isError($res))
+ die($res->getMessage());
+
+ $numRows = $res->numRows();
+?>
+
+
+
+Lasso Service Provider Example : View Online Users
+
+
+
+
+
+
+Online Users
+
+
+ | User ID |
+ User Name |
+ Address IP |
+ Started |
+ Duration |
+
+
+
+numCols();
+ $tableinfo = $db->tableInfo($res);
+
+ while($row = $res->fetchRow())
+ {
+ echo "";
+ for ($i = 0; $i < $num_col; $i++)
+ {
+ echo "| ";
+ switch ($tableinfo[$i]['name'])
+ {
+ case "ip":
+ echo long2ip($row[$i]);
+ break;
+ default:
+ echo $row[$i];
+ }
+ echo " | ";
+ }
+ echo "
";
+ }
+
+ }
+?>
+
+
+
+ | |
+
+
+
+
+
+
+Index
+
+
+Copyright © 2004 Entr'ouvert
+
+
+
--
cgit