summaryrefslogtreecommitdiff
path: root/data/mysql/Register.php
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-10-29 20:53:34 -0400
committerAdam <Adam@anope.org>2010-10-29 20:53:34 -0400
commita7e5d51616363214d391500b2d9d647379fba833 (patch)
tree34b6667c4277f0b7bfde7aba6d4a8a395484de98 /data/mysql/Register.php
parentb8df88a1bc19898fd2fdc46282f4264554ebfa40 (diff)
Removed the example anope_commands php code, it was removed in favor of xmlrpc
Diffstat (limited to 'data/mysql/Register.php')
-rw-r--r--data/mysql/Register.php59
1 files changed, 0 insertions, 59 deletions
diff --git a/data/mysql/Register.php b/data/mysql/Register.php
deleted file mode 100644
index 2506a6153..000000000
--- a/data/mysql/Register.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/*
- * (C) 2010 Anope Team
- * Contact us at team@anope.org
- *
- * Please read COPYING and README for furhter details.
- *
- *
- *
- */
-
-/* This is an example functional webpage showing how to use Anopes MySQL
- * Execute feature to register a nickname online
- */
-
-/* Include Anope's PHP API */
-include('Anope.php');
-
-function IsValidEmail($Email)
-{
- return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $Email);
-}
-
-if (!empty($_POST['nick']) && !empty($_POST['password1']) && !empty($_POST['password2']) && !empty($_POST['email']))
-{
- if ($_POST['password1'] != $_POST['password2'])
- {
- echo 'Passwords do not match';
- }
- else if (!IsValidEmail($_POST['email']))
- {
- echo 'Invalid email address';
- }
- else
- {
- /* Create a new connection, arguments are hostname, username, password, and database name */
- $Anope = new Anope("localhost", "anope", "anoperules", "anope");
- /* Check if we connected */
- if (!$Anope->Connected())
- {
- echo "Error connecting to MySQL database";
- }
- else
- {
- echo $Anope->Register($_POST['nick'], $_POST['password1'], $_POST['email']);
- }
- die;
- }
-}
-?>
-</br>
-<form method="post" action="Register.php">
-Nick: <input type="text" name="nick"></br>
-Password: <input type="password" name="password1"></br>
-Confirm Password: <input type="password" name="password2"></br>
-Email: <input type="text" name="email"></br>
-<input type="submit" value="Submit">
-</form>
-