コード例 #1
0
         */
        $obj = new AjaxRequest();
        $admin = $obj->getSettings();
        $linkHash = sha1($_SERVER['REMOTE_ADDR'] . microtime() . mt_rand(1, 100000) . '%(asqWas8*)');
        $link = _Function::idHash($linkHash) . _Function::randomString(40, TRUE, TRUE, TRUE);
        $linkRecover = '' . URL_BASE . 'recover/?c=' . $link . '';
        // <------------------ DATA ----------->
        $_POST['email_recover'] = trim($_POST['email_recover']);
        $_POST['id_hash'] = $link;
        $emailAddress = $_POST['email_recover'];
        //================ * EMAIL * =================//
        if (!filter_var($emailAddress, FILTER_VALIDATE_EMAIL)) {
            echo json_encode(array('status' => 'false', 'html' => $_SESSION['LANG']['email_not_valid']));
        } else {
            //<<<--- DATABASE
            $res = $obj->recoverPass();
            /* EMAIL TEMPLATE */
            $messageEmail = '
			<table width="550" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif; font-size: 14px; color: #666;" align="center">
	<tbody>
		<tr>
			<td width="550" height="50" align="center" style="background: #fff;">
				<img style="width: 130px;" src="' . URL_BASE . 'public/img/logo.png" />
			</td>
		</tr>
		
		<tr>
			<td width="558" align="center" style="background: #FFF; line-height: 18px; padding: 10px;  border-bottom: 1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #DDD;">
				
				<p style="margin-bottom: 10px;">
					<strong>Recover Pass:</strong>