summaryrefslogtreecommitdiffstats
path: root/log
diff options
context:
space:
mode:
Diffstat (limited to 'log')
-rw-r--r--log/appinfo.php6
-rw-r--r--log/index.php39
-rw-r--r--log/templates/_c/.gitkeep0
-rw-r--r--log/templates/index.tmpl46
4 files changed, 78 insertions, 13 deletions
diff --git a/log/appinfo.php b/log/appinfo.php
new file mode 100644
index 00000000000..e4ffa79efe1
--- /dev/null
+++ b/log/appinfo.php
@@ -0,0 +1,6 @@
+<?php
+
+OC_UTIL::addApplication( array( "id" => "log", "name" => "Log" ));
+OC_UTIL::addNavigationEntry( array( "app" => "log", "file" => "index.php", "name" => "Log" ));
+
+?>
diff --git a/log/index.php b/log/index.php
index da76d2e0e5b..58cc1f54021 100644
--- a/log/index.php
+++ b/log/index.php
@@ -1,31 +1,44 @@
<?php
/**
-* ownCloud
+* ownCloud - ajax frontend
+*
+* @author Robin Appelman
+* @copyright 2010 Robin Appelman icewind1991@gmail.com
*
-* @author Frank Karlitschek
-* @copyright 2010 Frank Karlitschek karlitschek@kde.org
-*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
+* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
-*
+*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
+*
+* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
+*
*/
-require_once('../inc/lib_base.php');
+//require_once('../../config/config.php');
+require_once('../lib/base.php');
+oc_require( 'template.php' );
+if( !OC_USER::isLoggedIn()){
+ header( "Location: ".OC_UTIL::linkto( "index.php" ));
+ exit();
+}
+
+$logs=OC_LOG::get( $dir );
+
+foreach( $logs as &$i ){
+ $i["date"] = date( $CONFIG_DATEFORMAT, $i['timestamp'] );
+ $i["action"] = OC_LOG::$TYPE[$i['type']];
+}
-OC_UTIL::showheader();
-OC_LOG::show();
-OC_UTIL::showfooter();
+$tmpl = new OC_TEMPLATE( "log", "index", "user" );
+$tmpl->assign( "log", $logs );
+$tmpl->printPage();
?>
diff --git a/log/templates/_c/.gitkeep b/log/templates/_c/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/log/templates/_c/.gitkeep
diff --git a/log/templates/index.tmpl b/log/templates/index.tmpl
new file mode 100644
index 00000000000..64152ff20d8
--- /dev/null
+++ b/log/templates/index.tmpl
@@ -0,0 +1,46 @@
+<h1>Logs</h1>
+
+<div class="controls">
+ <form id="logs_options">
+ <p>
+ <span>Filter :</span>
+
+ <input type="checkbox" checked="checked" name="all" id="all" /> <label for="all">All</label>
+ <input type="checkbox" checked="checked" name="logins" id="logins" /> <label for="logins">Logins</label>
+ <input type="checkbox" checked="checked" name="logouts" id="logouts" /> <label for="logouts">Logouts</label>
+ <input type="checkbox" checked="checked" name="downloads" id="downloads" /> <label for="downloads">Downloads</label>
+ <input type="checkbox" checked="checked" name="uploads" id="uploads" /> <label for="uploads">Uploads</label>
+
+ <input type="checkbox" checked="checked" name="creations" id="creations" /> <label for="creations">Creations</label>
+ <input type="checkbox" checked="checked" name="deletions" id="deletions" /> <label for="deletions">Deletions</label>
+ </p>
+ <p>
+ <span>Show :</span>
+ <input type="text" maxlength="3" size="3" value="10" />&nbsp;entries per page.
+ <input type="submit" value="Save" />
+
+ </p>
+ </form>
+</div>
+
+<table cellspacing="0">
+ <thead>
+ <tr>
+ <th>What</th>
+ <th>When</th>
+
+ </tr>
+ </thead>
+ <tbody>
+ [%foreach $logs as $entry%]
+ <tr>
+ <td class="login"><em>[%$entry.user%]</em> [% $entry.message %]</td>
+ <td class="date">[%$entry.date%]</td>
+ </tr>
+ [%/foreach%]
+ </tbody>
+</table>
+
+<div class="controls">
+ <p class="center"><a href="" title="Previous page">&larr;</a>&nbsp;3/5&nbsp;<a href="" title="Next page">&rarr;</a></p>
+</div>