]> git.wh0rd.org - tt-rss.git/blobdiff - register.php
api, also hide uncategorized if empty
[tt-rss.git] / register.php
index 8c9869a52157da6036abd49e3379ae84cd0c0c63..53627d9128d6a711defcbdb643af4a91cfe1bd3e 100644 (file)
@@ -74,7 +74,7 @@
        if ($action == "check") {
                header("Content-Type: application/xml");
 
-               $login = trim(db_escape_string($_REQUEST['login']));
+               $login = trim(db_escape_string($link, $_REQUEST['login']));
 
                $result = db_query($link, "SELECT id FROM ttrss_users WHERE
                        LOWER(login) = LOWER('$login')");
 
 <body>
 
-<div class="floatingLogo"><img src="images/logo_wide.png"></div>
+<div class="floatingLogo"><img src="images/logo_small.png"></div>
 
 <h1><?php echo __("Create new account") ?></h1>
 
+<div class="content">
+
 <?php
                if (!ENABLE_REGISTRATION) {
                        print_error(__("New user registrations are administratively disabled."));
        <?php } else if ($action == "do_register") { ?>
 
        <?php
-               $login = mb_strtolower(trim(db_escape_string($_REQUEST["login"])));
-               $email = trim(db_escape_string($_REQUEST["email"]));
-               $test = trim(db_escape_string($_REQUEST["turing_test"]));
+               $login = mb_strtolower(trim(db_escape_string($link, $_REQUEST["login"])));
+               $email = trim(db_escape_string($link, $_REQUEST["email"]));
+               $test = trim(db_escape_string($link, $_REQUEST["turing_test"]));
 
                if (!$login || !$email || !$test) {
                        print_error(__("Your registration information is incomplete."));
                                        $rc = $mail->quickMail($email, "", "Registration information for Tiny Tiny RSS", $reg_text, false);
 
                                        if (!$rc) print_error($mail->ErrorInfo);
-                                       
+
                                        unset($reg_text);
                                        unset($mail);
                                        unset($rc);
                                                "\n".
                                                "Login: $login\n".
                                                "Email: $email\n";
-                                       
-                                       
+
+
                                        $mail = new ttrssMailer();
                                        $mail->IsHTML(false);
                                        $rc = $mail->quickMail(REG_NOTIFY_ADDRESS, "", "Registration notice for Tiny Tiny RSS", $reg_text, false);
                                        if (!$rc) print_error($mail->ErrorInfo);
-                                       
+
                                        print_notice(__("Account created successfully."));
 
                                        print "<p><form method=\"GET\" action=\"index.php\">
 
 <?php } ?>
 
+       </div>
+
 </body>
 </html>