Advertisement
Syntafin

Untitled

Feb 3rd, 2012
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.95 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL);
  3. ini_set('display_errors', 1);
  4. if( (isset($_GET['action'])) AND ($_GET['action'] == 'login') ) { ?>
  5.     <p>Das Login ist noch nicht verf&uuml;gbar!<br /><br /><a href="?p=members">Zur&uuml;ck</a></p>
  6. <?php }else if($_GET['action'] == 'register'){ ?>
  7.     <form name="reg" method="post" action="?p=members&amp;action=register&amp;do=send">
  8.     <p>
  9.     <label for="nick">Minecraft-Nutzername*:</label>
  10.     <input type="text" name="nick" id="nick" required>
  11.     <br />
  12.     <label for="dname">Anzeige Name*:</label>
  13.     <input type="text" name="dname" id="dname" required>
  14.     <label for="passwort"><br />
  15.     Passwort*:</label>
  16.     <input type="password" name="passwort" id="passwort" required>
  17.     <br />
  18.     <label for="email">Email-Adresse*:</label>
  19.     <input type="mail" name="email" id="email" required>
  20.     <br />
  21.     <br />
  22.     <input type="checkbox" name="agb" id="agb">
  23.     Ich habe die AGB/<a href="?p=faq&amp;mode=view&amp;id=2">Regeln</a> gelesen und akzeptiert.</p>
  24.     <p>
  25.      <input type="submit" name="send" id="send" value="Registrierung abschlie&szlig;en">
  26.     </p>
  27.     </form>
  28. <?php }else if(isset($_GET['action']) == 'info'){
  29.     $user = $_GET['user'];
  30.     $sql = "SELECT * FROM user WHERE nick='".mysql_real_escape_string($user)."'";
  31.     $entry = mysql_query($sql,$datenbank) or die(mysql_error());
  32.     while($user = mysql_fetch_object($entry))
  33.     {
  34.     ?>
  35.         <table width="95%">
  36.         <tr>
  37.         <th><p>Profil von <?php $user->dname  ?></p></th>
  38.         <th><a href="?p=members">Zur&uuml;ck zur &Uuml;bersicht</a></th>
  39.         </tr>
  40.         <tr>
  41.         <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>
  42.         <td><p><?php $user->info  ?></p></td>
  43.         </tr>
  44.         <tr>
  45.         <td><p>Mitglied seit:</p></td>
  46.         <td><p><?php $user->regdate  ?></p></td>
  47.         </tr>
  48.         <tr>
  49.         <td><p>Kontakt:</p></td>
  50.         <td>
  51.         <table>
  52.         <tr><p><img src="content/images/icq.png" alt="icq" width="50" height="50" border="0" /> <?php $user->icq ?></p></tr>
  53.         <tr><p><img src="content/images/msn.png" alt="icq" width="50" height="50" border="0" /> <?php $user->msn ?></p></tr>
  54.         <tr><p><img src="content/images/skype.png" alt="icq" width="50" height="50" border="0" /> <?php $user->skype ?></p></tr>
  55.         <tr><p><img src="content/images/xmpp.png" alt="icq" width="50" height="50" border="0" /> <?php $user->xmpp ?></p></td>
  56.         </table>
  57.         </tr>
  58.         <tr>
  59.         <td><p>Position:</p></td>
  60.         <td><p><?php $user->rank ?></p></td>
  61.         </tr>
  62.         </td>
  63.         </tr>
  64.         </table>
  65.         <table width="95%">
  66.         <tr>
  67.         <td><?php $user->signatur ?></td>
  68.         </tr>
  69.         </table>
  70.         <?php if($user->rank == 'Admin') {
  71.             echo('<h4>Letzte News Beitr&auml;ge</h4>'."\n");
  72.             echo('<ul class="archive">'."\n");
  73.             $sql2 = "SELECT * FROM news where autor='".mysql_real_escape_string($_GET['user'])."' ORDER BY id DESC LIMIT 0, 3";
  74.             $entry = mysql_query($sql2,$datenbank) or die(mysql_error());
  75.             while($lastnews = mysql_fetch_object($entry))
  76.             {
  77.             ?>
  78.                 <li>
  79.                 <div class="post-title"><a href="?p=news&amp;mode=view&amp;id=<?php $lastnews->id ?>"><?php $lastnews->title ?></a></div>
  80.                 <div class="post-details">Geschrieben am <?php $lastnews->datum ?></a> | Gespeichert unter <a href="?p=news&amp;sel=cat&amp;cat=<?php $lastnews->cat ?>"><?php $lastnews->cat ?></a></div>
  81.                 </li>
  82.             <?php
  83.             }
  84.             echo('</ul>'."\n");
  85.         }elseif($user->rank == 'Mod') {
  86.             echo('<h4>Letzte News Beitr&auml;ge</h4>'."\n");
  87.             echo('<ul class="archive">'."\n");
  88.             $sql2 = "SELECT * FROM news where autor='".mysql_real_escape_string($_GET['user'])."' ORDER BY id DESC LIMIT 0, 3";
  89.             $entry = mysql_query($sql2,$datenbank) or die(mysql_error());
  90.             while($lastnews = mysql_fetch_object($entry))
  91.             {
  92.             ?>
  93.                 <li>
  94.                 <div class="post-title"><a href="?p=news&amp;mode=view&amp;id=<?php $lastnews->id ?>"><?php $lastnews->title ?></a></div>
  95.                 <div class="post-details">Geschrieben am <?php $lastnews->datum ?></a> | Gespeichert unter <a href="?p=news&amp;sel=cat&amp;cat=<?php $lastnews->cat ?>"><?php $lastnews->cat ?></a></div>
  96.                 </li>
  97.             <?php
  98.             }
  99.             echo('</ul>'."\n");
  100.         }
  101.         echo('<p>&nbsp;&nbsp;</p>'."\n");
  102.         if($user->rank == 'Admin') {
  103.             echo('<h4>Letzte FAQ Eintr&auml;ge</h4>'."\n");
  104.             echo('<ul class="archive">'."\n");
  105.             $sql3 = "SELECT * FROM faq where autor='".mysql_real_escape_string($_GET['user'])."' ORDER BY id DESC LIMIT 0, 3";
  106.             $entry = mysql_query($sql3,$datenbank) or die(mysql_error());
  107.             while($lastfaq = mysql_fetch_object($entry))
  108.             {
  109.             ?>
  110.                 <li>
  111.                 <div class="post-title"><a href="?p=news&amp;mode=view&amp;id=<?php $lastfaq->id ?>"><?php $lastfaq->title ?></a></div>
  112.                 <div class="post-details">Geschrieben am <?php $lastfaq->datum ?></a></div>
  113.                 </li>
  114.             <?php
  115.             }
  116.             echo('</ul>'."\n");
  117.         }elseif($user->rank == 'Mod') {
  118.             echo('<h4>Letzte FAQ Eintr&auml;ge</h4>'."\n");
  119.             echo('<ul class="archive">'."\n");
  120.             $sql3 = "SELECT * FROM faq where autor='".mysql_real_escape_string($_GET['user'])."' ORDER BY id DESC LIMIT 0, 3";
  121.             $entry = mysql_query($sql3,$datenbank) or die(mysql_error());
  122.             while($lastfaq = mysql_fetch_object($entry))
  123.             {
  124.             ?>
  125.                 <li>
  126.                 <div class="post-title"><a href="?p=news&amp;mode=view&amp;id=<?php $lastfaq->id ?>"><?php $lastfaq->title ?></a></div>
  127.                 <div class="post-details">Geschrieben am <?php $lastfaq->datum ?></a></div>
  128.                 </li>
  129.             <?php
  130.             }
  131.             echo('</ul>'."\n");
  132.         }
  133.     }
  134. }else{ ?>
  135.     <p><a href="?p=members&amp;action=login">Login</a> | <a href="?p=members&amp;action=register">Registrieren</a>
  136.     <p>&nbsp;</p>
  137.     <table>
  138.     <tr>
  139.     <th>Avatar</th>
  140.     <th>Nickname</th>
  141.     <th>Rang</th>
  142.     <th>Info</th>
  143.     </tr>
  144.     <?php $sql = "SELECT * FROM user ORDER BY id";
  145.     $entry = mysql_query($sql,$datenbank) or die(mysql_error());
  146.     while($user = mysql_fetch_object($entry))
  147.     {
  148.     ?>
  149.         <tr>
  150.         <td>
  151.         <a href="?p=members&amp;action=info&amp;user=<?php $user->nick ?>"><img src="content/images/avatare/<?php $user->ava ?>" width="120" height="120" alt="char<?php $user->ava ?>" /></a>
  152.         </td>
  153.         <td>
  154.         <p><?php $user->dname ?></p>
  155.         </td>
  156.         <td>
  157.         <p><?php $user->rank ?></p>
  158.         </td>
  159.         <td>
  160.         <p><?php $user->info ?></p>
  161.         </td>
  162.         </tr>
  163.     <?php
  164.     }
  165.     echo('</table>'."\n");
  166. }
  167.  
  168. if(isset($_GET['do']) AND 'send' == $_GET['do']) {
  169. $sqlk = "INSERT INTO user
  170.                    (
  171.                         nick,
  172.                        dname,
  173.                        passwort,
  174.                        email
  175.                         pos
  176.                    )
  177.        VALUES
  178.                    (
  179.                        '".mysql_real_escape_string($_POST['nick'])."',
  180.                        '".mysql_real_escape_string($_POST['dname'])."',
  181.                        '".md5($_POST['passwort'])."',
  182.                        '".mysql_real_escape_string($_POST['email'])."'
  183.                     )";
  184. $qry = mysql_query($sqlk,$datenbank) or die(mysql_error());
  185. }
  186. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement