<?php
   $points=$str=$idt=$cpt=$strt="";
   $points=leftjoin('si',"a.*,b.*",'tbTestedID','tbSN','tbReportNo',$rep,'tested','items','a.tbPosition');
if($points!='')
{
		   foreach($points as $value)
		   {
		   		if(strpos($value['tbTestedID'],","))
				{
				  	$idt=explode(',',$value['tbTestedID']);
				  	foreach($idt as $v)
				   	{
				   	$cpt=get_row('si','tbCheckPoint','tbSN',$v,'items');
				   	$strt .=$cpt['tbCheckPoint']."/";
				   	}
				   	$strt="Function testing(" . rtrim($strt,"/") . ")";
		   		}else{
				 $strt=$value['tbCheckPoint'];
				}
		   $str .= "<div class='c_line'><li style='width:30px; padding:3px 0 3px 0;'>".$value['tbPosition'].": </li><li style='width:360px;'>&nbsp;" . $strt . "&nbsp;</li><li style='width:50px;'>&nbsp;" . $value['tbQty'] . "&nbsp;</li><li style='width:80px;'>&nbsp;" . $value['tbResult'] . "&nbsp;</li><li style='width:380px;'>&nbsp;" . $value['tbSpec'] . "&nbsp;</li><li style='width:120px;'>&nbsp;</li><li style='width:80px; margin-left:20px;'><a onclick='editpoint(\"".$pre."\",\"".$value['tbTN']."\",\"".$value['tbReportNo']."\",\"".$value['tbPosition']."\");' title='Edit(编辑)' style='cursor:pointer;'><img src='pics/edit.png' /></a> <a onclick='delpoint(\"".$pre."\",\"".$value['tbTN']."\",\"".$value['tbReportNo']."\");' title='Remove(删除)' style='cursor:pointer;'><img src='pics/remove.png' /></a></li></div>";
		   }
}
?>