Esempio n. 1
0
 public function search_policy($name, $policy, $reg)
 {
     require_once 'mysqlwrapper_class.php';
     $conn = new mysqlwrapper_class();
     if (!empty($name)) {
         $nameSplit = explode(" ", $name);
         $policyInfo = $conn->execute_sql("select", array('*'), "policy JOIN policy_holders ON p_id = ph_p_id join vehicles on v_p_id = p_id", "p_ph_forename=LOWER(?) AND p_ph_surname=LOWER(?)", array("s1" => strtolower($nameSplit[0]), "s2" => strtolower($nameSplit[1])));
     } elseif (!empty($policy)) {
         $policyInfo = $conn->execute_sql("select", array('*'), "policy JOIN policy_holders ON p_id = ph_p_id join vehicles on v_p_id = p_id", "p_policy_number=? and p_cancel_date is NULL and p_renewal_date >= '" . date('Y-m-d') . "'", array("s" => $policy));
     } elseif (!empty($reg)) {
         $policyInfo = $conn->execute_sql("select", array('*'), "policy JOIN policy_holders ON p_id = ph_p_id join vehicles on v_p_id = p_id", "v_reg=? and p_cancel_date is NULL and p_renewal_date >= '" . date('Y-m-d') . "'", array("s" => $reg));
     }
     return $policyInfo;
 }
Esempio n. 2
0
<?php

require "../includes/config.php";
require "../includes/mysqlwrapper_class.php";
$conn = new mysqlwrapper_class();
$userLogin = $conn->execute_sql("select", array("ul_id", "ul_username", "ul_password", "ul_forename", "ul_surname", "ul_company_title", "ul_breakdown", "ul_accident_recovery", "ul_fnol"), "user_login", "ul_id=?", array("i" => $_SESSION['userID']));
if (!empty($userLogin)) {
    //setcookie("username", strtoupper($_POST['username']), strtotime('today 08:00'));
    $_SESSION['userName'] = $userLogin[0]['ul_username'];
    $_SESSION['userID'] = $userLogin[0]['ul_id'];
    $_SESSION['companyTitle'] = $userLogin[0]['ul_company_title'];
    $_SESSION['permissions']['breakdown'] = $userLogin[0]['ul_breakdown'];
    $_SESSION['permissions']['accident_recovery'] = $userLogin[0]['ul_accident_recovery'];
    $_SESSION['permissions']['fnol'] = $userLogin[0]['ul_fnol'];
}
<?php

//if(empty($_SESSION['claimID'])) {
require "../includes/mysqlwrapper_class.php";
$conn = new mysqlwrapper_class();
$checkValues = $conn->execute_sql("update", array("ar_assisted_unassisted" => $_POST['accident_recovery--ar_assisted_unassisted']), "accident_recovery", "ar_c_id=?", array("i" => $_SESSION['claimID']));
//$_SESSION['claimID'] = $insertValues;
//echo $insertValues;
unset($_SESSION['claimID']);
//}
Esempio n. 4
0
<?php

error_reporting(E_ALL);
ini_set('display_errors', 1);
require "../includes/mysqlwrapper_class.php";
$conn = new mysqlwrapper_class();
if ($_POST['claim_ref1']) {
    $_POST['claim_ref'] = $_POST['claim_ref1'];
    unset($_POST['claim_ref1']);
}
$claim_number = trim($_SESSION['claimID']);
if ($_POST['claimType'] == "incident_recovery") {
    $_POST['accident_recovery--ar_c_id'] = $claim_number;
}
if ($_POST['claimType'] == "breakdown_assistance") {
    $_POST['breakdown_assistance--bd_c_id'] = $claim_number;
}
if ($_POST['claimType'] == "fnol") {
    $_POST['fnol--f_c_id'] = $claim_number;
}
if ($_POST['claimType'] == "windscreen") {
    $_POST['windscreen--w_c_id'] = $claim_number;
}
if ($_POST['claimType'] == "home_emergency") {
    $_POST['home_emergency--he_c_id'] = $claim_number;
}
if ($_POST['claimType'] == "household_claim") {
    $_POST['household_claim--hc_c_id'] = $claim_number;
}
unset($_POST['claim_ref']);
unset($_POST['claimType']);
Esempio n. 5
0
<?php

require "../includes/config.php";
if (!empty($_POST['callValues'])) {
    require "../includes/mysqlwrapper_class.php";
    $conn = new mysqlwrapper_class();
    $insertValues = $conn->execute_sql("select", array("*"), "third_party", "tp_id=?", array("i" => $_POST['callValues']));
}
echo $_POST['callValues'];
?>
<form action="" method="post" enctype="multipart/form-data" name="addTP" id="addTP">
<div class="left"><label>Name:</label></div>
<div class="right"><input name="tp_name" type="text" id="tp_name" size="30" placeholder="" value="<?php 
echo $insertValues[0]['tp_name'];
?>
" required /></div>

