mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-05-01 11:49:21 +02:00
Guild logo upload
This commit is contained in:
parent
48d6483a82
commit
721a52867f
187
config.php
187
config.php
@ -5,30 +5,30 @@
|
|||||||
// TFS 0.4 = TFS_03
|
// TFS 0.4 = TFS_03
|
||||||
// TFS 1.0 = TFS_10 (Under developement)
|
// TFS 1.0 = TFS_10 (Under developement)
|
||||||
$config['TFSVersion'] = 'TFS_10';
|
$config['TFSVersion'] = 'TFS_10';
|
||||||
|
|
||||||
$config['site_title'] = 'Znote AAC';
|
$config['site_title'] = 'Znote AAC';
|
||||||
$config['site_title_context'] = 'Because open communities are good communities. :3';
|
$config['site_title_context'] = 'Because open communities are good communities. :3';
|
||||||
|
|
||||||
// Path to server folder without / Example: C:\Users\Alvaro\Documents\GitHub\forgottenserver
|
// Path to server folder without / Example: C:\Users\Alvaro\Documents\GitHub\forgottenserver
|
||||||
$config['server_path'] = '';
|
$config['server_path'] = '';
|
||||||
|
|
||||||
|
|
||||||
// ------------------------ \\
|
// ------------------------ \\
|
||||||
// MYSQL CONNECTION DETAILS \\
|
// MYSQL CONNECTION DETAILS \\
|
||||||
// ------------------------ \\
|
// ------------------------ \\
|
||||||
|
|
||||||
// phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.).
|
// phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.).
|
||||||
$config['sqlUser'] = 'tfs10';
|
$config['sqlUser'] = 'tfs10';
|
||||||
|
|
||||||
// phpmyadmin password for OT server:
|
// phpmyadmin password for OT server:
|
||||||
$config['sqlPassword'] = 'tfs10';
|
$config['sqlPassword'] = 'tfs10';
|
||||||
|
|
||||||
// The database name to connect to. (This is usually same as username).
|
// The database name to connect to. (This is usually same as username).
|
||||||
$config['sqlDatabase'] = 'tfs10';
|
$config['sqlDatabase'] = 'tfs10';
|
||||||
|
|
||||||
// Hostname is usually localhost or 127.0.0.1.
|
// Hostname is usually localhost or 127.0.0.1.
|
||||||
$config['sqlHost'] = 'localhost';
|
$config['sqlHost'] = 'localhost';
|
||||||
|
|
||||||
/* CLOCK FUNCTION
|
/* CLOCK FUNCTION
|
||||||
- getClock() = returns current time in numbers.
|
- getClock() = returns current time in numbers.
|
||||||
- getClock(time(), true) = returns current time in formatted date
|
- getClock(time(), true) = returns current time in formatted date
|
||||||
@ -49,7 +49,69 @@
|
|||||||
// ------------------- \\
|
// ------------------- \\
|
||||||
// CUSTOM SERVER STUFF \\
|
// CUSTOM SERVER STUFF \\
|
||||||
// ------------------- \\
|
// ------------------- \\
|
||||||
|
// Enable / disable Questlog function (true / false)
|
||||||
|
$config['EnableQuests'] = false;
|
||||||
|
|
||||||
|
// array for filling questlog (Questid, max value, name, end of the quest fill 1 for the last part 0 for all others)
|
||||||
|
$config['Quests'] = array(
|
||||||
|
array(1501,100,'Killing in the Name of',0),
|
||||||
|
array(1502,150,'Killing in the Name of',0),
|
||||||
|
array(65001,100,'Killing in the Name of',0),
|
||||||
|
array(65002,150,'Killing in the Name of',0),
|
||||||
|
array(65003,300,'Killing in the Name of',0),
|
||||||
|
array(65004,3,'Killing in the Name of',0),
|
||||||
|
array(65005,300,'Killing in the Name of',0),
|
||||||
|
array(65006,150,'Killing in the Name of',0),
|
||||||
|
array(65007,200,'Killing in the Name of',0),
|
||||||
|
array(65008,300,'Killing in the Name of',0),
|
||||||
|
array(65009,300,'Killing in the Name of',0),
|
||||||
|
array(65010,300,'Killing in the Name of',0),
|
||||||
|
array(65011,300,'Killing in the Name of',0),
|
||||||
|
array(65012,300,'Killing in the Name of',0),
|
||||||
|
array(65013,300,'Killing in the Name of',0),
|
||||||
|
array(65014,300,'Killing in the Name of',1),
|
||||||
|
array(12110,2,'The Inquisition',0),
|
||||||
|
array(12111,7,'The Inquisition',0),
|
||||||
|
array(12112,3,'The Inquisition',0),
|
||||||
|
array(12113,6,'The Inquisition',0),
|
||||||
|
array(12114,3,'The Inquisition',0),
|
||||||
|
array(12115,3,'The Inquisition',0),
|
||||||
|
array(12116,3,'The Inquisition',0),
|
||||||
|
array(12117,5,'The Inquisition',1),
|
||||||
|
array(330,3,'Sam\'s Old Backpack',1),
|
||||||
|
array(12121,3,'The Ape City',0),
|
||||||
|
array(12122,5,'The Ape City',0),
|
||||||
|
array(12123,3,'The Ape City',0),
|
||||||
|
array(12124,3,'The Ape City',0),
|
||||||
|
array(12125,3,'The Ape City',0),
|
||||||
|
array(12126,3,'The Ape City',0),
|
||||||
|
array(12127,4,'The Ape City',0),
|
||||||
|
array(12128,3,'The Ape City',0),
|
||||||
|
array(12129,3,'The Ape City',1),
|
||||||
|
array(12101,1,'The Ancient Tombs',0),
|
||||||
|
array(12102,1,'The Ancient Tombs',0),
|
||||||
|
array(12103,1,'The Ancient Tombs',0),
|
||||||
|
array(12104,1,'The Ancient Tombs',0),
|
||||||
|
array(12105,1,'The Ancient Tombs',0),
|
||||||
|
array(12106,1,'The Ancient Tombs',0),
|
||||||
|
array(12107,1,'The Ancient Tombs',1),
|
||||||
|
array(12022,3,'Barbarian Test Quest',0),
|
||||||
|
array(12022,3,'Barbarian Test Quest',0),
|
||||||
|
array(12022,3,'Barbarian Test Quest',1),
|
||||||
|
array(12025,3,'The Ice Islands Quest',0),
|
||||||
|
array(12026,5,'The Ice Islands Quest',0),
|
||||||
|
array(12027,3,'The Ice Islands Quest',0),
|
||||||
|
array(12028,2,'The Ice Islands Quest',0),
|
||||||
|
array(12029,6,'The Ice Islands Quest',0),
|
||||||
|
array(12030,8,'The Ice Islands Quest',0),
|
||||||
|
array(12031,3,'The Ice Islands Quest',0),
|
||||||
|
array(12032,4,'The Ice Islands Quest',0),
|
||||||
|
array(12033,2,'The Ice Islands Quest',0),
|
||||||
|
array(12034,2,'The Ice Islands Quest',0),
|
||||||
|
array(12035,2,'The Ice Islands Quest',0),
|
||||||
|
array(12036,6,'The Ice Islands Quest',1),
|
||||||
|
);
|
||||||
|
|
||||||
// Vocation ids and names.
|
// Vocation ids and names.
|
||||||
$config['vocations'] = array(
|
$config['vocations'] = array(
|
||||||
0 => 'No vocation',
|
0 => 'No vocation',
|
||||||
@ -62,7 +124,7 @@
|
|||||||
7 => 'Royal Paladin',
|
7 => 'Royal Paladin',
|
||||||
8 => 'Elite Knight',
|
8 => 'Elite Knight',
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Vocation stat gains per level
|
/* Vocation stat gains per level
|
||||||
- Ordered by vocation ID
|
- Ordered by vocation ID
|
||||||
- Currently used for admin_skills page. */
|
- Currently used for admin_skills page. */
|
||||||
@ -129,7 +191,7 @@
|
|||||||
'requirePremium' => false,
|
'requirePremium' => false,
|
||||||
'levelToBuyHouse' => 8,
|
'levelToBuyHouse' => 8,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Leave on black square in map and player should get teleported to their selected town.
|
// Leave on black square in map and player should get teleported to their selected town.
|
||||||
// If chars get buggy set this position to a beginner location to force players there.
|
// If chars get buggy set this position to a beginner location to force players there.
|
||||||
$config['default_pos'] = array(
|
$config['default_pos'] = array(
|
||||||
@ -137,7 +199,7 @@
|
|||||||
'y' => 5,
|
'y' => 5,
|
||||||
'z' => 2,
|
'z' => 2,
|
||||||
);
|
);
|
||||||
|
|
||||||
$config['war_status'] = array(
|
$config['war_status'] = array(
|
||||||
0 => 'Pending..',
|
0 => 'Pending..',
|
||||||
1 => 'Accepted',
|
1 => 'Accepted',
|
||||||
@ -146,57 +208,57 @@
|
|||||||
4 => '???',
|
4 => '???',
|
||||||
5 => 'Ended',
|
5 => 'Ended',
|
||||||
);
|
);
|
||||||
|
|
||||||
/* -- SUB PAGES --
|
/* -- SUB PAGES --
|
||||||
Some custom layouts/templates have custom pages, they can use
|
Some custom layouts/templates have custom pages, they can use
|
||||||
this sub page functionality for that.
|
this sub page functionality for that.
|
||||||
*/
|
*/
|
||||||
$config['allowSubPages'] = true;
|
$config['allowSubPages'] = true;
|
||||||
|
|
||||||
// ---------------- \\
|
// ---------------- \\
|
||||||
// Create Character \\
|
// Create Character \\
|
||||||
// ---------------- \\
|
// ---------------- \\
|
||||||
|
|
||||||
// Max characters on each account:
|
// Max characters on each account:
|
||||||
$config['max_characters'] = 7;
|
$config['max_characters'] = 7;
|
||||||
|
|
||||||
// Available character vocation users can create.
|
// Available character vocation users can create.
|
||||||
$config['available_vocations'] = array(1, 2, 3, 4);
|
$config['available_vocations'] = array(1, 2, 3, 4);
|
||||||
|
|
||||||
// Available towns (specify town ids, etc: (0, 1, 2); to display 3 town options (town id 0, 1 and 2).
|
// Available towns (specify town ids, etc: (0, 1, 2); to display 3 town options (town id 0, 1 and 2).
|
||||||
$config['available_towns'] = array(2);
|
$config['available_towns'] = array(2);
|
||||||
|
|
||||||
$config['level'] = 8;
|
$config['level'] = 8;
|
||||||
$config['health'] = 185;
|
$config['health'] = 185;
|
||||||
$config['mana'] = 40;
|
$config['mana'] = 40;
|
||||||
$config['cap'] = 435;
|
$config['cap'] = 435;
|
||||||
$config['soul'] = 100;
|
$config['soul'] = 100;
|
||||||
|
|
||||||
$config['maleOutfitId'] = 128;
|
$config['maleOutfitId'] = 128;
|
||||||
$config['femaleOutfitId'] = 136;
|
$config['femaleOutfitId'] = 136;
|
||||||
$config['lookHead'] = 78;
|
$config['lookHead'] = 78;
|
||||||
$config['lookBody'] = 68;
|
$config['lookBody'] = 68;
|
||||||
$config['lookLegs'] = 58;
|
$config['lookLegs'] = 58;
|
||||||
$config['lookFeet'] = 76;
|
$config['lookFeet'] = 76;
|
||||||
|
|
||||||
// No vocation info (if user select vocation id 0, we force thees configurations on him
|
// No vocation info (if user select vocation id 0, we force thees configurations on him
|
||||||
$config['nvlevel'] = 1;
|
$config['nvlevel'] = 1;
|
||||||
$config['nvHealth'] = 150;
|
$config['nvHealth'] = 150;
|
||||||
$config['nvMana'] = 5;
|
$config['nvMana'] = 5;
|
||||||
$config['nvCap'] = 400;
|
$config['nvCap'] = 400;
|
||||||
$config['nvSoul'] = 100;
|
$config['nvSoul'] = 100;
|
||||||
|
|
||||||
$config['nvForceTown'] = 0; // Force a town to no vocation even though he selected something else? 0 = no, 1 = yes.
|
$config['nvForceTown'] = 0; // Force a town to no vocation even though he selected something else? 0 = no, 1 = yes.
|
||||||
$config['nvTown'] = 0; // Town id to force no vocations to get to, if nvForceTown is 1.
|
$config['nvTown'] = 0; // Town id to force no vocations to get to, if nvForceTown is 1.
|
||||||
|
|
||||||
// Minimum allowed character name letters. Etc 4 letters: "Kåre".
|
// Minimum allowed character name letters. Etc 4 letters: "Kåre".
|
||||||
$config['minL'] = 4;
|
$config['minL'] = 4;
|
||||||
// Maximum allowed character name letters. Etc 20 letters: "Bobkåreolesofiesberg"
|
// Maximum allowed character name letters. Etc 20 letters: "Bobkåreolesofiesberg"
|
||||||
$config['maxL'] = 20;
|
$config['maxL'] = 20;
|
||||||
|
|
||||||
// Maximum allowed character name words. Etc 2 words = "Bob Kåre", 3 words: "Bob Arne Kåre" as max char name words.
|
// Maximum allowed character name words. Etc 2 words = "Bob Kåre", 3 words: "Bob Arne Kåre" as max char name words.
|
||||||
$config['maxW'] = 2;
|
$config['maxW'] = 2;
|
||||||
|
|
||||||
// -------------- \\
|
// -------------- \\
|
||||||
// WEBSITE STUFF \\
|
// WEBSITE STUFF \\
|
||||||
// -------------- \\
|
// -------------- \\
|
||||||
@ -206,7 +268,7 @@
|
|||||||
|
|
||||||
// Enable or disable changelog ticker in news page.
|
// Enable or disable changelog ticker in news page.
|
||||||
$config['UseChangelogTicker'] = true;
|
$config['UseChangelogTicker'] = true;
|
||||||
|
|
||||||
// Highscore configuration
|
// Highscore configuration
|
||||||
$config['highscore'] = array(
|
$config['highscore'] = array(
|
||||||
'rows' => 100,
|
'rows' => 100,
|
||||||
@ -230,47 +292,50 @@
|
|||||||
|
|
||||||
$config['validate_IP'] = true; // Only allow legal IP addresses to register and create character.
|
$config['validate_IP'] = true; // Only allow legal IP addresses to register and create character.
|
||||||
$config['salt'] = false; // Some noob 0.3.6 servers don't support salt.
|
$config['salt'] = false; // Some noob 0.3.6 servers don't support salt.
|
||||||
|
|
||||||
// Restricted names
|
// Restricted names
|
||||||
$config['invalidNameTags'] = array("god", "gm", "cm", "gamemaster", "hoster", "admin", "admim", "adm", "owner", "staff");
|
$config['invalidNameTags'] = array("god", "gm", "cm", "gamemaster", "hoster", "admin", "admim", "adm", "owner", "staff");
|
||||||
|
|
||||||
|
// Use guild logo system
|
||||||
|
$config['use_guild_logos'] = 4;
|
||||||
|
|
||||||
// Level requirement to create guild? (Just set it to 1 to allow all levels).
|
// Level requirement to create guild? (Just set it to 1 to allow all levels).
|
||||||
$config['create_guild_level'] = 8;
|
$config['create_guild_level'] = 8;
|
||||||
|
|
||||||
// Change Gender can be purchased in shop, or perhaps you want to allow everyone to change gender for free?
|
// Change Gender can be purchased in shop, or perhaps you want to allow everyone to change gender for free?
|
||||||
$config['free_sex_change'] = false;
|
$config['free_sex_change'] = false;
|
||||||
|
|
||||||
// Do you need to have premium account to create a guild?
|
// Do you need to have premium account to create a guild?
|
||||||
$config['guild_require_premium'] = false;
|
$config['guild_require_premium'] = false;
|
||||||
|
|
||||||
$config['guildwar_enabled'] = true;
|
$config['guildwar_enabled'] = true;
|
||||||
|
|
||||||
// Use htaccess rewrite? (basically this makes website.com/username work instead of website.com/characterprofile.php?name=username
|
// Use htaccess rewrite? (basically this makes website.com/username work instead of website.com/characterprofile.php?name=username
|
||||||
// Linux users needs to enable mod_rewrite php extention to make it work properly, so set it to false if your lost and using Linux.
|
// Linux users needs to enable mod_rewrite php extention to make it work properly, so set it to false if your lost and using Linux.
|
||||||
$config['htwrite'] = true;
|
$config['htwrite'] = true;
|
||||||
|
|
||||||
// What client version and server port are you using on this OT?
|
// What client version and server port are you using on this OT?
|
||||||
// Used for the Downloads page.
|
// Used for the Downloads page.
|
||||||
$config['client'] = 1037; // 954 = tibia 9.54
|
$config['client'] = 1037; // 954 = tibia 9.54
|
||||||
|
|
||||||
// Download link to client. Recommended:
|
// Download link to client. Recommended:
|
||||||
// Select download link from remere map editor website!
|
// Select download link from remere map editor website!
|
||||||
// See list of clients: http://remeresmapeditor.com/marklar.php?clients
|
// See list of clients: http://remeresmapeditor.com/marklar.php?clients
|
||||||
$config['client_download'] = 'http://clients.tibiaking.com/client/windows/'. $config['client'] .'';
|
$config['client_download'] = 'http://clients.tibiaking.com/client/windows/'. $config['client'] .'';
|
||||||
$config['client_download_linux'] = 'http://clients.tibiaking.com/client/linux/'. $config['client'] .'';
|
$config['client_download_linux'] = 'http://clients.tibiaking.com/client/linux/'. $config['client'] .'';
|
||||||
|
|
||||||
$config['port'] = 7171; // Port number to connect to your OT.
|
$config['port'] = 7171; // Port number to connect to your OT.
|
||||||
|
|
||||||
// How often do you want highscores to update?
|
// How often do you want highscores to update?
|
||||||
$config['cache_lifespan'] = 5;//60 * 15; // 15 minutes.
|
$config['cache_lifespan'] = 5;//60 * 15; // 15 minutes.
|
||||||
|
|
||||||
// WARNING! Account names written here will have admin access to web page!
|
// WARNING! Account names written here will have admin access to web page!
|
||||||
$config['page_admin_access'] = array(
|
$config['page_admin_access'] = array(
|
||||||
//'otland0',
|
//'otland0',
|
||||||
//'otland1',
|
//'otland1',
|
||||||
'znote'
|
'znote'
|
||||||
);
|
);
|
||||||
|
|
||||||
// Built-in FORUM
|
// Built-in FORUM
|
||||||
// Enable forum, enable guildboards, level to create threads/post in them
|
// Enable forum, enable guildboards, level to create threads/post in them
|
||||||
// How long do they have to wait to create thread or post?
|
// How long do they have to wait to create thread or post?
|
||||||
@ -293,12 +358,12 @@
|
|||||||
'guilds' => false,
|
'guilds' => false,
|
||||||
'guildwars' => false,
|
'guildwars' => false,
|
||||||
);
|
);
|
||||||
|
|
||||||
// IMPORTANT! Write a character name(that exist) that will represent website bans!
|
// IMPORTANT! Write a character name(that exist) that will represent website bans!
|
||||||
// Or remember to create character "God Website" character exist.
|
// Or remember to create character "God Website" character exist.
|
||||||
// If you don't do this, bann from admin panel won't work properly.
|
// If you don't do this, bann from admin panel won't work properly.
|
||||||
$config['website_char'] = 'Luxitur';
|
$config['website_char'] = 'Luxitur';
|
||||||
|
|
||||||
//----------------\\
|
//----------------\\
|
||||||
// ADVANCED STUFF \\
|
// ADVANCED STUFF \\
|
||||||
//----------------\\
|
//----------------\\
|
||||||
@ -316,17 +381,17 @@
|
|||||||
5 => 'Community Manager',
|
5 => 'Community Manager',
|
||||||
6 => 'God',
|
6 => 'God',
|
||||||
);
|
);
|
||||||
|
|
||||||
// Enable OS advanced feautures? false = no, true = yes
|
// Enable OS advanced feautures? false = no, true = yes
|
||||||
$config['os_enabled'] = false;
|
$config['os_enabled'] = false;
|
||||||
|
|
||||||
// What kind of computer are you hosting this website on?
|
// What kind of computer are you hosting this website on?
|
||||||
// Available options: LINUX or WINDOWS
|
// Available options: LINUX or WINDOWS
|
||||||
$config['os'] = 'WINDOWS';
|
$config['os'] = 'WINDOWS';
|
||||||
|
|
||||||
// Measure how much players are lagging in-game. (Not completed).
|
// Measure how much players are lagging in-game. (Not completed).
|
||||||
$config['ping'] = false;
|
$config['ping'] = false;
|
||||||
|
|
||||||
// BAN STUFF - Don't touch this unless you know what you are doing.
|
// BAN STUFF - Don't touch this unless you know what you are doing.
|
||||||
// You can order the lines the way you want, from top to bot, in which order you
|
// You can order the lines the way you want, from top to bot, in which order you
|
||||||
// wish for them to be displayed in admin panel. Just make sure key[#] represent your describtion.
|
// wish for them to be displayed in admin panel. Just make sure key[#] represent your describtion.
|
||||||
@ -337,7 +402,7 @@
|
|||||||
5 => 'DELETE_ACCOUNT',
|
5 => 'DELETE_ACCOUNT',
|
||||||
1 => 'BAN_IPADDRESS',
|
1 => 'BAN_IPADDRESS',
|
||||||
);
|
);
|
||||||
|
|
||||||
// BAN STUFF - Don't touch this unless you know what you are doing.
|
// BAN STUFF - Don't touch this unless you know what you are doing.
|
||||||
// You can order the lines the way you want, from top to bot, in which order you
|
// You can order the lines the way you want, from top to bot, in which order you
|
||||||
// wish for them to be displayed in admin panel. Just make sure key[#] represent your describtion.
|
// wish for them to be displayed in admin panel. Just make sure key[#] represent your describtion.
|
||||||
@ -350,7 +415,7 @@
|
|||||||
5 => 'NR + Ban + FW',
|
5 => 'NR + Ban + FW',
|
||||||
6 => 'Statement Report',
|
6 => 'Statement Report',
|
||||||
);
|
);
|
||||||
|
|
||||||
// Ban reasons, for changes beside default values to work with client,
|
// Ban reasons, for changes beside default values to work with client,
|
||||||
// you also need to edit sources (tools.cpp line 1096)
|
// you also need to edit sources (tools.cpp line 1096)
|
||||||
$config['ban_reason'] = array(
|
$config['ban_reason'] = array(
|
||||||
@ -377,7 +442,7 @@
|
|||||||
20 => 'Excessive Unjustified Player Killing',
|
20 => 'Excessive Unjustified Player Killing',
|
||||||
21 => 'Spoiling Auction',
|
21 => 'Spoiling Auction',
|
||||||
);
|
);
|
||||||
|
|
||||||
// BAN STUFF
|
// BAN STUFF
|
||||||
// Ban time duration selection in admin panel
|
// Ban time duration selection in admin panel
|
||||||
// seconds => describtion
|
// seconds => describtion
|
||||||
@ -391,14 +456,14 @@
|
|||||||
1209600 => '2 weeks',
|
1209600 => '2 weeks',
|
||||||
2592000 => '1 month',
|
2592000 => '1 month',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// --------------- \\
|
// --------------- \\
|
||||||
// SECURITY STUFF \\
|
// SECURITY STUFF \\
|
||||||
// --------------- \\
|
// --------------- \\
|
||||||
$config['use_token'] = false;
|
$config['use_token'] = false;
|
||||||
$config['use_captcha'] = false;
|
$config['use_captcha'] = false;
|
||||||
|
|
||||||
/* Store visitor data
|
/* Store visitor data
|
||||||
Store visitor data in the database, logging every IP visitng site,
|
Store visitor data in the database, logging every IP visitng site,
|
||||||
and how many times they have visited the site. And sometimes what
|
and how many times they have visited the site. And sometimes what
|
||||||
@ -411,14 +476,14 @@
|
|||||||
if table never gets flushed once in a while. So I highly recommend you
|
if table never gets flushed once in a while. So I highly recommend you
|
||||||
to configure flush_ip_logs if IPs are logged.
|
to configure flush_ip_logs if IPs are logged.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$config['log_ip'] = false;
|
$config['log_ip'] = false;
|
||||||
|
|
||||||
// Flush IP logs each configured seconds, 60 * 15 = 15 minutes.
|
// Flush IP logs each configured seconds, 60 * 15 = 15 minutes.
|
||||||
// Set to false to entirely disable ip log flush.
|
// Set to false to entirely disable ip log flush.
|
||||||
// It is important to flush for optimal performance.
|
// It is important to flush for optimal performance.
|
||||||
$config['flush_ip_logs'] = 59 * 27;
|
$config['flush_ip_logs'] = 59 * 27;
|
||||||
|
|
||||||
/* IP SECURTY REQUIRE: $config['log_ip'] = true;
|
/* IP SECURTY REQUIRE: $config['log_ip'] = true;
|
||||||
Configure how tight this security shall be.
|
Configure how tight this security shall be.
|
||||||
Etc: You can max click on anything/refresh page
|
Etc: You can max click on anything/refresh page
|
||||||
@ -434,7 +499,7 @@
|
|||||||
'max_character' => 1, // create char
|
'max_character' => 1, // create char
|
||||||
'max_forum_post' => 1, // Create threads and post in forum
|
'max_forum_post' => 1, // Create threads and post in forum
|
||||||
);
|
);
|
||||||
|
|
||||||
//////////////
|
//////////////
|
||||||
/// PAYPAL ///
|
/// PAYPAL ///
|
||||||
//////////////
|
//////////////
|
||||||
@ -462,7 +527,7 @@
|
|||||||
25 => 325, // +30% bonus
|
25 => 325, // +30% bonus
|
||||||
30 => 420, // +40% bonus
|
30 => 420, // +40% bonus
|
||||||
);
|
);
|
||||||
|
|
||||||
//////////////////
|
//////////////////
|
||||||
/// PAYGOL SMS ///
|
/// PAYGOL SMS ///
|
||||||
//////////////////
|
//////////////////
|
||||||
@ -479,7 +544,7 @@
|
|||||||
'returnURL' => "http://".$_SERVER['HTTP_HOST']."/success.php",
|
'returnURL' => "http://".$_SERVER['HTTP_HOST']."/success.php",
|
||||||
'cancelURL' => "http://".$_SERVER['HTTP_HOST']."/failed.php"
|
'cancelURL' => "http://".$_SERVER['HTTP_HOST']."/failed.php"
|
||||||
);
|
);
|
||||||
|
|
||||||
////////////
|
////////////
|
||||||
/// SHOP ///
|
/// SHOP ///
|
||||||
////////////
|
////////////
|
||||||
@ -504,7 +569,7 @@
|
|||||||
// leastTime = Lowest duration of time an auctioned player has to be
|
// leastTime = Lowest duration of time an auctioned player has to be
|
||||||
// sellable before auctioneer can claim character back.
|
// sellable before auctioneer can claim character back.
|
||||||
);
|
);
|
||||||
|
|
||||||
// If useDB is false, this array list will be used for shop offers.
|
// If useDB is false, this array list will be used for shop offers.
|
||||||
$config['shop_offers'] = array(
|
$config['shop_offers'] = array(
|
||||||
// offer 1
|
// offer 1
|
||||||
@ -515,7 +580,7 @@
|
|||||||
'describtion' => "Crystal coin.", // Describtion shown on website
|
'describtion' => "Crystal coin.", // Describtion shown on website
|
||||||
'points' => 100, // How many points this offer costs
|
'points' => 100, // How many points this offer costs
|
||||||
),
|
),
|
||||||
|
|
||||||
// offer 2
|
// offer 2
|
||||||
2 => array(
|
2 => array(
|
||||||
'type' => 1,
|
'type' => 1,
|
||||||
@ -524,7 +589,7 @@
|
|||||||
'describtion' => "Fire sword.",
|
'describtion' => "Fire sword.",
|
||||||
'points' => 10,
|
'points' => 10,
|
||||||
),
|
),
|
||||||
|
|
||||||
// offer 3
|
// offer 3
|
||||||
3 => array(
|
3 => array(
|
||||||
'type' => 2,
|
'type' => 2,
|
||||||
@ -533,7 +598,7 @@
|
|||||||
'describtion' => "Premium membership.",
|
'describtion' => "Premium membership.",
|
||||||
'points' => 25,
|
'points' => 25,
|
||||||
),
|
),
|
||||||
|
|
||||||
// offer 4
|
// offer 4
|
||||||
4 => array(
|
4 => array(
|
||||||
'type' => 3,
|
'type' => 3,
|
||||||
@ -557,4 +622,4 @@
|
|||||||
'points' => 20,
|
'points' => 20,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
?>
|
?>
|
@ -407,4 +407,103 @@ function sanitize($data) {
|
|||||||
function output_errors($errors) {
|
function output_errors($errors) {
|
||||||
return '<ul><li>'. implode('</li><li>', $errors) .'</li></ul>';
|
return '<ul><li>'. implode('</li><li>', $errors) .'</li></ul>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Resize images
|
||||||
|
|
||||||
|
function resize_imagex($file, $width, $height) {
|
||||||
|
|
||||||
|
list($w, $h) = getimagesize($file['tmp']);
|
||||||
|
|
||||||
|
$ratio = max($width/$w, $height/$h);
|
||||||
|
$h = ceil($height / $ratio);
|
||||||
|
$x = ($w - $width / $ratio) / 2;
|
||||||
|
$w = ceil($width / $ratio);
|
||||||
|
|
||||||
|
$path = 'engine/guildimg/'.$file['new_name'];
|
||||||
|
|
||||||
|
$imgString = file_get_contents($file['tmp']);
|
||||||
|
|
||||||
|
$image = imagecreatefromstring($imgString);
|
||||||
|
$tmp = imagecreatetruecolor($width, $height);
|
||||||
|
imagecopyresampled($tmp, $image,
|
||||||
|
0, 0,
|
||||||
|
$x, 0,
|
||||||
|
$width, $height,
|
||||||
|
$w, $h);
|
||||||
|
|
||||||
|
imagegif($tmp, $path);
|
||||||
|
imagedestroy($image);
|
||||||
|
imagedestroy($tmp);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Guild logo upload security
|
||||||
|
function check_image($image) {
|
||||||
|
|
||||||
|
$image_data = array('new_name' => $_GET['name'].'.gif', 'name' => $image['name'], 'tmp' => $image['tmp_name'], 'error' => $image['error'], 'size' => $image['size'], 'type' => $image['type']);
|
||||||
|
|
||||||
|
// First security check, quite useless but still do its job
|
||||||
|
if ($image_data['type'] === 'image/gif') {
|
||||||
|
|
||||||
|
// Second security check, lets go
|
||||||
|
$check = getimagesize($image_data['tmp']);
|
||||||
|
|
||||||
|
if ($check) {
|
||||||
|
|
||||||
|
// Third
|
||||||
|
if ($check['mime'] === 'image/gif') {
|
||||||
|
|
||||||
|
$path_info = pathinfo($image_data['name']);
|
||||||
|
|
||||||
|
// Last one
|
||||||
|
if ($path_info['extension'] === 'gif') {
|
||||||
|
|
||||||
|
// Resize image
|
||||||
|
$img = resize_imagex($image_data, 150, 150);
|
||||||
|
|
||||||
|
if ($img) {
|
||||||
|
|
||||||
|
header('Location: guilds.php?name='. $_GET['name']);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
header('Location: guilds.php?name='. $_GET['name']);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
header('Location: guilds.php?name='. $_GET['name']);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
header('Location: guilds.php?name='. $_GET['name']);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
header('Location: guilds.php?name='. $_GET['name']);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check guild logo
|
||||||
|
function logo_exists($guild) {
|
||||||
|
|
||||||
|
if (file_exists('engine/guildimg/'.$guild.'.gif')) {
|
||||||
|
|
||||||
|
echo'engine/guildimg/'.$guild.'.gif';
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
echo'engine/guildimg/default@logo.gif';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
BIN
engine/guildimg/default@logo.gif
Normal file
BIN
engine/guildimg/default@logo.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
27
guilds.php
27
guilds.php
@ -167,7 +167,7 @@ if (user_logged_in() === true) {
|
|||||||
// Display the specific guild page
|
// Display the specific guild page
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<h1>Guild: <?php echo sanitize($_GET['name']);
|
<h1><img src="<?php logo_exists(sanitize($_GET['name'])); ?>"></img> Guild: <?php echo sanitize($_GET['name']);
|
||||||
?> </h1>
|
?> </h1>
|
||||||
<table id="guildViewTable" class="table table-striped">
|
<table id="guildViewTable" class="table table-striped">
|
||||||
<tr class="yellow">
|
<tr class="yellow">
|
||||||
@ -534,8 +534,31 @@ if ($highest_access >= 2) {
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($config['use_guild_logos']) {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<!-- form to upload guild logo -->
|
||||||
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
|
<ul>
|
||||||
|
<li>Upload guild logo:<br>
|
||||||
|
<input type="file" name="file" id="file" accept="image/gif">
|
||||||
|
<input type="submit" name="submit" value="Upload guild logo">
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (!empty($_FILES['file'])) {
|
||||||
|
|
||||||
|
check_image($_FILES['file']);
|
||||||
|
|
||||||
|
echo '<br><br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
} ?>
|
||||||
<!-- forms to invite character -->
|
<!-- forms to invite character -->
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<ul>
|
<ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user