diff options
author | Josh Hoyt <josh@janrain.com> | 2006-02-08 23:37:46 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-02-08 23:37:46 +0000 |
commit | 1709607f2f560a2218f57bb565b5d43899ab238d (patch) | |
tree | f69e5ad12b37fef13f76e5351bff8fde37bf0af6 /examples/server/lib/render/trust.php | |
parent | 72891e2151d48641dba3c7e54b92f770c940439a (diff) | |
download | php-openid-1709607f2f560a2218f57bb565b5d43899ab238d.zip php-openid-1709607f2f560a2218f57bb565b5d43899ab238d.tar.gz php-openid-1709607f2f560a2218f57bb565b5d43899ab238d.tar.bz2 |
[project @ re-organize the server example and make it prettier]
Diffstat (limited to 'examples/server/lib/render/trust.php')
-rw-r--r-- | examples/server/lib/render/trust.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/examples/server/lib/render/trust.php b/examples/server/lib/render/trust.php new file mode 100644 index 0000000..c00803c --- /dev/null +++ b/examples/server/lib/render/trust.php @@ -0,0 +1,29 @@ +<?php + +require_once "lib/session.php"; +require_once "lib/render.php"; + +define('trust_form_pat', + '<div class="form"> + <p>Do you wish to confirm your identity URL (<code>%s</code>) with <code>%s</code>?</p> + <form method="post" action="%s"> + <input type="checkbox" name="remember" value="on" id="remember"><label + for="remember">Remember this decision</label> + <br /> + <input type="submit" name="trust" value="Confirm" /> + <input type="submit" value="Do not confirm" /> + </form> +</div> +'); + +function trust_render($info) +{ + $current_user = getLoggedInUser(); + $lnk = link_render($current_user); + $trust_root = htmlspecialchars($info->getTrustRoot()); + $trust_url = buildURL('trust', true); + $form = sprintf(trust_form_pat, $lnk, $trust_root, $trust_url); + return page_render($form, $current_user, 'Trust This Site'); +} + +?>
\ No newline at end of file |