<a class="btn btn-material-orange" role="button" style="margin-top: 0px" onClick="javascript:window.open('add_child.php?id=<?php echo $id; ?> ', '', 'nenuber=no,toorlbar=no,location=no,scrollbars=no, status=no,resizable=no,width=800,height=650,top=0,left=150 ')">เพิ่มข้อมูลบุตร-ธิดา</a> </div> </center> <?php } } ?> </fieldset> </fieldset> <fieldset class="scheduler-border"> <legend class="scheduler-border"><h4>5) ที่อยู่บรรพบุรุษที่ประเทศจีน</h4></legend> <?php $check_chinahouse = check_chinahouse($person); // echo "check chinahouse : " . $check_chinahouse; if ($check_chinahouse == 0) { ?> <div class="row"> <div class="col-xs-6 col-xs-offset-2"> <h4 class="text-danger">ไม่พบข้อมูล กรุณาเพิ่มข้อมูลบรรพบุรุษที่จีน</h4> </div> <div class="col-xs-4 "> <a class="btn btn-material-orange" role="button" style="margin-top: 0px" onClick="javascript:window.open('add_chinahouse_form.php?id=<?php echo $id; ?> ', '', 'nenuber=no,toorlbar=no,location=no,scrollbars=no, status=no,resizable=no,width=800,height=350,top=150,left=150 ')">เพิ่มข้อมูลที่อยู่บรรพบุรุษที่จีน</a> </div> </div> <?php
$brothers = get_person_brother($person['PARENT_ID'], $person['BROTHER_LIST'], $id); while ($brother = mysql_fetch_assoc($brothers)) { if ($brother['CHINAHOUSE_ID'] != 0) { add_chinahouse($id, $brother['CHINAHOUSE_ID']); echo "<script type='text/javascript'>"; echo "window.location.assign('../view/chinaaddr.php?id={$id}')"; echo "</script>"; } } $index = 1; $gen_id = 0; $loop_id = $parent['ID']; while (1) { $loop_parents = get_person_detial($loop_id); $loop_parent = mysql_fetch_assoc($loop_parents); $chinahouse_id = check_chinahouse($loop_parent); if ($chinahouse_id == 0) { break; } else { if ($chinahouse_id == 1) { $loop_parents = get_person_detial($loop_id); $loop_parent = mysql_fetch_assoc($loop_parents); $loop_id = $loop_parent['PARENT_ID']; } else { add_chinahouse($chinahouse_id, $brother['CHINAHOUSE_ID']); echo "<script type='text/javascript'>"; echo "window.location.assign('../view/chinaaddr.php?id={$id}')"; echo "</script>"; } } }