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 class="col-xs-4">
                                <a class="btn btn-danger" role="button" style="margin-top: 0px" onClick="del_chinahouse('<?php 
    echo $id;
    ?>
', '<?php 
    echo get_person_title_string($person['TITLE_ID']) . ' ' . get_person_name_string($id) . " " . get_person_surname_string($id);
    ?>
')">ลบข้อมูลที่อยู่บรรพบุรุษที่จีน</a>
                            </div>
                        </div>
                        <?php 
    add_chinahouse($id, $check_chinahouse);
}
?>
                </fieldset>
                <fieldset class="scheduler-border">
                    <legend class="scheduler-border"><h4>6) หมายเหตุ</h4></legend>

                    <div class="row">
                        <div class="col-xs-3 col-xs-offset-1">
                            <?php 
echo get_remark($id);
?>
                        </div>
                        <div class="col-xs-4 col-xs-offset-4">
                            <a class="btn btn-material-orange" role="button" style="margin-top: 0px" onClick="javascript:window.open('edit_remark_form.php?id=<?php 
echo $id;
Esempio n. 2
0
                 echo "<script type='text/javascript'>";
                 echo "window.location.assign('../view/chinaaddr.php?id={$id}')";
                 echo "</script>";
             }
         } else {
             $has_parent = false;
             //            $parent_id = 0;
             $brothers = get_person_brother($person['PARENT_ID'], $person['BROTHER_LIST'], $id);
             while ($brother = mysql_fetch_assoc($brothers)) {
                 if ($brother['PARENT_ID'] != 0) {
                     $has_parent = true;
                     //                    $parent_id = $brother['PARENT_ID'];
                     add_parent_id($id, $brother['PARENT_ID']);
                 }
                 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>";
                 }
             }
             if ($has_parent) {
                 header("Location:'checkparent.php?id={$id}&type={$check}'");
             } else {
                 echo "<script type='text/javascript'>";
                 echo '$(document).ready(function() {' . 'swal({title: "ข้อมูลไม่เพียงพอ บิดาไม่ได้ระบุที่อยู่บรรพบุรุษที่ประเทศจีน",' . 'type: "warning",' . 'showCancelButton: true,' . 'confirmButtonColor: "#DD6B55",' . 'confirmButtonText: "เพื่มข้อมูลที่อยู่บรรพบุรุษที่ประเทศจีนด้วยมือ",' . 'closeOnConfirm: false, closeOnCancel: false},' . 'function(isConfirm) {' . 'if (isConfirm) {' . 'window.location.assign("../view/add_chinahouse.php?id=' . $id . '&gen_id=");' . '}else {window.location.assign("../view/ancestorsaddr.php");}' . '});});';
                 echo "</script>";
             }
         }
     }
 }