Source for file login_ajax.php

Documentation is available at login_ajax.php

  1. <?php
  2. /*
  3. * This file is part of Sylar.
  4. *
  5. * Sylar is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * Sylar is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public License
  16. * along with Sylar. If not, see <http://www.gnu.org/licenses/>.
  17. *
  18. * @copyright Copyright Sylar Development Team
  19. * @license http://www.gnu.org/licenses/ GNU Public License V2.0
  20. * @see https://launchpad.net/sylar/
  21. * @see http://www.giano-solutions.com
  22. */
  23.  
  24. /**
  25. * Example Sylar File
  26. * Some files that shows how sylar works
  27. *
  28. * @package Sylar
  29. * @version 1.0
  30. * @since 02-2008
  31. * @author Gianluca Giusti [brdp] <g.giusti@giano-solutions.com>
  32. * @copyright Sylar Development Team
  33. */
  34.  
  35. #
  36. # Include the bas Application settings
  37. #
  38.  
  39. require_once 'config/appConfig.php';
  40. ?>
  41.  
  42. <html>
  43. <head>
  44.  
  45. </head>
  46.  
  47. <body>
  48. <p>Db bind SimpleTable</p>
  49. <a href='06.php'> &raquo;</a><br><br>
  50.  
  51. <?php
  52.  
  53. // Sylar Import
  54. import('sylar.common.system.SylarUtils');
  55. import('sylar.common.data.SimpleTable');
  56. import('sylar.common.db.mysql.data.BindSimpleTable');
  57.  
  58. // Application Import
  59. import('app.giano.db.mysql.SqlBuilderLogUtils');
  60. import('app.giano.presentation.FormatLogList');
  61.  
  62. try{
  63. echo "Binding data from DB in table SYLAR_event_log 30 random rows in HTML <br><br>Start Example:<br><br>";
  64.  
  65. // Create SimpleTable Object
  66. $simpleTb = new Sylar_SimpleTable("Log Info in HTML");
  67. // Create table Header Container
  68. $simpleTbHd = new Sylar_SimpleTableHeader(3);
  69. // Adding Column header descriptions
  70. $simpleTbHd->addColumn(new Sylar_SimpleTableHeaderColumn("event_id"));
  71. $simpleTbHd->addColumn(new Sylar_SimpleTableHeaderColumn("level"));
  72. $simpleTbHd->addColumn(new Sylar_SimpleTableHeaderColumn("event_desc"));
  73. // insert header in table
  74. $simpleTb->setColumnsHeader($simpleTbHd);
  75. // Prepare binding object
  76. $bindTb = new Sylar_BindSimpleTable();
  77. // Initialize Formatter object
  78. $formatLog = new FormatLogList();
  79. // Create Sql builder object
  80. $sqlBuilder = new SqlBuilderLogUtils();
  81. // get the Sql Query example to run on DB
  82. $sql = $sqlBuilder->extractLastEvents(30);
  83. // Exec query and bind data in the SimpleTable
  84. $bindTb->selectToTable($simpleTb, $sql);
  85. // At the end format table in HTML with second formatter example method
  86. echo $formatLog->makeHtmlLogList($simpleTb);
  87. echo "<br><br>The end of example<br><br>";
  88. }catch (ExceptionInSylar $ex){
  89. echo "\n".$ex->getMessage();
  90. }
  91.  
  92. ?>
  93.  
  94.  
  95. <textarea style='width: 100%; height:150px;'>
  96. <?php
  97. echo "Sylar included Files:\n";
  98. Sylar_SylarUtils::showIncludedFiles();
  99. echo "\n\nSylar Defined Costants:\n";
  100. Sylar_SylarUtils::showDefinedCostant();
  101. ?>
  102. </textarea>
  103. </body>
  104. </html>

Documentation generated on Thu, 24 Apr 2008 16:14:17 +0200 by phpDocumentor 1.3.0RC3