Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 14.14 KB | None | 0 0
  1. <?php
  2. class User
  3. {  
  4.     private $dbtable = "webs_user";
  5.    
  6.     private $userID;
  7.     private $registerdate;
  8.     private $lastlogin;
  9.     private $username;
  10.     private $password;
  11.     private $nickname;
  12.     private $email;
  13.     private $email_hide;
  14.     private $email_change;
  15.     private $email_activate;
  16.     private $firstname;
  17.     private $lastname;
  18.     private $sex;
  19.     private $country;
  20.     private $town;
  21.     private $birthday;
  22.     private $icq;
  23.     private $avatar;
  24.     private $usertext;
  25.     private $userpic;
  26.     private $clantag;
  27.     private $clanname;
  28.     private $clanhp;
  29.     private $clanirc;
  30.     private $clanhistory;
  31.     private $cpu;
  32.     private $mainboard;
  33.     private $ram;
  34.     private $monitor;
  35.     private $graphiccard;
  36.     private $soundcard;
  37.     private $verbindung;
  38.     private $keyboard;
  39.     private $mouse;
  40.     private $mousepad;
  41.     private $newsletter;
  42.     private $homepage;
  43.     private $about;
  44.     private $pmgot;
  45.     private $pmsent;
  46.     private $visits;
  47.     private $banned;
  48.     private $ban_reason;
  49.     private $ip;
  50.     private $topics;
  51.     private $articles;
  52.     private $demos;
  53.     private $files;
  54.     private $gallery_pictures;
  55.     private $mailonpm;
  56.     private $userdescription;
  57.     private $activated;
  58.     private $language;
  59.     private $movies;
  60.     private $tmlogin;
  61.     private $tut;
  62.     private $vdollars;
  63.     private $supmainID;
  64.     private $menu_right;
  65.     private $visible;
  66.    
  67.     #Konstruktor
  68.     public function User($userID = NULL)
  69.     {
  70.         if ($userID != NULL)
  71.         {
  72.             $this->getfromdb($userID);
  73.         }
  74.     }
  75.    
  76.     private function getfromdb($userID)
  77.     {
  78.         $result = mysql_query("SELECT * FROM `". $this->dbtable ."` WHERE `userID` = ".$userID);
  79.         $row = mysql_fetch_object($result);
  80.         $this->setuserID($row->userID);
  81.         $this->setregisterdate($row->registerdate);
  82.         $this->setlastlogin($row->lastlogin);
  83.         $this->setusername($row->username);
  84.         $this->setpassword($row->password);
  85.         $this->setnickname($row->nickname);
  86.         $this->setemail($row->email);
  87.         $this->setemail_hide($row->email_hide);
  88.         $this->setemail_change($row->email_change);
  89.         $this->setemail_activate($row->email_activate);
  90.         $this->setfirstname($row->firstname);
  91.         $this->setlastname($row->lastname);
  92.         $this->setsex($row->sex);
  93.         $this->setcountry($row->country);
  94.         $this->settown($row->town);
  95.         $this->setbirthday($row->birthday);
  96.         $this->seticq($row->icq);
  97.         $this->setavatar($row->avatar);
  98.         $this->setusertext($row->usertext);
  99.         $this->setuserpic($row->userpic);
  100.         $this->setclantag($row->clantag);
  101.         $this->setclanname($row->clanname);
  102.         $this->setclanhp($row->clanhp);
  103.         $this->setclanirc($row->clanirc);
  104.         $this->setclanhistory($row->clanhistory);
  105.         $this->setcpu($row->cpu);
  106.         $this->setmainboard($row->mainboard);
  107.         $this->setram($row->ram);
  108.         $this->setmonitor($row->monitor);
  109.         $this->setgraphiccard($row->graphiccard);
  110.         $this->setsoundcard($row->soundcard);
  111.         $this->setverbindung($row->verbindung);
  112.         $this->setkeyboard($row->keyboard);
  113.         $this->setmouse($row->mouse);
  114.         $this->setmousepad($row->mousepad);
  115.         $this->setnewsletter($row->newsletter);
  116.         $this->sethomepage($row->homepage);
  117.         $this->setabout($row->about);
  118.         $this->setpmgot($row->pmgot);
  119.         $this->setpmsent($row->pmsent);
  120.         $this->setvisits($row->visits);
  121.         $this->setbanned($row->banned);
  122.         $this->setban_reason($row->ban_reason);
  123.         $this->setip($row->ip);
  124.         $this->settopics($row->topics);
  125.         $this->setarticles($row->articles);
  126.         $this->setdemos($row->demos);
  127.         $this->setfiles($row->files);
  128.         $this->setgallery_pictures($row->gallery_pictures);
  129.         $this->setmailonpm($row->mailonpm);
  130.         $this->setuserdescription($row->userdescription);
  131.         $this->setactivated($row->activated);
  132.         $this->setlanguage($row->language);
  133.         $this->setmovies($row->movies);
  134.         $this->settmlogin($row->tmlogin);
  135.         $this->settut($row->tut);
  136.         $this->setvdollars($row->vdollars);
  137.         $this->setsupmainID($row->supmainID);
  138.         $this->setmenu_right($row->menu_right);
  139.         $this->setvisible($row->visible);      
  140.         mysql_free_result($result);
  141.     }
  142.    
  143.     #Getter und Setter
  144.     public function getuserID(){return $this->userID; }
  145.     public function setuserID($userID){ $this->userID = $userID;}
  146.    
  147.     public function getregisterdate(){return $this->registerdate; }
  148.     public function setregisterdate($registerdate){ $this->registerdate = $registerdate;}
  149.    
  150.     public function getlastlogin(){return $this->lastlogin; }
  151.     public function setlastlogin($lastlogin){ $this->lastlogin = $lastlogin;}
  152.    
  153.     public function getusername(){return $this->username; }
  154.     public function setusername($username){ $this->username = $username;}
  155.    
  156.     public function getpassword(){return $this->password; }
  157.     public function setpassword($password){ $this->password = $password;}
  158.    
  159.     public function getnickname(){return $this->nickname; }
  160.     public function setnickname($nickname){ $this->nickname = $nickname;}
  161.    
  162.     public function getemail(){return $this->email; }
  163.     public function setemail($email){ $this->email = $email;}
  164.    
  165.     public function getemail_hide(){return $this->email_hide; }
  166.     public function setemail_hide($email_hide){ $this->email_hide = $email_hide;}
  167.    
  168.     public function getemail_change(){return $this->email_change; }
  169.     public function setemail_change($email_change){ $this->email_change = $email_change;}
  170.    
  171.     public function getemail_activate(){return $this->email_activate; }
  172.     public function setemail_activate($email_activate){ $this->email_activate = $email_activate;}
  173.    
  174.     public function getfirstname(){return $this->firstname; }
  175.     public function setfirstname($firstname){ $this->firstname = $firstname;}
  176.    
  177.     public function getlastname(){return $this->lastname; }
  178.     public function setlastname($lastname){ $this->lastname = $lastname;}
  179.    
  180.     public function getsex(){return $this->sex; }
  181.     public function setsex($sex){ $this->sex = $sex;}
  182.    
  183.     public function getcountry(){return $this->country; }
  184.     public function setcountry($country){ $this->country = $country;}
  185.    
  186.     public function gettown(){return $this->town; }
  187.     public function settown($town){ $this->town = $town;}
  188.    
  189.     public function getbirthday(){return $this->birthday; }
  190.     public function setbirthday($birthday){ $this->birthday = $birthday;}
  191.    
  192.     public function geticq(){return $this->icq; }
  193.     public function seticq($icq){ $this->icq = $icq;}
  194.    
  195.     public function getavatar(){return $this->avatar; }
  196.     public function setavatar($avatar){ $this->avatar = $avatar;}
  197.    
  198.     public function getusertext(){return $this->usertext; }
  199.     public function setusertext($usertext){ $this->usertext = $usertext;}
  200.    
  201.     public function getuserpic(){return $this->userpic; }
  202.     public function setuserpic($userpic){ $this->userpic = $userpic;}
  203.    
  204.     public function getclantag(){return $this->clantag; }
  205.     public function setclantag($clantag){ $this->clantag = $clantag;}
  206.    
  207.     public function getclanname(){return $this->clanname; }
  208.     public function setclanname($clanname){ $this->clanname = $clanname;}
  209.    
  210.     public function getclanhp(){return $this->clanhp; }
  211.     public function setclanhp($clanhp){ $this->clanhp = $clanhp;}
  212.    
  213.     public function getclanirc(){return $this->clanirc; }
  214.     public function setclanirc($clanirc){ $this->clanirc = $clanirc;}
  215.    
  216.     public function getclanhistory(){return $this->clanhistory; }
  217.     public function setclanhistory($clanhistory){ $this->clanhistory = $clanhistory;}
  218.    
  219.     public function getcpu(){return $this->cpu; }
  220.     public function setcpu($cpu){ $this->cpu = $cpu;}
  221.    
  222.     public function getmainboard(){return $this->mainboard; }
  223.     public function setmainboard($mainboard){ $this->mainboard = $mainboard;}
  224.    
  225.     public function getram(){return $this->ram; }
  226.     public function setram($ram){ $this->ram = $ram;}
  227.    
  228.     public function getmonitor(){return $this->monitor; }
  229.     public function setmonitor($monitor){ $this->monitor = $monitor;}
  230.    
  231.     public function getgraphiccard(){return $this->graphiccard; }
  232.     public function setgraphiccard($graphiccard){ $this->graphiccard = $graphiccard;}
  233.    
  234.     public function getsoundcard(){return $this->soundcard; }
  235.     public function setsoundcard($soundcard){ $this->soundcard = $soundcard;}
  236.    
  237.     public function getverbindung(){return $this->verbindung; }
  238.     public function setverbindung($verbindung){ $this->verbindung = $verbindung;}
  239.    
  240.     public function getkeyboard(){return $this->keyboard; }
  241.     public function setkeyboard($keyboard){ $this->keyboard = $keyboard;}
  242.    
  243.     public function getmouse(){return $this->mouse; }
  244.     public function setmouse($mouse){ $this->mouse = $mouse;}
  245.    
  246.     public function getmousepad(){return $this->mousepad; }
  247.     public function setmousepad($mousepad){ $this->mousepad = $mousepad;}
  248.    
  249.     public function getnewsletter(){return $this->newsletter; }
  250.     public function setnewsletter($newsletter){ $this->newsletter = $newsletter;}
  251.    
  252.     public function gethomepage(){return $this->homepage; }
  253.     public function sethomepage($homepage){ $this->homepage = $homepage;}
  254.    
  255.     public function getabout(){return $this->about; }
  256.     public function setabout($about){ $this->about = $about;}
  257.    
  258.     public function getpmgot(){return $this->pmgot; }
  259.     public function setpmgot($pmgot){ $this->pmgot = $pmgot;}
  260.    
  261.     public function getpmsent(){return $this->pmsent; }
  262.     public function setpmsent($pmsent){ $this->pmsent = $pmsent;}
  263.    
  264.     public function getvisits(){return $this->visits; }
  265.     public function setvisits($visits){ $this->visits = $visits;}
  266.    
  267.     public function getbanned(){return $this->banned; }
  268.     public function setbanned($banned){ $this->banned = $banned;}
  269.    
  270.     public function getban_reason(){return $this->ban_reason; }
  271.     public function setban_reason($ban_reason){ $this->ban_reason = $ban_reason;}
  272.    
  273.     public function getip(){return $this->ip; }
  274.     public function setip($ip){ $this->ip = $ip;}
  275.    
  276.     public function gettopics(){return $this->topics; }
  277.     public function settopics($topics){ $this->topics = $topics;}
  278.    
  279.     public function getarticles(){return $this->articles; }
  280.     public function setarticles($articles){ $this->articles = $articles;}
  281.    
  282.     public function getdemos(){return $this->demos; }
  283.     public function setdemos($demos){ $this->demos = $demos;}
  284.    
  285.     public function getfiles(){return $this->files; }
  286.     public function setfiles($files){ $this->files = $files;}
  287.    
  288.     public function getgallery_pictures(){return $this->gallery_pictures; }
  289.     public function setgallery_pictures($gallery_pictures){ $this->gallery_pictures = $gallery_pictures;}
  290.    
  291.     public function getmailonpm(){return $this->mailonpm; }
  292.     public function setmailonpm($mailonpm){ $this->mailonpm = $mailonpm;}
  293.    
  294.     public function getuserdescription(){return $this->userdescription; }
  295.     public function setuserdescription($userdescription){ $this->userdescription = $userdescription;}
  296.    
  297.     public function getactivated(){return $this->activated; }
  298.     public function setactivated($activated){ $this->activated = $activated;}
  299.    
  300.     public function getlanguage(){return $this->language; }
  301.     public function setlanguage($language){ $this->language = $language;}
  302.    
  303.     public function getmovies(){return $this->movies; }
  304.     public function setmovies($movies){ $this->movies = $movies;}
  305.    
  306.     public function gettmlogin(){return $this->tmlogin; }
  307.     public function settmlogin($tmlogin){ $this->tmlogin = $tmlogin;}
  308.    
  309.     public function gettut(){return $this->tut; }
  310.     public function settut($tut){ $this->tut = $tut;}
  311.    
  312.     public function getvdollars(){return $this->vdollars; }
  313.     public function setvdollars($vdollars){ $this->vdollars = $vdollars;}
  314.    
  315.     public function getsupmainID(){return $this->supmainID; }
  316.     public function setsupmainID($supmainID){ $this->supmainID = $supmainID;}
  317.    
  318.     public function getmenu_right(){return $this->menu_right; }
  319.     public function setmenu_right($menu_right){ $this->menu_right = $menu_right;}
  320.    
  321.     public function getvisible(){return $this->visible; }
  322.     public function setvisible($visible){ $this->visible = $visible;}
  323.    
  324.     #tostring()
  325.     public function tostring()
  326.     {
  327.         return "
  328.             userID -> " . $this->getuserID() . "<br />
  329.             registerdate -> " . $this->getregisterdate() . "<br />
  330.             lastlogin -> " . $this->getlastlogin() . "<br />
  331.             username -> " . $this->getusername() . "<br />
  332.             password -> " . $this->getpassword() . "<br />
  333.             nickname -> " . $this->getnickname() . "<br />
  334.             email -> " . $this->getemail() . "<br />
  335.             email_hide -> " . $this->getemail_hide() . "<br />
  336.             email_change -> " . $this->getemail_change() . "<br />
  337.             email_activate -> " . $this->getemail_activate() . "<br />
  338.             firstname -> " . $this->getfirstname() . "<br />
  339.             lastname -> " . $this->getlastname() . "<br />
  340.             sex -> " . $this->getsex() . "<br />
  341.             country -> " . $this->getcountry() . "<br />
  342.             town -> " . $this->gettown() . "<br />
  343.             birthday -> " . $this->getbirthday() . "<br />
  344.             icq -> " . $this->geticq() . "<br />
  345.             avatar -> " . $this->getavatar() . "<br />
  346.             usertext -> " . $this->getusertext() . "<br />
  347.             userpic -> " . $this->getuserpic() . "<br />
  348.             clantag -> " . $this->getclantag() . "<br />
  349.             clanname -> " . $this->getclanname() . "<br />
  350.             clanhp -> " . $this->getclanhp() . "<br />
  351.             clanirc -> " . $this->getclanirc() . "<br />
  352.             clanhistory -> " . $this->getclanhistory() . "<br />
  353.             cpu -> " . $this->getcpu() . "<br />
  354.             mainboard -> " . $this->getmainboard() . "<br />
  355.             ram -> " . $this->getram() . "<br />
  356.             monitor -> " . $this->getmonitor() . "<br />
  357.             graphiccard -> " . $this->getgraphiccard() . "<br />
  358.             soundcard -> " . $this->getsoundcard() . "<br />
  359.             verbindung -> " . $this->getverbindung() . "<br />
  360.             keyboard -> " . $this->getkeyboard() . "<br />
  361.             mouse -> " . $this->getmouse() . "<br />
  362.             mousepad -> " . $this->getmousepad() . "<br />
  363.             newsletter -> " . $this->getnewsletter() . "<br />
  364.             homepage -> " . $this->gethomepage() . "<br />
  365.             about -> " . $this->getabout() . "<br />
  366.             pmgot -> " . $this->getpmgot() . "<br />
  367.             pmsent -> " . $this->getpmsent() . "<br />
  368.             visits -> " . $this->getvisits() . "<br />
  369.             banned -> " . $this->getbanned() . "<br />
  370.             ban_reason -> " . $this->getban_reason() . "<br />
  371.             ip -> " . $this->getip() . "<br />
  372.             topics -> " . $this->gettopics() . "<br />
  373.             articles -> " . $this->getarticles() . "<br />
  374.             demos -> " . $this->getdemos() . "<br />
  375.             files -> " . $this->getfiles() . "<br />
  376.             gallery_pictures -> " . $this->getgallery_pictures() . "<br />
  377.             mailonpm -> " . $this->getmailonpm() . "<br />
  378.             userdescription -> " . $this->getuserdescription() . "<br />
  379.             activated -> " . $this->getactivated() . "<br />
  380.             language -> " . $this->getlanguage() . "<br />
  381.             movies -> " . $this->getmovies() . "<br />
  382.             tmlogin -> " . $this->gettmlogin() . "<br />
  383.             tut -> " . $this->gettut() . "<br />
  384.             vdollars -> " . $this->getvdollars() . "<br />
  385.             supmainID -> " . $this->getsupmainID() . "<br />
  386.             menu_right -> " . $this->getmenu_right() . "<br />
  387.             visible -> " . $this->getvisible() . "<br />
  388.         ";
  389.     }
  390. }
  391. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement