diff options
Diffstat (limited to 'examples/server')
-rw-r--r-- | examples/server/index.php | 1 | ||||
-rw-r--r-- | examples/server/lib/actions.php | 1 | ||||
-rw-r--r-- | examples/server/lib/common.php | 1 | ||||
-rw-r--r-- | examples/server/lib/render.php | 1 | ||||
-rw-r--r-- | examples/server/lib/render/about.php | 1 | ||||
-rw-r--r-- | examples/server/lib/render/idpXrds.php | 3 | ||||
-rw-r--r-- | examples/server/lib/render/idpage.php | 2 | ||||
-rw-r--r-- | examples/server/lib/render/login.php | 1 | ||||
-rw-r--r-- | examples/server/lib/render/trust.php | 1 | ||||
-rw-r--r-- | examples/server/lib/render/userXrds.php | 3 | ||||
-rw-r--r-- | examples/server/lib/session.php | 1 | ||||
-rw-r--r-- | examples/server/server.php | 3 | ||||
-rw-r--r-- | examples/server/setup.php | 92 |
13 files changed, 61 insertions, 50 deletions
diff --git a/examples/server/index.php b/examples/server/index.php index b42c5b3..7a95064 100644 --- a/examples/server/index.php +++ b/examples/server/index.php @@ -2,3 +2,4 @@ header("Location: server.php"); +?>
\ No newline at end of file diff --git a/examples/server/lib/actions.php b/examples/server/lib/actions.php index 9f825e3..50dc19a 100644 --- a/examples/server/lib/actions.php +++ b/examples/server/lib/actions.php @@ -161,3 +161,4 @@ function action_userXrds() return userXrds_render($identity); } +?>
\ No newline at end of file diff --git a/examples/server/lib/common.php b/examples/server/lib/common.php index 8b45da7..80d05f5 100644 --- a/examples/server/lib/common.php +++ b/examples/server/lib/common.php @@ -92,3 +92,4 @@ function doAuth($info, $trusted=null, $fail_cancels=false, } } +?>
\ No newline at end of file diff --git a/examples/server/lib/render.php b/examples/server/lib/render.php index afa059d..33d2aef 100644 --- a/examples/server/lib/render.php +++ b/examples/server/lib/render.php @@ -111,3 +111,4 @@ function page_render($body, $user, $title, $h1=null, $login=false) return array($headers, $text); } +?>
\ No newline at end of file diff --git a/examples/server/lib/render/about.php b/examples/server/lib/render/about.php index 7e7cf1a..bd35836 100644 --- a/examples/server/lib/render/about.php +++ b/examples/server/lib/render/about.php @@ -55,3 +55,4 @@ function about_render($error=false, $internal=true) return page_render($body, $current_user, 'OpenID Server Endpoint'); } +?>
\ No newline at end of file diff --git a/examples/server/lib/render/idpXrds.php b/examples/server/lib/render/idpXrds.php index 6dde930..6e4ae1c 100644 --- a/examples/server/lib/render/idpXrds.php +++ b/examples/server/lib/render/idpXrds.php @@ -5,7 +5,7 @@ require_once "lib/render.php"; require_once "Auth/OpenID/Discover.php"; -define('idp_xrds_pat', '<?xml version="1.0" encoding="UTF-8" +define('idp_xrds_pat', '<?xml version="1.0" encoding="UTF-8"?> <xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)"> @@ -29,3 +29,4 @@ function idpXrds_render() return array($headers, $body); } +?>
\ No newline at end of file diff --git a/examples/server/lib/render/idpage.php b/examples/server/lib/render/idpage.php index a10f46d..48c2486 100644 --- a/examples/server/lib/render/idpage.php +++ b/examples/server/lib/render/idpage.php @@ -28,4 +28,4 @@ function idpage_render($identity) return array($headers, $body); } - +?> diff --git a/examples/server/lib/render/login.php b/examples/server/lib/render/login.php index 8568648..986a885 100644 --- a/examples/server/lib/render/login.php +++ b/examples/server/lib/render/login.php @@ -62,3 +62,4 @@ function loginError_render($errors) } return sprintf("<ul class=\"error\">\n%s</ul>\n", $text); } +?>
\ No newline at end of file diff --git a/examples/server/lib/render/trust.php b/examples/server/lib/render/trust.php index 5972e5d..681d456 100644 --- a/examples/server/lib/render/trust.php +++ b/examples/server/lib/render/trust.php @@ -53,3 +53,4 @@ function noIdentifier_render() return page_render(no_id_pat, null, 'No Identifier Sent'); } +?>
\ No newline at end of file diff --git a/examples/server/lib/render/userXrds.php b/examples/server/lib/render/userXrds.php index 0f0239e..a9ea95e 100644 --- a/examples/server/lib/render/userXrds.php +++ b/examples/server/lib/render/userXrds.php @@ -5,7 +5,7 @@ require_once "lib/render.php"; require_once "Auth/OpenID/Discover.php"; -define('user_xrds_pat', '<?xml version="1.0" encoding="UTF-8" +define('user_xrds_pat', '<?xml version="1.0" encoding="UTF-8"?> <xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)"> @@ -31,3 +31,4 @@ function userXrds_render($identity) return array($headers, $body); } +?>
\ No newline at end of file diff --git a/examples/server/lib/session.php b/examples/server/lib/session.php index 13b0ec9..201b6ee 100644 --- a/examples/server/lib/session.php +++ b/examples/server/lib/session.php @@ -175,3 +175,4 @@ function idFromURL($url) return @$parts['user']; } +?>
\ No newline at end of file diff --git a/examples/server/server.php b/examples/server/server.php index cbb8288..f054be8 100644 --- a/examples/server/server.php +++ b/examples/server/server.php @@ -29,7 +29,7 @@ if (function_exists('getOpenIDStore')) { writeResponse($resp); } else { - +?> <html> <head> <title>PHP OpenID Server</title> @@ -45,3 +45,4 @@ if (function_exists('getOpenIDStore')) { </html> <?php } +?>
\ No newline at end of file diff --git a/examples/server/setup.php b/examples/server/setup.php index 9ec35f8..e25ef34 100644 --- a/examples/server/setup.php +++ b/examples/server/setup.php @@ -192,7 +192,7 @@ function render_form() { $pgsql_found = true; } - +?> <html> <head> <style type="text/css"> @@ -256,7 +256,7 @@ if ($messages) { print "</div>"; } - +?> <p> Your browser has been redirected to this page so you can configure the @@ -269,13 +269,13 @@ configuration for use with the OpenID server example. <p> The server URL is the URL that points to the "server.php" file. It - looks like your server URL should be <code><?php print build_url(); </code>. + looks like your server URL should be <code><?php print build_url(); ?></code>. </p> <span class="label"><label for="i_server_url">Server URL:</label></span> <span> <input type="text" id="i_server_url" size="35" name="server_url" - value="<?php print $_SESSION['server_url'] "> + value="<?php print $_SESSION['server_url'] ?>"> </span> </div> @@ -292,7 +292,7 @@ configuration for use with the OpenID server example. </span> <span> <input type="text" id="i_include_path" size="35" name="include_path" - value="<?php print $_SESSION['include_path'] "> + value="<?php print $_SESSION['include_path'] ?>"> </span> </div> @@ -308,64 +308,64 @@ configuration for use with the OpenID server example. <div> <input type="radio" name="store_type" value="Filesystem" - id="i_filesystem"<?php if ($_SESSION['store_type'] == 'Filesystem') { print " CHECKED"; } > + id="i_filesystem"<?php if ($_SESSION['store_type'] == 'Filesystem') { print " CHECKED"; } ?>> <label for="i_filesystem">Filesystem</label> <div> <label for="i_fs_path" class="field">Filesystem path:</label> <input type="text" name="fs_path" id="i_fs_path" - value="<?php print @$_SESSION['store_data']['fs_path']; "> - <?php print $basedir_msg; + value="<?php print @$_SESSION['store_data']['fs_path']; ?>"> + <?php print $basedir_msg; ?> </div> </div> -<?php if ($sqlite_found) { +<?php if ($sqlite_found) { ?> <div> <input type="radio" name="store_type" value="SQLite" - id="i_sqlite"<?php if ($_SESSION['store_type'] == 'SQLite') { print " CHECKED"; } > + id="i_sqlite"<?php if ($_SESSION['store_type'] == 'SQLite') { print " CHECKED"; } ?>> <label for="i_sqlite">SQLite</label> <div> <label for="i_sqlite_path" class="field">SQLite database path:</label> - <input type="text" value="<?php print @$_SESSION['store_data']['sqlite_path']; " + <input type="text" value="<?php print @$_SESSION['store_data']['sqlite_path']; ?>" name="sqlite_path" id="i_sqlite_path"> - <?php print $basedir_msg; + <?php print $basedir_msg; ?> </div> </div> -<?php } +<?php } ?> -<?php if ($mysql_found || $pgsql_found) { +<?php if ($mysql_found || $pgsql_found) { ?> <div> -<?php if ($mysql_found) { +<?php if ($mysql_found) { ?> <input type="radio" name="store_type" value="MySQL" - id="i_mysql"<?php if ($_SESSION['store_type'] == 'MySQL') { print " CHECKED"; } > + id="i_mysql"<?php if ($_SESSION['store_type'] == 'MySQL') { print " CHECKED"; } ?>> <label for="i_mysql">MySQL</label> -<?php } +<?php } ?> -<?php if ($pgsql_found) { +<?php if ($pgsql_found) { ?> <input type="radio" name="store_type" value="PostgreSQL" - id="i_pgsql"<?php if ($_SESSION['store_type'] == 'PostgreSQL') { print " CHECKED"; } > + id="i_pgsql"<?php if ($_SESSION['store_type'] == 'PostgreSQL') { print " CHECKED"; } ?>> <label for="i_pgsql">PostgreSQL</label> -<?php } +<?php } ?> <div> <label for="i_m_host" class="field">Host:</label> - <input type="text" value="<?php print @$_SESSION['store_data']['host']; " name="host" id="i_m_host"> + <input type="text" value="<?php print @$_SESSION['store_data']['host']; ?>" name="host" id="i_m_host"> </div> <div> <label for="i_m_database" class="field">Database:</label> - <input value="<?php print @$_SESSION['store_data']['database']; " type="text" name="database" id="i_m_database"> + <input value="<?php print @$_SESSION['store_data']['database']; ?>" type="text" name="database" id="i_m_database"> </div> <div> <label for="i_m_username" class="field">Username:</label> - <input type="text" name="username" id="i_m_username" value="<?php print @$_SESSION['store_data']['username']; "> + <input type="text" name="username" id="i_m_username" value="<?php print @$_SESSION['store_data']['username']; ?>"> </div> <div> <label for="i_m_password" class="field">Password:</label> - <input type="password" name="password" id="i_m_password" value="<?php print @$_SESSION['store_data']['password']; "> + <input type="password" name="password" id="i_m_password" value="<?php print @$_SESSION['store_data']['password']; ?>"> </div> </div> -<?php } +<?php } ?> </div> </div> @@ -416,14 +416,14 @@ function generate_config($download = false) { header("Content-disposition: attachment; filename=config.php"); print "<?php\n"; } else { - +?> <html> <body> <h2>OpenID Example Server Configuration</h2> <p> -Put the following text into <strong><?php print dirname(__FILE__); print DIRECTORY_SEPARATOR; config.php</strong>. +Put the following text into <strong><?php print dirname(__FILE__); print DIRECTORY_SEPARATOR; ?>config.php</strong>. </p> <p> @@ -438,16 +438,16 @@ Put the following text into <strong><?php print dirname(__FILE__); print DIRECTO <?php print "<?php\n"; } - -<?php if ($_SESSION['include_path']) { +?> +<?php if ($_SESSION['include_path']) { ?> /** * Set any extra include paths needed to use the library */ set_include_path(get_include_path() . PATH_SEPARATOR . "<?php print $_SESSION['include_path']; -"); +?>"); -<?php } +<?php } ?> /** * The URL for the server. * @@ -459,7 +459,7 @@ print $_SESSION['include_path']; */ $server_url = "<?php print $_SESSION['server_url']; -"; +?>"; /** * Initialize an OpenID store @@ -488,14 +488,14 @@ function getOpenIDStore() case "MySQL": - require_once 'Auth/OpenID/MySQLStore.php'; + ?>require_once 'Auth/OpenID/MySQLStore.php'; require_once 'DB.php'; $dsn = array( 'phptype' => 'mysql', - 'username' => '<?php print $_SESSION['store_data']['username']; ', - 'password' => '<?php print $_SESSION['store_data']['password']; ', - 'hostspec' => '<?php print $_SESSION['store_data']['host']; ' + 'username' => '<?php print $_SESSION['store_data']['username']; ?>', + 'password' => '<?php print $_SESSION['store_data']['password']; ?>', + 'hostspec' => '<?php print $_SESSION['store_data']['host']; ?>' ); $db =& DB::connect($dsn); @@ -504,7 +504,7 @@ function getOpenIDStore() return null; } - $db->query("USE <?php print $_SESSION['store_data']['database']; "); + $db->query("USE <?php print $_SESSION['store_data']['database']; ?>"); $s =& new Auth_OpenID_MySQLStore($db); @@ -516,15 +516,15 @@ function getOpenIDStore() case "PostgreSQL": - require_once 'Auth/OpenID/PostgreSQLStore.php'; + ?>require_once 'Auth/OpenID/PostgreSQLStore.php'; require_once 'DB.php'; $dsn = array( 'phptype' => 'pgsql', - 'username' => '<?php print $_SESSION['store_data']['username']; ', - 'password' => '<?php print $_SESSION['store_data']['password']; ', - 'hostspec' => '<?php print $_SESSION['store_data']['host']; ', - 'database' => '<?php print $_SESSION['store_data']['database']; ' + 'username' => '<?php print $_SESSION['store_data']['username']; ?>', + 'password' => '<?php print $_SESSION['store_data']['password']; ?>', + 'hostspec' => '<?php print $_SESSION['store_data']['host']; ?>', + 'database' => '<?php print $_SESSION['store_data']['database']; ?>' ); $db =& DB::connect($dsn); @@ -542,17 +542,17 @@ function getOpenIDStore() break; } - + ?> } <?php - print ""; + print "?>"; if (!$download) { - +?> </pre> </body> </html> <?php } } // end function generate_config () - +?> |