 <?php
 $action=$_GET[action];
if($action=='renew'){
 require ('../e/class/connect.php');
 require ('../e/class/db_sql.php');
 require ('../e/class/functions.php');
 $link=db_connect();
 $empire=new mysqlquery;
	$query2="select * from {$dbtbpre}movie_config where id=1 limit 1";
	$r=$empire->fetch1($query2);
	set_movieconfig($r);	
	printerror2("更新电影设置成功！","renewmovie.php?action=edit");
    $empire=NULL;
    db_close();
}
function set_movieconfig($r){
$path=ECMS_PATH.'plus/movie_config_temp.php';
$string=file_get_contents($path);
$string=str_replace('[!--r_exp--]',$r[r_exp],$string);
$string=str_replace('[!--d_exp--]',$r[d_exp],$string);
$string=str_replace('[!--f_exp--]',$r[f_exp],$string);
$string=str_replace('[!--t_exp--]',$r[t_exp],$string);
$string=str_replace('[!--movietype--]',$r[movietype],$string);
$string=str_replace('[!--movietypecn--]',$r[movietypecn],$string);
$string=str_replace('[!--playhtmldir--]',$r[playhtmldir],$string);
$string=str_replace('[!--playtemp1--]',$r[playtemp1],$string);
$string=str_replace('[!--playtemp2--]',$r[playtemp2],$string);
$string=str_replace('[!--playtemp3--]',$r[playtemp3],$string);
$string=str_replace('[!--thismovielisthtml--]',$r[thismovielisthtml],$string);
$string=str_replace('[!--movielisttemp--]',$r[movielisttemp],$string);
$string=str_replace('[!--bdhddownurl--]',$r[bdhddownurl],$string);
$string=str_replace('[!--qvoddownurl--]',$r[qvoddownurl],$string);
$string=str_replace('[!--bdhdstr--]',$r[bdhdstr],$string);
$string=str_replace('[!--qvodstr--]',$r[qvodstr],$string);
$string=str_replace('[!--videostr--]',$r[videostr],$string);
$string=str_replace('[!--repagenum--]',$r[repagenum],$string);
$string=str_replace('[!--repagestartnum--]',$r[repagestartnum],$string);
$string=str_replace('[!--repageendnum--]',$r[repageendnum],$string);
$string=str_replace('[!--isfenhtml--]',$r[isfenhtml],$string);
$string=str_replace('[!--videohtmldir--]',$r[videohtmldir],$string);
$file=ECMS_PATH.'e/class/movie_config.php';
WriteFiletext($file,$string);
return '1';

}
?>