summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWushin <pasekei@gmail.com>2014-11-16 22:27:32 -0600
committerWushin <pasekei@gmail.com>2014-11-16 22:27:32 -0600
commit6f37a79665408c3531842851fc6c3efabfe50a07 (patch)
tree6e8dc2a26e61bfe6ba61af731208fc07a8b2536e
parente41baa4c3aeb5f2b05fb928c1bf13e6a9bb130a7 (diff)
parent294e5d28e70d1709520c3fbb78464edb557f638b (diff)
downloadwebsite-6f37a79665408c3531842851fc6c3efabfe50a07.tar.gz
website-6f37a79665408c3531842851fc6c3efabfe50a07.tar.bz2
website-6f37a79665408c3531842851fc6c3efabfe50a07.tar.xz
website-6f37a79665408c3531842851fc6c3efabfe50a07.zip
Merge pull request #9 from wushin/www-to-wiki
Www to wiki
-rw-r--r--.gitignore52
-rw-r--r--BingSiteAuth.xml3
-rw-r--r--README.md37
-rw-r--r--about.php49
-rw-r--r--default.css383
-rw-r--r--downloads.php75
-rw-r--r--extensions/tmwa/TMWAccount.setup.php47
-rw-r--r--extensions/tmwa/backend/libs/libladmin-db.php34
-rw-r--r--extensions/tmwa/backend/libs/libladmin.php139
-rw-r--r--extensions/tmwa/backend/libs/libtmwauth.php300
-rw-r--r--extensions/tmwa/backend/models/account.php127
-rw-r--r--extensions/tmwa/backend/models/email.php87
-rw-r--r--extensions/tmwa/backend/models/packets.php22
-rw-r--r--extensions/tmwa/frontend/TMWAccountUI.hooks.php60
-rw-r--r--extensions/tmwa/frontend/TMWAccountUI.setup.php35
-rw-r--r--extensions/tmwa/frontend/language/TMWAccount.alias.php15
-rw-r--r--extensions/tmwa/frontend/language/TMWAccount.i18n.php15
-rw-r--r--extensions/tmwa/frontend/news.php41
-rw-r--r--extensions/tmwa/frontend/registration.php106
-rw-r--r--extensions/tmwa/sql/createTables.sql20
-rw-r--r--extensions/tmwa/tmwa.php50
-rw-r--r--google7b07f9c486a184d4.html1
-rw-r--r--images/contents_bottomleft.pngbin14271 -> 0 bytes
-rw-r--r--images/contents_bottomleft_empty.pngbin804 -> 0 bytes
-rw-r--r--images/contents_bottomright.pngbin190 -> 0 bytes
-rw-r--r--images/contents_leftrepeat.pngbin184 -> 0 bytes
-rw-r--r--images/contents_rightrepeat.pngbin175 -> 0 bytes
-rw-r--r--images/contents_topleft.pngbin2175 -> 0 bytes
-rw-r--r--images/contents_topright.pngbin185 -> 0 bytes
-rw-r--r--images/ico-android.pngbin212 -> 0 bytes
-rw-r--r--images/ico-deb.pngbin389 -> 0 bytes
-rw-r--r--images/ico-fedora.pngbin930 -> 0 bytes
-rw-r--r--images/ico-freebsd.pngbin3638 -> 0 bytes
-rw-r--r--images/ico-gentoo.pngbin874 -> 0 bytes
-rw-r--r--images/ico-openbsd.pngbin4710 -> 0 bytes
-rw-r--r--images/ico-osx.pngbin365 -> 0 bytes
-rw-r--r--images/ico-slackware.pngbin890 -> 0 bytes
-rw-r--r--images/ico-src.pngbin742 -> 0 bytes
-rw-r--r--images/ico-tux.pngbin413 -> 0 bytes
-rw-r--r--images/ico-ubuntu.pngbin905 -> 0 bytes
-rw-r--r--images/ico-win.pngbin448 -> 0 bytes
-rw-r--r--images/main_bottomright.pngbin688 -> 0 bytes
-rw-r--r--images/main_rightrepeat.pngbin234 -> 0 bytes
-rw-r--r--images/main_title_bottomright.pngbin432 -> 0 bytes
-rw-r--r--images/main_title_topleft.pngbin1630 -> 0 bytes
-rw-r--r--images/main_title_topright.pngbin594 -> 0 bytes
-rw-r--r--images/main_topleft.pngbin1706 -> 0 bytes
-rw-r--r--images/main_topright.pngbin358 -> 0 bytes
-rw-r--r--images/section_bottomleft.pngbin332 -> 0 bytes
-rw-r--r--images/section_bottomright.pngbin304 -> 0 bytes
-rw-r--r--images/section_topleft.pngbin963 -> 0 bytes
-rw-r--r--images/section_topright.pngbin342 -> 0 bytes
-rw-r--r--includes/common.php170
-rw-r--r--includes/conf/mysql.conf.php.example8
-rw-r--r--includes/email.php63
-rwxr-xr-xincludes/fetch-news.sh8
-rw-r--r--includes/libs/libmysql.php89
-rw-r--r--includes/libs/libstrutils.php10
-rw-r--r--includes/models/account.php114
-rw-r--r--includes/news.php24
-rw-r--r--index.php17
-rw-r--r--news-feed.php7
-rw-r--r--recaptcha-php/LICENSE22
-rw-r--r--recaptcha-php/README7
-rw-r--r--recaptcha-php/example-captcha.php37
-rw-r--r--recaptcha-php/example-mailhide.php17
-rw-r--r--recaptcha-php/keys.php.example5
-rw-r--r--recaptcha-php/recaptchalib.php279
-rw-r--r--registration.php155
-rw-r--r--robots.txt34
-rw-r--r--sitemap.xml92
-rw-r--r--sql/createTables.sql13
-rw-r--r--thank_you.php11
73 files changed, 1296 insertions, 1584 deletions
diff --git a/.gitignore b/.gitignore
index 5f69a57..604a446 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,54 @@
# symlink to the update server
/news.html
# generated, I think
-/images/thumbs
+/images/
+api.php
+img_auth.php
+includes
+index.php
+languages
+load.php
+maintenance
+opensearch_desc.php
+profileinfo.php
+redirect.php
+redirect.phtml
+resources
+skins
+thumb_handler.php
+thumb.php
+wiki.phtml
+cache/
+extensions/CategoryTree
+extensions/Cite
+extensions/ConfirmAccount.old/
+extensions/ConfirmAccount/
+extensions/ConfirmEdit/
+extensions/CreateBox
+extensions/FootNote
+extensions/Gadgets/
+extensions/ImageMap
+extensions/InputBox
+extensions/Interwiki
+extensions/LanguageSelector
+extensions/NewUserNotif
+extensions/NewestPages
+extensions/News
+extensions/Nuke/
+extensions/PageCSS
+extensions/ParserFunctions/
+extensions/Poem
+extensions/Polyglot
+extensions/README
+extensions/RSS_Reader
+extensions/Renameuser/
+extensions/SyntaxHighlight_GeSHi/
+extensions/UGA/
+extensions/Vector/
+extensions/WikiArticleFeeds/
+extensions/WikiEditor/
+extensions/googleAnalytics/
+LocalSettings.php
+*.swp
+favicon.ico
+config.php
diff --git a/BingSiteAuth.xml b/BingSiteAuth.xml
new file mode 100644
index 0000000..6fb28f5
--- /dev/null
+++ b/BingSiteAuth.xml
@@ -0,0 +1,3 @@
+<users>
+ <user>1845AA1B17EEFA3CAE8B6C429BF856B0</user>
+</users>
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..bf39afa
--- /dev/null
+++ b/README.md
@@ -0,0 +1,37 @@
+themanaworld-website
+====================
+
+The website is a extention for mediawiki.
+
+Add to LocalSettings.php:
+require_once("$IP/extensions/tmwa/tmwa.php");
+
+Configuration Variables / Settings:
+
+Account registrations come from:
+$wgTMWAccountEmail = "validemail@domain.com";
+
+Set News Site path:
+$wgTMWNews = "$IP/news.html";
+
+To use Wiki's DB Backend:
+$wgTMWAccountLib = 'dbLadmin';
+
+To use php Ladmin connection:
+$wgTMWAccountLib = 'phpLadmin';
+$wgLadminHost = '127.0.0.1';
+$wgLadminPort = '6901';
+
+Create a new php.ini entry:
+[tmwa]
+tmwa.cfg.LADMIN_PASS = "admin";
+
+(A restart of webserver or php-fpm is needed)
+
+To use TMW as Auth services for Wiki
+$wgAuth = new TMWAuth();
+
+Depends:
+* ConfirmEdit
+* ConfirmAccount
+* CaptchaEnabled
diff --git a/about.php b/about.php
deleted file mode 100644
index 63c0743..0000000
--- a/about.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
- include("includes/common.php");
- placeHeader("About");
-?>
-
-<h3>Description</h3>
-<p>The Mana World (TMW) is a serious effort to create an innovative free and
-open source MMORPG. TMW uses 2D graphics and aims to create a large and diverse
-interactive world. It is licensed under the GPL, making sure this game can't
-ever run away from you.
-
-
-<p>Explore this large, ever expanding world to defeat monsters, help NPCs and team up
-with friends as you achieve your goals. Get your weapons, armor and equipment
-through quests, monsters or crafting. Play mini-games, go on complex investigations
-or slay powerful bosses. Hang out in town, socialize or attend player organized events.
-
-Wear your boots and grab your sword, adventure waits for you!
-
-<h3>Story</h3>
-<p>Start in the powerful city-state of Tulimshar before heading out into the vast expanses
-of the desert. Get powerful and explore the small continent of Argaes where magic is
-born. In The Mana World you are an adventurer and monster slayer defending the people
-of the world from the threats created during the Great Quake. Even in the icy heights of
-Nivalis there is a call for your assistance to keep the world safe and to grow your
-potential.
-
-<p>The Mage Council of Tulimshar has monitored events following the Great Quake and feel
-that something ominous is spreading throughout The Mana World. Monsters seem to of
-come out of every shadowy corner and petty dieties has begun to make presence in
-dark places. The council has made the call and you are just one of the many people
-that will battle the forces of evil, sending them back to the depths they came from.
-
-<p>Be it warrior, archer or mage, you have answered the call from the leaders of the
-world to fight back the darkness that spread after the Great Quake. Starting in
-the Tonori desert, you battle your way to forests surrounding Hurnscald or the icy
-mountains surrounding Nivalis. Monsters have nowhere to hide.
-
-<h3>Contributors</h3>
-<p>We are volunteer driven and encourage player participation in development. We have
-a long history of contributors. We try to make contributing to the game easy.
-<br>
-<br><a href="https://wiki.themanaworld.org/index.php/Joining_the_project">Get Involved!</a>
-<br><a href="https://wiki.themanaworld.org/index.php/Developers">Current Contributors</a>
-<br><a href="https://wiki.themanaworld.org/index.php/Contributors">Past Contributors</a>
-
-<?php
- placeFooter();
-?>
diff --git a/default.css b/default.css
deleted file mode 100644
index 42bbdef..0000000
--- a/default.css
+++ /dev/null
@@ -1,383 +0,0 @@
-body {
- background-color: #eeeeee;
- margin: 0px;
- font-family: sans-serif;
-}
-
-a {
- text-decoration: none;
- color: rgb(100,10,10);
-}
-
-a:visited {
- color: rgb(60,0,0);
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-hr {
- border-style: none;
- height: 1px;
- background-color: silver;
- color: silver;
-}
-
-body, div, p, td, li, h1, h2, h3, h4 {
- font-family: sans-serif;
- font-size: 10pt;
-}
-
-h1 {
- background-image: url(images/header.png);
- background-repeat: no-repeat;
- position: absolute;
- width: 543px;
- height: 210px;
- margin: 0px;
- top: 0px;
- border: 0px solid green;
-}
-
-#page {
- margin-right: 10%;
- min-width: 650px;
-}
-
-#page h1 span {
- display: none;
-}
-
-#irc_info {
- font-size: 8pt;
- text-align: right;
- height: 45px;
- margin-top: 120px;
- margin-right: 4px;
-}
-
-#main_topleft {
- border: 0px dashed green;
- background-image: url(images/main_topleft.png);
- background-position: top left;
- background-repeat: no-repeat;
-}
-
-#main_rightrepeat {
- margin-left: 98px;
- background-image: url(images/main_rightrepeat.png);
- background-position: right;
- background-repeat: repeat-y;
-
- /* A one pixel padding to make IE render correctly
- (the underscore is a hack to make only IE 5-6 see it) */
- _padding-bottom: 1px;
-}
-
-#main_topright {
- background-image: url(images/main_topright.png);
- background-position: top right;
- background-repeat: no-repeat;
-}
-
-#main_bottomright {
- background-image: url(images/main_bottomright.png);
- background-position: bottom right;
- background-repeat: no-repeat;
-}
-
-#main {
- border: 0px dashed purple;
- padding: 0px 4px 0px 0px;
-}
-
-#main .main_title_topright {
- background-image: url(images/main_title_topright.png);
- background-position: top right;
- background-repeat: no-repeat;
- background-color: #f2ebe7;
- margin: 0px 0px 20px -9px;
-}
-
-#main .main_title_bottomright {
- background-image: url(images/main_title_bottomright.png);
- background-position: bottom right;
- background-repeat: no-repeat;
-
- /* A one pixel padding to make IE render correctly
- (the underscore is a hack to make only IE 5-6 see it) */
- _padding-bottom: 1px;
-}
-
-#main .main_title_topleft {
- background-image: url(images/main_title_topleft.png);
- background-repeat: no-repeat;
-}
-
-#main h2 {
- padding: 7px 7px 7px 107px;
- margin: 0px;
- color: #57565c;
- font-size: 16pt;
-}
-
-#main h3 {
- margin: 20px 0px 0px 0px;
- font-weight: bold;
- color: #3c3c3c;
- border-bottom: 1px solid #9f9894;
- /*
- border-right: 1px solid #9f9894;
- border-top: 1px solid #f2e6df;
- border-left: 1px solid #f2e6df;
- */
- font-size: 12pt;
- /*
- background-color: #d1c7c0;
- padding: 2px 5px 2px 5px;
- */
-}
-
-#sidebar {
- border: 0px dashed red;
- float: right;
- width: 170px;
- padding-top: 2px;
-}
-
-#sidebar .section {
- padding: 7px;
-}
-
-#sidebar .section h3 {
- text-align: center;
- font-weight: bold;
- font-size: 8pt;
- margin: 0px 0px 50px 0px;
- padding: 0px;
- border-width: 0px;
- color: #2f2e32;
-}
-
-#sidebar .section_topleft {
- margin: 10px;
- background-image: url(images/section_topleft.png);
- background-position: top left;
- background-repeat: no-repeat;
- background-color: #cba083;
-
- /* A one pixel padding to make IE render correctly
- (the underscore is a hack to make only IE 5-6 see it) */
- _padding-bottom: 1px;
-}
-
-#sidebar .section_bottomleft {
- background-image: url(images/section_bottomleft.png);
- background-position: bottom left;
- background-repeat: no-repeat;
-}
-
-#sidebar .section_topright {
- background-image: url(images/section_topright.png);
- background-position: top right;
- background-repeat: no-repeat;
-}
-
-#sidebar .section_bottomright {
- background-image: url(images/section_bottomright.png);
- background-position: bottom right;
- background-repeat: no-repeat;
-}
-
-#sidebar .section ul {
- margin: 0px;
- padding: 0px;
-}
-
-#sidebar .section li {
- list-style: none;
- margin: 0px;
-}
-
-#sidebar .section li a {
- font-size: 12px;
- display: block;
- margin: 0px;
- width: auto;
- border: 1px solid #cba083;
- text-decoration: none;
- padding: 5px 5px 5px 20px;
- margin: 0px;
- color: black;
- font-style: normal;
- font-weight: bold;
- color: #2f2e32;
-
- /* Setting a background color fixes a strange hover issue with IE 7 */
- background-color: #cba083;
-}
-
-#sidebar .section li a:hover {
- border: 1px solid #78584c;
- background-color: #dbbba4;
-}
-
-#sidebar .banners {
- text-align: center;
- padding: 13px 7px 8px 7px;
-}
-
-#sidebar .banners img {
- border-width: 0px;
- margin-bottom: 5px;
- vertical-align: text-bottom;
-}
-
-#contents_leftrepeat {
- background-image: url(images/contents_leftrepeat.png);
- background-repeat: repeat-y;
- background-color: #e1d6cf;
- margin: 0px 170px 0px 0px;
-}
-
-#contents_topleft {
- background-image: url(images/contents_topleft.png);
- background-repeat: no-repeat;
- border: 0px dashed red;
-}
-
-#contents_bottomleft {
- background-image: url(images/contents_bottomleft.png);
- background-position: bottom left;
- background-repeat: no-repeat;
-}
-
-#contents_rightrepeat {
- background-image: url(images/contents_rightrepeat.png);
- background-position: right;
- background-repeat: repeat-y;
-}
-
-#contents_topright {
- background-image: url(images/contents_topright.png);
- background-position: top right;
- background-repeat: no-repeat;
-}
-
-#contents_bottomright {
- background-image: url(images/contents_bottomright.png);
- background-position: bottom right;
- background-repeat: no-repeat;
-}
-
-#contents {
- padding: 12px 8px 175px 21px;
- border: 0px solid blue;
- line-height: 150%;
-}
-
-#contents p, table, pre {
- margin: 0px 40px 5px 30px;
-}
-
-#contents h4 {
- margin-left: 30px;
- margin-bottom: 0px;
-}
-
-#contents ul {
- margin: 0px 40px 0px 20px;
-}
-
-#contents table {
- border-top: 1px solid #9f9894;
- border-bottom: 1px solid #9f9894;
-}
-
-#contents td {
- border-bottom: 1px dotted #9f9894;
- padding: 3px 10px 3px 3px;
-}
-
-#contents tr.last td {
- border-width: 0px;
-}
-
-#footer {
- font-size: 8pt;
- text-align: right;
- padding: 5px;
-}
-
-.news {
- margin-bottom: 30px;
-}
-
-.news_body {
-}
-
-.news_date {
- font-style: italic;
- float: right;
- color: #57565c;
- font-size: 8pt;
-}
-
-.news_author {
- font-size: 8pt;
- color: #57565c;
- border-bottom: 1px solid #9f9894;
-}
-
-.releases {
- margin: 15px 40px 15px 30px;
-}
-
-.release {
- background-color: #ede2da;
- margin: 5px;
- padding: 5px 5px 5px 15px;
- white-space: nowrap;
- border-radius: 10px;
-}
-
-.releases img {
- vertical-align: middle;
- margin-right: 5px;
- width: 16px;
- height: 16px;
-}
-
-div.read-more {
- text-align:right;
-}
-
-a.more {
- display: block;
- margin: 0px;
- width: auto;
- padding: 5px 5px 5px 20px;
- margin: 0px;
- color: black;
- font-style: normal;
- font-weight: bold;
- color: #2f2e32;
-}
-
-/* Gallery style */
-#pagenumbers {
- text-align: center;
- margin: 0px 1em 0px 1em;
-}
-
-#pictures a img {
- border: 1px solid #c7b1a3;
- border-bottom-width: 2px;
- border-right-width: 2px;
- margin: 5px;
-}
-
-#pictures a:hover img {
- border-color: #a88976;
-}
diff --git a/downloads.php b/downloads.php
deleted file mode 100644
index 561153b..0000000
--- a/downloads.php
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
- include("includes/common.php");
- placeHeader("Downloads");
-?>
-
-<div style="background-color: rgb(255,220,220); border: 1px solid rgb(240,150,150); padding: 5px; margin: 5px; border-radius: 10px;">
-<b>Notice:</b> For the registration of new accounts please use the <a href="registration.php"> web form</a>. The registration from within the client is disabled.
-</div>
-
-<h3>ManaPlus client</h3>
-<p>The recommended client is available on the <a href="http://manaplus.evolonline.org/">ManaPlus website</a>.</p>
-
-<h3>The Mana World packages</h3>
-
-<p>The Mana World packages are available for many platforms. These are based on
- the ManaPlus client, but have a different default skin and will show up
- as "The Mana World" in the application menu.</p>
-
-<table style="border-width: 0px; width: 50%; margin-bottom: 0px; margin-top: 0px;" border="0" cellpadding="0" cellspacing="0">
-<tbody><tr><td style="border-width: 0px;" width="50%">
-
-<div class="release"><img src="images/ico-win.png"> <a href="http://download.evolonline.org/manaplus/tmw/tmw-win32.exe"><b>Windows installer (ManaPlus)</b></a></div>
-<div class="release"><img src="images/ico-osx.png"> <a href="http://download3.evolonline.org/manaplus/macosx/manaplus-lion.dmg"><b>ManaPlus MacOS X package (lion)</b></a></div>
-<div class="release"><img src="images/ico-osx.png"> <a href="http://download3.evolonline.org/manaplus/macosx/manaplus-snowleopard.dmg"><b>ManaPlus MacOS X package (snow leopard)</b></a></div>
-<div class="release"><img src="images/ico-deb.png"> <a href="http://packages.debian.org/manaplus"><b>Debian package</b></a></div>
-<div class="release"><img src="images/ico-ubuntu.png"> <a href="http://packages.ubuntu.com/manaplus"><b>Ubuntu package</b></a></div>
-<div class="release"><img src="images/ico-fedora.png"> <a href="https://apps.fedoraproject.org/packages/manaplus"><b>Fedora package</b></a></div>
-<div class="release"><img src="images/ico-android.png"> <a href="https://play.google.com/store/apps/details?id=org.evolonline.beta.manaplus"><b>Android App (ManaPlus)</b></a></div>
-<div class="release"><img src="images/ico-gentoo.png"> <a href="http://packages.gentoo.org/package/games-rpg/manaplus"><b>Gentoo eBuild</b></a></div>
-<div class="release"><img src="images/ico-openbsd.png" width="16" height="16"> <a href="http://openports.se/games/manaplus"><b>OpenBSD port</b></a></div>
-<div class="release"><img src="images/ico-freebsd.png" width="16" height="16"> <a href="http://www.freshports.org/games/manaplus/"><b>FreeBSD port</b></a></div>
-
-</td></tr>
-</tbody></table>
-
-<p>For packagers (or for users who're interested), the branding files can be
- downloaded separately:</p>
-
-<table style="border-width: 0px; width: 50%; margin-bottom: 0px; margin-top: 0px;" border="0" cellpadding="0" cellspacing="0">
-<tbody><tr><td style="border-width: 0px;" width="50%">
-<div class="release"><img src="images/ico-src.png"> <a href="http://sourceforge.net/projects/themanaworld/files/tmw-branding/tmw-branding-20120727.tar.gz/download"><b>Branding files</b> 2012-07-27</a></div>
-</td></tr>
-</tbody></table>
-
-<p>For older versions please see our <a href="https://sourceforge.net/projects/themanaworld/files/">files
-page</a> on SourceForge. Note however that these releases are no longer supported and
-likely to no longer work with our server.</p>
-
-<h3>Music</h3>
-
-<p>We no longer recommend music be installed directly,
-as it easily becomes out-of-date.</p>
-<p>To enable music in the client, make sure that "Download Music" is checked
-in the Audio tab of the Setup window.</p>
-
-<h3>Development versions</h3>
-
-<p>The latest version of the ManaPlus client is developed as part of the
-<a href="http://manaplus.evolonline.org/">ManaPlus project</a> and is available from the
-<a href="https://gitorious.org/manaplus/manaplus/">Git repositories on gitorious</a>. For
-checking out the latest development version of the client you can use the
-command:</p>
-
-<pre>
-git clone git://gitorious.org/manaplus/manaplus.git
-</pre>
-
-<p>For more instructions and information about other projects like the server
-and the dynamic data, please check our
-<a href="http://wiki.themanaworld.org/index.php/Git_repository">Git wiki
-page</a>.
-
-<?php
- placeFooter();
-?>
diff --git a/extensions/tmwa/TMWAccount.setup.php b/extensions/tmwa/TMWAccount.setup.php
new file mode 100644
index 0000000..a42b0fa
--- /dev/null
+++ b/extensions/tmwa/TMWAccount.setup.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Class containing basic setup functions.
+ */
+class TMWAccountSetup {
+ /**
+ * Register source code paths.
+ * This function must NOT depend on any config vars.
+ *
+ * @param $classes Array $classes
+ * @param $messagesFiles Array $messagesFiles
+ * @return void
+ */
+ public static function defineSourcePaths( array &$classes, array &$messagesFiles ) {
+ $dir = dirname( __FILE__ );
+
+ # Basic directory layout
+ $backendDir = "$dir/backend";
+ $frontendDir = "$dir/frontend";
+ $langDir = "$dir/frontend/language/";
+
+ # Main i18n file and special page alias file
+ $messagesFiles['TMWAccount'] = "$langDir/TMWAccount.i18n.php";
+ $messagesFiles['TMWAccountAliases'] = "$langDir/TMWAccount.alias.php";
+
+ # UI setup class
+ $classes['TMWAccountUISetup'] = "$frontendDir/TMWAccountUI.setup.php";
+ # UI event handler classes
+ $classes['TMWAccountUIHooks'] = "$frontendDir/TMWAccountUI.hooks.php";
+
+ # UI to request an account
+ $classes['GameAccountPage'] = "$frontendDir/registration.php";
+ $classes['GameNewsPage'] = "$frontendDir/news.php";
+
+ # Utility Models
+ $classes['TMWA'] = "$backendDir/models/packets.php";
+ $classes['TMWAccount'] = "$backendDir/models/account.php";
+ $classes['TMWMail'] = "$backendDir/models/email.php";
+
+ # Ladmin Class
+ $classes['phpLadmin'] = "$backendDir/libs/libladmin.php";
+ $classes['dbLadmin'] = "$backendDir/libs/libladmin-db.php";
+
+ # TMW to Wiki Auth / Accounts Modules
+ $classes['TMWAuth'] = "$backendDir/libs/libtmwauth.php";
+ }
+}
diff --git a/extensions/tmwa/backend/libs/libladmin-db.php b/extensions/tmwa/backend/libs/libladmin-db.php
new file mode 100644
index 0000000..2b1ba9b
--- /dev/null
+++ b/extensions/tmwa/backend/libs/libladmin-db.php
@@ -0,0 +1,34 @@
+<?php
+/*
+dbLadmin by wushin AGPL
+*/
+
+class dbLadmin {
+
+ public function __construct() {
+ $this->socket = True;
+ }
+
+ public function account_exists($username) {
+ $dbr = wfGetDB(DB_SLAVE);
+ $res = $dbr->select('tmw_accounts', array('USERNAME'), 'USERNAME = "'.$username.'"', __METHOD__, array());
+ foreach ($res as $row) {
+ return True;
+ }
+ return False;
+ }
+
+ public function create_account($username, $userpass, $sex, $email) {
+ $dbw = wfGetDB(DB_MASTER);
+ $dbw->insert('tmw_accounts', array('USERNAME' => $username, 'PASSWORD' => $userpass, 'GENDER' => $sex, 'EMAIL' => $email), __METHOD__, 'IGNORE');
+ if ( $dbw->affectedRows() ) {
+ return True;
+ } else {
+ return False;
+ }
+ }
+
+ public function close() {
+ return True;
+ }
+}
diff --git a/extensions/tmwa/backend/libs/libladmin.php b/extensions/tmwa/backend/libs/libladmin.php
new file mode 100644
index 0000000..698e898
--- /dev/null
+++ b/extensions/tmwa/backend/libs/libladmin.php
@@ -0,0 +1,139 @@
+<?php
+/*
+phpLadmin by wushin AGPL
+*/
+ob_implicit_flush();
+
+class phpLadmin {
+
+ public function __construct() {
+ global $wgLadminHost,$wgLadminPort,$wgLadminPass;
+ $tmwa = new TMWA();
+ $this->packets = $tmwa->packets;
+
+ $address = gethostbyname($wgLadminHost);
+ $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+ socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => 5, 'usec' => 0));
+ socket_set_option($socket, SOL_SOCKET, SO_SNDTIMEO, array('sec' => 5, 'usec' => 0));
+ if ($socket === False) {
+ $this->socket = False;
+ return False;
+ }
+ if(socket_connect($socket, $address, $wgLadminPort)) {
+ $this->socket = $socket;
+ if (self::admin_login()) {
+ return True;
+ }
+ }
+ $this->socket = False;
+ return False;
+ }
+
+ private function ladmin_sendrecv($packet_data) {
+ $packet_send = '';
+ foreach ($this->packets[$packet_data['packet']]['packet'] as $pack_name => $pack_item) {
+ $packet_send .= pack($pack_item, $packet_data[$pack_name]);
+ }
+ socket_write($this->socket, $packet_send);
+ $packet_send = '';
+ socket_recv($this->socket, $packet_pack, 2, MSG_PEEK);
+ $packet_recv = unpack('vpacket/', $packet_pack);
+ socket_recv($this->socket, $packet_pack, $this->packets[$packet_recv['packet']]['len'], MSG_DONTWAIT);
+ $unpack_payload = '';
+ foreach ($this->packets[$packet_recv['packet']]['packet'] as $pack_name => $pack_item) {
+ $unpack_payload .= $pack_item.$pack_name.'/';
+ }
+ $payload_recv = unpack($unpack_payload, $packet_pack);
+ return $payload_recv;
+ }
+
+ private function admin_login() {
+ // Admin Login
+ $login_response = self::ladmin_sendrecv(array('packet' => 0x7918, 'encryption_zero' => 0,'account_pass' => get_cfg_var("tmwa.cfg.LADMIN_PASS")));
+ if($login_response['error'] != 0) {
+ return False;
+ }
+ return self::login_version();
+ }
+
+ private function login_version() {
+ // Login version
+ $packet_data['packet'] = 0x7530;
+ return self::ladmin_sendrecv($packet_data);
+ }
+
+ private function add_account($args) {
+ // Add Account
+ $packet_data['packet'] = 0x7930;
+ $user_check = self::ladmin_sendrecv(array_merge($packet_data, $args));
+ return ($user_check['account_id'] > 0 ? True : False);
+ }
+
+ private function check_password($args) {
+ // Check Password
+ $packet_data['packet'] = 0x793a;
+ $user_check = self::ladmin_sendrecv(array_merge($packet_data, $args));
+ return ($user_check['account_id'] > 0 ? True : False);
+ }
+
+ private function who_account($args) {
+ // Who Account
+ $packet_data['packet'] = 0x7952;
+ return self::ladmin_sendrecv(array_merge($packet_data, $args));
+ }
+
+ private function change_password($args) {
+ // Change Password
+ $packet_data['packet'] = 0x7934;
+ $pass_result = self::ladmin_sendrecv(array_merge($packet_data, $args));
+ return ($pass_result['account_id'] > 0 ? True : False);
+ }
+
+ public function close() {
+ socket_close($this->socket);
+ }
+
+ public function account_info($username) {
+ $args = array('account_name' => $username);
+ $account_info = self::who_account($args);
+ return $account_info;
+ }
+
+ public function account_exists($username) {
+ $args = array('account_name' => $username);
+ $user_name_exists = self::who_account($args);
+ return ($user_name_exists['account_id'] > 0 ? True : False);
+ }
+
+ public function check_auth($username, $userpass) {
+ $args = array('account_name' => $username, 'account_password' => $userpass);
+ return self::check_password($args);
+ }
+
+ public function check_ban($username) {
+ $account_info = self::account_info($username);
+ if ($account_info['state'] > 0) {
+ return True;
+ } elseif ($account_info['ban_until'] > 0) {
+ return True;
+ }
+ return False;
+ }
+
+ public function change_pass($username, $userpass) {
+ $args = array('account_name' => $username, 'account_password' => $userpass);
+ return self::change_password($args);
+ }
+
+ public function reset_password($username, $userpass, $newuserpass) {
+ $args = array('account_name' => $username, 'account_password' => $userpass);
+ $user_check = self::check_password($args);
+ return ($user_check ? self::change_pass($username, $newuserpass) : False);
+ }
+
+ public function create_account($username, $userpass, $sex, $email) {
+ $user_name_exists = self::account_exists($username);
+ $args = array('account_name' => $username, 'account_password' => $userpass, 'sex' => $sex, 'email' => $email);
+ return (!$user_name_exists ? self::add_account($args) : False);
+ }
+}
diff --git a/extensions/tmwa/backend/libs/libtmwauth.php b/extensions/tmwa/backend/libs/libtmwauth.php
new file mode 100644
index 0000000..33a4331
--- /dev/null
+++ b/extensions/tmwa/backend/libs/libtmwauth.php
@@ -0,0 +1,300 @@
+<?php
+/**
+ * Tmw Auth Interface (Requires Ladmin socket) by wushin
+ * Based on mediawiki AuthPlugin
+ *
+ * Copyright © 2004 Brion Vibber <brion@pobox.com>
+ * http://www.mediawiki.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * Authentication plugin interface. Instantiate a subclass of AuthPlugin
+ * and set $wgAuth to it to authenticate against some external tool.
+ *
+ * The default behavior is not to do anything, and use the local user
+ * database for all authentication. A subclass can require that all
+ * accounts authenticate externally, or use it only as a fallback; also
+ * you can transparently create internal wiki accounts the first time
+ * someone logs in who can be authenticated externally.
+ */
+class TMWAuth extends AuthPlugin {
+ /**
+ * Check whether there exists a user account with the given name.
+ * The name will be normalized to MediaWiki's requirements, so
+ * you might need to munge it (for instance, for lowercase initial
+ * letters).
+ *
+ * @param $username String: username.
+ * @return bool
+ */
+ public function userExists( $username ) {
+ global $wgTMWAccountLib;
+ $ladmin = New $wgTMWAccountLib();
+ $user_exists = ($ladmin->check_ban($username, $password) ? False : $ladmin->check_auth($username, $password));
+ $ladmin->close();
+ return $user_exists;
+ }
+
+ /**
+ * Check if a username+password pair is a valid login.
+ * The name will be normalized to MediaWiki's requirements, so
+ * you might need to munge it (for instance, for lowercase initial
+ * letters).
+ *
+ * @param $username String: username.
+ * @param $password String: user password.
+ * @return bool
+ */
+ public function authenticate( $username, $password ) {
+ global $wgTMWAccountLib;
+ $ladmin = New $wgTMWAccountLib();
+ $auth_result = $ladmin->check_auth($username, $password);
+ $ladmin->close();
+ return $auth_result;
+ }
+
+ /**
+ * Modify options in the login template.
+ *
+ * @param $template UserLoginTemplate object.
+ * @param $type String 'signup' or 'login'. Added in 1.16.
+ */
+ public function modifyUITemplate( &$template, &$type ) {
+ $template->set( 'usedomain', False );
+ }
+
+ /**
+ * Set the domain this plugin is supposed to use when authenticating.
+ *
+ * @param $domain String: authentication domain.
+ */
+ public function setDomain( $domain ) {
+ $this->domain = $domain;
+ }
+
+ /**
+ * Check to see if the specific domain is a valid domain.
+ *
+ * @param $domain String: authentication domain.
+ * @return bool
+ */
+ public function validDomain( $domain ) {
+ # Override this!
+ return True;
+ }
+
+ /**
+ * When a user logs in, optionally fill in preferences and such.
+ * For instance, you might pull the email address or real name from the
+ * external user database.
+ *
+ * The User object is passed by reference so it can be modified; don't
+ * forget the & on your function declaration.
+ *
+ * @param $user User object
+ */
+ public function updateUser( &$user ) {
+ # Override this and do something
+ return True;
+ }
+
+ /**
+ * Return True if the wiki should create a new local account automatically
+ * when asked to login a user who doesn't exist locally but does in the
+ * external auth database.
+ *
+ * If you don't automatically create accounts, you must still create
+ * accounts in some way. It's not possible to authenticate without
+ * a local account.
+ *
+ * This is just a question, and shouldn't perform any actions.
+ *
+ * @return Boolean
+ */
+ public function autoCreate() {
+ return True;
+ }
+
+ /**
+ * Allow a property change? Properties are the same as preferences
+ * and use the same keys. 'Realname' 'Emailaddress' and 'Nickname'
+ * all reference this.
+ *
+ * @param $prop string
+ *
+ * @return Boolean
+ */
+ public function allowPropChange( $prop = '' ) {
+ if ( $prop == 'realname' && is_callable( array( $this, 'allowRealNameChange' ) ) ) {
+ return $this->allowRealNameChange();
+ } elseif ( $prop == 'emailaddress' && is_callable( array( $this, 'allowEmailChange' ) ) ) {
+ return $this->allowEmailChange();
+ } elseif ( $prop == 'nickname' && is_callable( array( $this, 'allowNickChange' ) ) ) {
+ return $this->allowNickChange();
+ } else {
+ return True;
+ }
+ }
+
+ /**
+ * Can users change their passwords?
+ *
+ * @return bool
+ */
+ public function allowPasswordChange() {
+ return True;
+ }
+
+ /**
+ * Should MediaWiki store passwords in its local database?
+ *
+ * @return bool
+ */
+ public function allowSetLocalPassword() {
+ return True;
+ }
+
+ /**
+ * Set the given password in the authentication database.
+ * As a special case, the password may be set to null to request
+ * locking the password to an unusable value, with the expectation
+ * that it will be set later through a mail reset or other method.
+ *
+ * Return True if successful.
+ *
+ * @param $user User object.
+ * @param $password String: password.
+ * @return bool
+ */
+ public function setPassword( $user, $password ) {
+ global $wgTMWAccountLib;
+ $ladmin = New $wgTMWAccountLib();
+ $set_pass_res = $ladmin->change_pass($user, $password);
+ $ladmin->close();
+ return $set_pass_res;
+ }
+
+ /**
+ * Update user information in the external authentication database.
+ * Return True if successful.
+ *
+ * @param $user User object.
+ * @return Boolean
+ */
+ public function updateExternalDB( $user ) {
+ return False;
+ }
+
+ /**
+ * Check to see if external accounts can be created.
+ * Return True if external accounts can be created.
+ * @return Boolean
+ */
+ public function canCreateAccounts() {
+ return True;
+ }
+
+ /**
+ * Add a user to the external authentication database.
+ * Return True if successful.
+ *
+ * @param $user User: only the name should be assumed valid at this point
+ * @param $password String
+ * @param $email String
+ * @param $realname String
+ * @return Boolean
+ */
+ public function addUser( $user, $password, $email = '', $realname = '' ) {
+ global $wgTMWAccountLib;
+ // Gender is currently hard set
+ $sex = 'M';
+ $ladmin = New $wgTMWAccountLib();
+ $add_user_res = $ladmin->create_account($user, $password, $sex, $email);
+ $ladmin->close();
+ return $add_user_res;
+ }
+
+ /**
+ * Return True to prevent logins that don't authenticate here from being
+ * checked against the local database's password fields.
+ *
+ * This is just a question, and shouldn't perform any actions.
+ *
+ * @return Boolean
+ */
+ public function strict() {
+ return False;
+ }
+
+ /**
+ * Check if a user should authenticate locally if the global authentication fails.
+ * If either this or strict() returns True, local authentication is not used.
+ *
+ * @param $username String: username.
+ * @return Boolean
+ */
+ public function strictUserAuth( $username ) {
+ return False;
+ }
+
+ /**
+ * When creating a user account, optionally fill in preferences and such.
+ * For instance, you might pull the email address or real name from the
+ * external user database.
+ *
+ * The User object is passed by reference so it can be modified; don't
+ * forget the & on your function declaration.
+ *
+ * @param $user User object.
+ * @param $autocreate Boolean: True if user is being autocreated on login
+ */
+ public function initUser( &$user, $autocreate = False ) {
+ # Override this to do something.
+ }
+
+ /**
+ * If you want to munge the case of an account name before the final
+ * check, now is your chance.
+ */
+ public function getCanonicalName( $username ) {
+ return ucwords(strtolower($username));
+ }
+
+ /**
+ * Get an instance of a User object
+ *
+ * @param $user User
+ *
+ * @return AuthPluginUser
+ */
+ public function getUserInstance( User &$user ) {
+ return new AuthPluginUser( $user );
+ }
+
+ /**
+ * Get a list of domains (in HTMLForm options format) used.
+ *
+ * @return array
+ */
+ public function domainList() {
+ return array();
+ }
+}
+?>
diff --git a/extensions/tmwa/backend/models/account.php b/extensions/tmwa/backend/models/account.php
new file mode 100644
index 0000000..7f5b0fe
--- /dev/null
+++ b/extensions/tmwa/backend/models/account.php
@@ -0,0 +1,127 @@
+<?php
+class TMWAccount
+{
+ const GENDER_MALE = 'M';
+ const GENDER_FEMALE = 'F';
+ const BAD_STRING_DESC = 'Only alphanumeric characters are allowed.';
+
+ private $errors;
+ private $ladmin;
+ private $ladmin_result;
+
+ private static function existsUsername($str)
+ {
+ global $wgTMWAccountLib;
+ $ladmin = New $wgTMWAccountLib;
+ $ladmin_result = $ladmin->account_exists($str);
+ $ladmin->close();
+ return $ladmin_result;
+ }
+
+ public function setUsername($name){ $this->username = $name; }
+ public function setPassword1($pwd){ $this->password1 = $pwd; }
+ public function setPassword2($pwd){ $this->password2 = $pwd; }
+ public function setEMail($email){ $this->email = $email; }
+ public function setGender($gender){ $this->gender = $gender; }
+
+ public function validate()
+ {
+ $errors = array();
+
+ // check here for correct values..
+ if (strlen($this->username) < 4) {
+ $errors[] = "Username is too short";
+ }
+
+ if (strlen($this->username) >= 24) {
+ $errors[] = "Username is too long";
+ }
+
+ if (strlen($this->password1) < 4) {
+ $errors[] = "Password is too short";
+ }
+
+ if (strlen($this->password1) >= 24) {
+ $errors[] = "Password is too long";
+ }
+
+ if (strlen($this->email) < 4) {
+ $errors[] = "EMail is too short";
+ }
+
+ if (strlen($this->email) >= 40) {
+ $errors[] = "EMail is too long";
+ }
+
+ if (!filter_var($this->email, FILTER_VALIDATE_EMAIL)) {
+ $errors[] = "EMail is not valid";
+ }
+
+ if (!self::check_chars($this->username)) {
+ $errors[] = 'Username contains invalid characters.<br/> '.self::BAD_STRING_DESC;
+ }
+
+ if (!self::check_chars($this->password1)) {
+ $errors[] = 'Password contains invalid characters.<br/> '.self::BAD_STRING_DESC;
+ }
+
+ if ($this->password1 != $this->password2)
+ {
+ $errors[] = "The given passwords don't match!";
+ }
+
+ if ($this->gender != self::GENDER_MALE &&
+ $this->gender != self::GENDER_FEMALE )
+ {
+ $errors[] = 'Gender has to be Male or Female!';
+ }
+
+ if (!filter_var($this->email, FILTER_VALIDATE_EMAIL))
+ {
+ $errors[] = 'EMail has wrong format.';
+ }
+
+ if (self::existsUsername($this->username))
+ {
+ $errors[] = "The username is in use!";
+ }
+
+ if (count($errors) > 0)
+ {
+ return $errors;
+ }
+ return null;
+ }
+
+ public function check_chars($string) {
+ return ctype_alnum($string) && (strpos($string, '"') === FALSE);
+ }
+
+ private function sendEMail() {
+ $email = New TMWMail();
+ $email->mail_to = $this->email;
+ $email->subject = "The Mana World Registration";
+ $data = "== Account Created ==\n";
+ $data .= " Welcome ".$this->username." to The Mana World! Your account should now be enabled. If you have any problems with your login contact The Mana World via the Support (live) or Forums (maybe a delay) for help. Game tips & walkthroughs are available on the Wiki. Our Forums are a great place to ask for advice and discuss possible changes. News is available in the client or on the Home Site.
+ Godspeed Adventurer,
+ The Mana World\n";
+ $email->getEmailTemplate($data);
+
+ return $email->sendEMail();
+ }
+
+ public function createAccount()
+ {
+ global $wgTMWAccountLib;
+ $ladmin = New $wgTMWAccountLib;
+ $ladmin_result = $ladmin->create_account($this->username, $this->password1, $this->gender, $this->email);
+ $ladmin->close();
+ if($ladmin_result) {
+ $this->sendEMail();
+ return true;
+ } else {
+ return false;
+ }
+ }
+}
+?>
diff --git a/extensions/tmwa/backend/models/email.php b/extensions/tmwa/backend/models/email.php
new file mode 100644
index 0000000..29f1a1c
--- /dev/null
+++ b/extensions/tmwa/backend/models/email.php
@@ -0,0 +1,87 @@
+<?php
+// Email Template Header
+// Image Mapped for Html Email
+// Base/Default Links
+
+class TMWMail {
+
+ public function __construct() {
+ global $wgTMWAccountEmail;
+ $this->mail_to = '';
+ $this->boundary = uniqid('np');
+ $this->subject = '';
+ $this->headers = "From: Accounts <".$wgTMWAccountEmail.">\r\nReply-To: Accounts <".$wgTMWAccountEmail.">\r\n";
+ $this->message = "";
+ }
+
+ public function sendEMail() {
+ return mail($this->mail_to,$this->subject,$this->message,$this->headers);
+ }
+
+ public function appendheaders($headers) {
+ $this->headers .= $headers;
+ }
+
+ public function appendmessage($message) {
+ $this->message .= $message;
+ }
+
+ public function getEmailTemplate($emailText) {
+ self::appendheaders("MIME-Version: 1.0\r\nContent-type: multipart/alternative;boundary=".$this->boundary."\r\n");
+ $data = "This is a MIME encoded message.";
+
+ $data .= "\r\n\r\n--" . $this->boundary . "\r\n";
+ $data .= "Content-type: text/plain;charset=utf-8\r\n\r\n";
+ $data .= "###############################################################\n";
+ $data .= "# ___________.__ _____ #\n";
+ $data .= "# \__ ___/| |__ ____ / \ ____ ____ ____ #\n";
+ $data .= "# | | | | \_/ __ \ / \ / \ \__ \ / __ \ \__ \ #\n";
+ $data .= "# | | | Y \ ___/ / Y \/ __ \| | \ \/ __ \_ #\n";
+ $data .= "# |____| |___|__/\____> \____|____(______/__| \(______/ #\n";
+ $data .= "# __ __ .__ .___ #\n";
+ $data .= "# / \ / \___________| | __| _/ #\n";
+ $data .= "# \ \/\/ / _ \_ __ \ | / __ | #\n";
+ $data .= "# \ ( <_> ) | \/ |__/ /_/ | #\n";
+ $data .= "# \__/\ / \____/|__| |____/\____ | #\n";
+ $data .= "# \/ \/ #\n";
+ $data .= "# #\n";
+ $data .= "###############################################################\n";
+ $data .= $emailText;
+
+ $data .= "\r\n\r\n--" . $this->boundary . "\r\n";
+ $data .= "Content-type: text/html;charset=utf-8\r\n\r\n";
+
+ $data .= '<html><body>
+ <img id="Image-Maps-Com-image-maps-2014-05-22-121954" src="https://www.themanaworld.org/images/TMW-email-temaplate-mailer.png" border="0" width="640" height="272" orgWidth="640" orgHeight="272" usemap="#image-maps-2014-05-22-121954" alt="" />
+ <map name="image-maps-2014-05-22-121954" id="ImageMapsCom-image-maps-2014-05-22-121954">
+ <area alt="Home Page" title="The Mana World" href="https://www.themanaworld.org/" shape="rect" coords="0,0,197,201" style="outline:none;" target="_self" />
+ <area alt="Home Page" title="The Mana World" href="https://www.themanaworld.org/" shape="rect" coords="197,0,465,168" style="outline:none;" target="_self" />
+ <area alt="Official Client Mana Plus" title="Official Client Mana Plus" href="http://manaplus.org" shape="rect" coords="465,0,640,168" style="outline:none;" target="_self" />
+ <area alt="The Mana World News" title="The Mana World News" href="https://www.themanaworld.org/index.php" shape="rect" coords="196,168,275,201" style="outline:none;" target="_self" />
+ <area alt="The Mana World Wiki" title="The Mana World Wiki" href="https://wiki.themanaworld.org/index.php/Main_Page" shape="rect" coords="274,168,375,201" style="outline:none;" target="_self" />
+ <area alt="The Mana World Forums" title="The Mana World Forums" href="https://forums.themanaworld.org/" shape="rect" coords="372,168,490,201" style="outline:none;" target="_self" />
+ <area alt="The Mana World Support (IRC)" title="The Mana World Support (IRC)" href="https://webchat.freenode.net/?channels=#themanaworld" shape="rect" coords="488,168,640,201" style="outline:none;" target="_self" />
+ <area alt="About The Mana World" title="About The Mana World" href="https://www.themanaworld.org/about.php" shape="rect" coords="0,201,84,272" style="outline:none;" target="_self" />
+ <area alt="Creative Commons" title="Creative Commons" href="http://creativecommons.org/" shape="rect" coords="84,201,121,272" style="outline:none;" target="_self" />
+ <area alt="GNU General Public License" title="GNU General Public License " href="http://www.gnu.org/copyleft/gpl.html" shape="rect" coords="121,201,155,272" style="outline:none;" target="_self" />
+ <area alt="Open Source Initiative" title="Open Source Initiative" href="http://opensource.org/" shape="rect" coords="155,202,189,272" style="outline:none;" target="_self" />
+ <area alt="The Mana World on Facebook" title="The Mana World on Facebook" href="https://www.facebook.com/themanaworld" shape="rect" coords="191,204,308,272" style="outline:none;" target="_self" />
+ <area alt="The Mana World on G+" title="The Mana World on G+" href="https://plus.google.com/+TheManaWorldOrg" shape="rect" coords="310,204,344,272" style="outline:none;" target="_self" />
+ <area alt="The Mana World on Youtube" title="The Mana World on Youtube" href="https://www.youtube.com/user/TheManaWorldOfficial" shape="rect" coords="345,203,379,271" style="outline:none;" target="_self" />
+ <area alt="Official Client Mana Plus" title="Official Client Mana Plus" href="http://manaplus.org" shape="rect" coords="382,203,501,272" style="outline:none;" target="_self" />
+ <area alt="Mac OS Downloads" title="Mac OS Downloads" href="http://download.evolonline.org/manaplus/macosx/" shape="rect" coords="502,203,537,272" style="outline:none;" target="_self" />
+ <area alt="Windows Installer" title="Windows Installer" href="http://manaplus.org/windowsinstaller" shape="rect" coords="537.8000001907349,202.8000030517578,572.8000001907349,271.8000030517578" style="outline:none;" target="_self" />
+ <area alt="Linux Versions" title="Linux Versions" href="http://manaplus.org/" shape="rect" coords="575,203,640,272" style="outline:none;" target="_self" />
+ <area shape="rect" coords="638,270,640,272" alt="Image Map" style="outline:none;" title="Image Map" href="http://www.image-maps.com/index.php?aff=mapped_users_0" />
+ </map><br/>
+ '.nl2br($emailText).'
+ <div style="font-size:10px;">
+ &copy; 2004-2014 The Mana World
+ </div>
+ </body>
+ </html>';
+ $data .= "\r\n\r\n--" . $this->boundary . "--";
+ self::appendmessage($data);
+ }
+}
+?>
diff --git a/extensions/tmwa/backend/models/packets.php b/extensions/tmwa/backend/models/packets.php
new file mode 100644
index 0000000..ae80c1a
--- /dev/null
+++ b/extensions/tmwa/backend/models/packets.php
@@ -0,0 +1,22 @@
+<?php
+// To be dynamically generated eventually from TMWA protocols.py
+class TMWA {
+
+ public function __construct() {
+ $this->packets = array(
+ 0x7918 => array('packet' => array('packet' => 'v','encryption_zero' => 'v','account_pass' => 'a24'), 'len' => '28'),
+ 0x7530 => array('packet' => array('packet' => 'v'), 'len' => '2'),
+ 0x7934 => array('packet' => array('packet' => 'v','account_name' => 'a24','account_password' => 'a24'), 'len' => '50'),
+ 0x7930 => array('packet' => array('packet' => 'v','account_name' => 'a24','account_password' => 'a24', 'sex' => 'a1','email' => 'a40'), 'len' => '91'),
+ 0x793a => array('packet' => array('packet' => 'v','account_name' => 'a24','account_password' => 'a24'), 'len' => '50'),
+ 0x7952 => array('packet' => array('packet' => 'v','account_name' => 'a24'), 'len' => '26'),
+ 0x7919 => array('packet' => array('packet' => 'v','error' => 'C'), 'len' => 3),
+ 0x7531 => array('packet' => array('packet' => 'v','version' => 'C*'), 'len' => 10),
+ 0x7935 => array('packet' => array('packet' => 'v','account_id' => 'V','account_name' => 'a24'), 'len' => 30),
+ 0x7931 => array('packet' => array('packet' => 'v','account_id' => 'V','account_name' => 'a24'), 'len' => 30),
+ 0x793b => array('packet' => array('packet' => 'v','account_id' => 'V','account_name' => 'a24'), 'len' => 30),
+ 0x7953 => array('packet' => array('packet' => 'v','account_id' => 'V','gm_level' => 'C','account_name' => 'a24','sex' => 'C','login_count' => 'V','state' => 'V','error_message' => 'a20','last_login_string' => 'a24','ip_string' => 'a16','email' => 'a40','connect_until' => 'V','ban_until' => 'V','packet' => 'v'), 'len' => 151)
+ );
+ }
+}
+?>
diff --git a/extensions/tmwa/frontend/TMWAccountUI.hooks.php b/extensions/tmwa/frontend/TMWAccountUI.hooks.php
new file mode 100644
index 0000000..0081a9a
--- /dev/null
+++ b/extensions/tmwa/frontend/TMWAccountUI.hooks.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Class containing hooked functions for a TMWAccount environment
+ */
+class TMWAccountUIHooks {
+ /**
+ * @param $template
+ * @return bool
+ */
+ public static function addRequestLoginText( &$template ) {
+ $context = RequestContext::getMain();
+ # Add a link to GameAccount from UserLogin
+ if ( !$context->getUser()->isAllowed( 'createaccount' ) ) {
+ $template->set( 'header', wfMsgExt( 'gameaccount-loginnotice', 'parse' ) );
+ }
+ return true;
+ }
+
+ /**
+ * @param $personal_urls
+ * @param $title
+ * @return bool
+ */
+ public static function setRequestLoginLinks( array &$personal_urls, &$title ) {
+ if ( isset( $personal_urls['anonlogin'] ) ) {
+ $personal_urls['anonlogin']['text'] = wfMsg( 'nav-login-createaccount' );
+ } elseif ( isset( $personal_urls['login'] ) ) {
+ $personal_urls['login']['text'] = wfMsg( 'nav-login-createaccount' );
+ }
+ return true;
+ }
+
+ /**
+ * Add "x email-tmwed open account requests" notice
+ * @param $notice
+ * @return bool
+ */
+ public static function tmwAccountsNotice( OutputPage &$out, Skin &$skin ) {
+ global $wgTMWAccountNotice;
+
+ $context = $out->getContext();
+ if ( !$wgTMWAccountNotice || !$context->getUser()->isAllowed( 'tmwaccount' ) ) {
+ return true;
+ }
+ # Only show on some special pages
+ $title = $context->getTitle();
+ if ( !$title->isSpecial( 'Recentchanges' ) && !$title->isSpecial( 'Watchlist' ) ) {
+ return true;
+ }
+ $count = TMWAccount::getOpenEmailTMWedCount( '*' );
+ if ( $count > 0 ) {
+ $out->prependHtml( // parsemag for PLURAL
+ '<div id="mw-tmwaccount-msg" class="plainlinks mw-tmwaccount-bar">' .
+ $out->parse( wfMsgExt( 'tmwaccount-newrequests', 'parsemag', $count ), false ) .
+ '</div>'
+ );
+ }
+ return true;
+ }
+}
diff --git a/extensions/tmwa/frontend/TMWAccountUI.setup.php b/extensions/tmwa/frontend/TMWAccountUI.setup.php
new file mode 100644
index 0000000..9ff8800
--- /dev/null
+++ b/extensions/tmwa/frontend/TMWAccountUI.setup.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Class containing hooked functions for a TMWAccount environment
+ */
+class TMWAccountUISetup {
+ /**
+ * Register TMWAccount hooks.
+ * @param $hooks Array $wgHooks (assoc array of hooks and handlers)
+ * @return void
+ */
+ public static function defineHookHandlers( array &$hooks ) {
+ # Make sure "login / create account" notice still as "create account"
+ $hooks['PersonalUrls'][] = 'TMWAccountUIHooks::setRequestLoginLinks';
+ # Add notice of where to request an account at UserLogin
+ $hooks['UserCreateForm'][] = 'TMWAccountUIHooks::addRequestLoginText';
+ $hooks['UserLoginForm'][] = 'TMWAccountUIHooks::addRequestLoginText';
+ # Status header like "new messages" bar
+ $hooks['BeforePageDisplay'][] = 'TMWAccountUIHooks::tmwAccountsNotice';
+ # Register admin pages for AdminLinks extension.
+ $hooks['AdminLinks'][] = 'TMWAccountUIHooks::tmwAccountAdminLinks';
+ }
+
+ /**
+ * Register TMWAccount special pages as needed.
+ * @param $pages Array $wgSpecialPages (list of special pages)
+ * @param $groups Array $wgSpecialPageGroups (assoc array of special page groups)
+ * @return void
+ */
+ public static function defineSpecialPages( array &$pages, array &$groups ) {
+ $pages['GameAccount'] = 'GameAccountPage';
+ $groups['GameAccount'] = 'login';
+ $pages['GameNews'] = 'GameNewsPage';
+ $groups['GameNews'] = 'changes';
+ }
+}
diff --git a/extensions/tmwa/frontend/language/TMWAccount.alias.php b/extensions/tmwa/frontend/language/TMWAccount.alias.php
new file mode 100644
index 0000000..7d6e624
--- /dev/null
+++ b/extensions/tmwa/frontend/language/TMWAccount.alias.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Aliases for extension ConfirmAccount
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+$specialPageAliases = array();
+
+/** English (English) */
+$specialPageAliases['en'] = array(
+ 'GameAccountPage' => array( 'The Mana World Account' ),
+ 'GameNewsPage' => array( 'The Mana World News' )
+);
diff --git a/extensions/tmwa/frontend/language/TMWAccount.i18n.php b/extensions/tmwa/frontend/language/TMWAccount.i18n.php
new file mode 100644
index 0000000..637a7f0
--- /dev/null
+++ b/extensions/tmwa/frontend/language/TMWAccount.i18n.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Internationalisation file for RequestAccount special page.
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+$messages = array();
+
+$messages['en'] = array(
+ 'gameaccount' => 'The Mana World Game Account',
+ 'gamenews' => 'The Mana World Game News',
+ 'gameaccount-loginnotice' => 'To obtain a game account, you must register here: \'\'\'[[Special:GameAccount|Game Account]]\'\'\'.<br/> To obtain a wiki account, you must register here: \'\'\'[[Special:RequestAccount|Wiki Account]]\'\'\'.',
+);
diff --git a/extensions/tmwa/frontend/news.php b/extensions/tmwa/frontend/news.php
new file mode 100644
index 0000000..a214ea2
--- /dev/null
+++ b/extensions/tmwa/frontend/news.php
@@ -0,0 +1,41 @@
+<?php
+class GameNewsPage extends SpecialPage {
+
+ public function __construct() {
+ parent::__construct('GameNews');
+ }
+
+ public function execute( $par ) {
+ $request = $this->getRequest();
+ $output = $this->getOutput();
+ $this->setHeaders();
+
+ $wikitext = self::printNews();
+
+ $output->addWikiText( $wikitext );
+ }
+ // Parses news.html
+ // displays feed
+ public function printNews($num='all') {
+ global $wgTMWNews;
+ $count = 0;
+ $content = "";
+ $handle = @fopen($wgTMWNews, "r");
+ if ($handle) {
+ while (($buffer = fgets($handle, 4096)) !== false) {
+ $content .= $buffer;
+ if (preg_match('/<\/div>/',$buffer)) {
+ $count++;
+ }
+ if ($count == $num && $num != 'all') {
+ $content .= '<div class="read-more"><a class="more" href="/news-feed.php">More News >></a></div>';
+ break 1;
+ }
+ }
+ }
+ $output = $this->getOutput();
+ $output->addHTML($content);
+ fclose($handle);
+ }
+}
+?>
diff --git a/extensions/tmwa/frontend/registration.php b/extensions/tmwa/frontend/registration.php
new file mode 100644
index 0000000..d66b701
--- /dev/null
+++ b/extensions/tmwa/frontend/registration.php
@@ -0,0 +1,106 @@
+<?php
+class GameAccountPage extends SpecialPage {
+
+ public function __construct() {
+ $this->err = array();
+ parent::__construct('GameAccount');
+ }
+
+ public function execute( $par ) {
+ $request = $this->getRequest();
+ $output = $this->getOutput();
+ $this->setHeaders();
+ global $wgTMWAccountLib;
+ $check_ladmin = new $wgTMWAccountLib();
+ if($check_ladmin->socket) {
+ $check_ladmin->close();
+ if(!self::processForm($request)) {
+ $wikitext = self::showForm();
+ $output->addWikiText($wikitext);
+ }
+ } else {
+ $wikitext = self::accountsOffline();
+ $output->addWikiText($wikitext);
+ }
+ }
+
+ public function processForm($request) {
+ if ($request->getText('register') == "true") {
+ $acc = new TMWAccount();
+ $acc->setUsername($request->getText('username'));
+ $acc->setPassword1($request->getText('password1'));
+ $acc->setPassword2($request->getText('password2'));
+ $acc->setEMail($request->getText('email'));
+ $acc->setGender($request->getText('gender'));
+
+ $this->err = $acc->validate();
+ global $wgCaptchaClass;
+ global $wgCaptchaClass, $wgConfirmAccountCaptchas;
+ if ($wgConfirmAccountCaptchas) {
+ $captcha = new $wgCaptchaClass;
+ if (!$captcha->passCaptcha()) {
+ $this->err[] = "The captcha was incorrect!";
+ }
+ }
+ if (count($this->err) > 0) {
+ return false;
+ }
+ // create the account
+ if (!$acc->createAccount()) {
+ $this->err[] = "The was an unknown error while creating the account";
+ return false;
+ } else {
+ self::showSuccess();
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public function showForm() {
+ $output = $this->getOutput();
+ $form = ('<p>With this form you can register for a new account. <i>We will never give your email to someone else or send you spam! Its only purpose is to be able to send you back whether account creation succeeded.</i></p><p style="background-color: #ede2da; padding: 5px; border: 1px solid #9f9894; border-radius: 10px;"><i>Security warning:</i> Do not use the same username and password on two different servers. It happened a lot in the past that users of the official server got "hacked" because they ignored this important precaution.</p>');
+ $form .= '<form method="post" name="gameaccount" action="'.$this->getTitle()->getLocalUrl().'">';
+ $form .= '<input type="hidden" name="register" value="true" /><table>';
+ foreach($this->err as $message) {
+ $form .= "<tr><td colspan=\"2\" style=\"border: 1px solid red; color: red;\">".$message."</td></tr>";
+ }
+ $form .= '<tr><td>Username:</td><td><input type="text" size="20" name="username" /></td></tr>
+ <tr><td>Password:</td><td><input type="password" size="20" name="password1" /></td></tr>
+ <tr><td>Retype password:</td><td><input type="password" size="20" name="password2" /></td></tr>
+ <tr><td>EMail:</td><td><input type="text" size="30" name="email" /></td></tr>
+ <tr><td>Gender:</td>
+ <td>
+ <select name="gender">
+ <option value="0" selected></option>
+ <option value="M">Male</option>
+ <option value="F">Female</option>
+ </select>
+ </td>
+ </tr><tr><td colspan="2">';
+ global $wgCaptchaClass, $wgConfirmAccountCaptchas;
+ if ($wgConfirmAccountCaptchas) {
+ $captcha = new $wgCaptchaClass;
+ $form .= $captcha->getForm();
+ }
+ $form .= '</td></tr><tr>
+ <td colspan="2" style="text-align:right">
+ <input type="submit" value="Register" />
+ </td></tr></table></form>';
+ $output->addHTML($form);
+ }
+
+ public function showSuccess() {
+ $thank_you = "<p>Your account was created! In a few minutes you should receive an email with verification of your new account.</p>
+ <p><em>If the account doesn't work, please ask for help on the <a href='https://forums.themanaworld.org/viewforum.php?f=3'>Forums</a> or <a href='https://webchat.freenode.net/?channels=#themanaworld'>Support (IRC)</a>.</em></p>";
+ $output = $this->getOutput();
+ $output->addHTML($thank_you);
+ }
+
+ public function accountsOffline() {
+ $output = $this->getOutput();
+ $offline_msg = "<p>The Mana World Account service is currently offline<em>please ask for help on the <a href='https://forums.themanaworld.org/viewforum.php?f=3'>Forums</a> or <a href='https://webchat.freenode.net/?channels=#themanaworld'>Support (IRC)</a>.</em></p>";
+ $output->addHTML($offline_msg);
+ }
+}
+?>
diff --git a/extensions/tmwa/sql/createTables.sql b/extensions/tmwa/sql/createTables.sql
new file mode 100644
index 0000000..8942ce1
--- /dev/null
+++ b/extensions/tmwa/sql/createTables.sql
@@ -0,0 +1,20 @@
+BEGIN;
+CREATE TABLE /*$wgDBprefix*/tmw_accounts (
+ -- Primary
+ ID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ -- Username
+ USERNAME VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
+ -- Password
+ PASSWORD VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
+ -- Email
+ EMAIL VARCHAR(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
+ -- Registration State
+ STATE TINYINT UNSIGNED NOT NULL DEFAULT '0',
+ -- When Registered
+ REGISTRATION TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ -- Gender
+ GENDER CHAR(1) NOT NULL DEFAULT 'F',
+ INDEX (STATE),
+ UNIQUE (USERNAME)
+) ENGINE=InnoDB;
+COMMIT;
diff --git a/extensions/tmwa/tmwa.php b/extensions/tmwa/tmwa.php
new file mode 100644
index 0000000..5b61705
--- /dev/null
+++ b/extensions/tmwa/tmwa.php
@@ -0,0 +1,50 @@
+<?php
+if ( !defined( 'MEDIAWIKI' ) ) {
+ echo "TMWAccount extension\n";
+ exit( 1 ) ;
+}
+$wgExtensionCredits['validextensionclass'][] = array(
+ 'path' => __FILE__,
+ 'name' => 'TMWA Mediawiki',
+ 'author' => 'wushin',
+ 'url' => 'https://github.com/themanaworld/themanaworld-website',
+ 'description' => 'Ladmin in Mediawiki',
+ 'version' => 0.5,
+ 'license-name' => "AGPL 3.0",
+);
+
+# Define were PHP files and i18n files are located
+require( dirname( __FILE__ ) . '/TMWAccount.setup.php' );
+TMWAccountSetup::defineSourcePaths( $wgAutoloadClasses, $wgExtensionMessagesFiles );
+
+# Actually register special pages
+TMWAccountUISetup::defineSpecialPages( $wgSpecialPages, $wgSpecialPageGroups );
+
+# UI-related hook handlers
+TMWAccountUISetup::defineHookHandlers( $wgHooks );
+
+# Schema updates for tmwa.php
+$wgHooks['LoadExtensionSchemaUpdates'][] = 'TMWAccountSql';
+function TMWAccountSql( DatabaseUpdater $updater ) {
+ $updater->addExtensionTable( 'tmw_accounts', dirname( __FILE__ ) . '/sql/createTables.sql', true );
+ return true;
+}
+
+# Load the extension after setup is finished
+$wgExtensionFunctions[] = 'efLoadTMWAccount';
+
+/**
+ * This function is for setup that has to happen in Setup.php
+ * when the functions in $wgExtensionFunctions get executed.
+ * @return void
+ */
+function efLoadTMWAccount() {
+ global $wgEnableEmail;
+ # This extension needs email enabled!
+ # Otherwise users can't get their passwords...
+ if ( !$wgEnableEmail ) {
+ echo "TMWAccount extension requires \$wgEnableEmail set to true.\n";
+ exit( 1 ) ;
+ }
+}
+?>
diff --git a/google7b07f9c486a184d4.html b/google7b07f9c486a184d4.html
new file mode 100644
index 0000000..a1090a3
--- /dev/null
+++ b/google7b07f9c486a184d4.html
@@ -0,0 +1 @@
+google-site-verification: google7b07f9c486a184d4.html
diff --git a/images/contents_bottomleft.png b/images/contents_bottomleft.png
deleted file mode 100644
index f0fac08..0000000
--- a/images/contents_bottomleft.png
+++ /dev/null
Binary files differ
diff --git a/images/contents_bottomleft_empty.png b/images/contents_bottomleft_empty.png
deleted file mode 100644
index 55e1af7..0000000
--- a/images/contents_bottomleft_empty.png
+++ /dev/null
Binary files differ
diff --git a/images/contents_bottomright.png b/images/contents_bottomright.png
deleted file mode 100644
index a821748..0000000
--- a/images/contents_bottomright.png
+++ /dev/null
Binary files differ
diff --git a/images/contents_leftrepeat.png b/images/contents_leftrepeat.png
deleted file mode 100644
index ad78e6c..0000000
--- a/images/contents_leftrepeat.png
+++ /dev/null
Binary files differ
diff --git a/images/contents_rightrepeat.png b/images/contents_rightrepeat.png
deleted file mode 100644
index 32e8cd6..0000000
--- a/images/contents_rightrepeat.png
+++ /dev/null
Binary files differ
diff --git a/images/contents_topleft.png b/images/contents_topleft.png
deleted file mode 100644
index 8485684..0000000
--- a/images/contents_topleft.png
+++ /dev/null
Binary files differ
diff --git a/images/contents_topright.png b/images/contents_topright.png
deleted file mode 100644
index 8d6b26a..0000000
--- a/images/contents_topright.png
+++ /dev/null
Binary files differ
diff --git a/images/ico-android.png b/images/ico-android.png
deleted file mode 100644
index e03ff2b..0000000
--- a/images/ico-android.png
+++ /dev/null
Binary files differ
diff --git a/images/ico-deb.png b/images/ico-deb.png
deleted file mode 100644
index dcbef5e..0000000
--- a/images/ico-deb.png
+++ /dev/null
Binary files differ
diff --git a/images/ico-fedora.png b/images/ico-fedora.png
deleted file mode 100644
index a97e03a..0000000
--- a/images/ico-fedora.png
+++ /dev/null
Binary files differ
diff --git a/images/ico-freebsd.png b/images/ico-freebsd.png
deleted file mode 100644
index f777460..0000000
--- a/images/ico-freebsd.png
+++ /dev/null
Binary files differ
diff --git a/images/ico-gentoo.png b/images/ico-gentoo.png
deleted file mode 100644
index 4adf21b..0000000
--- a/images/ico-gentoo.png
+++ /dev/null
Binary files differ
diff --git a/images/ico-openbsd.png b/images/ico-openbsd.png
deleted file mode 100644
index 3334a3d..0000000
--- a/images/ico-openbsd.png
+++ /dev/null
Binary files differ
diff --git a/images/ico-osx.png b/images/ico-osx.png
deleted file mode 100644
index f8710b6..0000000
--- a/images/ico-osx.png
+++ /dev/null
Binary files differ
diff --git a/images/ico-slackware.png b/images/ico-slackware.png
deleted file mode 100644
index f0d876a..0000000
--- a/images/ico-slackware.png
+++ /dev/null
Binary files differ
diff --git a/images/ico-src.png b/images/ico-src.png
deleted file mode 100644
index 189960f..0000000
--- a/images/ico-src.png
+++ /dev/null
Binary files differ
diff --git a/images/ico-tux.png b/images/ico-tux.png
deleted file mode 100644
index d812e54..0000000
--- a/images/ico-tux.png
+++ /dev/null
Binary files differ
diff --git a/images/ico-ubuntu.png b/images/ico-ubuntu.png
deleted file mode 100644
index 8d64754..0000000
--- a/images/ico-ubuntu.png
+++ /dev/null
Binary files differ
diff --git a/images/ico-win.png b/images/ico-win.png
deleted file mode 100644
index f80e571..0000000
--- a/images/ico-win.png
+++ /dev/null
Binary files differ
diff --git a/images/main_bottomright.png b/images/main_bottomright.png
deleted file mode 100644
index 0967278..0000000
--- a/images/main_bottomright.png
+++ /dev/null
Binary files differ
diff --git a/images/main_rightrepeat.png b/images/main_rightrepeat.png
deleted file mode 100644
index 98c7444..0000000
--- a/images/main_rightrepeat.png
+++ /dev/null
Binary files differ
diff --git a/images/main_title_bottomright.png b/images/main_title_bottomright.png
deleted file mode 100644
index 615d1ab..0000000
--- a/images/main_title_bottomright.png
+++ /dev/null
Binary files differ
diff --git a/images/main_title_topleft.png b/images/main_title_topleft.png
deleted file mode 100644
index 0721179..0000000
--- a/images/main_title_topleft.png
+++ /dev/null
Binary files differ
diff --git a/images/main_title_topright.png b/images/main_title_topright.png
deleted file mode 100644
index 5268fc8..0000000
--- a/images/main_title_topright.png
+++ /dev/null
Binary files differ
diff --git a/images/main_topleft.png b/images/main_topleft.png
deleted file mode 100644
index f613e3d..0000000
--- a/images/main_topleft.png
+++ /dev/null
Binary files differ
diff --git a/images/main_topright.png b/images/main_topright.png
deleted file mode 100644
index 89b0557..0000000
--- a/images/main_topright.png
+++ /dev/null
Binary files differ
diff --git a/images/section_bottomleft.png b/images/section_bottomleft.png
deleted file mode 100644
index 3faa2fd..0000000
--- a/images/section_bottomleft.png
+++ /dev/null
Binary files differ
diff --git a/images/section_bottomright.png b/images/section_bottomright.png
deleted file mode 100644
index 8e28fae..0000000
--- a/images/section_bottomright.png
+++ /dev/null
Binary files differ
diff --git a/images/section_topleft.png b/images/section_topleft.png
deleted file mode 100644
index 3a6b403..0000000
--- a/images/section_topleft.png
+++ /dev/null
Binary files differ
diff --git a/images/section_topright.png b/images/section_topright.png
deleted file mode 100644
index e5dc728..0000000
--- a/images/section_topright.png
+++ /dev/null
Binary files differ
diff --git a/includes/common.php b/includes/common.php
deleted file mode 100644
index ea8a63f..0000000
--- a/includes/common.php
+++ /dev/null
@@ -1,170 +0,0 @@
-<?php
-/* Main include file for TMW website, including header and footer
- * (c) 2005 Bjorn Lindeijer
- */
-
-define('TMWWEBSITE', true);
-
-function placeHeader($page_title)
-{
- echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>The Mana World - <?php echo $page_title; ?></title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <meta http-equiv="Content-Style-Type" content="text/css"/>
- <meta http-equiv="Content-Language" content="en"/>
- <link rel="icon" type="image/png" href="images/icon16.png"/>
- <meta name="description" content="The Mana World is a free MMORPG game for Linux, MacOS X and Windows"/>
- <meta name="keywords" content="The Mana World, Mana, World, MMORPG, RPG, free, GPL, Open Source, Pixel Art, 2D, Software Development, MacOSX, Windows, Linux, desktop, tablet, Game, 16-bit, Retro, Fantasy, 8-bit, Indie, Game Development, Game Engine, Open Source MMORPG"/>
- <meta name="author" content="The Mana World Dev Team"/>
- <meta name="globalsign-domain-verification" content="wfLgRJB6QP57zObNXrUNC-w-kN0x55jjXhQza9tnsx" />
- <link rel="stylesheet" type="text/css" href="default.css"/>
- </head>
- <body>
- <div style="margin-left: auto; margin-right: auto; max-width: 1350px;">
- <div id="page">
-
- <div id="irc_info">
- </div>
-
- <div id="title">
- <a href="/"><h1><span>The Mana World</span></h1></a>
- </div>
-
- <div id="main_topleft">
- <div id="main_rightrepeat">
- <div id="main_topright">
- <div id="main_bottomright">
- <div id="main">
-
- <div style="clear: both;"></div>
-
- <div id="sidebar">
- <div class="section_topleft">
- <div class="section_bottomleft">
- <div class="section_topright">
- <div class="section_bottomright">
- <div class="section">
- <ul>
- <li><a href="registration.php">Create Account</a></li>
- <li><a href="downloads.php">Downloads</a></li>
- <li><a href="news-feed.php">News</a></li>
- <li><a href="about.php">About</a></li>
- <li><a href="https://webchat.freenode.net/?channels=#themanaworld">Support (IRC)</a></li>
- <li><a href="https://wiki.themanaworld.org/">Wiki</a></li>
- <li><a href="https://forums.themanaworld.org/">Forums</a></li>
- <li><a href="https://wiki.themanaworld.org/index.php/FAQ">FAQ</a></li>
- <li><a href="https://wiki.themanaworld.org/index.php/Servers">Servers</a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="section_topleft">
- <div class="section_bottomleft">
- <div class="section_topright">
- <div class="section_bottomright">
- <div class="section banners">
- Server status
- <iframe src="https://server.themanaworld.org/status.php" width="130" height="30" frameborder="0" scrolling="no"></iframe>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="section_topleft">
- <div class="section_bottomleft">
- <div class="section_topright">
- <div class="section_bottomright">
- <div class="section" style="text-align: center;">
- <a href="http://wiki.themanaworld.org/index.php/Screenshots"><img src="images/screenshot-thumb.png" alt="Screenshots" style="border: 1px solid #784f3f;"/></a>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="section_topleft">
- <div class="section_bottomleft">
- <div class="section_topright">
- <div class="section_bottomright">
- <div class="section">
- <ul>
- <li><a href="https://plus.google.com/114523926767095095371">Google+</a></li>
- <li><a href="https://www.facebook.com/themanaworld">Facebook</a></li>
- <li><a href="https://github.com/themanaworld">Github</a></li>
- <li><a href="http://www.spi-inc.org/projects/tmw/">SPI Associated Project</a></li>
- <li><a href="http://www.gnu.org/copyleft/gpl.html"><img src="images/gpl.png" alt="GPLed project"/></a></li>
- <li><a href="http://manaplus.org" target="_blank">ManaPlus</a></li>
- <li><a href="http://www.mapeditor.org/" target="_blank">Tiled</a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- This empty div fixes a rendering issue with IE 7 -->
- <div></div>
- </div> <!-- /sidebar -->
- <div id="contents_leftrepeat">
- <div id="contents_topleft">
- <div id="contents_bottomleft">
- <div id="contents_rightrepeat">
- <div id="contents_topright">
- <div id="contents_bottomright">
- <div id="contents">
-
- <div class="main_title_topright">
- <div class="main_title_bottomright">
- <div class="main_title_topleft">
- <h2><?=$page_title?></h2>
- </div>
- </div>
- </div>
-<?php
-}
-
-function placeFooter()
-{
-?>
- <div style="clear: both"></div>
-
- </div> <!-- /contents -->
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- </div> <!-- /main -->
- </div>
- </div>
- </div>
- </div>
-
- <div id="footer">
- &copy; 2004-2011 The Mana World Dev Team -
- [<a href="http://validator.w3.org/check?uri=referer">xhtml</a>] [<a href="http://jigsaw.w3.org/css-validator/check/referer">css</a>]
- </div>
- </div> <!-- /page -->
- </div>
-<!-- Google Tag Manager -->
-<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-5KTWGJ"
-height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
-<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
-new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
-j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
-'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
-})(window,document,'script','dataLayer','GTM-5KTWGJ');</script>
-<!-- End Google Tag Manager -->
- </body>
-</html>
-<?php
-}
-
-?>
diff --git a/includes/conf/mysql.conf.php.example b/includes/conf/mysql.conf.php.example
deleted file mode 100644
index d0122d5..0000000
--- a/includes/conf/mysql.conf.php.example
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-
- $conf['mysql_hostname'] = "localhost";
- $conf['mysql_database'] = "test";
- $conf['mysql_username'] = "test";
- $conf['mysql_password'] = "test123";
-
-?> \ No newline at end of file
diff --git a/includes/email.php b/includes/email.php
deleted file mode 100644
index 6184d56..0000000
--- a/includes/email.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-// Email Template Header
-// Image Mapped for Html Email
-// Base/Default Links
-function getEmailTemplate($emailText) {
- $boundary = uniqid('np');
- $headers .= "MIME-Version: 1.0\r\nContent-type: multipart/alternative;boundary=".$boundary."\r\n";
- $data = "This is a MIME encoded message.";
-
- $data .= "\r\n\r\n--" . $boundary . "\r\n";
- $data .= "Content-type: text/plain;charset=utf-8\r\n\r\n";
- $data .= "###############################################################\n";
- $data .= "# ___________.__ _____ #\n";
- $data .= "# \__ ___/| |__ ____ / \ ____ ____ ____ #\n";
- $data .= "# | | | | \_/ __ \ / \ / \ \__ \ / __ \ \__ \ #\n";
- $data .= "# | | | Y \ ___/ / Y \/ __ \| | \ \/ __ \_ #\n";
- $data .= "# |____| |___|__/\____> \____|____(______/__| \(______/ #\n";
- $data .= "# __ __ .__ .___ #\n";
- $data .= "# / \ / \___________| | __| _/ #\n";
- $data .= "# \ \/\/ / _ \_ __ \ | / __ | #\n";
- $data .= "# \ ( <_> ) | \/ |__/ /_/ | #\n";
- $data .= "# \__/\ / \____/|__| |____/\____ | #\n";
- $data .= "# \/ \/ #\n";
- $data .= "# #\n";
- $data .= "###############################################################\n";
- $data .= $emailText;
-
- $data .= "\r\n\r\n--" . $boundary . "\r\n";
- $data .= "Content-type: text/html;charset=utf-8\r\n\r\n";
-
- $data .= '<html><body>
-<img id="Image-Maps-Com-image-maps-2014-05-22-121954" src="https://www.themanaworld.org/images/TMW-email-temaplate-mailer.png" border="0" width="640" height="272" orgWidth="640" orgHeight="272" usemap="#image-maps-2014-05-22-121954" alt="" />
-<map name="image-maps-2014-05-22-121954" id="ImageMapsCom-image-maps-2014-05-22-121954">
-<area alt="Home Page" title="The Mana World" href="https://www.themanaworld.org/" shape="rect" coords="0,0,197,201" style="outline:none;" target="_self" />
-<area alt="Home Page" title="The Mana World" href="https://www.themanaworld.org/" shape="rect" coords="197,0,465,168" style="outline:none;" target="_self" />
-<area alt="Official Client Mana Plus" title="Official Client Mana Plus" href="http://manaplus.org" shape="rect" coords="465,0,640,168" style="outline:none;" target="_self" />
-<area alt="The Mana World News" title="The Mana World News" href="https://www.themanaworld.org/index.php" shape="rect" coords="196,168,275,201" style="outline:none;" target="_self" />
-<area alt="The Mana World Wiki" title="The Mana World Wiki" href="https://wiki.themanaworld.org/index.php/Main_Page" shape="rect" coords="274,168,375,201" style="outline:none;" target="_self" />
-<area alt="The Mana World Forums" title="The Mana World Forums" href="https://forums.themanaworld.org/" shape="rect" coords="372,168,490,201" style="outline:none;" target="_self" />
-<area alt="The Mana World Support (IRC)" title="The Mana World Support (IRC)" href="https://webchat.freenode.net/?channels=#themanaworld" shape="rect" coords="488,168,640,201" style="outline:none;" target="_self" />
-<area alt="About The Mana World" title="About The Mana World" href="https://www.themanaworld.org/about.php" shape="rect" coords="0,201,84,272" style="outline:none;" target="_self" />
-<area alt="Creative Commons" title="Creative Commons" href="http://creativecommons.org/" shape="rect" coords="84,201,121,272" style="outline:none;" target="_self" />
-<area alt="GNU General Public License" title="GNU General Public License " href="http://www.gnu.org/copyleft/gpl.html" shape="rect" coords="121,201,155,272" style="outline:none;" target="_self" />
-<area alt="Open Source Initiative" title="Open Source Initiative" href="http://opensource.org/" shape="rect" coords="155,202,189,272" style="outline:none;" target="_self" />
-<area alt="The Mana World on Facebook" title="The Mana World on Facebook" href="https://www.facebook.com/themanaworld" shape="rect" coords="191,204,308,272" style="outline:none;" target="_self" />
-<area alt="The Mana World on G+" title="The Mana World on G+" href="https://plus.google.com/+TheManaWorldOrg" shape="rect" coords="310,204,344,272" style="outline:none;" target="_self" />
-<area alt="The Mana World on Youtube" title="The Mana World on Youtube" href="https://www.youtube.com/user/TheManaWorld" shape="rect" coords="345,203,379,271" style="outline:none;" target="_self" />
-<area alt="Official Client Mana Plus" title="Official Client Mana Plus" href="http://manaplus.org" shape="rect" coords="382,203,501,272" style="outline:none;" target="_self" />
-<area alt="Mac OS Downloads" title="Mac OS Downloads" href="http://download.evolonline.org/manaplus/macosx/" shape="rect" coords="502,203,537,272" style="outline:none;" target="_self" />
-<area alt="Windows Installer" title="Windows Installer" href="http://manaplus.org/windowsinstaller" shape="rect" coords="537.8000001907349,202.8000030517578,572.8000001907349,271.8000030517578" style="outline:none;" target="_self" />
-<area alt="Linux Versions" title="Linux Versions" href="http://manaplus.org/" shape="rect" coords="575,203,640,272" style="outline:none;" target="_self" />
-<area shape="rect" coords="638,270,640,272" alt="Image Map" style="outline:none;" title="Image Map" href="http://www.image-maps.com/index.php?aff=mapped_users_0" />
-</map>
-'.nl2br($emailText).'
-<div style="font-size:10px;">
- &copy; 2004-2014 The Mana World
-</div>
-</body>
-</html>';
- $data .= "\r\n\r\n--" . $boundary . "--";
- return array($headers,$data);
-}
-?>
diff --git a/includes/fetch-news.sh b/includes/fetch-news.sh
deleted file mode 100755
index 5cc9ea5..0000000
--- a/includes/fetch-news.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-#
-# Fetches project news and saves it for local use.
-#
-
-/usr/bin/wget -q -O /home/tmw/public_html/www/includes/rss2_projnews.tmp 'http://sourceforge.net/export/rss2_projnews.php?group_id=106790&rss_fulltext=1' > /dev/null
-/bin/mv -f /home/tmw/public_html/www/includes/rss2_projnews.tmp \
- /home/tmw/public_html/www/includes/rss2_projnews.cache
diff --git a/includes/libs/libmysql.php b/includes/libs/libmysql.php
deleted file mode 100644
index 5a3a06c..0000000
--- a/includes/libs/libmysql.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-
-require_once "includes/conf/mysql.conf.php";
-
-class Database
-{
- // implement singleton pattern
- static private $instance = null;
-
- private $conn;
-
- static public function getInstance()
- {
- if (null === self::$instance)
- {
- self::$instance = new self;
- }
- return self::$instance;
- }
-
- // ctor
- private function __construct()
- {
- global $conf;
- $this->conn = mysql_connect( $conf['mysql_hostname'],
- $conf['mysql_username'],
- $conf['mysql_password'] )
- or die ("Connection to database failed!" . mysql_error());
-
- mysql_select_db( $conf['mysql_database'], $this->conn )
- or die ("Selection of database failed! " . mysql_error());
- }
-
- private function checkConnect()
- {
- if (!isset($this->conn))
- {
- die("Not connected to database");
- }
- }
-
- // returns the value in the first row and column
- public function getValue( $sql )
- {
- $this->checkConnect();
-
- $res = mysql_query( $sql, $this->conn );
- if (!$res)
- {
- die('Error while calling database: ' . mysql_error());
- }
- $vals = mysql_fetch_row( $res );
- mysql_free_result( $res );
- return $vals[0];
- }
-
- // executes some sql and returns affected rows
- public function exec( $sql )
- {
- $this->checkConnect();
-
- $res = mysql_query( $sql, $this->conn );
- if (!$res)
- {
- die('Error while calling database: ' . mysql_error());
- }
- $numrows = mysql_affected_rows( $this->conn );
- return $numrows;
- }
-
- public function escape( $string )
- {
- $this->checkConnect();
-
- return mysql_real_escape_string( $string, $this->conn );
- }
-
- public function disconnect()
- {
- if ( mysql_ping( $this->conn ) )
- {
- mysql_close( $this->conn );
- }
- }
-
-}
-
-
-?> \ No newline at end of file
diff --git a/includes/libs/libstrutils.php b/includes/libs/libstrutils.php
deleted file mode 100644
index ee81c33..0000000
--- a/includes/libs/libstrutils.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
- define("BAD_STRING_DESC", "Only alphanumeric characters are allowed.");
-
- function check_chars($string)
- {
- return ctype_alnum($string) && (strpos($string, '"') === FALSE);
- }
-
-?>
diff --git a/includes/models/account.php b/includes/models/account.php
deleted file mode 100644
index ef253c6..0000000
--- a/includes/models/account.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-
-require_once "includes/libs/libstrutils.php";
-
-class TMWAccount
-{
- const ACCOUNT_TBL = "tmw_accounts";
-
- const GENDER_MALE = 1;
- const GENDER_FEMALE = 2;
-
- const STATE_PENDING = 0;
- const STATE_CREATED = 0;
- const STATE_FAILED = 0;
-
- private $id;
- private $username;
- private $password;
- private $email;
- private $gender;
- private $state;
- private $registration;
-
- public static function getAccountCount()
- {
- $db = Database::getInstance();
- $sql = "SELECT COUNT(*) FROM " . TMWAccount::ACCOUNT_TBL;
- return $db->getValue( $sql );
- }
-
- public static function existsUsername($str)
- {
- $db = Database::getInstance();
- $sql = sprintf("SELECT COUNT(*) FROM " . TMWAccount::ACCOUNT_TBL .
- " WHERE USERNAME = '%s'", $db->escape($str));
- return ($db->getValue($sql) == 1);
- }
-
- public function setUsername($name){ $this->username = $name; }
- public function setPassword($pwd){ $this->password = $pwd; }
- public function setEMail($email){ $this->email = $email; }
- public function setGender($gender){ $this->gender = $gender; }
-
- public function validate()
- {
- $errors = array();
-
- // check here for correct values..
- if (strlen($this->username) < 4)
- $errors[] = "Username is too short";
-
- if (strlen($this->username) >= 24)
- $errors[] = "Username is too long";
-
- if (strlen($this->password) < 4)
- $errors[] = "Password is too short";
-
- if (strlen($this->password) >= 24)
- $errors[] = "Password is too long";
-
- if (strlen($this->email) < 4)
- $errors[] = "EMail is too short";
-
- if (strlen($this->email) >= 40)
- $errors[] = "EMail is too long";
-
- if (!check_chars($this->username))
- $errors[] = 'Username contains invalid characters. ' . BAD_STRING_DESC;
-
- if (!check_chars($this->password))
- $errors[] = 'Password contains invalid characters. ' . BAD_STRING_DESC;
-
- if ($this->gender != TMWAccount::GENDER_MALE &&
- $this->gender != TMWAccount::GENDER_FEMALE )
- {
- $errors[] = 'Gender has to be Male or Female!';
- }
-
- if (!filter_var($this->email, FILTER_VALIDATE_EMAIL))
- {
- $errors[] = 'EMail has wrong format.';
- }
-
-
- // returns true if everything is fine ( test with === true)
- if (count($errors) == 0)
- {
- return true;
- }
- else
- {
- return $errors;
- }
- }
-
-
-
- public function storeAccount()
- {
- $db = Database::getInstance();
- $sql = sprintf( "INSERT INTO " . TMWAccount::ACCOUNT_TBL .
- " (USERNAME, PASSWORD, EMAIL, GENDER) " .
- "VALUES ('%s', '%s', '%s', %d) ",
- $db->escape($this->username),
- $db->escape($this->password),
- $db->escape($this->email),
- $this->gender);
-
- $rows = $db->exec( $sql );
- return ( $rows == 1 );
- }
-}
-
-?>
diff --git a/includes/news.php b/includes/news.php
deleted file mode 100644
index 791e3c4..0000000
--- a/includes/news.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-// Parses news.html
-// returns feed
-
-function printNews($num='all') {
- $count = 0;
- $content = "";
- $handle = @fopen("news.html", "r");
- if ($handle) {
- while (($buffer = fgets($handle, 4096)) !== false) {
- $content .= $buffer;
- if (preg_match('/<\/div>/',$buffer)) {
- $count++;
- }
- if ($count == $num && $num != 'all') {
- $content .= '<div class="read-more"><a class="more" href="/news-feed.php">More News >></a></div>';
- break 1;
- }
- }
- }
- fclose($handle);
- return $content;
-}
-?>
diff --git a/index.php b/index.php
deleted file mode 100644
index 0e0bbfb..0000000
--- a/index.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-include('includes/common.php');
-include('includes/news.php');
-placeHeader("Home");
-?>
-<div>
-<h3>The Mana World Project</h3>
-<p style="font-size:14px;">The Mana World (TMW) is a serious effort to create an innovative free and open source MMORPG. TMW uses 2D graphics and aims to create a large and diverse interactive world. It is licensed under the GPL, making sure this game can't ever run away from you. </p>
-<div class="read-more"><a class="more" href="/about.php">Read More >></a></div>
-</div>
-<div>
-<h3>Recent News</h3>
-</div>
-<?php
-echo printNews(1);
-placeFooter();
-?>
diff --git a/news-feed.php b/news-feed.php
deleted file mode 100644
index ac14b5e..0000000
--- a/news-feed.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-include('includes/common.php');
-include('includes/news.php');
-placeHeader("News");
-echo printNews();
-placeFooter();
-?>
diff --git a/recaptcha-php/LICENSE b/recaptcha-php/LICENSE
deleted file mode 100644
index b612f71..0000000
--- a/recaptcha-php/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net
-AUTHORS:
- Mike Crawford
- Ben Maurer
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/recaptcha-php/README b/recaptcha-php/README
deleted file mode 100644
index 21f1a27..0000000
--- a/recaptcha-php/README
+++ /dev/null
@@ -1,7 +0,0 @@
-reCAPTCHA README
-================
-
-The reCAPTCHA PHP Lirary helps you use the reCAPTCHA API. Documentation
-for this library can be found at
-
- http://recaptcha.net/plugins/php
diff --git a/recaptcha-php/example-captcha.php b/recaptcha-php/example-captcha.php
deleted file mode 100644
index f6f7fa0..0000000
--- a/recaptcha-php/example-captcha.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<html>
- <body>
- <form action="" method="post">
-<?php
-
-require_once('recaptchalib.php');
-
-// Get a key from https://www.google.com/recaptcha/admin/create
-$publickey = "";
-$privatekey = "";
-
-# the response from reCAPTCHA
-$resp = null;
-# the error code from reCAPTCHA, if any
-$error = null;
-
-# was there a reCAPTCHA response?
-if ($_POST["recaptcha_response_field"]) {
- $resp = recaptcha_check_answer ($privatekey,
- $_SERVER["REMOTE_ADDR"],
- $_POST["recaptcha_challenge_field"],
- $_POST["recaptcha_response_field"]);
-
- if ($resp->is_valid) {
- echo "You got it!";
- } else {
- # set the error code so that we can display it
- $error = $resp->error;
- }
-}
-echo recaptcha_get_html($publickey, $error);
-?>
- <br/>
- <input type="submit" value="submit" />
- </form>
- </body>
-</html>
diff --git a/recaptcha-php/example-mailhide.php b/recaptcha-php/example-mailhide.php
deleted file mode 100644
index d08622c..0000000
--- a/recaptcha-php/example-mailhide.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<html><body>
-<?
-require_once ("recaptchalib.php");
-
-// get a key at http://www.google.com/recaptcha/mailhide/apikey
-$mailhide_pubkey = '';
-$mailhide_privkey = '';
-
-?>
-
-The Mailhide version of example@example.com is
-<? echo recaptcha_mailhide_html ($mailhide_pubkey, $mailhide_privkey, "example@example.com"); ?>. <br>
-
-The url for the email is:
-<? echo recaptcha_mailhide_url ($mailhide_pubkey, $mailhide_privkey, "example@example.com"); ?> <br>
-
-</body></html>
diff --git a/recaptcha-php/keys.php.example b/recaptcha-php/keys.php.example
deleted file mode 100644
index 4355a6c..0000000
--- a/recaptcha-php/keys.php.example
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
- // Put the keys you got from the signup page
- $publickey = "";
- $privatekey = "";
-?> \ No newline at end of file
diff --git a/recaptcha-php/recaptchalib.php b/recaptcha-php/recaptchalib.php
deleted file mode 100644
index 5e6e8e5..0000000
--- a/recaptcha-php/recaptchalib.php
+++ /dev/null
@@ -1,279 +0,0 @@
-<?php
-/*
- * This is a PHP library that handles calling reCAPTCHA.
- * - Documentation and latest version
- * http://recaptcha.net/plugins/php/
- * - Get a reCAPTCHA API Key
- * https://www.google.com/recaptcha/admin/create
- * - Discussion group
- * http://groups.google.com/group/recaptcha
- *
- * Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net
- * AUTHORS:
- * Mike Crawford
- * Ben Maurer
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-/**
- * The reCAPTCHA server URL's
- */
-// edited by o11c - it gets confused by the nginx proxy really being https
-//define("RECAPTCHA_API_SERVER", "http://www.google.com/recaptcha/api");
-define("RECAPTCHA_API_SERVER", "https://www.google.com/recaptcha/api");
-define("RECAPTCHA_API_SECURE_SERVER", "https://www.google.com/recaptcha/api");
-define("RECAPTCHA_VERIFY_SERVER", "www.google.com");
-
-/**
- * Encodes the given data into a query string format
- * @param $data - array of string elements to be encoded
- * @return string - encoded request
- */
-function _recaptcha_qsencode ($data) {
- $req = "";
- foreach ( $data as $key => $value )
- $req .= $key . '=' . urlencode( stripslashes($value) ) . '&';
-
- // Cut the last '&'
- $req=substr($req,0,strlen($req)-1);
- return $req;
-}
-
-
-
-/**
- * Submits an HTTP POST to a reCAPTCHA server
- * @param string $host
- * @param string $path
- * @param array $data
- * @param int port
- * @return array response
- */
-function _recaptcha_http_post($host, $path, $data, $port = 80) {
-
- $req = _recaptcha_qsencode ($data);
-
- $http_request = "POST $path HTTP/1.0\r\n";
- $http_request .= "Host: $host\r\n";
- $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
- $http_request .= "Content-Length: " . strlen($req) . "\r\n";
- $http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
- $http_request .= "\r\n";
- $http_request .= $req;
-
- $response = '';
- if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
- die ('Could not open socket');
- }
-
- fwrite($fs, $http_request);
-
- while ( !feof($fs) )
- $response .= fgets($fs, 1160); // One TCP-IP packet
- fclose($fs);
- $response = explode("\r\n\r\n", $response, 2);
-
- return $response;
-}
-
-
-
-/**
- * Gets the challenge HTML (javascript and non-javascript version).
- * This is called from the browser, and the resulting reCAPTCHA HTML widget
- * is embedded within the HTML form it was called from.
- * @param string $pubkey A public key for reCAPTCHA
- * @param string $error The error given by reCAPTCHA (optional, default is null)
- * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false)
-
- * @return string - The HTML to be embedded in the user's form.
- */
-function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
-{
- if ($pubkey == null || $pubkey == '') {
- die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
- }
-
- if ($use_ssl) {
- $server = RECAPTCHA_API_SECURE_SERVER;
- } else {
- $server = RECAPTCHA_API_SERVER;
- }
-
- $errorpart = "";
- if ($error) {
- $errorpart = "&amp;error=" . $error;
- }
- return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
-
- <noscript>
- <iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
- <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
- <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
- </noscript>';
-}
-
-
-
-
-/**
- * A ReCaptchaResponse is returned from recaptcha_check_answer()
- */
-class ReCaptchaResponse {
- var $is_valid;
- var $error;
-}
-
-
-/**
- * Calls an HTTP POST function to verify if the user's guess was correct
- * @param string $privkey
- * @param string $remoteip
- * @param string $challenge
- * @param string $response
- * @param array $extra_params an array of extra variables to post to the server
- * @return ReCaptchaResponse
- */
-function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array())
-{
- if ($privkey == null || $privkey == '') {
- die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
- }
-
- if ($remoteip == null || $remoteip == '') {
- die ("For security reasons, you must pass the remote ip to reCAPTCHA");
- }
-
-
-
- //discard spam submissions
- if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) {
- $recaptcha_response = new ReCaptchaResponse();
- $recaptcha_response->is_valid = false;
- $recaptcha_response->error = 'incorrect-captcha-sol';
- return $recaptcha_response;
- }
-
- $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify",
- array (
- 'privatekey' => $privkey,
- 'remoteip' => $remoteip,
- 'challenge' => $challenge,
- 'response' => $response
- ) + $extra_params
- );
-
- $answers = explode ("\n", $response [1]);
- $recaptcha_response = new ReCaptchaResponse();
-
- if (trim ($answers [0]) == 'true') {
- $recaptcha_response->is_valid = true;
- }
- else {
- $recaptcha_response->is_valid = false;
- $recaptcha_response->error = $answers [1];
- }
- return $recaptcha_response;
-
-}
-
-/**
- * gets a URL where the user can sign up for reCAPTCHA. If your application
- * has a configuration page where you enter a key, you should provide a link
- * using this function.
- * @param string $domain The domain where the page is hosted
- * @param string $appname The name of your application
- */
-function recaptcha_get_signup_url ($domain = null, $appname = null) {
- return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname));
-}
-
-function _recaptcha_aes_pad($val) {
- $block_size = 16;
- $numpad = $block_size - (strlen ($val) % $block_size);
- return str_pad($val, strlen ($val) + $numpad, chr($numpad));
-}
-
-/* Mailhide related code */
-
-function _recaptcha_aes_encrypt($val,$ky) {
- if (! function_exists ("mcrypt_encrypt")) {
- die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.");
- }
- $mode=MCRYPT_MODE_CBC;
- $enc=MCRYPT_RIJNDAEL_128;
- $val=_recaptcha_aes_pad($val);
- return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
-}
-
-
-function _recaptcha_mailhide_urlbase64 ($x) {
- return strtr(base64_encode ($x), '+/', '-_');
-}
-
-/* gets the reCAPTCHA Mailhide url for a given email, public key and private key */
-function recaptcha_mailhide_url($pubkey, $privkey, $email) {
- if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
- die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " .
- "you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
- }
-
-
- $ky = pack('H*', $privkey);
- $cryptmail = _recaptcha_aes_encrypt ($email, $ky);
-
- return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail);
-}
-
-/**
- * gets the parts of the email to expose to the user.
- * eg, given johndoe@example,com return ["john", "example.com"].
- * the email is then displayed as john...@example.com
- */
-function _recaptcha_mailhide_email_parts ($email) {
- $arr = preg_split("/@/", $email );
-
- if (strlen ($arr[0]) <= 4) {
- $arr[0] = substr ($arr[0], 0, 1);
- } else if (strlen ($arr[0]) <= 6) {
- $arr[0] = substr ($arr[0], 0, 3);
- } else {
- $arr[0] = substr ($arr[0], 0, 4);
- }
- return $arr;
-}
-
-/**
- * Gets html to display an email address given a public an private key.
- * to get a key, go to:
- *
- * http://www.google.com/recaptcha/mailhide/apikey
- */
-function recaptcha_mailhide_html($pubkey, $privkey, $email) {
- $emailparts = _recaptcha_mailhide_email_parts ($email);
- $url = recaptcha_mailhide_url ($pubkey, $privkey, $email);
-
- return htmlentities($emailparts[0]) . "<a href='" . htmlentities ($url) .
- "' onclick=\"window.open('" . htmlentities ($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities ($emailparts [1]);
-
-}
-
-
-?>
diff --git a/registration.php b/registration.php
deleted file mode 100644
index 8a5c49e..0000000
--- a/registration.php
+++ /dev/null
@@ -1,155 +0,0 @@
-<?php
- require_once('includes/libs/libmysql.php');
- require_once('includes/models/account.php');
- require_once('recaptcha-php/recaptchalib.php');
-
- require_once('recaptcha-php/keys.php');
-
- $enable_captcha = true; // modify this in production
-
- $showform = true;
-
- if (isset($_POST['register']) && $_POST['register'] == "true")
- {
- $showform = false;
- $err = "";
- $acc = new TMWAccount();
- $acc->setUsername($_POST['username']);
- $acc->setPassword($_POST['password1']);
- $acc->setEMail($_POST['email']);
- $acc->setGender($_POST['gender']);
-
- $val = $acc->validate();
- if (is_array($val))
- {
- foreach( $val as $error)
- {
- $err .= $error . "<br />";
- }
- $showform = true;
- }
-
- if ($_POST['password2'] != $_POST['password1'])
- {
- $err .= "The given passwords don't match!"; $showform = true;
- }
-
- if (TMWAccount::existsUsername( $_POST['username'] ))
- {
- $err .= "The username is in use!"; $showform = true;
- }
-
- if ($enable_captcha)
- {
- // check captcha
- $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"],
- $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
-
- if (!$resp->is_valid)
- {
- $err .= "The captcha was incorrect!"; $showform = true;
- }
- }
-
- if (!$showform)
- {
- // create the account
- if (!$acc->storeAccount())
- {
- $err = "The was an unknown error while storing your new account";
- $showform = true;
- }
- }
- }
- if ($showform)
- {
- include("includes/common.php");
- placeHeader("Registration");
-
-?>
-<p>With this form you can register for a new account.</p>
-
-<p>Note that you also need to <a href="downloads.php">download Manaplus</a>, The Mana World's official client, and run it to log in and play.</p>
-
-<p><i>We will never give your email to someone else or send you spam! Its only purpose is to be able to send you back whether account creation succeeded. Also your email is important to send you a new password if you forgot yours (<a href="https://forums.themanaworld.org/viewtopic.php?f=3&t=17737">further information).</a></i></p>
-
-<p style="background-color: #ede2da; padding: 5px; border: 1px solid
-#9f9894; border-radius: 10px;"><i>Security warning:</i> Do not use the same username and password on
-two different servers. The server admins can read all of them in clear text and
-nothing stops them from trying them on other servers. It happened a lot in the
-past that users of the official server got "hacked" because they ignored this
-important precaution.</p>
-
-<form action="registration.php" method="post">
-
- <input type="hidden" name="register" value="true" />
- <table>
- <?php if (isset($err))
- {
- echo "<tr><td colspan=\"2\" style=\"border: 1px solid red; color: red;\">" .
- $err . "</td></tr>";
- }
- ?>
- <tr>
- <td>Username:</td>
- <td><input type="text" size="20" name="username" /></td>
- </tr>
- <tr>
- <td>Password:</td>
- <td><input type="password" size="20" name="password1" /></td>
- </tr>
- <tr>
- <td>Retype password:</td>
- <td><input type="password" size="20" name="password2" /></td>
- </tr>
- <tr>
- <td>EMail:</td>
- <td><input type="text" size="30" name="email" /></td>
- </tr>
- <tr>
- <td>Gender:</td>
- <td>
- <select name="gender">
- <option value="0" selected></option>
- <option value="1">Male</option>
- <option value="2">Female</option>
- </select>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <?php echo recaptcha_get_html($publickey); ?>
- </td>
- </tr>
- <tr>
- <td colspan="2" style="text-align:right">
- <input type="submit" value="Register" />
- </td>
- </tr>
- </table>
-</form>
-
-
-<?php
-
- placeFooter();
- } // end of showform
- else
- {
- include("includes/email.php");
- $mail_to = $_POST['email'];
- $boundary = uniqid('np');
- $subject = "The Mana World Registration";
- $headers = "From: Accounts <passwords@themanaworld.org>\r\nReply-To: Accounts <passwords@themanaworld.org>\r\n";
- $data .= "== Account Created ==\n";
- $data .= " Welcome to The Mana World! Your account should now be enabled. If you have any problems with your login contact The Mana World via the Support (live) or Forums (maybe a delay) for help. Game tips & walkthroughs are available on the Wiki. Our Forums are a great place to ask for advice and discuss possible changes. News is available in the client or on the Home Site.
- Godspeed Adventurer,
- The Mana World\n";
- $message = getEmailTemplate($data);
- $headers .= $message[0];
-
- //mail($mail_to,$subject,$message[1],$headers);
-
- header("Location: /thank_you.php");
- }
-?>
diff --git a/robots.txt b/robots.txt
index 9925915..c55d7cd 100644
--- a/robots.txt
+++ b/robots.txt
@@ -1,12 +1,26 @@
User-agent: *
-disallow: /includes/
-disallow: /recaptcha-php/
-disallow: /sql/
-disallow: /bin/
-disallow: /thank_you.php
-disallow: /news.html
-allow: /
+disallow: /extensions/
+disallow: /config/
+disallow: /index.php/Special:Search
+allow: /index.php/Main_Page
+allow: /index.php/Dev:Main
+allow: /index.php/How_to_Develop
+allow: /index.php/Special:GameAccount
+allow: /index.php/Downloads
+allow: /index.php/About
+allow: /index.php/Special:GameNews
+allow: /index.php/Screenshots
+allow: /index.php/Getting_started
+allow: /index.php/Game_Rules
+allow: /index.php/Walkthrough
+allow: /index.php/Backstory
+allow: /index.php/Geography
+allow: /index.php/Quests
+allow: /index.php/Items
+allow: /index.php/Monster_Reference
+allow: /index.php/Reporting_Bugs
+allow: /index.php/Servers
+allow: /robots.txt
-sitemap: http://www.themanaworld.org/sitemap.xml
-host: themanaworld.org
-host: www.themanaworld.org
+sitemap: http://wiki.themanaworld.org/sitemap.xml
+host: wiki.themanaworld.org
diff --git a/sitemap.xml b/sitemap.xml
index 93c09f7..39a36fc 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -1,33 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
-<loc>https://www.themanaworld.org/</loc>
-<lastmod>2014-07-19</lastmod>
+<loc>https://wiki.themanaworld.org/index.php/Dev:Main</loc>
+<lastmod>2014-11-14</lastmod>
+<changefreq>daily</changefreq>
+<priority>1.0</priority>
+</url>
+<url>
+<loc>https://wiki.themanaworld.org/index.php/Special:GameAccount</loc>
+<lastmod>2014-11-14</lastmod>
+<changefreq>daily</changefreq>
+<priority>1.0</priority>
+</url>
+<url>
+<loc>https://wiki.themanaworld.org/index.php/Downloads</loc>
+<lastmod>2014-11-14</lastmod>
+<changefreq>daily</changefreq>
+<priority>1.0</priority>
+</url>
+<url>
+<loc>https://wiki.themanaworld.org/index.php/About</loc>
+<lastmod>2014-11-14</lastmod>
+<changefreq>daily</changefreq>
+<priority>1.0</priority>
+</url>
+<url>
+<loc>https://wiki.themanaworld.org/index.php/Special:GameNews</loc>
+<lastmod>2014-11-14</lastmod>
+<changefreq>daily</changefreq>
+<priority>1.0</priority>
+</url>
+<url>
+<loc>https://wiki.themanaworld.org/index.php/Screenshots</loc>
+<lastmod>2014-11-14</lastmod>
+<changefreq>daily</changefreq>
+<priority>0.7</priority>
+</url>
+<url>
+<loc>https://wiki.themanaworld.org/index.php/Getting_started</loc>
+<lastmod>2014-11-14</lastmod>
+<changefreq>daily</changefreq>
+<priority>0.7</priority>
+</url>
+<url>
+<loc>https://wiki.themanaworld.org/index.php/Game_Rules</loc>
+<lastmod>2014-11-14</lastmod>
+<changefreq>daily</changefreq>
+<priority>0.5</priority>
+</url>
+<url>
+<loc>https://wiki.themanaworld.org/index.php/Walkthrough</loc>
+<lastmod>2014-11-14</lastmod>
+<changefreq>daily</changefreq>
+<priority>0.8</priority>
+</url>
+<url>
+<loc>https://wiki.themanaworld.org/index.php/Backstory</loc>
+<lastmod>2014-11-14</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
-<loc>https://www.themanaworld.org/news-feed.php</loc>
-<lastmod>2014-07-19</lastmod>
+<loc>https://wiki.themanaworld.org/index.php/Geography</loc>
+<lastmod>2014-11-14</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
-<loc>https://www.themanaworld.org/registration.php</loc>
-<lastmod>2014-07-19</lastmod>
+<loc>https://wiki.themanaworld.org/index.php/Quests</loc>
+<lastmod>2014-11-14</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
-<loc>https://www.themanaworld.org/downloads.php</loc>
-<lastmod>2014-07-19</lastmod>
+<loc>https://wiki.themanaworld.org/index.php/Items</loc>
+<lastmod>2014-11-14</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
-<loc>https://www.themanaworld.org/about.php</loc>
-<lastmod>2014-07-19</lastmod>
+<loc>https://wiki.themanaworld.org/index.php/Monster_Reference</loc>
+<lastmod>2014-11-14</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
+<url>
+<loc>https://wiki.themanaworld.org/index.php/Reporting_Bugs</loc>
+<lastmod>2014-11-14</lastmod>
+<changefreq>daily</changefreq>
+<priority>0.5</priority>
+</url>
+<url>
+<loc>https://wiki.themanaworld.org/index.php/Servers</loc>
+<lastmod>2014-11-14</lastmod>
+<changefreq>daily</changefreq>
+<priority>0.5</priority>
+</url>
+<url>
+<loc>https://wiki.themanaworld.org/index.php/How_to_Develop</loc>
+<lastmod>2014-11-14</lastmod>
+<changefreq>daily</changefreq>
+<priority>0.9</priority>
+</url>
</urlset>
diff --git a/sql/createTables.sql b/sql/createTables.sql
deleted file mode 100644
index 6442b6b..0000000
--- a/sql/createTables.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-CREATE TABLE `tmw_accounts`
-(
- `ID` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
- `USERNAME` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
- `PASSWORD` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
- `EMAIL` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
- `STATE` TINYINT UNSIGNED NOT NULL DEFAULT '0',
- `REGISTRATION` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
- `GENDER` TINYINT UNSIGNED NOT NULL DEFAULT '0',
- --
- INDEX ( `STATE` ) ,
- UNIQUE ( `USERNAME` )
-) ENGINE = InnoDB;
diff --git a/thank_you.php b/thank_you.php
deleted file mode 100644
index 67c8ffe..0000000
--- a/thank_you.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-include('includes/common.php');
-if (preg_match('/'.$_SERVER['SERVER_NAME'].'/',$_SERVER['HTTP_REFERER']) && preg_match('/registration.php/', $_SERVER['HTTP_REFERER'])) {
- placeHeader("Account Created");
- echo "<p>Your account was scheduled for creation! In a few minutes you should receive an email with verification of your new account.</p>
-<p><em>If the account doesn't work after five minutes, please ask for help on the <a href='https://forums.themanaworld.org/viewforum.php?f=3'>Forums</a> or <a href='https://webchat.freenode.net/?channels=#themanaworld'>Support (IRC)</a>.</em></p>";
- placeFooter();
-} else {
- header("Location: /registration.php");
-}
-?>