PageRenderTime 155ms CodeModel.GetById 24ms RepoModel.GetById 4ms app.codeStats 0ms

/includes/bodycontent-inc.php

http://ebpls.googlecode.com/
PHP | 443 lines | 398 code | 30 blank | 15 comment | 22 complexity | b50ba4c5cdf605d51d63c4bf3e3ef334 MD5 | raw file
  1. <?php
  2. /*Modification History:
  3. 2008.04.25: Change constants to strings to remove PHP errors in log lines 99+ line 461??
  4. */
  5. require_once("lib/ebpls.lib.php");
  6. //require_once("lib/ebpls.utils.php");
  7. //require_once("ebpls-php-lib/utils/ebpls.search.funcs.php");
  8. //--- get connection from DB
  9. //$dbLink = get_db_connection();
  10. global $ThUserData;
  11. require_once "includes/variables.php";
  12. require_once "class/BusinessEstablishmentClass.php";
  13. include_once "class/PermitClass.php";
  14. if ($permit_type=="Business" and $stat=='New') {
  15. if ($business_id<>'' and $owner_id<>'') {
  16. $spermit = new NewPermit;
  17. $spermit->GetBusinessPermit($owner_id, $business_id, $permittable);
  18. // $spermit->outnumrow;
  19. if ($spermit->outnumrow==0) {
  20. $sValues = "$business_id, $owner_id,'$currdate[year]',
  21. now(), '$usern', 'New', 0, 'For Assessment',
  22. '$genpin', 1";
  23. $ipermit = new NewPermit;
  24. $ipermit->InsertBusinessPermit($sValues,$permittable);
  25. }
  26. }
  27. } elseif ($permit_type=="Business" and $stat=='New') {
  28. if ($business_id<>'' and $owner_id<>'') {
  29. $spermit = new NewPermit;
  30. $spermit->GetBusinessPermit($owner_id, $business_id, $permittable);
  31. // $spermit->outnumrow;
  32. if ($spermit->outnumrow==0) {
  33. $sValues = "$business_id, $owner_id,'$currdate[year]',
  34. now(), '$usern', 'ReNew', 0, 'For Assessment',
  35. '$genpin', 1";
  36. $ipermit = new NewPermit;
  37. $ipermit->InsertBusinessPermit($sValues,$permittable);
  38. }
  39. }
  40. }
  41. //include 'javascripts/javafuncs.js';
  42. ?>
  43. <table border=0 width=100% cellspacing=0 cellpadding=0>
  44. <script language='Javascript' src='includes/datepick/datetimepicker.js'></script>
  45. <script language='Javascript' src='javascripts/javafuncs.js'></script>
  46. <tr>
  47. <td align=center>
  48. <?php
  49. if (isset($Search) && $Search=='SEARCH') {
  50. require 'includes/variables.php';
  51. $itemID_=$search_businesstype;
  52. if ($search_businesstype==1221) {
  53. require "includes/business_search.php";
  54. } elseif ($search_businesstype==4212 and $permit_type=='Business') {
  55. require "includes/assessment_search.php";
  56. } elseif ($search_businesstype==5212 and $permit_type=='Business') {
  57. require "includes/approve_search.php";
  58. } elseif ($search_businesstype==2212) {
  59. require "includes/payment_search.php";
  60. } elseif ($search_businesstype==3212) {
  61. require "includes/release_search.php";
  62. }
  63. }
  64. if (!empty($itxt_Search)){
  65. ?>
  66. <table width=100%>
  67. <?php
  68. include'lib/phpFunctions-inc.php';
  69. ?>
  70. <tr>
  71. <td colspan=6><?php echo MODTITLESTYLE1;?> Search Result(s): <?php echo MODTITLESTYLE2; ?></td></td>
  72. </tr>
  73. <tr bgcolor="#EEEEEE">
  74. <td width=5%>No.</td>
  75. <td width=25% align=left>Name of Owner</td>
  76. <td width=25% align=left>Name of Business</td>
  77. <td width=15% align=center>Type</td>
  78. <td width=10% align=center>Status</td>
  79. <td width=15% align=center>Action</td>
  80. </tr>
  81. </table>
  82. <?php
  83. }
  84. else {
  85. ?>
  86. <?php
  87. $selMode = isset($selMode)?$selMode:"";
  88. $settings_type = isset($settings_type) ? $settings_type : '';
  89. if (isset($sMode) && $sMode=='bus_nature') {
  90. include'bus_nature.php';
  91. // include'ebpls5502.php';
  92. }
  93. elseif ($selMode=='FAQS') {
  94. include 'faq/faq.php';
  95. $permit_type='1';
  96. }
  97. elseif ($class_type=='Permits' and $selMode=="Permits") {
  98. include 'html/Permits.html';
  99. $permit_type='1';
  100. }
  101. elseif ($class_type=='Preference' and $selMode=="Reference") {
  102. include 'html/Ref.html';
  103. $permit_type='1';
  104. }
  105. elseif ($busItem=="Settings" and $item_id=="Settings" and $settings_type=="") {
  106. include 'html/Sys.html';
  107. $permit_type='1';
  108. }
  109. elseif ($selMode=='ebpls_faq'){
  110. include'faq/faq_admin.php';
  111. $permit_type=1;
  112. }
  113. elseif ($selMode=='links'){
  114. include'links.php';
  115. $permit_type=1;
  116. }
  117. elseif ($selMode=='ebpls_afiss'){
  118. include'af_iss.php';
  119. $permit_type=1;
  120. }
  121. elseif ($selMode=='ebpls_link'){
  122. include'link_admin.php';
  123. $permit_type=1;
  124. }
  125. elseif ($selMode=='ebpls_nbusiness'){
  126. include'ebpls5502.php';
  127. }
  128. elseif ($selMode=='ebpls_nRequirements'){
  129. include'eBPLS_requirements.php';
  130. }
  131. elseif ($selMode=='ebpls_nTFO'){
  132. include'eBPLS_tfo.php';
  133. }
  134. elseif ($selMode=='ebpls_npreferences'){
  135. include'ebpls6601.php';
  136. }
  137. elseif ($selMode=='ebpls_npenalty'){
  138. include'ebpls7701.php';
  139. }
  140. elseif ($selMode=='ebpls_nmotorpenalty'){
  141. include'eBPLS_motorized_penalty.php';
  142. }
  143. elseif ($selMode=='ebpls_nfishpenalty'){
  144. include'eBPLS_fishery_penalty.php';
  145. }
  146. elseif ($selMode=='ebpls_noccpenalty'){
  147. include'eBPLS_occupational_penalty.php';
  148. }
  149. elseif ($selMode=='ebpls_ntemplate'){
  150. include'ebpls8801.php';
  151. }
  152. elseif ($selMode=='ebpls_npsic'){
  153. include'ebpls9901.php';
  154. }
  155. elseif ($selMode=='ebpls_nsign'){
  156. include'eBPLS_signatories.php';
  157. }
  158. elseif ($selMode=='ebpls_nreportsign'){
  159. include'eBPLS_signtemp.php';
  160. }
  161. elseif ($selMode=='ebpls_notherfees'){
  162. include'ebpls1219.php';
  163. }
  164. elseif ($selMode=='ebpls_nchart'){
  165. include'chart.php';
  166. }
  167. elseif ($selMode=='ebpls_nboatfees'){
  168. include'ebpls7111.php';
  169. }
  170. elseif ($selMode=='ebpls_nfishcfees'){
  171. include'ebpls7112.php';
  172. }
  173. elseif ($selMode=='ebpls_nctc'){
  174. include'eBPLS_ctcsettings.php';
  175. }
  176. elseif ($selMode=='ebpls_npermitform'){
  177. include'eBPLS_permit_format.php';
  178. }
  179. elseif ($selMode=='ebpls_nlotpin'){
  180. include'lotpin.php';
  181. }
  182. elseif ($selMode=='ebpls_nannouncement'){
  183. include'eBPLS_announcement.php';
  184. }
  185. elseif ($selMode=='ebpls_ncitizenship'){
  186. include'eBPLS_citizenship.php';
  187. }
  188. elseif ($selMode=='ebpls_nenginetype'){
  189. include'eBPLS_engine_type.php';
  190. }
  191. elseif ($selMode=='ebpls_nfishact'){
  192. include'eBPLS_fish.php';
  193. }
  194. elseif ($selMode=='ebpls_neconomic_area'){
  195. include'eBPLS_Economic_Area.php';
  196. }
  197. elseif ($selMode=='ebpls_neconomic_org'){
  198. $nTitle = 'Economic Organization';
  199. $nTable = 'ebpls_economic_org';
  200. $nField0 = 'economic_org_id';
  201. $nField1 = 'economic_org_code';
  202. $nField2 = 'economic_org_desc';
  203. include'eBPLS_economic_organization.php';
  204. }
  205. elseif ($selMode=='ebpls_nbarangay'){
  206. $prefm = 'Barangay';
  207. $preft = 'ebpls_barangay';
  208. $prefc = 'barangay_code';
  209. $prefd = 'barangay_desc';
  210. $prefdc = 'district_code';
  211. $prefut = 'District';
  212. $prefu = 'ebpls_district';
  213. include 'eBPLS_barangay.php';
  214. }
  215. elseif ($selMode=='ebpls_nzone'){
  216. $prefm = 'Zone';
  217. $preft = 'ebpls_zone';
  218. $prefc = 'zone_code';
  219. $prefd = 'zone_desc';
  220. $prefdc = 'barangay_code';
  221. $prefut = 'Barangay';
  222. $prefu = 'ebpls_barangay';
  223. include'eBPLS_zone.php';
  224. }
  225. elseif ($selMode=='ebpls_nzip'){
  226. $prefm = 'Zip';
  227. $preft = 'ebpls_zip';
  228. $prefc = 'zip_code';
  229. $prefd = 'zip_desc';
  230. $prefdc = 'city_municipality_code';
  231. $prefut = 'LGU';
  232. $prefu = 'ebpls_city_municipality';
  233. include'eBPLS_zip.php';
  234. }
  235. elseif ($selMode=='ebpls_ndistrict'){
  236. $prefm = 'District';
  237. $preft = 'ebpls_district';
  238. $prefc = 'district_code';
  239. $prefd = 'district_desc';
  240. $prefdc = 'city_municipality_code';
  241. $prefut = 'LGU';
  242. $prefu = 'ebpls_city_municipality';
  243. include'eBPLS_district.php';
  244. }
  245. elseif ($selMode=='ebpls_nLGU'){
  246. $preft = 'ebpls_city_municipality';
  247. $prefc = 'city_municipality_code';
  248. $prefd = 'city_municipality_desc';
  249. //$prefdc = 'province_desc';
  250. $prefdc = 'province_code';
  251. $prefm = 'LGU';
  252. $prefut = 'Province';
  253. $prefu = 'ebpls_province';
  254. include'eBPLS_lgu.php';
  255. }
  256. elseif ($selMode=='ebpls_nProvince'){
  257. $prefm = 'Province';
  258. $preft = 'ebpls_province';
  259. $prefc = 'province_code';
  260. $prefd = 'province_desc';
  261. include'eBPLS_province.php';
  262. }
  263. elseif ($selMode=='ebpls_nownership'){
  264. include'ownership_type.php';
  265. }
  266. elseif ($selMode=='ebpls_noccupancy'){
  267. include'eBPLS_occupancy_type.php';
  268. }
  269. elseif ($selMode=='ebpls_nindustry'){
  270. include'eBPLS_industry_sector.php';
  271. }
  272. elseif ($selMode=='ebpls_nadmin'){
  273. include'includes/iAdmin-inc.php';
  274. }
  275. else {
  276. if ($permit_type=='') {
  277. ?>
  278. <!--<img src='./images/ebpls_logo.jpg' height=100% width=100%>-->
  279. <?php
  280. }
  281. ?>
  282. <?php
  283. $itemID_ = isset($itemID_)?$itemID_:0;
  284. if ($permit_type=='Business'){
  285. if ($itemID_== 1221){
  286. include'ebpls1221.php';
  287. // include'includes/form_bus_permit.php';
  288. } elseif ($itemID_== 6204) {
  289. include 'delayed_yr.php';
  290. } elseif ($itemID_== 5679) {
  291. include 'delayed_qtr.php';
  292. } elseif ($itemID_ == '0104') {
  293. include 'predcomp.php';
  294. } elseif ($itemID_== 4212){
  295. include'ebpls4212.php';
  296. } elseif ($itemID_== 5212){
  297. include'ebpls5212.php';
  298. } elseif ($itemID_== 2212){
  299. include'ebpls2212.php';
  300. } elseif ($itemID_== 3212){
  301. include'ebpls3212.php';
  302. } elseif ($itemID_== 1222){
  303. // include'ebpls1222.php';
  304. include "includes/form_mtop_owner.php";
  305. } elseif ($itemID_== 1223){
  306. include'ebpls1223.php';
  307. } elseif ($itemID_== 1224){
  308. include'ebpls1224.php';
  309. } else {
  310. include'ebpls1221.php';
  311. }
  312. } elseif ($permit_type<>'Business') {
  313. if ($itemID_== 1221){
  314. include'ebpls1221.php';
  315. // include'includes/form_bus_permit.php';
  316. }
  317. elseif ($itemID_== 2212){
  318. include'ebpls2212.php';
  319. }
  320. elseif ($itemID_== 3212){
  321. include'ebpls3212.php';
  322. }
  323. elseif ($itemID_== 1222){
  324. include "includes/form_mtop_owner.php";
  325. }
  326. elseif ($itemID_== 921){
  327. include'ebpls921.php';
  328. }
  329. elseif ($itemID_==101){
  330. include'ebpls101.php';
  331. }
  332. elseif ($itemID_==1001) {
  333. $owner='ebpls_owner';
  334. include'ebpls1001.php';
  335. }
  336. elseif ($itemID_==1002 || $itemID_=='ctcinsearch1') {
  337. include'ebpls1002.php';
  338. }
  339. elseif ($itemID_==1217){
  340. include'ebpls1217.php';
  341. }
  342. elseif ($itemID_== 1223){
  343. include'ebpls1223.php';
  344. }
  345. elseif ($itemID_==1218) {
  346. include'ebpls1218.php';
  347. }
  348. elseif ($itemID_==4221){
  349. include'ebpls4221.php';
  350. }
  351. elseif ($itemID_=='ctc'){
  352. include'form_ctc_individual_application.php';
  353. }
  354. elseif ($itemID_=='ctcinsearch') {
  355. include'ebpls1001.php';
  356. }
  357. elseif ($itemID_==6){
  358. if (isset($v) and $v==1) {
  359. ?>
  360. <body onload='alert("Record updated successfully");'></body>
  361. <?php
  362. }
  363. include'ebpls006.php';
  364. }
  365. elseif ($itemID_==7){
  366. include'ebpls007.php';
  367. }
  368. elseif ($itemID_==11){
  369. include'ebpls011.php';
  370. }
  371. elseif ($itemID_==21){
  372. include'ebpls021.php';
  373. }
  374. elseif ($itemID_==23){
  375. include'ebpls023.php';
  376. }
  377. elseif ($itemID_<> 1221 and $itemID_<> 2212 and $itemID_<> 3212 and $itemID_<> 1222
  378. and $itemID_<> 921 and $itemID_<>101 and $itemID_<>1217 and $itemID_<>4221
  379. and $itemID_<>'ctc') {
  380. include'ebpls1221.php';
  381. }
  382. } else {
  383. ?>
  384. <table width=100%>
  385. <tr>
  386. <td valign=top width=70% align=left> &nbsp &nbsp &nbsp The <b><i>eBusiness Permit & Licensing System</i></b> ... description description description description description description description description </td>
  387. <td valign=top width=20% align=center><img src="images/image.gif" border=0 width=90 height=75></td>
  388. </tr>
  389. </table>
  390. <!--<div align="CENTER" class="thText">
  391. <font face="ARIAL" size="3"><b>Welcome to eBPLS:</b></font> &nbsp;
  392. <font face="ARIAL" size="4" color="#000066"><b>"<?php echo(strtoupper($ThUserData['username'])); ?>"</b></font> &nbsp;
  393. <font face="ARIAL" size="3" color="#CC0000"><b><i>(<?php echo($thUserLevel[$ThUserData['level']][1]); ?>)</i></b></font>
  394. <br><br>
  395. <img src="images/image.gif" border=0 width="458" height="297"><br>
  396. <br>
  397. <font face="ARIAL" size="2" color="#CC0000"><b>* <i>Please don't forget to LOG OUT when you are done.</i></b></font>
  398. </div>-->z
  399. <?php
  400. ?>
  401. <?php
  402. }
  403. ?>
  404. <?php
  405. }
  406. ?>
  407. <?php
  408. }
  409. 'setCurrentActivityLog'
  410. ?>
  411. </td>
  412. </tr>
  413. </table>