<?php
if(!defined('InEmpireCMS'))
{
	exit();
}
?><table width='100%' align=center cellpadding=3 cellspacing=1 bgcolor='#DBEAF5'>
  <tr>
    <td width='16%' height=25 bgcolor='ffffff'>影片名</td>
    <td bgcolor='ffffff'><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#DBEAF5">
<tr> 
  <td height="25" bgcolor="#FFFFFF">
<?=$tts?"<select name='ttid'><option value='0'>标题分类</option>$tts</select>":""?>
	<input type=text name=title value="<?=ehtmlspecialchars(stripSlashes($r[title]))?>" size="60"> 
	<input type="button" name="button" value="图文" onclick="document.add.title.value=document.add.title.value+'(图文)';"> 
  </td>
</tr>
<tr> 
  <td height="25" bgcolor="#FFFFFF">属性: 
	<input name="titlefont[b]" type="checkbox" value="b"<?=$titlefontb?>>粗体
	<input name="titlefont[i]" type="checkbox" value="i"<?=$titlefonti?>>斜体
	<input name="titlefont[s]" type="checkbox" value="s"<?=$titlefonts?>>删除线
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;颜色: <input name="titlecolor" type="text" value="<?=stripSlashes($r[titlecolor])?>" size="10"><a onclick="foreColor();"><img src="../data/images/color.gif" width="21" height="21" align="absbottom"></a>
  </td>
</tr>
</table>
     首字母:
<input name="infozm" type="text" id="infozm" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[infozm]))?>" size="">
&nbsp;&nbsp;拼音:<input name="tpinyin" type="text" id="tpinyin" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[tpinyin]))?>" size="">
<input type="button" name="Submit7011" value="生成拼音" onClick="window.open('getpinyin.php?hz='+document.add.title.value+'&returnform=opener.document.add.tpinyin.value','','width=160,height=100');"> &nbsp;&nbsp;发行年份:<input name="year" type="text" id="year" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[year]))?>" size="">
&nbsp;&nbsp;备注:<input name="typeset" type="text" id="typeset" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[typeset]))?>" size="">
 <br />发布时间:<input name="newstime" type="text" value="<?=$r[newstime]?>"><input type=button name=button value="设为当前时间" onclick="document.add.newstime.value='<?=$todaytime?>'">&nbsp;&nbsp;授权:<select name="showcheck" id="showcheck"><option value="0"<?=$r[showcheck]=="0"||$ecmsfirstpost==1?' selected':''?>>是</option><option value="1"<?=$r[showcheck]=="1"?' selected':''?>>否</option></select>&nbsp;<?php
$bclassid=$class_r[$r[classid]][bclassid];
if(!$bclassid)
{$bclassid=$_GET[bclassid];}
if($bclassid==3||$_GET[classid]==3||$r[classid]==3||$bclassid==4||$_GET[classid]==4||$r[classid]==4){
?>&nbsp;节目更新日期:
<select name="animeretime" id="animeretime">
<option value="0"<?=$r[animeretime]=="0"||$ecmsfirstpost==1?' selected':''?>>不设置</option>
<option value="1"<?=$r[animeretime]=="1"?' selected':''?>>星期一</option>
<option value="2"<?=$r[animeretime]=="2"?' selected':''?>>星期二</option>
<option value="3"<?=$r[animeretime]=="3"?' selected':''?>>星期三</option>
<option value="4"<?=$r[animeretime]=="4"?' selected':''?>>星期四</option>
<option value="5"<?=$r[animeretime]=="5"?' selected':''?>>星期五</option>
<option value="5"<?=$r[animeretime]=="6"?' selected':''?>>星期六</option>
<option value="5"<?=$r[animeretime]=="7"?' selected':''?>>星期日</option>
</select>
<?php
}
else{	
?>
<input type="hidden" name="animeretime" value="0" />
<?php
}
?>&nbsp;<?php
$bclassid=$class_r[$r[classid]][bclassid];
if(!$bclassid)
{$bclassid=$_GET[bclassid];}
if($bclassid==1){
?>
&nbsp;电影上映日期:<input name="movieshowtime" type="text" id="movieshowtime" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[movieshowtime]))?>" size="">
<?php
}
?>



    </td>
    
  </tr>
  <tr>
    <td width='16%' height=25 bgcolor='ffffff'>特殊属性</td>
    <td bgcolor='ffffff'>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#DBEAF5">
  <tr>
    <td height="25" bgcolor="#FFFFFF">信息属性: 
      <input name="checked" type="checkbox" value="1"<?=$r[checked]?' checked':''?>>
      审核 &nbsp;&nbsp; 推荐 
      <select name="isgood" id="isgood">
        <option value="0">不推荐</option>
	<?=$ftnr['igname']?>
      </select>
      &nbsp;&nbsp; 头条 
      <select name="firsttitle" id="firsttitle">
        <option value="0">非头条</option>
	<?=$ftnr['ftname']?>
      </select></td>
  </tr>
  <tr> 
    <td height="25" bgcolor="#FFFFFF">关键字&nbsp;&nbsp;&nbsp;: 
      <input name="keyboard" type="text" size="52" value="<?=stripSlashes($r[keyboard])?>">
      <font color="#666666">(多个请用&quot;,&quot;隔开)</font></td>
  </tr>
  <tr> 
    <td height="25" bgcolor="#FFFFFF">外部链接: 
      <input name="titleurl" type="text" value="<?=stripSlashes($r[titleurl])?>" size="52">
      <font color="#666666">(填写后信息连接地址将为此链接)</font></td>
  </tr>
