diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-12-11 06:38:23 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-12-11 06:38:23 -0500 |
commit | d9bf22a0e29c2a70049443a0ae8521a2c0492c8b (patch) | |
tree | c7599a9169d5def7df56c480ad6d67f312443d6f /models/openid-php-openid-782224d/examples/server/server.php | |
download | elgg-d9bf22a0e29c2a70049443a0ae8521a2c0492c8b.tar.gz elgg-d9bf22a0e29c2a70049443a0ae8521a2c0492c8b.tar.bz2 |
initial commit for git repository
Diffstat (limited to 'models/openid-php-openid-782224d/examples/server/server.php')
-rw-r--r-- | models/openid-php-openid-782224d/examples/server/server.php | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/models/openid-php-openid-782224d/examples/server/server.php b/models/openid-php-openid-782224d/examples/server/server.php new file mode 100644 index 000000000..f054be818 --- /dev/null +++ b/models/openid-php-openid-782224d/examples/server/server.php @@ -0,0 +1,48 @@ +<?php + +$path_extra = dirname(dirname(dirname(__FILE__))); +$path = ini_get('include_path'); +$path = $path_extra . PATH_SEPARATOR . $path; +ini_set('include_path', $path); + +$try_include = @include 'config.php'; + +if (!$try_include) { + header("Location: setup.php"); +} + +header('Cache-Control: no-cache'); +header('Pragma: no-cache'); + +if (function_exists('getOpenIDStore')) { + require_once 'lib/session.php'; + require_once 'lib/actions.php'; + + init(); + + $action = getAction(); + if (!function_exists($action)) { + $action = 'action_default'; + } + + $resp = $action(); + + writeResponse($resp); +} else { +?> +<html> + <head> + <title>PHP OpenID Server</title> + <body> + <h1>PHP OpenID Server</h1> + <p> + This server needs to be configured before it can be used. Edit + <code>config.php</code> to reflect your server's setup, then + load this page again. + </p> + </body> + </head> +</html> +<?php +} +?>
\ No newline at end of file |