default
[ class tree: default ] [ index: default ] [ all elements ]

Source for file examples.guifi_api.simple_user.step3.php

Documentation is available at examples.guifi_api.simple_user.step3.php

  1. <?php
  2. // The source code packaged with this file is Free Software, Copyright (C) 2005 by
  3. // Eduard Duran <eduard.duran at iglu.cat>.
  4. // It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
  5. // You can get copies of the licenses here:
  6. //         http://www.affero.org/oagpl.html
  7. // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "LICENSE.txt".
  8.  
  9. require 'guifi_api.php' );
  10.  
  11. /**
  12.  * Configuration of authentication against guifi.net
  13.  */
  14. $username "";
  15. $password "";
  16.  
  17. $gapi new guifiAPI$username$password );
  18.  
  19. if!empty$_GET['node_id') ) {
  20.     $node_id $_GET['node_id'];
  21. }
  22.  
  23. ifempty$node_id ) ) {
  24.     header"Location: examples.guifi_api.simple_user.php?m=1" );
  25.     die();
  26. }
  27.  
  28. if!empty$_GET['device_id') ) {
  29.     $device_id $_GET['device_id'];
  30. }
  31.  
  32. ifempty$device_id ) ) {
  33.     header"Location: examples.guifi_api.simple_user.step2.php?node_id=$node_id&m=1);
  34.     die();
  35. }
  36.  
  37. ?>
  38. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  39. <html>
  40. <head>
  41. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  42. <title>Client PHP per l'API de guifi.net</title>
  43. <script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
  44. <link rel="stylesheet" type="text/css" href="style.css" />
  45. </head>
  46. <body>
  47.  
  48. <div id="container">
  49. <div id="content">
  50. <h1>Felicitats!</h1>
  51.  
  52. <p>Has aconseguit afegir completament el teu node a guifi.net. Pots
  53. veure el teu node complet a la pàgina següent:</p>
  54. <p><a href="http://guifi.net/node/<?php
  55. echo $node_id?>">http://guifi.net/node/<?php
  56. echo $node_id?></a></p>
  57.  
  58. <p>Ara només et queda configurar la teva antena. Per això, et pots baixa la configuració UnSolClic, i enviar-la a la teva antena.</p>
  59. <p>Et pots baixar aquesta configuració des de l'adreça següent:</p>
  60. <p><a href="http://guifi.net/guifi/device/<?php echo $device_id ?>/view/unsolclic">http://guifi.net/guifi/device/<?php echo $device_id ?>/view/unsolclic</a></p>
  61.  
  62. </div>
  63. </div>
  64. </body>
  65. </html>

Documentation generated on Sun, 10 Jan 2010 21:02:49 +0100 by phpDocumentor 1.4.3