Anmerkung zu neuer front_crcloginform.inc.php
Verfasst: Di 19. Sep 2006, 14:57
Ich habe mir nochmal den Code für die front_crcloginform.inc.php von hier:
http://www.contenido.org/forum/viewtopi ... 7336#87336
angeschaut. IMO wäre es besser, wenn die so anfängt:
Zum einen wird dadurch immer der absolute Pfad aus den Mandantenpfaden ausgelesen, zum anderen sollte $cfgClient auch zur Verfügung stehen, wenn wir die benutzen möchten.
http://www.contenido.org/forum/viewtopi ... 7336#87336
angeschaut. IMO wäre es besser, wenn die so anfängt:
Code: Alles auswählen
<?php
/******************************************
* File : front_crcloginform.inc.php
* Project : Contenido
* Descr : Login form
*
*
* Author : Jan Lengowski
* Created : 21.01.2003
* Modified : 21.01.2003
* Modified : 29.09.2005, Andreas Lindner
*
* © four for business AG
******************************************/
global $cfg, $cfgClient, $idcat, $idart, $idcatart, $lang, $client, $username;
$err_catart = trim(getEffectiveSetting("login_error_page", "idcatart", ""));
$err_cat = trim(getEffectiveSetting("login_error_page", "idcat", ""));
$err_art = trim(getEffectiveSetting("login_error_page", "idart", ""));
if ($err_catart!='') {
header("Location: ".$cfgClient[$client]["path"]["htmlpath"]."front_content.php?idcatart=".$err_catart);
}
if ($err_art!='' && $err_cat!='') {
header("Location: ".$cfgClient[$client]["path"]["htmlpath"]."front_content.php?idcat=".$err_cat."&idart=".$err_art);
}
if ($err_cat!='') {
header("Location: ".$cfgClient[$client]["path"]["htmlpath"]."front_content.php?idcat=".$err_cat);
}
if ($err_art!='') {
header("Location: ".$cfgClient[$client]["path"]["htmlpath"]."front_content.php?idart=".$err_art);
}
if (isset($_GET["return"]) || isset($_POST["return"])){
$loc = Array();
if ($idcat > 0) {
$loc[] = "idcat=$idcat";
}
if ($idart > 0) {
$loc[] = "idart=$idart";
}
if (isset($_POST["username"]) || isset($_GET["username"])){
$loc[]= "wrongpass=1";
}
header ("Location: ".$cfgClient[$client]["path"]["htmlpath"]."front_content.php?".implode("&", $loc));
}
?>
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
...