Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <?php
  2. header("content-type:application/xhtml+xml; charset =utf-8", "application/xhtml+xml; charset =utf-8");
  3. include_once "common.php";
  4.  
  5.  
  6. $blogname = $_POST["blogname"];
  7. $blogdesc = $_POST["blogdesc"];
  8. $user = $_POST["user"];
  9. $password = $_POST["password"];
  10. $blogPath = getBlog($BASE_PATH,$user,md5($password)) !==false;
  11. //echo $blogPath ? "true":"false";
  12. if ((isset($_POST["password"]) and
  13. isset($_POST["user"]) and
  14. isset($_POST["blogname"]) and
  15. isset($_POST["blogdesc"]) and
  16. !$blogPath
  17. )) {
  18.  
  19. if (mkdir("$BASE_PATH/$blogname")) {
  20. createInfoFile("$BASE_PATH/$blogname", $user, $password, $blogdesc);
  21. header("Location: blog.php?nazwa=$blogname");
  22. return;
  23. }
  24. }
  25.  
  26. header("Location: createBlog.xhtml");//todo: error-handling
  27.  
  28.  
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement