mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-20 09:58:04 +02: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 = new Template($phpgw_info["server"]["template_dir"]);
|
||||||
$t->set_file(array( "header" => "accounts.tpl",
|
$t->set_file(array( "header" => "accounts.tpl",
|
||||||
"row" => "accounts.tpl",
|
"row" => "accounts.tpl",
|
||||||
"footer" => "accounts.tpl" ));
|
"footer" => "accounts.tpl" ));
|
||||||
|
|
||||||
$t->set_block("header","row","footer");
|
$t->set_block("header","row","footer");
|
||||||
|
|
||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
if ($query) {
|
if ($query) {
|
||||||
$querymethod = " where firstname like '%$query%' OR lastname like '%$query%' OR loginid "
|
$querymethod = " where firstname like '%$query%' OR lastname like '%$query%' OR loginid "
|
||||||
. "like '%$query%' ";
|
. "like '%$query%' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw->db->query("select count(*) from accounts $querymethod");
|
$phpgw->db->query("select count(*) from accounts $querymethod");
|
||||||
@ -60,7 +60,7 @@
|
|||||||
$t->parse("out","header");
|
$t->parse("out","header");
|
||||||
|
|
||||||
$phpgw->db->query("select con,firstname,lastname,loginid from accounts $querymethod "
|
$phpgw->db->query("select con,firstname,lastname,loginid from accounts $querymethod "
|
||||||
. "$ordermethod limit $limit");
|
. "$ordermethod limit $limit");
|
||||||
|
|
||||||
while ($phpgw->db->next_record()) {
|
while ($phpgw->db->next_record()) {
|
||||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
$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("actionurl",$phpgw->link("newaccount.php"));
|
||||||
$t->set_var("lang_add",lang_common("add"));
|
$t->set_var("lang_add",lang_common("add"));
|
||||||
$t->set_var("lang_search",lang_common("search"));
|
$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
|
// When I am updating my server, I don't want people logging in a messing
|
||||||
// things up.
|
// things up.
|
||||||
|
|
||||||
function deny_login()
|
function deny_login()
|
||||||
{
|
{
|
||||||
global $tmpl;
|
global $tmpl;
|
||||||
@ -45,11 +44,9 @@
|
|||||||
function show_cookie()
|
function show_cookie()
|
||||||
{
|
{
|
||||||
global $phpgw_info, $code, $lastloginid, $login;
|
global $phpgw_info, $code, $lastloginid, $login;
|
||||||
if ($code != 5 && $phpgw_info["server"]["usecookies"] == True){
|
|
||||||
if (!empty($login)) {
|
if ($code != 5) {
|
||||||
SetCookie("lastloginid",$login, time() + (24 * 3600 * 14),"/");
|
return $lastloginid;
|
||||||
}
|
|
||||||
return $lastloginid;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,28 +74,28 @@
|
|||||||
/* Program starts here */
|
/* Program starts here */
|
||||||
|
|
||||||
if ($deny_login) {
|
if ($deny_login) {
|
||||||
deny_login();
|
deny_login();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($submit) {
|
if ($submit) {
|
||||||
if (getenv(REQUEST_METHOD) != "POST") {
|
if (getenv(REQUEST_METHOD) != "POST") {
|
||||||
Header("Location: " . $phpgw->link("", "code=5"));
|
Header("Location: " . $phpgw->link("", "code=5"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$sessionid = $phpgw->session->create($login,$passwd);
|
$sessionid = $phpgw->session->create($login,$passwd);
|
||||||
if (!$sessionid) {
|
if (! $sessionid) {
|
||||||
Header("Location: " . $phpgw_info["server"]["webserver_url"] . "/login.php?cd=5");
|
Header("Location: " . $phpgw_info["server"]["webserver_url"] . "/login.php?cd=5");
|
||||||
} else {
|
} else {
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]) . "/", "cd=yes");
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]) . "/", "cd=yes");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ($last_loginid) {
|
if ($last_loginid) {
|
||||||
$phpgw->db->query("select value from preferences where owner='$last_loginid' "
|
$phpgw->db->query("select value from preferences where owner='$last_loginid' "
|
||||||
. "and name='lang'");
|
. "and name='lang'");
|
||||||
$phpgw->db->next_record();
|
$phpgw->db->next_record();
|
||||||
if (! $phpgw->db->f("value")) {
|
if (! $phpgw->db->f("value")) {
|
||||||
$users_lang = "en";
|
$users_lang = "en";
|
||||||
// } else {
|
// } else {
|
||||||
// $users_lang = $phpgw->db->f("value");
|
// $users_lang = $phpgw->db->f("value");
|
||||||
// include($phpgw_info["server"]["include_root"] . "/lang/$users_lang/" . $users_lang
|
// 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("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("cd",check_logoutcode($cd));
|
||||||
$tmpl->set_var("cookie",show_cookie());
|
$tmpl->set_var("cookie",show_cookie());
|
||||||
$tmpl->set_var("lang_username",lang_login("username"));
|
$tmpl->set_var("lang_username",lang_login("username"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user