Esempio n. 1
0
function doLogList($cond)
{
    $log_fields = array('user' => array('table' => 'users', 'key' => 'id', 'fields' => '_userfields'), 'user2' => array('table' => 'users', 'key' => 'id', 'fields' => '_userfields'), 'thread' => array('table' => 'threads', 'key' => 'id', 'fields' => 'id,title'), 'post' => array('table' => 'posts', 'key' => 'id', 'fields' => 'id'), 'forum' => array('table' => 'forums', 'key' => 'id', 'fields' => 'id,title'), 'forum2' => array('table' => 'forums', 'key' => 'id', 'fields' => 'id,title'), 'pm' => array('table' => 'pmsgs', 'key' => 'id', 'fields' => 'id'));
    $bucket = 'log_fields';
    include 'lib/pluginloader.php';
    $joinfields = '';
    $joinstatements = '';
    foreach ($log_fields as $field => $data) {
        $joinfields .= ", {$field}.({$data['fields']}) \n";
        $joinstatements .= "LEFT JOIN {{$data['table']}} AS {$field} ON l.{$field}!='0' AND {$field}.{$data['key']}=l.{$field} \n";
    }
    $logR = Query("\tSELECT \n\t\t\t\t\t\tl.*\n\t\t\t\t\t\t{$joinfields}\n\t\t\t\t\tFROM \n\t\t\t\t\t\t{log} l\n\t\t\t\t\t\t{$joinstatements}\n\t\t\t\t\tWHERE {$cond}\n\t\t\t\t\tORDER BY date DESC\n\t\t\t\t\tLIMIT 100");
    //TODO Paging
    while ($item = Fetch($logR)) {
        $event = formatEvent($item);
        $ip = formatIP($item["ip"]);
        $cellClass = ($cellClass + 1) % 2;
        $log .= "\n\t\t\t<tr>\n\t\t\t\t<td class=\"cell2\">\n\t\t\t\t\t" . str_replace(" ", "&nbsp;", TimeUnits(time() - $item['date'])) . "\n\t\t\t\t</td>\n\t\t\t\t<td class=\"cell{$cellClass}\">\n\t\t\t\t\t{$event}\n\t\t\t\t</td>\n\t\t\t\t<td class=\"cell{$cellClass}\">\n\t\t\t\t\t{$ip}\n\t\t\t\t</td>\n\t\t\t</tr>";
    }
    echo "\n\t\t<table class=\"outline margin\">\n\t\t\t<tr class=\"header1\">\n\t\t\t\t<th>\n\t\t\t\t\t" . __("Time") . "\n\t\t\t\t</th>\n\t\t\t\t<th>\n\t\t\t\t\t" . __("Event") . "\n\t\t\t\t</th>\n\t\t\t\t<th>\n\t\t\t\t\t" . __("IP") . "\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t\t{$log}\n\t\t</table>";
}
Esempio n. 2
0
$fork->set('title', $title);
$fork->startBlockSet('body');
?>

<script type="text/javascript">
$(document).ready(function(){
	$('#activity div.diff-box').dialog({
		autoOpen: false,
		title: 'Activity Details',
		modal: true,
		width: 500
	});
	$('#activity a.diff').click(function(){
		var id = $(this).attr('id').substring(5);
		$('#diff-box-'+id).dialog('open');
		return false;
	});
	
});
</script>
<?php 
if ($events != null) {
    echo '<ul class="segmented-list activity">';
    foreach ($events as $event) {
        echo '<li class="' . $event->getCssClass() . '">';
        echo '<h6 class="primary">' . formatEvent($event, $showProject) . '</h6>';
        echo '<p class="secondary">' . formatTimeTag($event->getDateCreated());
        $details = formatEventDetails($event);
        if (!empty($details)) {
            echo ' <span class="slash">/</span> <a id="diff-' . $event->getID() . '" class="diff" href="#">Details</a></p>';
            // diff box
Esempio n. 3
0
				<option value="">show all activity</option>
				<option value="basics">Basics only</option>
				<option value="tasks">Tasks only</option>
				<option value="discussions">Discussions only</option>
				<option value="people">People only</option>
			</select>
		</div>
	</div>
	<div class="panel-body">

<?php 
if (!empty($events)) {
    echo '<ul class="segmented-list activity">';
    foreach ($events as $event) {
        echo '<li class="' . $event->getCssClass() . '">';
        echo '<h6 class="primary">' . formatEvent($event) . '</h6>';
        echo '<p class="secondary">' . formatTimeTag($event->getDateCreated()) . '</p>';
        $details = formatEventDetails($event);
        if (!empty($details)) {
            echo '<blockquote class="details">' . $details . '</blockquote>';
        }
        echo '</li>';
    }
    echo '</ul>';
} else {
    echo "<p>(none)</p>";
}
?>
	</div>
<?php 
if ($numPages > 1) {