api.webrender.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. $contentContainer = '';
  3. /**
  4. * Shows data in primary content container
  5. *
  6. * @global string $ContentContainer
  7. * @param string $title
  8. * @param string $align
  9. * @param string $data
  10. */
  11. function show_window($title, $data, $align = 'left') {
  12. global $contentContainer;
  13. $window_content = '
  14. <table width="100%" border="0">
  15. <tr>
  16. <td><h2>' . @$title . '</h2></td>
  17. </tr>
  18. <tr>
  19. <td valign="top" align="' . $align . '">
  20. ' . @$data . '
  21. </td>
  22. </tr>
  23. </table>
  24. ';
  25. $contentContainer = $contentContainer . $window_content;
  26. }
  27. function show_error($data) {
  28. return show_window('', '<span class="alert_error">' . $data . '</span>', 'center');
  29. }
  30. function show_warning($data) {
  31. return show_window('', '<span class="alert_warning">' . $data . '</span>', 'center');
  32. }
  33. function show_success($data) {
  34. return show_window('', '<span class="alert_success">' . $data . '</span>', 'center');
  35. }
  36. function show_info($data) {
  37. return show_window('', '<span class="alert_info">' . $data . '</span>', 'center');
  38. }