示例#1
0
    } 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];
    $iBLGFCode = $nResult[blgf_code];
    $iZone = $nResult[g_zone];
    if ($iZone == "1") {
        $iCheck = "checked";
    } else {
        $iCheck = "";
    }
    $nDistrict = new EBPLSDistrict($dbLink, 'false');
    $nDistrict->search($nResult[upper], NULL);
    $iResult = $nDistrict->out;
    $iDistrict = $iResult[district_code];
}
include 'html/eBPLS_barangay.html';
示例#2
0
    }
} elseif ($confx == 1) {
    $check1 = mysql_query("select * from ebpls_owner where owner_district_code = '{$bbo}'");
    $check1 = mysql_num_rows($check1);
    $check2 = mysql_query("select * from ebpls_business_enterprise where business_district_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 {
        $nDistrict = new EBPLSDistrict($dbLink, 'false');
        $nDistrict->delete($bbo);
        $bbo = "";
        ?>
		<body onload='javascript:alert ("Record Deleted!!");'></body>
		<?php 
    }
}
if ($com == "edit") {
    $nDistrict = new EBPLSDistrict($dbLink, 'false');
    $nDistrict->search($bbo, NULL);
    $nResult = $nDistrict->out;
    $iDistrict = $nResult[district_desc];
    $iBLGFCode = $nResult[blgf_code];
    $nLGU = new EBPLSLGU($dbLink, 'false');
    $nLGU->search($nResult[upper], NULL);
    $iResult = $nLGU->out;
    $iLGU = $iResult[city_municipality_code];
}
include 'html/eBPLS_district.html';