function tz($i){ if($i < 10){ $i = '0'.$i; } return $i; } $chapterStr = '1,2,3,4,5,6,7,8,9,10'; $chapterArr = explode(',', $chapterStr); $book = 'born-of-fire'; $page = '1'; $chapter = -1; $pageNum = -1; $requestStr = $_SERVER['REQUEST_URI']; $requestArr = explode('/',$requestStr); if($requestArr[1]=='manga'){ if($requestArr[2]=='born-of-fire'){ if(strstr($requestArr[3],'-')){ $requestChapterArr = explode('-',$requestArr[3]); $chapter = $requestChapterArr[1]; if(strstr($requestArr[4],'-')){ $requestPageArr = explode('-',$requestArr[4]); $page = $requestPageArr[1]; $pageNum = $page; if(count($requestPageArr) >= 3){ $page = tz($requestPageArr[1]).'-and-'.tz($requestPageArr[2]); }else{ $page = tz($page); } if($page == '00' || $page == '0'){$page = 'Cover';}else{$page = 'Page-'.$page;} } } } } $showpage = 'home'; $ttl = 'TAOFEWA - Manga Comic Universe'; if($requestArr[1]=='gallery'){ $showpage = 'gallery'; $ttl = 'TAOFEWA - Gallery (Illustrations and random artwork)'; if($requestArr[2]=='more'){ $showpage = 'gallery-characters'; $ttl = 'TAOFEWA - More Gallery Characters (Illustrations and random artwork)'; } if($requestArr[2]=='kenneth'){ if(strlen($requestArr[3]) >= 5){ $showpage = 'gallery-kenneth-id'; switch($requestArr[3]){ case 'fire-barrier': $fN = 'gallery-kenneth-60-fire-barrier'; $ttl = 'TAOFEWA gallery - Kenneth Fire Barrier'; break; } } else { $showpage = 'gallery-kenneth'; $ttl = 'TAOFEWA - Kenneth gallery'; } } } $mangaCode = 0; switch ($chapter) { case 1: $mangaCode = '114020'; break; case 2: $mangaCode = '114089'; break; case 3: $mangaCode = '114107'; break; case 4: $mangaCode = '114234'; break; case 5: $mangaCode = '114265'; break; case 6: $mangaCode = '114279'; break; case 7: $mangaCode = '114310'; break; case 8: $mangaCode = '114367'; break; case 9: $mangaCode = '114396'; break; } if($mangaCode==0){$mangaCode='';} if($mangaCode >= 2){ $mangaCode = ''; $ttl = 'Read Born of Fire - Chapter ' . $chapter . ' - TAOFEWA Manga Web Comic'; $mangaMenu = ' Born of Fire chapters: '; for($i=1; $i<=9; $i++){ $mangaMenu .= ' ' . $i . ' '; $showpage = 'manga'; } } ?>