<?php

	$extra = null;

	if(!login_control()) {



		if($settings['forgot_system'] == 0){

			header('Location:'.site());

			exit();

		}



		$title = "{FORGOT_PAGE_TITLE}";

		require view("forgot");

		$dcq = $db->from('integrations')->where('app_id', 1)->first();

		$recaptcha = json_decode($dcq['app_data'], true);

		$recaptcha_text = "";

		$recaptcha_text = '<div class="form-group">

								<div class="g-recaptcha" data-sitekey="'.$recaptcha["site_key"].'"></div>

							</div>';



		$integration = "";

		foreach($plugins as $plugin){



			if ($plugin['app_id'] !== 1 && $plugin['app_id'] !== 2 && $plugin['app_id'] !== 3 && $plugin['app_id'] !== 4 && $plugin['app_id'] !== 5) {



				@$data = json_decode($plugin['app_data'], true);



				if(@$data['visibility'] == 1){

					@$integration .= $data['code'];

				}elseif(@$data['visibility'] == 2){

					@$integration .= $data['code'];

				}



			}



		}



		$extra = [

			"{INTEGRATIONS}" => $integration,

			"{reCAPTCHA}" => $recaptcha_text

		];

	} else {

		require controller("404");

	}

	$output = ob_get_clean();

	echo replace($output, $extra);