Changes to AgileBill

This commit is contained in:
Deon George
2009-08-03 14:10:16 +10:00
parent 0a22cfe22c
commit 27aee719b0
1051 changed files with 219109 additions and 117219 deletions

View File

@@ -76,7 +76,7 @@ class CORE_login_handler
$C_debug->alert($C_translate->translate('login_un_pw_failed','',''));
# reload the login page
$VAR["_page"] = 'account:login';
$VAR["_page"] = 'account:user_login';
# log as a failed login
$this->lock_check($VAR,"0",$VAR['_username']);
@@ -175,22 +175,6 @@ class CORE_login_handler
# log the successful login
$this->lock_check($VAR,"1",$id);
####################################################################
### Do any db_mapping
####################################################################
$sql = 'SELECT id FROM ' . AGILE_DB_PREFIX . 'module WHERE
site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND
name = ' . $db->qstr('db_mapping') . ' AND
status = ' . $db->qstr("1");
$result = $db->Execute($sql);
if($result->RecordCount() > 0)
{
include_once ( PATH_MODULES . 'db_mapping/db_mapping.inc.php' );
$db_map = new db_mapping;
$db_map->login ( $id );
}
}
@@ -201,13 +185,6 @@ class CORE_login_handler
global $C_debug, $C_translate;
$db = &DB();
# get the account id (for DB mapping):
$q = "SELECT account_id FROM ". AGILE_DB_PREFIX ."session WHERE
id = '" . SESS . "' AND
site_id = '" . DEFAULT_SITE . "'";
$result = $db->Execute($q);
$account_id = $result->fields['account_id'];
# logout the current session by editing the database record
$q = "UPDATE ". AGILE_DB_PREFIX ."session SET logged='0'
WHERE id = '" . SESS . "' AND
@@ -223,20 +200,6 @@ class CORE_login_handler
# logout success:
$C_debug->alert($C_translate->translate('logout_success','',''));
####################################################################
### Do any db_mapping
####################################################################
$sql = 'SELECT id FROM ' . AGILE_DB_PREFIX . 'module WHERE
site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND
name = ' . $db->qstr('db_mapping') . ' AND
status = ' . $db->qstr("1");
$result = $db->Execute($sql);
if($result->RecordCount() > 0) {
include_once ( PATH_MODULES . 'db_mapping/db_mapping.inc.php' );
$db_map = new db_mapping;
$db_map->logout ( $account_id );
}
}
@@ -244,6 +207,13 @@ class CORE_login_handler
function locked ($account_id)
{
global $C_list;
include_once(PATH_CORE.'list.inc.php');
$C_list = new CORE_list;
if (! $C_list->is_installed('login_lock'))
return false;
if($account_id != '')
$sql = " OR account_id = '$account_id' AND ";
else
@@ -259,6 +229,7 @@ class CORE_login_handler
$result = $db->Execute($q);
$i = 0;
while (!$result->EOF)
{
$i++;
@@ -354,4 +325,4 @@ class CORE_login_handler
}
}
}
?>
?>