function dashboard_events_widget_render() { global $dashboardEvents; if (get_request_method() == "POST") { if (isset($_POST["dashboard_events"]) && $_POST["dashboard_events"] == "clear_all") { $dashboardEvents->clear(); redirect(get_url("plugin/dashboard/")); die; } } $log_entries = Record::findAllFrom("DashboardLogEntry", "created_on=created_on ORDER BY created_on DESC"); $path = WOLF_PATH_WIDGETS . "events/"; ?> <form method="post" action=""> <table class="dashboardTable" cellpadding="0" cellspacing="0" border="0"> <thead> <tr> <th colspan="2"></th> <th><?php echo __("Event"); ?> </th> <th class="moment"><?php echo __("Time"); ?> <img src="<?php echo $path; ?> img/sort.png" /></th> </tr> </thead> <tbody> <?php $entrynum = 0; foreach ($log_entries as $entry) { ?> <tr class="<?php echo odd_even(); ?> "> <td class="hidden"><?php echo $entrynum; ?> </td> <td class="priority"> <img src="<?php echo $path; ?> img/<?php echo $entry->priority("string"); ?> .png" title="<?php echo $entry->priority("string"); ?> " /> </td> <td class="dashboardMessage"><?php echo $entry->message; ?> </td> <td class="date"> <a title="<?php echo $entry->created_on; ?> "><?php echo DateDifference::getString(new DateTime($entry->created_on)); ?> </a> </td> </tr> <?php $entrynum++; } ?> </tbody> </table> <p class="buttons"> <input type="hidden" name="dashboard_events" value="clear_all" /> <input type="submit" name="dashboard_action" value="<?php echo __("Clear all"); ?> " class="button" /> </p> </form> <?php }
dashboard/img/<?php print $entry->priority('string'); ?> .png" title="<?php print $entry->priority('string'); ?> " /></td> <td class="dashboardMessage"><?php print $entry->message; ?> </td> <td class="date"><a title="<?php print $entry->created_on; ?> "><?php print DateDifference::getString(new DateTime($entry->created_on)); ?> </a></td> </tr> <?php $entrynum = $entrynum + 1; ?> <?php } ?> </tbody> </table> <p class="buttons"> <input class="button" name="commit" type="submit" accesskey="c" value="<?php
<fieldset style="padding: 0.5em;"> <legend style="padding: 0em 0.5em 0em 0.5em; font-weight: bold;"><?php echo __('Cached pages'); ?> </legend> <table class="fieldset" cellpadding="0" cellspacing="0" border="0"> <?php foreach ($pages as $page) { ?> <tr> <td class="field"><?php print $page->publicUrl(); ?> </td> <td class="field"><?php print DateDifference::getString(new DateTime($page->created_on)); ?> </td> <td class="field"><a href="<?php echo get_url('plugin/funky_cache/delete/') . $page->id; ?> "><img src="<?php echo PLUGINS_URI; ?> /funky_cache/images/delete.png" title="Delete this cached page." /></a></td> </tr> <?php } ?> </table> </fieldset>