Beispiel #1
0
function plugin_loglist_convert()
{
    global $script, $log;
    global $vars;
    global $_loglist_messages;
    list($kind) = func_get_args();
    $kind = empty($kind) ? 'update' : htmlsc($kind, ENT_QUOTES);
    if (!$log[$kind]['use']) {
        return $_loglist_messages['not_active'];
    }
    if (!empty($log[$kind]['file'])) {
        $vars['kind'] = $kind;
        $rc = do_plugin_action('logview');
        return $rc['body'];
    }
    $dir = log::get_filename($kind, '', '');
    $pages = Auth::get_existpages($dir);
    if (count($pages) == 0) {
        return $_loglist_messages['msg_not_found'];
    }
    $data = array();
    foreach ($pages as $_real => $_page) {
        $data[] = array(filemtime($dir . '/' . $_real), $_page, log_count($kind, $_page));
    }
    usort($data, function ($a, $b) {
        return $b[0] - $a[0];
    });
    // D
    // usort($data,create_function('$a,$b','return $a[0] - $b[0];')); // A
    //$str_view = $script.'?plugin=logview&kind='.$kind.'&page=';
    $str_view = get_cmd_uri('logview', $_page, null, array('kind' => $kind));
    $rc = '';
    $rc .= '|' . $_loglist_messages['fld_UTIME'] . '|' . $_loglist_messages['fld_PAGE'] . '|' . $_loglist_messages['fld_COUNT'] . "|h\n";
    foreach ($data as $_line) {
        $i = 0;
        foreach ($_line as $_field) {
            $rc .= '|';
            switch ($i) {
                case 0:
                    $rc .= get_date('Y-m-d H:i:s', $_field) . ' ' . get_passage($_field);
                    continue;
                case 1:
                    $rc .= '[' . $str_view . rawurlencode($_field) . ' ' . $_field . ']';
                    continue;
                default:
                    $rc .= $_field;
            }
            $i++;
        }
        $rc .= "|\n";
    }
    return RendererFactory::factory($rc);
}
Beispiel #2
0
                                    <span class="pull-left">Products Uploaded By <strong>User2</strong></span>
                                    <div class="clearfix"></div>
                                </div>
                        </div>
                    </div>
          
                    <div class="col-lg-4 col-md-6">
                        <div class="panel panel-pink">
                            <div class="panel-heading">
                                <div class="row">
                                    <div class="col-xs-3">
                                        <i class="fa fa-female fa-5x"></i>
                                    </div>
                                    <div class="col-xs-9 text-right">
                                        <div class="huge"><?php 
echo log_count('User3');
?>
</div>
                                        <div>Total Products!</div>
                                    </div>
                                </div>
                            </div>
                                <div class="panel-footer">
                                    <span class="pull-left">Products Uploaded By <strong>User3</strong></span>
                                    <div class="clearfix"></div>
                                </div>
                            </a>
                        </div>
                    </div>