Exemplo n.º 1
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;
}
Exemplo n.º 2
0
function baw_display_list_link($text, $title, $section, $class)
{
    global $BAW_CONF, $BAW_CURR;
    $out = '';
    if ($BAW_CONF['module'] == 'drupal') {
        $url = "/{$BAW_CONF['drupal_base']}/details/{$section}/{$BAW_CURR['month']}/{$BAW_CURR['year']}";
    } else {
        $url = "{$BAW_CONF['site_url']}/index.php?site={$BAW_CURR['site_name']}&month={$BAW_CURR['month']}&year={$BAW_CURR['year']}" . "&action=get_fulltable&what={$section}";
    }
    $out .= baw_create_link($text, $url, array('title' => $title, 'class' => $class), false, false);
    return $out;
}