public function index()
 {
     $param['videos'] = VideoModel::where('company_id', Session::get('company_id'))->paginate(10);
     $param['pageNo'] = 4;
     if ($alert = Session::get('alert')) {
         $param['alert'] = $alert;
     }
     return View::make('company.video.index')->with($param);
 }
 public function index()
 {
     if (\Input::get('theme')) {
         \Cookie::queue('theme', \Input::get('theme'), 100);
         return Redirect::to('/')->withCookie(cookie('theme', \Input::get('theme'), 100));
     }
     $data = array('videos' => Video::where('active', '=', '1')->orderBy('created_at', 'DESC')->simplePaginate($this->videos_per_page), 'current_page' => 1, 'menu' => Menu::orderBy('order', 'ASC')->get(), 'pagination_url' => '/videos', 'video_categories' => VideoCategory::all(), 'post_categories' => PostCategory::all(), 'theme_settings' => ThemeHelper::getThemeSettings(), 'pages' => Page::all());
     //dd($data['videos']);
     return View::make('Theme::home', $data);
 }
 public function index()
 {
     $search_value = Input::get('value');
     if (empty($search_value)) {
         return Redirect::to('/');
     }
     $videos = Video::where('active', '=', 1)->where('title', 'LIKE', '%' . $search_value . '%')->orderBy('created_at', 'desc')->get();
     $posts = Post::where('active', '=', 1)->where('title', 'LIKE', '%' . $search_value . '%')->orderBy('created_at', 'desc')->get();
     $data = array('videos' => $videos, 'posts' => $posts, 'search_value' => $search_value, 'menu' => Menu::orderBy('order', 'ASC')->get(), 'video_categories' => VideoCategory::all(), 'post_categories' => PostCategory::all(), 'theme_settings' => ThemeHelper::getThemeSettings(), 'pages' => Page::all());
     return View::make('Theme::search-list', $data);
 }
 /**
  * Setup the layout used by the controller.
  *
  * @return void
  */
 public function index()
 {
     $start = (new Carbon('now'))->hour(0)->minute(0)->second(0);
     $end = (new Carbon('now'))->hour(23)->minute(59)->second(59);
     $total_subscribers = count(User::where('active', '=', 1)->where('role', '=', 'subscriber')->where('stripe_active', '=', 1)->get());
     $new_subscribers = count(User::where('active', '=', 1)->where('role', '=', 'subscriber')->where('stripe_active', '=', 1)->whereBetween('created_at', [$start, $end])->get());
     $total_videos = count(Video::where('active', '=', 1)->get());
     $total_posts = count(Post::where('active', '=', 1)->get());
     $settings = Setting::first();
     $data = array('admin_user' => Auth::user(), 'total_subscribers' => $total_subscribers, 'new_subscribers' => $new_subscribers, 'total_videos' => $total_videos, 'total_posts' => $total_posts, 'settings' => $settings);
     return View::make('admin.index', $data);
 }
 /**
  * Display a listing of videos
  *
  * @return Response
  */
 public function index()
 {
     $search_value = Input::get('s');
     if (!empty($search_value)) {
         $videos = Video::where('title', 'LIKE', '%' . $search_value . '%')->orderBy('created_at', 'desc')->paginate(9);
     } else {
         $videos = Video::orderBy('created_at', 'DESC')->paginate(9);
     }
     $user = Auth::user();
     $data = array('videos' => $videos, 'user' => $user, 'admin_user' => Auth::user());
     return View::make('admin.videos.index', $data);
 }
 public function index($username)
 {
     $user = User::where('username', '=', $username)->first();
     $favorites = Favorite::where('user_id', '=', $user->id)->orderBy('created_at', 'desc')->get();
     $favorite_array = array();
     foreach ($favorites as $key => $fave) {
         array_push($favorite_array, $fave->video_id);
     }
     $videos = Video::where('active', '=', '1')->whereIn('id', $favorite_array)->take(9)->get();
     $data = array('user' => $user, 'type' => 'profile', 'videos' => $videos, 'menu' => Menu::orderBy('order', 'ASC')->get(), 'video_categories' => VideoCategory::all(), 'post_categories' => PostCategory::all(), 'theme_settings' => ThemeHelper::getThemeSettings(), 'pages' => Page::all());
     return View::make('Theme::user', $data);
 }
 public function show_favorites()
 {
     if (!Auth::guest()) {
         $page = Input::get('page');
         if (empty($page)) {
             $page = 1;
         }
         $favorites = Favorite::where('user_id', '=', Auth::user()->id)->orderBy('created_at', 'desc')->get();
         $favorite_array = array();
         foreach ($favorites as $key => $fave) {
             array_push($favorite_array, $fave->video_id);
         }
         $videos = Video::where('active', '=', '1')->whereIn('id', $favorite_array)->paginate(12);
         $data = array('videos' => $videos, 'page_title' => ucfirst(Auth::user()->username) . '\'s Favorite Videos', 'current_page' => $page, 'page_description' => 'Page ' . $page, 'menu' => Menu::orderBy('order', 'ASC')->get(), 'pagination_url' => '/favorites', 'video_categories' => VideoCategory::all(), 'post_categories' => PostCategory::all(), 'theme_settings' => ThemeHelper::getThemeSettings(), 'pages' => Page::all());
         return View::make('Theme::video-list', $data);
     } else {
         return Redirect::to('videos');
     }
 }
 public function category($category)
 {
     $page = Input::get('page');
     if (!empty($page)) {
         $page = Input::get('page');
     } else {
         $page = 1;
     }
     $cat = VideoCategory::where('slug', '=', $category)->first();
     $parent_cat = VideoCategory::where('parent_id', '=', $cat->id)->first();
     if (!empty($parent_cat->id)) {
         $parent_cat2 = VideoCategory::where('parent_id', '=', $parent_cat->id)->first();
         if (!empty($parent_cat2->id)) {
             $videos = Video::where('active', '=', '1')->where('video_category_id', '=', $cat->id)->orWhere('video_category_id', '=', $parent_cat->id)->orWhere('video_category_id', '=', $parent_cat2->id)->orderBy('created_at', 'DESC')->simplePaginate(9);
         } else {
             $videos = Video::where('active', '=', '1')->where('video_category_id', '=', $cat->id)->orWhere('video_category_id', '=', $parent_cat->id)->orderBy('created_at', 'DESC')->simplePaginate(9);
         }
     } else {
         $videos = Video::where('active', '=', '1')->where('video_category_id', '=', $cat->id)->orderBy('created_at', 'DESC')->simplePaginate(9);
     }
     $data = array('videos' => $videos, 'current_page' => $page, 'category' => $cat, 'page_title' => 'Videos - ' . $cat->name, 'page_description' => 'Page ' . $page, 'pagination_url' => '/videos/category/' . $category, 'menu' => Menu::orderBy('order', 'ASC')->get(), 'video_categories' => VideoCategory::all(), 'post_categories' => PostCategory::all(), 'theme_settings' => ThemeHelper::getThemeSettings(), 'pages' => Page::all());
     return View::make('Theme::video-list', $data);
 }