<div class="left"><label>Registration:</label></div>
<div class="right"><input name="tp_v_reg" type="text" id="tp_v_reg" size="30" placeholder="" value="<?php 
echo $insertValues[0]['tp_v_reg'];
?>
" required /></div>

<div class="left"><label>Make & Model:</label></div>
<div class="right"><input name="tp_make_model" type="text" id="tp_make_model" size="30" placeholder="" value="<?php 
echo $insertValues[0]['tp_make_model'];
?>
" /></div>

<div class="left"><label>Contact Number:</label></div>
<div class="right"><input name="tp_contact_number" type="text" id="tp_contact_number" size="30" placeholder="" value="<?php 
Esempio n. 6
0
<?php

require "../includes/config.php";
if (!empty($_POST['callValues'])) {
    require "../includes/mysqlwrapper_class.php";
    $conn = new mysqlwrapper_class();
    $insertValues = $conn->execute_sql("select", array("*"), "breakdown_assistance", "bd_id=?", array("i" => $_POST['callValues']));
}
?>
<form action="" method="post" enctype="multipart/form-data" name="viewBD" id="viewBD">
    <div class="left"><label>Details of breakdown:</label></div>
    <div class="right"><textarea type="text" name ="bd_further_info" rows = "3" cols="70" class="form-control mb25" placeholder="" disabled><?php 
echo $insertValues[0]['bd_further_info'];
?>
</textarea></div>
    
    <div class="left"><label>Status:</label></div>
    <div class="right"><select id = "bd_assisted_unassisted" name="bd_assisted_unassisted">
        <option value=""<?php 
echo empty($insertValues[0]['bd_assisted_unassisted']) ? " selected=selected" : "";
?>
>Select</option>
        <option value="Assisted"<?php 
echo $insertValues[0]['bd_assisted_unassisted'] == "Assisted" ? " selected=selected" : "";
?>
>Assisted</option>
        <option value="Unassisted"<?php 
echo $insertValues[0]['bd_assisted_unassisted'] == "Unassisted" ? " selected=selected" : "";
?>
>Unassisted</option>
    </select></div>
Esempio n. 7
0
<?php

require "includes/config.php";
require "includes/mysqlwrapper_class.php";
$conn = new mysqlwrapper_class();
$userLogin = $conn->execute_sql("select", array("ul_id", "ul_username", "ul_forename", "ul_surname", "ul_company_title", "ul_breakdown", "ul_accident_recovery", "ul_fnol", "ul_windscreen", "ul_home_emergency", "ul_household_claim"), "user_login", "ul_username=LOWER(?)", array("s" => strtolower($_SESSION['userName'])));
$_SESSION['userName'] = $userLogin[0]['ul_username'];
$_SESSION['userID'] = $userLogin[0]['ul_id'];
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Commercial Legal Portal</title>

<link rel="shortcut icon" type="image/png" href="favicon.ico"/>

    <!-- Bootstrap Core CSS -->
    <link href="<?php 
echo _ROOT;
?>
/css/bootstrap.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link rel="stylesheet" href="<?php 
echo _ROOT;
?>
/css/smoothness/jquery-ui.css" />
    <link href="<?php 
echo _ROOT;
Esempio n. 8
0
<?php

