<?php include("conn.php") ?>
<link href="./css/css.css" rel="stylesheet" type="text/css">
<? 
 
	  $read_juan_id=$_GET['juan_id'];
	  
	  $sql="select  *  from  database_name  where   id=";
	  $sql=$sql."  (select  database_id  from  fenlei   where   id=".$read_juan_id.")";
      $rs=$conn->execute($sql);
      if (!$rs->EOF)
      {
        $read_database_name=$rs->fields["database_name"];
		$read_database_idid=$rs->fields["id"];
      } 
	  
	  
	 $sql="select  *  from  fenlei  where   id=".$read_juan_id;
	 $rs=$conn->execute($sql);
	 if (!$rs->EOF)
     {
        $read_juan_name=$rs->fields["exam_juan_name"];
     } 
	  
	  
	 $sql="select  *  from  fenlei  where   database_id=".$read_database_idid;
	 $re=mysql_query($sql);
	 $read_juan_nums=mysql_num_rows($re);
	 mysql_free_result($re);
	
	 
	  
 ?>
 
   
 <?php	  
	  
	  $read_studentid=$_SESSION["studentid"];
	  if  (($read_studentid=='') ||  ($read_studentid==NULL))
	  {
			echo "<font color=#009933 size=-1>[软件提示]：你长时间没有操作，[登录]后才能使用考试系统.</font>";
			exit;
	  }

  ?>
 
 
 

 
 
 
 
<?php 

                
		//显示日志记录的时候，将 studentanswer 中的 $studentid 代表的数据库记录转储到studentanswer_xi

        $myflag=0;
		$sql="select * from  studentanswer  where  stuid='".$read_studentid."'";
							 
		$rs=$conn->execute($sql);
		if(!$rs->EOF)
		{
			$exist_stu_flag=1;
		}
		else
		{
			$exist_stu_flag=0; 
		}
		$rs->close;
					 
		if ($exist_stu_flag==1)
		{
				     
					 //-----------如果存在，juan_id=0 的数据库记录转移过去了-----------------------------
					
					 $sql="insert into studentanswer_xi select * from studentanswer where stuid='".$studentid."'";
					 $rs=$conn->execute($sql);
					 $rs->close;
					 //---------------------------------------
					 $sql="delete from studentanswer where stuid='".$studentid."'";
					 $rs=$conn->execute($sql);
					 $rs->close;
					 //-------------------------------------------
					 $read_exercise_num=0;
					 $sql="select * from studentanswer_xi where stuid='".$studentid."'";
					 $result=mysql_query($sql);
					 $read_exercise_num=mysql_num_rows($result);
					 mysql_free_result($result);
					 
					
					 
		}

