Exemple #1
0
function baw_display_extra_1($set)
{
    // <- change extra_1 to extra_2, 3, 4 etc
    global $BAW_MES, $BAW_CURR, $BAW_D, $BAW_CONF, $BAW_LIB, $BAW_CONF_DIS_DEF;
    $format = array(0 => array('title' => 'Screen colors', 'format' => 'layout_text'), 1 => array('percent' => true, 'title' => $BAW_MES[57], 'format' => 'layout_hits'));
    $newval = array();
    // change the two following lines from EXTRA_1 to EXTRA_2, 3, 4 etc
    if ($val = baw_data($BAW_CURR['site_name'], 'EXTRA_1', $BAW_CURR['yearmonth'])) {
        foreach ($val as $type => $data) {
            $newval[$type] = array($type, $data[1]);
        }
    } else {
        if ($BAW_CONF['hideempty']) {
            return '';
        }
    }
    $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);
    $out = '';
    if ($set['table']) {
        $out .= baw_render_table($set['name'], $newval, $format, false, $set['total'], $set['top_x']);
    }
    return $out;
}
Exemple #2
0
function baw_display_errors404($set)
{
    global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;
    $format = array(0 => array('title' => $BAW_MES[49], 'format' => 'layout_text'), 1 => array('title' => $BAW_MES[57], 'format' => 'layout_hits'), 2 => array('title' => $BAW_MES[127], 'format' => 'layout_text'));
    $newval = array();
    if ($val = baw_data($BAW_CURR['site_name'], 'SIDER_404', $BAW_CURR['yearmonth'])) {
        foreach ($val as $type => $data) {
            $newval[$type] = array(baw_create_link($type, "http://{$BAW_CURR['site_name']}", array(), true), $data[0], baw_create_link($data[1], $data[1], array(), true));
        }
    } else {
        if ($BAW_CONF['hideempty']) {
            return '';
        }
    }
    $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);
    $out = '';
    if ($set['table']) {
        $out .= baw_render_table($set['name'], $newval, $format, false, $set['total'], $set['top_x']);
    }
    return $out;
}