<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Ajax extends CI_Controller {

	function __construct(){
		parent::__construct();
        	$this->load->helper('url');
        	$this->load->helper('form');
                $this->load->library('session'); //加载session
		$this->load->model('CsdjDB');
		$this->load->model('CsdjAdmin');
		$this->load->model('CsdjSkins');
                $this->load->helper('file');
	        $this->CsdjAdmin->Admin_Login();
	}

	public function dance()
	{

                $strs='<select name="cid" id="cid" size="12" style="width:130px;">';
                $strs.='<option value="-1">=== 搜索回收站 ===</option>';
                $strs.='<option value="-2">=== 搜索待审核 ===</option>';
                $strs.='<option value="-3">=== 播放器歌曲 ===</option>';
                $strs.='<option value="0">=== 不指定栏目 ===</option>';

                $sqlstr="select * from ".CS_SqlPrefix."class where CS_SID=1 and CS_FID=0 and CS_YID=0 order by CS_ID desc";
		$result=$this->db->query($sqlstr);
		$recount=$result->num_rows();
                if($recount>0){
			foreach ($result->result() as $row) {
                               $strs.='<option value='.$row->CS_ID.'>├'.$row->CS_Name.'</option>';

                               $sqlstrt="select * from ".CS_SqlPrefix."class where CS_SID=1 and CS_FID=".$row->CS_ID." and CS_YID=0 order by CS_ID desc";
		               $resultt=$this->CsdjDB->db->query($sqlstrt);
		               $recountt=$resultt->num_rows();
                               if($recountt>0){
			              foreach ($resultt->result() as $rows) {
                                             $strs.='<option value='.$rows->CS_ID.'>│&nbsp;&nbsp;└ '.$rows->CS_Name.'</option>';
                                      }
                               }
                        }
                }
                $strs.='</select>';

                echo $strs;
        }

	public function vod()
	{

                $strs='<select name="cid" id="cid" size="12" style="width:130px;">';
                $strs.='<option value="-1">=== 搜索回收站 ===</option>';
                $strs.='<option value="-2">=== 搜索待审核 ===</option>';
                $strs.='<option value="0">=== 不指定栏目 ===</option>';

                $sqlstr="select * from ".CS_SqlPrefix."vlist where CS_FID=0 and CS_YID=0 order by CS_ID desc";
		$result=$this->CsdjDB->db->query($sqlstr);
		$recount=$result->num_rows();
                if($recount>0){
			foreach ($result->result() as $row) {
                               $strs.='<option value='.$row->CS_ID.'>├'.$row->CS_Name.'</option>';

                               $sqlstrt="select * from ".CS_SqlPrefix."vlist where CS_FID=".$row->CS_ID." and CS_YID=0 order by CS_ID desc";
		               $resultt=$this->CsdjDB->db->query($sqlstrt);
		               $recountt=$resultt->num_rows();
                               if($recountt>0){
			              foreach ($resultt->result() as $rows) {
                                             $strs.='<option value='.$rows->CS_ID.'>│&nbsp;&nbsp;└ '.$rows->CS_Name.'</option>';
                                      }
                               }
                        }
                }
                $strs.='</select>';

                echo $strs;
        }

	public function news()
	{

                $strs='<select name="cid" id="cid" size="12" style="width:130px;">';
                $strs.='<option value="-1">=== 搜索回收站 ===</option>';
                $strs.='<option value="-2">=== 搜索待审核 ===</option>';
                $strs.='<option value="0">=== 不指定栏目 ===</option>';

                $sqlstr="select * from ".CS_SqlPrefix."class where CS_SID=2 and CS_FID=0 and CS_YID=0 order by CS_ID desc";
		$result=$this->CsdjDB->db->query($sqlstr);
		$recount=$result->num_rows();
                if($recount>0){
			foreach ($result->result() as $row) {
                               $strs.='<option value='.$row->CS_ID.'>├'.$row->CS_Name.'</option>';

                               $sqlstrt="select * from ".CS_SqlPrefix."class where CS_SID=2 and CS_FID=".$row->CS_ID." and CS_YID=0 order by CS_ID desc";
		               $resultt=$this->CsdjDB->db->query($sqlstrt);
		               $recountt=$resultt->num_rows();
                               if($recountt>0){
			              foreach ($resultt->result() as $rows) {
                                             $strs.='<option value='.$rows->CS_ID.'>│&nbsp;&nbsp;└ '.$rows->CS_Name.'</option>';
                                      }
                               }
                        }
                }
                $strs.='</select>';

                echo $strs;
        }

	public function singer()
	{

                $strs='<select name="cid" id="cid" size="12" style="width:130px;">';
                $strs.='<option value="-1">=== 搜索推荐歌手 ===</option>';
                $strs.='<option value="-2">=== 搜索待审核 ===</option>';
                $strs.='<option value="0">=== 不指定栏目 ===</option>';

                $sqlstr="select * from ".CS_SqlPrefix."gslist order by CS_ID desc";
		$result=$this->CsdjDB->db->query($sqlstr);
		$recount=$result->num_rows();
                if($recount>0){
			foreach ($result->result() as $row) {
                               $strs.='<option value='.$row->CS_ID.'>├'.$row->CS_Name.'</option>';
                        }
                }
                $strs.='</select>';

                echo $strs;
        }

	public function user()
	{

                $strs='<select name="cid" id="cid" size="12" style="width:130px;">';
                $strs.='<option value="1">=== 搜索锁定会员 ===</option>';
                $strs.='<option value="2">=== 搜索认证会员 ===</option>';
                $strs.='<option value="3">=== 搜索VIP会员 ===</option>';
                $strs.='<option value="-1">=== 按会员ID搜索 ===</option>';
                $strs.='<option value="-2">=== 按会员名称搜索 ===</option>';
                $strs.='<option value="-3">=== 按会员呢称搜索 ===</option>';
                $strs.='</select>';

                echo $strs;
        }

	public function reco()
	{
	    $id = intval($this->input->get('id'));
	    $sid = $this->input->get('sid');
	    $level = intval($this->input->get('level'));

	    $updata['CS_Reco']=$level;
            $this->CsdjDB->get_update ($sid,$id,$updata);

                  echo "<a title=\"取消推荐\" href=\"javascript:;\" onClick=\"Xing('".site_url('admin/ajax/reco/')."',0,".$id.",'".$sid."');return false\"><font color=#ff0033>×</font></a>";
                  for($i=1;$i<=$level;$i++){
                         echo "<a title=\"推荐：".$i."星\" href=\"javascript:;\" onClick=\"Xing('".site_url('admin/ajax/reco/')."',".$i.",".$id.",'".$sid."');return false\">★</a>";
                  }
                  for($j=$level+1;$j<=5;$j++){
                         echo "<a title=\"推荐：".$j."星\" href=\"javascript:;\" onClick=\"Xing('".site_url('admin/ajax/reco/')."',".$j.",".$id.",'".$sid."');return false\">☆</a>";
                  }
        }

	public function dancesh()
	{
            $this->CsdjAdmin->Admin_Qx('8');
	    $id = intval($this->input->get('id'));
	    $yid = intval($this->input->get('yid'));
            if($yid==1){
                 $updata['CS_YID']=0;  
            }else{
 	         $updata['CS_YID']=1;
            }
            $this->CsdjDB->get_update ('dance',$id,$updata);

               if($updata['CS_YID']==1){
	               echo '<a href="javascript:;" title="点击审核" onClick="dancesh(\''.site_url('admin/ajax/dancesh/').'\',1,'.$id.');return false"><font color=#ff0033>×</font></a>';
               }else{
                     if(Cion_UpMusic>0){
                       //审核奖励金币
                       $row=$this->CsdjDB->get_select('dance','CS_ID','CS_User,CS_Name',$id);
                       $dt=$this->db->query("SELECT CS_ID FROM ".CS_SqlPrefix."dt where cs_did=".$id." and cs_cid=1 and cs_user='".$row[0]->CS_User."' and cs_yid=1")->row();
                       if($dt){
                             $this->db->query("update ".CS_SqlPrefix."dt set cs_yid=0 where cs_id=".$dt->CS_ID."");
                             $this->db->query("update ".CS_SqlPrefix."user set CS_Cion=CS_Cion+".Cion_UpMusic." where cs_name='".$row[0]->CS_User."'");
                             //发送消息
                              $msg['CS_Name']='歌曲审核消息';
                              $msg['CS_Neir']=$row[0]->CS_User.'，您好，您的歌曲《'.$row[0]->CS_Name.'》审核成功，同时系统给您增加'.Cion_UpMusic.'个金币，如有问题，请联系管理员。';
                              $msg['CS_Usera']=$row[0]->CS_User;
                              $msg['CS_Userb']='管理员';
                              $msg['CS_AddTime']=date('Y-m-d h:i:s');
                              $this->CsdjDB->get_insert('xiaoxi',$msg);
                       }
                     }
	               echo '<a href="javascript:;" title="点击取消审核" onClick="dancesh(\''.site_url('admin/ajax/dancesh/').'\',0,'.$id.');return false">√</a>';
               }
        }

	public function newssh()
	{
            $this->CsdjAdmin->Admin_Qx('14');
	    $id = intval($this->input->get('id'));
	    $yid = intval($this->input->get('yid'));
            if($yid==1){
                 $updata['CS_YID']=0;  
            }else{
 	         $updata['CS_YID']=1;
            }
            $this->CsdjDB->get_update ('news',$id,$updata);

               if($updata['CS_YID']==1){
	               echo '<a href="javascript:;" title="点击审核" onClick="dancesh(\''.site_url('admin/ajax/vodsh/').'\',1,'.$id.');return false"><font color=#ff0033>×</font></a>';
               }else{
                     if(Cion_UpNews>0){
                       //审核奖励金币
                       $row=$this->CsdjDB->get_select('news','CS_ID','CS_Name,CS_User',$id);
                       $dt=$this->db->query("SELECT CS_ID FROM ".CS_SqlPrefix."dt where cs_did=".$id." and cs_cid=3 and cs_user='".$row[0]->CS_User."' and cs_yid=1")->row();
                       if($dt){
                             $this->db->query("update ".CS_SqlPrefix."dt set cs_yid=0 where cs_id=".$dt->CS_ID."");
                             $this->db->query("update ".CS_SqlPrefix."user set CS_Cion=CS_Cion+".Cion_UpNews." where cs_name='".$row[0]->CS_User."'");
                             //发送消息
                              $msg['CS_Name']='文章审核消息';
                              $msg['CS_Neir']=$row[0]->CS_User.'，您好，您的文章《'.$row[0]->CS_Name.'》审核成功，同时系统给您增加'.Cion_UpNews.'个金币，如有问题，请联系管理员。';
                              $msg['CS_Usera']=$row[0]->CS_User;
                              $msg['CS_Userb']='管理员';
                              $msg['CS_AddTime']=date('Y-m-d h:i:s');
                              $this->CsdjDB->get_insert('xiaoxi',$msg);
                       }
                     }
	               echo '<a href="javascript:;" title="点击取消审核" onClick="dancesh(\''.site_url('admin/ajax/vodsh/').'\',0,'.$id.');return false">√</a>';
               }
        }

	public function vodsh()
	{
            $this->CsdjAdmin->Admin_Qx('18');
	    $id = intval($this->input->get('id'));
	    $yid = intval($this->input->get('yid'));
            if($yid==1){
                 $updata['CS_YID']=0;  
            }else{
 	         $updata['CS_YID']=1;
            }
            $this->CsdjDB->get_update ('vod',$id,$updata);

               if($updata['CS_YID']==1){
	               echo '<a href="javascript:;" title="点击审核" onClick="dancesh(\''.site_url('admin/ajax/vodsh/').'\',1,'.$id.');return false"><font color=#ff0033>×</font></a>';
               }else{
                     if(Cion_UpVod>0){
                       //审核奖励金币
                       $row=$this->CsdjDB->get_select('vod','CS_ID','CS_Name,CS_User',$id);
                       $dt=$this->db->query("SELECT CS_ID FROM ".CS_SqlPrefix."dt where cs_did=".$id." and cs_cid=2 and cs_user='".$row[0]->CS_User."' and cs_yid=1")->row();
                       if($dt){
                             $this->db->query("update ".CS_SqlPrefix."dt set cs_yid=0 where cs_id=".$dt->CS_ID."");
                             $this->db->query("update ".CS_SqlPrefix."user set CS_Cion=CS_Cion+".Cion_UpVod." where cs_name='".$row[0]->CS_User."'");
                             //发送消息
                              $msg['CS_Name']='视频审核消息';
                              $msg['CS_Neir']=$row[0]->CS_User.'，您好，您的视频《'.$row[0]->CS_Name.'》审核成功，同时系统给您增加'.Cion_UpVod.'个金币，如有问题，请联系管理员。';
                              $msg['CS_Usera']=$row[0]->CS_User;
                              $msg['CS_Userb']='管理员';
                              $msg['CS_AddTime']=date('Y-m-d h:i:s');
                              $this->CsdjDB->get_insert('xiaoxi',$msg);
                       }
                     }
	             echo '<a href="javascript:;" title="点击取消审核" onClick="dancesh(\''.site_url('admin/ajax/vodsh/').'\',0,'.$id.');return false">√</a>';
               }
        }

	public function picsh()
	{
            $this->CsdjAdmin->Admin_Qx('28');
	    $id = intval($this->input->get('id'));
	    $yid = intval($this->input->get('yid'));
            if($yid==1){
                 $updata['CS_YID']=0;  
            }else{
 	         $updata['CS_YID']=1;
            }
            $this->CsdjDB->get_update ('pic',$id,$updata);

               if($updata['CS_YID']==1){
	               echo '<a href="javascript:;" title="点击审核" onClick="dancesh(\''.site_url('admin/ajax/picsh/').'\',1,'.$id.');return false"><font color=#ff0033>×</font></a>';
               }else{
                     if(Cion_UpPic>0){
                       //审核奖励金币
                       $row=$this->CsdjDB->get_select('pic','CS_ID','CS_Pic,CS_User',$id);
                       $dt=$this->db->query("SELECT CS_ID FROM ".CS_SqlPrefix."dt where cs_did=".$id." and cs_cid=5 and cs_user='".$row[0]->CS_User."' and cs_yid=1")->row();
                       if($dt){
                             $this->db->query("update ".CS_SqlPrefix."dt set cs_yid=0 where cs_id=".$dt->CS_ID."");
                             $this->db->query("update ".CS_SqlPrefix."user set CS_Cion=CS_Cion+".Cion_UpPic." where cs_name='".$row[0]->CS_User."'");
                             //发送消息
                              $msg['CS_Name']='图片审核消息';
                              $msg['CS_Neir']=$row[0]->CS_User.'，您好，您的图片《'.$row[0]->CS_Pic.'》审核成功，同时系统给您增加'.Cion_UpPic.'个金币，如有问题，请联系管理员。';
                              $msg['CS_Usera']=$row[0]->CS_User;
                              $msg['CS_Userb']='管理员';
                              $msg['CS_AddTime']=date('Y-m-d h:i:s');
                              $this->CsdjDB->get_insert('xiaoxi',$msg);
                       }
                     }
	             echo '<a href="javascript:;" title="点击取消审核" onClick="dancesh(\''.site_url('admin/ajax/picsh/').'\',0,'.$id.');return false">√</a>';
               }
        }

	public function singersh()
	{
            $this->CsdjAdmin->Admin_Qx('22');
	    $id = intval($this->input->get('id'));
	    $yid = intval($this->input->get('yid'));
            if($yid==1){
                 $updata['CS_YID']=0;  
            }else{
 	         $updata['CS_YID']=1;
            }
            $this->CsdjDB->get_update ('singer',$id,$updata);

               if($updata['CS_YID']==1){
	               echo '<a href="javascript:;" title="点击显示" onClick="singersh(\''.site_url('admin/ajax/singersh/').'\',1,'.$id.');return false"><font color=#ff0033>×</font></a>';
               }else{
	               echo '<a href="javascript:;" title="点击隐藏" onClick="singersh(\''.site_url('admin/ajax/singersh/').'\',0,'.$id.');return false">√</a>';
               }
        }

	public function singertj()
	{
            $this->CsdjAdmin->Admin_Qx('22');
	    $id = intval($this->input->get('id'));
	    $tid = intval($this->input->get('tid'));

            $updata['CS_TID']=$tid;  
            $this->CsdjDB->get_update ('singer',$id,$updata);

               if($tid==0){
	               echo '<a href="javascript:;" title="点击推荐" onClick="singertj(\''.site_url('admin/ajax/singertj/').'\',1,'.$id.');return false"><font color=#ff0033>×</font></a>';
               }else{
	               echo '<a href="javascript:;" title="点击取消推荐" onClick="singertj(\''.site_url('admin/ajax/singertj/').'\',0,'.$id.');return false">√</a>';
               }
        }

	public function topicsh()
	{
            $this->CsdjAdmin->Admin_Qx('10');
	    $id = intval($this->input->get('id'));
	    $yid = intval($this->input->get('yid'));
            if($yid==1){
                 $updata['CS_YID']=0;  
            }else{
 	         $updata['CS_YID']=1;
            }
            $this->CsdjDB->get_update ('topic',$id,$updata);

               if($updata['CS_YID']==1){
	               echo '<a href="javascript:;" title="点击审核" onClick="topicsh(\''.site_url('admin/ajax/topicsh/').'\',1,'.$id.');return false"><font color=#ff0033>×</font></a>';
               }else{
	               echo '<a href="javascript:;" title="点击取消审核" onClick="topicsh(\''.site_url('admin/ajax/topicsh/').'\',0,'.$id.');return false">√</a>';
               }
        }

	public function linksh()
	{
            $this->CsdjAdmin->Admin_Qx('24');
	    $id = intval($this->input->get('id'));
	    $yid = intval($this->input->get('yid'));
            if($yid==1){
                 $updata['CS_YID']=0;  
            }else{
 	         $updata['CS_YID']=1;
            }
            $this->CsdjDB->get_update ('link',$id,$updata);

               if($updata['CS_YID']==1){
	               echo '<a href="javascript:;" title="点击显示" onClick="linksh(\''.site_url('admin/ajax/linksh/').'\',1,'.$id.');return false"><font color=#ff0033>×</font></a>';
               }else{
	               echo '<a href="javascript:;" title="点击隐藏" onClick="linksh(\''.site_url('admin/ajax/linksh/').'\',0,'.$id.');return false">√</a>';
               }
        }

	public function usertj()
	{
            $this->CsdjAdmin->Admin_Qx('41');
	    $id = intval($this->input->get('id'));
	    $tid = intval($this->input->get('tid'));
            if($tid==1){
                 $updata['CS_TID']=1;  
            }else{
 	         $updata['CS_TID']=0;
            }
            $this->CsdjDB->get_update ('user',$id,$updata);

               if($updata['CS_TID']==0){
	               echo '<a href="javascript:;" title="点击推荐" onClick="usertj(\''.site_url('admin/ajax/usertj/').'\',1,'.$id.');return false"><font color=#ff0033>×</font></a>';
               }else{
	               echo '<a href="javascript:;" title="点击取消推荐" onClick="usertj(\''.site_url('admin/ajax/usertj/').'\',0,'.$id.');return false">√</a>';
               }
        }

	public function userjh()
	{
            $this->CsdjAdmin->Admin_Qx('41');
	    $id = intval($this->input->get('id'));
            $updata['CS_YID']=0;  
            $this->CsdjDB->get_update ('user',$id,$updata);
	    echo '√';
        }

	public function usersh()
	{
            $this->CsdjAdmin->Admin_Qx('41');
	    $id = intval($this->input->get('id'));
	    $sid = intval($this->input->get('sid'));
            if($sid==1){
                 $updata['CS_SID']=0;  
            }else{
 	         $updata['CS_SID']=1;
            }
            $this->CsdjDB->get_update ('user',$id,$updata);

               if($updata['CS_SID']==1){
	               echo '<a href="javascript:;" title="点击解锁" onClick="usersh(\''.site_url('admin/ajax/usersh/').'\',1,'.$id.');return false"><font color=#ff0033>×</font></a>';
               }else{
	               echo '<a href="javascript:;" title="点击锁定" onClick="usersh(\''.site_url('admin/ajax/usersh/').'\',0,'.$id.');return false">√</a>';
               }
        }

	public function userrz()
	{
            $this->CsdjAdmin->Admin_Qx('41');
	    $id = intval($this->input->get('id'));
	    $rzid = intval($this->input->get('rzid'));
            if($rzid==1){
                 $updata['CS_RZID']=0;  
            }else{
 	         $updata['CS_RZID']=1;
            }
            $this->CsdjDB->get_update ('user',$id,$updata);

               if($updata['CS_RZID']==0){
	               echo '<a href="javascript:;" title="点击取消认证" onClick="userrz(\''.site_url('admin/ajax/userrz/').'\',0,'.$id.');return false"><font color=#ff0033>×</font></a>';
               }else{
	               echo '<a href="javascript:;" title="点击认证" onClick="userrz(\''.site_url('admin/ajax/userrz/').'\',1,'.$id.');return false">√</a>';
               }
        }

	public function html()
	{
            $this->CsdjAdmin->Admin_Qx('11');
	    $ac = $this->input->get('ac');
	    $id = intval($this->input->get('id'));
	    $cid = intval($this->input->get('cid'));
            if($ac=='dance'){
                $htmllink=$this->CsdjSkins->LinkUrl('play',$ac,'id',$cid,$id,1,1);
            }else{
                $htmllink=$this->CsdjSkins->LinkUrl('show',$ac,'id',$cid,$id,1,1);
            }
            $htmllink=$htmllink."?cs=html";
            $data=$this->CsdjAdmin->HtmlUp($htmllink);

            if(empty($data)) die('Error');
            if($ac=='dance'){
                 $html=".".$this->CsdjSkins->LinkUrl('play',$ac,'id',$cid,$id,1,2);
            }else{
                 $html=".".$this->CsdjSkins->LinkUrl('show',$ac,'id',$cid,$id,1,2);
            }
            $html=$this->CsdjAdmin->gethtmls($html); //补全HTML地址
            if ( ! write_file($html, $data)){
                 echo '<font color=red>Error</font>';
            }else{
                 echo '<font color=#0000ff>ok</font>';
            }

        }


	public function caiji()
	{
	      $spurl = $this->input->get('url',true);
          if(!empty($spurl) && substr($spurl,0,7)=='http://'){
              $url=str_replace('http://','',$spurl);
              $uall=explode("/",$url);
              preg_match('/[\w][\w-]*\.(?:com\.cn|com|cn|co|net|org|gov|cc|so|name|dj|biz|tv)(\/|$)/isU', $url, $domain);
              $cjurl=rtrim($domain[0], '/');

              if($cjurl=='ku6.com'){
                    $neir=$this->CsdjAdmin->HtmlUp($spurl);
                    if(empty($neir)){
                        exit('该视频地址有错误或不支持直接播放：'.$spurl.'');
                    }else{
                        $title=$this->CsdjAdmin->str_substr('<title>',' 在线观看',$neir);
                        $pic=$this->CsdjAdmin->str_substr('cover: "','"',$neir);
                        $swfurl=$this->CsdjAdmin->str_substr("snyu_page_params='vid=",'&category=',$neir);
                        $laiyuan="ku6";
                    }
              }elseif($cjurl=='56.com'){
                    $neir=$this->CsdjAdmin->HtmlAll($spurl,'utf-8');
                    if(empty($neir)){
                        exit('该视频地址有错误或不支持直接播放：'.$spurl.'');
                    }else{
                        $title=$this->CsdjAdmin->str_substr('<title>','-',$neir);
                        $pic=$this->CsdjAdmin->str_substr('img":"','",',$neir);
                        $pic=str_replace("\\","",$pic);
                        $swfurl=$this->CsdjAdmin->str_substr(',"EnId":"','"',$neir);
                        $laiyuan="56";
                    }
              }elseif($cjurl=='youku.com'){
                    $neir=$this->CsdjAdmin->HtmlAll($spurl,'utf-8');
                    if(empty($neir)){
                        exit('该视频地址有错误或不支持直接播放：'.$spurl.'');
                    }else{
                        $title=$this->CsdjAdmin->str_substr('<title>','—在线播放',$neir);
                        $pic=$this->CsdjAdmin->str_substr('&pics=','&site=优酷',$neir);
						$vall=explode(".html",$uall[2]);
                        $swfurl=substr($vall[0],3);
						if(strpos($swfurl,'_') !== FALSE){
							  $vall2=explode("_",$swfurl);
                              $swfurl=$vall2[0];
						}
                        $laiyuan="youku";
                    }
              }elseif($cjurl=='tudou.com'){
                    $neir=$this->CsdjAdmin->HtmlAll($spurl,'utf-8');
                    if(empty($neir)){
                        exit('该视频地址有错误或不支持直接播放：'.$spurl.'');
                    }else{
                        $title=$this->CsdjAdmin->str_substr(",kw: '","'",$neir);
                        $pic=$this->CsdjAdmin->str_substr(",pic: '","'",$neir);
                        $swfurl=$this->CsdjAdmin->str_substr(",icode: '","'",$neir);
                        $laiyuan="tudou";
                    }
              }elseif($cjurl=='sohu.com'){
                    $neir=$this->CsdjAdmin->HtmlUp($spurl);
                    if(empty($neir)){
                        exit('该视频地址有错误或不支持直接播放：'.$spurl.'');
                    }else{
                        $title=$this->CsdjAdmin->str_substr('<title>',' -',$neir);
                        $pic=$this->CsdjAdmin->str_substr('var cover="','";',$neir);
                        $swfurl=$this->CsdjAdmin->str_substr('var vid="','";',$neir);
                        $laiyuan="sohu";
                    }
              }elseif($cjurl=='sina.com.cn'){
                    $neir=$this->CsdjAdmin->HtmlAll($spurl,'utf-8');
                    if(empty($neir)){
                        exit('该视频地址有错误或不支持直接播放：'.$spurl.'');
                    }else{
                        $title=$this->CsdjAdmin->str_substr("		title:'","',",$neir);
                        $pic=$this->CsdjAdmin->str_substr("pic:'","'",$neir);
                        $swfurl=$this->CsdjAdmin->str_substr("		vid:'","'",$neir);
                        $laiyuan="sina";
                    }
              }elseif($cjurl=='qq.com'){
                    $neir=$this->CsdjAdmin->HtmlAll($spurl,'utf-8');
                    if(empty($neir)){
                        exit('该视频地址有错误或不支持直接播放：'.$spurl.'');
                    }else{
                        $title=$this->CsdjAdmin->str_substr('title : "','"',$neir);
                        $pic=$this->CsdjAdmin->str_substr('pic :"','",',$neir);
                        $swfurl=$this->CsdjAdmin->str_substr('vid:"','"',$neir);
                        $laiyuan="qq";
                    }
              }elseif($cjurl=='pps.tv'){
                    $neir=$this->CsdjAdmin->HtmlUp($spurl);
                    if(empty($neir)){
                        exit('该视频地址有错误或不支持直接播放：'.$spurl.'');
                    }else{
                        $title=$this->CsdjAdmin->str_substr("<meta name='description' content=",'">',$neir);
                        $title=substr($title,1);
                        $pic=$this->CsdjAdmin->str_substr('"sharepic":"','",',$neir);
                        $pic=str_replace("\\","",$pic);
                        $swfurl=$this->CsdjAdmin->str_substr('"url_key":"','",',$neir);
                        $laiyuan="pps";
                    }
              }elseif($cjurl=='letv.com'){
                    $neir=$this->CsdjAdmin->HtmlAll($spurl,'utf-8');
                    if(empty($neir)){
                        exit('该视频地址有错误或不支持直接播放：'.$spurl.'');
                    }else{
                        $title=$this->CsdjAdmin->str_substr('title:"','",',$neir);
                        $pic=$this->CsdjAdmin->str_substr('{pic:"','",url',$neir);
                        $swfurl=$this->CsdjAdmin->str_substr('vid:',',',$neir);
                        $laiyuan="letv";
                    }
              }elseif($cjurl=='yinyuetai.com'){
                    $neir=$this->CsdjAdmin->HtmlAll($spurl,'utf-8');
                    if(empty($neir)){
                        exit('该视频地址有错误或不支持直接播放：'.$spurl.'');
                    }else{
                        $title=$this->CsdjAdmin->str_substr('title : "','",',$neir);
                        $pic=$this->CsdjAdmin->str_substr('<meta property="og:image" content="','"/>',$neir);
                        $swfurl=$this->CsdjAdmin->str_substr('<meta property="og:url" content="http://v.yinyuetai.com/video/','"/>',$neir);
                        $laiyuan="yyt";
                    }
              }else{
                    exit('该视频地址有错误或不支持直接播放：'.$spurl.'');
              }
          }
          if(empty($swfurl)){
               echo '该视频地址有错误或不支持直接播放：'.$spurl.'';
          }else{
               echo $title."$".$swfurl."$".$laiyuan."|^|".$title."|^|".$pic."|^|".$laiyuan;
          }
	}
}

