コード例 #1
0
ファイル: top.php プロジェクト: BGmot/kitchen
        } else {
            $orientation = "cols";
            setcookie('orientation', $orientation, 1800000000, $root_dir, $host, false, true);
        }
    }
}
require 'menu_inc.php';
$show_hidden = 2;
$ignored = array();
get_show_hidden_and_ignored();
print '<a id="up" name="up"></a>';
print_pages($max_page, $page, 'contents', $cur_page);
print "<p/>";
print '<div id="threads">';
$limit = strpos($agent, 'iPad') ? 7 : (strpos($agent, 'iPhone') || strpos($agent, 'like Mac OS') ? 5 : 200);
$result = get_threads_ex($limit);
$content = array();
$last_thread = -1;
$msgs = print_threads_ex($result, $content, $last_thread, $limit);
print_msgs($content, $msgs);
print '</div>';
print_pages($max_page, $page, 'contents', $cur_page);
print '<BR><a href="#up" target="contents">Up</a>';
print '&nbsp;&nbsp;<a href="javascript:load_threads(document.getElementById(\'threads\'), ' . $last_thread . ',' . $limit . ');" target="contents">More</a>';
$end_timestamp = time();
$duration = $end_timestamp - $start_timestamp;
print '<!-- ' . $duration . ' milliseconds -->';
// print($show_hidden . "|");
// print_r($ignored);
autoload_threads($last_thread, $limit);
?>
コード例 #2
0
ファイル: get_threads.php プロジェクト: BGmot/kitchen
<?php

/*$Id: top.php 944 2013-09-02 00:46:16Z dmitriy $*/
require_once 'head_inc.php';
require_once 'mysql_log.php';
if (isset($msg_id)) {
    get_show_hidden_and_ignored();
    $result = null;
    $last_thread = $msg_id;
    $content = array();
    $collapsed = isset($custom) && $custom == 'yes';
    if ($collapsed) {
        $limit = 50;
        // 50
        $min_thread = $last_thread - $limit;
        $result = get_thread_starts($min_thread, $last_thread - 1);
    } else {
        $limit = isset($custom) && is_numeric($custom) ? intval($custom) : 100;
        // 100
        $result = get_threads_ex($limit, $last_thread);
    }
    $msgs = print_threads_ex($result, $content, $last_thread, $limit, $collapsed);
    print "id={$last_thread}";
    print_msgs($content, $msgs);
}
require_once 'tail_inc.php';