?>
 
 
 
 
 <?php	  
	  
	  $juan_id_int=intval($read_juan_id);
	  
	  $sql="select  * from   ".$read_database_name;
	  $sql=$sql. "   where  试卷分类=".$juan_id_int;
	  $sql=$sql."  and   题目类型=1";
	  $result=mysql_query($sql);
	  $s_num=mysql_num_rows($result);
	  mysql_free_result($result);

	  
	  $sql="select  *  from   ".$read_database_name;
	  $sql=$sql. "   where  试卷分类=".$juan_id_int;
	  $sql=$sql."  and   题目类型=2";
	  $result=$conn->execute($sql);
	  $result=mysql_query($sql);
	  $d_num=mysql_num_rows($result);
	  mysql_free_result($result);
	  
	  $sql="select  *  from   ".$read_database_name;
	  $sql=$sql. "   where  试卷分类=".$juan_id_int;
	  $sql=$sql."  and   题目类型=3";
	  $result=mysql_query($sql);
	  $t_num=mysql_num_rows($result);
	  mysql_free_result($result);

	  
	  $sql="select  *  from   ".$read_database_name;
	  $sql=$sql. "   where  试卷分类=".$juan_id_int;
	  $sql=$sql."  and   题目类型=4";
	  $result=mysql_query($sql);
	  $p_num=mysql_num_rows($result);
	  mysql_free_result($result);
	  	 
	  
	  $sql="select  *  from   ".$read_database_name;
	  $sql=$sql. "   where  试卷分类=".$juan_id_int;
	  $sql=$sql."  and   题目类型=5";
	  $result=mysql_query($sql);
	  $lunshu_num=mysql_num_rows($result);
	  mysql_free_result($result);
	  $rs->close;
	  
 ?>
 





 <?php 
   
	
	
	$s_exist=0;
	$d_exist=0;
	$t_exist=0;
	$p_exist=0;
	$lunshu_exist=0;
	$sql="select  *  from    studentanswer_xi    where   stuid='".$read_studentid."'";
	//不含这个条件，指任意课程的学习判别---------------
	//$sql=$sql."   and   juan_id=".$read_juan_id;
	$sql=$sql." order  by  id  desc ";
	$rs=$conn->execute($sql);

	if (!$rs->EOF)
	{

  		$get_s=$rs->fields["rom_s"];
  		$get_d=$rs->fields["rom_d"];
  		$get_t=$rs->fields["rom_t"];
  		$get_p=$rs->fields["rom_p"];
  		$get_lunshu=$rs->fields["rom_lunshu"];
  
  		if ($get_s!='' || $get_s!="")
  		{
    		$s_exist=1;
  		} 

  		if ($get_d!='' || $get_d!="")
  		{
    		$d_exist=1;
  		} 

  		if ($get_t!='' || $get_t!="")
  		{
    		$t_exist=1;
  		} 

  		if ($get_p!='' || $get_p!="")
  		{
    		$p_exist=1;
  		} 

  		if ($get_lunshu!='' || $get_lunshu!="")
  		{
    		$lunshu_exist=1;
  		} 
		
		
		$ti_type_str="";
		if ($s_exist==1)
    	{
			$ti_type_str=$ti_type_str." 单选题 "." ";
		}
		if ($d_exist==1)
    	{
			$ti_type_str=$ti_type_str." 多选题 "." ";
		}
		if ($t_exist==1)
    	{
			$ti_type_str=$ti_type_str." 填空题 "." ";
		}
		if ($p_exist==1)
    	{
			$ti_type_str=$ti_type_str." 判断题 "." ";
		}
		if ($lunshu_exist==1)
    	{
			$ti_type_str=$ti_type_str." <u>论述题</u> "." ";
		}
	
	
		$read_subject=$rs->fields["subject"]; 
		$read_random_num= $rs->fields["random_num"]; 
		$read_log_juan_id= $rs->fields["juan_id"];
		
		if ($read_random_num==999)
		{
			$tip_msg="您帐号:<font color=0099ff>[".$read_studentid."]</font> 以随机练习方式练习了 <font color=#=0099ff>[ ".$read_subject."] </font> 试题.";
			$tip_msg=$tip_msg."含 ".$ti_type_str." 题型";
		}
		else
		{
		    $tip_msg="您帐号:<font color==0099ff> [".$read_studentid."]</font> 以顺序练习方式刚才练习了<font color=#=0099ff> [".$read_subject."]</font> 试题.";
			$tip_msg=$tip_msg."题型: <font color==0099ff>[".$ti_type_str."]</font>".",第<font color=#=0099ff>[S".$read_random_num."]</font> 套";
		}
		
		
	}
	else
	{
		 	$tip_msg="您 [".$read_studentid."] 训练还没有开始，请继续努力.";
	}
	
	$rs->close;
	
	
	
	
?>
 
 

                          
                          
<?php 
	    $exam_page=50;
	
		$allnum=$s_num+$d_num+$t_num+$p_num+$lunshu_num;
	
		
		$cc="试题库中共有：[<font color=#009900><b>".$allnum."</b></font>]道  ";
		
		$cchar="";
		
		if  ($s_num>=1)   
		{
			$cchar=$cchar."<font color=#000000 size=-1>单选题数:"."[<b>".$s_num."</b></font>]"." ";
		}
		
		if  ($d_num>=1) 
		{
			 $cchar=$cchar."<font color=#000000 size=-1>多选题数:"."[<b>".$d_num."</b></font>]"." ";
		}
		
		if ( $t_num>=1)
		{
			 $cchar=$cchar."<font color=#000000 size=-1>填空题数:"."[<b>".$t_num."</b></font>]"." ";
		}
		
		if  ($p_num>=1)
		{
			 $cchar=$cchar."<font color=#000000 size=-1>判断题数:"."[<b>".$p_num."</b></font>]"." ";
		}
		if ($lunshu_num>=1)
		{
			 $cchar=$cchar."<font color=#000000 size=-1>论述题数:"."[<b>".$lunshu_num."</b></font>]";
		}
			
			
		$cc=$cc;  
		$cchar=$cchar;
		
		
		$database_name=$read_database_name;
		
		$s_str="<font size=-1>单选题练习:</font>";
		$d_str="<font size=-1>多选题练习:</font>";
		$t_str="<font size=-1>填空题练习;";
		$p_str="<font size=-1>判断题练习:";
		$lunshu_str="<font size=-1>论述题练习:</font>";
		
		$button_str1="进入考试系统";
		$button_str2="随机选取考试";
		
		$juan_name_str="试卷名：<b>".$juan_name[$k]."</b>";
		
		$para_str=$juan_id_int;
		
		$word_str="";
		
		$juan_name_str=$juan_name[$k];
		
		$yes_str="yes";
		
	
		