</table>
</td>
  </tr>
  <tr>
    <td width='16%' height=25 bgcolor='ffffff'>影片缩略图</td>
    <td bgcolor='ffffff'><input name="titlepic" type="text" id="titlepic" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[titlepic]))?>" size="45">
<a onclick="window.open('ecmseditor/FileMain.php?infoid=<?=$id?>&sinfo=1&type=1&classid=<?=$classid?>&filepass=<?=$filepass?>&doing=1&field=titlepic','','width=700,height=550,scrollbars=yes');" title="选择已上传的图片"><img src="../data/images/changeimg.gif" border="0" align="absbottom"></a> 
</td>
  </tr>

  <tr>
    <td width='16%' height=25 bgcolor='ffffff'>影片子类</td>
    <td bgcolor='ffffff'><?php
$dget=$_GET;
$dclassid=$r['classid'];
	if($dclassid==''||empty($dclassid)||!$dclassid){
			$dclassid=$dget['classid'];		   
	}
					   
global $class_r,$empire,$public_r;
$dbclassid=$class_r[$dclassid]['bclassid'];
	if($dbclassid=='0'||!$dbclassid){
		$dbclassid=$dclassid;
	}
$publicclasstypevalue='add_classtype_'.$dbclassid;
$classtypestr=$public_r["$publicclasstypevalue"];
$classtyper=explode("\r\n",$classtypestr);
$classtypenum=count($classtyper);
		for($classtypei=0;$classtypei<$classtypenum;$classtypei++){
						?>
<input name="classtype[]" type="checkbox" value="<?=$classtyper[$classtypei]?>"<?=strstr($r[classtype],$classtyper[$classtypei])?' checked':''?>><?=$classtyper[$classtypei]?>                       
                        <?php						
		}
?></td>
  </tr>
  <tr>
    <td width='16%' height=25 bgcolor='ffffff'>演职人员</td>
    <td bgcolor='ffffff'>导演:
<input name="direct" type="text" id="direct" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[direct]))?>" size="">
 演员:
