예제 #1
0
<?php 
// load classes
include_once "../WEB-INC/class.db.php";
include_once "../WEB-INC/class.auth.php";
include_once "../WEB-INC/class.data_viewer.php";
// classes
$cDb = new db();
$cAuth = new auth();
$cDataViewer = new Viewer();
$intChannels = $cDataViewer->count_channels();
$step = 10;
$page = isset($_GET['p']) ? $_GET['p'] : 1;
$maxpages = $intChannels / $step;
$delete = isset($_POST['deletefeed']) ? $_POST['deletefeed'] : null;
if ($delete !== null) {
    $cDelete = new Delete($delete, null);
}
if ($page > $maxpages) {
    $page = $maxpages;
}
if ($page <= 1) {
    $start = 0;
    $stop = $start + $step;
    $to_back = false;
    if ($maxpages > 1) {
        $to_next = true;
    }
} else {
    $start = $page * $step;
    $stop = $start + $step;
    $to_next = false;