wiki
[ class tree: wiki ] [ index: wiki ] [ all elements ]

Source for file apply.php

Documentation is available at apply.php

  1. <?php
  2. /**
  3.  * Copyright (c) 2004 bitweaver.org
  4.  * Copyright (c) 2003 tikwiki.org
  5.  * Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
  6.  * All Rights Reserved. See below for details and a complete list of authors.
  7.  * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details
  8.  *
  9.  * @package wiki
  10.  * @subpackage functions
  11.  */
  12.  
  13. /**
  14.  * required setup
  15.  */
  16. require_once'../kernel/setup_inc.php' );
  17.  
  18. $gBitSystem->verifyPackage'wiki' );
  19. require_onceWIKI_PKG_PATH.'BitPage.php' );
  20.  
  21. if!empty$_REQUEST['structure_id') ) {
  22.     includeLIBERTY_PKG_PATH.'display_structure_inc.php' );
  23. else {
  24.     $_REQUEST['page''Welcome';
  25.  
  26.     $pc $_REQUEST['post_code'];
  27.     $pc preg_replace('/\s+/'''$pc);
  28.     $pc strtoupper$pc );
  29.     if strlen$pc {
  30.         $_REQUEST['page''ApplyPCX';
  31.     else if strlen$pc {
  32.         $_REQUEST['page''ApplyPCX';
  33.     else {
  34.         if strlen$pc == {
  35.             $pch substr$pc0);
  36.             $pct substr$pc3);
  37.         else if strlen$pc == {
  38.             $pch substr$pc0);
  39.             $pct substr$pc4);
  40.         }
  41.         $bindVarsarray();
  42.         array_push$bindVars$pch );
  43.         global $gBitSystem;
  44.         $query "
  45.             SELECT pc.`title`
  46.             FROM `".BIT_DB_PREFIX."espc_pcarea` pc
  47.             WHERE pc.`pcarea`= ? ";
  48.         $result $gBitSystem->mDb->getRow$query$bindVars );
  49.  
  50.         if$result and isset($_REQUEST['submit_x']) ) {
  51.         $msg "";
  52.         $msg .= "Website Loan Application Form"."\n";
  53.         $msg .= "============================="."\n";
  54.         $msg .= "\n";
  55.         
  56.         $msg .= "LOAN OR PRODUCT DETAILS SELECTED"."\n";
  57.         $msg .= "================================"."\n";
  58.         $msg .= "Amount  : ".$_REQUEST['amountselect']."\n";
  59.         $msg .= "Term    : ".$_REQUEST['termselect']."\n";
  60.         ifisset($_REQUEST['product1']) ) $msg .= "Sofas  : ".$_REQUEST['product1']."\n"}
  61.         ifisset($_REQUEST['product2']) ) $msg .= "Beds   : ".$_REQUEST['product2']."\n"}
  62.         ifisset($_REQUEST['product3']) ) $msg .= "Blinds : ".$_REQUEST['product3']."\n"}
  63.         ifisset($_REQUEST['product4']) ) $msg .= "White  : ".$_REQUEST['product4']."\n"}
  64.         
  65.         $msg .= "\n";
  66.         $msg .= "APPLICANT"."\n";
  67.         $msg .= "========="."\n";
  68.         $msg .= "Name    : {$_REQUEST['title']} {$_REQUEST['first']} {$_REQUEST['last']}"."\n";
  69.         $msg .= "DOB     : ".$_REQUEST['dob']."\n";
  70.         $msg .= "\n";
  71.         
  72.         $msg .= "PARTNER"."\n";
  73.         $msg .= "======="."\n";
  74.         $msg .= "Name    : {$_REQUEST['ptitle']} {$_REQUEST['pfirst']} {$_REQUEST['plast']}"."\n";
  75.         $msg .= "DOB     : ".$_REQUEST['pdob']."\n";
  76.         $msg .= "\n";
  77.         
  78.         $msg .= "ADDRESS"."\n";
  79.         $msg .= "======="."\n";
  80.         $msg .= $_REQUEST['number']."\n";
  81.         $msg .= $_REQUEST['address1']."\n";
  82.         $msg .= $_REQUEST['address2']."\n";
  83.         $msg .= $_REQUEST['town']."\n";
  84.         $msg .= $_REQUEST['county']."\n";
  85.         $msg .= $pch." ".$pct."\n";
  86.         $msg .= "Years at this address: ".$_REQUEST['howlong']."\n";
  87.         $msg .= "\n";    
  88.         
  89.         if ($_REQUEST['howlong'!= 'over 5'{
  90.         
  91.             $msg .= "PREVIOUS ADDRESS"."\n";
  92.             $msg .= "================"."\n";
  93.             $msg .= $_REQUEST['pnumber']."\n";
  94.             $msg .= $_REQUEST['paddress1']."\n";
  95.             $msg .= $_REQUEST['paddress2']."\n";
  96.             $msg .= $_REQUEST['ptown']."\n";
  97.             $msg .= $_REQUEST['pcounty']."\n";
  98.             $msg .= $_REQUEST['ppost_code']."\n";
  99.             $msg .= "Years at this address: ".$_REQUEST['phowlong']."\n";
  100.             $msg .= "\n";
  101.         
  102.         }
  103.         $msg .= "CONTACT INFORMATION"."\n";
  104.         $msg .= "==================="."\n";
  105.         $msg .= "Telephone: ".$_REQUEST['telephone']."\n";
  106.         $msg .= "Email: ".$_REQUEST['email']."\n";
  107.         ifisset($_REQUEST['consent']) ) $msg .= "Consent to credit search.\n"}
  108.         $msg .= "\n";
  109.         
  110.         $msg .= "FEED BACK"."\n";
  111.         $msg .= "========="."\n";
  112.         $msg .= "I found out about Estone Personal Credit here: ".$_REQUEST['feedback']."\n";
  113.         $msg .= "or here: ".$_REQUEST['feedback2']."\n";
  114.         $msg .= "\n";
  115.             $mailfrom    "{$_REQUEST['first']} {$_REQUEST['last']} <epc@rdm2.co.uk>";  
  116.             $mailsubject    "[EPC] Website Enquiry - {$_REQUEST['first']} {$_REQUEST['last']}";
  117.     
  118.             mail('charlotte@estonepersonalcredit.co.uk'$mailsubject$msg"From: ".$mailfrom."\r\nContent-type: text/plain;charset=utf-8\r\n");
  119.             mail('epc@rainbowdigitalmedia.org.uk'$mailsubject$msg"From: ".$mailfrom."\r\nContent-type: text/plain;charset=utf-8\r\n");
  120.             $_REQUEST['page''ApplyOK';
  121.         else {
  122.             $_REQUEST['page''ApplyPC';
  123.         }
  124.     }
  125.  
  126.     $gHome new BitPage();
  127.     $wikiHome $gBitSystem->getConfig"wiki_home_page"'HomePage' );
  128.     if!($gHome->pageExists$wikiHome ) ) ) {
  129.         $homeHash array(
  130.             'title' => isset$wikiHome $wikiHome 'HomePage' ),
  131.             'creator_user_id' => ROOT_USER_ID,
  132.             'modifier_user_id' => ROOT_USER_ID,
  133.             'edit' => 'Welcome to '.$gBitSystem->getConfig'site_title''our site' ) ) );
  134.         $gHome->store$homeHash );
  135.     }
  136.     includeWIKI_PKG_PATH.'lookup_page_inc.php' );
  137.     includeWIKI_PKG_PATH.'display_bitpage_inc.php' );
  138. }

Documentation generated on Wed, 29 Jul 2015 13:55:34 +0000 by phpDocumentor 1.5.0-lsces