aboutsummaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php64
1 files changed, 32 insertions, 32 deletions
diff --git a/functions.php b/functions.php
index 17c2ce3..25c22b8 100644
--- a/functions.php
+++ b/functions.php
@@ -9,7 +9,7 @@ function lredirect($goto){
function redirect($goto){
header($_SERVER["SERVER_PROTOCOL"] . " 302 Moved");
- header("Location: /?page=".$goto);
+ header("Location: ".DOMAIN."?page=".$goto);
ob_clean();
exit;
}
@@ -49,7 +49,7 @@ if( isset($_GET["goto"]) && $_GET["goto"] != "" ) {
redirect("index");
}
?>
-<form class="form-horizontal" method="POST" action="/?page=action&task=login&goto=<?php echo $goto; ?>">
+<form class="form-horizontal" method="POST" action="<?php echo DOMAIN; ?>?page=action&task=login&goto=<?php echo $goto; ?>">
<fieldset>
<!-- Form Name -->
@@ -105,7 +105,7 @@ if( isset($_GET["goto"]) && $_GET["goto"] != "" ) {
<p><strong>Mit * markierte Felder sind Pflichtfelder.</strong></p>
</div>
<div class="row">
-<a href="/?page=recover" title="Recover your password">[Passwort vergessen?]</a>
+<a href="<?php echo DOMAIN; ?>?page=recover" title="Recover your password">[Passwort vergessen?]</a>
</div>
<?php
}
@@ -117,7 +117,7 @@ function print_logout(){
if ( $user->isLoggedIn() ){
$user->logout();
header($_SERVER["SERVER_PROTOCOL"] . " 301 Moved");
- header("Location: ".DOMAIN."/?page=logout");
+ header("Location: ".DOMAIN."?page=logout");
}
print_login("logout");
}
@@ -129,7 +129,7 @@ function print_index(){
</div>
<div class="row">
<div class="ec">
- <img src="/static/kitten-prays-small.jpg" alt="praing kitten" class="img-responsive">
+ <img src="<?php echo CDN; ?>static/kitten-prays-small.jpg" alt="praing kitten" class="img-responsive">
</div>
</div>
<br>
@@ -149,7 +149,7 @@ function print_list($option = false){
global $moar;
$moar->addHeader('<style>'.file_get_contents("static/tablesorter.min.css").'</style>');
- $moar->addFooter('<script src="/js/tablesorter.min.js" defer></script>
+ $moar->addFooter('<script src="'.CDN.'js/tablesorter.min.js" defer></script>
<script>
$(document).ready(function(){
$(function(){
@@ -222,8 +222,8 @@ $(document).ready(function(){
<td>".htmlentities($row['handynummer'])."</td>
<td><a href='mailto:".htmlentities($row['email'])."' title='Sende ".htmlentities($row['name'])." eine E-Mail'>".htmlentities($row['email'])."</a></td>
<td>".htmlentities($row['geburtstag'])."</td>
- <!--td><a href='/?page=update&id=".htmlentities($row['member_id'])."' onclick=\"window.location='/?page=update&id=".htmlentities($row['member_id'])."'\"><input type='checkbox' name='change' value='true'></a></td-->
- <td><a href='/?page=update&id=".htmlentities($row['member_id'])."' title='Ändere den Eintrag'><span class='glyphicon glyphicon-pencil'></span></a></td>
+ <!--td><a href='".DOMAIN."?page=update&id=".htmlentities($row['member_id'])."' onclick=\"window.location='".DOMAIN."?page=update&id=".htmlentities($row['member_id'])."'\"><input type='checkbox' name='change' value='true'></a></td-->
+ <td><a href='".DOMAIN."?page=update&id=".htmlentities($row['member_id'])."' title='Ändere den Eintrag'><span class='glyphicon glyphicon-pencil'></span></a></td>
</tr>";
$count++;
}
@@ -231,7 +231,7 @@ $(document).ready(function(){
</tbody>
</table>
</div>
- <form method="POST" action="/?page=add&_flush=<?php echo $c->token; ?>">
+ <form method="POST" action="<?php echo DOMAIN; ?>?page=add&_flush=<?php echo $c->token; ?>">
<button id="singlebutton" class="btn btn-info" type="submit"><span class="glyphicon glyphicon-ok-sign"></span> Füge jemanden hinzu</button>
</form>
</div>
@@ -257,7 +257,7 @@ function print_update_list($id){
<h1>Änderung für <?php echo htmlentities($row['name']); ?></h1>
</div>
<div class="row">
- <form method='POST' action='/?page=action&task=update&id=<?php echo htmlentities($row['member_id']); ?>&goto=liste'>
+ <form method='POST' action='<?php echo DOMAIN; ?>?page=action&task=update&id=<?php echo htmlentities($row['member_id']); ?>&goto=liste'>
<div class="table-responsive">
<table class='table'>
<thead>
@@ -297,7 +297,7 @@ function print_update_list($id){
</form>
</div>
<br>
- <form method="POST" action="/?page=action&task=delete&id=<?php echo htmlentities($_GET["id"]); ?>" class="form-horizontal">
+ <form method="POST" action="<?php echo DOMAIN; ?>?page=action&task=delete&id=<?php echo htmlentities($_GET["id"]); ?>" class="form-horizontal">
<fieldset>
<legend>Lösche "<?php echo $row["name"]; ?>" von der Liste</legend>
<div class="form-group">
@@ -320,7 +320,7 @@ function print_add_entry_to_list(){
<h1>Füge die Daten hinzu</h1>
</div>
<div class="row">
- <form method='POST' action='/?page=action&task=add&goto=liste&_flush=<?php echo htmlentities($_GET["_flush"]); ?>'>
+ <form method='POST' action='<?php echo DOMAIN; ?>?page=action&task=add&goto=liste&_flush=<?php echo htmlentities($_GET["_flush"]); ?>'>
<div class="table-responsive">
<table class='table'>
<thead>
@@ -383,9 +383,9 @@ function print_404(){
<div class="embed-responsive embed-responsive-16by9">
<!--video class="embed-responsive-item" src="/static/error.webm" controls autoplay loop></video-->
<video class="embed-responsive-item" autoplay loop>
- <source src="/static/error.webm" type="video/webm" media="all and (min-width: 720px)">
- <source src="/static/error-480.webm" type="video/webm" media="all and (min-width: 480px)">
- <source src="/static/error-320.webm" type="video/webm" media="all and (max-width: 479px)">
+ <source src="<?php echo CDN; ?>static/error.webm" type="video/webm" media="all and (min-width: 720px)">
+ <source src="<?php echo CDN; ?>static/error-480.webm" type="video/webm" media="all and (min-width: 480px)">
+ <source src="<?php echo CDN; ?>static/error-320.webm" type="video/webm" media="all and (max-width: 479px)">
Tja, tut mir Leid. Leider unterstützt dein Browser keine HTML5 Videos. Schon mal über ein Upgrade nachgedacht?
</video>
</div>
@@ -403,7 +403,7 @@ function print_register($option = false){
}
?>
-<form class="form-horizontal" method='POST' action='/?page=action&task=register&goto=account'>
+<form class="form-horizontal" method='POST' action='<?php echo DOMAIN; ?>?page=action&task=register&goto=account'>
<fieldset>
<!-- Form Name -->
@@ -504,7 +504,7 @@ function print_account($option = false){
lredirect("account");
global $user;
?>
-<form class="form-horizontal" method="POST" action="/?page=action&task=account&goto=account">
+<form class="form-horizontal" method="POST" action="<?php echo DOMAIN; ?>?page=action&task=account&goto=account">
<fieldset>
<!-- Form Name -->
@@ -589,14 +589,14 @@ function print_account($option = false){
<p><strong>Mit * markierte Felder sind Pflichtfelder.</strong></p>
<h3>Log dich aus</h3>
<hr>
-<a href="/?page=logout" class="btn btn-danger"><span class="glyphicon glyphicon-off"></span> Logout</a>
+<a href="<?php echo DOMAIN; ?>?page=logout" class="btn btn-danger"><span class="glyphicon glyphicon-off"></span> Logout</a>
</div>
<?php
}
function print_recover($option = false){
?>
-<form class="form-horizontal" method='POST' action='/?page=action&task=recover'>
+<form class="form-horizontal" method='POST' action='<?php echo DOMAIN; ?>?page=action&task=recover'>
<fieldset>
<!-- Form Name -->
@@ -654,7 +654,7 @@ function print_download(){
lredirect("download;type=".$type);
header($_SERVER["SERVER_PROTOCOL"] . " 302 Moved");
- header("Refresh: 0; ".DOMAIN."/?page=action&task=download&type=".$type);
+ header("Refresh: 0; ".DOMAIN."?page=action&task=download&type=".$type);
?>
<h1>Download</h1>
<h4>Der Download der Adressliste (vom Typ 'text/<?php echo $type; ?>') sollte automatisch starten.</h4>
@@ -662,7 +662,7 @@ function print_download(){
</div>
<div class="row">
<strong><p>Ansonsten klick hier</p></strong>
-<a href="/?page=action&task=download&type=<?php echo $type; ?>" class="btn btn-primary" title="Download Link"><span class="glyphicon glyphicon-arrow-down"></span> Download</a>
+<a href="<?php echo DOMAIN; ?>?page=action&task=download&type=<?php echo $type; ?>" class="btn btn-primary" title="Download Link"><span class="glyphicon glyphicon-arrow-down"></span> Download</a>
</div>
<?php
}
@@ -678,7 +678,7 @@ function show_gallery(){
global $db;
$sql = $db->prepare("SELECT name, description, owner, time FROM " . DBPREFIX . "gallery WHERE id = %d ;", $_GET["gallery"]);
$res = $db->doQuery($sql);
- require 'static/modal-new-gallery.html';
+ require 'static/modal-new-gallery.php';
if ( $res->num_rows <= 0 ) {
// Start 404
$c->bypassCache=true;
@@ -700,7 +700,7 @@ function show_gallery(){
global $moar;
$moar->addHeader( "<style>".file_get_contents('static/gallery.min.css')."</style>" );
- $moar->addFooter('<script src="/js/gallery.min.js" defer></script>');
+ $moar->addFooter('<script src="'.CDN.'js/gallery.min.js" defer></script>');
if ( isset($_GET["edit"]) ){
$moar->addFooter('<script>$("#modal-edit-gallery").modal("show");</script>');
@@ -753,15 +753,15 @@ function show_gallery(){
}
if ( $tab == $_GET["mode"] )
- echo '<li class="active"><a href="/?page=gallery&amp;gallery='.htmlentities($_GET["gallery"]).'&mode='.$tab.'" role="tab">'.$span.$msg.'</a></li>';
+ echo '<li class="active"><a href="'.DOMAIN.'?page=gallery&amp;gallery='.htmlentities($_GET["gallery"]).'&mode='.$tab.'" role="tab">'.$span.$msg.'</a></li>';
else
- echo '<li><a href="/?page=gallery&amp;gallery='.htmlentities($_GET["gallery"]).'&mode='.$tab.'" role="tab">'.$span.$msg.'</a></li>';
+ echo '<li><a href="'.DOMAIN.'?page=gallery&amp;gallery='.htmlentities($_GET["gallery"]).'&mode='.$tab.'" role="tab">'.$span.$msg.'</a></li>';
}
?>
<li><a href="#change" role="tab" onclick="$('#modal-edit-gallery').modal('show');"><span class="glyphicon glyphicon-cog"></span> Ändern</a></li>
<li><a href="#new" role="tab" onclick="$('#modal-new-gallery').modal('show')"><span class="fa fa-plus"></span> Neu</a></li>
<li><a href="#delete" role="tab" onclick="$('#modal-delete-gallery').modal('show')"><span class="glyphicon glyphicon-trash"></span> Löschen</a></li>
- <li><a class="download" href="/?page=action&amp;task=downloadGallery&amp;gallery=<?php echo htmlentities($_GET["gallery"]); ?>" role="tab"><i class="fa fa-download"></i>
+ <li><a class="download" href="<?php echo DOMAIN; ?>?page=action&amp;task=downloadGallery&amp;gallery=<?php echo htmlentities($_GET["gallery"]); ?>" role="tab"><i class="fa fa-download"></i>
<?php if ( isset($row['name']) && ! $c->exists2(CACHEPREFIX . $_GET["gallery"]) ) $c->set2(CACHEPREFIX . $_GET["gallery"], $row['name']); ?>
Download</a></li>
</ul>
@@ -835,8 +835,8 @@ function show_gallery(){
</div>
<?php
} elseif ( $_GET["mode"] == "upload" ){
- $moar->addFooter('<script src="/js/upload.min.js" defer></script>');
- //$moar->addFooter('<script src="/js/upload.js" defer></script>');
+ $moar->addFooter('<script src="'.CDN.'js/upload.min.js" defer></script>');
+ //$moar->addFooter('<script src="'.CDN.'js/upload.js" defer></script>');
if ( $c->exists2(CACHEPREFIX . "gallery_no_download_" . $_SESSION["gallery"]) )
$moar->addFooter('<script>$(".download").addClass("disabled");
$("body").on("click", "a.disabled", function(event){
@@ -846,7 +846,7 @@ function show_gallery(){
<!-- Start Tab 'Upload' -->
<div class="tab-pane active effect" id="upload">
<!-- The file upload form used as target for the file upload widget -->
- <form id="fileupload" action="/images/" method="POST" enctype="multipart/form-data">
+ <form id="fileupload" action="<?php echo DOMAIN; ?>images/" method="POST" enctype="multipart/form-data">
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
<div class="row fileupload-buttonbar">
<div class="col-lg-7">
@@ -990,7 +990,7 @@ function show_gallery(){
function list_gallery(){
lredirect("foto");
- require 'static/modal-new-gallery.html';
+ require 'static/modal-new-gallery.php';
?>
<h1>Liste aller Galerien</h1>
<hr width="%0%">
@@ -1021,13 +1021,13 @@ function list_gallery(){
<li>
<ul class="list-inline ">
<li>
- <h2><a href="/?page=gallery&amp;gallery=<?php echo $row["id"]; ?>&amp;mode=show" class="a-restore"><?php echo $span . htmlentities($row["name"]);?></a></h2>
+ <h2><a href="<?php echo DOMAIN; ?>?page=gallery&amp;gallery=<?php echo $row["id"]; ?>&amp;mode=show" class="a-restore"><?php echo $span . htmlentities($row["name"]);?></a></h2>
</li>
<li>
<h5 class="desc">Erstellt von <u><?php echo htmlentities($name); ?></u> am <?php echo date("j.n.Y", $row["time"]); ?>.</h5>
</li>
<li>
- <a href="/?page=gallery&amp;gallery=<?php echo $row["id"]; ?>&amp;edit=1" class="desc"><span class="glyphicon glyphicon-link font-small"></span>edit</a>
+ <a href="<?php echo DOMAIN; ?>?page=gallery&amp;gallery=<?php echo $row["id"]; ?>&amp;edit=1" class="desc"><span class="glyphicon glyphicon-link font-small"></span>edit</a>
</li>
</ul>
</li>