initial commit
[emacs-init.git] / nxhtml / tests / in / test-only-nxml.my-xhtml
1 <?php
2
3 // some basic library functions
4 include_once 'lib.php';
5
6 $book = new Mybook($api_key, $secret);
7
8 if (isset($_POST['to'])) {
9   $prints_id = (int)$_POST['to'];
10   $prints = do_step($user, $prints_id);
11 } else {
12   if (isset($_GET['to'])) {
13     $prints_id = (int)$_GET['to'];
14   } else {
15     $prints_id = $user;
16   }
17   $prints = get_prints($prints_id);
18 }
19
20 ?>
21 <div style="padding: 10px;">
22   <h2>Hi <mb:name firstnameonly="true" uid="<?php=$user?>" useyou="false"/>!</h2><br/>
23   <a href="<?= $book->get_add_url() ?>">Put prints in your profile</a>.
24     <form method="post" action="http://my-domain.com/footprints/">
25 <?php
26       if ($prints_id != $user) {
27         echo '<input type="hidden" name="to" value="' . $prints_id . '"/>';
28       } else {
29         echo '<br/>';
30       }
31 ?>
32       <input value="step" type="submit"/>
33     </form>
34   <hr/>
35   These are <mb:name uid="«?= $prints_id ?»" possessive="true"/> Footprints:<br/>
36   <?php echo render_prints($prints, 10); ?>
37   <div style="clear: both;"/>
38 </div>