summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2011-06-01 14:30:29 +0200
committerPhilip Häusler <msquare@notrademark.de>2011-06-01 14:30:29 +0200
commit6ebee2c46ba11ce42e85b830189346b13514d497 (patch)
treee76538b0f667f29f859585af7998288cfcbd26e4
parent550467697f8b3ae0b5d15d1d3a2bc3f83b003ff8 (diff)
bootstrapping
-rw-r--r--config/.gitignore4
-rw-r--r--config/config_MessegeServer.php (renamed from includes/config_MessegeServer.php)0
-rw-r--r--default-conf/var_www_includes/config.php9
-rw-r--r--default-conf/var_www_includes/config_db.php2
-rw-r--r--includes/UserCVS.php5
-rw-r--r--includes/config_modem.php10
-rw-r--r--includes/crypt.php2
-rw-r--r--includes/error_handler.php2
-rw-r--r--includes/header.php4
-rw-r--r--includes/header_start.php4
-rw-r--r--includes/login_eingabefeld.php2
-rw-r--r--www-ssl/bootstrap.php12
-rw-r--r--www-ssl/css/base.css3
-rw-r--r--www-ssl/faq.php34
-rw-r--r--www-ssl/index.php20
-rw-r--r--www-ssl/logout.php19
-rw-r--r--www-ssl/makeuser.php10
-rw-r--r--www-ssl/nonpublic/index.php131
-rw-r--r--www-ssl/nonpublic/news.php14
19 files changed, 152 insertions, 135 deletions
diff --git a/config/.gitignore b/config/.gitignore
new file mode 100644
index 00000000..9b65d8f4
--- /dev/null
+++ b/config/.gitignore
@@ -0,0 +1,4 @@
+config_db.php
+config_jabber.php
+config_modem.php
+config.php
diff --git a/includes/config_MessegeServer.php b/config/config_MessegeServer.php
index ce7c7c3a..ce7c7c3a 100644
--- a/includes/config_MessegeServer.php
+++ b/config/config_MessegeServer.php
diff --git a/default-conf/var_www_includes/config.php b/default-conf/var_www_includes/config.php
index 4c8237f1..ca0c39c9 100644
--- a/default-conf/var_www_includes/config.php
+++ b/default-conf/var_www_includes/config.php
@@ -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 �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�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�r UpdateDB
$PentabarfXMLhost = "cccv.pentabarf.org";
$PentabarfXMLpath = "Xcal/conference/";
$PentabarfXMLEventID = "31";
diff --git a/default-conf/var_www_includes/config_db.php b/default-conf/var_www_includes/config_db.php
index d959be90..b49e5e0c 100644
--- a/default-conf/var_www_includes/config_db.php
+++ b/default-conf/var_www_includes/config_db.php
@@ -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());
diff --git a/includes/UserCVS.php b/includes/UserCVS.php
index 7798ee66..c062106f 100644
--- a/includes/UserCVS.php
+++ b/includes/UserCVS.php
@@ -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;
}
diff --git a/includes/config_modem.php b/includes/config_modem.php
deleted file mode 100644
index 2de37cb7..00000000
--- a/includes/config_modem.php
+++ /dev/null
@@ -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";
-?>
diff --git a/includes/crypt.php b/includes/crypt.php
index d511e4f4..8de22030 100644
--- a/includes/crypt.php
+++ b/includes/crypt.php
@@ -1,6 +1,6 @@
<?php
function PassCrypt($passwort) {
- include "config.php";
+ include "../../config/config.php";
switch ($crypt_system) {
case "crypt":
diff --git a/includes/error_handler.php b/includes/error_handler.php
index 5a58076b..42e561fc 100644
--- a/includes/error_handler.php
+++ b/includes/error_handler.php
@@ -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);
diff --git a/includes/header.php b/includes/header.php
index 6b206049..9fb882bf 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -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
diff --git a/includes/header_start.php b/includes/header_start.php
index 97b98fc3..70f986cf 100644
--- a/includes/header_start.php
+++ b/includes/header_start.php
@@ -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";
diff --git a/includes/login_eingabefeld.php b/includes/login_eingabefeld.php
index e68639cf..9e10271d 100644
--- a/includes/login_eingabefeld.php
+++ b/includes/login_eingabefeld.php
@@ -1,5 +1,5 @@
<?php
- include "config.php";
+ include "config/config.php";
?>
<form action="<?php echo $url . $ENGEL_ROOT; ?>nonpublic/index.php" method="post">
diff --git a/www-ssl/bootstrap.php b/www-ssl/bootstrap.php
new file mode 100644
index 00000000..3189c89a
--- /dev/null
+++ b/www-ssl/bootstrap.php
@@ -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);
+?> \ No newline at end of file
diff --git a/www-ssl/css/base.css b/www-ssl/css/base.css
index e5b1644a..b6017ad2 100644
--- a/www-ssl/css/base.css
+++ b/www-ssl/css/base.css
@@ -3,6 +3,9 @@
padding: 0;
}
+body {
+}
+
header {
display: block;
width: 100%;
diff --git a/www-ssl/faq.php b/www-ssl/faq.php
index 26c261da..472915e5 100644
--- a/www-ssl/faq.php
+++ b/www-ssl/faq.php
@@ -1,22 +1,24 @@
<?php
- $title = "Index";
- $header = "FAQ";
- include "../../camp2011/includes/header.php";
+require_once ('bootstrap.php');
- $SQL = "SELECT * FROM `FAQ`";
- $Erg = mysql_query($SQL, $con);
+$title = "FAQ";
+$header = "FAQ";
+include "includes/header.php";
- // anzahl Zeilen
- $Zeilen = mysql_num_rows($Erg);
+$SQL = "SELECT * FROM `FAQ`";
+$Erg = mysql_query($SQL, $con);
- for ($n = 0; $n < $Zeilen; $n++) {
- if (mysql_result($Erg, $n, "Antwort") != "") {
- echo "<dl>";
- echo "<dt>" . mysql_result($Erg, $n, "Frage") . "</dt>";
- echo "<dd>" . mysql_result($Erg, $n, "Antwort") . "</dd>";
- echo "</dl>";
- }
- }
+// anzahl Zeilen
+$Zeilen = mysql_num_rows($Erg);
- include "../../camp2011/includes/footer.php";
+for ($n = 0; $n < $Zeilen; $n++) {
+ if (mysql_result($Erg, $n, "Antwort") != "") {
+ echo "<dl>";
+ echo "<dt>" . mysql_result($Erg, $n, "Frage") . "</dt>";
+ echo "<dd>" . mysql_result($Erg, $n, "Antwort") . "</dd>";
+ echo "</dl>";
+ }
+}
+
+include "includes/footer.php";
?>
diff --git a/www-ssl/index.php b/www-ssl/index.php
index 4a34643c..cdec1559 100644
--- a/www-ssl/index.php
+++ b/www-ssl/index.php
@@ -1,15 +1,17 @@
<?php
- $title = "Start";
- $header = "Start";
- include "../includes/header.php";
+require_once ('bootstrap.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";
+$title = "Start";
+$header = "Start";
+include "includes/header.php";
- include "../includes/login_eingabefeld.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";
- echo "<h6>" . Get_Text("index_text4") . "</h6>";
+include "includes/login_eingabefeld.php";
- include "../includes/footer.php";
+echo "<h6>" . Get_Text("index_text4") . "</h6>";
+
+include "includes/footer.php";
?>
diff --git a/www-ssl/logout.php b/www-ssl/logout.php
index c137f48c..12b284f9 100644
--- a/www-ssl/logout.php
+++ b/www-ssl/logout.php
@@ -1,12 +1,15 @@
<?php
- include "../../camp2011/includes/config.php";
- // Die Session zerstoeren...
- session_start();
- session_destroy ();
- // und eine neue erstellen, damit kein Erzengelmenue angezeigt wird (falls sich ein Erzengel abmeldet...)
- session_start();
- header("HTTP/1.1 302 Moved Temporarily");
- header("Location: " . $url . $ENGEL_ROOT);
+// 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...)
+session_start();
+
+header("HTTP/1.1 302 Moved Temporarily");
+header("Location: " . $url . $ENGEL_ROOT);
?>
diff --git a/www-ssl/makeuser.php b/www-ssl/makeuser.php
index ae205a62..785de1e8 100644
--- a/www-ssl/makeuser.php
+++ b/www-ssl/makeuser.php
@@ -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";
?>
diff --git a/www-ssl/nonpublic/index.php b/www-ssl/nonpublic/index.php
index a4b2e975..add0fdd3 100644
--- a/www-ssl/nonpublic/index.php
+++ b/www-ssl/nonpublic/index.php
@@ -1,84 +1,77 @@
<?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");
- header("HTTP/1.1 302 Moved Temporarily");
- header("Location: ". $url. $ENGEL_ROOT. "nonpublic/news.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...
- LoginOK();
-}
-else
-{ // User ist noch nicht angemeldet
- $sql = "SELECT * FROM `User` WHERE `Nick`='". $_POST["user"]. "'";
- $userstring = mysql_query($sql, $con);
+if (!IsSet ($_POST["user"])) { // User ist bereits angemeldet... normaler Inhalt...
+ LoginOK();
+} else { // User ist noch nicht angemeldet
+ $sql = "SELECT * FROM `User` WHERE `Nick`='" . $_POST["user"] . "'";
+ $userstring = mysql_query($sql, $con);
+
+ // anzahl zeilen
+ $user_anz = mysql_num_rows($userstring);
- // anzahl zeilen
- $user_anz = mysql_num_rows($userstring);
+ if ($user_anz == 1) { // Check, ob User angemeldet wird...
+ if (mysql_result($userstring, 0, "Passwort") == PassCrypt($_POST["password"])) { // Passwort ok...
+ // Session wird eingeleitet und Session-Variablen gesetzt..
+ // session_start();
+ session_name("Himmel");
+ $_SESSION['UID'] = mysql_result($userstring, 0, "UID");
+ $_SESSION['Nick'] = mysql_result($userstring, 0, "Nick");
+ $_SESSION['Name'] = mysql_result($userstring, 0, "Name");
+ $_SESSION['Vorname'] = mysql_result($userstring, 0, "Vorname");
+ $_SESSION['Alter'] = mysql_result($userstring, 0, "Alter");
+ $_SESSION['Telefon'] = mysql_result($userstring, 0, "Telefon");
+ $_SESSION['Handy'] = mysql_result($userstring, 0, "Handy");
+ $_SESSION['DECT'] = mysql_result($userstring, 0, "DECT");
+ $_SESSION['email'] = mysql_result($userstring, 0, "email");
+ $_SESSION['ICQ'] = mysql_result($userstring, 0, "ICQ");
+ $_SESSION['jabber'] = mysql_result($userstring, 0, "jabber");
+ $_SESSION['Size'] = mysql_result($userstring, 0, "Size");
+ $_SESSION['Gekommen'] = mysql_result($userstring, 0, "Gekommen");
+ $_SESSION['Aktiv'] = mysql_result($userstring, 0, "Aktiv");
+ $_SESSION['Tshirt'] = mysql_result($userstring, 0, "Tshirt");
+ $_SESSION['Menu'] = mysql_result($userstring, 0, "Menu");
+ $_SESSION['color'] = mysql_result($userstring, 0, "color");
+ $_SESSION['Avatar'] = mysql_result($userstring, 0, "Avatar");
+ $_SESSION['Sprache'] = mysql_result($userstring, 0, "Sprache");
+ $_SESSION['Hometown'] = mysql_result($userstring, 0, "Hometown");
+ $_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
- if ($user_anz == 1) { // Check, ob User angemeldet wird...
- if (mysql_result($userstring, 0, "Passwort") == PassCrypt($_POST["password"])) { // Passwort ok...
- // Session wird eingeleitet und Session-Variablen gesetzt..
- // session_start();
- session_name("Himmel");
- $_SESSION['UID'] = mysql_result($userstring, 0, "UID");
- $_SESSION['Nick'] = mysql_result($userstring, 0, "Nick");
- $_SESSION['Name'] = mysql_result($userstring, 0, "Name");
- $_SESSION['Vorname'] = mysql_result($userstring, 0, "Vorname");
- $_SESSION['Alter'] = mysql_result($userstring, 0, "Alter");
- $_SESSION['Telefon'] = mysql_result($userstring, 0, "Telefon");
- $_SESSION['Handy'] = mysql_result($userstring, 0, "Handy");
- $_SESSION['DECT'] = mysql_result($userstring, 0, "DECT");
- $_SESSION['email'] = mysql_result($userstring, 0, "email");
- $_SESSION['ICQ'] = mysql_result($userstring, 0, "ICQ");
- $_SESSION['jabber'] = mysql_result($userstring, 0, "jabber");
- $_SESSION['Size'] = mysql_result($userstring, 0, "Size");
- $_SESSION['Gekommen'] = mysql_result($userstring, 0, "Gekommen");
- $_SESSION['Aktiv'] = mysql_result($userstring, 0, "Aktiv");
- $_SESSION['Tshirt'] = mysql_result($userstring, 0, "Tshirt");
- $_SESSION['Menu'] = mysql_result($userstring, 0, "Menu");
- $_SESSION['color'] = mysql_result($userstring, 0, "color");
- $_SESSION['Avatar'] = mysql_result($userstring, 0, "Avatar");
- $_SESSION['Sprache'] = mysql_result($userstring, 0, "Sprache");
- $_SESSION['Hometown'] = mysql_result($userstring, 0, "Hometown");
- $_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
-
- // CVS import Data
- $SQL = "SELECT * FROM `UserCVS` WHERE `UID`='".$_SESSION['UID']."'";
- $Erg_CVS = mysql_query($SQL, $con);
- $_SESSION['CVS'] = mysql_fetch_array($Erg_CVS);
-
- LoginOK();
- }
- else
- { // Passwort nicht ok...
- $ErrorText = "pub_index_pass_no_ok";
- } // Ende Passwort-Check
- }
- 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");
-if( isset($ErrorText))
- echo "<h2>". Get_Text($ErrorText). "</h2><br />\n";
-include ("../../../camp2011/includes/login_eingabefeld.php");
-include ("../../../camp2011/includes/footer.php");
+ // CVS import Data
+ $SQL = "SELECT * FROM `UserCVS` WHERE `UID`='" . $_SESSION['UID'] . "'";
+ $Erg_CVS = mysql_query($SQL, $con);
+ $_SESSION['CVS'] = mysql_fetch_array($Erg_CVS);
+ LoginOK();
+ } else { // Passwort nicht ok...
+ $ErrorText = "pub_index_pass_no_ok";
+ } // Ende Passwort-Check
+ } 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 ("includes/header.php");
+if (isset ($ErrorText))
+ echo "<h2>" . Get_Text($ErrorText) . "</h2><br />\n";
+include ("includes/login_eingabefeld.php");
+include ("includes/footer.php");
?>
diff --git a/www-ssl/nonpublic/news.php b/www-ssl/nonpublic/news.php
index 7cc9a193..16006c52 100644
--- a/www-ssl/nonpublic/news.php
+++ b/www-ssl/nonpublic/news.php
@@ -1,10 +1,12 @@
<?php
- $title = "Himmel";
- $header = "News";
- include "../../../camp2011/includes/header.php";
+require_once ('../bootstrap.php');
- echo "<a href=\"#Neu\">" . Get_Text(3) . "</a>";
- include "news_output.php";
+$title = "News";
+$header = "News";
+include "includes/header.php";
- include "../../../camp2011/includes/footer.php";
+echo "<a href=\"#Neu\">" . Get_Text(3) . "</a>";
+include "news_output.php";
+
+include "includes/footer.php";
?>