license und readme.md aktualisiert und aktuellen quelltext hinzugefügt.

This commit is contained in:
Marcel Naeve 2024-06-23 00:45:01 +02:00
parent 9ad8637dc7
commit 6a156b1866
Signed by: manae
GPG Key ID: 3BB68BF9EA669981
28 changed files with 1608 additions and 4 deletions

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2024 manae
Copyright (c) 2024 Marcel Naeve (manae) www.naeve.info
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

201
README.md
View File

@ -1,5 +1,200 @@
# ilchClan-v1.1-userCP
Da ich danach gefragt wurde, mache ich hier das damals von mir entwickelte Modul für das ilch Clan CMS in Version 1.1 wieder verfügbar. Die Entwicklung war damals bereits abgeschlossen, weshalb ich vor erneuter Veröffentlichung lediglich Bilder ersetzt habe (damals keine ahnung von Copyright gehabt und hat da noch niemanden interessiert). Sonst nur die readme Datei aktualisiert.
Der Quellcode ist unter MIT Lizenz, die neuen Bilder sind von mir selbst erstellt und sind frei für private Nutzung. Eine Erwähnung meiner Person bei Verwendung außerhalb dieses Projektes wäre natürlich sehr nett.
Modul für das ilch Clan CMS in Version 1.1, um den Benutzern eine bessere Übersicht zum editieren Ihrer Profile zu geben und die hinterlegten Informationen zu erweitern.
- Entwickelt: ~ 03/2011
- Download: https://forgejo.nae.one/manae/ilchClan-v1.1-userCP
## ilch 1.1 - User Control Panel
### Features:
- Erweiterter Profil Edit
- Zusätzliche User Informationen
- - User Bild
- - Vor-& Nachname
- - Änderung des Nicknames möglich [Mehrfach nutzung von Nicknamen (optional)]
- - Skype
- - Steam
- - x-Fire
- - User beschreibung
- Kategorisierter Profilfelder Edit
- Login über Email/userID/Nickname möglich
### Nutzungseinschränkungen:
Es kann sein dass dieses Modul
nicht Kompatibel zu veränderten Profiledits ist,
welche die Datenbank verändern.
(Bei ungewissheit lieber Fragen)
### Wichtige Infos:
Einige Informationen werden nur angezeigt,
wenn die Profilansicht überarbeitet wurde.
Standard Templates für den Login liegen bei.
Bei geänderten Templates, muss von Hand Email
vor das Eingabefeld für den Nicknamen geschrieben werden.
Der Wert des attributs `name=".."` bleibt gleich!
### Entwickler:
Ich CoNfu5eDme (Marcel Naeve) damals H4ckHunt3r bitte Sie darum,
mich bei auftretenden Fehlern
oder Ideen für das Modul
zu Kontaktieren.
Meine Kontaktdaten finden sie
auf [www.naeve.info](https://naeve.info)
## Reupload / Changes
Da ich danach gefragt wurde, mache ich hier das damals von mir entwickelte Modul für das ilch Clan CMS in Version 1.1 wieder verfügbar. Die Entwicklung war damals bereits abgeschlossen, weshalb ich vor erneuter Veröffentlichung lediglich Bilder ersetzt habe (damals keine ahnung von Copyright gehabt und hat da noch niemanden interessiert). Sonst nur die readme Datei aktualisiert.
Der Quellcode ist unter MIT Lizenz, die neuen Bilder sind von mir selbst erstellt und sind frei für private Nutzung. Eine Erwähnung meiner Person bei Verwendung außerhalb dieses Projektes wäre natürlich sehr nett.
## INSTALLATION:
1. Alle Dateien aus dem Ordner `UPLOAD` (des Archives)
in die richtigen Ordner-Strukturen
vom ilch Clan-Script hochladen.
2. Falls sie nicht noch eingeloggt sind, müssen sie sich
mit Ihrer E-Mail und Ihrem Passwort einloggen
um die Installation fortführen zu können.
3. Die installation unter index.php?ucpinstall aufrufen
und auf Installieren klicken.
4. Falls diese nicht automatisch gelöscht wurden,
ucpinstall.php und ucpinstall.sql,
welche sich im verzeichnis `include/contents/.` befinden löschen.
Bitte Stellen sie sicher, dass das Verzeichniss "userpics"
im Verzeichnis `include/images/` schreibrechte hat (CHMOD 0777)!
### VERLINKUNG:
Sie können nach der Installation,
das UserCP entweder in die Navigation einfügen,
oder die Verlinkung des Profiledits der Loginbox ändern.
Was wie folgt funktioniert:
Sie müssen die Datei `boxen_login.htm` öffnen.
Welche sich im Verzeichnis:
`include/designs/<designname>/templates/user/`
oder im Verzeichnis:
`include/templates/user/`
befindet. (sehen sie erst im Design ordner nach.)
Suchen sie in ihrem Template eine verlinkung auf
`index.php?user-8`
und ändern sie diese verlinkung zu
`index.php?ucp`
### Login mit Nickname:
Seid Version `1.1.0.1`,
lässt sich die AuthMethode
im Adminbereich
unter Konfiguration
einstellen.
### Zusätzliche Daten im Userprofil anzeigen lassen:
Suchen sie folgende stelle in der `user_details.php`
im Verzeichnis: `include/contents/user/`.
```php
$ar = array (
'NAME' => $row['name'],
'JOINED' => date('d M Y',$row['regist']),
'LASTAK' => date('d M Y - H:i',$row['llogin']),
'POSTS' => $row['posts'],
'postpday' => $postpday,
'RANG' => userrang ($row['posts'],$uid),
'AVATA' => $avatar,
);
```
Und ersetzen sie diese durch folgende:
```php
$ar = array (
'NAME' => $row['name'],
'JOINED' => date('d M Y',$row['regist']),
'LASTAK' => date('d M Y - H:i',$row['llogin']),
'POSTS' => $row['posts'],
'postpday' => $postpday,
'RANG' => userrang ($row['posts'],$uid),
'AVATA' => $avatar,
'xfire' => $row['xfire'],
'skype' => $row['skype'],
'steam' => $row['steam'],
'upic' => $row['userpic'],
'fname' => $row['firstname'],
'lname' => $row['lastname'],
'description' => bbcode($row['descr'])
);
```
Nun können sie das Template `userdetails.htm` welches sie im Verzeichnis
`include/designs/<design_name>/templates/user/`
oder falls diese nicht vorhanden
`include/templates/user/`
finden, (sehen sie erst im Design ordner nach.)
folgende Tags verwenden um die Daten
an der gewünschten Position in die Ansicht einzufügen:
- Vorname: `{fname}`
- Nachname: `{lname}`
- Skype: `{skype}`
- X-Fire: `{xfire}`
- Steam: `{steam}`
- Beschreibung: `{description}`
- Link zum Userbild: `{upic}`
Beispiel für einbinden des User Bildes:
```html
<img src="{upic}" alt="Userbild von {name}" />
```
## Haftungsausschluss:
Ich übernehme keine Haftung für evtl. durch das Script verursachte schäden.
## ChangeLog:
### --- Version `1.1.0.2` --------------------
+ `VBE` - Readme aktualisiert und als Markdown leserlicher gemacht
+ `FIX` - Bilder durch eigene ersetzt, wegen Copyright
### --- Version `1.1.0.1` --------------------
+ `FIX` - Nicknamen Mehrfach nutzung
+ `FIX` - Nick bereits in nutzung - eigener Nickname => Leerer Nick
+ `CFG` - Nicknamen mindestlänge
+ `CFG` - Versionskontrolle On/Off
+ `CFG` - Wahl der AuthMetode (name|mail|id)
+ `FTE` - Profilfelder (Kategorisierter Edit)
+ `VBE` - Versionskontrolle verbessert
+ `VBE` - Andere Icons
+ `VBE` - Templates für schmalere contents angepasst
### --- Version `1.0.0.1` --------------------
+ First Release
--------------------------------
### Changelog-Legende:
- `FIX` = Bug Fix / Securety Fix
- `CFG` = Neue Konfigurationsmöglichkeit
- `FTE` = Neues Feature
- `VBE` = Verbesserung eines Features

40
UPLOAD/boxes/login.php Normal file
View File

@ -0,0 +1,40 @@
<?php
# Copyright by Manuel
# Support www.ilch.de
defined ('main') or die ( 'no direct access' );
$tpl = new tpl ( 'user/boxen_login.htm' );
if ( loggedin() ) {
if ( user_has_admin_right($menu,false) ) {
$tpl->set ( 'ADMIN', '<a class="box" href="admin.php?admin">'.$lang['adminarea'].'</a>' );
} else {
$tpl->set ( 'ADMIN', '' );
}
if ( $allgAr['Fpmf'] == 1 ) {
$erg = db_query("SELECT COUNT(id) FROM `prefix_pm` WHERE gelesen = 0 AND status < 1 AND eid = ".$_SESSION['authid']);
$check_pm = db_result($erg,0);
$nachrichten_link = '<a class="box" href="index.php?forum-privmsg">'.$lang['messages'].'</a>&nbsp;('.$check_pm.')<br>';
} else {
$nachrichten_link = '';
}
$tpl->set ( 'SID' , session_id() );
$tpl->set ( 'NACHRICHTEN' , $nachrichten_link );
$tpl->set ( 'NAME', $_SESSION['authname'] );
$tpl->out (0);
} else {
if (empty($_POST['login_name'])) { $_POST['login_name'] = 'E-Mail'; }
if (empty($_POST['login_pw'])) { $_POST['login_pw'] = 'ääääääää'; }
$regist = '';
if ( $allgAr['forum_regist'] == 1 ) {
$regist = ' &nbsp; &nbsp; <a href="index.php?user-regist">Regist</a>';
}
$tpl->set_ar_out ( array ( 'regist' => $regist, 'wdlink' => '?'.$allgAr['smodul'], 'PASS' => $_POST['login_pw'], 'NAME' => $_POST['login_name'] ) , 1 );
}
unset($tpl);
?>

100
UPLOAD/contents/ucp.php Normal file
View File

@ -0,0 +1,100 @@
<?php
# Copyright: Marcel 'H4ckHunt3r 'Naeve
## Support: www.naeve.info && www.ilch.de
defined('main') or die('no direct access');
$title = $allgAr['title'].' :: User Control Panel';
$hmenu = 'UserCP';
$design = new design ( $title , $hmenu );
$design->header();
$ucpVersion = "1.1.0.2";
// Versions Kontrolle
if($allgAr['ucp_vctrl']=='1')
{
if(is_admin ())
{
try{
$handle = @fopen("https://forgejo.nae.one/manae/ilchClan-v1.1-userCP/raw/branch/main/version.txt", "r");
$content = @fread($handle, 7);
$aVers = split('[/.-]', $ucpVersion);
$nVers = split('[/.-]', $content);
$updateMessage = 'Eine neue UserCP Version ist verf&uuml;gbar.<br>Download auf: <a href="https://forgejo.nae.one/manae/ilchClan-v1.1-userCP">forgejo.nae.one/manae/ilchClan-v1.1-userCP</a>!<hr>';
if($aVers[0]<$nVers[0]){
echo $updateMessage;
} elseif($aVers[0]==$nVers[0] && $aVers[1]<$nVers[1]) {
echo $updateMessage;
} elseif($aVers[0]==$nVers[0] && $aVers[1]==$nVers[1] && $aVers[2]<$nVers[2]) {
echo $updateMessage;
} elseif($aVers[0]==$nVers[0] && $aVers[1]==$nVers[1] && $aVers[2]==$nVers[2] && $aVers[3]<$nVers[3]) {
echo $updateMessage;
}
} catch (Exception $e)
{
echo 'Die Pr&uuml;fung der Version ist Fehlgeschlagen.<br>
'.$e->getMessage().'<hr>';
}
}
}
// ---------------------
if($_SESSION['authid']!=0)
{
$uid = escape($_SESSION['authid'],"integer");
$kqU = db_fetch_object(db_query("SELECT * FROM prefix_user WHERE id='".$uid."'"));
if(file_exists($kqU->userpic))
{
$upic = $kqU->userpic;
} else {
$upic = "include/images/userpics/0.jpg";
}
$tpl = new tpl('ucp/main.htm');
$uIarr = array(
'upic' => $upic,
'ava' => $kqU->avatar,
'name' => $kqU->name
);
$tpl->set_ar_out($uIarr,0);
$message = "";
switch($menu->get(1))
{
case'contact': include_once("include/contents/ucp/contact.php"); break;
case'ava': include_once("include/contents/ucp/ava.php"); break;
case'upic': include_once("include/contents/ucp/upic.php"); break;
case'info': include_once("include/contents/ucp/info.php"); break;
case'safe': include_once("include/contents/ucp/safe.php"); break;
case'sig': include_once("include/contents/ucp/sig.php"); break;
case'sets': include_once("include/contents/ucp/settings.php"); break;
case'fields': include_once("include/contents/ucp/fields.php"); break;
default: include_once("include/contents/ucp/main.php"); break;
}
$tpl = new tpl('ucp/main.htm');
if($menu->get(1)!='main' && $menu->get(1)!="")
{
$tpl->set('back','<div style="width:98%; text-align:right;"><a href="index.php?ucp">Zur UserCP Hauptseite</a></div>');
}else{
$tpl->set('back','');
}
$tpl->out(2);
} else {
print '<hr>Sie m&uuml;ssen eingeloggt sein um Ihre Daten &auml;ndern zu k&ouml;nnen!<hr>';
}
$design->footer();
?>

View File

@ -0,0 +1,64 @@
<?php
# Copyright: Marcel 'H4ckHunt3r 'Naeve
## Support: www.naeve.info && www.ilch.de
defined('main')or die('no direct access');
$tpl = new tpl( 'ucp/ava.htm' );
$uI = db_fetch_object(db_query("SELECT * FROM prefix_user WHERE id='".$uid."'"));
$uploaddir = './include/images/avatars/';
$typeAccept = array("image/jpeg", "image/gif", "image/png");
$max_size = array($allgAr['ava_max_breite'], $allgAr['ava_max_hoehe']); // Maximale (Breite, Höhe) des Bildes
$max_filesize = $allgAr['ava_max_fsize']; // Maximale Dateigröße in Byte (1024 Byte = 1KB)
if(isset($_POST['subAva']))
{
$size = @getimagesize ($_FILES['avatarfile']['tmp_name']);
$breite = $size[0];
$hoehe = $size[1];
if(!in_array($_FILES['avatarfile']['type'],$typeAccept))
{
$message .= "Unerlaubter Dateityp. Upload Abgebrochen! Erlaubt sind nur: (JPG|PNG|GIF)!<br>";
}elseif(filesize($_FILES['avatarfile']['tmp_name'])>$max_filesize){
$message .= "Die Datei ist zu Gro&szlig;. Bitte verkleinere sie, oder verwende eine andere!<br>";
}elseif($max_size[0]<$breite||$max_size[1]<$hoehe){
$message .= "Die Datei ist zu Gro&szlig;. Bitte verkleinere sie, oder verwende eine andere!<br>";
}else {
$finfo = pathinfo($_FILES['avatarfile']['name']);
$cEnd = $finfo['extension'];
if(file_exists($uploaddir . $uid . '.' . $cEnd))
{
unlink($uploaddir . $uid . '.' . $cEnd);
db_query("UPDATE prefix_user SET avatar=NULL WHERE id='".$uid."'");
}
if (move_uploaded_file($_FILES['avatarfile']['tmp_name'], $uploaddir . $uid . '.' . $cEnd))
{
$message .= "Avatar wurde Hochgeladen!<br>";
db_query("UPDATE prefix_user SET avatar='".($uploaddir . $uid . '.' . $cEnd)."' WHERE id='".$uid."'");
} else {
$message .= "Avatar wurde nicht Hochgeladen!<br>";
}
}
}
$uArr = array(
'ava' => $uI->avatar,
'message' => $message,
'iBreite' => $max_size[0]."px",
'iHoehe' => $max_size[1]."px",
'fsize' => $max_filesize." Byte"
);
$tpl->set_ar_out($uArr,0);
?>

View File

@ -0,0 +1,37 @@
<?php
# Copyright: Marcel 'H4ckHunt3r 'Naeve
## Support: www.naeve.info && www.ilch.de
defined('main') or die('no direct access');
$tpl = new tpl( 'ucp/contact.htm' );
if(isset($_POST['subContact']))
{
if(db_query("UPDATE prefix_user SET icq='".escape($_POST['icq'],"string")."',msn='".escape($_POST['msn'],"string")."',skype='".escape($_POST['skype'],"string")."',yahoo='".escape($_POST['yahoo'],"string")."',aim='".escape($_POST['aim'],"string")."',steam='".escape($_POST['steam'],"string")."',xfire='".escape($_POST['xfire'],"string")."' WHERE id='".$uid."'"))
{
$message .= "Daten wurden eingetragen!";
} else {
$message .= "Daten wurden nicht eingetragen!";
}
}
$uI = db_fetch_object(db_query("SELECT * FROM prefix_user WHERE id='".$uid."'"));
$uArr = array(
'icq' => $uI->icq,
'msn' => $uI->msn,
'skype' => $uI->skype,
'steam' => $uI->steam,
'xfire' => $uI->xfire,
'yahoo' => $uI->yahoo,
'aim' => $uI->aim,
'message' => $message
);
$tpl->set_ar_out($uArr,0);
?>

View File

@ -0,0 +1,66 @@
<?php
# Copyright: Marcel 'H4ckHunt3r 'Naeve
## Support: www.naeve.info && www.ilch.de
defined('main') or die('no direct access');
$tpl = new tpl( 'ucp/fields.htm' );
function update_ufield($field, $wert,$uid)
{
if(db_num_rows(db_query("SELECT * FROM prefix_userfields WHERE fid=".$field." AND uid=".$uid))>=1)
{
return db_query("UPDATE prefix_userfields SET val='".$wert."' WHERE fid=".$field." AND uid=".$uid);
} else {
return db_query("INSERT INTO prefix_userfields (uid, fid, val) VALUES (".$uid.", ".$field.", '".$wert."')");
}
}
if(isset($_POST['subFields']))
{
$fields = db_query("SELECT * FROM prefix_profilefields WHERE func='1'");
while($row = db_fetch_object($fields))
{
if(isset($_POST['field_'.$row->id]) && $_POST['field_'.$row->id] != null)
{
update_ufield($row->id, escape($_POST['field_'.$row->id],"textarea"),$uid);
}
}
}
$fKates = db_query("SELECT * FROM prefix_profilefields WHERE func='2' AND id>16");
if(db_num_rows($fKates)>=1)
{
$tpl->out(0);
while($row = db_fetch_object($fKates))
{
$fK[] = $row; // Alle Kategorien in ein Array
}
for($i=0;$i<count($fK);$i = $i+1)
{
$tpl->set('KATE', $fK[$i]->show);
$tpl->out(1);
if(isset($fK[($i+1)]->pos) && $fK[($i+1)]->pos != 0)
{
$fFields = db_query("SELECT * FROM prefix_profilefields WHERE pos>".$fK[$i]->pos." AND pos<".$fK[($i+1)]->pos);
} else {
$fFields = db_query("SELECT * FROM prefix_profilefields WHERE pos>".$fK[$i]->pos);
}
while($row = db_fetch_object($fFields))
{
$qWert = db_fetch_object(db_query("SELECT * FROM prefix_userfields WHERE uid=".$uid." AND fid=".$row->id));
$Arr = array('FIELD' => $row->show, 'FNAME' => 'field_'.$row->id, 'FWERT' => $qWert->val);
$tpl->set_ar_out($Arr,2);
}
$tpl->out(3);
}
$tpl->out(4);
}
?>

View File

@ -0,0 +1,133 @@
<?php
# Copyright: Marcel 'H4ckHunt3r 'Naeve
## Support: www.naeve.info && www.ilch.de
defined('main') or die('no direct access');
$tpl = new tpl( 'ucp/info.htm' );
function read_staat($mStaat) {
$c_dir = "include/images/flags/";
if(file_exists($c_dir.$mStaat))
{
$r_html .= '<option selected="selected">'.$mStaat.'</option>';
$fE = true;
}
$c_handle = opendir($c_dir);
if(substr($c_dir, strlen($c_dir)-1) != "/")
{
$c_dir .= "/";
}
while($a_read = readdir($c_handle))
{
if(is_file($c_dir.$a_read))
{
$r_Arr[] = $a_read;
}
}
sort($r_Arr);
for($i=0;$r_Arr[$i]!=NULL;$i++)
{
if($fE == false)
{
$r_html .= '<option>'.$r_Arr[$i].'</option>';
} elseif ($fE == true && $a_read == $mStaat) {
$r_html .= '<option selected="selected">'.$r_Arr[$i].'</option>';
} elseif($fE == true && $a_read != $mStaat) {
$r_html .= '<option>'.$r_Arr[$i].'</option>';
}
}
return $r_html;
}
if(isset($_POST['subInfo']))
{
$uI = db_fetch_object(db_query("SELECT * FROM prefix_user WHERE id='".$uid."'"));
$sex = escape($_POST['opt_sex'],"string");
$vN = escape($_POST['vname'],"string");
$nN = escape($_POST['nname'],"string");
$nickN = escape($_POST['nickname'],"string");
$geb = escape($_POST['gebdate'],"string");
$staat = escape($_POST['staat'],"string");
$ort = escape($_POST['ort'],"string");
$hp = escape($_POST['hp'],"string");
$descr = escape($_POST['descr'],"string");
$status = escape($_POST['status'],"string");
$nTq = db_query("SELECT * FROM prefix_user WHERE name='".$nickN."'");
if(db_num_rows($nTq)>=1 && $allgAr['multi_nicks']==0 && $nickN!=$uI->name)
{
$nickN = $uI->name;
$message .= "Der Nickname konnte nicht ge&auml;ndert werden, da er bereits vergeben war!<br>";
} elseif(strlen($nickN) < $allgAr['min_nick_lange']) {
$nickN = $uI->name;
$message .= "Der Nickname konnte nicht ge&auml;ndert werden, da der Name zu kurz ist!<br>";
}
if(db_query("UPDATE prefix_user SET
name='".$nickN."',
firstname='".$vN."',
lastname='".$nN."',
geschlecht='".$sex."',
gebdatum='".$geb."',
staat='".$staat."',
wohnort='".$ort."',
homepage='".$hp."',
descr='".$descr."',
status='".$status."'
WHERE id='".$uid."'"))
{
$message .= "Die Daten wurden gespeichert!<br>";
} else {
$message .= "Die Daten konnten nicht gespeichert werden!<br>";
}
}
$uI = db_fetch_object(db_query("SELECT * FROM prefix_user WHERE id='".$uid."'"));
$staat = read_staat($uI->staat);
if($uI->geschlecht == 1){$sexM = 'checked'; $sexW = ''; $sexZ = '';}
elseif($uI->geschlecht == 2){$sexM = ''; $sexW = 'checked'; $sexZ = '';}
else {$sexM = ''; $sexW = ''; $sexZ = 'checked';}
if ( $uI->status == 1 ) { $status_aktiv = 'checked'; $status_inaktiv = ''; } else { $status_inaktiv = 'checked'; $status_aktiv = ''; }
$uArr = array(
'message' => $message,
'status1' => $status_aktiv,
'status0' => $status_inaktiv,
'opt_sex1' => $sexM,
'opt_sex2' => $sexW,
'opt_sex0' => $sexZ,
'staat' => $staat,
'ort' => $uI->wohnort,
'hp' => $uI->homepage,
'descr' => $uI->descr,
'gebdate' => $uI->gebdatum,
'nickname' => $uI->name,
'nname' => $uI->lastname,
'vname' => $uI->firstname,
);
$tpl->set_ar_out($uArr,0);
?>

View File

@ -0,0 +1,25 @@
<?php
# Copyright: Marcel 'H4ckHunt3r 'Naeve
## Support: www.naeve.info && www.ilch.de
defined('main') or die('no direct access');
$tpl = new tpl( 'ucp/main.htm' );
$uI = db_fetch_object(db_query("SELECT * FROM prefix_user WHERE id='".$uid."'"));
$userpic = $uI->userpic;
if($userpic == NULL)
{
$userpic = "include/images/userpic/0.jpg";
}
$uArr = array (
'name' => $uI->name,
'userpic' => $userpic,
'avatar' => $uI->avatar
);
$tpl->set_ar_out($uArr,1);
?>

View File

@ -0,0 +1,39 @@
<?php
# Copyright: Marcel 'H4ckHunt3r 'Naeve
## Support: www.naeve.info && www.ilch.de
defined('main') or die('no direct access');
$tpl = new tpl( 'ucp/safe.htm' );
$uI = db_fetch_object(db_query("SELECT * FROM prefix_user WHERE id='".$uid."'"));
if(isset($_POST['subEdit'])&&$uid!=0)
{
if($_POST['pass'] != $_POST['pass2'] && isset($_POST['pass']) && isset($_POST['pass2']))
{
$message .= 'Die Passw&ouml;rter stimmen nicht &uuml;berein!<br>';
}elseif(!isset($_POST['pass']) && !isset($_POST['pass2'])){
$message .= 'Es wurde kein neues Passwort eingetragen!<br>';
} else {
if(isset($_POST['oPass']) && md5($_POST['oPass'])==$uI->pass)
{
if(@db_query("UPDATE prefix_user SET pass='".md5($_POST['pass'])."' WHERE id='".$uid."'"))
{
$message .= "Das Passwort wurde ge&auml;ndert!<br>";
} else {
$message .= "Es ist ein Fehler beim &auml;ndern des Passworts unterlaufen!<br>";
}
}
}
$message .= "";
} else {
$message = "";
}
$tpl->set('message', $message);
$tpl->out(0);
?>

View File

@ -0,0 +1,39 @@
<?php
# Copyright: Marcel 'H4ckHunt3r 'Naeve
## Support: www.naeve.info && www.ilch.de
defined('main') or die('no direct access');
$tpl = new tpl( 'ucp/sets.htm' );
if(isset($_POST['subSets']))
{
if(db_query("UPDATE prefix_user SET opt_pm='".escape($_POST['opt_pm'], 'string')."', opt_mail='".escape($_POST['opt_mail'], 'string')."', opt_pm_popup='".escape($_POST['opt_pmp'], 'string')."' WHERE id='".$uid."'"))
{
$message .= "Die Daten wurden Eingetragen!<br>";
} else {
$message .= "Die Daten konnten nicht eingetragen werden!<br>";
}
}
$uI = db_fetch_object(db_query("SELECT * FROM prefix_user WHERE id='".$uid."'"));
if ( $uI->opt_pm_popup == 1 ) { $opt_pmp1 = 'checked'; $opt_pmp0 = ''; } else { $opt_pmp0 = 'checked'; $opt_pmp1 = ''; }
if ( $uI->opt_pm == 1 ) { $opt_pm1 = 'checked'; $opt_pm0 = ''; } else { $opt_pm0 = 'checked'; $opt_pm1 = ''; }
if ( $uI->opt_mail == 1 ) { $opt_mail1 = 'checked'; $opt_mail0 = ''; } else { $opt_mail0 = 'checked'; $opt_mail1 = ''; }
$uArr = array(
'message' => $message,
'opt_pmp0' => $opt_pmp0,
'opt_pmp1' => $opt_pmp1,
'opt_pm0' => $opt_pm0,
'opt_pm1' => $opt_pm1,
'opt_mail0' => $opt_mail0,
'opt_mail1' => $opt_mail1
);
$tpl->set_ar_out($uArr,0);
?>

View File

@ -0,0 +1,35 @@
<?php
# Copyright: Marcel 'H4ckHunt3r 'Naeve
## Support: www.naeve.info && www.ilch.de
defined('main')or die('no direct access');
$tpl = new tpl( 'ucp/sig.htm' );
$uI = db_fetch_object(db_query("SELECT * FROM prefix_user WHERE id='".$uid."'"));
if(isset($_POST['preSig']))
{
$tpl->set('preview',bbcode($_POST['sig']));
$tpl->set('sig', $_POST['sig']);
} elseif(isset($_POST['subSig'])) {
if(db_query("UPDATE prefix_user SET sig='".escape($_POST['sig'],"textarea")."' WHERE id='".$uid."'"))
{
$message .= "Signatur wurde ge&auml;ndert!<br>";
} else {
$message .= "Signatur konnte nucht ge&auml;ndert werden!";
}
$tpl->set('preview',bbcode($_POST['sig']));
$tpl->set('sig', $_POST['sig']);
} else {
$tpl->set('preview',bbcode($uI->sig));
$tpl->set('sig', $uI->sig);
}
$tpl->set('message', $message);
$tpl->out(0);
?>

View File

@ -0,0 +1,64 @@
<?php
# Copyright: Marcel 'H4ckHunt3r 'Naeve
## Support: www.naeve.info && www.ilch.de
defined('main')or die('no direct access');
$tpl = new tpl( 'ucp/upic.htm' );
$uI = db_fetch_object(db_query("SELECT * FROM prefix_user WHERE id='".$uid."'"));
$uploaddir = './include/images/userpics/';
$typeAccept = array("image/jpeg", "image/gif", "image/png");
$max_size = array($allgAr['upic_max_breite'], $allgAr['upic_max_hoehe']); // Maximale (Breite, Höhe) des Bildes
$max_filesize = $allgAr['upic_max_fsize']; // Maximale Dateigröße in Byte (1024 Byte = 1KB)
if(isset($_POST['subUpic']))
{
$size = @getimagesize ($_FILES['upicfile']['tmp_name']);
$breite = $size[0];
$hoehe = $size[1];
if(!in_array($_FILES['upicfile']['type'],$typeAccept))
{
$message .= "Unerlaubter Dateityp. Upload Abgebrochen! Erlaubt sind nur: (JPG|PNG|GIF)!<br>";
}elseif(filesize($_FILES['upicfile']['tmp_name'])>$max_filesize){
$message .= "Die Datei ist zu Gro&szlig;. Bitte verkleinere sie, oder verwende eine andere!<br>";
}elseif($max_size[0]<$breite||$max_size[1]<$hoehe){
$message .= "Die Datei ist zu Gro&szlig;. Bitte verkleinere sie, oder verwende eine andere!<br>";
}else {
$finfo = pathinfo($_FILES['upicfile']['name']);
$cEnd = $finfo['extension'];
if(file_exists($uploaddir . $uid . '.' . $cEnd))
{
unlink($uploaddir . $uid . '.' . $cEnd);
db_query("UPDATE prefix_user SET userpic=NULL WHERE id='".$uid."'");
}
if (move_uploaded_file($_FILES['upicfile']['tmp_name'], $uploaddir . $uid . '.' . $cEnd))
{
$message .= "User Bild wurde Hochgeladen!<br>";
db_query("UPDATE prefix_user SET userpic='".($uploaddir . $uid . '.' . $cEnd)."' WHERE id='".$uid."'");
} else {
$message .= "User Bild wurde nicht Hochgeladen!<br>";
}
}
}
$uArr = array(
'upic' => $uI->userpic,
'message' => $message,
'iBreite' => $max_size[0]."px",
'iHoehe' => $max_size[1]."px",
'fsize' => $max_filesize." Byte"
);
$tpl->set_ar_out($uArr,0);
?>

View File

@ -0,0 +1,146 @@
<?php
# ilchClan Script (c) by Manuel Staechele
# Installation file (c) by Ithron
# Support: http://www.ilch.de
defined ('main') or die ( 'no direct access' );
if(user_has_admin_right($menu,false) == false)
die ( 'F&uuml;r diese Installation ben&ouml;tigt man Administratorenrechte !<br /><a href="index.php">Zur Startseite</a>' );
// Script Konfiguration
$scripter = 'H4ckHunt3r/CoNfu5eDme'; // Name des Autors des Moduls
$script_name = 'User Control Panel'; // Name des Moduls
$script_vers = '1.1.0.2'; // Version des Moduls
$ilch_vers = '1.1'; // Version des ilchClan Scripts
$ilch_update = 'O'; // Update des ilchClan Scripts
$erfolg = ''; // Benutzerdefinierte Erfolgsnachricht
$fehler = ''; // Benutzerdefinierte Fehlermeldung
// Ende der Konfiguration
$title = $allgAr['title'].' => I&nbsp;N&nbsp;S&nbsp;T&nbsp;A&nbsp;L&nbsp;L&nbsp;A&nbsp;T&nbsp;I&nbsp;O&nbsp;N:&nbsp;&nbsp;'.$script_name;
$hmenu = $script_name.' Vers.: '.$script_vers.' f&uuml;r ilchClan '.$ilch_vers.' Vers.: '.$ilch_update;
$design = new design ( $title , $hmenu, 1);
$design->header();
if(!isset($_POST['do']))
{
?>
<form action="index.php?ucpinstall" method="POST">
<input type="hidden" name="do" value="1">
<table width="97%" class="border" border="0" cellspacing="1" cellpadding="3" align="center">
<tr class="Chead">
<td align="center">
<h2><strong>I&nbsp;n&nbsp;s&nbsp;t&nbsp;a&nbsp;l&nbsp;l&nbsp;a&nbsp;t&nbsp;i&nbsp;o&nbsp;n</strong></h2>
</td>
</tr>
<tr class="Cmite">
<td align="center">
<br />
<div style="margin-left:60px; text-align:left;">
<strong><u>Informationen:</u></strong><br /><br />
<strong>Modulname:</strong> <?php echo $script_name; ?><br />
<strong>Version:</strong> <?php echo $script_vers; ?><br />
<strong>Entwickler:</strong> <?php echo $scripter; ?><br />
<br />
<br />
Entwickelt f&uuml;r ilchClan Version <strong><?php echo $ilch_vers; ?> <?php echo $ilch_update; ?></strong> .<br />
<br />
<i>Andere Versionen k&ouml;nnen eventuell Fehler verursachen!</i>
</div>
<br />
<hr />
<br />
<div style="margin-left:60px; text-align:left;">
<strong><u>Wichtig:</u></strong><br /><br />
Machen Sie zuerst ein <a href="admin.php?backup" target="_blank" style="font-style:italic; font-weight:bold;">Backup</a> Ihrer Datenbank!<br />
<br />
</div>
</td>
</tr>
<tr class="Cdark">
<td align="center">
<input type="submit" value="Installieren" />
</td>
</tr>
</table>
</form>
<?php
}
elseif ($_POST['do'] == '1')
{
$error = '';
$sql_file = implode('',file('include/contents/ucpinstall.sql'));
$sql_file = preg_replace ("/(\015\012|\015|\012)/", "\n", $sql_file);
$sql_statements = explode(";\n",$sql_file);
foreach ( $sql_statements as $sql_statement )
{
if ( trim($sql_statement) != '' )
{
#echo '<pre>'.$sql_statement.'</pre><hr>';
db_query($sql_statement) OR $error .= mysql_errno().': '.mysql_error().'<br />';
}
}
// Ausgabe
?>
<table width="97%" class="border" border="0" cellspacing="1" cellpadding="3" align="center">
<tr class="Chead">
<td colspan="3">
<h2><strong>Installation abgeschlossen</strong></h2>
</td>
</tr>
<tr class="Cmite">
<td colspan="3" align="center">
<br />
<?php
if(!empty($error))
{
if(empty($fehler))
{
$fehler = 'Es sind Fehler bei der Installation aufgetreten!<br />Bitte benachrichtigen Sie den Entwickler.';
}
$fehler .= '<br /><br />Oben sollten Sie eine ausf&uuml;hrlichere Fehlermeldung sehen<br />(ab ilchClan Version 1.1 I).';
echo $fehler.'<br /><br /><hr /><br /><strong style="text-decoration:underline;">Fehlermeldungen:</strong><br /><br /><span style="color:#FF0000;font-size:bold;">'.$error.'</span>';
}
else
{
if(empty($erfolg))
{
$erfolg = 'Die Installation wurde erfolgreich abgeschlossen!';
}
if(@unlink('include/contents/installation.php') && @unlink('include/contents/installation.sql'))
{
$erfolg .= '<br /><br />Diese Installationsdateien wurden erfolgreich gel&ouml;scht. Es muss nichts mehr getan werden.';
}
else
{
$erfolg .= '<br /><br /><strong>Die Installationsdateien konnten nicht automatisch gel&ouml;scht werden. L&ouml;schen Sie folgende Dateien:</strong><br /><br /><i>include/contents/ucpinstall.php</i><br /><i>include/contents/ucpinstall.sql</i>';
}
echo $erfolg;
}
?>
<br />
<br />
</td>
</tr>
<tr class="Chead">
<td colspan="3" align="center">
<button onclick="javascript:window.location.href = 'index.php';">Auf die Startseite</button>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php
}
$design->footer();
?>

View File

@ -0,0 +1,22 @@
ALTER TABLE `prefix_user` ADD (
userpic varchar(100),
firstname varchar(50),
lastname varchar(50),
skype varchar(50),
steam varchar(50),
xfire varchar(50),
descr text
);
INSERT INTO `prefix_config` (schl, typ, kat, frage, wert, pos) VALUES ('multi_nicks','r2','User Controll Pannel','Dürfen Nicknamen mehrfach verwendet werden?','0','0');
INSERT INTO `prefix_config` (schl, typ, kat, frage, wert, pos) VALUES ('ucp_vctrl','r2','User Controll Pannel','Versionskontrolle Aktivieren?','0','0');
INSERT INTO `prefix_config` (schl, typ, kat, frage, wert, pos) VALUES ('logintype','input','User Controll Pannel','Welche Daten sollen beim Login eingegeben werden?(name|email|id)','email','0');
INSERT INTO `prefix_config` (schl, typ, kat, frage, wert, pos) VALUES ('min_nick_lange','input','User Controll Pannel','Wie lang müssen Nicknamen mindestens sein?','3','0');
INSERT INTO `prefix_config` (schl, typ, kat, frage, wert, pos) VALUES ('ava_max_fsize','input','User Controll Pannel - Avatar','Wie groß dürfen Avatare sein?(in Bytes)','204800','0');
INSERT INTO `prefix_config` (schl, typ, kat, frage, wert, pos) VALUES ('ava_max_breite','input','User Controll Pannel - Avatar','Wie breit dürfen Avatare sein?(in Pixel)','100','0');
INSERT INTO `prefix_config` (schl, typ, kat, frage, wert, pos) VALUES ('ava_max_hoehe','input','User Controll Pannel - Avatar','Wie hoch dürfen Avatare sein?(in Pixel)','100','0');
INSERT INTO `prefix_config` (schl, typ, kat, frage, wert, pos) VALUES ('upic_max_fsize','input','User Controll Pannel - User Bild','Wie groß dürfen User Bilder sein?(in Bytes)','512000','0');
INSERT INTO `prefix_config` (schl, typ, kat, frage, wert, pos) VALUES ('upic_max_breite','input','User Controll Pannel - User Bild','Wie breit dürfen User Bilder sein?(in Pixel)','180','0');
INSERT INTO `prefix_config` (schl, typ, kat, frage, wert, pos) VALUES ('upic_max_hoehe','input','User Controll Pannel - User Bild','Wie hoch dürfen User Bilder sein?(in Pixel)','240','0');

View File

@ -0,0 +1,341 @@
<?php
# hier werden alle user spezifischen funktionen
# definert...
function user_identification () {
user_auth();
user_login_check();
user_update_database();
user_check_url_rewrite();
}
function user_auth () {
debug ('user - auth gestartet'. session_id());
$cn = session_und_cookie_name();
if (!user_key_in_db()
OR !isset($_SESSION['authid'])
OR (isset($_SESSION['authsess']) AND $_SESSION['authsess'] != $cn)) {
debug ('user - nicht in db oder nicht authid');
user_set_guest_vars();
user_set_user_online ();
# wenn cn cookie vorhanden
# dann checken ob er sich damit einloggen darf
if (isset($_COOKIE[$cn])) {
user_auto_login_check();
}
# gruppen, und modulzugehoerigkeit setzten
user_set_grps_and_modules();
}
}
function user_check_url_rewrite() {
global $allgAr;
if ( !loggedin() AND $allgAr['show_session_id'] == 0 ) {
# loescht die sessionid von allen urls
# auch urls wie formulare usw. damit
# suchmaschienen bots nicht iritiert sind ;)
# output_reset_rewrite_vars ist eine php funktion
# nicht unnoetig dannach suchen ;) ...
output_reset_rewrite_vars ();
}
}
function user_update_database () {
$dif = date('Y-m-d H:i:s', time() - 7200);
db_query("UPDATE prefix_online SET uptime = now() WHERE sid = '".session_id()."'");
db_query("DELETE FROM prefix_online WHERE uptime < '". $dif."'");
if ( loggedin() ) {
db_query("UPDATE prefix_user SET llogin = '".time()."' WHERE id = '".$_SESSION['authid']."'");
}
}
function user_set_user_online () {
global $allgAr;
if (0 == db_result(db_query("SELECT COUNT(*) FROM prefix_online WHERE sid = '".session_id()."'"),0) ) {
db_query("INSERT INTO prefix_online (sid,uptime,ipa) VALUES ('".session_id()."',now(),'".getip()."')");
}
$_SESSION['authgfx'] = $allgAr['gfx'];
}
function user_key_in_db() {
if ( 1 == db_result(db_query("SELECT COUNT(*) FROM prefix_online WHERE sid = '".session_id()."'"),0) ) {
return ( true );
} else {
return ( false );
}
}
function session_und_cookie_name () {
return (md5(dirname($_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]).DBPREF));
}
function user_login_check () {
global $allgAr;
if ( isset ($_POST['user_login_sub']) AND isset ($_POST['name']) AND isset ($_POST['pass']) ) {
debug ('posts vorhanden');
switch($allgAr['logintype'])
{
case'email': $erg = db_query("SELECT name,id,recht,pass,llogin FROM prefix_user WHERE email = '".escape($_POST['name'],"string")."'");
break;
case'name': $erg = db_query("SELECT name,id,recht,pass,llogin FROM prefix_user WHERE name = '".escape($_POST['name'],"string")."'");
break;
case'id': $erg = db_query("SELECT name,id,recht,pass,llogin FROM prefix_user WHERE id = '".escape($_POST['name'],"integer")."'");
break;
default: $erg = db_query("SELECT name,id,recht,pass,llogin FROM prefix_user WHERE email = '".escape($_POST['name'],"string")."'");
break;
}
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'];
$_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();
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, "/" );
return (true);
}
}
user_logout ();
return (false);
}
function user_set_guest_vars() {
$_SESSION['authname'] = 'Gast';
$_SESSION['authid'] = 0;
$_SESSION['authright'] = 0;
$_SESSION['lastlogin'] = time();
$_SESSION['authgrp'] = array();
$_SESSION['authmod'] = array();
$_SESSION['authsess'] = session_und_cookie_name();
}
function user_markallasread () {
$_SESSION['lastlogin'] = time();
}
function user_logout () {
#global $allgAr;
#$_SESSION = array();
#$_SESSION['authgfx'] = $allgAr['gfx'];
user_set_guest_vars();
db_query("UPDATE prefix_online SET uid = ".$_SESSION['authid']." WHERE sid = '".session_id()."'");
setcookie(session_und_cookie_name(), "", time()-999999999999, "/" );
#if (isset($_COOKIE[session_name()])) {
# setcookie(session_name(), '', time()-99999999999931104000, '/');
#}
#setcookie(session_und_cookie_name(), "", time()-999999999999, "/" );
#session_destroy();
}
function user_set_grps_and_modules () {
$_SESSION['authgrp'] = array();
$_SESSION['authmod'] = array();
if ( loggedin() ) {
$erg = db_query("SELECT gid FROM prefix_groupusers WHERE uid = ".$_SESSION['authid']);
while ( $row = db_fetch_assoc ( $erg ) ) {
$_SESSION['authgrp'][$row['gid']] = TRUE;
}
$erg = db_query("SELECT DISTINCT url
FROM prefix_modulerights
left join prefix_modules on prefix_modules.id = prefix_modulerights.mid
WHERE uid = ".$_SESSION['authid']);
while ( $row = db_fetch_assoc ( $erg ) ) {
$_SESSION['authmod'][$row['url']] = TRUE;
}
}
}
function loggedin () {
if ( has_right(-1) ) { return ( true ); } else { return ( false ); }
}
function is_admin () {
if ( has_right(-9) ) { return ( true ); } else { return ( false ); }
}
function is_coadmin () {
if ( has_right(-8) ) { return ( true ); } else { return ( false ); }
}
function is_siteadmin ($m = NULL) {
if ( has_right(-7) ) { return ( true ); }
if ( !is_null($m) AND has_right(NULL, $m)) { return (true); }
return ( false );
}
# diese funktion liefert immer true wenn es ein admin ist.
# wenn kein kein admin wird geprueft ob der user
# entweder ein angegebenes recht oder in einer angegebene
# gruppe ist. oder ob er fals angegben das modulrecht hat.
# wenn eines von diesen 3 kriterien stimmt wird true ansonsten
# wenn keins uebereinstimmt false zurueck gegeben.
function has_right ($recht,$modul = '') {
if ( !is_array($recht) AND !is_null($recht) ) {
$recht = array ( $recht );
}
if ( $_SESSION['authright'] == -9 ) {
return ( true );
}
if ( !is_null($recht) ) {
foreach ( $recht as $v ) {
if ( ($v <= 0 AND $v >= $_SESSION['authright'] ) OR (isset($_SESSION['authgrp'][$v]) AND $_SESSION['authgrp'][$v] === true) ) {
return (true);
}
}
}
if ( !empty($modul) AND isset($_SESSION['authmod'][$modul]) AND $_SESSION['authmod'][$modul] === true ) {
return ( true );
}
return (false);
}
### admin
# wenn der 2. parameter weggelassen wird oder auf true gesetzt wird
# dann wird ein login formular angezeigt, wenn der user kein admin ist.
# wird der parameter auf false gesetzt wird das login formular nicht angezeigt.
# erste parameter ist das menu objekt...
function user_has_admin_right (&$menu,$sl=true) {
if ( $_SESSION['authright'] <= -8 ) { # co leader...
return ( true );
} else {
$uri_to_check1 = $menu->get(0);
$uri_to_check2 = $menu->get(1);
if ( count($_SESSION['authmod']) < 1 OR !loggedin() ) {
if ( $sl === true ) {
if ( !loggedin() ) {
$tpl = new tpl ( 'user/login.htm' );
$tpl->set_out('WDLINK','admin.php',0);
} else {
echo '<strong>Keine Berechtigung!</strong> <a href="index.php">Startseite</a>';
}
}
return ( false );
} elseif ( (isset($_SESSION['authmod'][$uri_to_check1]) AND $_SESSION['authmod'][$uri_to_check1] == true)
OR (isset($_SESSION['authmod'][$uri_to_check1.'-'.$uri_to_check2]) AND $_SESSION['authmod'][$uri_to_check1.'-'.$uri_to_check2] == true) ) {
return ( true );
} elseif ( count($_SESSION['authmod']) > 0 AND loggedin() ) {
if ( $sl === true ) {
foreach($_SESSION['authmod'] as $k => $v ) { $x = $k; break; }
$x = explode('-',$x);
$menu->set_url (0, $x[0]);
if ( isset($x[1]) ) {
$menu->set_url (1, $x[1]);
}
}
return ( true );
}
}
return ( false );
}
function user_regist ($name, $mail, $pass) {
global $allgAr, $lang;
$erg = db_query("SELECT id FROM prefix_user WHERE name = BINARY '".$name."'");
if (db_num_rows($erg) > 0) {
return (false);
}
if ( $allgAr['forum_regist_user_pass'] == 0 ) {
$new_pass = genkey(8);
} else {
$new_pass = $pass;
}
$md5_pass = md5($new_pass);
$confirmlinktext = '';
# confirm insert in confirm tb not confirm insert in user tb
if ( $allgAr['forum_regist_confirm_link'] == 1 ) {
# confirm link + text ... bit of shit put it in languages file
$page = $_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"];
$id = md5 (uniqid (rand()));
$confirmlinktext = "\n".$lang['registconfirm']."\n\n".sprintf($lang['registconfirmlink'], $page, $id );
db_query("INSERT INTO prefix_usercheck (`check`,name,email,pass,datime,ak)
VALUES ('".$id."','".$name."','".$mail."','".$md5_pass."',NOW(),1)");
} else {
db_query("INSERT INTO prefix_user (name,pass,recht,regist,llogin,email,status,opt_mail,opt_pm)
VALUES('".$name."','".$md5_pass."',-1,'".time()."','".time()."','".$mail."',1,1,1)");
$userid = db_last_id();
}
$regmail = sprintf($lang['registemail'],$name, $confirmlinktext, $name, $new_pass);
icmail($mail,'Anmeldung',$regmail); # email an user
return (true);
}
function user_remove($uid){
$row = @db_fetch_object(db_query("SELECT recht,avatar FROM prefix_user WHERE id = ".$uid));
if ( $uid <> 1 AND ($_SESSION['authid'] == $uid OR $_SESSION['authid'] == 1 OR (is_coadmin() AND $_SESSION['authright'] < $row->recht))) {
db_query("DELETE FROM prefix_user WHERE id = ".$uid);
db_query("DELETE FROM prefix_userfields WHERE uid = ".$uid);
db_query("DELETE FROM prefix_groupusers WHERE uid = ".$uid);
db_query("DELETE FROM prefix_modulerights WHERE uid = ".$uid);
db_query("DELETE FROM prefix_pm WHERE eid = ".$uid);
db_query("DELETE FROM prefix_online WHERE uid = ".$uid);
//Usergallery entfernen
$sql = db_query("SELECT id,endung FROM prefix_usergallery WHERE uid = ".$uid);
while( $r = db_fetch_object($sql) ){
@unlink("include/images/usergallery/img_$r->id.$r->endung");
@unlink("include/images/usergallery/img_thumb_$r->id.$r->endung");
}
db_query("DELETE FROM prefix_usergallery WHERE uid = ".$uid);
//Avatar
@unlink($row->avatar);
}
}
function sendpm ($sid,$eid,$ti,$te,$status = 0) {
if (is_array($eid)) {
db_query("INSERT INTO `prefix_pm` (`sid`,`eid`,`time`,`titel`,`txt`,`status`) ".
"SELECT ".$sid.",`prefix_user`.`id`,'".time()."','".$ti."','".$te."',".$status." FROM `prefix_user` WHERE `prefix_user`.`id` IN (" . implode(',', $eid) . ")");
} else {
db_query("INSERT INTO `prefix_pm` (`sid`,`eid`,`time`,`titel`,`txt`,`status`) VALUES (".$sid.",".$eid.",'".time()."','".$ti."','".$te."',".$status.")");
}
}
?>

View File

@ -0,0 +1,18 @@
<div>{message}</div>
<form enctype="multipart/form-data" action="index.php?ucp-ava" method="post">
<fieldset><legend>Avatar Hochladen:</legend>
<div><b><u>Der Avatar:</u><br>
Der Avatar ist ein Bild,<br>
welches alles darstellen kann.<br>
Jedoch einen bezug zu der<br>
Pers&ouml;nlichkeit haben sollte.</b></div>
<label style="float:left; width:35%;">&nbsp;</label>
<img src="{ava}" alt="Kein Avatar Vorhanden!" /><br>
<label style="float:left; width:35%;">&nbsp;</label><input style="margin-bottom:2px;" type="file" name="avatarfile" />
<input type="submit" value="Upload" name="subAva">
<div><b><u>Maximale Dateigr&ouml;&szlig;e:</u><br>
- Breite: {iBreite}<br >
- H&ouml;he: {iHoehe}<br>
- Dateigr&ouml;&szlig;e: {fsize}</b></div>
</fieldset>
</form>

View File

@ -0,0 +1,20 @@
<form action="index.php?ucp-contact" method="post">
<fieldset><legend>Kontakt:</legend>
<div style="width:45%; float:left; height:23px;">ICQ:</div>
<div style="width:55%; float:left; height:23px;"><input style="width:90%;" name="icq" value="{icq}" /></div>
<div style="width:45%; float:left; height:23px;">MSN:</div>
<div style="width:55%; float:left; height:23px;"><input style="width:90%;" name="msn" value="{msn}" /></div>
<div style="width:45%; float:left; height:23px;">Skype:</div>
<div style="width:55%; float:left; height:23px;"><input style="width:90%;" name="skype" value="{skype}" /></div>
<div style="width:45%; float:left; height:23px;">Yahoo:</div>
<div style="width:55%; float:left; height:23px;"><input style="width:90%;" name="yahoo" value="{yahoo}" /></div>
<div style="width:45%; float:left; height:23px;">AIM:</div>
<div style="width:55%; float:left; height:23px;"><input style="width:90%;" name="aim" value="{aim}" /></div>
<div style="width:100%; height:20px;"></div>
<div style="width:45%; float:left; height:23px;">Steam:</div>
<div style="width:55%; float:left; height:23px;"><input style="width:90%;" name="steam" value="{steam}" /></div>
<div style="width:45%; float:left; height:23px;">xFire:</div>
<div style="width:55%; float:left; height:23px;"><input style="width:90%;" name="xfire" value="{xfire}" /></div>
<div style="width:100%; height:23px; clear:both;"><input type="submit" name="subContact" value="Speichern" /></div>
</fieldset>
</form>

View File

@ -0,0 +1,12 @@
<form action="index.php?ucp-fields" method="post">
{EXPLODE}
<fieldset><legend>{KATE}:</legend>
{EXPLODE}
<div style="width:45%; height:23px; float:left;">{FIELD}:</div>
<div style="width:55%; height:23px; float:left;"><input type="text" name="{FNAME}" value="{FWERT}" style="width:80%;" /></div>
{EXPLODE}
<div style="clear:both; height:0px;"></div>
</fieldset>
{EXPLODE}
<input type="submit" name="subFields" value="Speichern" />
</form>

View File

@ -0,0 +1,39 @@
<div>{message}</div>
<form action="index.php?ucp-info" method="post">
<fieldset><legend>Benutzer Information:</legend>
<div style="width:45%; height:23px; float:left;">Vorname:</div>
<div style="width:55%; height:23px; float:left;"><input type="text" name="vname" value="{vname}" style="width:80%;" /></div>
<div style="width:45%; height:23px; float:left;">Nachname:</div>
<div style="width:55%; height:23px; float:left;"><input type="text" name="nname" value="{nname}" style="width:80%;" /></div>
<div style="width:45%; height:23px; float:left;">Nickname:</div>
<div style="width:55%; height:23px; float:left;"><input type="text" name="nickname" value="{nickname}" style="width:80%;" /></div>
<div style="height:10px; clear:both;"></div>
<div style="width:45%; height:23px; float:left;">Geb. Datum<i style="font-size:9px;">(YYYY-MM-DD)</i>:</div>
<div style="width:55%; height:23px; float:left;"><input type="text" name="gebdate" value="{gebdate}" style="width:80%;" /></div>
<div style="height:0px; clear:both;"></div>
<div style="width:100%; height:23px;">Welchen Geschlechtes sind sie?</div>
<div style="width:100%; height:23px; text-align:center;">
<input id="opt_sex1" type="radio" onclick="opt_select(this.id);" value="1" name="opt_sex" {opt_sex1} /><label for="opt_sex1"> M&auml;nnlich</label>
<input id="opt_sex2" type="radio" onclick="opt_select(this.id);" value="2" name="opt_sex" {opt_sex2} /><label for="opt_sex2"> Weiblich</label>
<input id="opt_sex0" type="radio" onclick="opt_select(this.id);" value="0" name="opt_sex" {opt_sex0} /><label for="opt_sex0"> Zwitter</label>
</div>
<div style="width:100%; height:23px; clear:both;">Status:</div>
<div style="width:100%; height:23px; text-align:center;">
<input id="status_aktiv" type="radio" value="1" name="status" {status1} /><label for="status_aktiv">Aktiv</label>
<input id="status_inaktiv" type="radio" value="0" name="status" {status0} /><label for="status_inaktiv">Nicht Aktiv</label>
</div>
<div style="width:45%; hieght:23px; float:left;">Staat:</div>
<div style="width:55%; height:23px; float:left;">
<select name="staat" style="width:80%;">
{staat}
</select>
</div>
<div style="width:45%; height:23px; float:left;">Ort:</div>
<div style="width:55%; height:23px; float:left;"><input type="text" name="ort" value="{ort}" style="width:80%;" /></div>
<div style="width:45%; height:23px; float:left;">Homepage:</div>
<div style="width:55%; height:23px; float:left;"><input type="text" name="hp" value="{hp}" style="width:80%;" /></div>
<div style="width:100%; clear:both; height:15px;">Beschreiben sie sich selbst:</div>
<div style="width:100%; text-align:center;"><textarea name="descr" style="width:80%; height:150px;">{descr}</textarea></div>
</fieldset>
<div><input type="submit" name="subInfo" value="Speichern" /></div>
</form>

View File

@ -0,0 +1,24 @@
<br>
<div>
<span style="margin-left:5px; font-size:20px;">Hallo <b>{name}</b>,<br> Willkommen im User Control Panel.</span>
<div>
<img src="{upic}" alt="Userpic von {name}" style="float:left; margin-left:5px; height:150px;"/>
<img src="{ava}" alt="Avatar von {name}?!" style="float:left; margin-left:5px;"/>
</div>
<div style="height:0px; clear:both;"></div>
</div><br><hr>
{EXPLODE}
<div style="text-align:center;">
<div style="margin:auto; width:80%;">
<a href="index.php?ucp-safe" style="display:block; float:left; padding: 5px;"><img src="include/images/ucp/safe.png" alt="Sicherheits Einstellungen" /><br>Sicherheits Einstellungen</a>
<a href="index.php?ucp-sets" style="display:block; float:left; padding: 5px;"><img src="include/images/ucp/sets.png" alt="Account Einstellungen" /><br>Account Einstellungen</a>
<a href="index.php?ucp-info" style="display:block; float:left; padding: 5px;"><img src="include/images/ucp/info.png" alt="User Informationen" /><br>User Informationen</a>
<a href="index.php?ucp-contact" style="display:block; float:left; padding: 5px;"><img src="include/images/ucp/contact.png" alt="Kontakt Daten" /><br>Kontakt Daten</a>
<a href="index.php?ucp-ava" style="display:block; float:left; padding: 5px;"><img src="include/images/ucp/ava.png" alt="Avatar" /><br>Avatar</a>
<a href="index.php?ucp-upic" style="display:block; float:left; padding: 5px;"><img src="include/images/ucp/userpic.png" alt="User Bild" /><br>User Bild</a>
<a href="index.php?ucp-sig" style="display:block; float:left; padding: 5px;"><img src="include/images/ucp/sig.png" alt="Signatur" /><br>Signatur</a>
<a href="index.php?ucp-fields" style="display:block; float:left; padding: 5px;"><img src="include/images/ucp/fields.png" alt="Profilfelder" /><br>Profilfelder</a>
</div>
</div>
{EXPLODE}
<hr style="clear:both;">{back}

View File

@ -0,0 +1,12 @@
<div>{message}</div>
<form action="index.php?ucp-safe" method="post">
<fieldset><legend><b>Sicherheits Einstellungen:</b></legend>
<div style="width:45%; height:23px; float:left;">Aktuelles Passwort:</div>
<div style="width:55%; height:23px; float:left;"><input style="width:80%;" name="oPass" type="password" /></div>
<div style="width:45%; height:23px; float:left;">Neues Passwort:</div>
<div style="width:55%; height:23px; float:left;"><input style="width:80%;" name="pass" type="password" /></div>
<div style="width:45%; height:23px; float:left;">Passwort wiederholen:</div>
<div style="width:55%; height:23px; float:left;"><input style="width:80%;" name="pass2" type="password" /></div>
<div style="clear:both; width:100%;"><input type="submit" name="subEdit" value="&Auml;ndern" /></div>
</fieldset>
</form>

View File

@ -0,0 +1,57 @@
<script type="text/javascript">
<!--
function opt_select($cOpt)
{
if($cOpt=="opt_mail1")
{
document.getElementById("opt_mail0").checked = '';
}
if($cOpt=="opt_pm1")
{
document.getElementById("opt_pm0").checked = '';
}
if($cOpt=="opt_pmp1")
{
document.getElementById("opt_pmp0").checked = '';
}
if($cOpt=="opt_mail0")
{
document.getElementById("opt_mail1").checked = '';
}
if($cOpt=="opt_pm0")
{
document.getElementById("opt_pm1").checked = '';
}
if($cOpt=="opt_pmp0")
{
document.getElementById("opt_pmp1").checked = '';
}
}
-->
</script>
<div>{message}</div>
<form action="index.php?ucp-sets" method="post">
<fieldset><legend>Account Einstellungen:</legend>
<div style="width:100%; height:20px;">D&uuml;rfen Ihnen andere Mitglieder Emails senden?</div>
<div style="width:100%; text-align:center;">
<input id="opt_mail1" type="radio" onclick="opt_select(this.id);" value="1" name="opt_mail" {opt_mail1} /><label for="opt_mail1"> Ja</label>
<input id="opt_mail0" type="radio" onclick="opt_select(this.id);" value="0" name="opt_mail" {opt_mail0} /><label for="opt_mail0"> Nein</label>
</div>
<div style="width:100%; height:20px;">D&uuml;rfen Ihnen andere Mitglieder Privat Nachrichten senden?</div>
<div style="width:100%; text-align:center;">
<input id="opt_pm1" type="radio" onclick="opt_select(this.id);" value="1" name="opt_pm" {opt_pm1} /><label for="opt_pm1"> Ja</label>
<input id="opt_pm0" type="radio" onclick="opt_select(this.id);" value="0" name="opt_pm" {opt_pm0} /><label for="opt_pm0"> Nein</label>
</div>
<div style="width:100%; height:20px;">Wollen Sie dass sich bei einer neuen Privat Nachricht ein Popup &ouml;ffnet?</div>
<div style="width:100%; text-align:center;">
<input id="opt_pmp1" type="radio" onclick="opt_select(this.id);" value="1" name="opt_pmp" {opt_pmp1} /><label for="opt_pmp1"> Ja</label>
<input id="opt_pmp0" type="radio" onclick="opt_select(this.id);" value="0" name="opt_pmp" {opt_pmp0} /><label for="opt_pmp0"> Nein</label>
</div>
<div style="width:100%;"><input type="submit" name="subSets" value="Speichern" /></div>
</fieldset>
</form>

View File

@ -0,0 +1,10 @@
<div>{message}</div>
<div>{preview}</div>
<form action="index.php?ucp-sig" method="post">
<fieldset>
<legend>Signatur:</legend>
<textarea style="margin-bottom:2px;" cols="60" rows="2" name="sig">{sig}</textarea><br />
<input type="submit" name="subSig" value="Speichern" />
<input type="submit" name="preSig" value="Vorschau" />
</fieldset>
</form>

View File

@ -0,0 +1,16 @@
<div>{message}</div>
<form enctype="multipart/form-data" action="index.php?ucp-upic" method="post">
<fieldset><legend>User Bild Hochladen:</legend>
<div><b><u>Das Userbild:</u><br>
Das User-Bild sollte sie selbst,<br>
bzw. Ihr Gesicht darstellen.</b></div>
<label style="float:left; width:35%;">&nbsp;</label>
<img src="{upic}" alt="Kein UserPic Vorhanden!" /><br>
<label style="float:left; width:35%;">&nbsp;</label><input style="margin-bottom:2px;" type="file" name="upicfile" />
<input type="submit" value="Upload" name="subUpic">
<div><b><u>Maximale Dateigr&ouml;&szlig;e:</u><br>
- Breite: {iBreite}<br >
- H&ouml;he: {iHoehe}<br>
- Dateigr&ouml;&szlig;e: {fsize}</b></div>
</fieldset>
</form>

View File

@ -0,0 +1,27 @@
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td>
Hallo &nbsp;<b>{NAME}</b>
<br />
<br />
{NACHRICHTEN}
<a class="box" href="index.php?user-3">{_lang_logout}</a> | <a class="box" href="index.php?user-8">{_lang_profil}</a>
<br>
{ADMIN}
</td>
</tr>
</table>
{EXPLODE}
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td>
<form method="POST">
<input type="text" name="name" size="13" value="{NAME}" onFocus="if (value == '{NAME}') {value = ''}" onBlur="if (value == '') {value = '{NAME}'}" style="margin-top:5px; " /><br />
<input type="password" size="13" value="{PASS}" onFocus="if (value == '{PASS}') {value = ''}" onBlur="if (value == '') {value = '{PASS}'}" maxlength="20" name="pass" style="margin-top:5px; " /><br />
<input type="hidden" name="wdlink" value="{wdlink}" />
<input type="submit" name="user_login_sub" value="Login" style="margin-top:5px; " />{regist}
</form>
</td>
</tr>
</table>

View File

@ -0,0 +1,22 @@
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td>
<form action="index.php?user-login" method="POST">
<fieldset>
<legend><b>{_lang_LOGIN}</b></legend>
<label style="float:left; width:60px;">E-Mail:</label><b style="float:left; text-align:left; width:20px;">:</b><input type="text" style="margin-bottom:2px;" tabindex="1" name="name" /><br />
<label style="float:left; width:60px;">{_lang_password}</label><b style="float:left; text-align:left; width:20px;">:</b><input type="password" style="margin-bottom:2px;" tabindex="2" maxlength="20" name="pass" /><br />
<label style="float:left; width:80px;">&nbsp;</label><input type="hidden" name="wdlink" value="{WDLINK}" /><input type="submit" style="margin-bottom:2px;" tabindex="3" value="{_lang_login}" name="user_login_sub" /><br /><br />
<label style="padding-left:80px;"><a href="index.php?user-regist">{_lang_registernow}</a></label><br />
<label style="padding-left:80px;"><a href="index.php?user-remind">{_lang_forgottenpassword}?</a></label>
</form>
</td>
</tr>
</table>
{EXPLODE}
{_lang_yourareloged}!
{EXPLODE}
{_lang_login3failure}

1
version.txt Normal file
View File

@ -0,0 +1 @@
1.1.0.2