<?
$i=0;
$wr_2="";
$query5 = "select * from g4_write_payitem where wr_subject ='$wr_1'; ";
$result5 = sql_query($query5);
while($row  = sql_fetch_array($result5)) {
	
	$item0 = $row[wr_1]; //
	$item1 = $row[wr_2]; //
	$item2 = $row[wr_3]; //
	$item3 = $row[wr_4]; //
	$item4 = $row[wr_5]; //
	$item5 = $row[wr_6]; //
	$item6 = $row[wr_7]; //
	$item7 = $row[wr_8]; //
	$item8 = $row[wr_9]; //
	$item9 = $row[wr_10]; //
	$item10 = $row[wr_link1]; //


	$i++;
}
$item_array = array("housing","medical","pension","absent","not absent","food","Extra","holiday","tax","bonus","etc");
	$wr_2 = "basic";
		$wr_4 = "basic";
	$m=0;
	for($i=0; $i < 11; $i++) {
		$m++;
		if(${"paysimbol".$i} != "No") {  $wr_2 .= ${"paysimbol".$i}.${"item".$i}; $wr_3 .= "use_".$m.",";$wr_4 .= ${"paysimbol".$i}.$item_array[$i];}

	}
$table = "g4_write_".$bo_table;
	sql_query(" update $table set wr_2 = '$wr_2',wr_3 = '$wr_3',wr_4 = '$wr_4'  where wr_id = '$wr_id' ");

?>

