bootstrapping

This commit is contained in:
Philip Häusler 2011-06-01 14:30:29 +02:00
parent 550467697f
commit 6ebee2c46b
19 changed files with 152 additions and 135 deletions

4
config/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
config_db.php
config_jabber.php
config_modem.php
config.php

View File

@ -5,6 +5,9 @@ $url = "https://SEDENGELURL";
// Startverzeichnis des Engelhome
$ENGEL_ROOT = "/";
// Default-Theme auf der Startseite, 1=style1.css usw.
$default_theme = 10;
// System disable message, ist ist set is: bages schow only this text
//$SystemDisableMessage="<H1>This system ist moved to a server in the BCC, you can in the moment only youse it in the in Engel Room</H1>";
@ -16,7 +19,7 @@ $LETZTES_AUSTRAGEN=3;
//Setzt den zu verwendenden Crypto algorismis
// mp5 oder crypt
// achtung crypt schaltet password ändern ab
// achtung crypt schaltet password <EFBFBD>ndern ab
$crypt_system="md5";
//$crypt_system="crypt";
@ -26,7 +29,7 @@ $arch_angels="fnord";
// timezonen offsett
$gmdateOffset=3600;
// für Developen 1, sonst = 0
// f<EFBFBD>r Developen 1, sonst = 0
$debug = 0;
// SSL Cert-KEY
@ -42,7 +45,7 @@ $Tempdir="./tmp";
// local timezone
date_default_timezone_set("Europe/Berlin");
//Pentabarf ConferenzDI für UpdateDB
//Pentabarf ConferenzDI f<EFBFBD>r UpdateDB
$PentabarfXMLhost = "cccv.pentabarf.org";
$PentabarfXMLpath = "Xcal/conference/";
$PentabarfXMLEventID = "31";

View File

@ -1,5 +1,5 @@
<?php
include("funktion_db.php");
include("../include/funktion_db.php");
$con = mysql_connect("localhost", "root", "changeme") or die ("connection failed");
$sel = mysql_select_db("tabel") or die (mysql_error());

View File

@ -20,13 +20,14 @@
}
// pagename ermitteln
$Page["Name"] = basename($_SERVER['PHP_SELF']);
//$Page["Name"] = basename($_SERVER['PHP_SELF']);
$Page["Name"] = str_replace($ENGEL_ROOT, '', $_SERVER['PHP_SELF']);
//recht fuer diese seite auslesen
if(isset($_SESSION['CVS'][$Page["Name"]]))
$Page["CVS"] = $_SESSION['CVS'][$Page["Name"]];
else {
echo "SYSTEM ERROR: now right for " . $Page["Name"] . " exists.";
echo "SYSTEM ERROR: no right for " . $Page["Name"] . " exists.";
die;
}

View File

@ -1,10 +0,0 @@
<?php
// ist ein modem angeschlossen
$ModemEnable = false;
// COM port
$ModemDev = "/dev/ttyS0";
// vorwahl, bei tnovis telefonanlage fuer das programmieren von weckrufen
$WakeupNumber = "**3";
?>

View File