require "../includes/mysqlwrapper_class.php";
$conn = new mysqlwrapper_class();
require "../includes/email_class.php";
$policyInfo = $conn->execute_sql("select", array("*"), "policy", "p_id=?", array("i" => $_POST['p_id']));
if (!empty($policyInfo)) {
    $policyholderInfo = $conn->execute_sql("select", array("*"), "policy_holders", "ph_p_id=?", array("i" => $_POST['p_id']));
    $vehicleInfo = $conn->execute_sql("select", array("*"), "vehicles", "v_p_id=?", array("i" => $_POST['p_id']));
    $breakdownInfo = $conn->execute_sql("select", array('a_description'), "addons", "a_addon_type=? and a_policy_number=? and (a_cancel_date IS NULL OR a_cancel_date = '0000-00-00') and a_renewal_date >= '" . date('Y-m-d') . "'", array("s1" => "CBA", "s2" => $policyInfo[0]['p_policy_number']));
    if (!empty($breakdownInfo)) {
        switch ($breakdownInfo[0]['a_description']) {
            case "RAC EU Breakdown":
                $cover = "";
                break;
            default:
                $cover = "Gold";
        }
    } else {
        $cover = "Basic";
    }
    switch ($vehicleInfo[0]['v_transmission']) {
        case "M":
            $transmission = "Manual";
            break;
        case "A":
            $transmission = "Automatic";
            break;
    }
    switch ($vehicleInfo[0]['v_fuel_type']) {
        case "P":
<?php

if (empty($_SESSION['claimID'])) {
    require "../includes/mysqlwrapper_class.php";
    $conn = new mysqlwrapper_class();
    $insertValues = $conn->execute_sql("insert", array("c_claim_type" => $_POST['claimType'], "c_timestamp" => $_POST['claimTimestamp'], "c_p_id" => $_POST['policyId'], "c_ph_id" => $_POST['policyHolderId'], "c_ul_id" => $_SESSION['userID']), "claims", "", "");
    $_SESSION['claimID'] = trim($insertValues);
    echo trim($insertValues);
} else {
    echo $_SESSION['claimID'];
}
Esempio n. 10
0
<?php

require "../includes/config.php";
require "../includes/mysqlwrapper_class.php";
$conn = new mysqlwrapper_class();
$encryptPass = md5($_POST['password'] . _SALT . $_POST['password'] . _SALT . $_POST['password'] . _SALT);
//$userLogin = $login->execute_sql($_POST['username'], $encryptPass);
$userLogin = $conn->execute_sql("select", array("ul_id", "ul_username", "ul_password", "ul_forename", "ul_surname", "ul_company_title", "ul_breakdown", "ul_accident_recovery", "ul_fnol", "ul_windscreen"), "user_login", "ul_username=LOWER(?) AND ul_password=?", array("s1" => strtolower($_POST['username']), "s2" => $encryptPass));
//var_dump($userLogin);
if (!empty($userLogin)) {
    //setcookie("username", strtoupper($_POST['username']), strtotime('today 08:00'));
    session_start();
    $_SESSION['userName'] = $_POST['username'];
    $_SESSION['userID'] = $userLogin[0]['ul_id'];
} else {
    echo "There has been a problem logging you in ";
    //var_dump($userLogin[0]);
    //echo $encryptPass;
}
Esempio n. 11
0
<?php

require "../includes/mysqlwrapper_class.php";
$conn = new mysqlwrapper_class();
$conn->execute_sql("insert", array("np_p_id" => $_POST['p_id'], "np_postValues" => $_POST['href'], "np_timestamp" => date("Y-m-d H:i:s")), "nci_post", "", "");
Esempio n. 12
0
<?php

require "../includes/mysqlwrapper_class.php";
$conn = new mysqlwrapper_class();
$string = "";
$user = $_POST['user'];
$after = $_POST['after'];
$interactionID = $_POST['i_id'];
$table = $_POST['table'];
//$sql = "update " . $table . " set ";
$callType = $_POST['db_callType'];
//$where = " where " . $_POST['where'];
$where = $_POST['where'];
if ($_POST['buttonClicked'] == "save") {
    unset($_POST['buttonClicked']);
    unset($_POST['database']);
    unset($_POST['table']);
    unset($_POST['where']);
    unset($_POST['db_callType']);
    unset($_POST['user']);
    unset($_POST['after']);
    // -1 becaue the
    $postCount = count($_POST);
    // run queries
    if ($table == "third_party") {
        if ($callType == "update") {
            $tp_id = $_POST['tp_id'];
            unset($_POST['tp_id']);
            unset($_POST['tp_c_id']);
            unset($_POST['claimTimestamp']);
            unset($_POST['policyId']);
Esempio n. 13
0
<?php

require "../includes/mysqlwrapper_class.php";
$conn = new mysqlwrapper_class();
$tps = $conn->execute_sql("select", array('*'), "third_party", "tp_c_id=?", array("i" => $_SESSION['claimID']));
foreach ($tps as $header => $value) {
    echo "<a title=\"Edit third party\" class=\"show-overlay\" id=\"addTP:" . $tps[$header]['tp_id'] . "\"><span class=\"btn btn-default \" id=\"" . $tps[$header]['tp_id'] . "\">" . $tps[$header]['tp_name'] . "</span></a>";
}
?>
<script>
	$(".show-overlay").click(function(e) {
		$("#overlay").show();
		//$(".rounded-container.policy-view.claimInformation").show();
		$("#overlay #overlay-content #overlay-title").text($(this).attr("title"));
		var pageValues = $(this).attr("id").split(":");
		
		var callPage = pageValues[0];
		var callValues = pageValues[1];
		var claim_ref = $("#hiddenClaimType").html();
		
		$.post( "pages/popup-call.php", { 
			callPage: callPage,   
			callValues: callValues,
			claim_ref: claim_ref
		})
		.done(function( data ) {
			$("#overlay #overlay-content #overlay-text").html(data);
		});
	});
</script>