$mdb2 = getConnection();
// Try md5 password match first.
- $sql = "SELECT id FROM tt_users
- WHERE login = ".$mdb2->quote($login)." AND password = md5(".$mdb2->quote($password).") AND status = 1";
+ $sql = "SELECT id FROM tt_users".
+ " WHERE login = ".$mdb2->quote($login)." AND password = md5(".$mdb2->quote($password).") AND status = 1";
$res = $mdb2->query($sql);
if (is_a($res, 'PEAR_Error')) {
// Special handling for admin@localhost - search for an account with admin role with a matching password.
if ($login == 'admin@localhost') {
- $sql = "SELECT id, login FROM tt_users
- WHERE role = 1024 AND password = md5(".$mdb2->quote($password).") AND status = 1";
+ $sql = "SELECT u.id, u.login FROM tt_users u".
+ " LEFT JOIN tt_roles r on (u.role_id = r.id)".
+ " WHERE r.rank = 1024 AND password = md5(".$mdb2->quote($password).") AND u.status = 1";
$res = $mdb2->query($sql);
if (is_a($res, 'PEAR_Error')) {
die($res->getMessage());
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.17.83.4203 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.17.83.4204 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>