?>

<table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#cccccc" bordercolordark="#FFFFFF" bgcolor="#eff7ff">
  <tr>
    <td height="435"  valign="top" bgcolor="#F9F9F9">
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#bfd1eb" bordercolordark="#FFFFFF" bgcolor="#f9f9f9">
      <tr>
        <td height="19" colspan="3">&nbsp;</td>
      </tr>
      <tr>
        <td height="32" colspan="3" bgcolor="#F9F9F9"><font size="-1"><?php echo $tip_msg; ?></font></td>
      </tr>
      <tr>
        <td height="32" colspan="3">
        <table width="98%" border="00" cellspacing="0" cellpadding="0">
          <tr>
            <td width="11%"><font size="-1">科目名称：</font></td>
            <td width="71%" bgcolor="#F9F9F9"><font size="-1"><u><?php echo   $read_juan_name; ?></u></font><font color="#FF0000" size="-1"><b>[<? echo $allnum;?>]</b></font>道</td>
            <td width="18%" bgcolor="#0099FF">
              <?php if ($allnum!=0) {?>
              <div align="center" id="random_div" style="background-color:#0099ff;color:#FFFFFF;cursor:hand;TEXT-DECORATION:none;line-height:21px;" onClick="return first_lianxi_random(<?php echo $para_str;  ?>);" onMouseOut="this.style.backgroundColor=backupcolor" onMouseOver="this.backupcolor=this.style.backgroundColor;this.style.backgroundColor='#ff6633'">随机练习</div>
              <?php } ?>
              </td>
            </tr>
          </table></td>
      </tr>
      <tr>
        <td height="32" colspan="3"><?php echo $cchar; ?></td>
      </tr>
      <?php  if  ($s_num>=1) { ?>
      <tr>
        <td height="20" colspan="3" bgcolor="#F9F9F9"><?php echo $s_str ?></td>
      </tr>
      <tr>
        <td height="30" colspan="2">&nbsp;</td>
        <td width="89%" height="30" valign="top" bgcolor="#F9F9F9">
		
		
		
		<?php 
		
		    $dis_num=5;
			
			$ti_no_yushu_flag=0;
			
			echo "<br>";
		
		    $block_num=floor($s_num/$exam_page); //块数,小数部分舍去------------
			
			$row_num=floor($block_num/$dis_num); //行数以取整舍去的块数为准
			
			$yu_ti_num=$s_num % $exam_page;   //余下的题数
			
			if ($yu_ti_num!=0)    //如果有余数，则多一个块
			{
				$block_num=$block_num+1;
			}
			else
			{
				$ti_no_yushu_flag=1;   //如果无余数，则计算出来的块数，就是整数
			}
			
			$col_num=$block_num % $dis_num ;   //余下的列数
			
			if  (($col_num==0) and ($s_num!=0))
			{
				$col_num=5;
			}
			
			echo "<table border=1  cellspacing=0 cellpadding=2  bordercolorlight=#cccccc bordercolordark=#ffffff>  ";
   
    		$flag=0;
	
			$w=0;
	
			for ($f=1;$f<=$row_num;$f++)
			{
					echo "<tr>";
					for($g=1;$g<=$dis_num;$g++)
					{
						
						$w++;
						$abc="<a  href=# onclick='return first_shunxu_process("."1,".$w.",".$juan_id_int.");'>"."<font size=-1>单选第".$w."套</font>有".$exam_page."题</a>"." ";
						echo "<td>".$abc."</td>";
						
					}
		            echo "</tr>";
					
		
			}
			
			{
				  	echo "<tr>";
					for($g=1;$g<=$col_num;$g++)
					{
						$w++;
						
						if ($g<$col_num)
						{						
						$abc="<a href=# onclick='return first_shunxu_process("."1,".$w.",".$juan_id_int.");'>"."<font size=-1>单选第".$w."套</font>有".$exam_page."题</a>"." ";
						}
						else   //最后一个快
						{
						
							if ($ti_no_yushu_flag==0)	
							{
							  $abc="<a href=# onclick='return first_shunxu_process("."1,".$w.",".$juan_id_int.");'>"."<font size=-1>单选第".$w."套</font>有".$yu_ti_num."题</a>"." ";
							}
							else
							{
							  $abc="<a href=# onclick='return first_shunxu_process("."1,".$w.",".$juan_id_int.");'>"."<font size=-1>单选第".$w."套</font>有".$exam_page."题</a>"." ";	
							}
						}
					   
						echo "<td>".$abc."</td>";
						
						
					}
		            echo "</tr>";
				
			}
   			echo "</table>"; 
			    
       ?>
       
       </td>
      </tr>
      <?php } ?>
      <?php  if  ($d_num>=1) { ?>
      <tr>
        <td height="16" colspan="3"><?php echo $d_str ?></td>
      </tr>
      <tr>
        <td height="33" colspan="2">&nbsp;</td>
        <td height="33" valign="top">
		
		<?php 
		
		    $dis_num=5;
			
			$ti_no_yushu_flag=0;
			
			echo "<br>";
		
		    $block_num=floor($d_num/$exam_page); //块数,小数部分舍去------------
			
			$row_num=floor($block_num/$dis_num); //行数以取整舍去的块数为准
			
			$yu_ti_num=$d_num % $exam_page;   //余下的题数
			
			if ($yu_ti_num!=0)    //如果有余数，则多一个块
			{
				$block_num=$block_num+1;
			}
			else
			{
				$ti_no_yushu_flag=1;   //如果无余数，则计算出来的块数，就是整数
			}
			
			$col_num=$block_num % $dis_num ;   //余下的列数
			
			if  (($col_num==0) and ($d_num!=0))
			{
				$col_num=5;
			}
			
			echo "<table border=1  cellspacing=0 cellpadding=2  bordercolorlight=#cccccc bordercolordark=#ffffff>  ";
   
    		$flag=0;
	
			$w=0;
	
			for ($f=1;$f<=$row_num;$f++)
			{
					echo "<tr>";
					for($g=1;$g<=$dis_num;$g++)
					{
						
						$w++;
						$abc="<a  href=# onclick='return first_shunxu_process("."2,".$w.",".$juan_id_int.");'>"."<font size=-1>多选第".$w."套</font>有".$exam_page."题</a>"." ";
						echo "<td>".$abc."</td>";
						
					}
		            echo "</tr>";
					
		
			}
			
			{
				  	echo "<tr>";
					for($g=1;$g<=$col_num;$g++)
					{
						$w++;
						
						if ($g<$col_num)
						{						
						$abc="<a href=# onclick='return first_shunxu_process("."2,".$w.",".$juan_id_int.");'>"."<font size=-1>多选第".$w."套</font>有".$exam_page."题</a>"." ";
						}
						else   //最后一个快
						{
						
							if ($ti_no_yushu_flag==0)	
							{
							  $abc="<a href=# onclick='return first_shunxu_process("."2,".$w.",".$juan_id_int.");'>"."<font size=-1>多选第".$w."套</font>有".$yu_ti_num."题</a>"." ";
							}
							else
							{
							  $abc="<a href=# onclick='return first_shunxu_process("."2,".$w.",".$juan_id_int.");'>"."<font size=-1>多选第".$w."套</font>有".$exam_page."题</a>"." ";	
							}
							
						}
					 
						echo "<td>".$abc."</td>";
					  
					}
		            echo "</tr>";
				
			}
			
			
   			echo "</table>";     
       ?>
       </td>
      </tr>
      <?php } ?>
      
      <?php  if  ($t_num>=1) { ?>
      <tr>
        <td height="16" colspan="3"><?php echo $t_str ?></td>
      </tr>
      <tr>
        <td height="32" colspan="2">&nbsp;</td>
        <td height="32" valign="top">
		
		<?php 
		
		    $dis_num=5;
			
			$ti_no_yushu_flag=0;
			
			echo "<br>";
		
		    $block_num=floor($t_num/$exam_page); //块数,小数部分舍去------------
			
			$row_num=floor($block_num/$dis_num); //行数以取整舍去的块数为准
			
			$yu_ti_num=$t_num % $exam_page;   //余下的题数
			
			if ($yu_ti_num!=0)    //如果有余数，则多一个块
			{
				$block_num=$block_num+1;
			}
			else
			{
				$ti_no_yushu_flag=1;   //如果无余数，则计算出来的块数，就是整数
			}
			
			$col_num=$block_num % $dis_num ;   //余下的列数
			
			if  (($col_num==0) and ($t_num!=0))
			{
				$col_num=5;
			}
			
			echo "<table border=1  cellspacing=0 cellpadding=2  bordercolorlight=#cccccc bordercolordark=#ffffff>  ";
   
    		$flag=0;
	
			$w=0;
	
			for ($f=1;$f<=$row_num;$f++)
			{
					echo "<tr>";
					for($g=1;$g<=$dis_num;$g++)
					{
						
						$w++;
						$abc="<a  href=# onclick='return first_shunxu_process("."3,".$w.",".$juan_id_int.");'>"."<font size=-1>填空第".$w."套</font>有".$exam_page."题</a>"." ";
						echo "<td>".$abc."</td>";
						
					}
		            echo "</tr>";
					
		
			}
			
			{
				  	echo "<tr>";
					for($g=1;$g<=$col_num;$g++)
					{
						$w++;
						
						if ($g<$col_num)
						{						
						$abc="<a href=# onclick='return first_shunxu_process("."3,".$w.",".$juan_id_int.");'>"."<font size=-1>填空第".$w."套</font>有".$exam_page."题</a>"." ";
						}
						
						else   //最后一个快
						{
						
							if ($ti_no_yushu_flag==0)	
							{
							  $abc="<a href=# onclick='return first_shunxu_process("."3,".$w.",".$juan_id_int.");'>"."<font size=-1>填空第".$w."套</font>有".$yu_ti_num."题</a>"." ";
							}
							else
							{
							  $abc="<a href=# onclick='return first_shunxu_process("."3,".$w.",".$juan_id_int.");'>"."<font size=-1>填空第".$w."套</font>有".$exam_page."题</a>"." ";	
							}
						}
					   
					   	
						echo "<td>".$abc."</td>";
					   
						
					}
		            echo "</tr>";
				
			}
			
			
   			echo "</table>";     
       ?></td>
      </tr>
      <?php } ?>
      
      
      <?php  if  ($p_num>=1) { ?>
      <tr>
        <td height="16" colspan="3"><?php echo $p_str ?></td>
      </tr>
      <tr>
        <td height="30" colspan="2">&nbsp;</td>
        <td height="30" valign="top">
		
		<?php 
		
		    $dis_num=5;
			
			$ti_no_yushu_flag=0;
			
			echo "<br>";
		
		    $block_num=floor($p_num/$exam_page); //块数,小数部分舍去----------
			
			$row_num=floor($block_num/$dis_num); //行数以取整舍去的块数为准
			
			$yu_ti_num=$p_num % $exam_page;   //余下的题数
			
			if ($yu_ti_num!=0)    //如果有余数，则多一个块
			{
				$block_num=$block_num+1;
				
			}
			else
			{
				$ti_no_yushu_flag=1;   //如果无余数，则计算出来的块数，就是整数
			}
			
			$col_num=$block_num % $dis_num ;   //余下的整数列数
			
		    if  (($col_num==0) and ($p_num!=0))
			{
				$col_num=5;
			}
			
			
			echo "<table border=1  cellspacing=0 cellpadding=2  bordercolorlight=#cccccc bordercolordark=#ffffff>  ";
   
    		$flag=0;
	
			$w=0;
	
			for ($f=1;$f<=$row_num;$f++)
			{
					echo "<tr>";
					for($g=1;$g<=$dis_num;$g++)
					{
						
						$w++;
						$abc="<a  href=# onclick='return first_shunxu_process("."4,".$w.",".$juan_id_int.");'>"."<font size=-1>判断第".$w."套</font>有".$exam_page."题</a>"." ";
						echo "<td>".$abc."</td>";
						
					}
		            echo "</tr>";
					
		
			}
			
			{
				  	echo "<tr>";
					for($g=1;$g<=$col_num;$g++)
					{
						$w++;
						
						if ($g<$col_num)
						{						
						$abc="<a href=# onclick='return first_shunxu_process("."4,".$w.",".$juan_id_int.");'>"."<font size=-1>判断第".$w."套</font>有".$exam_page."题</a>"." ";
						}
						
						else   //最后一个快
						{
						
							if ($ti_no_yushu_flag==0)	
							{
							  $abc="<a href=# onclick='return first_shunxu_process("."4,".$w.",".$juan_id_int.");'>"."<font size=-1>判断第".$w."套</font>有".$yu_ti_num."题</a>"." ";
							}
							else
							{
							  $abc="<a href=# onclick='return first_shunxu_process("."4,".$w.",".$juan_id_int.");'>"."<font size=-1>判断第".$w."套</font>有".$exam_page."题</a>"." ";	
							}
						}
						
						echo "<td>".$abc."</td>";
						
					}
					
		            echo "</tr>";
				
			}
			
			
   			echo "</table>";     
       ?></td>
      </tr>
      <?php }  ?>
      
      <?php  if  ($lunshu_num>=1) { ?>
      <tr>
        <td height="16" colspan="3"><?php echo $lunshu_str ?></td>
      </tr>
      <tr>
        <td height="29" colspan="2">&nbsp;</td>
        <td height="29">
		
		<?php 
		
		    $dis_num=5;
			
			$ti_no_yushu_flag=0;
			
			echo "<br>";
		
		    $block_num=floor($lunshu_num/$exam_page); //块数,小数部分舍去------------
			
			$row_num=floor($block_num/$dis_num); //行数以取整舍去的块数为准
			
			$yu_ti_num=$lunshu_num % $exam_page;   //余下的题数
			
			if ($yu_ti_num!=0)    //如果有余数，则多一个块
			{
				$block_num=$block_num+1;
			}
			else
			{
				$ti_no_yushu_flag=1;   //如果无余数，则计算出来的块数，就是整数
			}
			
			$col_num=$block_num % $dis_num ;   //余下的列数
			
			if  (($col_num==0) and ($lunshu_num!=0))
			{
				$col_num=5;
			}
			
			echo "<table border=1  cellspacing=0 cellpadding=2  bordercolorlight=#cccccc bordercolordark=#ffffff>  ";
   
    		$flag=0;
	
			$w=0;
	
			for ($f=1;$f<=$row_num;$f++)
			{
					echo "<tr>";
					for($g=1;$g<=$dis_num;$g++)
					{
						
						$w++;
						$abc="<a  href=# onclick='return first_shunxu_process("."5,".$w.",".$juan_id_int.");'>"."<font size=-1>论述题".$w."套</font>有".$exam_page."题</a>"." ";
						echo "<td>".$abc."</td>";
						
					}
		            echo "</tr>";
					
		
			}
			
			{
				  	echo "<tr>";
					
					for($g=1;$g<=$col_num;$g++)
					{
						$w++;
						
						if ($g<$col_num)
						{		
										
						$abc="<a href=# onclick='return first_shunxu_process("."5,".$w.",".$juan_id_int.");'>"."<font size=-1>论述第".$w."套</font>有".$exam_page."题</a>"." ";
						
						}
						else   //最后一个快
						{
						
							if ($ti_no_yushu_flag==0)	
							{
							  $abc="<a href=# onclick='return first_shunxu_process("."5,".$w.",".$juan_id_int.");'>"."<font size=-1>论述第".$w."套</font>有".$yu_ti_num."题</a>"." ";
							}
							else
							{
							  $abc="<a href=# onclick='return first_shunxu_process("."5,".$w.",".$juan_id_int.");'>"."<font size=-1>论述第".$w."套</font>有".$exam_page."题</a>"." ";	
							}
						}
						
						 echo "<td>".$abc."</td>";
						
					}
					
		            echo "</tr>";
				
			}
			
			
   			echo "</table>"; 
			    
       ?>
       </td>
      </tr>
      
      <?php } ?>
      
    </table>
    <table width="98%" border="00" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="33">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
