Beispiel #1
0
function my_checkPageValidity($request, $gallery_page, $page)
{
    if ($gallery_page == 'gallery.php' || $gallery_page == 'home.php') {
        $gallery_page = 'index.php';
    }
    return checkPageValidity($request, $gallery_page, $page);
}
Beispiel #2
0
function my_checkPageValidity($request, $gallery_page, $page)
{
    switch ($gallery_page) {
        case 'gallery.php':
            $gallery_page = 'index.php';
            //	same as an album gallery index
            break;
        case 'news.php':
        case 'album.php':
        case 'favorites.php':
        case 'search.php':
            break;
        default:
            if ($page != 1) {
                return false;
            }
    }
    return checkPageValidity($request, $gallery_page, $page);
}
Beispiel #3
0
function my_checkPageValidity($request, $gallery_page, $page)
{
    switch ($gallery_page) {
        case 'gallery.php':
            $gallery_page = 'index.php';
            //	same as an album gallery index
            break;
        case 'index.php':
            if (!extensionEnabled('zenpage') || getOption('zbase_indexlayout') != 'news') {
                // only one index page if zenpage plugin is enabled & displaying
                break;
            }
        default:
            if ($page != 1) {
                return false;
            }
        case 'news.php':
        case 'album.php':
        case 'search.php':
            break;
    }
    return checkPageValidity($request, $gallery_page, $page);
}
Beispiel #4
0
if ($records[0]['replies'] != 0 || $records[0]['tbs'] != 0) {
    if ($mbcon['avatar'] == 1 || $mbcon['usergravatar'] == 1 || $mbcon['visitorgravatar'] == 1) {
        $replyarray = $m_b->getgroupbyquery("SELECT t1.*, t2.userid, t2.avatar FROM `{$db_prefix}replies` t1 LEFT JOIN `{$db_prefix}user` t2 ON t1.replierid=t2.userid WHERE t1.blogid='{$itemid}' AND (t1.reproperty<2 OR t1.reproperty=4) ORDER BY t1.reptime {$order}  LIMIT {$start_id}, {$mbcon['replyperpage']}");
    } else {
        $replyarray = $m_b->getgroupbyquery("SELECT * FROM `{$db_prefix}replies` WHERE blogid='{$itemid}' AND (reproperty<2 OR reproperty=4) ORDER BY reptime {$order}  LIMIT {$start_id}, {$mbcon['replyperpage']}");
    }
    if ($replyarray[0]['repid'] != '') {
        $section_body_main[] = $m_b->make_replies($replyarray);
        $outurl = getlink_entry($itemid, $records[0]['blogalias'], '%s', $part);
        $pageway = 1;
        $innerpages = $m_b->make_pagebar($page, $mbcon['pagebaritems'], $outurl, $records[0]['replies'] + $records[0]['tbs'], $mbcon['replyperpage'], $pageway);
    } else {
        checkPageValidity($page, 1);
    }
} else {
    checkPageValidity($page, 1);
}
if ($records[0]['property'] != '1' && $permission['Reply'] == 1) {
    $form_reply = $m_b->make_visit_form($lnc[187], $records[0]['blogid'], "visit.php?job=addreply");
}
$section_body_main[] = $t->set('endviewentry', array('form_reply' => $form_reply, 'innerpages' => $innerpages));
if (!$is_preview) {
    //Read counter
    $allreads = $_COOKIE['readentry'];
    if (!strstr($allreads, "{$itemid},")) {
        $m_b->query("UPDATE LOW_PRIORITY `{$db_prefix}blogs` SET `views`=`views`+1 WHERE `blogid`='{$itemid}'");
        @setcookie('readentry', $allreads . "{$itemid},", time() + 7200);
    }
}
//announcebar();
$ifannouncement = "none";
Beispiel #5
0
function my_checkPageValidity($request, $gallery_page, $page)
{
    switch ($gallery_page) {
        case 'gallery.php':
            $gallery_page = 'index.php';
            //	same as an album gallery index
            break;
        case 'index.php':
            if (!extensionEnabled('zenpage')) {
                // only one index page if zenpage plugin is enabled or there is a custom index page
                break;
            }
        default:
            if ($page != 1) {
                return false;
            }
        case 'news.php':
        case 'album.php':
        case 'search.php':
            break;
    }
    return checkPageValidity($request, $gallery_page, $page);
}
 function make_innerpagebar($page, $returnurl, $totalvolume, $pageway = 0)
 {
     global $lnc;
     $conxer = strstr($returnurl, '?') ? '&amp;' : '?';
     $pagebar .= "{$lnc[87]} ";
     checkPageValidity($page, $totalvolume);
     //2008/5/25 Block abnormal pages
     for ($i = 1; $i <= $totalvolume; $i++) {
         if ($i != $page) {
             $pagebar .= $pageway == 0 ? " <a href=\"{$returnurl}{$conxer}part={$i}\">[{$i}]</a> " : " <a href=\"" . str_replace('%s', $i, $returnurl) . "\">[{$i}]</a> ";
         } else {
             $pagebar .= " [{$i}] ";
         }
     }
     return $pagebar;
 }
Beispiel #7
0
function my_checkPageValidity($request, $gallery_page, $page)
{
    switch ($gallery_page) {
        case 'gallery.php':
            $gallery_page = 'index.php';
            //	same as an album gallery index
            break;
        case 'index.php':
            if (extensionEnabled('zenpage')) {
                if (getOption('zenpage_zp_index_news')) {
                    $gallery_page = 'news.php';
                    //	really a news page
                    break;
                }
                if (checkForPage(getOption('zenpage_homepage'))) {
                    return $page == 1;
                    // only one page if zenpage enabled.
                }
            }
            break;
        case 'news.php':
        case 'album.php':
        case 'favorites.php':
        case 'search.php':
            break;
        default:
            if ($page != 1) {
                return false;
            }
    }
    return checkPageValidity($request, $gallery_page, $page);
}
Beispiel #8
0
function my_checkPageValidity($request, $gallery_page, $page)
{
    switch ($gallery_page) {
        case 'gallery.php':
            $gallery_page = 'index.php';
            //	same as an album gallery index
            break;
        case 'index.php':
            if (!getOption('gallery_index')) {
                // only one index page if zenpage plugin is enabled or gallery index page is set
                break;
            }
        default:
            if ($page != 1) {
                return false;
            }
        case 'news.php':
        case 'album.php':
        case 'favorites.php':
        case 'search.php':
            break;
    }
    return checkPageValidity($request, $gallery_page, $page);
}