Fix include/template paths
parent
17fe6651c8
commit
d3f3ca5779
|
@ -15,7 +15,7 @@
|
|||
|
||||
echo '<table style="width:350px;margin-left:auto;margin-right:auto;margin-top:25px"><tr><th align="left" style="background-color: #FF8000;">Name</th><th align="left" style="background-color: #FF8000;">Region</th></tr>';
|
||||
$entryColor = TRUE;
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
while($row = $statement->fetch())
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
|
||||
$HTML = new HTML();
|
||||
|
|
16
app/HTML.php
16
app/HTML.php
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
class HTML
|
||||
{
|
||||
|
||||
//Hier wird der HTML Code zum Ausgeben vorbereitet.
|
||||
//Dieser kann aus einer fertigen HTML Seite ausgelesen werden, oder aber auch st<73>ck f<>r St<53>ck
|
||||
//Zusammen gebaut werden.
|
||||
|
@ -61,8 +60,9 @@
|
|||
}
|
||||
|
||||
public function importHTMLHeader($file){
|
||||
global $RUNTIME;
|
||||
//Der HTML Header wird aus einer Datei eingelesen und der bisherige gel<65>scht.
|
||||
$this->HTMLHeader = file_get_contents($file);
|
||||
$this->HTMLHeader = file_get_contents($RUNTIME['BASEDIR'].'/templates/'.$file);
|
||||
$this->isBuild = false;
|
||||
}
|
||||
|
||||
|
@ -90,8 +90,9 @@
|
|||
}
|
||||
|
||||
public function importHTMLMenu($file){
|
||||
global $RUNTIME;
|
||||
//Das Komplette Men<65> wird aus einer Datei ausgelesen und das alte <20>berschrieben.
|
||||
$this->DasMenu = file_get_contents($file);
|
||||
$this->DasMenu = file_get_contents($RUNTIME['BASEDIR'].'/templates/'.$file);
|
||||
$this->isBuild = false;
|
||||
}
|
||||
|
||||
|
@ -106,8 +107,9 @@
|
|||
//Der Seiten HTML Quelcode wird eingelesen.
|
||||
|
||||
public function importHTML($file){
|
||||
global $RUNTIME;
|
||||
//Der HTML Quelltext wird aus einer Datei eingelesen.
|
||||
$this->HTMLDatei = file_get_contents($file);
|
||||
$this->HTMLDatei = file_get_contents($RUNTIME['BASEDIR'].'/templates/'.$file);
|
||||
$this->isBuild = false;
|
||||
}
|
||||
|
||||
|
@ -138,8 +140,9 @@
|
|||
//Der inhalt der Seite wird zusammen gesetzt (nicht der quelltext) (%%EchoInhalt%%)
|
||||
|
||||
public function importSeitenInhalt($file){
|
||||
global $RUNTIME;
|
||||
//L<>d einen fertigen Text aus einer datei.
|
||||
$this->DerInhalt = file_get_contents($file);
|
||||
$this->DerInhalt = file_get_contents($RUNTIME['BASEDIR'].'/templates/'.$file);
|
||||
$this->isBuild = false;
|
||||
}
|
||||
|
||||
|
@ -150,8 +153,9 @@
|
|||
}
|
||||
|
||||
public function importAndAddSeitenInhalt($file){
|
||||
global $RUNTIME;
|
||||
//L<>d einen fertigen Text aus einer datei.
|
||||
$this->DerInhalt = $this->DerInhalt.file_get_contents($file);
|
||||
$this->DerInhalt = $this->DerInhalt.file_get_contents($RUNTIME['BASEDIR'].'/templates/'.$file);
|
||||
$this->isBuild = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
|
||||
$statement = $RUNTIME['PDO']->prepare("CREATE TABLE IF NOT EXISTS `iarstates` (`userID` VARCHAR(36) NOT NULL COLLATE 'utf8_unicode_ci', `filesize` BIGINT(20) NOT NULL DEFAULT '0', `iarfilename` VARCHAR(64) NOT NULL COLLATE 'utf8_unicode_ci', `running` INT(1) NOT NULL DEFAULT '0', PRIMARY KEY (`userID`) USING BTREE) COLLATE='utf8_unicode_ci' ENGINE=InnoDB;");
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
while($row = $statement->fetch())
|
||||
{
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
|
||||
$email = $opensim->getUserMail($row['PrincipalID']);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
if($result == FALSE || $result == "")
|
||||
{
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
|
||||
echo "Die Region ".$row['regionName']." von ".$opensim->getUserName($row['owner_uuid'])." ist nicht erreichbar.\n";
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ include_once("app/utils.php");
|
|||
include_once("app/HTML.php");
|
||||
|
||||
$RUNTIME = array();
|
||||
$RUNTIME['BASEDIR'] = __DIR__;
|
||||
include_once("config.php");
|
||||
|
||||
|
||||
if ($handle = opendir('./cron/'))
|
||||
{
|
||||
while (false !== ($entry = readdir($handle)))
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
date_default_timezone_set("Europe/Berlin");
|
||||
error_reporting(E_ALL);
|
||||
include_once("config.php");
|
||||
$RUNTIME['BASEDIR'] = __DIR__;
|
||||
set_include_path('.:'.$RUNTIME['BASEDIR']);
|
||||
|
||||
session_set_cookie_params([
|
||||
'lifetime' => 86400,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
|
||||
$HTML->setHTMLTitle("Dashboard");
|
||||
$HTML->importSeitenInhalt("../templates/dashboard-home.html");
|
||||
$HTML->importSeitenInhalt("dashboard-home.html");
|
||||
|
||||
$HTML->ReplaceSeitenInhalt("%%GLOBAL-USER-COUNT%%", $opensim->getUserCount());
|
||||
$HTML->ReplaceSeitenInhalt("%%GLOBAL-REGION-COUNT%%", $opensim->getRegionCount());
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
}
|
||||
|
||||
$HTML->setHTMLTitle("Online Anzeige");
|
||||
$HTML->importSeitenInhalt("../templates/online-anzeige.html");
|
||||
$HTML->importSeitenInhalt("online-anzeige.html");
|
||||
|
||||
$table = '<table class="table"><thead><tr><th scope="col">Name</th><th scope="col">Optionen</th></thead><tbody>%%ENTRY%%</tbody></table>';
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
|||
$FriendData = explode(";", $row['Friend']);
|
||||
$Friend = $FriendData[0];
|
||||
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
|
||||
$entry = '<tr><td>'.trim($opensim->getUserName($Friend)).'</td><td><a href="index.php?page=friends&action=remove&uuid='.$row['Friend'].'">LÖSCHEN</a></td></tr>';
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
die();
|
||||
}
|
||||
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
|
||||
$HTML->setHTMLTitle("Gruppen");
|
||||
$HTML->importSeitenInhalt("../templates/deine-regionen.html");
|
||||
$HTML->importSeitenInhalt("deine-regionen.html");
|
||||
|
||||
$table = '<table class="table"><thead><tr><th scope="col">Name</th><th scope="col">Gründer</th><th scope="col">Aktionen</th></thead><tbody>%%ENTRY%%</tbody></table>';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$HTML->setHTMLTitle("Identitäten");
|
||||
$HTML->importSeitenInhalt("../templates/identities.html");
|
||||
$HTML->importSeitenInhalt("identities.html");
|
||||
|
||||
$statementCreateTable = $RUNTIME['PDO']->prepare("CREATE TABLE IF NOT EXISTS `UserIdentitys` (`PrincipalID` VARCHAR(38) NOT NULL, `IdentityID` VARCHAR(38) NOT NULL, PRIMARY KEY (`IdentityID`))");
|
||||
$statementCreateTable->execute();
|
||||
|
@ -64,7 +64,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
|
||||
if(isset($_REQUEST['createIdent']) && isset($_REQUEST['newName']) && $_REQUEST['createIdent'] == "" && $_REQUEST['newName'] != "")
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
}
|
||||
|
||||
$HTML->setHTMLTitle("Benutzer");
|
||||
$HTML->importSeitenInhalt("../templates/users.html");
|
||||
$HTML->importSeitenInhalt("users.html");
|
||||
|
||||
|
||||
$HTML->ReplaceSeitenInhalt("%%link%%", ' ');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
$HTML = new HTML();
|
||||
$HTML->setHTMLTitle("Login");
|
||||
$HTML->importHTML("../templates/login.html");
|
||||
$HTML->importHTML("login.html");
|
||||
|
||||
if(isset($_POST['login']))
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
$HTML->setHTMLTitle("Passwort ändern");
|
||||
$HTML->importSeitenInhalt("../templates/profile.html");
|
||||
$HTML->importSeitenInhalt("profile.html");
|
||||
|
||||
if(isset($_REQUEST['oldPassword']) || @$_REQUEST['oldPassword'] != "")
|
||||
{
|
||||
|
@ -56,7 +56,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
|
||||
$PartnerName = "";
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
$statement->execute();
|
||||
|
||||
$HTML->setHTMLTitle("Dein Profile");
|
||||
$HTML->importSeitenInhalt("../templates/profile.html");
|
||||
$HTML->importSeitenInhalt("profile.html");
|
||||
|
||||
//Prüfe ob IAR grade erstellt wird.
|
||||
$IARRUNNING = FALSE;
|
||||
|
@ -101,7 +101,7 @@
|
|||
$statement->execute(['IMState' => 'false', 'PrincipalID' => $_SESSION['UUID']]);
|
||||
}
|
||||
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
|
||||
if(isset($_REQUEST['formInputFeldPartnerName']) && $_REQUEST['formInputFeldPartnerName'] != "")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$HTML->setHTMLTitle("Deine Regionen");
|
||||
$HTML->importSeitenInhalt("../templates/deine-regionen.html");
|
||||
$HTML->importSeitenInhalt("deine-regionen.html");
|
||||
|
||||
function cleanSize($bytes)
|
||||
{
|
||||
|
@ -61,7 +61,7 @@
|
|||
$statement = $RUNTIME['PDO']->prepare("SELECT uuid,regionName,owner_uuid,locX,locY FROM regions ".($showAll ? "ORDER BY owner_uuid ASC" : "WHERE owner_uuid = ? ORDER BY uuid ASC"));
|
||||
$statement->execute(array($_SESSION['UUID']));
|
||||
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
|
||||
while($row = $statement->fetch())
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
global $RUNTIME;
|
||||
$HTML = new HTML();
|
||||
$HTML->setHTMLTitle("Registrieren");
|
||||
$HTML->importHTML("../templates/register.html");
|
||||
$HTML->importHTML("register.html");
|
||||
|
||||
$HTML->ReplaceLayoutInhalt("%%MESSAGE%%", $message);
|
||||
$HTML->ReplaceLayoutInhalt("%%tosURL%%", $RUNTIME['TOOLS']['TOS'] );
|
||||
|
@ -92,7 +92,7 @@
|
|||
displayPage("Der gewählte Standardavatar existiert nicht.");
|
||||
}
|
||||
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
|
||||
$avatarUUID = $opensim->gen_uuid();
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
|
||||
$HTML->setHTMLTitle("Online Anzeige");
|
||||
$HTML->importSeitenInhalt("../templates/online-anzeige.html");
|
||||
$HTML->importSeitenInhalt("online-anzeige.html");
|
||||
|
||||
$table = '<table class="table"><thead><tr><th scope="col">Benutzername</th><th scope="col">Region</th></thead><tbody>%%ENTRY%%</tbody></table>';
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
die();
|
||||
}
|
||||
|
||||
include '../app/OpenSim.php';
|
||||
include 'app/OpenSim.php';
|
||||
$opensim = new OpenSim();
|
||||
|
||||
$HTML->setHTMLTitle("Benutzer");
|
||||
$HTML->importSeitenInhalt("../templates/users.html");
|
||||
$HTML->importSeitenInhalt("users.html");
|
||||
|
||||
if(@$_REQUEST['action'] == 'genpw' && @$_REQUEST['userid'] != '')
|
||||
{
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
$HTML = new HTML();
|
||||
if(@$_SESSION['LOGIN'] == 'true')
|
||||
{
|
||||
$HTML->importHTML("../templates/dashboard.html");
|
||||
$HTML->importHTML("dashboard.html");
|
||||
|
||||
if(@$_SESSION['LEVEL'] > 100)
|
||||
$HTML->importHTML("../templates/dashboard-admin.html");
|
||||
$HTML->importHTML("dashboard-admin.html");
|
||||
|
||||
$HTML->ReplaceLayoutInhalt("%%USERNAME%%", htmlspecialchars(@$_SESSION['DISPLAYNAME']));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue