mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
A few small random changes
This commit is contained in:
parent
9c1ca50d7c
commit
ad1bddfcf7
@ -16,8 +16,8 @@
|
||||
|
||||
$t = new Template($phpgw_info["server"]["template_dir"]);
|
||||
$t->set_file(array( "header" => "accounts.tpl",
|
||||
"row" => "accounts.tpl",
|
||||
"footer" => "accounts.tpl" ));
|
||||
"row" => "accounts.tpl",
|
||||
"footer" => "accounts.tpl" ));
|
||||
|
||||
$t->set_block("header","row","footer");
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
if ($query) {
|
||||
$querymethod = " where firstname like '%$query%' OR lastname like '%$query%' OR loginid "
|
||||
. "like '%$query%' ";
|
||||
. "like '%$query%' ";
|
||||
}
|
||||
|
||||
$phpgw->db->query("select count(*) from accounts $querymethod");
|
||||
@ -60,7 +60,7 @@
|
||||
$t->parse("out","header");
|
||||
|
||||
$phpgw->db->query("select con,firstname,lastname,loginid from accounts $querymethod "
|
||||
. "$ordermethod limit $limit");
|
||||
. "$ordermethod limit $limit");
|
||||
|
||||
while ($phpgw->db->next_record()) {
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
@ -96,6 +96,7 @@
|
||||
|
||||
}
|
||||
|
||||
$t->set_var("hidden_vars",$phpgw->form_sessionid());
|
||||
$t->set_var("actionurl",$phpgw->link("newaccount.php"));
|
||||
$t->set_var("lang_add",lang_common("add"));
|
||||
$t->set_var("lang_search",lang_common("search"));
|
||||
|
30
login.php
30
login.php
@ -31,7 +31,6 @@
|
||||
|
||||
// When I am updating my server, I don't want people logging in a messing
|
||||
// things up.
|
||||
|
||||
function deny_login()
|
||||
{
|
||||
global $tmpl;
|
||||
@ -45,11 +44,9 @@
|
||||
function show_cookie()
|
||||
{
|
||||
global $phpgw_info, $code, $lastloginid, $login;
|
||||
if ($code != 5 && $phpgw_info["server"]["usecookies"] == True){
|
||||
if (!empty($login)) {
|
||||
SetCookie("lastloginid",$login, time() + (24 * 3600 * 14),"/");
|
||||
}
|
||||
return $lastloginid;
|
||||
|
||||
if ($code != 5) {
|
||||
return $lastloginid;
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,28 +74,28 @@
|
||||
/* Program starts here */
|
||||
|
||||
if ($deny_login) {
|
||||
deny_login();
|
||||
deny_login();
|
||||
}
|
||||
|
||||
if ($submit) {
|
||||
if (getenv(REQUEST_METHOD) != "POST") {
|
||||
Header("Location: " . $phpgw->link("", "code=5"));
|
||||
Header("Location: " . $phpgw->link("", "code=5"));
|
||||
}
|
||||
|
||||
$sessionid = $phpgw->session->create($login,$passwd);
|
||||
if (!$sessionid) {
|
||||
Header("Location: " . $phpgw_info["server"]["webserver_url"] . "/login.php?cd=5");
|
||||
if (! $sessionid) {
|
||||
Header("Location: " . $phpgw_info["server"]["webserver_url"] . "/login.php?cd=5");
|
||||
} else {
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]) . "/", "cd=yes");
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]) . "/", "cd=yes");
|
||||
}
|
||||
|
||||
} else {
|
||||
if ($last_loginid) {
|
||||
$phpgw->db->query("select value from preferences where owner='$last_loginid' "
|
||||
. "and name='lang'");
|
||||
$phpgw->db->next_record();
|
||||
if (! $phpgw->db->f("value")) {
|
||||
$users_lang = "en";
|
||||
$phpgw->db->query("select value from preferences where owner='$last_loginid' "
|
||||
. "and name='lang'");
|
||||
$phpgw->db->next_record();
|
||||
if (! $phpgw->db->f("value")) {
|
||||
$users_lang = "en";
|
||||
// } else {
|
||||
// $users_lang = $phpgw->db->f("value");
|
||||
// include($phpgw_info["server"]["include_root"] . "/lang/$users_lang/" . $users_lang
|
||||
@ -107,6 +104,7 @@
|
||||
}
|
||||
}
|
||||
$tmpl->set_var("login_url", $phpgw_info["server"]["webserver_url"] . "/login.php");
|
||||
$tmpl->set_var("website_title", $phpgw_info["server"]["site_title"]);
|
||||
$tmpl->set_var("cd",check_logoutcode($cd));
|
||||
$tmpl->set_var("cookie",show_cookie());
|
||||
$tmpl->set_var("lang_username",lang_login("username"));
|
||||
|
Loading…
Reference in New Issue
Block a user