@ -1,6 +1,6 @@
<?php
function PassCrypt($passwort) {
include "config.php";
include "../../config/config.php";
switch ($crypt_system) {
case "crypt":

View File

@ -100,7 +100,7 @@
function send_message(&$message)
{
chdir(dirname(__FILE__));
require_once('./config_jabber.php');
require_once('../config/config_jabber.php');
if (isset($jabber_recipient) && count($jabber_recipient)) {
$jabber = new Jabber($server, $port, $username, $password, $resource);

View File

@ -17,7 +17,9 @@ echo "<!DOCTYPE html>\n";
<meta name="revisit-after" content="1 days" />
<script type="text/javascript" src="css/grossbild.js"></script>
<link rel="stylesheet" type="text/css" href="css/base.css" />
<link rel="stylesheet" type="text/css" href="css/style<?php echo isset($_SESSION['color']) ? $_SESSION['color'] : "6" ?>.css" />
<link rel="stylesheet" type="text/css" href="css/style<?php echo isset($_SESSION['color']) ? $_SESSION['color'] : $default_theme ?>.css" />
<link rel="stylesheet" type="text/css" href="../css/base.css" />
<link rel="stylesheet" type="text/css" href="../css/style<?php echo isset($_SESSION['color']) ? $_SESSION['color'] : $default_theme ?>.css" />
<?php

View File

@ -1,9 +1,9 @@
<?php
ini_set("session.gc_maxlifetime", "65535");
include "config.php";
include "config/config.php";
include "error_handler.php";
include "config_db.php";
include "config/config_db.php";
include "funktion_lang.php";
include "funktion_faq.php"; // fuer noAnswer() im menu
include "funktion_menu.php";

View File

@ -1,5 +1,5 @@
<?php
include "config.php";
include "config/config.php";
?>
<form action="<?php echo $url . $ENGEL_ROOT; ?>nonpublic/index.php" method="post">

12
www-ssl/bootstrap.php Normal file
View File

@ -0,0 +1,12 @@
<?php
// path and include settings
$rootpath = str_replace(DIRECTORY_SEPARATOR . 'bootstrap.php', '', __FILE__);
define('ROOTPATH', $rootpath);
$includePath = ini_get('include_path');
$includePath .= PATH_SEPARATOR . ROOTPATH . DIRECTORY_SEPARATOR . '..';
ini_set('include_path', $includePath);
?>

View File

@ -3,6 +3,9 @@
padding: 0;
}
body {
}
header {
display: block;
width: 100%;

View File

@ -1,7 +1,9 @@
<?php
$title = "Index";
require_once ('bootstrap.php');
$title = "FAQ";
$header = "FAQ";
include "../../camp2011/includes/header.php";
include "includes/header.php";
$SQL = "SELECT * FROM `FAQ`";
$Erg = mysql_query($SQL, $con);
@ -18,5 +20,5 @@
}
}
include "../../camp2011/includes/footer.php";
include "includes/footer.php";
?>

View File

@ -1,15 +1,17 @@
<?php
require_once ('bootstrap.php');
$title = "Start";
$header = "Start";
include "../includes/header.php";
include "includes/header.php";
echo "<p>" . Get_Text("index_text1") . "</p>\n";
echo "<p>" . Get_Text("index_text2") . "</p>\n";
echo "<p>" . Get_Text("index_text3") . "</p>\n";
include "../includes/login_eingabefeld.php";
include "includes/login_eingabefeld.php";
echo "<h6>" . Get_Text("index_text4") . "</h6>";
include "../includes/footer.php";
include "includes/footer.php";
?>

View File

@ -1,7 +1,10 @@
<?php
include "../../camp2011/includes/config.php";
// Die Session zerstoeren...
// Die Session zerstoeren usw
require_once ('bootstrap.php');
include "config/config.php";
session_start();
session_destroy();
// und eine neue erstellen, damit kein Erzengelmenue angezeigt wird (falls sich ein Erzengel abmeldet...)

View File

@ -3,10 +3,10 @@
$header = "";
$success = "none";
include "../../camp2011/includes/config.php";
include "../../camp2011/includes/header.php";
include "../../camp2011/includes/config_db.php";
include "../../camp2011/includes/crypt.php";
include "../config/config.php";
include "../includes/header.php";
include "../config/config_db.php";
include "../includes/crypt.php";
if(isset($_POST["send"])) {
$eNick = trim($_POST["Nick"]);
@ -177,5 +177,5 @@
Print_Text("makeuser_text3");
}
include "../../camp2011/includes/footer.php";
include "../includes/footer.php";
?>

View File

@ -1,25 +1,23 @@
<?PHP
include ('../bootstrap.php');
$title = "Index";
$header = "Index";
include ("../../../camp2011/includes/config_db.php");
include ("../../../camp2011/includes/crypt.php");
include ("config/config_db.php");
include ("includes/crypt.php");
session_start(); // alte Session - falls vorhanden - wiederherstellen...
function LoginOK()
{
include ("../../../camp2011/includes/config.php");
function LoginOK() {
include ("../../config/config.php");
header("HTTP/1.1 302 Moved Temporarily");
header("Location: " . $url . $ENGEL_ROOT . "nonpublic/news.php");
}
if ( !IsSet($_POST["user"]))
{ // User ist bereits angemeldet... normaler Inhalt...
if (!IsSet ($_POST["user"])) { // User ist bereits angemeldet... normaler Inhalt...
LoginOK();
}
else
{ // User ist noch nicht angemeldet
} else { // User ist noch nicht angemeldet
$sql = "SELECT * FROM `User` WHERE `Nick`='" . $_POST["user"] . "'";
$userstring = mysql_query($sql, $con);
@ -59,26 +57,21 @@ else
$_SESSION['CVS'] = mysql_fetch_array($Erg_CVS);
LoginOK();
}
else
{ // Passwort nicht ok...
} else { // Passwort nicht ok...
$ErrorText = "pub_index_pass_no_ok";
} // Ende Passwort-Check
}
else
{ // Anzahl der User in User-Tabelle <> 1 --> keine Anmeldung
} else { // Anzahl der User in User-Tabelle <> 1 --> keine Anmeldung
if ($user_anz == 0)
$ErrorText = "pub_index_User_unset";
else
$ErrorText = "pub_index_User_more_as_one";
} // Ende Check, ob User angemeldet wurde
}
include ("../../../camp2011/includes/header.php");
include ("includes/header.php");
if (isset ($ErrorText))
echo "<h2>" . Get_Text($ErrorText) . "</h2><br />\n";
include ("../../../camp2011/includes/login_eingabefeld.php");
include ("../../../camp2011/includes/footer.php");
include ("includes/login_eingabefeld.php");
include ("includes/footer.php");
?>

View File

@ -1,10 +1,12 @@
<?php
$title = "Himmel";
require_once ('../bootstrap.php');
$title = "News";
$header = "News";
include "../../../camp2011/includes/header.php";
include "includes/header.php";
echo "<a href=\"#Neu\">" . Get_Text(3) . "</a>";
include "news_output.php";
include "../../../camp2011/includes/footer.php";
include "includes/footer.php";
?>