Skip to content

Commit 10a1b9c

Browse files
start myaac
0 parents  commit 10a1b9c

File tree

2,635 files changed

+119422
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,635 files changed

+119422
-0
lines changed

.htaccess

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<IfModule mod_autoindex.c>
2+
Options -Indexes
3+
</IfModule>
4+
5+
<IfModule mod_negotiation.c>
6+
Options -MultiViews
7+
</IfModule>
8+
9+
<IfModule mod_rewrite.c>
10+
RewriteEngine On
11+
12+
# you can put here your myaac root folder
13+
# path relative to web root
14+
#RewriteBase /myaac/
15+
16+
RewriteCond %{REQUEST_FILENAME} !-f
17+
RewriteCond %{REQUEST_FILENAME} !-d
18+
RewriteRule ^.*$ index.php [L]
19+
</IfModule>

CHANGELOG.md

+742
Large diffs are not rendered by default.

CREDITS

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* Gesior.pl (2007 - 2008)
2+
* Slawkens (2009 - 2020)

LICENSE

+674
Large diffs are not rendered by default.

README.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# [MyAAC](https://my-aac.org)
2+
3+
[![Build Status Master](https://img.shields.io/travis/slawkens/myaac/master)](https://travis-ci.org/github/slawkens/myaac)
4+
[![License: GPL-3.0](https://img.shields.io/github/license/slawkens/myaac)](https://opensource.org/licenses/gpl-license)
5+
[![Downloads Count](https://img.shields.io/github/downloads/slawkens/myaac/total)](https://github.com/slawkens/myaac/releases)
6+
[![PHP Versions](https://img.shields.io/travis/php-v/slawkens/myaac/master)](https://github.com/slawkens/myaac/blob/d8b3b4135827ee17e3c6d41f08a925e718c587ed/.travis.yml#L3)
7+
[![OpenTibia Discord](https://img.shields.io/discord/288399552581468162)](https://discord.gg/2J39Wus)
8+
[![Closed Issues](https://img.shields.io/github/issues-closed-raw/slawkens/myaac)](https://github.com/slawkens/myaac/issues?q=is%3Aissue+is%3Aclosed)
9+
10+
MyAAC is a free and open-source Automatic Account Creator (AAC) written in PHP. It is a fork of the [Gesior](https://github.com/gesior/Gesior2012) project. It supports only MySQL databases.
11+
12+
### Requirements
13+
14+
- PHP 5.6 or later
15+
- MySQL database
16+
- PDO PHP Extension
17+
- XML PHP Extension
18+
- ZIP PHP Extension
19+
- (optional) mod_rewrite to use friendly_urls
20+
21+
### Installation
22+
23+
Just decompress and untar the source (which you should have done by now,
24+
if you're reading this), into your webserver's document root.
25+
26+
MyAAC needs proper permissions to handle files correctly.
27+
If you're using apache2, then your directory needs to have owner set to: www-data, you can do it by using following command:
28+
chown -R www-data.www-data /var/www/*
29+
(or any other path your MyAAC installation is located at..)
30+
31+
Note: Linux only
32+
If you're under linux use these commands to set proper permissions:
33+
chmod 660 config.local.php
34+
chmod 660 images/guilds
35+
chmod 660 images/houses
36+
chmod 660 images/gallery
37+
chmod -R 770 system/cache
38+
39+
Visit http://your_domain/install (http://localhost/install) and follow instructions in the browser.
40+
41+
### Configuration
42+
43+
Check *config.php* to get more informations.
44+
Use *config.local.php* for your local configuration changes.
45+
46+
### Branches
47+
48+
This repository follows the Git Flow Workflow.
49+
Cheatsheet: [Git-Flow-Cheetsheet](https://danielkummer.github.io/git-flow-cheatsheet)
50+
51+
That means, we use:
52+
* master branch, for current stable release
53+
* develop branch, for development version (next release)
54+
* feature branches, for features etc.
55+
56+
### Known Problems
57+
58+
- Some compatibility issues with some exotical distibutions.
59+
60+
61+
### Contributing
62+
63+
Contributions are more than welcome.
64+
65+
Pull requests should be made to the Dev branch as that is the working branch, master is for release code.
66+
67+
Look: [Contributing](https://github.com/otsoft/myaac/wiki/Contributing) in our wiki.
68+
69+
### Other Notes
70+
71+
If you have a great idea or want contribute to the project - visit our website at https://www.my-aac.org
72+
73+
### License
74+
75+
This program and all associated files are released under the GNU Public License.
76+
See [LICENSE](https://github.com/slawkens/myaac/blob/master/LICENSE) for details.

VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.8.6

admin/.htaccess

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# uncomment if you want to restrict access only for your ip
2+
#order deny,allow
3+
#deny from all
4+
#allow from 127.0.0.1

admin/includes/functions.php

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php// nothing yet here?>

admin/index.php

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?php
2+
// few things we'll need
3+
require '../common.php';
4+
5+
if(file_exists(BASE . 'config.local.php')) {
6+
require_once BASE . 'config.local.php';
7+
}
8+
9+
if(file_exists(BASE . 'install') && (!isset($config['installed']) || !$config['installed']))
10+
{
11+
header('Location: ' . BASE_URL . 'install/');
12+
throw new RuntimeException('Setup detected that <b>install/</b> directory exists. Please visit <a href="' . BASE_URL . 'install">this</a> url to start MyAAC Installation.<br/>Delete <b>install/</b> directory if you already installed MyAAC.<br/>Remember to REFRESH this page when you\'re done!');
13+
}
14+
15+
define('ADMIN_PANEL', true);
16+
17+
$content = '';
18+
19+
// validate page
20+
$page = isset($_GET['p']) ? $_GET['p'] : '';
21+
if(empty($page) || preg_match("/[^a-zA-Z0-9_\-]/", $page))
22+
$page = 'dashboard';
23+
24+
$page = strtolower($page);
25+
define('PAGE', $page);
26+
27+
require SYSTEM . 'functions.php';
28+
require SYSTEM . 'init.php';
29+
30+
if(config('env') === 'dev') {
31+
ini_set('display_errors', 1);
32+
ini_set('display_startup_errors', 1);
33+
error_reporting(E_ALL);
34+
}
35+
36+
// event system
37+
require_once SYSTEM . 'hooks.php';
38+
$hooks = new Hooks();
39+
$hooks->load();
40+
41+
require SYSTEM . 'status.php';
42+
require SYSTEM . 'login.php';
43+
require SYSTEM . 'migrate.php';
44+
require ADMIN . 'includes/functions.php';
45+
46+
$twig->addGlobal('config', $config);
47+
$twig->addGlobal('status', $status);
48+
49+
// if we're not logged in - show login box
50+
if(!$logged || !admin()) {
51+
$page = 'login';
52+
}
53+
54+
// include our page
55+
$file = ADMIN . 'pages/' . $page . '.php';
56+
if(!@file_exists($file)) {
57+
$page = '404';
58+
$file = SYSTEM . 'pages/404.php';
59+
}
60+
61+
ob_start();
62+
include($file);
63+
64+
$content .= ob_get_contents();
65+
ob_end_clean();
66+
67+
// template
68+
$template_path = 'template/';
69+
require ADMIN . $template_path . 'template.php';
70+
?>

0 commit comments

Comments
 (0)