<?php 
include("qs.php");
require( '../data/config.php');
$conn=mysql_connect($db_host,$db_user,$db_pass);
mysql_query("set names 'utf8'");
mysql_select_db($db_name);
if (PHP_VERSION >= '5.1' && !empty($timezone))
{
    date_default_timezone_set($timezone);
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
$tempid=array();
$newpx=array();
$i=0;
$rsql=mysql_query("select * from tm_art_class");
while($rs=mysql_fetch_object($rsql))
{
$tempid[$i++]=$rs->art_id;
}
for($i=0;$i<count($tempid);$i++)
    {
	mysql_query("update tm_art_class set px="._post('px'.$tempid[$i])." where art_id=".$tempid[$i]);
	}
echo "<script>location.href='class.php';</script>";
exit();
?>
