예제 #1
0
     }
     break;
 case 'other':
     foreach ($animeStore->toArray() as $entry) {
         if (!ereg('\\[Manga]|\\[ThaiSubs]', $entry) && ereg('\\[{1,}', $entry)) {
             $name = ereg_replace('\\[Movie]|\\[EngSubs]|\\[Adult]', '', $entry);
             $type = explode('[', $name);
             $type = explode(']', $type[1]);
             $arrName['name'] = $type[1];
             $arrName['type'] = $type[0];
             $chapter = explode(']', $manga[1]);
             $arrName['chapter'] = (int) $chapter[0];
             $arrList[] = $arrName;
         }
     }
     foreach ($torrentStore->toArray() as $entry) {
         if (ereg('\\[RAW]|\\[ThaiDubs]', $entry)) {
             $name = ereg_replace('\\[Movie]|\\[EngSubs]|\\[Adult]', '', $entry);
             $type = explode('[', $name);
             $type = explode(']', $type[1]);
             $arrName['name'] = $type[1];
             $arrName['type'] = $type[0];
             $chapter = explode(']', $manga[1]);
             $arrName['chapter'] = (int) $chapter[0];
             $arrList[] = $arrName;
         }
     }
     sort($arrList);
     foreach ($arrList as $other) {
         $listMini .= '<div class="list-store" style="padding:4px;"';
         $listMini .= '><strong>' . $other['name'] . '</strong> <font size="1">';
예제 #2
0
                    $foundManga = true;
                    foreach ($manga['chapter'] as $list) {
                        $chapterName = $list['name'];
                        $tmpurl = explode('-', $reqPath->Level(2));
                        $tmpdir = explode('-', $list['name']);
                        if (trim($tmpurl[1]) == trim($tmpdir[0])) {
                            $foundChapter = true;
                            break;
                        }
                    }
                }
            }
            // Read Manga Chapter Page
            if ($foundManga) {
                $listImage = new DirectoryReader($listManga->location . iconv('utf-8', 'tis-620', '[Manga] ') . $reqPath->Level(1) . '/' . iconv('utf-8', 'tis-620', $chapterName));
                $totalImage = count($listImage->toArray()) - 1;
                if ($foundChapter && $totalImage != 1) {
                    ?>
		<script language="javascript">
			$(document).ready(function() {
				var imageId = 2;
				var imageTotal = 0;
				var nextChapter = false;	
				var backChapter = false;	
				var nextPage = true;	
				
				// Disable context menu on an element
				$("#block-selected,#back-page,#next-page").noContext();
				$('#back-page,#next-page').disableTextSelect();	
				
				$.ajax({ url: '<?php 
예제 #3
0
 public function MangaTranslator($listManga)
 {
     $validFormat = '\\[Manga]|\\[Cancel]|\\[Download]|\\[Drop]|\\[Wait]';
     foreach ($listManga->toArray() as $manga) {
         if (ereg('\\[Manga]', $manga)) {
             $tmpManga = array();
             $tmpChapter = array();
             $createdManga = filectime($listManga->location . $manga);
             $nameManga = ereg_replace($validFormat, '', $manga);
             $listChapter = new DirectoryReader($listManga->location . $manga);
             $mangaThumb = 'images/none-thumb.jpg';
             $mangaCover = 'images/none-cover.jpg';
             foreach ($listChapter->toArray() as $chapter) {
                 $utfName = iconv('utf-8', 'tis-620', $chapter);
                 if (is_file($listChapter->location . '/' . $utfName)) {
                     $chkInfo = pathinfo($chapter);
                     if ($chkInfo['filename'] == 'cover') {
                         $mangaCover = 'translator/' . $manga . '/' . $chapter;
                     } elseif ($chkInfo['filename'] == 'thumb') {
                         $mangaThumb = 'translator/' . $manga . '/' . $chapter;
                     }
                 }
             }
             $tmp = explode('[', $manga);
             if (count($tmp) == 3) {
                 $status = explode(']', $tmp[2]);
                 $status = $status[0];
             } else {
                 $status = 'Active';
             }
             $tmpManga['name'] = trim($nameManga);
             $tmpManga['status'] = trim($status);
             $tmpManga['created'] = $createdManga;
             $tmpManga['thumb'] = $mangaThumb;
             $tmpManga['cover'] = $mangaCover;
             $tmpManga['last_ch'] = 'None';
             $tmpManga['last_id'] = 0;
             foreach ($listChapter->toArray() as $chapter) {
                 $utfName = iconv('utf-8', 'tis-620', $chapter);
                 $lastCreatedChapter = 0;
                 if (is_dir($listChapter->location . '/' . $utfName) && $chapter !== '.' && $chapter !== '..') {
                     $tmplist = array();
                     $createdChapter = filectime($listChapter->location . '/' . $utfName);
                     $tmplist['created'] = $createdChapter;
                     $tmplist['name'] = $chapter;
                     $tmpChapter[] = $tmplist;
                     if ($createdChapter > $lastCreatedChapter) {
                         $lastChapter = explode('-', $chapter);
                         $tmpManga['last_ch'] = $chapter;
                         $tmpManga['last_id'] = $lastChapter[0];
                     }
                 }
             }
             $tmpManga['chapter'] = $tmpChapter;
             $this->MangaStore[] = $tmpManga;
         }
     }
 }