Sfoglia il codice sorgente

Adds Terms and Conditions. Adds support for deactivating, reactivating and deleting accounts.

Alan Lam 8 anni fa
parent
commit
68ed09b00b

+ 15 - 1
controllers/account.php

@@ -41,14 +41,28 @@ if(Core::$user->level == User::LEVEL_REGISTERED) {
 	$links["/account/submit-id"] = "Submit ID";
 }
 
+if(!Core::$user->terms_accepted) {
+	$links = [];
+}
+
 $links["/account/settings"] = "Settings";
 
 asort($links);
 
+// Actions
+$actions = [];
+if(Core::$user->level == User::LEVEL_DEACTIVATED) {
+	$actions["/account/reactivate"] = "Reactivate Account";
+}
+else if(Core::$user->level == User::LEVEL_TESTER) {
+	$actions["/account/deactivate"] = "Deactivate Account...";
+}
+$actions["/account/delete"] = "Delete Account...";
+
 $referrals = Core::$user->getReferrals();
 
 View::includeOnce("header", compact("page_title"));
-View::include("account", compact("links", "referrals", "users_pending_verification", "tests_pending_verification"));
+View::include("account", compact("links", "actions", "referrals", "users_pending_verification", "tests_pending_verification"));
 View::includeOnce("footer");
 
 ?>

+ 28 - 0
controllers/account_deactivate.php

@@ -0,0 +1,28 @@
+<?php
+
+$page_title = "Deactivate Account";
+
+Core::addBreadcrumb("/account", "Account");
+Core::addBreadcrumb("/account/deactivate", $page_title);
+
+$submit = http::value("submit");
+if($submit) {
+	try {
+		Core::validateCSRFToken($submit);
+
+		$success = Core::$user->deactivate();
+		if(!$success) throw new Exception("Failed to deactivate account. Please try again later.");
+
+		Core::addAlert("success", "Deactivated account successfully.");
+		HTTP::redirect("/account");
+	}
+	catch(Exception $e) {
+		Core::addAlert("danger", $e->getMessage());
+	}
+}
+
+View::includeOnce("header", compact("page_title"));
+View::include("account_deactivate");
+View::includeOnce("footer");
+
+?>

+ 32 - 0
controllers/account_delete.php

@@ -0,0 +1,32 @@
+<?php
+
+$page_title = "Delete Account";
+
+Core::addBreadcrumb("/account", "Account");
+Core::addBreadcrumb("/account/delete", $page_title);
+
+$submit = http::value("submit");
+if($submit) {
+	try {
+		Core::validateCSRFToken($submit);
+
+		$user = Core::$user;
+		$success = $user->softDelete();
+		if(!$success) throw new Exception("Failed to delete account. Please try again later.");
+
+		Core::addAlert("success", "Account deleted successfully.");
+
+		unset($_SESSION["user_id"]);
+
+		HTTP::redirect("/register");
+	}
+	catch(Exception $e) {
+		Core::addAlert("danger", $e->getMessage());
+	}
+}
+
+View::includeOnce("header", compact("page_title"));
+View::include("account_delete");
+View::includeOnce("footer");
+
+?>

+ 12 - 0
controllers/account_reactivate.php

@@ -0,0 +1,12 @@
+<?php
+
+$user = Core::$user;
+$user->level = User::LEVEL_TESTER;
+$success = $user->commit();
+if(!$success) throw new Exception("Failed to update our records. Please try again later.");
+
+Core::addAlert("success", "Account reactivated successfully.");
+
+HTTP::redirect("/account");
+
+?>

+ 1 - 0
controllers/project_ajax.php

@@ -204,6 +204,7 @@ if($submit) {
 						"isUnverified" => $is_unverified,
 						"levelText" => $user->getLevelText(),
 						"levelClass" => $user->getLevelClass(),
+						"termsAccepted" => boolval($user->terms_accepted),
 					];
 
 				}

+ 2 - 0
controllers/register.php