<input name="actor" type="text" id="actor" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[actor]))?>" size="">
</td>
  </tr>

  <tr>
    <td width='16%' height=25 bgcolor='ffffff'>影片属性</td>
    <td bgcolor='ffffff'>语言:<input name="language" type="radio" value="普通话"<?=$r[language]=="普通话"?' checked':''?>>普通话<input name="language" type="radio" value="国语"<?=$r[language]=="国语"?' checked':''?>>国语<input name="language" type="radio" value="粤语"<?=$r[language]=="粤语"?' checked':''?>>粤语<input name="language" type="radio" value="英语"<?=$r[language]=="英语"?' checked':''?>>英语<input name="language" type="radio" value="日语"<?=$r[language]=="日语"?' checked':''?>>日语<input name="language" type="radio" value="韩语"<?=$r[language]=="韩语"?' checked':''?>>韩语<input name="language" type="radio" value="泰语"<?=$r[language]=="泰语"?' checked':''?>>泰语<input name="language" type="radio" value="俄语"<?=$r[language]=="俄语"?' checked':''?>>俄语<input name="language" type="radio" value="德语"<?=$r[language]=="德语"?' checked':''?>>德语<input name="language" type="radio" value="法语"<?=$r[language]=="法语"?' checked':''?>>法语<input name="language" type="radio" value="其他"<?=$r[language]=="其他"?' checked':''?>>其他<br />字幕:<input name="subtitle" type="radio" value="中文"<?=$r[subtitle]=="中文"?' checked':''?>>中文<input name="subtitle" type="radio" value="英文"<?=$r[subtitle]=="英文"?' checked':''?>>英文<input name="subtitle" type="radio" value="日文"<?=$r[subtitle]=="日文"?' checked':''?>>日文<input name="subtitle" type="radio" value="韩文"<?=$r[subtitle]=="韩文"?' checked':''?>>韩文<input name="subtitle" type="radio" value="泰文"<?=$r[subtitle]=="泰文"?' checked':''?>>泰文<input name="subtitle" type="radio" value="俄文"<?=$r[subtitle]=="俄文"?' checked':''?>>俄文<input name="subtitle" type="radio" value="德文"<?=$r[subtitle]=="德文"?' checked':''?>>德文<input name="subtitle" type="radio" value="法文"<?=$r[subtitle]=="法文"?' checked':''?>>法文<input name="subtitle" type="radio" value="其他"<?=$r[subtitle]=="其他"?' checked':''?>>其他<br />地区:<input name="area" type="radio" value="大陆"<?=$r[area]=="大陆"?' checked':''?>>大陆<input name="area" type="radio" value="台湾"<?=$r[area]=="台湾"?' checked':''?>>台湾<input name="area" type="radio" value="香港"<?=$r[area]=="香港"?' checked':''?>>香港<input name="area" type="radio" value="韩国"<?=$r[area]=="韩国"?' checked':''?>>韩国<input name="area" type="radio" value="美国"<?=$r[area]=="美国"?' checked':''?>>美国<input name="area" type="radio" value="泰国"<?=$r[area]=="泰国"?' checked':''?>>泰国<input name="area" type="radio" value="新加坡"<?=$r[area]=="新加坡"?' checked':''?>>新加坡<input name="area" type="radio" value="日本"<?=$r[area]=="日本"?' checked':''?>>日本<input name="area" type="radio" value="英国"<?=$r[area]=="英国"?' checked':''?>>英国<input name="area" type="radio" value="法国"<?=$r[area]=="法国"?' checked':''?>>法国<input name="area" type="radio" value="德国"<?=$r[area]=="德国"?' checked':''?>>德国<input name="area" type="radio" value="印度"<?=$r[area]=="印度"?' checked':''?>>印度<input name="area" type="radio" value="加拿大"<?=$r[area]=="加拿大"?' checked':''?>>加拿大<input name="area" type="radio" value="俄罗斯"<?=$r[area]=="俄罗斯"?' checked':''?>>俄罗斯<input name="area" type="radio" value="其他"<?=$r[area]=="其他"?' checked':''?>>其他<input name="area" type="radio" value="其他地区"<?=$r[area]=="其他地区"?' checked':''?>>其他地区<br />类型:<input name="type" type="radio" value="1"<?=$r[type]=="1"?' checked':''?>>连载<input name="type" type="radio" value="0"<?=$r[type]=="0"?' checked':''?>>全集<input name="type" type="radio" value="BD"<?=$r[type]=="BD"?' checked':''?>>BD<input name="type" type="radio" value="HD"<?=$r[type]=="HD"?' checked':''?>>HD<input name="type" type="radio" value="DVD"<?=$r[type]=="DVD"?' checked':''?>>DVD<input name="type" type="radio" value="TS"<?=$r[type]=="TS"?' checked':''?>>TS</td>
  </tr>
  <tr>
    <td width='16%' height=25 bgcolor='ffffff'>星级评分</td>
    <td bgcolor='ffffff'>
    推荐星级:<select name="star" id="star"><option value="1"<?=$r[star]=="1"?' selected':''?>>1</option><option value="2"<?=$r[star]=="2"?' selected':''?>>2</option><option value="3"<?=$r[star]=="3"||$ecmsfirstpost==1?' selected':''?>>3</option><option value="4"<?=$r[star]=="4"?' selected':''?>>4</option><option value="5"<?=$r[star]=="5"?' selected':''?>>5</option></select> 用户平均分:<input style="width:50px;" name="userstar" type="text" id="userstar" value="<?=$ecmsfirstpost==1?"10":ehtmlspecialchars(stripSlashes($r[userstar]))?>" size="">
 一星:<input style="width:40px;"  name="userstar1" type="text" id="userstar1" value="<?=$ecmsfirstpost==1?"0":ehtmlspecialchars(stripSlashes($r[userstar1]))?>" size="">
 二星:<input style="width:40px;"  name="userstar2" type="text" id="userstar2" value="<?=$ecmsfirstpost==1?"0":ehtmlspecialchars(stripSlashes($r[userstar2]))?>" size="">
 三星:<input  style="width:40px;"  name="userstar3" type="text" id="userstar3" value="<?=$ecmsfirstpost==1?"0":ehtmlspecialchars(stripSlashes($r[userstar3]))?>" size="">
 四星:<input  style="width:40px;"  name="userstar4" type="text" id="userstar4" value="<?=$ecmsfirstpost==1?"0":ehtmlspecialchars(stripSlashes($r[userstar4]))?>" size="">
 五星<input  style="width:40px;"  name="userstar5" type="text" id="userstar5" value="<?=$ecmsfirstpost==1?"0":ehtmlspecialchars(stripSlashes($r[userstar5]))?>" size="">
