<?php } ?> <tr class="row"><td class="tblhead"><?php echo _t("Invites"); ?> <br /> <a href="<?php echo page("profile", "invites"); ?> ">[<?php echo _t("My invites"); ?> ]</a> </td><td align="left"><?php echo $acl->invites(); ?> </td></tr> <tr class="row"><td class="tblhead"><?php echo _t("Torrents"); ?> </td><td align="left"><a style="cursor: pointer;" class="show" rel="#seeding"><?php echo _t("Seeding") . " " . $acl->seeding(); ?> </a> / <a style="cursor: pointer;" class="show" rel="#leeching"><?php echo _t("Leeching") . " " . $acl->leeching(); ?> </a></td></tr> </table> </div>
<h4><?php echo _t("Send invite"); ?> </h4> <?php try { $acl = new Acl(USER_ID); $wpref = new Pref("website"); if ($acl->invites() == 0) { throw new Exception("Not enough invites available"); } if (isset($_POST['send'])) { try { if ($_POST['secure_input'] != $_SESSION['secure_token']) { throw new Exception("Wrong secured token"); } if (empty($_POST['email'])) { throw new Exception("missing email"); } if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) { throw new Exception("Invalid email address"); } $db = new DB("users"); $db->select("user_email = '" . $db->escape($_POST['email']) . "'"); if ($db->numRows()) { throw new Exception("Email already exist"); } $passkey = md5(uniqid(true)); $id = uniqid(true); $username = uniqid(true); $email = $_POST['email'];