} }); }); imageArray = new Array(); heightArray = new Array(); widthArray = new Array(); <?php global $fr_contentdir, $fr_baseurl; foreach (fr_available_pages() as $key => $value) { list($fr_img_width, $fr_img_height, $fr_img_type, $fr_img_attr) = getimagesize($fr_contentdir . "/" . addslashes(fr_selected_comic()) . "/" . addslashes(fr_selected_chapter()) . "/" . addslashes($value)); echo "imageArray[{$key}]='" . $fr_contentdir . "/" . addslashes(fr_selected_comic()) . "/" . addslashes(fr_selected_chapter()) . "/" . addslashes($value) . "';\n"; echo "heightArray[{$key}]='" . $fr_img_height . "';\n"; echo "widthArray[{$key}]='" . $fr_img_width . "';\n"; } ?> 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; }
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();