<?php
require "../e/class/connect.php";
require "../e/class/db_sql.php";
require "../e/data/dbcache/class.php";
$link=db_connect();
$empire=new mysqlquery;
$set=$empire->query("ALTER TABLE  {$dbtbpre}ecms_movie modify `titleurl` varchar(500)");
$set=$empire->query("alter table  {$dbtbpre}ecms_movie_check modify `titleurl` varchar(500)");
$set=$empire->query("alter table  {$dbtbpre}ecms_movie modify `filename` varchar(500)");
$set=$empire->query("alter table  {$dbtbpre}ecms_movie_check modify `filename` varchar(500)");
$query=$empire->query("select tpinyin,titleurl,filename,id,classid from {$dbtbpre}ecms_movie order by id asc ");
while($r=$empire->fetch($query)){
		$url=$r[titleurl];
		$filetype=$class_r[$r[classid]]['filetype'];
		$endfiletype='/index';
		$filename=$r[tpinyin].$endfiletype;
		if(strpos($url,'index')==false){
			$up=$empire->query("update {$dbtbpre}ecms_movie set filename='$filename' where classid='$r[classid]' and id='$r[id]' ");
			echo 'ID=>'.$r[id].'--CLASSID=>'."$r[classid] TPINYIN=> $r[tpinyin] URL==>$r[titleurl]".'<br />';
		}
		
}