if (file_exists($path . $photoID) && $photoID != '') { unlink($path . $photoID); } //<--- IF FILE EXISTS $_POST['photoId'] = ''; } //<<-- if valid if ($isValidUrlSoundCloud === 0) { $_POST['song_title'] = ''; $_POST['song'] = ''; $_POST['thumbnail_song'] = ''; } $error = 0; $pos_details_r_n = preg_replace('/(?:(?:\\r\\n|\\r|\\n)\\s*){2}/s', "\r\n\r\n", $_POST['add_post']); $pos_details_clean = trim($pos_details_r_n, "\r\n"); $_POST['token_id'] = _Function::idHash($_SESSION['authenticated']); $pos_details = _Function::checkText($pos_details_clean); $_POST['add_post'] = _Function::checkTextDb($_POST['add_post']); /* * ------------------------------------------- * If is greater than the default character * ------------------------------------------- */ if (mb_strlen($_POST['add_post'], 'utf8') > $admin->post_length) { $_POST['add_post'] = _Function::cropStringLimit($_POST['add_post'], $admin->post_length); } /* * ------------------------------------------- * isValidYoutube * ------------------------------------------- */
* Require/Include Files * ------------------------- */ require_once '../../class_ajax_request/classAjax.php'; include_once '../../application/functions.php'; include_once '../../application/DataConfig.php'; require_once '../../phpmailer/PHPMailerAutoload.php'; /* * -------------------------- * Instance Class * ------------------------- */ $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>