connect()) { $_SESSION["result"] = null; echo "".$messages_ini["error"]["nntp_fail"]."
"; echo $nntp->get_error_message()."
"; exit; } else { $group_info = $nntp->join_group($_SESSION["newsgroup"]); if ($group_info == NULL) { $_SESSION["result"] = null; echo "".$messages_ini["error"]["group_fail"].$_SESSION["newsgroup"]."
"; echo $nntp->get_error_message()."
"; exit; } else { if ($renew || $do_search || ($_SESSION["result"] == null)) { $renew = 1; $_SESSION["result"] = null; if ($group_info["count"] > 0) { $_SESSION["article_list"] = $nntp->get_article_list($_SESSION["newsgroup"]); if ($_SESSION["article_list"] === FALSE) { unset($_SESSION["article_list"]); echo "".$messages_ini["error"]["group_fail"].$_SESSION["newsgroup"]."
"; echo $nntp->get_error_message()."
"; exit; } if ($do_search) { $search_txt = get_request("search_txt"); //if (get_magic_quotes_gpc()) { if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { $search_txt = stripslashes($search_txt); } $search_pat = make_search_pattern($search_txt); $flat_tree = TRUE; $_SESSION["search_txt"] = htmlescape($search_txt); } else { $search_pat = "//"; $flat_tree = FALSE; unset($_SESSION["search_txt"]); } if ((strcmp($message_per_page, "all") == 0) || $do_search) { // Search through all messages $start_id = 0; $end_id = sizeof($_SESSION["article_list"]) - 1; } else { $end_id = sizeof($_SESSION["article_list"]) - $message_per_page*($page - 1) - 1; $start_id = $end_id - $message_per_page + 1; } if ($start_id < 0) { $start_id = 0; } $result = $nntp->get_message_summary($_SESSION["article_list"][$start_id], $_SESSION["article_list"][$end_id], $search_pat, $flat_tree); if ($result) { $result[0]->compact_tree(); $need_sort = TRUE; krsort($result[1], SORT_NUMERIC); reset($result[1]); } // Set the tree sorting setting as previous group and force sorting if (!isset($sort) && isset($_SESSION["sort_by"]) && $need_sort) { $sort = $_SESSION["sort_by"]; $_SESSION["sort_by"] = -1; } $_SESSION["result"] = $result; } else { $_SESSION["article_list"] = array(); $_SESSION["result"] = array(new MessageTreeNode(NULL), array()); } } } // Quit sooner to release resources $nntp->quit(); } // Control panel display section if ($_SESSION["result"]) { $root_node =& $_SESSION["result"][0]; $ref_list =& $_SESSION["result"][1]; if (!isset($_SESSION["sort_by"])) { $_SESSION["sort_by"] = 2; $last_sort = -1; $_SESSION["sort_asc"] = 0; $last_sort_dir = 0; } else { $last_sort = $_SESSION["sort_by"]; $last_sort_dir = $_SESSION["sort_asc"]; if (isset($sort)) { $_SESSION["sort_by"] = intval($sort); if ($_SESSION["sort_by"] == $last_sort) { $_SESSION["sort_asc"] = ($_SESSION["sort_asc"] == 1)?0:1; } } else { $_SESSION["sort_by"] = $last_sort; } } if (($_SESSION["sort_by"] != $last_sort) || ($_SESSION["sort_asc"] != $last_sort_dir)){ $root_node->deep_sort_message($sort_by_list[$_SESSION["sort_by"]], $_SESSION["sort_asc"]); } if (isset($sign) && isset($mid)) { $message_id = $ref_list[$mid][0]; $references = $ref_list[$mid][1]; $node =& $root_node; // Search the reference list only when the expand node is not a child of the root if (!$node->get_child($message_id)) { //if (sizeof($references) != 0) { if (sizeof(isset($references) ? $references : []) != 0) { foreach ($references as $ref) { $child =& $node->get_child($ref); if ($child != NULL) { $node =& $child; } } } } $node =& $node->get_child($message_id); if ($node) { if (strcasecmp($sign, "minus") == 0) { $node->set_show_children(FALSE); } else if (strcasecmp($sign, "plus") == 0) { $node->set_show_all_children(TRUE); } } } if (isset($_SESSION["search_txt"])) { if (sizeof($root_node->get_children()) == 0) { $info_msg["msg"] = $messages_ini["text"]["sch_notfound"]." - ".$_SESSION["search_txt"]; } else { $info_msg["msg"] = $messages_ini["text"]["sch_found1"]." ".sizeof($root_node->get_children())." ".$messages_ini["text"]["sch_found2"]." - ".$_SESSION["search_txt"]."."; } } ?>
"; } ?>
"> " style=""> Hide Search Options"; } else { echo "Search Options"; } */ ?>   " border="0" width="40" height="40"> CatWalker 0126
by Roberto CORRADO
" style="">
 
  " style="">
".$messages_ini["control"]["return"].""; } else { echo "".$messages_ini["control"]["new_news"].""; } ?> | "> | "> | "> | " target="_blank" title=""> | ".$messages_ini["control"]["less_option"].""; } else { echo "title=\"".$messages_ini["help"]["more_option"]."\">".$messages_ini["control"]["more_option"].""; } ?> 1) && $_SESSION["auth"]) { ?> . " style="">
"; echo ""; echo $info_msg["msg"]; echo "
"; echo "".$messages_ini["text"]["subject"].""; if ($_SESSION["sort_by"] == 0) { echo " "; } echo ""; echo ""; echo ""; ?> set_show_all_children($_SESSION["expand_all"]); $root_node->set_show_children(TRUE); } $display_counter = 0; if (isset($_SESSION["search_txt"]) && (strcasecmp($message_per_page, "all") != 0)) { $nodes = array_slice($root_node->get_children(), ($page - 1)*$message_per_page, $message_per_page); display_tree($nodes, 0); } else { display_tree($root_node->get_children(), 0); } } // Pagination number generation if (strcasecmp($message_per_page, "all") != 0) { if (isset($_SESSION["search_txt"])) { // Count from the number of search results $page_count = ceil((float)sizeof($root_node->get_children())/(float)$message_per_page); } else { $page_count = ceil((float)sizeof($_SESSION["article_list"])/(float)$message_per_page); } $start_page = (ceil($page/$pages_per_page) - 1)*$pages_per_page + 1; $end_page = $start_page + $pages_per_page - 1; if ($end_page > $page_count) { $end_page = $page_count; } } else { // Show All $page_count = 0; } if (($page_count != 0) && (($start_page != 1) || ($start_page != $end_page))) { ?>
"; echo "".$messages_ini["text"]["sender"].""; if ($_SESSION["sort_by"] == 1) { echo " "; } echo ""; echo "".$messages_ini["text"]["date"].""; if ($_SESSION["sort_by"] == 2) { echo " "; } echo "
 
 
: "; } echo " "; for ($i = $start_page;$i <= $end_page;$i++) { if ($page == $i) { echo $i; } else { echo "$i"; } echo " "; } if ($page != $page_count) { echo ""; } echo "    "; if ($start_page != 1) { echo "".$messages_ini["text"]["previous"]."$pages_per_page".$messages_ini["text"]["page_quality"]."  "; } if ($end_page != $page_count) { echo "".$messages_ini["text"]["next"]."$pages_per_page".$messages_ini["text"]["page_quality"]."\r\n"; } ?>