Example #1
0
                $Autor = DBQ("SELECT Nickname FROM " . DBTabUsers . " WHERE ID='" . $Kommentar['BesitzerID'] . "'");
                if (isset($Autor[0]) && isset($Autor[0]['Nickname'])) {
                    $Autor = $Autor[0]['Nickname'];
                } else {
                    $Autor = "anonymous";
                    // <- falls der Benutzer nicht mehr existiert ... könnte ja sein
                }
                $CLValues = array('Titel' => $Kommentar['Titel'], 'Inhalt' => $Kommentar['Inhalt'], 'Time' => $Kommentar['Time'], 'Autor' => $Autor);
                $x++;
            } while (AddToContentList("CL", $CLValues) == 1 && $x < count($Kommentare));
            #print_r($CL);
            echo OutputContentList("CL", "List");
        }
    }
    // Kommentarfunktion ...
    echo LoadTPL("KommentarNeu");
} elseif (isset($_GET['Edit'])) {
    // Neues Bild einfügen ...
    if (isset($_FILES['Bild']) && $_FILES['Bild']['size'] > 0) {
        $MyPics = DBQ("SELECT ID FROM " . DBTabPictures . " WHERE BesitzerID = '" . $_SESSION['ID'] . "'");
        if (isset($MyPics) && count($MyPics) > MAXPICSCOUNT) {
            include "Content/TooManyPicsInGal.html";
        } else {
            if (CreateContent($_POST['Titel'], "Bild", time(), $_SESSION['ID'], $_FILES)) {
                include "Content/NeuesBildErfolg.html";
            } else {
                Error("Bild konnte nicht eingefügt werden");
            }
        }
    }
    // Bild löschen
function Debug()
{
    // NOTE: Deaktiviert für Test
    //if(UserLoggedIn() && UserHasRole(ROLEDebug)){
    echo LoadTPL("Debug");
    //}
}
Example #3
0
the Free Software Foundation; either version 3 of the License.

Banbury is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
set_include_path('Profil/');
if (!UserLoggedIn()) {
    restore_include_path();
    echo LoadTPL("Hinweis", array('Message' => 'Bitte logge dich zuvor ein!'));
    // Hinweis
    echo LoadTPL("Login");
    // Login
} else {
    include "Content/Options.php";
    if (isset($_GET['Edit'])) {
        // Anzeigen des Profil-Änderungs-Bereiches
        if (isset($_POST['Values'])) {
            // Speichern des geänderten Profils
            $Array = DBQ("SELECT * FROM " . DBTabUsers . " WHERE ID='" . $_SESSION['ID'] . "'");
            $Array = $Array[0];
            $Show = DBQ("SELECT * FROM " . DBTabProfiles . " WHERE ID='" . $_SESSION['ID'] . "'");
            $Values = $_POST['Values'];
            $Update = aArrayIntoString($Values);
            DBU(DBTabUsers, "ID='" . $_SESSION['ID'] . "'", $Update);
            // Werte speichern
            if (is_array($Show)) {
<?php

/*
This file is part of Banbury.

Banbury is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License.

Banbury is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
?>

<?php 
// Es folgt die zukünftige Template-Datei
LoadTPL("POD", "");