Exemple #1
0
    }
    if ($wr > 0) {
        $grid -= 2;
    }
    echo "  <div class=\"col-xs-12 col-sm-{$grid} col-md-{$grid}\">\n";
}
//メインコンテンツ
if ($data['native'] == 'on') {
    $native($data['contents']);
} else {
    echo $data['contents'];
}
//main contents
$_contents = dbSortedContents(array('ym' => $ym));
//pagenation
$page = array_getn($_GET, 'page');
$perPage = 6;
$total = 0;
foreach ($_contents as $value) {
    if ($value['mode'] == 0) {
        $total++;
    }
}
$param = Pagenation($total, $page, $perPage);
extract($param);
$cnt2 = -1;
//display
$cnt = 0;
$ec = 0;
foreach ($_contents as $value) {
    //投稿ページのみ
Exemple #2
0
    if (isset($_SESSION) && isset($_SESSION['snplst'])) {
        $snplst = $_SESSION['snplst'];
    } else {
        if ($handle = opendir($path)) {
            while (false !== ($file = readdir($handle))) {
                if (!is_dir("{$path}/{$file}")) {
                    include "{$path}/{$file}";
                    $snplst["{$path}/{$file}"] = $snippet;
                }
            }
            closedir($handle);
        }
        usort($snplst, function ($a, $b) {
            return $b['Title'] < $a['Title'];
        });
        $_SESSION['snplst'] = $snplst;
    }
    include "snippet.html";
} else {
    if ($mode == 2 || $mode == 3) {
        if (array_getn($_GET, 'del') > 0 && $page > 0) {
            dbDelContents($page);
        }
        $_contents2 = $_contents;
        usort($_contents2, function ($a, $b) {
            return strtotime($b['regdate']) - strtotime($a['regdate']);
        });
        include "displist.html";
    }
}
$sysftr();