すくすくゴートうちゃんのサーヴァ(黒歴史)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
464 B

  1. <?php
  2. require_once './db_connection.php';
  3. require_once './modules/user.mod.php';
  4. $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&()*+-./:;<=>?@[]^_`~';
  5. $user = new User;
  6. $user -> name = $_GET['name'];
  7. $user -> pass = implode (
  8. array_map (fn () => $chars[rand (0, strlen ($chars) - 1)], range (1, 8)));
  9. $user -> inheritance_code = implode (array_map (fn () => rand (0, 9), range (1, 12)));
  10. echo [$user -> insert () -> id];