コード例 #1
0
ファイル: index.php プロジェクト: BackupTheBerlios/thwc
         download the latest version:
         https://developer.berlios.de/projects/thwc/

         This  program 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 2 of  the License,  or (at
         your option) any later version.

       ==============================================
*/
include 'inc/header.inc.php';
if (U_ID != 0) {
    if (!isset($_SESSION['newpost'])) {
        setNewposts(U_OLDTIME);
    }
    if (U_PM_OVER == 1) {
        $data['message'] = "onLoad=\"javascript:alert('Jemand hat versucht Dir ein Message zu senden.\\nDeine Massagebox ist aber leider voll.')\"";
    }
    if (U_PM_NEW == 1 && U_NO_PM == 1) {
        $data['message'] = "onLoad=\"javascript:alert('Du hast " . U_PM_COUNT . " neue Nachricht/en')\"";
    }
}
$TCatrow = Get_Template('templates/' . $style['styletemplate'] . '/catrow.html');
$TBoardrow = Get_Template('templates/' . $style['styletemplate'] . '/index_b_row.html');
$TIndex = Get_Template('templates/' . $style['styletemplate'] . '/boardtable.html');
$TBoard = Get_Template('templates/' . $style['styletemplate'] . '/board.html');
$onlinebox = '';
if ($config['onlinebox']) {
    $TOnline = Get_Template('templates/' . $style['styletemplate'] . '/online.html');
コード例 #2
0
ファイル: login.php プロジェクト: BackupTheBerlios/thwc
<?php

/* $Id: login.php,v 1.3 2003/06/16 18:08:20 master_mario Exp $ */
include 'inc/header.inc.php';
$r_login = db_query("SELECT\n     user_id,\n     user_pw,\n     user_lastacttime\n FROM " . $pref . "user WHERE user_name='" . addslashes($login['name']) . "'");
if (db_rows($r_login) == 1) {
    $a_login = db_result($r_login);
    if (md5(addslashes($login['pw'])) == $a_login['user_pw']) {
        // login --------------------------
        db_query("UPDATE " . $pref . "user SET\n             user_session='" . $sid . "',\n             user_oldsavet='" . $a_login['user_lastacttime'] . "'\n         WHERE user_id='" . $a_login['user_id'] . "'");
        // gast l�schen -------------------
        db_query("DELETE FROM " . $pref . "guest WHERE session_id='{$sid}'");
        db_query("OPTIMIZE TABLE " . $pref . "guest");
        setNewposts($a_login['user_lastacttime']);
        // Weiterleitung ------------------
        message_redirect('Du hast Dich erfolgreich eingeloggt, bitte warten ...', $loginscript);
    } else {
        $TBoard = Get_Template('templates/' . $style['styletemplate'] . '/board.html');
        message('Das Passwort ist falsch.', 'Fehler', 0);
    }
} else {
    $TBoard = Get_Template('templates/' . $style['styletemplate'] . '/board.html');
    message('Es ist kein User mit diesem Namen registriert.', 'Fehler', 0);
}