<?php
- // Note: this script uses an undocumented constant in config.php named
- // REG_NOTIFY_ADDRESS - email address to send registration notifications to.
+ // This file uses two additional include files:
//
- // define('REG_NOTIFY_ADDRESS', 'my-address@domain.dom');
+ // 1) templates/register_notice.txt - displayed above the registration form
+ // 2) register_expire_do.php - contains user expiration queries when necessary
error_reporting(E_ERROR | E_WARNING | E_PARSE);
$action = $_REQUEST["action"];
- define('MAX_USERS', 55);
-
require_once "sessions.php";
require_once "sanity_check.php";
AND created < DATE_SUB(NOW(), INTERVAL 1 DAY) AND access_level = 0");
}
+ if (file_exists("register_expire_do.php")) {
+ require_once "register_expire_do.php";
+ }
+
if ($action == "check") {
header("Content-Type: application/xml");
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="utility.css">
<script type="text/javascript" src="functions.js"></script>
-<script type="text/javascript" src="prototype.js"></script>
-<script type="text/javascript" src="scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"></script>
+<script type="text/javascript" src="lib/prototype.js"></script>
+<script type="text/javascript" src="lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"></script>
</head>
<script type="text/javascript">
}
?>
-<!-- If you have any rules or ToS you'd like to display, enter them here -->
-
-
<?php if (REG_MAX_USERS > 0) {
$result = db_query($link, "SELECT COUNT(*) AS cu FROM ttrss_users");
$num_users = db_fetch_result($result, 0, "cu");
<? if (!REG_MAX_USERS || $num_users < REG_MAX_USERS) { ?>
+ <!-- If you have any rules or ToS you'd like to display, enter them here -->
+
+ <?php if (file_exists("templates/register_notice.txt")) {
+ require_once "templates/register_notice.txt";
+ } ?>
+
<? if (!$action) { ?>
<p><?php echo __('Your temporary password will be sent to the specified email. Accounts, which were not logged in once, are erased automatically 24 hours after temporary password is sent.') ?></p>
</td></tr>
</table>
</form>
-
+
+ <?php print "<p><form method=\"GET\" action=\"tt-rss.php\">
+ <input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
+ </form>"; ?>
+
<? } else if ($action == "do_register") { ?>
- <p><?php echo __('Processing registration...') ?></p>
-
<?
$login = mb_strtolower(trim(db_escape_string($_REQUEST["login"])));
$email = trim(db_escape_string($_REQUEST["email"]));
$test = trim(db_escape_string($_REQUEST["turing_test"]));
if (!$login || !$email || !$test) {
- print "<div class='error'>Please fill in the form.</div>";
- print "<p><a href='register.php'>Return to registration form</a></p>";
+ print_error(__("Your registration information is incomplete."));
+ print "<p><form method=\"GET\" action=\"tt-rss.php\">
+ <input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
+ </form>";
return;
}
$mail = new PHPMailer();
- $mail->PluginDir = "phpmailer/";
- $mail->SetLanguage("en", "phpmailer/language/");
+ $mail->PluginDir = "lib/phpmailer/";
+ $mail->SetLanguage("en", "lib/phpmailer/language/");
$mail->CharSet = "UTF-8";
$mail = new PHPMailer();
- $mail->PluginDir = "phpmailer/";
- $mail->SetLanguage("en", "phpmailer/language/");
+ $mail->PluginDir = "lib/phpmailer/";
+ $mail->SetLanguage("en", "lib/phpmailer/language/");
$mail->CharSet = "UTF-8";