Advertisement
Guest User

Untitled

a guest
May 1st, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 11.60 KB | None | 0 0
  1. <?php
  2. $requid=$_GET['uid'];
  3. $edit=$_GET['edit'];
  4. $speichern=$_POST['speichern'];
  5. $host = "localhost";
  6. $user = "clubbeatz_db";
  7. $password = "QcPkRsSC";
  8. $dbname = "maindatabase";
  9. $connect = mysql_connect($host, $user, $password);
  10. $dbverbindung = mysql_connect ($host, $user, $password);
  11. @mysql_select_db($dbname,$connect) or die("Kann Datenbank nicht öffnen!");
  12. if($speichern!=""){
  13.     $queryinto="insert into profil (id, uid, name, nachname, geschlecht, geburtstag, plz, ort, land, sendezeit, stil, im, www) VALUES ('', '".$_POST['uid']."', '".$_POST['name']."', '".$_POST['nachname']."', '".$_POST['geschlecht']."', '".$_POST['geburtstag']."', '".$_POST['plz']."', '".$_POST['ort']."', '".$_POST['land']."', '".$_POST['sendezeit']."', '".$_POST['stil']."', '".$_POST['im']."', '".$_POST['www']."')";
  14.     mysql_query($queryinto,$connect);
  15.     $gespeichert="jipp";
  16. }
  17. if($requid!=""){
  18.     $query="SELECT * FROM profil WHERE uid='".$loggedInUser->display_username."'";
  19. }
  20. else {
  21.     $query="SELECT * FROM profil WHERE uid='".$requid."'";
  22. }  
  23. $result = mysql_query($query,$dbverbindung);
  24. while($ergebnis = mysql_fetch_array ($result)){
  25. }
  26. if ((isset($ergebnis['uid'])) or ($edit=="true")) {
  27.     if ($edit=="true") {
  28.         echo "<form method=\"post\" action=\"content.php?site=profile\">";
  29.     }
  30. ?>
  31. <? if($gespeichert=="jipp"){echo("<font style=\"color=\"red\";\">Profil wurde gespeichert!</span>");}?>
  32. <table width="279" border="0" cellspacing="0" cellpadding="0">
  33.   <tr>
  34.     <td width="279" align="left" style="font-size:14px; font-stretch:50; color:#CCC;"><img src="../images/profil_24.jpg" width="137" height="34"></td>
  35.   </tr>
  36.   <tr>
  37.     <td align="center" height="28" style="font-size:14px; font-stretch:50; color:#CCC;"><?php
  38.     if ($edit=="true") {
  39.         echo "".$loggedInUser->display_username."<input type=\"hidden\" name=\"uid\" value=\"".$loggedInUser->display_username."\">";
  40.     } else { ?>  
  41.     <strong><?php echo $ergebnis['uid'];?></strong><?php }?></td>
  42.   </tr>
  43.   <tr>
  44.     <td height="263"><table width="280" border="0" cellspacing="0" cellpadding="0">
  45.       <tr>
  46.         <td width="83" align="center" bgcolor="#323506" style="padding-left:3px;"><img src="images/01-home2_60.jpg" width="70" height="70" /></td>
  47.         <td width="204" align="right" bgcolor="#323506" style="padding-left:3px;"><table width="195" border="0" cellspacing="0" cellpadding="0">
  48.           <tr>
  49.             <td width="70" height="25" bgcolor="#1E2004" style="padding-left:3px;">Vorname:</td>
  50.             <td width="125" bgcolor="#1E2004" style="color:#FFF;"><?php
  51.     if ($edit=="true") {
  52.         ?><input style="background-image:url(images/form_back.jpg); width:184px; height: 15px; border: 0; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size: 10px; color: #DDD; padding-left: 4px; padding-top: 1px; background-repeat: no-repeat; background-color: #121406;" type="text" name="name" id="name2" maxlength="45" value="<?php echo $ergebnis['name'];?>" /><?php }
  53.         else {
  54.         echo $ergebnis['name']; }?></td>
  55.           </tr>
  56.           <tr>
  57.             <td height="25" style="padding-left:3px;">Nachname:</td>
  58.             <td style="color:#FFF;"><?php
  59.     if ($edit=="true") {
  60.         ?><input style="background-image:url(images/form_back.jpg); width:184px; height: 15px; border: 0; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size: 10px; color: #DDD; padding-left: 4px; padding-top: 1px; background-repeat: no-repeat; background-color: #121406;" type="text" name="nachname" id="name2" maxlength="45" value="<?php echo $ergebnis['nachname'];?>"/><?php }
  61.         else {
  62.         echo $ergebnis['nachname']; }?></td>
  63.           </tr>
  64.           <tr>
  65.             <td height="25" bgcolor="#1E2004" style="padding-left:3px;">Geschlecht:</td>
  66.             <td bgcolor="#1E2004" style="color:#FFF;"><?php
  67.     if ($edit=="true") {
  68.         ?><select name="geschlecht" id="select">
  69.                    <option value="m&auml;nnlich">m&auml;nnlich</option>
  70.                    <option value="weiblich">weiblich</option>
  71.                  </select><?php }
  72.         else {
  73.         echo $ergebnis['geschlecht']; }?></td>
  74.           </tr>
  75.           <tr>
  76.             <td height="25" style="padding-left:3px;">Geburtstag:</td>
  77.             <td style="color:#FFF;"><?php
  78.     if ($edit=="true") {
  79.         ?><input style="background-image:url(images/form_back.jpg); width:184px; height: 15px; border: 0; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size: 10px; color: #DDD; padding-left: 4px; padding-top: 1px; background-repeat: no-repeat; background-color: #121406;" type="text" name="geburtstag" id="name2" maxlength="45" value="<?php echo $ergebnis['geburtstag'];?>"/><?php }
  80.         else {
  81.         echo $ergebnis['geburtstag']; }?></td>
  82.           </tr>
  83.         </table></td>
  84.       </tr>
  85.       <tr>
  86.         <td colspan="2" bgcolor="#323506"><table width="280" border="0" cellspacing="0" cellpadding="0">
  87.           <tr>
  88.             <td width="82" height="25" bgcolor="#1E2004" style="padding-left:3px;">PLZ:</td>
  89.             <td width="198" align="left" bgcolor="#1E2004" style="color:#FFF;"><?php
  90.     if ($edit=="true") {
  91.         ?><input style="background-image:url(images/form_back.jpg); width:184px; height: 15px; border: 0; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size: 10px; color: #DDD; padding-left: 4px; padding-top: 1px; background-repeat: no-repeat; background-color: #121406;" type="text" name="plz" id="name2" maxlength="45" value="<?php echo $ergebnis['plz'];?>"/><?php }
  92.         else {
  93.         echo $ergebnis['plz']; }?></td>
  94.           </tr>
  95.           <tr>
  96.             <td height="25" style="padding-left:3px;">Ort:</td>
  97.             <td align="left" style="color:#FFF;"><?php
  98.     if ($edit=="true") {
  99.         ?><input style="background-image:url(images/form_back.jpg); width:184px; height: 15px; border: 0; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size: 10px; color: #DDD; padding-left: 4px; padding-top: 1px; background-repeat: no-repeat; background-color: #121406;" type="text" name="ort" id="name2" maxlength="45" value="<?php echo $ergebnis['ort'];?>"/><?php }
  100.         else {
  101.         echo $ergebnis['ort']; }?></td>
  102.           </tr>
  103.           <tr>
  104.             <td height="25" bgcolor="#1E2004" style="padding-left:3px;">Land:</td>
  105.             <td align="left" bgcolor="#1E2004" style="color:#FFF;"><?php
  106.     if ($edit=="true") {
  107.         ?><input style="background-image:url(images/form_back.jpg); width:184px; height: 15px; border: 0; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size: 10px; color: #DDD; padding-left: 4px; padding-top: 1px; background-repeat: no-repeat; background-color: #121406;" type="text" name="land" id="name2" maxlength="45" value="<?php echo $ergebnis['land'];?>"/><?php }
  108.         else {
  109.         echo $ergebnis['land']; }?></td>
  110.           </tr>
  111.           <tr>
  112.             <td height="25" style="padding-left:3px;">Gewöhnliche<br />
  113.               Sendezeit:</td>
  114.             <td align="left" style="color:#FFF;"><?php
  115.     if ($edit=="true") {
  116.         ?><input style="background-image:url(images/form_back.jpg); width:184px; height: 15px; border: 0; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size: 10px; color: #DDD; padding-left: 4px; padding-top: 1px; background-repeat: no-repeat; background-color: #121406;" type="text" name="sendezeit" id="name2" maxlength="45" value="<?php echo $ergebnis['sendezeit'];?>"/><?php }
  117.         else {
  118.         echo $ergebnis['sendezeit']; }?></td>
  119.           </tr>
  120.           <tr>
  121.             <td height="25" bgcolor="#1E2004" style="padding-left:3px;">Musikstil:</td>
  122.             <td align="left" bgcolor="#1E2004" style="color:#FFF;"><?php
  123.     if ($edit=="true") {
  124.         ?><input style="background-image:url(images/form_back.jpg); width:184px; height: 15px; border: 0; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size: 10px; color: #DDD; padding-left: 4px; padding-top: 1px; background-repeat: no-repeat; background-color: #121406;" type="text" name="stil" id="name2" maxlength="45" value="<?php echo $ergebnis['stil'];?>"/><?php }
  125.         else {
  126.         echo $ergebnis['stil']; }?></td>
  127.           </tr>
  128.           <tr>
  129.             <td height="25" style="padding-left:3px;">IM:</td>
  130.             <td align="left" style="color:#FFF;"><?php
  131.     if ($edit=="true") {
  132.         ?><input style="background-image:url(images/form_back.jpg); width:184px; height: 15px; border: 0; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size: 10px; color: #DDD; padding-left: 4px; padding-top: 1px; background-repeat: no-repeat; background-color: #121406;" type="text" name="im" id="name2" maxlength="45" value="<?php echo $ergebnis['im'];?>"/><?php }
  133.         else {
  134.         echo $ergebnis['im']; }?></td>
  135.           </tr>
  136.           <?php
  137.     if ($edit=="true") {?>
  138.           <tr>
  139.             <td height="25" style="padding-left:3px;">Bild (www):</td>
  140.             <td align="left" style="color:#FFF;"><input style="background-image:url(images/form_back.jpg); width:184px; height: 15px; border: 0; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size: 10px; color: #DDD; padding-left: 4px; padding-top: 1px; background-repeat: no-repeat; background-color: #121406;" type="text" name="www" id="name" value="<?php echo $ergebnis['www'];?>"/>
  141.             </td>
  142.           </tr><?php }?>
  143.           </table></td>
  144.       </tr>
  145.       <tr>
  146.         <td colspan="2" align="center" bgcolor="#323506"><a href="#"></a></td>
  147.       </tr>
  148.       <?php
  149.     if ($edit=="true") { } else {?>
  150.       <tr>
  151.         <td height="20" colspan="2" align="center" bgcolor="#1E2004"><a href="#">Jetzt PN Nachricht schicken!</a></td>
  152.       </tr>
  153.       <tr>
  154.         <td height="20" colspan="2" align="center" bgcolor="#1E2004"><a href="content.php?site=profile&edit=true">PERSÖNLICHE DATEN ÄNDERN</a></td>
  155.       </tr>
  156.       <?php }?>
  157.     </table></td>
  158.   </tr>
  159. </table>
  160. <?php
  161.     if ($edit=="true") {?>
  162. <input type="submit" value="speichern" name="speichern">
  163. </form><?php }?>
  164. <?php
  165.                     } else {
  166.                         ?>
  167. <table width="279" border="0" cellspacing="0" cellpadding="0">
  168.                           <tr>
  169.                             <td width="279" align="left" style="font-size:14px; font-stretch:50; color:#CCC;"><img src="../images/profil_24.jpg" width="137" height="34"></td>
  170.                           </tr>
  171.                           <tr>
  172.                             <td align="center" height="28" style="font-size:14px; font-stretch:50; color:#CCC;"><strong>djcrackhome</strong></td>
  173.                           </tr>
  174.                           <tr>
  175.                             <td height="97"><table width="280" border="0" cellspacing="0" cellpadding="0">
  176.                               <tr>
  177.                                 <td bgcolor="#323506"><table width="280" border="0" cellspacing="0" cellpadding="0">
  178.                                   <tr>
  179.                                     <td height="25" style="padding-left:3px;">Aktuell ist die Profilfunktion noch nicht ganz funktionsbereit,<br />wir arbeiten dran!</td>
  180.                                   </tr>
  181.                                 </table></td>
  182.                               </tr>
  183.                               <tr>
  184.                                 <td align="center" bgcolor="#323506"><a href="#"></a></td>
  185.                               </tr>
  186.                               <tr>
  187.                                 <td height="20" align="center" bgcolor="#1E2004"><a href="#">Jetzt PN Nachricht schicken!</a></td>
  188.                               </tr>
  189.                               <tr>
  190.                                 <td height="20" colspan="2" align="center" bgcolor="#1E2004"><a href="#">PERSÖNLICHE DATEN ÄNDERN</a></td>
  191.                               </tr>
  192.                             </table></td>
  193.                           </tr>
  194. </table>
  195. <?php }
  196. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement