Exemple #1
0
        $timeperiod_end = gmmktime(0, 0, 0, $month, $day + 1, $year) - $config['timezone'] * 3600;
        $counter_now = $blog->countbyquery("SELECT COUNT(blogid) FROM `{$db_prefix}blogs` {$limitation2}  `pubtime`>'{$timeperiod_start}' AND `pubtime`<'{$timeperiod_end}' ORDER BY `pubtime` DESC");
        $urlpattern = getlink_date($year, $month, $day, '%s', '1');
        if ($flset['modeselectable'] != 1) {
            $pagebaritem = "";
        }
        $pagetitle = "{$year}/{$month}/{$day} {$lnc[106]} × ";
        $partialquery = "{$limitation2} `pubtime`>'{$timeperiod_start}' AND `pubtime`<'{$timeperiod_end}' ORDER BY `pubtime` DESC";
        if ($mbcon['showday_list'] == 1) {
            $perpagevalue = $mbcon['listitemperpage'];
            $actionforexc = 'list';
            $urlref = getlink_date($year, $month, $day, '2', '%s');
        } else {
            $perpagevalue = $mbcon['exceptperpage'];
            $actionforexc = 'excerpt';
            $urlref = getlink_date($year, $month, $day, '1', '%s');
        }
        break;
    default:
        @header("Location: index.php");
        break;
}
$records = $m_b->new_record_array($partialquery, $perpagevalue, $page);
$pagebar = $m_b->make_pagebar($page, $mbcon['pagebaritems'], $urlref, $counter_now, $perpagevalue, $pageway);
if ($pagebar) {
    $pagebar .= $pagebaritem;
}
if (!empty($m_b->total_rows)) {
    if ($actionforexc == 'excerpt') {
        $section_body_main = $m_b->make_excerption($records);
    } else {
Exemple #2
0
function makecalendar($month, $year, $month_calendar, $lunarstream = '')
{
    global $nowtime, $mbcon, $config;
    $all_date = monthly($month, $year);
    $weekline = count($all_date) / 7;
    for ($i = 0; $i < $weekline; $i++) {
        $chart .= "<tr class=\"calendar-weekdays\">";
        for ($j = 0; $j < 7; $j++) {
            $currentdate = $all_date[$i * 7 + $j];
            if ($j == 0) {
                $class = "calendar-sunday";
            } elseif ($j == 6) {
                $class = "calendar-saturday";
            } else {
                $class = "calendar-day";
            }
            //workdays
            $outurl = getlink_date($year, $month, $currentdate);
            if (@in_array($currentdate, $month_calendar)) {
                $ca_sh = "<a href=\"{$outurl}\" rel=\"noindex,nofollow\">{$currentdate}</a>";
            } else {
                $ca_sh = $currentdate;
            }
            if (is_array($lunarstream)) {
                if ($mbcon['lunarcalendar'] == 2) {
                    $ca_sh = "<span title='{$lunarstream[$currentdate]}'>{$ca_sh}</span>";
                } else {
                    $ca_sh .= '<br/>' . $lunarstream[$currentdate];
                }
            }
            if ($currentdate !== '') {
                $chart .= "<td id=\"cal{$currentdate}\" class=\"{$class}\">{$ca_sh}</td>";
            } else {
                $chart .= "<td class=\"{$class}\">{$ca_sh}</td>";
            }
        }
        $chart .= "</tr>";
    }
    return $chart;
}