Example #1
0
        $nOwnType = new Ownership();
        $nOwnType->Query1($sQuery);
        $chkRecord = $nOwnType->dbResultOut;
        if ($chkRecord == 0) {
            if ($com != edit) {
                $sQuery = "select * from ebpls_business_category where business_category_code='{$ownership_code}'";
                $nOwnType = new Ownership();
                $nOwnType->Query1($sQuery);
                $chkRecord = $nOwnType->dbResultOut;
                if ($chkRecord == 1) {
                    ?>
					<body onload='javascript:alert ("Existing Code Found!!"); return false;'></body>
					<?php 
                } else {
                    $nValues = "'{$ownership_code}', '{$ownership_type}',now(),now(),'{$usern}', {$exemption}";
                    $nOwnType->InsertQuery('ebpls_business_category', $nValues);
                    $ic = 0;
                    $colls = 0;
                    $getreq = mysql_query("select * from ebpls_buss_tfo\n\t\t\t                  where tfostatus='A' and taxfeetype<>1\n\t\t\t                  or tfodesc like 'Mayor%'") or die("req" . mysql_error());
                    $gt = mysql_num_rows($getreq);
                    while ($ic < $gt) {
                        while ($getr = mysql_fetch_row($getreq)) {
                            $ic++;
                            $check1 = mysql_query("select * from fee_exempt where\n\t\t\t        \t\tbusiness_category_code='{$ownership_code}'\n\t\t\t        \t\tand tfoid={$getr['0']}") or die("c" . mysql_error());
                            $hreq = mysql_num_rows($check1);
                            if ($hreq == 0) {
                                if ($x[$ic] == 'on') {
                                    $s = 1;
                                } else {
                                    $s = 0;
                                }