Your Account mit Geschlecht funzt noch nicht

Begonnen von modelportal, 11 September 2002, 22:55:58

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 1 Gast betrachten dieses Thema.

modelportal

Ich habe mir hier das modifizierte Modul runter geladen und nur von mir userinfo übernommen.Alles ok soweit,jedoch das Geschlecht wird nicht angezeigt.Ich zeige Euch meine Index.php.Ich finde den Fehler nicht.Ich hoffe,dass mir geholfen werden kann.MfG Kai aus Hamburg
Scriptanfang:
---------------------------------------------------

<?php //* VKP-Midi, RC 1.0.0.5 - 28.07.2002 - ae
/************************************************************************/
/* VKP-Maxi, VKP-Midi, VKP-Mini                                         */
/* ============================                                         */
/* rewrite and modified by:                                             */
/* http://www.maax-design.de                                            */
/* http://www.fsz-design.de                                             */
/* http://micro.myftpsite.net                                           */
/* http://www.shiba-design.de                                           */
/*                                                                      */
/*                                                                      */
/************************************************************************/

/************************************************************************/
/* Geschlechtauswahl eingefügt                                 */
/* ===========================                                 */
/* http://www.finddich.net                                    */
/*                                                      */
/************************************************************************/

/************************************************************************/
/* Original from PHP-NUKE: Advanced Content Management System           */
/* ============================================                         */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi (fbc@mandrakesoft.com)         */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
$vernum = "ya/vkp v1.1f";
$tblprivatemessage = $prefix."_priv_msgs";
if (!eregi("modules.php", $PHP_SELF)) {
   die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$userpage = 1;
require_once("modules/$module_name/config.php");
function nav() {
    global $allowusertheme, $allowuserdelete, $module_name;
    $handle=opendir('themes');
    while ($file = readdir($handle)) {
   if ( (!ereg("[.]",$file)) ) {
      $thmcount++;
   }
    }
    closedir($handle);


    echo "<table border=\"0\" cellpadding=\"15\" align=\"center\"><tr>";

    echo "<td><font class=\"content\">"
   ."<form method=\"POST\" action=\"modules.php?name=Your_Account&op=edituser\"><p align=\"center\">"
      ."<input type=\"submit\" value=\"Account\" name=\"B2\" size=\"20\"></p></form>"
   ."</center></font></td>";

echo "<td><font class=\"content\">"
   ."<form method=\"POST\" action=\"modules.php?name=Members_Photo_Upload\"><p align=\"center\">"
      ."<input type=\"submit\" value=\"Userbild\" name=\"B1\" size=\"20\"></p></form>"
   ."</center></font></td>";

    echo "<td><font class=\"content\">"
   ."<form method=\"POST\" action=\"modules.php?name=Your_Account&op=logout\"><p align=\"center\">"
      ."<input type=\"submit\" value=\"Logout\" name=\"B3\" size=\"20\"></p></form>"
   ."</center></form></font>";
   
    echo "<td><font class=\"content\">"
   ."<form method=\"POST\" action=\"modules.php?name=Your_Account&op=delete\"><p align=\"center\">"
      ."<input type=\"submit\" value=\"Löschen\" name=\"B4\" size=\"20\"></p></form>"
   ."</center></form></font></td>";

    echo "</tr></table>\n";
}

function delete($uname) {
    global $adminmail, $user, $userinfo, $cookie, $user_prefix, $dbi;
    cookiedecode($user);
    $check = $cookie[1];
    $result = sql_query("SELECT uid, uname, pass FROM ".$user_prefix."_users WHERE uname='$check'", $dbi);
    list($uid, $uname, $pass) = sql_fetch_row($result, $dbi);
    include("header.php");
    Opentable();
    echo "<center><br><font class=\"option\">"._SUREDELETE."<br><br><a href=\"modules.php?name=Your_Account&op=delconfirm&uid=$uid&code=$pass\"><b>"._YES."</b></a> "._OR." <a href=\"modules.php?name=Your_Account\"><b>"._NO."</b></a></font><br></center>";
    CloseTable();
    include("footer.php");
}

function delconfirm($uid, $code) {
   global $senddeletemail, $adminmail, $prefix, $user_prefix, $dbi, $uid;
   $result = sql_query("SELECT email, url, uname, pass FROM ".$user_prefix."_users WHERE uid='$uid'", $dbi);
   list($email, $url, $uname, $pass) = sql_fetch_row($result, $dbi);
   if ($code == $pass) {
      setcookie("user","",time()-2592000);
      sql_query("DELETE FROM ".$user_prefix."_users WHERE uid='$uid'", $dbi);
    sql_query("DELETE FROM ".$prefix."_session WHERE username='$uname'", $dbi);
    sql_query("DELETE FROM ".$prefix."_priv_msgs WHERE to_userid='$uid'", $dbi);
    sql_query("DELETE FROM ".$prefix."_userguest WHERE touser='$uname'", $dbi);
    #sql_query("DELETE FROM ".$prefix."_userpoints WHERE uid='$uid'", $dbi);
      if ($senddeletemail == 1) {
         $to = $adminmail;
         $from = $email;
         $subject = "$sitename - Member Deleted";
         $message = "
         $uname has been deleted from $sitename.\n
         -----------------------------------------------------------\n
         Do not reply to this message!!";
         @mail($to,$subject,$message, "From: $from\nX-Mailer: PHP/" . phpversion());
         }
      echo "<META http-equiv=\"Refresh\" content=\"2;URL=index.php\">";
      include("header.php");
      Opentable();
      echo "<center><br><font class=\"option\"><b>"._ACCTDELETED."</b></font>";
    echo "<br><br><font class=\"content\"><b><a href=\"index.php\">"._HOME."</a></b></font><br></center>";
      CloseTable();
      include("footer.php");
      }
   else {
      include("header.php");
      OpenTable();
      echo "<center><font class=\"option\">Error!</font><br><br>";
      echo "<font class=\"option\">"._YOUBAD."</font></center>";
      CloseTable();
      include("footer.php");
      }
   }

function userCheck($uname, $email) {
    global $stop, $user_prefix, $dbi;
    if ((!$email) || ($email=="") || (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$",$email))) $stop = "<center>"._ERRORINVEMAIL."</center><br>";
    if (strrpos($email,' ') > 0) $stop = "<center>"._ERROREMAILSPACES."</center>";
    if ((!$uname) || ($uname=="") || (ereg("[^a-zA-Z0-9_-]",$uname))) $stop = "<center>"._ERRORINVNICK."</center><br>";
    if (strlen($uname) > 25) $stop = "<center>"._NICK2LONG."</center>";
    if (eregi("^((root)|(adm)|(linux)|(webmaster)|(admin)|(god)|(administrator)|(administrador)|(nobody)|(anonymous)|(unbekannt)|(anonimo)|(anónimo)|(operator))$",$uname)) $stop = "<center>"._NAMERESERVED."";
    if (strrpos($uname,' ') > 0) $stop = "<center>"._NICKNOSPACES."</center>";
    if (sql_num_rows(sql_query("select uname from ".$user_prefix."_users where uname='$uname'", $dbi), $dbi) > 0) $stop = "<center>"._NICKTAKEN."</center><br>";
    if (sql_num_rows(sql_query("select email from ".$user_prefix."_users where email='$email'", $dbi), $dbi) > 0) $stop = "<center>"._EMAILREGISTERED."</center><br>";
    return($stop);
}

function makePass() {
    $makepass="";
    $syllables="er,in,tia,wol,fe,pre,vet,jo,nes,al,len,son,cha,ir,ler,bo,ok,tio,nar,sim,ple,bla,ten,toe,cho,co,lat,spe,ak,er,po,co,lor,pen,cil,li,ght,wh,at,the,he,ck,is,mam,bo,no,fi,ve,any,way,pol,iti,cs,ra,dio,sou,rce,sea,rch,pa,per,com,bo,sp,eak,st,fi,rst,gr,oup,boy,ea,gle,tr,ail,bi,ble,brb,pri,dee,kay,en,be,se";
    $syllable_array=explode(",", $syllables);
    srand((double)microtime()*1000000);
    for ($count=1;$count<=4;$count++) {
   if (rand()%10 == 1) {
       $makepass .= sprintf("%0.0f",(rand()%50)+1);
   } else {
       $makepass .= sprintf("%s",$syllable_array[rand()%62]);
   }
    }
    return($makepass);
}

function confirmNewUser($uname, $vpass, $pass, $email, $url, $user_avatar, $user_icq, $user_occ, $user_from, $user_intrest, $user_sig, $user_viewemail, $user_aim, $user_yim, $user_msnm) {
    global $stop, $EditedMessage, $sitename, $desiredpass, $minpass;
    include("header.php");
      if ($desiredpass==1){
         if((($pass != "") && (strlen($pass) < $minpass)) || (($vpass != "") && (strlen($vpass) < $minpass))) {
            OpenTable();
          echo "<center>"._YOUPASSMUSTBE." <b>$minpass</b> "._CHARLONG."";
            echo "<br><br>"._GOBACK."</center>";
            CloseTable();
            include("footer.php");
            return;
            }
         if($vpass != $pass) {
            OpenTable();
            echo "<center>"._NOTCONFIRMED." <b>$pass</b> "._NOTCONFIRMED2." <b>$vpass</b>. "._NOTCONFIRMED3."";
            echo "<br><br>"._GOBACK."</center>";
            CloseTable();
            include("footer.php");
            return;
            }
         }
    filter_text($uname);
    $uname = $EditedMessage;
    if($user_viewemail == 1) {
   $user_viewemail = "1";
    } else {
   $user_viewemail = "0";
    }
    userCheck($uname, $email);
    if (!$stop) {
   title("$sitename: "._USERREGLOGIN."");
   OpenTable();
   if (!$pass) {
      $vpass = makepass();
      echo "<center><b>"._USERFINALSTEP."</b><br><br>$uname, "._USERCHECKDATA."</center><br><br>";
      echo "<b>"._UUSERNAME.":</b> $uname<br><b>"._EMAIL.":</b> $email<br><br>";
      if ($desiredpass==1){
         echo "<b>Note:</b> "._NOTPROVIDE." <b>$vpass</b><br><br>";
         }
      } else {

   echo "<center><b>"._USERFINALSTEP."</b><br><br>$uname, "._USERCHECKDATA."</center><br><br>";
   echo "<b>"._UUSERNAME.":</b> $uname<br><b>"._EMAIL.":</b> $email<br><br><b>Password:</b> $vpass<br><br><br>";
   }

   if (($user_avatar) || ($user_avatar!="")) echo "<b>"._AVATAR.":</b> <img src=\"images/forum/avatar/$user_avatar\" alt=\"\"><br>";
   if (($url) || ($url!="")) echo "<b>"._WEBSITE.":</b> $url<br>";
   if (($user_icq) || ($user_icq!="")) echo "<b>"._ICQ.":</b> $user_icq<br>";
   if (($user_aim) || ($user_aim!="")) echo "<b>"._AIM.":</b> $user_aim<br>";
   if (($user_yim) || ($user_yim!="")) echo "<b>"._YIM.":</b> $user_yim<br>";
   if (($user_msnm) || ($user_msnm!="")) echo "<b>"._MSNM.":</b> $user_msnm<br>";
   if (($user_from) || ($user_from!="")) echo "<b>"._LOCATION.":</b> $user_from<br>";
   if (($user_occ) || ($user_occ!="")) echo "<b>"._OCCUPATION.":</b> $user_occ<br>";
   if (($user_intrest) || ($user_intrest!="")) echo "<b>"._INTERESTS.":</b> $user_intrest<br>";
   if (($user_sig) || ($user_sig!="")) echo "<b>"._SIGNATURE.":</b> $user_sig<br>";
   echo "<form action=\"modules.php?name=Your_Account\" method=\"post\">"
       ."<input type=\"hidden\" name=\"uname\" value=\"$uname\">"
          ."<input type=\"hidden\" name=\"vpass\" value=\"$vpass\">"
       ."<input type=\"hidden\" name=\"email\" value=\"$email\">"
       ."<input type=\"hidden\" name=\"user_avatar\" value=\"$user_avatar\">"
       ."<input type=\"hidden\" name=\"user_icq\" value=\"$user_icq\">"
       ."<input type=\"hidden\" name=\"url\" value=\"$url\">"
       ."<input type=\"hidden\" name=\"user_from\" value=\"$user_from\">"
       ."<input type=\"hidden\" name=\"user_occ\" value=\"$user_occ\">"
       ."<input type=\"hidden\" name=\"user_intrest\" value=\"$user_intrest\">"
       ."<input type=\"hidden\" name=\"user_sig\" value=\"$user_sig\">"
       ."<input type=\"hidden\" name=\"user_aim\" value=\"$user_aim\">"
       ."<input type=\"hidden\" name=\"user_yim\" value=\"$user_yim\">"
       ."<input type=\"hidden\" name=\"user_msnm\" value=\"$user_msnm\">"
       ."<input type=\"hidden\" name=\"user_viewemail\" value=\"$user_viewemail\">"
       ."<input type=\"hidden\" name=\"op\" value=\"finish\"><br><br>"
       ."<input type=\"submit\" value=\""._FINISH."\">   "._GOBACK."</form>";
   CloseTable();
    } else {
   OpenTable();
   echo "<center><font class=\"title\"><b>Registration Error!</b></font><br><br>";
   echo "<font class=\"content\">$stop<br>"._GOBACK."</font></center>";
   CloseTable();
    }
    include("footer.php");
}

function finishNewUser($uname, $vpass, $email, $url, $user_avatar, $user_icq, $user_occ, $user_from, $user_intrest, $user_sig, $user_viewemail, $user_aim, $user_yim, $user_msnm) {
global $sendaddmail, $stop, $makepass, $EditedMessage, $adminmail, $sitename, $Default_Theme, $commentlimit, $user_prefix, $desiredpass, $dbi;
include("header.php");
userCheck($uname, $email);
$user_regdate = date("M d, Y");
if (!isset($stop)) {
   $cryptpass = md5($vpass);
   if (!eregi("http://", $url)) {
    $url = "http://$url";
      }
  if ($url=="http://") {
      $url = "";
      }
   sql_query("LOCK TABLES ".$user_prefix."_users WRITE", $dbi);
   $resultx = sql_query("SELECT max(uid) FROM ".$user_prefix."_users", $dbi);
   list($uidmax) = sql_fetch_array($resultx, $dbi);
   if ($uidmax < 0 || $uidmax == 0) {
      $uidmax = 1;
      }
   else {
      $uidmax = $uidmax+1;
      }
   $qry = "insert into ".$user_prefix."_users ";
   $qry .= "(uid,name,uname,email,femail,url,user_avatar,user_regdate,user_icq,user_occ,user_from,user_intrest,user_sig,user_viewemail,user_theme,user_aim,user_yim,user_msnm,pass,storynum,umode,uorder,thold,noscore,bio,ublockon,ublock,theme,commentmax,counter,newsletter, geschlecht,user_posts,user_attachsig,user_rank,user_level) ";
   $qry .= "values ($uidmax,'','$uname','$email','','$url','$user_avatar','$user_regdate','$user_icq','$user_occ','$user_from','$user_intrest','$user_sig','$user_viewemail','','$user_aim','$user_yim','$user_msnm','$cryptpass','10','','0','0','0','','0','','$Default_Theme','$commentlimit','0','0','0','0','0','1','$geschlecht')";
   $result = sql_query($qry, $dbi);
   sql_query("UNLOCK TABLES", $dbi);
   if(!$result) {
      echo ""._DATABASEERROR."<br>";
      }
   else {
      sendnewusermsg($uname);
      $message = ""._WELCOMETO." $sitename!\n\n"._YOUUSEDEMAIL." ($email) "._TOREGISTER." $sitename. "._FOLLOWINGMEM."\n\n"._UNICKNAME." $uname\n"._UPASSWORD." $vpass";
      $subject=""._USERPASS4." $uname";
      $from="$adminmail";
      @mail($email, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
      if ($sendaddmail == 1) {
         $to = $adminmail;
         $from = $email;
         $subject = "$sitename - Member Added";
         $message = "
         $uname has been added to $sitename.\n
         -----------------------------------------------------------\n
         Do not reply to this message!!";
         @mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
         }
      title("$sitename: "._USERREGLOGIN."");
      OpenTable();
      echo "<center><b>"._ACCOUNTCREATED."</b><br><br>";
      echo ""._YOUAREREGISTERED.""
      ."<br><br>"
      .""._YOUCANLOGIN."<br><br>"
      .""._THANKSUSER." $sitename!<br><br>";
      if ($desiredpass==1){
         echo "<a href=\"modules.php?name=Your_Account&op=login&uname=$uname&pass=$vpass\">"._DIRECTLOGIN."</a> "._2CHANGEINFO."</center>";
         }
      else {
         echo "<a href=\"modules.php?name=Your_Account\">"._LOGIN."</a></center>";
         }
      CloseTable();
      }
   }
else {
   echo "$stop";
   }
include("footer.php");
}

function userinfo($uname, $bypass=0)
   {
    global $user, $cookie, $sitename, $prefix, $user_prefix, $dbi, $admin;
    $result = sql_query("select uid, femail, url, bio, user_avatar, user_icq, user_aim, user_yim, views, geschlecht, user_msnm, user_from, user_occ, user_intrest, user_sig, pass, newsletter from ".$user_prefix."_users where uname='$uname'", $dbi);
    $userinfo = sql_fetch_array($result, $dbi);
    if(!$bypass) cookiedecode($user);
    include("header.php");
    OpenTable();
    echo "<center>";
    if(($uname == $cookie[1]) AND ($userinfo[pass] == $cookie[2])) {
        echo "<font class=\"option\">$uname, "._WELCOMETO." $sitename!</font><br><br>";
        echo "<font class=\"content\">"._THISISYOURPAGE."</font></center><br><br>";
        nav();
    } else {
        echo "<font class=\"title\">"._PERSONALINFO.": $uname</font></center><br><br>";
    }
//counteranfang++++++++++++
      echo "<br>";
      
      if ($cookie[1] != $uname) {
      sql_query("UPDATE ".$user_prefix."_users SET views=views+1 where uname='$uname'", $dbi);
      }
      echo "<center>";
      $zaehler = sql_query("select views from ".$user_prefix."_users where uname='$uname'", $dbi);
      $anzahl = sql_fetch_array($zaehler, $dbi);


   ##grafische darstellung start

   echo"<b>$uname's Seitenbesuche</b><br><br>";    
            
   $load=$anzahl[views];                      ##hier die variable für den zähler


   srand((double)microtime()*1000000);             ##randomisierte zahl für die bilderordner
   $zufall=rand(0,0);                   ## 8 ist die anzahl der bilderordner (von images0 bis images8)
   $images = "modules/Your_Account/images$zufall/";        ##hier dann einen Bilderordner auswählen
   $longstr = strlen($load);
   for ($x=0; $x < $longstr; $x++)
   {
   echo "<img src=\"$images";
   echo substr($load,$x,1);
   echo ".gif\">";
   }
   ##grafische darstellung ende
//counterende+++++


if ($userinfo[url]) {
        if (!eregi("http://", $userinfo[url])) {
            $userinfo[url] = "http://$userinfo[url]";
        }
    }
    if((sql_num_rows($result, $dbi)==1) && ($userinfo[url] || $userinfo[femail] || $userinfo[bio] || $userinfo[user_avatar] || $userinfo[user_icq] || $userinfo[user_aim] || $userinfo[user_yim] || $userinfo[user_msnm] || $userinfo[user_location] || $userinfo[user_occ] || $userinfo[user_intrest] || $userinfo[user_sig])) {
        echo "<center><font class=\"content\">";


echo "<br><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"660000\" width=\"100%\" height=\"219\">"
  ."<tr>"
    ."<center><td width=\"30%\" height=\"219\">"
    ."<p align=\"center\"><b>Dein Userbild";
if(file_exists("modules/My_eGallery/gallery/members/$uname.jpg")) {
         echo "<head><script language='JavaScript'>function ShowImage(img, x, y){hWnd = window.open(img, 'ImageViewer','width=' + (x + 20) + ',height=' + (y + 30) + ',screenX=1, screenY=1,toolbar=0,resizable=0,status=0,topmargin=0');hWnd.moveTo(0,0);}</script></head><p><P align=\"center\"><a href='#' onClick='ShowImage(\"modules/My_eGallery/gallery/members/$uname.jpg\",310,310)'><img border=\"5\" src=\"modules/My_eGallery/gallery/members/$uname.jpg\" style=\"border: 4px solid #660000\" alt=\"Ich bin $uname.Schreibe mir doch eine Message.\" border=0 width=\"80\"></a><p><br>\n";
          }

if(file_exists("modules/My_eGallery/gallery/members/$uname.gif")) {
         echo "<head><script language='JavaScript'>function ShowImage(img, x, y){hWnd = window.open(img, 'ImageViewer','width=' + (x + 20) + ',height=' + (y + 30) + ',screenX=1, screenY=1,toolbar=0,resizable=0,status=0,topmargin=0');hWnd.moveTo(0,0);}</script></head><p><P align=\"center\"<a href='#' onClick='ShowImage(\"modules/My_eGallery/gallery/members/$uname.gif\",310,310)'><image src=\"modules/My_eGallery/gallery/members/$uname.gif\" alt=\"Ich bin $uname.Schreibe mir doch eine Message.\" border=0 width=\"80\"></a><p><br>\n";
    }


echo "</td>"
    ."<td width=\"50%\" height=\"219\">"
    ."<p>";
############################ GESCHLECHT #####################################
       if (($userinfo[geschlecht] == 1) AND ($uname == $cookie[1]) AND ($userinfo[pass] == $cookie[2]) OR (is_admin($admin) AND ($userinfo[geschlecht] == 0))) {
           echo "<i><b>Ich bin ein Mann</i><br><br>";
          } elseif (($userinfo[geschlecht] == 0) AND ($uname == $cookie[1]) AND ($userinfo[pass] == $cookie[2]) OR (is_admin($admin) AND ($userinfo[geschlecht] == 0))) {
              echo "<i><b>Ich bin eine Frau</i><br><br>";
          }
      ############################ GESCHLECHT ###############################################
if ($userinfo[user_avatar]) echo "<br>  <img src=\"images/forum/avatar/$userinfo[user_avatar]\" alt=\"\"></center><br><br>\n";
        if ($userinfo[url]) { echo "  <b><u>"._MYHOMEPAGE."</u><a href=\"$userinfo[url]\" target=\"new\"> $userinfo[url]</a><br><br>"; }
else {
        echo "<font class=\"title\"><b>  <u>"._MYHOMEPAGE."</u>  Keine Homepage eingetragen</font></center><br>";
    }

        if ($userinfo[femail]) { echo "<b>  <u>"._MYEMAIL."</u> <a href=\"mailto:$userinfo[femail]\"> $userinfo[femail]</a><br><br>"; }
else {
        echo "<font class=\"title\"><b>  <u>"._MYEMAIL."</u>  $uname möchte Email nicht zeigen</font></center><br>";
    }

        if ($userinfo[user_icq]) echo "<b>  <u>"._ICQ.":</u>  $userinfo[user_icq]<br><br>\n";

else {
        echo "<font class=\"title\"><b>  <u>"._ICQ.":</u>  keine Eintrag</font></center><br>";
    }

        if ($userinfo[user_aim]) echo "<b>  <u>"._AIM.":</u>  $userinfo[user_aim]<br><br>\n";
else {
        echo "<font class=\"title\">  <u>"._AIM.":</u>  keine Eintrag</font></center><br>";
    }
        if ($userinfo[user_yim]) echo "<b>  <u>"._YIM.":</u>  $userinfo[user_yim]<br><br>\n";
else {
        echo "<font class=\"title\">  <u>"._YIM.":</u>  keine Eintrag</font></center><br>";
    }
        if ($userinfo[user_msnm]) echo "<b>  <u>"._MSNM.":</u>  $userinfo[user_msnm]<br><br>\n";
else {
        echo "<font class=\"title\">  <u>"._MSNM.":</u>  keine Eintrag</font></center><br>";
    }
        if ($userinfo[user_from]) echo "<b>  <u>"._LOCATION.":</u>  $userinfo[user_from]<br><br>\n";
else {
        echo "<font class=\"title\">  <u>"._LOCATION.":</u>  keine Eintrag</font></center><br>";
    }
        if ($userinfo[user_occ]) echo "<b>  <u>"._OCCUPATION.":</u><br>  $userinfo[user_occ]<br><br>\n";
else {
        echo "<font class=\"title\">  <u>"._OCCUPATION.":</u>  keine Eintrag</font></center><br>";
    }
        if ($userinfo[user_intrest]) echo "<b>  <u>"._INTERESTS.":</u><br>  $userinfo[user_intrest]<br><br>\n";
else {
        echo "<font class=\"title\">  <u>"._INTERESTS.":</u>  keine Eintrag</font></center><br>";
    }
        $userinfo[user_sig] = nl2br($userinfo[user_sig]);
        if ($userinfo[user_sig]) echo "<br><b>  <u>"._SIGNATURE.":</u></b><b><br>  $userinfo[user_sig]<br><br>\n";

        if ($userinfo[bio]) { echo "<br><b>  <u>"._EXTRAINFO.":</u></b><b><br>  $userinfo[bio]<br><br>\n"; }

        $result = sql_query("select username from ".$prefix."_session where username='$uname'", $dbi);
        list($username) = sql_fetch_row($result, $dbi);
        if ($username == "") {
            $online = "<img border=\"0\" src=\"modules/Your_Account/offline.gif\">";
        } else {
            $online = "<img border=\"0\" src=\"modules/Your_Account/online.gif\">";
        }
        echo "  Ist User online:<b> $online</b><br><br>\n";
echo "</td>"
  ."</tr>"
."</table>";



       
        if (is_admin($admin)) {
            echo "<form method=\"POST\" action=\"admin.php?op=modifyUser&chng_uid=$userinfo[uid]\"><p><input type=\"submit\" value=\"Daten ändern\" name=\"B1\"></p></form></a><br>";
        }
        if (((is_user($user) AND $cookie[1] != $uname) OR is_admin($admin)) AND is_active("Private_Messages")) { echo "<br><form method=\"POST\" action=\"modules.php?name=Private_Messages&file=reply&send=1&uname=$uname\"><p><input type=\"submit\" value=\"Nachricht an $uname\" name=\"b21\"></p></form><br>\n"; }
        echo "</center></font>";
    } else {
        echo "<center>"._NOINFOFOR." $uname</center>";
    }
    CloseTable();
    if (is_active("Private_Messages")) {
   echo "<br>";
   OpenTable();
   echo "<center><b>"._PRIVATEMESSAGES."</b><br><br>";
   $result2 = sql_query("select to_userid from ".$prefix."_priv_msgs where to_userid='$userinfo[uid]'", $dbi);
   $numrow = sql_num_rows($result2, $dbi);
   if (is_active("Members_List")) {
       $mem_list = "<a href=\"modules.php?name=Members_List\">"._BROWSEUSERS."</a>";
   } else {
       $mem_list = "";
   }
   if (is_active("Search")) {
       $mod_search = "<a href=\"modules.php?name=Search&type=users\">"._SEARCHUSERS."</a>";
   } else {
       $mod_search = "";
   }
   if ($mem_list != "" AND $mod_search != "") { $a = " | "; } else { $a = ""; }
   if ($mem_list != "" OR $mod_search != "") {
       $links = "[ $mem_list $a $mod_search ]";
   } elseif ($mem_list == "" AND $mod_search == "") {
       $links = "";
   }
   echo ""._YOUHAVE." <a href=\"modules.php?name=Private_Messages\"><b>$numrow</b></a> "._PRIVATEMSG."<br><br>"
       ."<form action=\"modules.php?name=Private_Messages\" method=\"post\">"
       .""._USENDPRIVATEMSG.": <input type=\"text\" name=\"uname\" size=\"20\">  $links"
       ."<input type=\"hidden\" name=\"file\" value=\"reply\">"
       ."<input type=\"hidden\" name=\"send\" value=\"1\">"
       ."</form></center>";
   CloseTable();
    }
    echo "<br>";




    OpenTable();
    echo "<b>"._LAST10COMMENTS." $uname:</b><br>";
    $result = sql_query("select tid, sid, subject from ".$prefix."_comments where name='$uname' order by tid DESC limit 0,10", $dbi);
    while(list($tid, $sid, $subject) = sql_fetch_row($result, $dbi)) {
        echo "<li><a href=\"modules.php?name=News&file=article&thold=-1&mode=flat&order=0&sid=$sid#$tid\">$subject</a><br>";
    }
    CloseTable();
    echo "<br>";
    OpenTable();
    echo "<b>"._LAST10SUBMISSIONS." $uname:</b><br>";
    $result = sql_query("select sid, title from ".$prefix."_stories where informant='$uname' order by sid DESC limit 0,10", $dbi);
    while(list($sid, $title) = sql_fetch_row($result, $dbi)) {
        echo "<li><a href=\"modules.php?name=News&file=article&sid=$sid\">$title</a><br>";
    }
    CloseTable();
    CloseCredits();

    include("footer.php");
}

function main($user) {
    global $stop;
    if(!is_user($user)) {
   include("header.php");
   if ($stop) {
       OpenTable();
       echo "<center><font class=\"title\"><b>"._LOGININCOR."</b></font></center>\n";
       CloseTable();
       echo "<br>\n";
   } else {
       OpenTable();
       echo "<center><font class=\"title\"><b>"._USERREGLOGIN."</b></font></center>\n";
       CloseTable();
       echo "<br>\n";
   }
   if (!is_user($user)) {
       OpenTable();
       echo "<form action=\"modules.php?name=Your_Account\" method=\"post\">\n"
      ."<b>"._USERLOGIN."</b><br><br>\n"
      ."<table border=\"0\"><tr><td>\n"
      .""._NICKNAME.":</td><td><input type=\"text\" name=\"uname\" size=\"15\" maxlength=\"25\"></td></tr>\n"
      ."<tr><td>"._PASSWORD.":</td><td><input type=\"password\" name=\"pass\" size=\"15\" maxlength=\"20\"></td></tr></table>\n"
      ."<input type=\"hidden\" name=\"op\" value=\"login\">\n"
      ."<input type=\"submit\" value=\""._LOGIN."\"></form><br>\n\n"
      ."<center><font class=\"content\">[ <a href=\"modules.php?name=Your_Account&op=pass_lost\">"._PASSWORDLOST."</a> | <a href=\"modules.php?name=Your_Account&op=new_user\">"._REGNEWUSER."</a> ]</font></center>\n";
       CloseTable();
   }
   include("footer.php");
    } elseif (is_user($user)) {
        global $cookie;
        cookiedecode($user);
        userinfo($cookie[1]);
    }
}

function new_user() {
  global $desiredpass;
   if (!is_user($user)) {
   include("header.php");
   OpenTable();
   echo "<center><font class=\"title\"><b>"._USERREGLOGIN."</b></font></center>\n";
   CloseTable();
   echo "<br>\n";
   OpenTable();
   echo "<form name=\"Register\" action=\"modules.php?name=Your_Account\" method=\"post\">\n"
           ."<b>"._REGNEWUSER."</b><br><br>\n"
       ."<table cellpadding=\"0\" cellspacing=\"10\" border=\"0\">\n"
           ."<tr><td><b>"._NICKNAME.":</b></td><td><input type=\"text\" name=\"uname\" size=\"30\" maxlength=\"25\"> <font class=\"tiny\">"._REQUIRED."</font></td></tr>\n";
               if ($desiredpass==1){
            echo"<tr><td><b>"._DESIREDPASS.":</b></td><td><input type=\"password\" name=\"pass\" size=\"25\" maxlength=\"26\"> <font class=\"tiny\">"._OPTIONAL1."</font></td></tr>\n"
            ."<tr><td><b>"._CONFIRMPASS.":</b></td><td><input type=\"password\" name=\"vpass\" size=\"25\" maxlength=\"26\"> <font class=\"tiny\">"._OPTIONAL2."</font></td></tr>\n";
                  }
   ############################ GESCHLECHT ###############################
      echo"<tr><td><b>"._GESCHLECHT."</b> </td><td>";
     echo "<input type=\"radio\" name=\"geschlecht\" value=\"1\">"._MAENNLICH."  
      <input type=\"radio\" name=\"geschlecht\" value=\"0\" >"._WEIBLICH."";

   echo "</td></tr>";
   ############################ GESCHLECHT ####################################

           echo "<tr><td><b>"._EMAIL.":</b></td><td><input type=\"text\" name=\"email\" size=\"30\" maxlength=\"255\"> <font class=\"tiny\">"._REQUIRED."</font></td></tr>\n"
           ."<tr><td><b>"._WEBSITE.":</b></td><td><input type=\"text\" name=\"url\" size=\"30\" maxlength=\"255\" value=\"http://\"> <font class=\"tiny\">"._OPTIONAL3."</font></td></tr>\n"
           ."<tr><td><b>"._AVATAR.":</b></td><td>[ <a href=\"modules.php?name=Your_Account&op=avatarlist\">"._LIST."</a> ]  \n"
           ."<select name=\"user_avatar\" onChange=\"showimage()\">\n";
        $direktori = "images/forum/avatar";
        $handle=opendir($direktori);
        while ($file = readdir($handle)) {
       $filelist[] = $file;
        }
        asort($filelist);
   while (list ($key, $file) = each ($filelist)) {
       if (ereg("blank", $file)) {
      $sel = "selected";
       } else {
      $sel = "";
       }
       ereg(".gif|.jpg",$file);
       if ($file == "." || $file == "..") {
           $a=1;
       } else {
      echo "<option value=\"$file\" $sel>$file</option>\n";
           }
   }
   echo "</select>  <img src=\"images/forum/avatar/blank.gif\" name=\"avatar\" width=\"32\" height=\"32\" alt=\"\">\n"
           ."</td></tr>\n"
           ."<tr><td><b>"._ICQ.":</b></td><td><input type=\"text\" name=\"user_icq\" size=\"20\" maxlength=\"20\"></td></tr>\n"
           ."<tr><td><b>"._AIM.":</b></td><td><input type=\"text\" name=\"user_aim\" size=\"20\" maxlength=\"20\"></td></tr>\n"
           ."<tr><td><b>"._YIM.":</b></td><td><input type=\"text\" name=\"user_yim\" size=\"20\" maxlength=\"20\"></td></tr>\n"
           ."<tr><td><b>"._MSNM.":</b></td><td><input type=\"text\" name=\"user_msnm\" size=\"20\" maxlength=\"20\"></td></tr>\n"
           ."<tr><td><b>"._LOCATION.":</b></td><td><input type=\"text\" name=\"user_from\" size=\"25\" maxlength=\"60\"></td></tr>\n"
           ."<tr><td><b>"._OCCUPATION.":</b></td><td><input type=\"text\" name=\"user_occ\" size=\"25\" maxlength=\"60\"></td></tr>\n"
           ."<tr><td><b>"._INTERESTS.":</b></td><td><input type=\"text\" name=\"user_intrest\" size=\"25\" maxlength=\"255\"></td></tr>\n"
           ."<tr><td><b>"._OPTION.":</b></td><td><INPUT TYPE=\"CHECKBOX\" NAME=\"user_viewemail\" VALUE=\"1\"> "._ALLOWEMAILVIEW."</td></tr>\n"
       ."<tr><td><b>"._SIGNATURE.":</b></td><td><TEXTAREA NAME=\"user_sig\" ROWS=\"6\" COLS=\"45\"></TEXTAREA></td></tr>\n"
       ."<tr><td>\n"
       ."<input type=\"hidden\" name=\"op\" value=\"new user\">\n"
           ."<input type=\"submit\" value=\""._NEWUSER."\">\n"
           ."</td></tr></table>\n"
       ."</form>\n"
       ."<br>\n"
           .""._PASSWILLSEND."<br><br>\n"
           .""._COOKIEWARNING."<br>\n"
           .""._ASREGUSER."<br>\n"
       ."<ul>\n"
           ."<li>"._ASREG1."\n"
           ."<li>"._ASREG2."\n"
           ."<li>"._ASREG3."\n"
           ."<li>"._ASREG4."\n"
           ."<li>"._ASREG5."\n"
           ."<li>"._ASREG6."\n"
           ."<li>"._ASREG7."\n"
       ."</ul>\n"
           .""._REGISTERNOW."<br>\n"
           .""._WEDONTGIVE."<br><br>\n"
       ."<center><font class=\"content\">[ <a href=\"modules.php?name=Your_Account\">"._USERLOGIN."</a> | <a href=\"modules.php?name=Your_Account&op=pass_lost\">"._PASSWORDLOST."</a> ]</font></center>\n";
   CloseTable();
   include("footer.php");
    } elseif (is_user($user)) {
   global $cookie;
   cookiedecode($user);
   userinfo($cookie[1]);
    }
}

function pass_lost() {
    global $user;
    if (!is_user($user)) {
   include("header.php");
   OpenTable();
   echo "<center><font class=\"title\"><b>"._USERREGLOGIN."</b></font></center>\n";
   CloseTable();
   echo "<br>\n";
   OpenTable();
   echo "<b>"._PASSWORDLOST."</b><br><br>\n"
           .""._NOPROBLEM."<br><br>\n"
       ."<form action=\"modules.php?name=Your_Account\" method=\"post\">\n"
       ."<table border=\"0\"><tr><td>\n"
           .""._NICKNAME.":</td><td><input type=\"text\" name=\"uname\" size=\"15\" maxlength=\"25\"></td></tr>\n"
           ."<tr><td>"._CONFIRMATIONCODE.":</td><td><input type=\"text\" name=\"code\" size=\"11\" maxlength=\"10\"></td></tr></table><br>\n"
           ."<input type=\"hidden\" name=\"op\" value=\"mailpasswd\">\n"
           ."<input type=\"submit\" value=\""._SENDPASSWORD."\"></form><br>\n"
       ."<center><font class=\"content\">[ <a href=\"modules.php?name=Your_Account\">"._USERLOGIN."</a> | <a href=\"modules.php?name=Your_Account&op=new_user\">"._REGNEWUSER."</a> ]</font></center>\n";
   CloseTable();
   include("footer.php");
    } elseif(is_user($user)) {
   global $cookie;
   cookiedecode($user);
   userinfo($cookie[1]);
    }
}

function logout() {
   global $prefix, $dbi, $user, $cookie;
   cookiedecode($user);
   $r_uname = $cookie[1];
   setcookie("user","",time()-2592000);
   include("header.php");
   OpenTable();
   echo "<center><br><font class=\"option\"><b>"._YOUARELOGGEDOUT."</b></font>";
   echo "<br><br><font class=\"content\"><b><a href=\"index.php\">"._HOME."</a></b></font><br></center>";
   CloseTable();
   $result = sql_query("delete from ".$prefix."_session where username='$r_uname'", $dbi);
   include("footer.php");
   echo "<META http-equiv=\"Refresh\" content=\"2;URL=index.php\">";
   }

function mail_password($uname, $code) {
    global $sitename, $adminmail, $nukeurl, $user_prefix, $dbi;
    $result = sql_query("select email, pass from ".$user_prefix."_users where (uname='$uname')", $dbi);
    if(!$result) {
   OpenTable();
   echo "<center>"._SORRYNOUSERINFO."</center>";
   CloseTable();
    } else {
   $host_name = getenv("REMOTE_ADDR");
   list($email, $pass) = sql_fetch_row($result, $dbi);
   $areyou = substr($pass, 0, 10);
   if ($areyou==$code) {
       $newpass=makepass();
       $message = ""._USERACCOUNT." '$uname' "._AT." $sitename "._HASTHISEMAIL."  "._AWEBUSERFROM." $host_name "._HASREQUESTED."\n\n"._YOURNEWPASSWORD." $newpass\n\n "._YOUCANCHANGE." $nukeurl/modules.php?name=Your_Account\n\n"._IFYOUDIDNOTASK."";
       $subject = ""._USERPASSWORD4." $uname";
       @mail($email, $subject, $message, "From: $adminmail\nX-Mailer: PHP/" . phpversion());
       /* Next step: add the new password to the database */
       $cryptpass = md5($newpass);
       $query="update ".$user_prefix."_users set pass='$cryptpass' where uname='$uname'";
       if(!sql_query($query, $dbi)) {
          echo ""._UPDATEFAILED."";
       }
       include ("header.php");
       OpenTable();
       echo "<center>"._PASSWORD4." $uname "._MAILED."</center>";
       CloseTable();
       include ("footer.php");
   /* If no Code, send it */
   } else {
       $result = sql_query("select email, pass from ".$user_prefix."_users where (uname='$uname')", $dbi);
       if(!$result) {
           echo "<center>"._SORRYNOUSERINFO."</center>";
       } else {
           $host_name = getenv("REMOTE_ADDR");
           list($email, $pass) = sql_fetch_row($result, $dbi);
           $areyou = substr($pass, 0, 10);
          $message = ""._USERACCOUNT." '$uname' "._AT." $sitename "._HASTHISEMAIL." "._AWEBUSERFROM." $host_name "._CODEREQUESTED."\n\n"._YOURCODEIS." $areyou \n\n"._WITHTHISCODE." $nukeurl/modules.php?name=Your_Account&op=pass_lost\n"._IFYOUDIDNOTASK2."";
      $subject=""._CODEFOR." $uname";
      @mail($email, $subject, $message, "From: $adminmail\nX-Mailer: PHP/" . phpversion());
      include ("header.php");
      echo "<center>"._CODEFOR." $uname "._MAILED."";
      include ("footer.php");
           }
   }
    }
}

function docookie($setuid, $setuname, $setpass, $setstorynum, $setumode, $setuorder, $setthold, $setnoscore, $setublockon, $settheme, $setcommentmax) {
    $info = base64_encode("$setuid:$setuname:$setpass:$setstorynum:$setumode:$setuorder:$setthold:$setnoscore:$setublockon:$settheme:$setcommentmax");
    setcookie("user","$info",time()+31536000);
}

function login($uname, $pass) {
    global $setinfo, $user_prefix, $dbi;
    $result = sql_query("select pass, uid, storynum, umode, uorder, thold, noscore, ublockon, theme, commentmax from ".$user_prefix."_users where uname='$uname'", $dbi);
    $setinfo = sql_fetch_array($result, $dbi);
    if ((sql_num_rows($result, $dbi)==1) AND ($setinfo[uid] != 1) AND ($setinfo[pass] != "")) {
   $dbpass=$setinfo[pass];
   $non_crypt_pass = $pass;
     $old_crypt_pass = crypt($pass,substr($dbpass,0,2));
   $new_pass = md5($pass);
   if (($dbpass == $non_crypt_pass) OR ($dbpass == $old_crypt_pass)) {
       sql_query("update ".$user_prefix."_users set pass='$new_pass' WHERE uname='$uname'", $dbi);
       $result = sql_query("select pass from ".$user_prefix."_users where uname='$uname'", $dbi);
       list($dbpass) = sql_fetch_row($result, $dbi);
   }
   if ($dbpass != $new_pass) {
            Header("Location: modules.php?name=Your_Account&stop=1");
           return;
   }
   docookie($setinfo[uid], $uname, $new_pass, $setinfo[storynum], $setinfo[umode], $setinfo[uorder], $setinfo[thold], $setinfo[noscore], $setinfo[ublockon], $setinfo[theme], $setinfo[commentmax]);
   Header("Location: modules.php?name=Your_Account&op=userinfo&bypass=1&uname=$uname");
    } else {
   Header("Location: modules.php?name=Your_Account&stop=1");
    }
}

function edituser() {
    global $user, $userinfo, $cookie;
    getusrinfo($user);
    if (($userinfo[uname] != $cookie[1]) AND ($userinfo[pass] != $cookie[2])) {
    include("header.php");
    OpenTable();
    echo "<center><font class=\"title\"><b>"._PERSONALINFO."</b></font></center>";
    CloseTable();
    echo "<br>";
    OpenTable();
    nav();
    CloseTable();
    echo "<br>";
    if (!eregi("http://",$userinfo[url])) {
   $userinfo[url] = "http://$userinfo[url]";
    }
    OpenTable();
    echo "<table cellpadding=\"8\" border=\"0\"><tr><td>"
   ."<form name=\"Register\" action=\"modules.php?name=Your_Account\" method=\"post\">"
   ."<b>"._UREALNAME."</b> "._OPTIONAL."<br>"
   ."<input type=\"text\" name=\"realname\" value=\"$userinfo[name]\" size=\"30\" maxlength=\"60\"><br><br>"
      ############################ GESCHLECHT ###############################
      ."<b>"._GESCHLECHT."</b>   ";
    if ($userinfo[geschlecht] == 1) {
    echo "<input type=\"radio\" name=\"geschlecht\" value=\"1\">"._MAENNLICH."  "
    ."<input type=\"radio\" name=\"geschlecht\" value=\"0\">"._WEIBLICH."";
    } elseif ($userinfo[geschlecht] == 0) {
    echo "<input type=\"radio\" name=\"geschlecht\" value=\"1\">"._MAENNLICH."  "
      ."<input type=\"radio\" name=\"geschlecht\" value=\"0\" >"._WEIBLICH."";
    }
   echo "<br><br>"
   ############################ GESCHLECHT ####################################


   ."<b>"._UREALEMAIL."</b> "._REQUIRED."<br>"
   .""._EMAILNOTPUBLIC."<br>"
   ."<input type=\"text\" name=\"email\" value=\"$userinfo[email]\" size=\"30\" maxlength=\"255\"><br><br>"
   ."<b>"._UFAKEMAIL."</b> "._OPTIONAL."<br>"
   .""._EMAILPUBLIC."<br>"
   ."<input type=\"text\" name=\"femail\" value=\"$userinfo[femail]\" size=\"30\" maxlength=\"255\"><br><br>"
   ."<b>"._YOURHOMEPAGE."</b> "._OPTIONAL."<br>"
   ."<input type=\"text\" name=\"url\" value=\"$userinfo[url]\" size=\"30\" maxlength=\"255\"><br><br>"
   ."<b>"._YOURAVATAR."</b> "._OPTIONAL."<br>[ <a href=\"modules.php?name=Your_Account&op=avatarlist\">"._LIST."</a> ]  "
   ."<select name=\"user_avatar\" onChange=\"showimage()\">"
   ."<option value=\"$userinfo[user_avatar]\">$userinfo[user_avatar]</option>";
    $direktori = "images/forum/avatar";
    $handle=opendir($direktori);
    while ($file = readdir($handle)) {
   $filelist[] = $file;
    }
    asort($filelist);
    while (list ($key, $file) = each ($filelist)) {
   ereg(".gif|.jpg",$file);
   if ($file == "." || $file == "..") {
       $a=1;
   } else {
       echo "<option value=\"$file\">$file</option>";
   }
    }

    echo "</select>  <img src=\"images/forum/avatar/$userinfo[user_avatar]\" name=\"avatar\" width=\"32\" height=\"32\" alt=\"\">"
       ."<br><br>"
   ############################ Newsletter auskommentiert  www.maax-design.de############
      ."<b>"._RECEIVENEWSLETTER."</b>   ";
    if ($userinfo[newsletter] == 1) {
    echo "<input type=\"radio\" name=\"newsletter\" value=\"1\" checked>"._YES."  "
    ."<input type=\"radio\" name=\"newsletter\" value=\"0\">"._NO."";
    } elseif ($userinfo[newsletter] == 0) {
    echo "<input type=\"radio\" name=\"newsletter\" value=\"1\">"._YES."  "
      ."<input type=\"radio\" name=\"newsletter\" value=\"0\" checked>"._NO."";
    }
   echo "<br><br>"
   ############################ Newsletter auskommentiert  www.maax-design.de############
   ."<b>"._YICQ."</b> "._OPTIONAL."<br>"
   ."<input type=\"text\" name=\"user_icq\" value=\"$userinfo[user_icq]\" size=\"30\" maxlength=\"100\"><br><br>"
   ."<b>"._YAIM."</b> "._OPTIONAL."<br>"
   ."<input type=\"text\" name=\"user_aim\" value=\"$userinfo[user_aim]\" size=\"30\" maxlength=\"100\"><br><br>"
   ."<b>"._YYIM."</b> "._OPTIONAL."<br>"
   ."<input type=\"text\" name=\"user_yim\" value=\"$userinfo[user_yim]\" size=\"30\" maxlength=\"100\"><br><br>"
   ."<b>"._YMSNM."</b> "._OPTIONAL."<br>"
   ."<input type=\"text\" name=\"user_msnm\" value=\"$userinfo[user_msnm]\" size=\"30\" maxlength=\"100\"><br><br>"
   ."<b>"._YLOCATION."</b> "._OPTIONAL."<br>"
   ."<input type=\"text\" name=\"user_from\" value=\"$userinfo[user_from]\" size=\"30\" maxlength=\"100\"><br><br>"
   ."<b>"._YOCCUPATION."</b> "._OPTIONAL."<br>"
   ."<input type=\"text\" name=\"user_occ\" value=\"$userinfo[user_occ]\" size=\"30\" maxlength=\"100\"><br><br>"
   ."<b>"._YINTERESTS."</b> "._OPTIONAL."<br>"
   ."<input type=\"text\" name=\"user_intrest\" value=\"$userinfo[user_intrest]\" size=\"30\" maxlength=\"100\"><br><br>"
   ."<b>"._SIGNATURE."</b> "._OPTIONAL."<br>"
   .""._255CHARMAX."<br>"
   ."<textarea wrap=\"virtual\" cols=\"50\" rows=\"5\" name=\"user_sig\">$userinfo[user_sig]</textarea><br>"
   ."<br><br>"
   ."<b>"._EXTRAINFO."</b> "._OPTIONAL."<br>"
   .""._CANKNOWABOUT."<br>"
   ."<textarea wrap=\"virtual\" cols=\"50\" rows=\"5\" name=\"bio\">$userinfo[bio]</textarea>"
   ."<br><br>"
   ."<b>"._PASSWORD."</b> "._TYPENEWPASSWORD."<br>"
   ."<input type=\"password\" name=\"pass\" size=\"10\" maxlength=\"20\">  <input type=\"password\" name=\"vpass\" size=\"10\" maxlength=\"20\">"
   ."<br><br>"
   ."<input type=\"hidden\" name=\"uname\" value=\"$userinfo[uname]\">"
   ."<input type=\"hidden\" name=\"uid\" value=\"$userinfo[uid]\">"
   ."<input type=\"hidden\" name=\"op\" value=\"saveuser\">"
   ."<input type=\"submit\" value=\""._SAVECHANGES."\">"
   ."</form></td></tr></table>";
    CloseTable();
    include("footer.php");
    } else {
   main($user);
    }
}


function saveuser($uid, $realname, $uname, $email, $femail, $url, $pass, $vpass, $bio, $user_avatar, $user_icq, $user_occ, $user_from, $user_intrest, $user_sig, $user_aim, $user_yim, $user_msnm, $attach, $newsletter, $geschlecht) {
    global $user, $cookie, $userinfo, $EditedMessage, $minpass, $user_prefix, $dbi;
    cookiedecode($user);
    $check = $cookie[1];
    $check2 = $cookie[2];
    $result = sql_query("select uid, pass from ".$user_prefix."_users where uname='$check'", $dbi);
    list($vuid, $ccpass) = sql_fetch_row($result, $dbi);
    if (($uid == $vuid) AND ($check2 == $ccpass)) {
      if (!eregi("http://", $url)) {
       $url = "http://$url";
         }
     if ($url=="http://") {
         $url = "";
         }
   if ((isset($pass)) && ("$pass" != "$vpass")) {
       echo "<center>"._PASSDIFFERENT."</center>";
   } elseif (($pass != "") && (strlen($pass) < $minpass)) {
       echo "<center>"._YOUPASSMUSTBE." <b>$minpass</b> "._CHARLONG."</center>";
   } else {
       if ($bio) { filter_text($bio); $bio = $EditedMessage; $bio = FixQuotes($bio); }
       if ($pass != "") {
      cookiedecode($user);
      sql_query("LOCK TABLES ".$user_prefix."_users WRITE", $dbi);
      $pass = md5($pass);
      sql_query("update ".$user_prefix."_users set name='$realname', email='$email', femail='$femail', url='$url', pass='$pass', bio='$bio' , user_avatar='$user_avatar', user_icq='$user_icq', user_occ='$user_occ', user_from='$user_from', user_intrest='$user_intrest', user_sig='$user_sig', user_aim='$user_aim', user_yim='$user_yim', user_msnm='$user_msnm', geschlecht='$geschlecht', newsletter='$newsletter' where uid='$uid'", $dbi);
      $result = sql_query("select uid, uname, pass, storynum, umode, uorder, thold, noscore, ublockon, theme from ".$user_prefix."_users where uname='$uname' and pass='$pass'", $dbi);
      if(sql_num_rows($result, $dbi)==1) {
          $userinfo = sql_fetch_array($result, $dbi);
          docookie($userinfo[uid],$userinfo[uname],$userinfo[pass],$userinfo[storynum],$userinfo[umode],$userinfo[uorder],$userinfo[thold],$userinfo[noscore],$userinfo[ublockon],$userinfo[theme],$userinfo[commentmax]);
      } else {
          echo "<center>"._SOMETHINGWRONG."</center><br>";
      }
      sql_query("UNLOCK TABLES", $dbi);
       } else {
      sql_query("update ".$user_prefix."_users set name='$realname', email='$email', femail='$femail', url='$url', bio='$bio', user_avatar='$user_avatar', user_icq='$user_icq', user_occ='$user_occ', user_from='$user_from', user_intrest='$user_intrest', user_sig='$user_sig', user_aim='$user_aim', user_yim='$user_yim', user_msnm='$user_msnm', geschlecht='$geschlecht', newsletter='$newsletter' where uid='$uid'", $dbi);
       if ($attach) {
      $a = 1;
       } else {
      $a = 0;
       }
       }
       Header("Location: modules.php?name=Your_Account");
   }
    }
}

function edithome() {
    global $user, $userinfo, $Default_Theme, $cookie;
    getusrinfo($user);
    if (($userinfo[uname] != $cookie[1]) AND ($userinfo[pass] != $cookie[2])) {
    include ("header.php");
    OpenTable();
    echo "<center><font class=\"title\"><b>"._HOMECONFIG."</b></font></center>";
    CloseTable();
    echo "<br>";
    OpenTable();
    nav();
    CloseTable();
    echo "<br>";
    if($userinfo[theme]=="") {
        $userinfo[theme] = "$Default_Theme";
    }
    OpenTable();
    echo "<form action=\"modules.php?name=Your_Account\" method=\"post\">"
   ."<b>"._NEWSINHOME."</b> "._MAX127." "
   ."<input type=\"text\" name=\"storynum\" size=\"3\" maxlength=\"3\" value=\"$userinfo[storynum]\">";
   $result = sql_query("select active from ".$prefix."_blocks where bkey='userbox'", $dbi);
   list($ubactive) = sql_fetch_row($result, $dbi);
   if ($ubactive == 1) {
      if ($userinfo[ublockon]==1) {$sel = "checked";}
      else {$sel="";}
      echo "<br><br>";
    echo "<input type=\"checkbox\" name=\"ublockon\" $sel>"
      ." <b>"._ACTIVATEPERSONAL."</b>"
      ."<br>"._CHECKTHISOPTION.""
      ."<br>"._YOUCANUSEHTML."<br>"
      ."<textarea cols=\"55\" rows=\"5\" name=\"ublock\">$userinfo[ublock]</textarea>";
      }
   echo "<br><br>"
   ."<input type=\"hidden\" name=\"uname\" value=\"$userinfo[uname]\">"
   ."<input type=\"hidden\" name=\"uid\" value=\"$userinfo[uid]\">"
   ."<input type=\"hidden\" name=\"op\" value=\"savehome\">"
   ."<input type=\"submit\" value=\""._SAVECHANGES."\">"
   ."</form>";
    CloseTable();
    include ("footer.php");
    } else {
   main($user);
    }
}

function chgtheme() {
    global $user, $userinfo, $Default_Theme, $cookie;
    getusrinfo($user);
    if (($userinfo[uname] != $cookie[1]) AND ($userinfo[pass] != $cookie[2])) {
    include ("header.php");
    OpenTable();
    echo "<center><font class=\"title\"><b>"._THEMESELECTION."</b></font></center>";
    CloseTable();
    echo "<br>";
    OpenTable();
    nav();
    CloseTable();
    echo "<br>";
    OpenTable();
    echo "<center>"
   ."<form action=\"modules.php?name=Your_Account\" method=\"post\">"
   ."<b>"._SELECTTHEME."</b><br>"
   ."<select name=\"theme\">";
    $handle=opendir('themes');
    while ($file = readdir($handle)) {
   if ( (!ereg("[.]",$file)) ) {
      $themelist .= "$file ";
   }
    }
    closedir($handle);
    $themelist = explode(" ", $themelist);
    sort($themelist);
    for ($i=0; $i < sizeof($themelist); $i++) {
       if($themelist[$i]!="") {
           echo "<option value=\"$themelist[$i]\" ";
       if((($userinfo[theme]=="") && ($themelist[$i]=="$Default_Theme")) || ($userinfo[theme]==$themelist[$i])) echo "selected";
       echo ">$themelist[$i]\n";
   }
    }
    if($userinfo[theme]=="") $userinfo[theme] = "$Default_Theme";
    echo "</select><br>"
   .""._THEMETEXT1."<br>"
   .""._THEMETEXT2."<br>"
   .""._THEMETEXT3."<br><br>"
   ."<input type=\"hidden\" name=\"uid\" value=\"$userinfo[uid]\">"
   ."<input type=\"hidden\" name=\"op\" value=\"savetheme\">"
   ."<input type=\"submit\" value=\""._SAVECHANGES."\">"
   ."</form>";
    CloseTable();
    include ("footer.php");
    } else {
   main($user);
    }
}


function savehome($uid, $uname, $storynum, $ublockon, $ublock) {
    global $user, $cookie, $userinfo, $user_prefix, $dbi;
    cookiedecode($user);
    $check = $cookie[1];
    $check2 = $cookie[2];
    $result = sql_query("select uid, pass from ".$user_prefix."_users where uname='$check'", $dbi);
    list($vuid, $ccpass) = sql_fetch_row($result, $dbi);
    if (($uid == $vuid) AND ($check2 == $ccpass)) {
   if(isset($ublockon)) $ublockon=1; else $ublockon=0;
   $ublock = FixQuotes($ublock);
   sql_query("update ".$user_prefix."_users set storynum='$storynum', ublockon='$ublockon', ublock='$ublock' where uid=$uid", $dbi);
   getusrinfo($user);
   docookie($userinfo[uid],$userinfo[uname],$userinfo[pass],$userinfo[storynum],$userinfo[umode],$userinfo[uorder],$userinfo[thold],$userinfo[noscore],$userinfo[ublockon],$userinfo[theme],$userinfo[commentmax]);
   Header("Location: modules.php?name=Your_Account");
    }
}

function savetheme($uid, $theme) {
    global $user, $cookie, $userinfo, $user_prefix, $dbi;
    cookiedecode($user);
    $check = $cookie[1];
    $check2 = $cookie[2];
    $result = sql_query("select uid, pass from ".$user_prefix."_users where uname='$check'", $dbi);
    list($vuid, $ccpass) = sql_fetch_row($result, $dbi);
    if (($uid == $vuid) AND ($check2 == $ccpass)) {
   sql_query("update ".$user_prefix."_users set theme='$theme' where uid=$uid", $dbi);
   getusrinfo($user);
   docookie($userinfo[uid],$userinfo[uname],$userinfo[pass],$userinfo[storynum],$userinfo[umode],$userinfo[uorder],$userinfo[thold],$userinfo[noscore],$userinfo[ublockon],$userinfo[theme],$userinfo[commentmax]);
   Header("Location: modules.php?name=Your_Account&theme=$theme");
    }
}

function editcomm() {
    global $user, $userinfo, $cookie;
    getusrinfo($user);
    if (($userinfo[uname] != $cookie[1]) AND ($userinfo[pass] != $cookie[2])) {
    include ("header.php");
    OpenTable();
    echo "<center><font class=\"title\"><b>"._COMMENTSCONFIG."</b></font></center>";
    CloseTable();
    echo "<br>";
    OpenTable();
    nav();
    CloseTable();
    echo "<br>";
    OpenTable();
    echo "<table cellpadding=\"8\" border=\"0\"><tr><td>"
   ."<form action=\"modules.php?name=Your_Account\" method=\"post\">"
   ."<b>"._DISPLAYMODE."</b>"
   ."<select name=\"umode\">";
    ?>
    <option value="nocomments" <?php if ($userinfo[umode] == 'nocomments') { echo "selected"; } ?>><?php echo _NOCOMMENTS ?>
    <option value="nested" <?php if ($userinfo[umode] == 'nested') { echo "selected"; } ?>><?php echo _NESTED ?>
    <option value="flat" <?php if ($userinfo[umode] == 'flat') { echo "selected"; } ?>><?php echo _FLAT ?>
    <option value="thread" <?php if (!isset($userinfo[umode]) || ($userinfo[umode]=="") || $userinfo[umode]=='thread') { echo "selected"; } ?>><?php echo _THREAD ?>
    </select>
    <br><br>
    <b><?php echo _SORTORDER ?></b>
    <select name="uorder">
    <option value="0" <?php if (!$userinfo[uorder]) { echo "selected"; } ?>><?php echo _OLDEST ?>
    <option value="1" <?php if ($userinfo[uorder]==1) { echo "selected"; } ?>><?php echo _NEWEST ?>
    <option value="2" <?php if ($userinfo[uorder]==2) { echo "selected"; } ?>><?php echo _HIGHEST ?>
    </select>
    <br><br>
    <b><?php echo _THRESHOLD ?></b>
    <?php echo _COMMENTSWILLIGNORED ?><br>
    <select name="thold">
    <option value="-1" <?php if ($userinfo[thold]==-1) { echo "selected"; } ?>>-1: <?php echo _UNCUT ?>
    <option value="0" <?php if ($userinfo[thold]==0) { echo "selected"; } ?>>0: <?php echo _EVERYTHING ?>
    <option value="1" <?php if ($userinfo[thold]==1) { echo "selected"; } ?>>1: <?php echo _FILTERMOSTANON ?>
    <option value="2" <?php if ($userinfo[thold]==2) { echo "selected"; } ?>>2: <?php echo _USCORE ?> +2
    <option value="3" <?php if ($userinfo[thold]==3) { echo "selected"; } ?>>3: <?php echo _USCORE ?> +3
    <option value="4" <?php if ($userinfo[thold]==4) { echo "selected"; } ?>>4: <?php echo _USCORE ?> +4
    <option value="5" <?php if ($userinfo[thold]==5) { echo "selected"; } ?>>5: <?php echo _USCORE ?> +5
    </select><br>
    <i><?php echo _SCORENOTE ?></i>
    <br><br>
    <INPUT type="checkbox" name="noscore" <?php if ($userinfo[noscore]==1) { echo "checked"; } ?>><b> <?php echo _NOSCORES ?></b> <?php echo _HIDDESCORES ?>
    <br><br>
    <b><?php echo _MAXCOMMENT ?></b> <?php echo _TRUNCATES ?><br>
    <input type="text" name="commentmax" value="<?php echo $userinfo[commentmax] ?>" size=11 maxlength=11> <?php echo _BYTESNOTE ?>
    <br><br>
    <input type="hidden" name="uname" value="<?php echo"$userinfo[uname]"; ?>">
    <input type="hidden" name="uid" value="<?php echo"$userinfo[uid]"; ?>">
    <input type="hidden" name="op" value="savecomm">
    <input type="submit" value="<?php echo _SAVECHANGES ?>">
    </form></td></tr></table>
    <?php
    CloseTable();
    echo "<br><br>";
    include ("footer.php");
    } else {
   main($user);
    }
}

function savecomm($uid, $uname, $umode, $uorder, $thold, $noscore, $commentmax) {
    global $user, $cookie, $userinfo, $user_prefix, $dbi;
    cookiedecode($user);
    $check = $cookie[1];
    $check2 = $cookie[2];
    $result = sql_query("select uid, pass from ".$user_prefix."_users where uname='$check'", $dbi);
    list($vuid, $ccpass) = sql_fetch_row($result, $dbi);
    if (($uid == $vuid) AND ($check2 == $ccpass)) {
   if(isset($noscore)) $noscore=1; else $noscore=0;
   sql_query("update ".$user_prefix."_users set umode='$umode', uorder='$uorder', thold='$thold', noscore='$noscore', commentmax='$commentmax' where uid=$uid", $dbi);
   getusrinfo($user);
   docookie($userinfo[uid],$userinfo[uname],$userinfo[pass],$userinfo[storynum],$userinfo[umode],$userinfo[uorder],$userinfo[thold],$userinfo[noscore],$userinfo[ublockon],$userinfo[theme],$userinfo[commentmax]);
   Header("Location: modules.php?name=Your_Account");
    }
}

function avatarlist() {
    include("header.php");
    Opentable();
    echo "<center><font class=\"option\"><b>"._AVAILABLEAVATARS."</b></font><br><br>";
    $direktori = "images/forum/avatar";
    $handle=opendir($direktori);
    while ($file = readdir($handle)) {
   $filelist[] = $file;
    }
    asort($filelist);
    $temcount = 1;
    while (list ($key, $file) = each ($filelist)) {
   if (ereg(".gif",$file)) {
       if ($file == "." || $file == "..") {
      $a=1;
       } else {
      echo "<img src=\"images/forum/avatar/$file\" border=\"0\" width=\"32\" height=\"32\" alt=\"$file\" hspace=\"10\" vspace=\"10\">$file";
       }
       if ($temcount == 10) {
      echo "<br>";
      $temcount -= 10;
       }
       $temcount ++;
   }
    }
    echo "<br><br><br>"
   .""._GOBACK.""
   ."</center>";
    CloseTable();
    include("footer.php");
}

function sendnewusermsg($uname){
   global $sitename, $adminmail, $user_prefix, $dbi, $language, $module_name, $tblprivatemessage, $msgicon, $msgadminid, $sendnewusermsg, $msgdefaultlang;
   if ($sendnewusermsg=="0" || !$sendnewusermsg) return;
   $qry="SELECT uid, name FROM ".$user_prefix."_users WHERE uname='$uname'";
   $result = sql_query($qry, $dbi);
   list($uid, $fullname) = sql_fetch_row($result, $dbi);
   if ($uid){
      if(file_exists("modules/$module_name/language/hello-$language.php")) {
         include("modules/$module_name/language/hello-$language.php");
         }
      else {
         include("modules/$module_name/language/hello-$msgdefaultlang.php");
         }
      if ($fullname) $uname=$fullname;
      $time = date("Y-m-d H:i");
      $subject = _HELLOSUBJECT1." $uname, "._HELLOSUBJECT2." $sitename";
      $msg = _HELLOTEXT;
      $qry = "INSERT INTO $tblprivatemessage (msg_image, subject, from_userid, to_userid, msg_time, msg_text) ";
      $qry .= "VALUES ('$msgicon', '$subject', '$msgadminid', '$uid', '$time', '$msg')";
      $result = sql_query($qry, $dbi);
      }
   }

switch($op) {

    case "delconfirm":
   delconfirm($uid, $code);
   break;

    case "delete":
   delete($uname);
   break;

    case "logout":
   logout();
   break;

    case "lost_pass":
   lost_pass();
   break;

    case "new user":
   confirmNewUser($uname, $vpass, $pass, $email, $url, $user_avatar, $user_icq, $user_occ, $user_from, $user_intrest, $user_sig, $user_viewemail, $user_aim, $user_yim, $user_msnm);
   break;

    case "finish":
   finishNewUser($uname, $vpass, $email, $url, $user_avatar, $user_icq, $user_occ, $user_from, $user_intrest, $user_sig, $user_viewemail, $user_aim, $user_yim, $user_msnm);
   break;

    case "mailpasswd":
   mail_password($uname, $code);
   break;

    case "userinfo":
   userinfo($uname, $bypass);
   break;

    case "login":
   login($uname, $pass);
   break;

    case "edituser":
   edituser();
   break;

    case "saveuser":
   saveuser($uid, $realname, $uname, $email, $femail, $url, $pass, $vpass, $bio, $user_avatar, $user_icq, $user_occ, $user_from, $user_intrest, $user_sig, $user_aim, $user_yim, $user_msnm, $attach, $geschlecht, $newsletter);
   break;

    case "edithome":
   edithome();
   break;

    case "chgtheme":
   chgtheme();
   break;

    case "savehome":
   savehome($uid, $uname, $storynum, $ublockon, $ublock);
   break;

    case "savetheme":
   savetheme($uid, $theme);
   break;

    case "avatarlist":
   avatarlist();
   break;

    case "editcomm":
   editcomm();
   break;

    case "savecomm":
   savecomm($uid, $uname, $umode, $uorder, $thold, $noscore, $commentmax);
   break;

    case "pass_lost":
   pass_lost();
   break;

    case "new_user":
        new_user();
        break;

    default:
   main($user);
   break;

}

?>
----------------------------------------------
Scriptende

Sascha1981

Hey @ll!!

Bei mir funktioniert die Geschlecht auswahl auch nicht!!
Am anfang funktionierte sie wunderbar aber jetzt auf einmal wird immer nur weinlich angezeigt wenn ich männlich auswählen und wenn ich weiblich auswähle das selbe!!!!!
Vielleicht hat jemand eine lösung!!

modelportal


_Gerry_

Hey ihr!

Also ersteinmal zum Prob von "modelportal"
Wenn ich bei dir männlich auswähle zeigt es mir weiblich an, bei weiblich dann männlich!
 :o
Hast du es in der lang-german.php auch richtig angegeben?
Check das mal!
Ausserdem wird mir ein Fehler in der index.php des Y_A Moduls in Zeile 508 angezeigt betreffend der closecredits()  Funktion!
Da dies anscheinend eine änderung von dir ist, keine Ahnung was da los ist!

Sascha nun mal zu deiner Seite!
Habe eben auf deiner Seite nachgesehen, da du leider die funktion aus der index.php rausgenommen hast konnte ich es nicht überprüfen!
Bei mir funktioniert es jedenfalls noch einwandfrei!
Jedoch bin ich sehr dankbar wenn ihr euch meldet, den nur so können wir das Problem welches leider bei einigen von euch auftritt eventuell lösen!  ;)

cu, Gerry.
CMS-Version: pragmaMx 0.1.11, 1.33.2.12.2.9/2009-05-10   
PHP-Version: 5.2.0-8+etch5~pu1
MySQL-Version: 5.0.32-Debian_7etch1
Server-Version: Apache/2.2.3 (Debian) mod_ssl/2.2.3 OpenSSL/0.9.8c

_Gerry_

Hey Sascha!
hmmmmmm...........
Eigenartig, auf einmal wird in der userinfo doch wieder das Geschlecht angezeigt! :o
Hast recht, egal was man(n) macht es wird immer nur weiblich angezeigt!
Echt eigenartig, aber ich werde es mir mal genauer ansehen!
CMS-Version: pragmaMx 0.1.11, 1.33.2.12.2.9/2009-05-10   
PHP-Version: 5.2.0-8+etch5~pu1
MySQL-Version: 5.0.32-Debian_7etch1
Server-Version: Apache/2.2.3 (Debian) mod_ssl/2.2.3 OpenSSL/0.9.8c

modelportal

 ;) hallo gerry.close-fehler habe ich beseitigt.ich weiß nicht was du geändert haben könntest.denn meine geschlechtsauswahl ändert sich überhaupt nicht.ich habe es auch nicht in der sprachdatei definiert,sondern in der index.php dirkekt.
ich finde den fehler fr den eintrag in die datenbank nicht.so ein mist. :exclam:

Vakistaste1


modelportal

wenn ich deine frage wörtlich nehmen würde,könnte ich dir nur schreiben,dass php-nuke ohne YA weniger interessant wäre.ich gehe aber mal davon aus,dass du die geschlechtsanzeige meinst.dieses möchte ich zum laufen bringen,da ich der meinung bin,das es ein wichtiger bestandteil der informationsangabe ist auf meiner seite.
mfg :)



EDIT: Name gelöscht

_Gerry_

Hey Ihr!

Also das erweiterte Modul soll eigentlich dazu sein das man gleich weis ob es sich um eine weibliche oder einen männlichen User handelt, ist ja bei einigen Nick`s nicht so leicht ersichtlich! ;)

Nun nochmals zum Problem, ich werde es mir heute Abend nochmals genauer zur Brust nehmen und gegebenenfalls das Script umschreiben!
Ich gebe euch auf jedenfall noch genauer bescheid! :)

cu, Gerry.
CMS-Version: pragmaMx 0.1.11, 1.33.2.12.2.9/2009-05-10   
PHP-Version: 5.2.0-8+etch5~pu1
MySQL-Version: 5.0.32-Debian_7etch1
Server-Version: Apache/2.2.3 (Debian) mod_ssl/2.2.3 OpenSSL/0.9.8c

modelportal

Ich danke Dir.Mache bitt ersichtlich,was du gendert hast.Möchte es ja auch lernen.
MfG :thumbup:



EDIT: Name gelöscht