PageRenderTime 49ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/webroot/updates/concrete5.6.0.2/concrete/single_pages/dashboard/reports/logs.php

https://bitbucket.org/microwebedu/registratie_carem
PHP | 107 lines | 80 code | 24 blank | 3 comment | 10 complexity | 2feb8c234f4ad40b7a3bb6cdb7ade1e5 MD5 | raw file
Possible License(s): MIT, LGPL-2.1, BSD-3-Clause
  1. <?php
  2. defined('C5_EXECUTE') or die("Access Denied.");
  3. // HELPERS
  4. $valt = Loader::helper('validation/token');
  5. $th = Loader::helper('text');
  6. // VARIABLES
  7. // Check if entries to show, assign to boolean var.
  8. $areEntries = count($entries) > 0 ? true : false;
  9. ?>
  10. <?php echo Loader::helper('concrete/dashboard')->getDashboardPaneHeaderWrapper(t('Logs'), false, false, false);?>
  11. <?php if(!$areEntries) { ?>
  12. <div class="ccm-pane-body ccm-pane-body-footer">
  13. <p><?php echo t('There are no log entries to show at the moment.')?></p>
  14. </div>
  15. <?php echo Loader::helper('concrete/dashboard')->getDashboardPaneFooterWrapper(false);?>
  16. <?php } else { ?>
  17. <div class="ccm-pane-options ccm-pane-options-permanent-search">
  18. <form method="post" id="ccm-log-search" action="<?php echo $pageBase?>">
  19. <div class="row">
  20. <div class="span5">
  21. <label for="keywords"><?php echo t('Keywords')?></label>
  22. <div class="input">
  23. <?php echo $form->text('keywords', $keywords, array('style'=>'width:180px;'))?>
  24. </div>
  25. </div>
  26. <div class="span6">
  27. <label for="logType"><?php echo t('Type')?></label>
  28. <div class="input">
  29. <?php echo $form->select('logType', $logTypes, array('style'=>'width:180px;'))?>
  30. <?php echo $form->submit('search',t('Search') )?>
  31. </div>
  32. </div>
  33. </div>
  34. </form>
  35. </div>
  36. <div class="ccm-pane-body <?php if(!$paginator || !strlen($paginator->getPages())>0) { ?>ccm-pane-body-footer <?php } ?>">
  37. <table class="table table-bordered">
  38. <thead>
  39. <tr>
  40. <th class="subheaderActive"><?php echo t('Date/Time')?></th>
  41. <th class="subheader"><?php echo t('Type')?></th>
  42. <th class="subheader"><?php echo t('User')?></th>
  43. <th class="subheader"><input style="float: right" class="btn error btn-mini" type="button" onclick="if (confirm('<?php echo t("Are you sure you want to clear this log?")?>')) { location.href='<?php echo $this->url('/dashboard/reports/logs', 'clear', $valt->generate(), $_POST['logType'])?>'}" value="<?php echo t('Clear Log')?>" /></th>
  44. <?php echo t('Text')?></th>
  45. </tr>
  46. </thead>
  47. <tbody>
  48. <?php foreach($entries as $ent) { ?>
  49. <tr>
  50. <td valign="top" style="white-space: nowrap" class="active"><?php echo date(DATE_APP_GENERIC_TS, strtotime($ent->getTimestamp('user')))?><?php if (date('m-d-y') != date('m-d-y', strtotime($ent->getTimestamp('user')))) { ?>
  51. <?php echo t(' at ')?><?php echo date(DATE_APP_GENERIC_MDY, strtotime($ent->getTimestamp('user')))?>
  52. <?php } ?></td>
  53. <td valign="top"><strong><?php echo $ent->getType()?></strong></td>
  54. <td valign="top"><strong><?php
  55. if($ent->getUserID() == NULL){
  56. echo t("Guest");
  57. }
  58. else{
  59. $u = User::getByUserID($ent->getUserID());
  60. echo $u->getUserName();
  61. }
  62. ?></strong></td>
  63. <td style="width: 100%"><?php echo $th->makenice($ent->getText())?></td>
  64. </tr>
  65. <?php } ?>
  66. </tbody>
  67. </table>
  68. </div>
  69. <!-- END Body Pane -->
  70. <?php if($paginator && strlen($paginator->getPages())>0){ ?>
  71. <div class="ccm-pane-footer">
  72. <div class="pagination">
  73. <ul>
  74. <li class="prev"><?php echo $paginator->getPrevious()?></li>
  75. <?php // Call to pagination helper's 'getPages' method with new $wrapper var ?>
  76. <?php echo $paginator->getPages('li')?>
  77. <li class="next"><?php echo $paginator->getNext()?></li>
  78. </ul>
  79. </div>
  80. </div>
  81. <?php } // PAGINATOR ?>
  82. <?php echo Loader::helper('concrete/dashboard')->getDashboardPaneFooterWrapper(false);?>
  83. <?php } ?>