function checkHomePage() { $link = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; //check curent paging $a = strpos($_SERVER['REQUEST_URI'], "?page="); if ($a !== 0) { $page = substr($_SERVER['REQUEST_URI'], $a + 6); } $link = @str_replace("?page={$page}", "", $link); $link = str_replace("index.php", "", $link); if (FUrl('auto') == $link or empty($link)) { return true; } else { if (isset($_REQUEST['link'])) { $c = check_permalink('permalink', @$_REQUEST['link'], 'link'); $b = homeInfo('link'); if ($c == $b) { return true; } } else { return false; } } }
} if (isset($_POST['forgot'])) { if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) { define("userNotice", alert("error", user_Email_None)); } else { $qr = $db->select(FDBPrefix . "user", "*", "status=1 AND email='{$_POST['email']}'"); $qr = mysql_fetch_array($qr); $jml = mysql_affected_rows(); if ($jml) { $reminder = randomString(32); $_SESSION['USER_REMINDER'] = $reminder; $_SESSION['USER_REMINDER_ID'] = $qr['id']; $reminder = "app=user&res={$reminder}"; $to = "{$_POST['email']}"; $webmail = siteConfig('site_mail'); $domain = substr(FUrl(), 0, strpos(FUrl(), "/")); if (empty($webmail)) { } $webmail = "noreply@{$domain}"; if (siteConfig('lang') == 'id') { $subject = 'Konfirmasi Reset Password'; $message = "<font color='#333'>\n\t\t\t\t<p>Hi, {$qr['name']}</p> \n\t\t\t\t<p>Anda telah meminta kami untuk mengirimkan password baru.<br>Konfirmasi pesan ini dengan klik link konfirmasi berikut.</p>\n\t\t\t\t<p><a href='" . FUrl . "?{$reminder}' {$btnClass}> Konfirmasi Reset </a></p>\n\t\t\t\t<p>Pesan ini akan valid dalam 1-2 hari hingga Anda melakukan konfirmasi untuk reset password.<br>Jika Anda ingin membatalkan proses ini, abaikan saja email ini hingga kode kadaluarsa dalam 1-2 hari.</p>\n\t\t\t\t<p>Terimakasih.</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p><b>" . SiteTitle . "</b><br>" . FUrl . "</p></font>"; } else { $subject = 'Password Reset Confirmation'; $message = "<font color='#333'>\n\t\t\t\t<p>Hi, {$qr['name']}</p> \n\t\t\t\t<p>You have asked us to send you a new password.<br>Confirm this message by click the following link.</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p><a href='" . FUrl . "?{$reminder}' {$btnClass}> Reset Confirmation </a></p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p>This message will be valid within 1-2 days so you do confirm to reset the password.<br>If you want to cancel this process, ignore this letter to Expired code in 1-2 days.</p>\n\t\t\t\t<p>Thankyou.</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p><b>" . SiteTitle . "</b><br>" . FUrl . "</p></font>"; } // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= "To: {$qr['name']} <{$_POST['email']}>" . "\r\n";
function forgot_password() { if (isset($_POST['forgot_password'])) { $db = new FQuery(); $sql = $db->select(FDBPrefix . "user", "*", "status=1 AND email='{$_POST['email']}'"); $qr = mysql_affected_rows(); $qrs = mysql_fetch_array($sql); if ($qr < 1) { alert('error', Remember_Error); } else { $reminder = randomString(32); $_SESSION['USER_REMINDER'] = $reminder; $_SESSION['USER_REMINDER_ID'] = $qrs['id']; $reminder = "app=user&res={$reminder}"; $to = "{$_POST['email']}"; $webmail = siteConfig('site_mail'); $domain = str_replace("/", "", FUrl()); if (empty($webmail)) { $webmail = "no-reply@{$domain}"; } if (siteConfig('lang') == 'id') { $subject = 'Konfirmasi Reset Password'; $message = "<font color='#333'>\n\t\t\t<p>Halo, {$qrs['name']}</p> \n\t\t\t<p>Anda telah meminta kami untuk mengirimkan password baru.</p>\n\t\t\t<p>Konfirmasi pesan ini dengan klik link konfirmasi berikut.</p>\n\t\t\t<p> </p>\n\t\t\t<p><a href='" . FUrl . "?{$reminder}'>" . FUrl . "?{$reminder}</a></p>\n\t\t\t<p> </p>\n\t\t\t<p>Pesan ini akan valid dalam 1-2 hari hingga Anda melakukan konfirmasi untuk reset password.</p>\n\t\t\t<p>Jika Anda ingin membatalkan proses ini, abaikan saja email ini hingga kode kadaluarsa dalam 1-2 hari.</p>\n\t\t\t<p>Terimakasih.</p>\n\t\t\t<p> </p>\n\t\t\t<p> </p>\n\t\t\t<p><b>" . SiteTitle . "</b><br>" . FUrl . "</p></font>"; } else { $subject = 'Password Reset Confirmation'; $message = "<font color='#333'>\n\t\t\t<p>Hello, {$qrs['name']}</p> \n\t\t\t<p>You have asked us to send you a new password.</p>\n\t\t\t<p>Confirm this message by click the following link.</p>\n\t\t\t<p> </p>\n\t\t\t<p><a href='" . FUrl . "?{$reminder}'>" . FUrl . "?{$reminder}</a></p>\n\t\t\t<p> </p>\n\t\t\t<p>This message will be valid within 1-2 days so you do confirm to reset the password.</p>\n\t\t\t<p>If you want to cancel this process, ignore this letter to Expired code in 1-2 days.</p>\n\t\t\t<p>Thankyou.</p>\n\t\t\t<p> </p>\n\t\t\t<p> </p>\n\t\t\t<p><b>" . SiteTitle . "</b><br>" . FUrl . "</p></font>"; } // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= "To: {$qrs['name']} <{$_POST['email']}>" . "\r\n"; $headers .= "From: " . SiteTitle . "<{$webmail}>" . "\r\n"; $headers .= "cc :" . "\r\n"; $headers .= "Bcc :" . "\r\n"; // Mail it $mail = @mail($to, $subject, $message, $headers); if ($mail) { alert('info', Password_sent_to_mail); htmlRedirect("index.php", 3); } else { alert('error', Failed_send_mail); } } } }
*/ defined('_FINDEX_') or die('Access Denied'); if (siteConfig('member_registration')) { $new = "<a class='register' href='" . make_permalink('?app=user&view=register') . "'>Register</a>"; } $key = $_GET['key']; $sql = $db->select(FDBPrefix . "user", "*", "status=0 AND about='{$key}'"); $qrs = mysql_fetch_array($sql); $id = $qrs['id']; $time = $qrs['time_reg']; if (isset($_GET['key']) and !empty($_GET['key'])) { if (!empty($id)) { $linkLogin = make_permalink('?app=user&view=login'); $webmail = siteConfig('site_mail'); $webmail = siteConfig('site_mail'); $domain = str_replace("/", "", FUrl()); if (empty($webmail)) { $webmail = "no-reply@{$domain}"; } $email = userInfo('email', $id); $user = userInfo('user', $id); $name = userInfo('name', $id); $pass = userInfo('password', $id); $to = "{$email}"; if (siteConfig('lang') == 'id') { $subject = 'Informasi Data Akun'; $message = "<font color='#333'>\n\t\t\t\t<p>Halo, {$name}</p> \n\t\t\t\t<p>Selamat, akun Anda telah aktif dan bisa digunakan.</p>\n\t\t\t\t<p>Berikut adalah detil data akun Anda :</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p>Username = {$user}</p>\n\t\t\t\t<p>Password = {$pass}</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p>URL login : {$linkLogin}</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p>Jaga selalu kerahasiaan akun Anda untuk mencegah hal yang tidak diinginkan.</p>\n\t\t\t\t<p>Terimakasih.</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p><b>" . SiteTitle . "</b>" . FUrl . "</p></font>"; } else { $subject = 'New Account Information'; $message = "<font color='#333'>\n\t\t\t\t<p>Hello, {$name}</p> \n\t\t\t\t<p>Congratulations, your account has been activated and you can login now.</p>\n\t\t\t\t<p>Here are the details of your account data :</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p>Username = {$user}</p>\n\t\t\t\t<p>Password = {$pass}</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p>URL login : {$linkLogin}</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p>Please always keep the confidentiality of your account to prevent unwanted crimes.</p>\n\t\t\t\t<p>Thankyou.</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p><b>" . SiteTitle . "</b><br>" . FUrl . "</p></font>"; }
<?php /** * @version 2.0 * @package Fiyo CMS * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE. **/ defined('_FINDEX_') or die('Access Denied'); /********************************************/ /* Site Information */ /********************************************/ /* Define SEF Base URL */ define('FBase', FUrl()); define('FUrl', 'http://' . FBase); /* Define deed url */ define('_FEED_', app_param('feed')); /* SEF Information */ define('SEF_URL', siteConfig('sef_url')); define('SEF_EXT', siteConfig('sef_ext')); /* Site Information */ define('SiteUrl', siteConfig('site_url')); define('SiteTitle', siteConfig('site_title')); define('SiteName', siteConfig('site_name')); define('SiteLang', siteConfig('lang')); define('SiteOnline', siteConfig('site_status')); /* Title Information */ define('TitleType', siteConfig('title_type')); define('TitleDiv', siteConfig('title_divider')); /********************************************/ /* SEF Pagination */