public function updateThumbnails() { return $this->execute(function () { Latest::updateThumbnails(); return 'Thumbnails for latest_anime have been updated!'; }); }
public static function getLatestRows($settings) { $query = Latest::where('created_at', '>', \Carbon\Carbon::today()->subWeek())->orderBy('created_at', 'DESC')->orderby(DB::raw('CAST(episode AS SIGNED)'), 'DESC'); if (isset($settings["paginate"])) { return $query->paginate($settings["paginate"]); } return $query->get(); }
public static function add_mirror($anime_id, $episodes, $force = false) { $txt = ''; if (is_array($episodes)) { foreach ($episodes as $episode) { $ep = $episode["episode"]; foreach ($episode["mirrors"] as $mirrors) { foreach ($mirrors as $mirror) { if (isset($mirror["src"]) && is_array($mirror["src"]) && count($mirror["src"]) > 0) { $src = $mirror["src"][0]; $host = Mirror::getHost($src); $quality = $mirror["quality"]; $subbed = $mirror["subbed"]; } else { if (isset($mirrors["src"])) { $src = $mirrors["src"]; $host = Mirror::getHost($src); $quality = $mirrors["quality"]; $subbed = $mirrors["subbed"]; } } if (isset($src) && isset($quality) && isset($subbed)) { if ($host == "failed") { $txt .= '<p class="text-error">Episode ' . $ep . ' - ' . $host . ' - Quality' . $quality . ': <strong>host not found</strong>.</p>'; } else { if (!$subbed) { $txt .= '<p class="text-error">Episode ' . $ep . ' - ' . $host . ' - Quality' . $quality . ': is not <strong>subbed</strong>.</p>'; } else { $exists = Mirror::mirror_exsists($anime_id, $ep, $host, $quality); if (!$exists) { Latest::put($anime_id, $ep, $force); Mirror::create(["anime_id" => $anime_id, "episode" => $ep, "src" => $src, "host" => $host, "quality" => $quality, "subbed" => $subbed]); $txt .= '<p class="text-success">Episode ' . $ep . ' - ' . $host . ' - Quality' . $quality . ': has been <strong>added</strong>.</p>'; } else { $txt .= '<p class="text-info">Episode ' . $ep . ' - ' . $host . ' - Quality' . $quality . ': this mirror already exists in our database!</p>'; } } } } } } } return $txt; } return null; }
} return 'AJAX requests only'; }); Route::get('/disable/announcement', function () { if (Request::ajax()) { Cookie::queue('masterani_announcement', '1', 1440); return 'Announcement has been disabled for a day!'; } return 'AJAX requests only'; }); Route::post('/anime/recent', function () { if (Request::ajax()) { if (Input::has('type')) { $gallery = Input::get('type') === 'gallery'; MasterAnime::createRecentLayoutCookie($gallery); return Latest::getLatest(array("start" => 0, "end" => 12), $gallery); } } return 'AJAX requests only'; }); Route::post('/anime/search', function () { if (Request::ajax()) { $animelist = Input::has('animelist'); $search_results = MasterAnime::searchAnime(Input::get('keyword')); if ($animelist) { return View::make('child.all_anime', array('search_display' => array('view' => false, 'series' => $search_results))); } return View::make('child.all_anime', array('search_display' => array('view' => true, 'series' => $search_results))); } return 'AJAX requests only'; });
@extends('layout') @section('content') <div class="row-fluid"> <div class="span12"> <div class="row-fluid met_small_block scrolled"> <div class="span12 scrolled__item"> <div class="clearfix"> <h3 class="met_title_with_childs pull-left">LATEST ANIME <span class="met_subtitle">LATEST EPISODE UPDATES</span> </h3> </div> <?php $latest_eps = Latest::getLatestRows(null); if (!empty($latest_eps) && count($latest_eps) > 0) { foreach ($latest_eps as $latest_ep) { echo View::make('child.card_anime', array("anime_id" => $latest_ep->anime_id, "anime_name" => $latest_ep->name, "anime_episode" => $latest_ep->episode, "anime_img" => $latest_ep->img, "time" => $latest_ep->created_at, "display" => "latest")); } } ?> </div> </div> </div> </div> @stop
<?php if (!defined('__MAGIC__')) { exit; } $v = Widget::Inst()->Action('data_explode', $this->wg_no); echo Latest::Inst($v['skin'], explode(',', $v['bo_no']))->SetConfig('rows', '', $v['rows'])->html();
if ($key) { $this->action = $this->Link('update'); } /* * 게시판 목록 : 기존에 생성된 것 */ $board_list = array(); foreach (Board::Inst()->Sql('list') as $v) { if (in_array($v['bo_no'], $data['bo_no'])) { $v['selected'] = 'selected'; } $board_list[] = $v; } $this->board_list = $board_list; /* * 게시판 스킨 목록 */ $skin_list = array(); $skin_list[] = array('name' => '최신글스킨선택'); foreach (Latest::Inst()->SkinList() as $v) { if ($data['skin'] == $v['skin']) { $v['selected'] = 'selected'; } $skin_list[] = $v; } $this->skin_list = $skin_list; /* * 하단 버튼 링크생성 */ $this->btn_ok = Widget::Inst()->path_img('btn_ok.gif'); $this->btn_cancel = Widget::Inst()->path_img('btn_cancel.gif');
<img class="svg-bg" src="<?php echo URL_PUBLIC; ?> public/themes/css/images/section-mask.png"/> <div class="svg-title"> <<<<<<< HEAD <a href="javascript:void(0);">LATEST</a> ======= <a href="javascript:">LATEST</a> >>>>>>> origin/master </div> <div class="full-container"> <?php $oLatest = new Latest(); $latestAll = $oLatest->findAllFrom("Latest", "1=1 order by sequence"); if ($oLatest->countFrom('Latest', "1=1") > 0) { $idx = 1; ?> <div class="latest-slide"> <div class="latest-slick"> <?php foreach ($latestAll as $latest) { ?> <div> <div class="latest-each"> <div class="hover-pic"> <?php if ($latest->external_url == "") {
public function getLatest() { return View::make('api.xml', ['display' => 'latest', 'content' => Latest::orderBy('created_at', 'DESC')->orderby(DB::raw('CAST(episode AS SIGNED)'), 'DESC')->take(25)->get()]); }
$cnt_all+=$cnt; } $archive=array(); foreach($this->Sql('list_all') as $v) { if(!isset($archive[$v['wr_datetime_text']])) $archive[$v['wr_datetime_text']]=0; $archive[$v['wr_datetime_text']]++; } krsort($archive); // 공시사항 $notice = $this->Sql('list_notice'); // 최신댓글 $comment = Comment::Inst()->Sql('latest', $this->bo_no, 10); // 최신글 $latest = Latest::Inst('blog_side', $this->bo_no)->html(); // 태그 $tags = Tag::Inst('basic', $this->bo_no)->SetConfig('hide_count','',1)->html(); if(!function_exists('strcut_utf8')) { function strcut_utf8($str, $len, $checkmb=false, $tail='') { /** * UTF-8 Format * 0xxxxxxx = ASCII, 110xxxxx 10xxxxxx or 1110xxxx 10xxxxxx 10xxxxxx * latin, greek, cyrillic, coptic, armenian, hebrew, arab characters consist of 2bytes * BMP(Basic Mulitilingual Plane) including Hangul, Japanese consist of 3bytes **/ preg_match_all('/[\xE0-\xFF][\x80-\xFF]{2}|./', $str, $match); // target for BMP $m = $match[0]; $slen = strlen($str); // length of source string
public function save_order() { $latest_array = $_POST['latest_id']; $order_array = $_POST['order']; $latest = new Latest(); foreach ($latest_array as $key => $value) { $latest_id = $value; $latest_order = $order_array[$key]; $latest->update('Latest', array('sequence' => $latest_order), 'id=' . $latest_id); } redirect(get_url('latest')); }
<div class="span12"> <form class="search_form met_contact_form" method="get" action="{{ URL::to('/anime/search') }}"> <input class="met_input_text" id="search" name="query" autocomplete="off" type="text" maxlength="50" placeholder="anime name/synonyms.."><input class="met_button" type="submit" value="Search"> </form> </div> </div> <div class="row-fluid"> <div class="span12"> <h3 class="met_title_with_childs pull-left">RECENT ANIME <span class="met_subtitle">ANIME RECENTLY RELEASED</span> </h3> <div class="clearfix"></div> <div class="row-fluid"> <?php $latest_eps = Latest::getLatestRows(["paginate" => 12]); if (!empty($latest_eps) && count($latest_eps) > 0) { foreach ($latest_eps as $latest_ep) { echo View::make('child.card_anime', array("anime_id" => $latest_ep->anime_id, "anime_name" => $latest_ep->name, "anime_episode" => $latest_ep->episode, "anime_img" => $latest_ep->img, "time" => $latest_ep->created_at, "display" => "latest")); } } ?> <div class="row-fluid"> <div class="span12"> {{ $latest_eps->links(); }} </div> </div> </div> </div> </div> <hr>