コード例 #1
0
 public function updateThumbnails()
 {
     return $this->execute(function () {
         Latest::updateThumbnails();
         return 'Thumbnails for latest_anime have been updated!';
     });
 }
コード例 #2
0
 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();
 }
コード例 #3
0
ファイル: Mirror.php プロジェクト: shaikhatik0786/Masteranime
 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;
 }
コード例 #4
0
ファイル: routes.php プロジェクト: shaikhatik0786/Masteranime
    }
    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';
});
コード例 #5
0
@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
コード例 #6
0
ファイル: view.php プロジェクト: nclco/magicboard3
<?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();
コード例 #7
0
ファイル: init.write.php プロジェクト: nclco/magicboard3
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');
コード例 #8
0
ファイル: latest-section.php プロジェクト: sindotnet/tiigo
<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 == "") {
コード例 #9
0
 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()]);
 }
コード例 #10
0
ファイル: side.php プロジェクト: nclco/magicboard3
  $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
コード例 #11
0
ファイル: LatestController.php プロジェクト: sindotnet/tiigo
 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'));
 }
コード例 #12
0
    <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>