Änderungen von emergence sind integriert
Ich habe jetzt die index.php im contenido-Verzeichnis umgewandelt, so dass bei Bedarf automatisch eine SSL (https:) Verbindung aufgebaut wird. Der Bedarf wird in der config.php geregelt.
Vielleicht ist es die Änderung wert, mit übernommen zu werden.
.../contenido/index.php
Code: Alles auswählen
<?php
/*****************************************
* File : main.php // index.php!
* Project : Contenido
* Descr : Contenido main file
*
* Authors : Olaf Niemann
* Jan Lengowski
*
* Created : 20.01.2003
* Modified : 23.01.2003 11.2.2006 Florian Behrendt
* SSL Verbindung abfragen
*
* © four for business AG, www.4fb.de
******************************************/
include_once ('./includes/startup.php');
/*' Eine SLL Verbindung aufbauen.' */
/* zuerst Test ob $ssl_required true ist */
// if ($ssl_required == true) {
if ($cfg["ssl_required"] == true) {
if (getenv('HTTPS') != 'on'){ // Nur SLL Verbindung erlaubt!
$url = getenv('SCRIPT_URI');
$urlneu = ereg_replace ("http://" ,"https://", strtolower($url));
header ("location: $urlneu");
die;
}
;} // if ssl_required
cInclude ("includes", 'functions.i18n.php');
cInclude ("classes", 'class.xml.php');
cInclude ("classes", 'class.navigation.php');
cInclude ("classes", 'class.template.php');
cInclude ("classes", 'class.backend.php');
cInclude ("includes", 'cfg_sql.inc.php');
page_open(
array('sess' => 'Contenido_Session',
'auth' => 'Contenido_Challenge_Crypt_Auth',
'perm' => 'Contenido_Perm'));
i18nInit($cfg["path"]["contenido"].$cfg["path"]["locale"], $belang);
cInclude ("includes", 'cfg_language_de.inc.php');
cInclude ("includes", 'functions.general.php');
cInclude ("includes", 'functions.forms.php');
$sess->register("belang");
// Create Contenido classes
$db = new DB_Contenido;
$tpl = new Template;
// Sprache wechseln
if (isset($changelang) && is_numeric($changelang))
{
$lang = $changelang;
}
// change Client
if (isset($changeclient) && is_numeric($changeclient)){
$client = $changeclient;
unset($lang);
}
if (!is_numeric($client) || $client == "") {
$sess->register("client");
$sql = "SELECT idclient FROM ".$cfg["tab"]["clients"]." ORDER BY idclient ASC";
$db->query($sql);
$db->next_record();
$client = $db->f("idclient");
} else {
$sess->register("client");
}
if (!is_numeric($lang) || $lang == "") {
$sess->register("lang");
// search for the first language of this client
$sql = "SELECT * FROM ".$cfg["tab"]["lang"]." AS A, ".$cfg["tab"]["clients_lang"]." AS B WHERE A.idlang=B.idlang AND idclient='$client' ORDER BY A.idlang ASC";
$db->query($sql);
$db->next_record();
$lang = $db->f("idlang");
} else {
$sess->register("lang");
}
$perm->load_permissions();
if (isset($area)) {
$sess_area = $area;
} else {
$area = (isset($sess_area)) ? $sess_area : 'login';
}
$tpl->reset();
$tpl->set('s', 'HEADER', $sess->url('header.php?changelang='.$lang.'&changeclient='.$client));
$tpl->set('s', 'CONTENT', $sess->url('frameset.php?area=mycontenido&frame=1&menuless=1&changelang='.$changelang.'&lang='.$lang.'&client='.$client));
$tpl->set('s', 'VERSION', $cfg["version"]);
$tpl->set('s', 'CONTENIDOPATH', $cfg["path"]["contenido_fullhtml"]."favicon.ico");
$tpl->generate($cfg['path']['templates'] . $cfg['templates']['frameset']);
page_close();
?>
Code: Alles auswählen
/* SLL Verbindung erforderlich */
$cfg['ssl_required'] = true; // false
Gruß
Florian