Пример #1
0
            if (mysql_affected_rows($link2db) == 0) {
                $myid = mysql_query("INSERT INTO {$tbl_current} (tfodesc,tfostatus,tfoindicator,taxfeetype,datecreated,defamt,or_print,counter) VALUES ('{$nitfodescription}','A','{$itfoindicator}','{$itfotype}',Now(),{$defamt},'{$ilangtaon}','{$nubert}')", $link2db) or die(mysql_error());
                if ($myid == TRUE) {
                    $validateID = 0;
                    include 'validate-inc.php';
                    // setURLRedirect("index.php?tfoid=5&action_=3&class_type=Preference&pref_type=Business&actionID=1&part=4&class_type=Preference&selMode=ebpls_nbusiness&tfoaction=Edit&reftype=tfo&updatetfo=true&nitfodescription=$nitfodescription&nitfoindicator=$nitfoindicator&defamt=$defamt&itfotype=$itfotype");
                } else {
                    $validateID = 1;
                    include 'validate-inc.php';
                }
            } elseif (mysql_affected_rows($link2db) == 1) {
                if ($tfoaction == 'Edit') {
                    $DBupdatetfo = mysql_query("UPDATE {$tbl_current} SET tfodesc='{$nitfodescription}', tfoindicator='{$itfoindicator}', taxfeetype='{$itfotype}', defamt={$defamt}, or_print='{$ilangtaon}', counter='{$ubert}' WHERE tfoid = '{$tfoid}' ", $link2db);
                    $action_ = 5;
                    $validateID = 5;
                    setURLRedirect("index.php?tfoid=5&action_=3&class_type=Preference&pref_type=Business&actionID=1&part=4&class_type=Preference&selMode=ebpls_nbusiness&tfoaction=Edit&reftype=tfo&updatetfo=true&nitfodescription={$nitfodescription}&nitfoindicator={$nitfoindicator}&defamt={$defamt}&itfotype={$itfotype}&tfoid={$tfoid}");
                } else {
                    $validateID = 6;
                }
            }
        }
    } else {
        $validateID = 2;
        include 'validate-inc.php';
    }
}
/***********/
if (isset($ISubmitTax)) {
    $counterTaxFeeID = mysql_query("Select DISTINCT taxfeeid FROM ebpls_buss_taxfeeother order\nby taxfeeid DESC", $link2db);
    $rowCounter = mysql_num_rows($counterTaxFeeID);
    if ($rowCounter == 0) {
Пример #2
0
 if ($busItem == 'CTC') {
     if ($business_main_offc_name != '') {
         $addmain = new MainBranch();
         $InsValues = "'','{$business_main_offc_name}','{$business_main_offc_lot_no}',\n                                        '{$business_main_offc_street_no}',\n                                        '{$business_main_offc_barangay_name}',\n                                        '{$business_main_offc_barangay_code}',\n                                        '{$business_main_offc_zone_code}',\n                                        '{$business_main_offc_district_code}',\n                                        '{$business_main_offc_city_code}',\n                                        '{$business_main_offc_zip_code}',\n                                        '{$business_main_offc_tin_no}',\n\t\t\t\t\t'{$business_phone_no}','{$main_office_prov}'";
         $addmain->InsertMainBranch($InsValues);
         $branch_id = $addmain->outid;
     }
     $addbus = new BusinessEstablishment();
     $InsValues = "'', '{$business_name}', '{$business_branch}',\n                                '{$business_scale}', '{$business_lot_no}',\n                                '{$business_street}', '{$business_barangay_code}',\n                                '{$business_zone_code}','{$business_district_code}',\n                                '{$business_city_code}','{$business_province_code}',\n                                '{$business_zip_code}','{$business_contact_no}',\n                                '{$business_fax_no} ','{$business_email_address}',\n                                '{$business_location_desc}',\n                                '{$business_building_name}','{$business_phone_no}',\n                                '{$business_category_code}','{$business_dot_acr_no}',\n                                '{$business_sec_reg_no}','{$business_tin_reg_no}',\n                                '{$business_dti_reg_no}','{$business_dti_reg_date}',\n                                '{$business_date_established}','{$business_start_date}',\n                                '{$business_occupancy_code}','{$business_offc_code}',\n                                '{$employees_M}','{$business_no_del_vehicles}',\n                                '{$business_payment_mode}','{$business_nso_assigned_no}',\n                                '{$business_nso_estab_id}','{$business_industry_sector_code}',\n                                '{$business_remarks}', now(),'{$usern}',now(),\n                                '{$employees_F}', '{$blacit}', \n                                '{$biztype}','{$subsi}','{$pcname}','{$pcaddress}',\n                                '{$regname}', '{$paidemp}', '{$ecoorg}', '{$ecoarea}','{$branch_id}','','0','',''";
     $addbus->InsertNewBusiness($InsValues);
     $business_id = $addbus->outid;
     $pylename = $business_id . ".jpg";
     if ($fupload_name != '') {
         copy($fupload, "images/{$pylename}") or die("Couldn't copy");
     }
     setURLRedirect("index.php?part=4&itemID_=1002&busItem=CTC&permit_type=CTC&ctc_type=BUSINESS&item_id=CTC&business_id={$business_id}");
 } else {
     if ($addbiz == 'Save') {
         if ($business_main_offc_name != '') {
             $addmain = new MainBranch();
             $InsValues = "'','{$business_main_offc_name}',\n\t\t\t\t\t'{$business_main_offc_lot_no}',\n        \t                        '{$business_main_offc_street_no}',\n                \t                '{$business_main_offc_barangay_name}',\n                        \t        '{$business_main_offc_barangay_code}',\n                                \t'{$business_main_offc_zone_code}',\n\t                                '{$business_main_offc_district_code}',\n        \t\t                '{$business_main_offc_city_code}',\n                        \t        '{$business_main_offc_zip_code}',\n\t\t\t\t\t'{$business_main_offc_tin_no}',\n\t\t\t\t\t'{$business_phone_no}','{$main_office_prov}'";
             $addmain->InsertMainBranch($InsValues);
             $branch_id = $addmain->outid;
         }
         $addbus = new BusinessEstablishment();
         $InsValues = "{$owner_id}, '{$business_name}', '{$business_branch}', \n\t\t\t\t'{$business_scale}', '{$business_lot_no}',\n\t\t                '{$business_street}', '{$business_barangay_code}',\n\t\t\t\t'{$business_zone_code}','{$business_district_code}',\n\t\t\t\t'{$business_city_code}','{$business_province_code}',\n\t\t\t\t'{$business_zip_code}','{$business_contact_no}',\n\t\t                '{$business_fax_no} ','{$business_email_address}',\n\t\t\t\t'{$business_location_desc}',\n\t\t                '{$business_building_name}','{$business_phone_no}',\n\t\t\t\t'{$business_category_code}','{$business_dot_acr_no}',\n\t\t\t\t'{$business_sec_reg_no}','{$business_tin_reg_no}',\n\t\t                '{$business_dti_reg_no}','{$business_dti_reg_date}',\n                \t\t'{$business_date_established}','{$business_start_date}',\n\t\t\t\t'{$business_occupancy_code}','{$business_offc_code}',\n                \t\t {$employees_M},'{$business_no_del_vehicles}',\n\t\t\t\t'{$business_payment_mode}','{$business_nso_assigned_no}',\n\t\t\t\t'{$business_nso_estab_id}','{$business_industry_sector_code}',\n\t\t\t\t'{$business_remarks}', now(),'{$usern}',now(),\n\t\t\t\t'{$employees_F}', '{$blacit}', \n\t\t\t\t'{$biztype}','{$subsi}','{$pcname}','{$pcaddress}',\n\t\t\t\t'{$regname}', '{$paidemp}', '{$ecoorg}', '{$ecoarea}','{$branch_id}','','0','',''";
         $addbus->InsertNewBusiness($InsValues);
         $business_id = $addbus->outid;
         $pylename = $business_id . ".jpg";
         if ($fupload_name != '') {
             copy($fupload, "images/{$pylename}") or die("Couldn't copy");