@@ -31,6 +31,7 @@ try {
 		$user->gender = http::value("gender", "trim");
 		$user->date_of_birth = http::getDateFromFields("date_of_birth");
 		$user->phone = http::value("phone", "trim");
+		$user->terms_accepted = http::value("terms_accepted", "int");
 		$user->dts_registered = gmdate("Y-m-d H:i:s");
 
 		$user_address->postal_code = http::value("postal_code");
@@ -48,6 +49,7 @@ try {
 		if(empty($user->last_name)) $form_exception->addError("Last name is required.");
 		if(empty($user->date_of_birth)) $form_exception->addError("Date of birth is required.");
 		if(empty($user->phone)) $form_exception->addError("Mobile number is required.");
+		if(empty($user->terms_accepted)) $form_exception->addError("Acceptance of Terms and Conditions is required.");
 
 		if(empty($user_address->postal_code)) $form_exception->addError("Postal code is required.");
 

+ 12 - 0
controllers/terms_accept.php

@@ -0,0 +1,12 @@
+<?php
+
+$user = Core::$user;
+$user->terms_accepted = 1;
+$success = $user->commit();
+if(!$success) throw new Exception("Failed to update our records. Please try again later.");
+
+Core::addAlert("success", "Terms and Conditions accepted successfully.");
+
+HTTP::redirect("/account");
+
+?>

+ 11 - 0
controllers/terms_and_conditions.php

@@ -0,0 +1,11 @@
+<?php
+
+$page_title = "Terms and Conditions";
+
+Core::addBreadcrumb("/terms-and-conditions", $page_title);
+
+View::includeOnce("header", compact("page_title"));
+View::include("terms_and_conditions");
+View::includeOnce("footer");
+
+?>

+ 19 - 0
controllers/terms_decline.php

@@ -0,0 +1,19 @@
+<?php
+
+$page_title = "Decline Terms & Conditions";
+
+Core::addBreadcrumb("/account", "Account");
+Core::addBreadcrumb("/account/decline-terms", $page_title);
+
+$user = Core::$user;
+$user->terms_accepted = 0;
+$success = $user->commit();
+if(!$success) throw new Exception("Failed to update our records. Please try again later.");
+
+View::includeOnce("header", compact("page_title"));
+View::include("terms_decline");
+View::includeOnce("footer");
+
+
+
+?>

+ 1 - 8
controllers/test_confirm.php

@@ -19,14 +19,7 @@ switch($action) {
 
 	case "decline":
 
-		$test->sendDeclineEmail();
-
-		$test->status = Test::STATUS_UNASSIGNED;
-		$test->tester_id = null;
-		$test->dts_due = null;
-		$test->dts_assigned = null;
-		$test->dts_updated = Util::getDateTime();
-		$test->commit();
+		$test->decline();
 
 		Core::addAlert("success", "Test declined successfully.");
 		HTTP::redirect("/account/tests");

+ 8 - 0
engine/core.php

@@ -49,6 +49,14 @@ class Core {
 		}
 	}
 
+	public static function requireTerms() {
+		Core::requireLogIn();
+		if(Core::$user->terms_accepted == false) {
+			Core::addAlert("danger", "You must accept Terms and Conditions to view this page.");
+			http::redirect("/account");
+		}
+	}
+
 	public static function requireAdmin() {
 		Core::requireLogIn();
 		if(Core::$user->canAdmin() === false) {

+ 11 - 0
engine/test.php

@@ -154,6 +154,17 @@ class Test extends Model {
 		$mail->send();
 	}
 
+	public function decline() {
+		$this->sendDeclineEmail();
+
+		$this->status = Test::STATUS_UNASSIGNED;
+		$this->tester_id = null;
+		$this->dts_due = null;
+		$this->dts_assigned = null;
+		$this->dts_updated = Util::getDateTime();
+		return $this->commit();
+	}
+
 	public function getChallengeStageText() {
 		return Test::STAGES[$this->challenge_stage];
 	}

+ 56 - 1
engine/user.php

@@ -4,7 +4,7 @@ class User extends Model {
 
 	protected static $table = "user";
 	protected static $id_field = "id";
-	protected static $fillable_fields = ["email", "old_id", "referrer_id", "password", "activated", "level", "score", "title", "first_name", "last_name", "gender", "date_of_birth", "phone", "verify_token", "reset_token", "preferred_payment_method", "bank_name", "bank_sort_code", "bank_account_number", "paypal_email", "dts_registered", "dts_last_seen", "dts_verified", "verifier_id", "verifier_notes"];
+	protected static $fillable_fields = ["email", "old_id", "referrer_id", "password", "activated", "level", "score", "title", "first_name", "last_name", "gender", "date_of_birth", "phone", "verify_token", "reset_token", "terms_accepted", "preferred_payment_method", "bank_name", "bank_sort_code", "bank_account_number", "paypal_email", "dts_registered", "dts_last_seen", "dts_verified", "dts_deleted", "verifier_id", "verifier_notes"];
 
 	// Constants
 
@@ -307,6 +307,51 @@ class User extends Model {
 		return false;
 	}
 
+	public function deactivate() {
+		// Decline all pending tests
+		$pending_tests = $this->getPendingTests();
+		foreach($pending_tests as $test) {
+			$test->decline();
+		}
+
+		// Set user level to Deactivated
+		$this->level = User::LEVEL_DEACTIVATED;
+		return $this->commit();
+	}
+
+	public function softDelete() {
+
+		// Delete identification documents
+		$this->deleteIDFiles();
+
+		// Delete addresses
+		$this->deleteAddresses();
+
+		// Decline all pending tests
+		$pending_tests = $this->getPendingTests();
+		foreach($pending_tests as $test) {
+			$test->decline();
+		}
+
+		// Delete personal information
+		$this->email = null;
+		$this->title = null;
+		$this->first_name = null;
+		$this->last_name = null;
+		$this->phone = null;
+		$this->bank_name = null;
+		$this->bank_sort_code = null;
+		$this->bank_account_number = null;
+		$this->paypal_email = null;
+
+		// Set deleted time
+		$this->dts_deleted = Util::getDateTime();
+
+		$success = $this->commit();
+
+		return true;
+	}
+
 	public function deleteIDFiles() {
 
 		$files = UserFile::query([
@@ -324,6 +369,16 @@ class User extends Model {
 		return true;
 	}
 
+
+	public function deleteAddresses() {
+		$addresses = $this->getAddresses();
+		foreach($addresses as $address) {
+			$address->delete();
+		}
+
+		return true;
+	}
+
 	public function getAddresses() {
 
 		$addresses = UserAddress::query([

+ 16 - 2
public/js/app-project.js

@@ -344,13 +344,22 @@ function initialiseTesters() {
 			var td = $("<td></td>");
 			td.append("<a href=\"/account/users/" + tester.id + "\" target=\"_blank\">" + tester.name + "</a> ");
 
-			td.append("<small>(" +  tester.score + ")</small>");
+			var scoreClass = "secondary";
+			if(tester.score > 0) {
+				scoreClass = "success";
+			}
+			else if(tester.score < 0) {
+				scoreClass = "danger";
+			}
+
+			td.append("<span class=\"badge badge-pill badge-" + scoreClass + "\" title=\"Score\">" +  tester.score + "</span>");
 
 			td.append("<br />");
 
-			var small = $("<small>Distance: " + tester.distanceMiles + " / " + tester.maxRadiusMiles + " miles</small>");
+			var small = $("<small>" + tester.distanceMiles + " / " + tester.maxRadiusMiles + " miles</small>");
 			if(tester.maxRadiusExceeded) {
 				small.addClass("text-danger");
+				small.append(" <i class=\"fas fa-exclamation-circle\"></i>");
 			}
 			td.append(small);
 			tr.append(td);
@@ -360,6 +369,11 @@ function initialiseTesters() {
 			tr.append(td);
 
 			td = $("<td class=\"text-right align-middle\"></td>");
+
+			if(!tester.termsAccepted) {
+				td.append("<span class=\"badge badge-danger\" title=\"Terms and Conditions not accepted\">T&amp;C</span> ");
+			}
+
 			td.append("<span class=\"badge badge-" + tester.levelClass + "\">" + tester.levelText + "</span>");
 			td.append("<br />");
 			td.append($("<small>").text(tester.phone));

+ 4 - 0
router.php

@@ -46,6 +46,10 @@ try {
 				Core::requireLogIn();
 			}
 
+			if(preg_match("/^account/", $path) && $path != "account" && !preg_match("/(settings|deactivate|reactivate|delete|accept-terms|decline-terms)$/", $path)) {
+				Core::requireTerms();
+			}
+
 			if($require_admin) {
 				Core::requireAdmin();
 			}

+ 8 - 0
routes.php

@@ -26,6 +26,11 @@ $routes = [
 	"/^privacy-policy$/" => ["controller" => "privacy_policy"],
 	"/^verify-email\/([a-f0-9]+)$/" => ["controller" => "user_activation", "params" => ["token"]],
 
+	// Terms and Conditions
+	"/^terms-and-conditions$/" => ["controller" => "terms_and_conditions"],
+	"/^account\/accept-terms$/" => ["controller" => "terms_accept", "require_log_in" => true],
+	"/^account\/decline-terms$/" => ["controller" => "terms_decline", "require_log_in" => true],
+
 	// Marketing
 	"/^services$/" => ["controller" => "services"],
 	"/^become-a-tester$/" => ["controller" => "become_a_tester"],
@@ -38,6 +43,9 @@ $routes = [
 	// Account
 	"/^account$/" => ["controller" => "account", "require_log_in" => true],
 	"/^account\/settings$/" => ["controller" => "settings", "require_log_in" => true],
+	"/^account\/deactivate$/" => ["controller" => "account_deactivate", "require_user_level" => User::LEVEL_TESTER],
+	"/^account\/reactivate$/" => ["controller" => "account_reactivate", "require_log_in" => true],
+	"/^account\/delete$/" => ["controller" => "account_delete", "require_log_in" => true],
 
 	// Addresses
 	"/^account\/addresses$/" => ["controller" => "addresses", "require_log_in" => true],

+ 40 - 1
views/account.php

@@ -31,7 +31,7 @@
 	<div class="row">
 		<div class="col-lg-4 mb-3 mb-lg-0">
 			<h3>Main Menu</h3>
-			<div class="list-group">
+			<div class="list-group mb-3">
 			<?php
 			foreach($links as $path => $text) {
 				?>
@@ -42,6 +42,19 @@
 			}
 			?>
 			</div>
+			<h3>Actions</h3>
+			<div class="list-group mb-3">
+			<?php
+			foreach($actions as $path => $text) {
+				$text_class = preg_match("/delete/i", $text) ? "text-danger" : "";
+				?>
+				<a class="list-group-item list-group-item-action <?=$text_class?>" href="<?=htmlspecialchars($path)?>">
+					<?=htmlspecialchars($text)?>
+				</a>
+				<?php
+			}
+			?>
+			</div>
 		</div>
 		<div class="col-lg mb-3 mb-lg-0">
 
@@ -76,6 +89,32 @@
 					<?php
 				}
 			}
+
+			if(Core::$user->level != User::LEVEL_DEACTIVATED && !Core::$user->terms_accepted) {
+				?>
+				<div class="alert alert-danger">
+					<p><i class="fas fa-info-circle"></i> <strong>IMPORTANT</strong></p>
+
+					<?php
+					if(is_null(Core::$user->terms_accepted)) {
+						?>
+						<p><a href="/terms-and-conditions">Terms and Conditions</a> have been published.</p>
+						<p>Our records show that you have not accepted the <a href="/terms-and-conditions">Terms and Conditions</a> on registration. Please take time to read our Terms and Conditions and then click Accept or Decline to continue.</p>
+						<?php
+					}
+					else {
+						?>
+						<p>Our records show that you have declined the <a href="/terms-and-conditions">Terms and Conditions</a>. If you have changed your mind, please click Accept to continue or Decline for other actions.</p>
+						<?php
+					}
+					?>
+
+					<a class="btn btn-success" href="/account/accept-terms">Accept</a>
+					<a class="btn btn-danger" href="/account/decline-terms">Decline</a>
+				</div>
+				<?php
+			}
+
 			?>
 
 			<h3>Useful Documents</h3>

+ 24 - 0
views/account_deactivate.php

@@ -0,0 +1,24 @@
+<div class="container mt-3 py-4">
+
+	<h2>Deactivate Account</h2>
+
+	<p>By deactivating your account, you will:</p>
+
+	<ul>
+		<li>No longer be assigned tests.</li>
+		<li>No longer be able to participate in tests.</li>
+		<li>Unassign yourself from all currently assigned tests.</li>
+	</ul>
+
+	<p>You can always log into your account and reactivate the account should you wish to continue to use our services, however you will lose your currently assigned tests.</p>
+
+	<p class="text-danger">
+		This action cannot be undone.
+	</p>
+
+	<form method="post">
+		<button class="btn btn-danger" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>">Deactivate Account</button>
+		<a class="btn btn-secondary" href="/account">Cancel</a>
+	</form>
+
+</div>

+ 28 - 0
views/account_delete.php

@@ -0,0 +1,28 @@
+<div class="container mt-3 py-4">
+
+	<h2>Delete Account</h2>
+
+	<p>By deleting your account, you will:</p>
+
+	<ul>
+		<li>No longer be assigned tests.</li>
+		<li>No longer be able to participate in tests.</li>
+		<li>No longer be able to generate invoices for completed tests.</li>
+		<li>Unassign yourself from all currently assigned tests.</li>
+		<li>Delete all personal identifiable information associated with your account.</li>
+	</ul>
+
+	<p>If you have participated in tests, we will need to keep only your age and gender for test reporting purposes. This information will not and cannot be used to identify you.</p>
+
+	<p>You will need to register again should you wish to continue to use our services.</p>
+
+	<p class="text-danger">
+		This action cannot be undone.
+	</p>
+
+	<form method="post">
+		<button class="btn btn-lg btn-danger" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>">Delete Account</button>
+		<a class="btn btn-lg btn-secondary" href="/account">Cancel</a>
+	</form>
+
+</div>

+ 9 - 1
views/register.php

@@ -106,12 +106,20 @@
 						</select>
 					</div>
 				</div>
-				<div class="row mb-1">
+				<div class="row mb-3">
 					<label class="col-sm-4 col-form-label"  for="postal-code">Postal Code</label>
 					<div class="col-sm">
 						<input class="form-control" type="text" name="postal_code" id="postal-code" placeholder="Enter postal code" value="<?=htmlspecialchars($user_address->postal_code)?>" required />
 					</div>
 				</div>
+				<div class="row mb-1">
+					<div class="col-sm offset-sm-4">
+						<label>
+							<input type="checkbox" value="1" name="terms_accepted" /> I agree to and have read the <a href="/terms-and-conditions" target="_blank">Terms and Conditions</a> and <a href="/privacy-policy" target="_blank">Privacy Policy</a>
+						</label>
+
+					</div>
+				</div>
 				<div class="row">
 					<div class="col-sm offset-sm-4">
 						<?php

+ 200 - 0
views/terms_and_conditions.php

@@ -0,0 +1,200 @@
+<div class="container mt-3 py-4">
+
+	<h2>Terms and Conditions</h2>
+
+	<ol>
+		<li class="mb-4">
+			<p>AGREEMENT</p>
+			<ol>
+				<li>
+					<p>In registering with Check Policy Limited, You ("you" or "your") confirm that, by entering
+					into this agreement, Check Policy Limited whose company registration number is
+					09506865 and whose registered office address is 8 Market Street, Liskeard, Cornwall. PL14
+					3JJ ("the Company") has engaged you as a self-employed Approved Tester to provide the
+					Services (defined below).</p>
+				</li>
+			</ol>
+		</li>
+		<li class="mb-4">
+			<p>APPROVED TESTER SERVICES</p>
+			<ol>
+				<li>
+					<p>You agree to provide the Company with Services (defined below) on an Assignment-by-Assignment
+					basis. You acknowledge that the Company is not under any obligation to
+					engage you in the provision of the Services for any particular Assignments, or at all.</p>
+				</li>
+				<li>
+					<p>When we refer to an Assignment, we mean an approved testing instruction that is
+					allocated to your Approved Tester online account ("Account") provided via the Company’s
+					website ("Assignment"). The Services mean the attendance at client premises and
+					observation, evaluation and recording of certain age verification procedures in
+					accordance with Company’s clients’ ("Clients") requirements for the Assignment
+					("Services"). These requirements may vary with each Assignment. They will be
+					communicated to you prior to acceptance of each Assignment. The Company’s
+					specifications for each Assignment will relate directly to the results expected and not to
+					the details of performance, which shall be at your sole discretion. Within the confines of
+					the Assignment, you will control the time, the date, and the manner in which you perform
+					the Assignment.</p>
+				</li>
+				<li>
+					<p>The Company reserves the right to vary any of your Assignments at any time. We will
+					notify you of this variation by contacting you using the contact details that you have
+					provided to us, or otherwise by posting a notification on your Account.</p>
+				</li>
+				<li>
+					<p>You cannot provide the Services where:</p>
+					<ol>
+						<li>
+							<p>You are or were (or are in the process of becoming) engaged as an employee,
+							representative, director, agent, member, owner, shareholder, partner or a self-employed
+							contractor for a Client;</p>
+						</li>
+						<li>
+							<p>You are or were related to, live with or are close friends with anyone who is or
+							was (or is in the process of becoming) an employee, representative, director,
+							agent, member, owner, shareholder, partner or a self-employed contractor for a
+							Client; unless full disclosure of the relationship is provided to the Company and
+							they give express consent for you to act.</p>
+						</li>
+					</ol>
+				</li>
+				<li>
+					<p>You must not allow any other third party including friends or other family members to
+					provide the Services without the prior written approval of the Company.</p>
+				</li>
+			</ol>
+		</li>
+		<li class="mb-4">
+			<p>FEES</p>
+			<ol>
+				<li>
+					<p>Where expressly stipulated at the time that you accept an Assignment, you will receive payment
+					in respect of your provision of Services for an Assignment. The amount of the payment will be
+					stipulated in your Assignment. This payment will be processed following completion of the
+					Assignment by you provided that you have observed and performed the relevant obligations out
+					in these terms and conditions, and the Assignment (if any). Payment will be made by the Company
+					via BACS to your bank account within one week following completion of the relevant Services or
+					as stipulated in the Assignment particulars.</p>
+				</li>
+				<li>
+					<p>All fees received by you must be processed by you in accordance with your responsibilities as
+					stipulated within Clause 4.</p>
+				</li>
+			</ol>
+		</li>
+		<li class="mb-4">
+			<p>SELF-EMPLOYED STATUS</p>
+			<ol>
+				<li>
+					<p>You confirm that nothing in the course of our relationship shall render you to be an employee,
+					worker, agent or partner of the Company and you confirm that you will not hold yourself out as
+					such. Accordingly, you shall be fully responsible for and shall indemnify the Company for and in
+					respect of:</p>
+					<ol>
+						<li>
+							<p>any income tax, National Insurance and social security contributions and any other
+							liability, deduction, contribution, assessment or claim arising from or made in connection
+							with the performance of the Services Agreement where such recovery is not prohibited
+							by law;</p>
+						</li>
+						<li>
+							<p>all reasonable costs, expenses and any penalty, fine or interest incurred or payable by
+							the Company in connection with or in consequence of any such liability, deduction,
+							contribution, assessment or claim; and</p>
+						</li>
+						<li>
+							<p>any liability arising from any employment-related claim or any claim based on worker
+							status (including reasonable costs and expenses) brought by you against the Company
+							arising out of or in connection with your engagement by the Company.</p>
+						</li>
+					</ol>
+				</li>
+				<li>
+					<p>You confirm that the Company may at its option satisfy the indemnity as detailed above (in whole
+					or in part) by way of deduction from any payments due to you.</p>
+				</li>
+			</ol>
+		</li>
+		<li class="mb-4">
+			<p>LIABILITY</p>
+			<ol>
+				<li>
+					<p>This clause sets out the Company’s entire liability to you for all damages arising from breach of
+					agreement, tort (including negligence), and breach of statutory duty or otherwise.</p>
+				</li>
+				<li>
+					<p>Nothing in this agreement excludes or limits the liability of the Company for death or personal
+					injury caused by the Company’s negligence or for fraud or fraudulent misrepresentation.</p>
+				</li>
+				<li>
+					<p>Subject to clause 5.2, the Company shall not be liable to you for any loss of profit, loss of business,
+					loss of reputation or depletion of goodwill, loss of opportunity or for any indirect, consequential,
+					special or purely economic loss.</p>
+				</li>
+				<li>
+					<p>Subject to clause 5.2 and 5.3, the Company’s total liability to you arising under this agreement
+					shall be capped on a per claim basis at the lower of £500 or the payments made to you for the
+					three month period immediately prior to the date that your claim arose.</p>
+				</li>
+			</ol>
+		</li>
+
+		<li class="mb-4">
+			<p>TERMINATION</p>
+			<ol>
+				<li>
+					<p>The Company may terminate this agreement at any time. If the Company does terminate the
+					agreement, you will be notified in writing via the email address held by the Company at the time
+					of the termination.</p>
+				</li>
+				<li>
+					<p>You may terminate this agreement at any time by providing us with written notice which must be
+					sent to <a href="mailto:legal@check-policy.com">legal@check-policy.com</a>.</p>
+				</li>
+				<li>
+					<p>In the event that any aspect of the Assignment is found to be fraudulent, Check Policy reserves
+					the right to terminate this agreement with immediate effect and withhold any payments due.
+					Furthermore, your details may be disclosed to our Client for the purpose of investigating
+					allegations.</p>
+				</li>
+			</ol>
+		</li>
+
+		<li class="mb-4">
+			<p>GENERAL PROVISIONS</p>
+			<ol>
+				<li>
+					<p>If a court decides that any part of the agreement cannot be enforced, that particular part of the
+					agreement will not apply, but the rest of the agreement will. A waiver by a party of a breach of
+					any provision shall not be deemed a continuing waiver or a waiver of any subsequent breach of
+					the same or any other provisions. Failure or delay in exercising any right under the agreement
+					shall not prevent the exercise of that or any other right. You cannot assign or transfer any benefit,
+					burden, interest or obligation under the agreement. No person other than a party to this
+					agreement shall have any rights to enforce any terms of this agreement.</p>
+				</li>
+				<li>
+					<p>You must keep confidential all information that you receive in the course of providing the Services
+					and should not make any such information available to the public or to any third parties including
+					your friends or family without the Company’s prior written consent.</p>
+				</li>
+				<li>
+					<p>By entering into this agreement you consent to our use of your personal data in accordance with
+					our privacy policy which can be found here: <a href="https://check-policy.com">https://check-policy.com</a> - For the avoidance of
+					doubt we are obliged to include certain private data to our clients in order for them to rely upon
+					the report produced in support of their age verification and compliance procedures. In this regard
+					our report will include your name, date of birth, photograph and the date and time of visit to
+					their premises. This data is lawfully provided within the definitions of General Data Protection
+					Regulations as necessary in the performance of the tri partite contract between the parties.</p>
+				</li>
+				<li>
+					<p>This agreement and any dispute or claim arising out of or in connection with it or its subject
+					matter or formation (including non-contractual disputes or claims) shall be governed by and
+					construed in accordance with the law of England and Wales and the parties submit to the exclusive
+					jurisdiction of the courts of England and Wales to settle any such dispute or claim.</p>
+				</li>
+			</ol>
+		</li>
+
+	</ol>
+
+</div>

+ 23 - 0
views/terms_decline.php

@@ -0,0 +1,23 @@
+<div class="container mt-3 py-4">
+
+	<h2>Decline Terms and Conditions</h2>
+
+	<p>We are sorry that you have chosen not to accept our <a href="/terms-and-conditions">Terms and Conditions</a>.</p>
+
+	<p>Please select an action below:</p>
+
+	<div class="list-group">
+		<a class="list-group-item list-group-item-action" href="/account/deactivate">
+			<strong>Deactivate Account</strong><br />
+			Mark your account as deactivated. You will not be assigned any tests. You will be able to login to your account to reactivate your account and/or accept the Terms and Conditions if you choose to do so at a later date. You will be taken to a confirmation page before your account is deactivated.
+		</a>
+		<a class="list-group-item list-group-item-action text-danger" href="/account/delete">
+			<strong>Delete Account</strong><br />
+			Delete all personal identifiable information associated with your account. If you choose to use our services at a later date, you will be required to re-register. You will be taken to a confirmation page before your account is deleted.
+		</a>
+		<a class="list-group-item list-group-item-action text-success" href="/account/accept-terms">
+			<strong>Accept Terms and Conditions</strong>
+		</a>
+	</div>
+
+</div>