?> function loadImage(num){ if (num < 1) return; if (num > imageArray.length) {<?php foreach (fr_available_chapters() as $key => $value) { if ($value == fr_selected_chapter()) { $thekey = $key; } } if ($thekey > 0) { $fr_available_chapters_temp = fr_available_chapters(); echo "location.href = \"" . $fr_baseurl . fr_get_href(fr_selected_comic(), $fr_available_chapters_temp[$thekey - 1]) . "\""; } else { echo 'location.href = "' . fr_get_href(fr_selected_comic()) . '&last"'; } ?> }; if (num <= imageArray.length) current = num; if (widthArray[num-1] > 900 && widthArray[num-1]/heightArray[num-1] > 1.2) { jQuery("#thePic").css("width", widthArray[num-1]); jQuery("#theManga").css("width",widthArray[num-1]); isSpread = true; } else{ jQuery("#thePic").attr('style', ''); jQuery("#theManga").attr('style',''); isSpread = false; } var pageState = {};
function fr_show_page() { global $fr_contentdir; $temp_avail = fr_available_pages(); if (empty($temp_avail)) { echo '<div class="theList">This chapter has no pages available.</div>'; return; } echo '<div id="theManga"><div id="thePic"><a href="'; if (fr_selected_page() != count($temp_avail)) { echo fr_get_href(fr_selected_comic(), fr_selected_chapter(), fr_selected_page() + 1); } else { $temp = fr_available_chapters(); sort($temp); $key = array_search(fr_selected_chapter(), $temp); $key++; echo fr_get_href(fr_selected_comic(), $temp[$key], "1"); if ($temp[$key] == null) { echo "&last"; } } echo '" id="thePicLink"><img alt="' . fr_selected_manga_title() . '" src="' . fr_get_image_href(fr_selected_comic(), fr_selected_chapter(), $temp_avail[fr_selected_page() - 1]) . '"/></a></div></div>'; }
if (isset($_GET['manga']) && arraycontains(fr_available_comics(), stripslashes($_GET['manga']))) { $fr_selected_comic = stripslashes($_GET['manga']); } else { fr_get_comicSelect(); exit(1); } // reads the comic's folder and loads up all the available chapters fr_get_chapters(); // look in the URL query if there's a selected chapter. If there is, keep going. Else, show a chapter selection list. // if there's no match with the chapter name, show the chapter list. if (isset($_GET['chapter']) && arraycontains(fr_available_chapters(), stripslashes($_GET['chapter']))) { $fr_selected_chapter = stripslashes($_GET['chapter']); } else { fr_get_chapterSelect(); exit(1); } // read the chapter's folder and load up all the available pages fr_get_pages(); // prepares an URL for the next chapter, that will be needed once the user reaches the last page of the chapter. if (($fr_next_chapter = array_search(fr_selected_chapter(), fr_available_chapters()) - 1) >= 0) { $fr_next_chapter = $fr_baseurl . fr_get_href($fr_selected_comic, $fr_available_chapters[$fr_next_chapter]); } else { $nextchapter = $endmanga; } // look in the URL query if there's a selected page. If there is, show the reader with that page loaded. Else, show the first page. // if the page number selected is higher than the available page number, it will just show the first page. if (isset($_GET['page']) && $_GET['page'] >= 1 && $_GET['page'] <= sizeof(fr_available_pages())) { $fr_selected_page = $_GET['page']; } // finally, load the reader page. fr_get_reader();