</td>
  </tr>
  <tr>
    <td width='16%' height=25 bgcolor='ffffff'>顶踩点击</td>
    <td bgcolor='ffffff'>顶:<input  style="width:40px;"  name="stargood" type="text" id="stargood" value="<?=$ecmsfirstpost==1?"0":ehtmlspecialchars(stripSlashes($r[stargood]))?>" size="">
 踩:<input  style="width:40px;"  name="starbad" type="text" id="starbad" value="<?=$ecmsfirstpost==1?"0":ehtmlspecialchars(stripSlashes($r[starbad]))?>" size="">
</td>
  </tr>
  <tr>
    <td width='16%' height=25 bgcolor='ffffff'>更新相关</td>
    <td bgcolor='ffffff'>更新关联:<input name="urlkey" type="text" id="urlkey" style="width:250px;" value="<?=$ecmsfirstpost==1?"":$r[urlkey]?>" size="">
    &nbsp;&nbsp;(采集地址:<?=ehtmlspecialchars(stripSlashes($r[urlkey]))?>)   播放地址:<input name="playurl" type="text" id="playurl" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[playurl]))?>" size="">
</td>
  </tr>
  <tr>
    <td width='16%' height=25 bgcolor='ffffff'>影片资源</td>
    <td bgcolor='ffffff'><link href="../data/images/movietab.css" type="text/css" rel="stylesheet" />
<script language="javascript" type="text/javascript" src="../data/images/jquery-1.8.3.min.js"></script>
<?php
if($ecmsfirstpost==1){$isadd=1; $movieid=0;} else {$isadd=0;$movieid=$r[id];}
?>
<input type="hidden" value="<?=$isadd?>" id="isadd" name="isadd"  />
<input type="hidden" value="<?=$movieid?>" id="movieid" name="movieid"  />
<div class="movieaction"><a href="javascript:;" onclick="add_moviefrom()" title="增加一组影视资源">增加一组影视资源</a></div>
<div class="moviebox">
<?php

@include_once('../class/movie_config.php');

