Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Usunięcie niepotrzebnych treści.
n0dve
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 29.07.2010

Ostrzeżenie: (0%)
-----


Mam oto taki register w webspela. I jest problem a ja jestem lajkiem (IMG:style_emoticons/default/biggrin.gif) Otóż jest napis np. Username ( tylko go nie widać ponieważ litery są białe, a tło tabelki też jest białe...) i 2gi problem jest taki że w ogóle nie ma security code. I moja prośba do Was. Co mam zmienić aby te litery miały czarny kolor i w którym pliku to mam zmienić, oraz proszę o usunięcie danych z pliku register.php tak aby nie trzeba było wpisywać tego kodu. Z góry dziękuję i pozdrawiam (IMG:style_emoticons/default/biggrin.gif) a i jeżeli chcecie zobaczyć szablon strony to www/bluebunny.pl Wejdźcie do rejestracji i zobaczcie (IMG:style_emoticons/default/biggrin.gif)
  1. <?php
  2. /*
  3.  ########################################################################
  4. # #
  5. # Version 4 / / / #
  6. # -----------__---/__---__------__----__---/---/- #
  7. # | /| / /___) / ) (_ ` / ) /___) / / #
  8. # _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___ #
  9. # Free Content / Management System #
  10. # / #
  11. # #
  12. # #
  13. # Copyright 2005-2006 by webspell.org #
  14. # #
  15. # visit webSPELL.org, webspell.info to get webSPELL for free #
  16. # - Script runs under the GNU GENERAL PUBLIC LICENSE #
  17. # - It's NOT allowed to remove this copyright-tag #
  18. # #
  19. # Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at), #
  20. # Far Development by Development Team - webspell.org #
  21. # #
  22. # visit webspell.org #
  23. # #
  24.  ########################################################################
  25. */
  26.  
  27. eval ("\$title_register = \"".gettemplate("title_register")."\";");
  28. echo $title_register;
  29.  
  30. if($_POST['save']) {
  31.  
  32. //register_globals = off
  33.  
  34. $username = htmlspecialchars($_POST['username']);
  35. $nickname = htmlspecialchars($_POST['nickname']);
  36. $pwd1 = $_POST['pwd1'];
  37. $pwd2 = $_POST['pwd2'];
  38. $mail = $_POST['mail'];
  39. $country = $_POST['country'];
  40. $CAPCLASS = new Captcha;
  41. if(!$CAPCLASS->check_captcha($_POST['captcha'], $_POST['captcha_hash'])) $error[]="The security code was wrong!";
  42.  
  43. // prüfung username
  44. $ergebnis = safe_query("SELECT * FROM ".PREFIX."user WHERE username = '$username' ");
  45. $num = mysql_num_rows($ergebnis);
  46. if($num) $error[]="username already in use!";
  47.  
  48. // prüfung mail
  49. $ergebnis = safe_query("SELECT * FROM ".PREFIX."user WHERE email = '$mail' ");
  50. $num = mysql_num_rows($ergebnis);
  51. if($num) $error[]="mailadress already in use!";
  52.  
  53. // prüfung nickname
  54. $ergebnis = safe_query("SELECT * FROM ".PREFIX."user WHERE nickname = '$nickname' ");
  55. $num = mysql_num_rows($ergebnis);
  56. if($num) $error[]="nickname already in use!";
  57.  
  58. if(!(strlen(trim($username)))) $error[]="you have to enter a username!";
  59. elseif( strlen(trim($username)) > 30 ) $error[]="your username is too long! (max 30 chars)";
  60.  
  61. // prüfung passwort
  62. if($pwd1 == $pwd2) {
  63. if(!(strlen(trim($pwd1)))) $error[]="you have to enter a password!";
  64. }
  65. else $error[]="your repeated password is not valid!";
  66.  
  67. // prüfung e-mail
  68. $sem = '^[a-z0-9_\.-]+@[a-z0-9_-]+\.[a-z0-9_\.-]+$';
  69. if(!(eregi($sem, $mail))) $error[]="your e-mail is not valid!";
  70.  
  71. // prüfung nickname
  72. if(!(strlen(trim($nickname)))) $error[]="you have to enter your nickname!";
  73.  
  74. if(is_array($error)) {
  75. echo'<b>There has been errors!</b><br><br>';
  76. foreach($error as $err) {
  77. echo'<li>'.$err.'</li>';
  78. }
  79. echo'<br><br><input type="button" class="button" onClick="java script:history.back()" value="Back">';
  80. }
  81. else {
  82. // insert in db
  83. $md5pwd = md5($pwd1);
  84. $registerdate=time();
  85.  
  86. $activationkey = 1;
  87.  
  88. safe_query("INSERT INTO `".PREFIX."user` (`registerdate`, `lastlogin`, `username`, `password`, `nickname`, `email`, `newsletter`, `activated`, `country`) VALUES ('$registerdate', '$registerdate', '$username', '$md5pwd', '$nickname', '$mail', '1', '".$activationkey."', '$country')");
  89.  
  90. $insertid = mysql_insert_id();
  91.  
  92. // insert in user_groups
  93. safe_query("INSERT INTO ".PREFIX."user_groups ( userID ) values('$insertid' )");
  94. echo "Your registration was successful, you are able to login now!";
  95.  
  96. }}
  97. elseif($_GET['key']) {
  98.  
  99. safe_query("UPDATE `".PREFIX."user` SET activated='1' WHERE activated='".$_GET['key']."'");
  100. if(mysql_affected_rows()) redirect('index.php?site=login','Your account has been activated successfully.<br>You are now able to login.');
  101. else redirect('index.php?site=login','Your activation key ist wrong!');
  102.  
  103. }
  104. else {
  105. $bg1=BG_1;
  106. $bg2=BG_2;
  107. $bg3=BG_3;
  108. $bg4=BG_4;
  109.  
  110. $CAPCLASS = new Captcha;
  111. $captcha = $CAPCLASS->create_captcha();
  112. $hash = $CAPCLASS->get_hash();
  113. $CAPCLASS->clear_oldcaptcha();
  114.  
  115. eval ("\$register = \"".gettemplate("register")."\";");
  116. echo $register;
  117. }
  118.  
  119. ?>


pomoże ktoś?

Ten post edytował batman 30.07.2010, 14:03:20
Powód edycji: [batman]: Proszę nie podbijać tematu, inaczej powędruje do kosza.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 04:06