Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- ini_set('display_errors', 1);
- if( (isset($_GET['action'])) AND ($_GET['action'] == 'login') ) { ?>
- <p>Das Login ist noch nicht verfügbar!<br /><br /><a href="?p=members">Zurück</a></p>
- <?php }else if($_GET['action'] == 'register'){ ?>
- <form name="reg" method="post" action="?p=members&action=register&do=send">
- <p>
- <label for="nick">Minecraft-Nutzername*:</label>
- <input type="text" name="nick" id="nick" required>
- <br />
- <label for="dname">Anzeige Name*:</label>
- <input type="text" name="dname" id="dname" required>
- <label for="passwort"><br />
- Passwort*:</label>
- <input type="password" name="passwort" id="passwort" required>
- <br />
- <label for="email">Email-Adresse*:</label>
- <input type="mail" name="email" id="email" required>
- <br />
- <br />
- <input type="checkbox" name="agb" id="agb">
- Ich habe die AGB/<a href="?p=faq&mode=view&id=2">Regeln</a> gelesen und akzeptiert.</p>
- <p>
- <input type="submit" name="send" id="send" value="Registrierung abschließen">
- </p>
- </form>
- <?php }else if(isset($_GET['action']) == 'info'){
- $user = $_GET['user'];
- $sql = "SELECT * FROM user WHERE nick='".mysql_real_escape_string($user)."'";
- $entry = mysql_query($sql,$datenbank) or die(mysql_error());
- while($user = mysql_fetch_object($entry))
- {
- ?>
- <table width="95%">
- <tr>
- <th><p>Profil von <?php $user->dname ?></p></th>
- <th><a href="?p=members">Zurück zur Übersicht</a></th>
- </tr>
- <tr>
- <td><img src="themes/minecraft/images/gravatar.jpg" width="120" height="120" alt="char<?php$user->ava ?>" /><img src="content/images/avatare/<?php $user->ava ?>" width="120" height="120" alt="char<?php $user->ava ?>" /></td>
- <td><p><?php $user->info ?></p></td>
- </tr>
- <tr>
- <td><p>Mitglied seit:</p></td>
- <td><p><?php $user->regdate ?></p></td>
- </tr>
- <tr>
- <td><p>Kontakt:</p></td>
- <td>
- <table>
- <tr><p><img src="content/images/icq.png" alt="icq" width="50" height="50" border="0" /> <?php $user->icq ?></p></tr>
- <tr><p><img src="content/images/msn.png" alt="icq" width="50" height="50" border="0" /> <?php $user->msn ?></p></tr>
- <tr><p><img src="content/images/skype.png" alt="icq" width="50" height="50" border="0" /> <?php $user->skype ?></p></tr>
- <tr><p><img src="content/images/xmpp.png" alt="icq" width="50" height="50" border="0" /> <?php $user->xmpp ?></p></td>
- </table>
- </tr>
- <tr>
- <td><p>Position:</p></td>
- <td><p><?php $user->rank ?></p></td>
- </tr>
- </td>
- </tr>
- </table>
- <table width="95%">
- <tr>
- <td><?php $user->signatur ?></td>
- </tr>
- </table>
- <?php if($user->rank == 'Admin') {
- echo('<h4>Letzte News Beiträge</h4>'."\n");
- echo('<ul class="archive">'."\n");
- $sql2 = "SELECT * FROM news where autor='".mysql_real_escape_string($_GET['user'])."' ORDER BY id DESC LIMIT 0, 3";
- $entry = mysql_query($sql2,$datenbank) or die(mysql_error());
- while($lastnews = mysql_fetch_object($entry))
- {
- ?>
- <li>
- <div class="post-title"><a href="?p=news&mode=view&id=<?php $lastnews->id ?>"><?php $lastnews->title ?></a></div>
- <div class="post-details">Geschrieben am <?php $lastnews->datum ?></a> | Gespeichert unter <a href="?p=news&sel=cat&cat=<?php $lastnews->cat ?>"><?php $lastnews->cat ?></a></div>
- </li>
- <?php
- }
- echo('</ul>'."\n");
- }elseif($user->rank == 'Mod') {
- echo('<h4>Letzte News Beiträge</h4>'."\n");
- echo('<ul class="archive">'."\n");
- $sql2 = "SELECT * FROM news where autor='".mysql_real_escape_string($_GET['user'])."' ORDER BY id DESC LIMIT 0, 3";
- $entry = mysql_query($sql2,$datenbank) or die(mysql_error());
- while($lastnews = mysql_fetch_object($entry))
- {
- ?>
- <li>
- <div class="post-title"><a href="?p=news&mode=view&id=<?php $lastnews->id ?>"><?php $lastnews->title ?></a></div>
- <div class="post-details">Geschrieben am <?php $lastnews->datum ?></a> | Gespeichert unter <a href="?p=news&sel=cat&cat=<?php $lastnews->cat ?>"><?php $lastnews->cat ?></a></div>
- </li>
- <?php
- }
- echo('</ul>'."\n");
- }
- echo('<p> </p>'."\n");
- if($user->rank == 'Admin') {
- echo('<h4>Letzte FAQ Einträge</h4>'."\n");
- echo('<ul class="archive">'."\n");
- $sql3 = "SELECT * FROM faq where autor='".mysql_real_escape_string($_GET['user'])."' ORDER BY id DESC LIMIT 0, 3";
- $entry = mysql_query($sql3,$datenbank) or die(mysql_error());
- while($lastfaq = mysql_fetch_object($entry))
- {
- ?>
- <li>
- <div class="post-title"><a href="?p=news&mode=view&id=<?php $lastfaq->id ?>"><?php $lastfaq->title ?></a></div>
- <div class="post-details">Geschrieben am <?php $lastfaq->datum ?></a></div>
- </li>
- <?php
- }
- echo('</ul>'."\n");
- }elseif($user->rank == 'Mod') {
- echo('<h4>Letzte FAQ Einträge</h4>'."\n");
- echo('<ul class="archive">'."\n");
- $sql3 = "SELECT * FROM faq where autor='".mysql_real_escape_string($_GET['user'])."' ORDER BY id DESC LIMIT 0, 3";
- $entry = mysql_query($sql3,$datenbank) or die(mysql_error());
- while($lastfaq = mysql_fetch_object($entry))
- {
- ?>
- <li>
- <div class="post-title"><a href="?p=news&mode=view&id=<?php $lastfaq->id ?>"><?php $lastfaq->title ?></a></div>
- <div class="post-details">Geschrieben am <?php $lastfaq->datum ?></a></div>
- </li>
- <?php
- }
- echo('</ul>'."\n");
- }
- }
- }else{ ?>
- <p><a href="?p=members&action=login">Login</a> | <a href="?p=members&action=register">Registrieren</a>
- <p> </p>
- <table>
- <tr>
- <th>Avatar</th>
- <th>Nickname</th>
- <th>Rang</th>
- <th>Info</th>
- </tr>
- <?php $sql = "SELECT * FROM user ORDER BY id";
- $entry = mysql_query($sql,$datenbank) or die(mysql_error());
- while($user = mysql_fetch_object($entry))
- {
- ?>
- <tr>
- <td>
- <a href="?p=members&action=info&user=<?php $user->nick ?>"><img src="content/images/avatare/<?php $user->ava ?>" width="120" height="120" alt="char<?php $user->ava ?>" /></a>
- </td>
- <td>
- <p><?php $user->dname ?></p>
- </td>
- <td>
- <p><?php $user->rank ?></p>
- </td>
- <td>
- <p><?php $user->info ?></p>
- </td>
- </tr>
- <?php
- }
- echo('</table>'."\n");
- }
- if(isset($_GET['do']) AND 'send' == $_GET['do']) {
- $sqlk = "INSERT INTO user
- (
- nick,
- dname,
- passwort,
- email
- pos
- )
- VALUES
- (
- '".mysql_real_escape_string($_POST['nick'])."',
- '".mysql_real_escape_string($_POST['dname'])."',
- '".md5($_POST['passwort'])."',
- '".mysql_real_escape_string($_POST['email'])."'
- )";
- $qry = mysql_query($sqlk,$datenbank) or die(mysql_error());
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement