/** * @version 2.0 * @package Fiyo CMS * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE. **/ defined('_FINDEX_') or die('Access Denied'); $db = @new FQuery() or die; $db->connect(); $sql = $db->select(FDBPrefix . 'article_category', '*', "id={$_REQUEST['id']}"); $row = mysql_fetch_array($sql); if ($_SESSION['USER_LEVEL'] > $row['level']) { alert('info', 'Redirecting...'); alert('loading'); htmlRedirect('?app=article&act=category'); } ?> <script> $(function() { $(".parents").chosen({disable_search_threshold: 10, allow_single_deselect: true}); }); </script> <form method="post"> <div id="app_header"> <div class="warp_app_header"> <div class="app_title"><?php echo Edit_Category; ?> </div>
<?php /** * @version 2.0 * @package Fiyo CMS * @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE. **/ defined('_FINDEX_') or die('Access Denied'); if ($_SESSION['USER_LEVEL'] > 2) { alert('info', 'Redirecting...'); alert('loading'); htmlRedirect('?app=user&view=group'); } $db = @new FQuery() or die; $db->connect(); $sql = $db->select(FDBPrefix . "user_group", "*", "id={$_REQUEST['id']}"); $qr = mysql_fetch_array($sql); if ($qr['id'] == 1 or $qr['id'] == 2 or $qr['id'] == 3) { $dis = "readonly"; } else { $dis = null; } ?> <form method="post"> <div id="app_header"> <div class="warp_app_header"> <div class="app_title">User Group</div> <div class="app_link"> <button type="submit" class="btn btn-success" title="<?php echo Save;
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); } } } }