Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / var / www / html / sman1baleendah_sch_id / tiny_mce / plugins / ajaxfilemanager / inc / | server ip : 172.67.156.115 your ip : 172.71.254.190 H O M E |
Filename | /var/www/html/sman1baleendah_sch_id/tiny_mce/plugins/ajaxfilemanager/inc/class.auth.php |
Size | 1.57 kb |
Permission | rwxr-xr-x |
Owner | root : root |
Create time | 11-Jun-2025 21:32 |
Last modified | 11-Jun-2025 21:32 |
Last accessed | 06-Jul-2025 01:05 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
/**
* the purpose I added this class is to make the file system much flexible
* for customization.
* Actually, this is a kind of interface and you should modify it to fit your system
* @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
* @link www.phpletter.com
* @since 4/August/2007
*/
class Auth
{
var $__loginIndexInSession = 'ajax_user';
function __construct()
{
}
function Auth()
{
$this->__construct();
}
/**
* check if the user has logged
*
* @return boolean
*/
function isLoggedIn()
{
return (!empty($_SESSION[$this->__loginIndexInSession])?true:false);
}
/**
* validate the username & password
* @return boolean
*
*/
function login()
{
include "../../../functions/fungsi_pass.php";
if (!isset($_SESSION['Admin'])) {
$username = $_SESSION['User']['username'];
$password = $_SESSION['User']['password'];
//$password = addslashes($_POST['password']);
$cekpass = md5(addslashes($_POST['password']));
// echo $username."<br>".$password;
// exit;
}
else {
$username = $_SESSION['Admin']['username'];
$password = $_SESSION['Admin']['password'];
$cekpass = hex($_POST['password'],82);
}
if($_POST['username'] == $username && $cekpass == $password)
{
$_SESSION[$this->__loginIndexInSession] = true;
return true;
}else
{
return false;
}
}
}
?>
/**
* the purpose I added this class is to make the file system much flexible
* for customization.
* Actually, this is a kind of interface and you should modify it to fit your system
* @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
* @link www.phpletter.com
* @since 4/August/2007
*/
class Auth
{
var $__loginIndexInSession = 'ajax_user';
function __construct()
{
}
function Auth()
{
$this->__construct();
}
/**
* check if the user has logged
*
* @return boolean
*/
function isLoggedIn()
{
return (!empty($_SESSION[$this->__loginIndexInSession])?true:false);
}
/**
* validate the username & password
* @return boolean
*
*/
function login()
{
include "../../../functions/fungsi_pass.php";
if (!isset($_SESSION['Admin'])) {
$username = $_SESSION['User']['username'];
$password = $_SESSION['User']['password'];
//$password = addslashes($_POST['password']);
$cekpass = md5(addslashes($_POST['password']));
// echo $username."<br>".$password;
// exit;
}
else {
$username = $_SESSION['Admin']['username'];
$password = $_SESSION['Admin']['password'];
$cekpass = hex($_POST['password'],82);
}
if($_POST['username'] == $username && $cekpass == $password)
{
$_SESSION[$this->__loginIndexInSession] = true;
return true;
}else
{
return false;
}
}
}
?>