Exemple #1
0
			<body onload='javascript:alert ("Record Successfully Updated!!");'></body>
			<?php 
        }
    }
} elseif ($confx == 1) {
    $check1 = mysql_query("select * from ebpls_owner where owner_barangay_code = '{$bbo}'");
    $check1 = mysql_num_rows($check1);
    $check2 = mysql_query("select * from ebpls_business_enterprise where business_barangay_code = '{$bbo}'");
    $check2 = mysql_num_rows($check2);
    if ($check1 > 0 || $check2 > 0) {
        ?>
		<body onload='javascript:alert ("Cannot Delete. Record exist in other table(s).");'></body>
		<?php 
    } else {
        $nBarangay = new EBPLSBarangay($dbLink, 'false');
        $nBarangay->delete($bbo);
        $bbo = "";
        $iBarangay = "";
        $iDistrict = "";
        $iBLGFCode = "";
        $iCheck = "";
        ?>
		<body onload='javascript:alert ("Record Deleted!!");'></body>
		<?php 
    }
}
if ($com == "edit") {
    $nBarangay = new EBPLSBarangay($dbLink, 'false');
    $nBarangay->search($bbo, NULL);
    $nResult = $nBarangay->out;
    $iBarangay = $nResult[barangay_desc];