From 04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa Mon Sep 17 00:00:00 2001
From: Charles
Date: Thu, 9 Jan 2020 10:55:03 +0100
Subject: phpmyadmin working
---
srcs/phpmyadmin/examples/openid.php | 177 ++++++++++++++++++++++++++++++++++++
1 file changed, 177 insertions(+)
create mode 100644 srcs/phpmyadmin/examples/openid.php
(limited to 'srcs/phpmyadmin/examples/openid.php')
diff --git a/srcs/phpmyadmin/examples/openid.php b/srcs/phpmyadmin/examples/openid.php
new file mode 100644
index 0000000..e186d78
--- /dev/null
+++ b/srcs/phpmyadmin/examples/openid.php
@@ -0,0 +1,177 @@
+ [
+ 'user' => 'root',
+ 'password' => '',
+ ],
+];
+
+/**
+ * Simple function to show HTML page with given content.
+ *
+ * @param string $contents Content to include in page
+ *
+ * @return void
+ */
+function Show_page($contents)
+{
+ header('Content-Type: text/html; charset=utf-8');
+ echo '' , "\n";
+ ?>
+
+
+
+
+
+
+ phpMyAdmin OpenID signon example
+
+
+ ' , $_SESSION['PMA_single_signon_message'] , '
';
+ unset($_SESSION['PMA_single_signon_message']);
+ }
+ echo $contents;
+ ?>
+
+
+ \n";
+ $contents .= "" . htmlspecialchars($e->getMessage()) . "
\n";
+ $contents .= "";
+ Show_page($contents);
+ exit;
+}
+
+
+/* Need to have cookie visible from parent directory */
+session_set_cookie_params(0, '/', '', $secure_cookie, true);
+/* Create signon session */
+$session_name = 'SignonSession';
+session_name($session_name);
+@session_start();
+
+// Determine realm and return_to
+$base = 'http';
+if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
+ $base .= 's';
+}
+$base .= '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'];
+
+$realm = $base . '/';
+$returnTo = $base . dirname($_SERVER['PHP_SELF']);
+if ($returnTo[strlen($returnTo) - 1] != '/') {
+ $returnTo .= '/';
+}
+$returnTo .= 'openid.php';
+
+/* Display form */
+if (! count($_GET) && ! count($_POST) || isset($_GET['phpMyAdmin'])) {
+ /* Show simple form */
+ $content = '
+