echo '<div class="hidetype">'.$movie_config[movietype].'</div>';
echo '<div class="hidetypecn">'.$movie_config[movietypecn].'</div>';

if($isadd==0){   //修改信息
$movieshowhtml='';

$moviestrr=explode($d_exp,$r[movieshow]);
$moviestrnum=count($moviestrr);
for($i=0;$i<$moviestrnum;$i++){          //循环:::::: d_exp
		$movieplayr=explode($t_exp,$moviestrr[$i]);   //分割|||   0为资源类型 1为资源数组；
		$thismovietype=$movieplayr[0];
		$movieplay=$movieplayr[1];
		
		$movieshowhtml.='<div class="'.$thismovietype.'">';
		
		$movieshowhtml.='<div class="typeselect">资源类型:<select name="movietype[]" class="movietype" >';
					for($j=0;$j<$movietypernum;$j++){
						$themovietype=$movietyper[$j];
						$themovietypecn=$movietypecnr[$j];
						$checktype=$thismovietype==$themovietype?' selected':'';
								$movieshowhtml.='<option value="'.$themovietype.'" '.$checktype.'>'.$themovietypecn.'</option> ';						
					
					}
		$thistypestr=str_replace('#',"\r\n",ehtmlspecialchars(stripSlashes($movieplay)));			
		$movieshowhtml.='</select></div>';
		$movieshowhtml.='<div class="moviestr">';
		$movieshowhtml.='<textarea name="moviefrom[]" style="height:250px;width:100%">'.$thistypestr.'</textarea>';
		$movieshowhtml.='<div>';		
		$movieshowhtml.='</div>';

}
echo $movieshowhtml;

}    //修改信息
else{  //增加信息
?>

<div class="typeselect">资源类型:<select name="movietype[]" class="movietype" >
<?php  for($j=0;$j<$movietypernum;$j++){ 
				     	$themovietype=$movietyper[$j];
						$themovietypecn=$movietypecnr[$j];
echo '<option value="'.$themovietype.'">'.$themovietypecn.'</option> ';	

}?>
</select>
</div>
<div class="moviestr">
<textarea name="moviefrom[]" style="height:250px;width:100%"></textarea>
</div>

<?php	
}  //增加
?>
</div>
<div class="moviebox_add"></div>
<script type="text/javascript" language="javascript">
function add_moviefrom(){
	var $selectstr='';
	$movietypestr=$(".hidetype").text();
	$movietypecnstr=$(".hidetypecn").text();
	$typer=new Array;
	$typecnr=new Array;
	$typer=$movietypestr.split(',');
	$typecnr=$movietypecnstr.split(',');
	$num=$typer.length;
	$selecthtml='<div class="add_movieshow"><div class="typeselect">资源类型:<select name="movietype[]" class="movietype">';
	

for($k=0;$k<$num;$k++){
			$thetype=$typer[$k];
			$thecn=$typecnr[$k];
			$selectstr=$selectstr+'<option value="'+$thetype+'">'+$thecn+'</option>';
}
	$selecthtml=$selecthtml+$selectstr+'</select></div>';
	
		$texthtml='<div class="moviestr">';
		$texthtml=$texthtml+'<textarea name="moviefrom[]" style="height:250px;width:100%"></textarea>';
		$texthtml=$texthtml+'<div></div>';	
	$showhtml=$selecthtml+$texthtml;
	
if($(".moviebox_add").text()){
	$oldaddtext=$(".moviebox_add").html();
	$writevalue=$oldaddtext+$showhtml;
	$(".moviebox_add").html($writevalue);
	
}
else{
	$writevalue=$showhtml;
	$(".moviebox_add").html($writevalue);
	
}

}

    $(".del_addmovieshow").each(function(){
		$(this).click(function(){
			alert ("del");				   
			$(this).remove();  
			return false;
		})
	});	
</script></td>
  </tr>
   <tr>
    <td width='16%' height=25 bgcolor='ffffff'>影片简介</td>
    <td bgcolor='ffffff'>
<?=ECMS_ShowEditorVar("introduction",$ecmsfirstpost==1?"":stripSlashes($r[introduction]),"Basic","","300","100%")?>
</td>
  </tr> 
</table>