Hat sich jetzt scho erledigt... achja udn die tabellen hatte ich scho voher angelgt... im PhpMyAdmin einfach ausgefürt
Hier mal alle dateien die bearbeitet wurden:
includes/func/allg.php (Hinzugefügt)
##
###
####
##### Ip logging
function logging() {
$ip = escape($_SERVER['REMOTE_ADDR'], 'string');
$user = escape($_SESSION['authname'], 'string');
$data = escape($_SERVER["REQUEST_URI"], 'string');
$sql="INSERT INTO `prefix_logging` (`datum`, `zeit`, `ip`, `user`, `url`) VALUES (NOW(), NOW(), '$ip', '$user', '$data');";
db_query($sql);
}
includes/func/user.php (Geändert)
function user_login_check () {
if ( isset ($_POST['user_login_sub']) AND isset ($_POST['name']) AND isset ($_POST['pass']) ) {
debug ('posts vorhanden');
$name = escape_nickname($_POST['name']);
if ($name != $_POST['name'] OR strlen($_POST['name']) > 15) {
return false;
}
$erg = db_query("SELECT name,id,recht,pass,llogin FROM prefix_user WHERE name = BINARY '".$name."'");
if ( db_num_rows($erg) == 1 ) {
debug ('user gefunden');
$row = db_fetch_assoc($erg);
if ( $row['pass'] == md5($_POST['pass']) ) {
debug ('passwort stimmt ... '.$row['name']);
$_SESSION['authname'] = $row['name'];
$_SESSION['authid'] = $row['id'];
$_SESSION['authright'] = $row['recht'];
$_SESSION['lastlogin'] = $row['llogin']; /* lolololol */
$_SESSION['authsess'] = session_und_cookie_name();
db_query("UPDATE prefix_online SET uid = ".$_SESSION['authid']." WHERE sid = '".session_id()."'");
setcookie($_SESSION['authsess'], $row['id'].'='.$row['pass'] , time() + 31104000, "/" );
user_set_grps_and_modules();
logging(); /* <------ Hinzugefügt */
return (true);
}
}
global $menu;
$menu->set_url (0, 'user');
$menu->set_url (1, 'login');
}
return ( false );
}
function user_auto_login_check () {
$cn = session_und_cookie_name();
$dat = explode('=',$_COOKIE[$cn]);
$id = $pw = 0;
if (isset($dat[0])) { $id = escape($dat[0], 'integer'); }
if (isset($dat[1])) { $pw = $dat[1]; }
debug (' pw ' . $pw );
debug (' id ' . $id );
$erg = db_query("SELECT name,id,recht,pass,llogin FROM prefix_user WHERE id = ".$id);
if (db_num_rows($erg) == 1) {
debug ('benutzer gefunden');
$row = db_fetch_assoc($erg);
if ($row['pass'] == $pw) {
debug ('passwoerter stimmen');
debug ($row['name']);
$_SESSION['authname'] = $row['name'];
$_SESSION['authid'] = $row['id'];
$_SESSION['authright'] = $row['recht'];
$_SESSION['lastlogin'] = $row['llogin'];
$_SESSION['authsess'] = $cn;
db_query("UPDATE prefix_online SET uid = ".$_SESSION['authid']." WHERE sid = '".session_id()."'");
setcookie($cn, $row['id'].'='.$row['pass'], time() + 31104000, "/" );
logging(); /* <------ Hinzugefügt */
return (true);
}
}
Selbst gemacht:
admin/iplogger.php
<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
switch($menu->get(1)) {
default : $iplog = 'list'; break;
case 'del' : case 1 : $iplog = 'del'; break;
}
require_once('include/admin/iplogger/'.$iplog.'.php');
?>
admin/iplogger/list.php
<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
defined ('admin') or die ( 'only admin access' );
$design = new design ( 'Admins Area', 'Admins Area', 2 );
$design->header();
require_once('include/includes/config.php');
require_once('include/includes/func/db/mysql.php');
$lol = 'db_query ("UPDATE `ip` FROM `prefix_logging` LIMIT 0, 30 ")';
$abf = 'SELECT * FROM prefix_logging';
$erg = db_query($abf);
while ($row = db_fetch_object($erg)) {
echo '<table width="800" border="0">';
echo ' <tr>';
echo ' <td>['.$row->ip.']-=-['.$row->user.']-=-['.$row->datum.']-=-['.$row->zeit.']</td>';
echo ' </tr>';
echo '</table>';
}
echo '<p> </p>
<p> </p>';
echo '<center>
<a href="?iplogger-del"><img src="include/images/icons/del.gif" />IpLoggs-Loeschen<img src="include/images/icons/delete.gif" /></a>
</center>';
$design->footer();
?>
admin/iplogger/del.php
<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
defined ('admin') or die ( 'only admin access' );
$design = new design ( 'Admins Area', 'Admins Area', 2 );
$design->header();
require_once('include/includes/config.php');
require_once('include/includes/func/db/mysql.php');
$lol = 'db_query ("UPDATE `ip` FROM `prefix_logging` LIMIT 0, 30 ")';
$abf = 'SELECT * FROM prefix_logging';
$erg = db_query($abf);
echo '<strong>Hier kannst du den Ip-Logger leeren!</strong>
<form id="form1" name="form1" method="post" action="">
<table width="300" border="0" align="center">
<tr>
<td width="128">Ip-Logger Leeren </td>
<td width="162"><input type="checkbox" name="checkbox" value="leeren" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Absenden" /></td>
</tr>
</table>
</form>
<p><br />
<br />
</p> ';
if(!empty($_POST['checkbox']))
{
db_query ("TRUNCATE TABLE `prefix_logging`");
echo '<center><b>IpLogger wurde erfolgreich geleert!</b></center>';
echo '<p><b><center><a href="?iplogger">Weiter
</a></center></b></p>';
}
else
{
echo '<center><b>IpLogger nicht geleert!</b></center>';
echo '<center><b><a href="?iplogger">Zurück zur Liste
</a></b></center>';
}
echo '
<div class="info_box">
<p><b>Merke (Markieren)</b> </p>
<p>Ein Hacken setzen und Absenden bedeutet das die Datenbank geleert wird, dannach sind keine Einträge vorhanden und es werden weiterhin Neue hinzugefügt.</p>
<p>Wenn du abbrechen willst, lasse das Feld leer und klick auf Absenden! </p>
<p><br />
</p>
</div>
<div class="info_box">Bei Problemen melde dich bitte <strong><a href="http://www.ilch.de">hier </a>
</strong><p> </p>
<p> </p></div>
<p>
<p> </p>
<p> </p>';
$design->footer();
?>
</p>
THX nochmal für eure Hilfe
und vorallem großes THX an Mairu mit dessen hilfe es dan hinterher au richtig geklappt hat
Zuletzt modifiziert von HackHunter am 27.07.2008 - 22:32:10