日期:2014-05-17 浏览次数:20535 次
extract($_POST);或者
extract($_REQUEST);才能运行一些功能,这是什么意思?
$query="select * from $student_table where xuehao='$xuehao'";
mysql_query("set names 'GB2312'");
$result=mysql_query($query);
$row=mysql_fetch_array($result);
$query="select number as sn,surplus as ssn from $keti_table where id='$id'";
mysql_query("set names 'gb2312'");
$result=mysql_query($query);
$row=mysql_fetch_array($result);
if($number1<$row['sn'])
{
if($number1<($row['sn']-$row['ssn']))
{
echo"<p align=\"center\"><font color=\"#FF0000\"><b><big>人数不能少于现已选题人数,人数列修改失败!</big></b></font>";
echo"<meta http-equiv=\"refresh\" content=\"2;url=alter_jiaoshi.php\">";
exit;
}
else
{
$query2=mysql_query("update $keti_table set number='$newnumber' where id='$id'");
$query3=mysql_query("update $keti_table set surplus=surplus-($row[sn]-$newnumber) where id='$id'");
mysql_query("set names 'gb2312'");
$result1=mysql_query($query3);
}
}
else
{
$query4=mysql_query("update $keti_table set number='$newnumber' where id='$id'");
$query5=mysql_query("update $keti_table set surplus=surplus+($newnumber-$row[sn]) where id='$id'");
mysql_query("set names 'gb2312'");
$result2=mysql_query($query5);
}
if($result==true)
{
echo"<p align=\"center\"><font color=\"#FF0000\"><b><big>修改课题成功!</big></b></font>";
echo "<meta http-equiv=\"refresh\" content=\"1;url=jiaoshi_login.php\">";
exit;
}
$file_name="相关资料.rar";
$file_dir="temp/./";
if(!file_exists($file_dir.$file_name))
{
echo"<p align=\"center\"><font color=\"#FF0000\"><b><big>无法找到该文件</big></b></font></p>";
echo "<meta http-equiv=\"refresh\" content=\"1;url=download.php\">";
exit;
}
else{
$file=fopen($file_dir.$file_name,"r");//打开文件
Header("Content-type: application/octet-stream");
Header("Accept-Ranges:bytes");
Header("Accept-Length:".filesize($file_dir.$file_name));
Header("Content-Disposition: attachment; filename=".$file_name);
readfile($file_dir.$file_name);
}
$surplus='';
extract($_REQUEST);
$n=0;
if(empty($offset))
{$offset=0;}
mysql_query("set names 'GB2312'");
$where&n