Skocz do zawartości

damain1960

Members
  • Zawartość

    3
  • Dołączył

  • Ostatnio

Reputacja

0 Neutral

O damain1960

  • Ranga
    Przedszkolak
  1. damain1960

    Mam do oddania kilka skryptów php

    Mam do oddania klika skryptów podam jeden przykładowy: phpDolphin - Social Network Platform nie trzeba płacić, wystarczy tylko skontaktować się zemną!
  2. damain1960

    Wybór hostingu stron

    Polecam wam hosting stron hostinger. Przy okazji możecie mi pomóc rejestrując się pod tym linkiem: http://api.hostinger.pl/redir/13843372 Zalety: - Brak reklam - File manager - Pojemność: 2000 MB - Transfer: 100 GB - Możliwość posiadania 2 stron - Kreator stron - Autoinstalator skryptów - Jest za darmo Wady: - Nie zauważyłem
  3. damain1960

    [PHP] POPRAWIENIE KODU

    czy ktoś mógł by zamienić w poniższym kodzie hash na md5 kod: <?php // We check in which language we will work if (isset($_SESSION["DATAGLOBAL"][0]) && !empty($_SESSION["DATAGLOBAL"][0])) $C->LANGUAGE = $_SESSION["DATAGLOBAL"][0]; $this->load_langfile('outside/home.php'); $errored = 0; $txterror = ''; $un = $pw = $em = $captcha = ''; if (isset($_POST["em"]) && $_POST["em"] != '') $em = $this->db1->e($_POST["em"]); if (isset($_POST["un"]) && $_POST["un"] != '') $un = $this->db1->e($_POST["un"]); if (isset($_POST["pw"]) && $_POST["pw"] != '') $pw = $this->db1->e($_POST["pw"]); if (isset($_POST["cpt"]) && $_POST["cpt"] != '') $captcha = $this->db1->e($_POST["cpt"]); if (empty($un)) { $errored = 1; $txterror .= 'Error... '; } if (empty($em)) { $errored = 1; $txterror .= 'Error... '; } if (empty($pw)) { $errored = 1; $txterror .= 'Error... ';} if (empty($captcha)) { $errored = 1; $txterror .= 'Error... ';} if ($errored == 1) { echo("0: ".$txterror); } else { $errored = 0; $valcaptcha = $_SESSION['captchasum']; if ($captcha != $valcaptcha){ echo("0: ".$this->lang('home_f_signup_error9')); die(); } // verify that no files with the same name registrant username if( file_exists($C->INCPATH.'controllers/'.strtolower($un).'.php') ) { $errored = 1; $txterror = $this->lang('home_f_signup_error5'); echo("0: ".$txterror); die(); } if( file_exists($C->INCPATH.'../'.strtolower($un)) ) { $errored = 1; $txterror = $this->lang('home_f_signup_error5'); echo("0: ".$txterror); die(); } // check if someone is using this email $r = $this->db1->query("SELECT iduser FROM users WHERE email='".$em."'"); if ($this->db1->num_rows($r) > 0) { $errored = 1; $txterror = $this->lang('home_f_signup_error7'); echo("0: ".$txterror); die(); } // check if someone is using the username in users $r = $this->db1->fetch_field("SELECT count(iduser) FROM users WHERE username='".$un."'"); if ($r > 0) { $errored = 1; $txterror = $this->lang('home_f_signup_error6'); echo("0: ".$txterror); die(); } // check if someone is using the username in pages $r = $this->db1->fetch_field("SELECT idpage FROM pages WHERE url='".$un."'"); if ($r > 0) { $errored = 1; $txterror = $this->lang('home_f_signup_error6'); echo("0: ".$txterror); die(); } // check if someone is using the username in groups $r = $this->db1->fetch_field("SELECT idgroup FROM groups WHERE url='".$un."'"); if ($r > 0) { $errored = 1; $txterror = $this->lang('home_f_signup_error6'); echo("0: ".$txterror); die(); } // If no errors, continued here $salt = md5(uniqid(rand(), true)); $hash = hash('sha512', $salt.$pw); // We get a unique code to the user $code = uniqueCode(11, 1, 'users', 'code'); $ip = $this->db1->escape( ip2long($_SERVER['REMOTE_ADDR']) ); // Save user information $this->db1->query("INSERT INTO users SET code='" . $code . "', email='" . $em . "', username='" . $un . "', password='" . $hash . "', salt='" . $salt . "', registerdate='" . time() . "', ipregister='" . $ip . "'"); $this->user->login($un,$pw); echo('1: Ok'); return; } ?>
×