<?php

namespace app\index\controller;
use app\common\controller\Frontend;
use think\Config;
use think\Hook;
use think\Db;
use think\Session;
use think\Request;

class Videosplay extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function index()
    {
    	
	$getvideosid  =  input('get.videosid');
	$videoslittle = Db::name('admin_videos')-> where(['videosid'=>$getvideosid]) -> find();
	$videoslittle_names = $videoslittle['videoslittle'];
	$this->view->assign('title', __($videoslittle_names));

     
    $videosinfos = Db::name('admin_videos')->
    alias('a')->join('ws_admin_videostype w','a.videos_fenleiid = w.video_typeid') ->
    where(['videos_opentype'=>1,'videosid'=>$getvideosid]) -> select(); 
	$this->assign('videosinfos', $videosinfos);
      
     
    $videoshot = Db::name('admin_videos')->
    alias('a')->join('ws_admin_videostype w','a.videos_fenleiid = w.video_typeid') ->
    where(['videos_opentype'=>1,'videos_hot'=>2]) ->limit(30)-> select(); 
	$this->assign('videoshot', $videoshot);
     
    $sqlvideo = Db::name('admin_videos')-> where(['videos_opentype'=>1,'videosid'=>$getvideosid]) -> find();
     
     if(!$sqlvideo){
     	
     	return $this->view->fetch('videos_sqlnulla');
     	
     }else{
     	$xiaofei = Db::name('admin_videos')-> where(['videosid'=>$getvideosid])->setInc('videos_liulansum', 1);
     	return $this->view->fetch('videos_infos');
     }
     
     
     
     
     
      
	 
        
    }






}
