Ejemplo n.º 1
0
    $is_desc = 'DESC';
}
if ($is_desc == 'DESC') {
    $is_desc = 'ASC';
} else {
    $is_desc = 'DESC';
}
$is_asc = $is_desc;
if ($pagemulti == '') {
    $pagemulti = 1;
}
//echo $is_desc."VooDoo";
if (!isset($orderkey) or $orderkey == "") {
    $orderkey = "province_code";
}
$nresult = new EBPLSProvince($dbLink, 'false');
$nresult->pagesearch($fromr, $max_resultsr, $orderkey, $is_desc);
$fetarray = $nresult->rcount;
$total_sr = @mysql_fetch_row($fetarray);
$total_resultsr = $total_sr[0];
$fetchrecord = $nresult->out;
// Figure out the total number of pages. Always round up using ceil()
$total_pagesr = ceil($total_resultsr / $max_resultsr);
//echo $total_resultsr."VooDoo";
echo "<table border=0 width=100%><tr><td align=left><br />";
if ($pager == "" || $pager == '0') {
    $pager = 1;
}
if ($pager > 1) {
    $prevr = $pager - 1;
    echo "<a href='index.php?part=4&class_type=Preference&selMode=ebpls_nProvince&page=1&orderkey={$orderkey}&is_asc={$is_asc}'>&lt;&lt;&nbsp;";
Ejemplo n.º 2
0
    $check2 = mysql_query("select * from ebpls_business_enterprise where business_city_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 {
        $nLGU = new EBPLSLGU($dbLink, 'false');
        $nLGU->delete($bbo);
        $bbo = "";
        ?>
		<body onload='javascript:alert ("Record Deleted!!");'></body>
		<?php 
    }
}
$dblink = isset($dblink) ? $dblink : '';
//2008.05.12
if ($com == "edit") {
    $nLGU = new EBPLSLGU($dbLink, 'false');
    $nLGU->search($bbo, NULL);
    $nResult = $nLGU->out;
    $iLGUCode = $nResult[city_municipality_code];
    $iLGUDescription = $nResult[city_municipality_desc];
    $iUpper = $nResult[upper];
    $iBLGFCode = $nResult[blgf_code];
    $nProvince = new EBPLSProvince($dbLink, 'false');
    $nProvince->search($nResult[upper], NULL);
    $iResult = $nProvince->out;
    $iProvince = $iResult[province_code];
}
include 'html/eBPLS_lgu.html';
Ejemplo n.º 3
0
        }
    }
} elseif ($confx == 1) {
    $nAnnounce = new EBPLSAnnouncement($dbLink, 'false');
    $nAnnounce->delete($bbo);
    $bbo = "";
    ?>
	<body onload='javascript:alert ("Record Deleted!!");'></body>
	<?php 
}
if ($com == "edit") {
    $nAnnounce = new EBPLSAnnouncement($dbLink, 'false');
    $nAnnounce->getLgu();
    $nAnnounce->search($bbo, NULL);
    $nResult = $nAnnounce->out;
    $announcements = $nResult[announcements];
    $announced_by = $nResult[announced_by];
    $sms_checked = $nResult[sms_send];
}
$nAnnounce = new EBPLSAnnouncement($dbLink, 'false');
$nAnnounce->getLgu();
$Pref = $nAnnounce->out;
$iProv = $Pref[lguprovince];
$iLgu = $Pref[lguname];
$nProvince = new EBPLSProvince($dbLink, 'false');
$nProvince->search($iProv, NULL);
$getProvince = $nProvince->out[province_desc];
$nLGU = new EBPLSLGU($dbLink, 'false');
$nLGU->search($iLgu, NULL);
$getLGU = $nLGU->out[city_municipality_desc];
include 'html/eBPLS_lotpin.html';
Ejemplo n.º 4
0
            ?>
			<body onload='javascript:alert ("Record Successfully Updated!!");'></body>
			<?php 
        }
    }
} elseif ($confx == 1) {
    $check1 = mysql_query("select * from ebpls_owner where owner_province_code = '{$bbo}'");
    $check1 = mysql_num_rows($check1);
    $check2 = mysql_query("select * from ebpls_business_enterprise where business_province_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 {
        $nProvinceIssued = new EBPLSProvince($dbLink, 'false');
        $nProvinceIssued->delete($bbo);
        $bbo = "";
        ?>
		<body onload='javascript:alert ("Record Deleted!!");'></body>
		<?php 
    }
}
if ($com == 'edit') {
    $nProvince = new EBPLSProvince($dbLink, 'false');
    $nProvince->search($bbo, NULL);
    $nResult = $nProvince->out;
    $iProvince = $nResult[province_desc];
    $iBLGFCode = $nResult[blgf_code];
}
include 'html/eBPLS_province.html';