Example #9
0
require __DIR__ . '/../vendor/autoload.php';
require '../config.php';
require_once '../helpers/session.php';
require '../helpers/boot.php';
require '../helpers/functions.php';
require_once '../helpers/User.php';
require_once '../helpers/Article.php';
require_once '../helpers/Video.php';
require_once '../helpers/Level.php';
$session = new Session();
$user = NULL;
if ($session->getLoggedin()) {
    $user = User::find($session->getUsername());
    $level = Level::where('user_id', $user->id)->first();
    $video = Video::where('level', $level->level)->get();
} else {
    $video = Video::all();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />

  <title>Autism</title>
  <link href="../static/css/awe.css" rel="stylesheet">
  <link href="../static/css/player.css" rel="stylesheet">
  <script type="text/javascript" src="../static/js/jquery-1.11.3.min.js"></script>
Example #10
0
 /**
  * Get total video count
  * @return mixed
  */
 protected function totalVideos()
 {
     return $this->video->where('lang', $this->getLang())->count();
 }
Example #11
0
<?php

$sidebar_videos = Video::where('active', '=', '1')->orderByRaw("RAND()")->take(6)->get();
$sidebar_posts = Post::where('active', '=', '1')->orderByRaw("RAND()")->take(6)->get();
?>

<div id="sidebar">

	<h3>Videos You May Like</h3>

	<div class="row">
		<?php 
foreach ($sidebar_videos as $video) {
    ?>
			
			<div class="col-md-6 col-sm-6 col-xs-12">
				<article class="block">
					<a class="block-thumbnail" href="<?php 
    echo $settings->enable_https ? secure_url('video') : URL::to('video');
    echo '/' . $video->id;
    ?>
">
						<div class="thumbnail-overlay"></div>
						<span class="play-button"></span>
						<img src="<?php 
    echo ImageHandler::getImage($video->image, 'medium');
    ?>
">
						<div class="details">
							<h2><?php 
    echo $video->title;
 /**
  * Return all unpublished and unviewed selfie videos of user
  * POST /unpublishedselfievideos
  * Param email
  * @return Response
  */
 public function unpublishedSelfieVideos()
 {
     $email = Input::get('email');
     $language = Input::get('language');
     $arr = array();
     $missingParam = '';
     if ($email == '') {
         $missingParam .= 'email,';
     }
     if ($language == '') {
         $missingParam .= 'language,';
     }
     if ($missingParam != '') {
         $arr['Success'] = false;
         $arr['Status'] = 'Parameter missing: ' . rtrim($missingParam, ',');
         $arr['StatusCode'] = 400;
     } else {
         $user = User::whereEmail($email)->first();
         if ($user) {
             $userId = $user->id;
             $selfies = Video::where('user_id', $userId)->where('isunpublishedview_video', 0)->where('video_status', 0)->get(array('video_id as id', 'video_title as title', 'video_desc as description', 'video_youtube_id as youtube_id', 'video_embed as embed', 'video_url as url', 'video_thumbnail_url as thumbnail_url', 'scripture_text', 'video_language as language'));
             if (count($selfies) == 0) {
                 $arr['Success'] = false;
                 $arr['Status'] = 'Video not found';
                 $arr['StatusCode'] = 404;
             } else {
                 $arr['Success'] = true;
                 $arr['Status'] = 'OK';
                 $arr['StatusCode'] = 200;
                 $arr['language'] = $language;
                 $i = 0;
                 foreach ($selfies as $selfie) {
                     $arr['Result'][$i]['id'] = $selfie->id;
                     $arr['Result'][$i]['title'] = $selfie->title;
                     $arr['Result'][$i]['description'] = $selfie->description;
                     $arr['Result'][$i]['youtubeId'] = $selfie->youtube_id;
                     $arr['Result'][$i]['youtubeUrl'] = $selfie->url;
                     $arr['Result'][$i]['youtubeThumbnailUrl'] = $selfie->thumbnail_url;
                     $arr['Result'][$i]['scripture_text'] = $selfie->scripture_text;
                     $arr['Result'][$i]['embedCode'] = $selfie->embed;
                     $i++;
                 }
             }
         } else {
             $arr['Success'] = false;
             $arr['Status'] = 'User with this email does not exist';
             $arr['StatusCode'] = 404;
         }
     }
     return Response::json($arr);
 }
Example #13
0
				<div id="comments">
					<div id="disqus_thread"></div>
				</div>

			<?php 
}
?>

		</div>

	</div>

	<div class="col-md-2 post" id="right_sidebar">
		<h6>Recent Videos</h6>
		<?php 
$videos = Video::where('active', '=', 1)->orderBy('created_at', 'DESC')->take(4)->get();
?>
		<?php 
foreach ($videos as $video) {
    ?>
			<?php 
    include 'partials/video-block.php';
    ?>
		<?php 
}
?>
	</div>


	
		
 public function verListado()
 {
     $videos = Video::where('estado', 'A')->get();
     $this->array_view['videos'] = $videos;
     return View::make($this->folder_name . '.listado', $this->array_view);
 }
Example #15
0
    include 'partials/video-block.php';
    ?>
									</div>
								
							<?php 
}
?>
								</div></li>

						</ul>
					</div><!-- .mini-slider -->
				</div>

				<div class="col-md-12">
					<?php 
$premium_videos = Video::where('active', '=', 1)->where('access', '=', 'subscriber')->orderByRaw("RAND()")->take(12)->get();
?>
					<div class="mini-slider" data-index="1">
						<h6 class="no-padding">Premium Videos</h6>
						<div class="dot-nav top12">
							<div class="dot active" data-index="0"></div>
							<div class="dot" data-index="1"></div>
							<div class="dot" data-index="2"></div>
						</div>
						<ul>
							<?php 
foreach ($premium_videos as $index => $video) {
    ?>
								<?php 
    if ($index % 4 == 0 && $index != 0) {
        ?>