diff --git a/config.php b/config.php index 5457d21..b9ebd46 100644 --- a/config.php +++ b/config.php @@ -4,9 +4,9 @@ // TFS 0.3 = TFS_03 (If ur using 0.3.6, set $config['salt'] to false)! // TFS 0.4 = TFS_03 // TFS 1.0 = TFS_10 (Under developement) - $config['TFSVersion'] = 'TFS_03'; + $config['TFSVersion'] = 'TFS_10'; // As far as I know, OTX is based on TFS_03, so make sure TFS version is configured TFS_03 - $config['CustomVersion'] = 'OTX'; // Not using OTX? Replace 'OTX' with: false + $config['CustomVersion'] = false; $config['site_title'] = 'Znote AAC'; $config['site_title_context'] = 'Because open communities are good communities. :3'; @@ -20,13 +20,13 @@ // ------------------------ \\ // phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.). - $config['sqlUser'] = 'otx03'; + $config['sqlUser'] = 'tfs10'; // phpmyadmin password for OT server: - $config['sqlPassword'] = 'otx03'; + $config['sqlPassword'] = 'tfs10'; // The database name to connect to. (This is usually same as username). - $config['sqlDatabase'] = 'otx03'; + $config['sqlDatabase'] = 'tfs10'; // Hostname is usually localhost or 127.0.0.1. $config['sqlHost'] = 'localhost'; @@ -335,7 +335,7 @@ $config['page_admin_access'] = array( //'otland0', //'otland1', - //'znote' + 'znote' ); // Built-in FORUM @@ -380,6 +380,7 @@ $config['zeotss'] = array( 'enabled' => false, 'visitors' => true, + 'debug' => false, 'server' => "http://zeotss.znote.eu/" ); // Don't touch this unless you know what you are doing. (modifying this(key value) also requires modifications in OT files /XML/commands.xml). diff --git a/engine/function/general.php b/engine/function/general.php index 5de0446..eb0cae7 100644 --- a/engine/function/general.php +++ b/engine/function/general.php @@ -460,7 +460,7 @@ function check_image($image) { if ($path_info['extension'] === 'gif') { // Resize image - $img = resize_imagex($image_data, 150, 150); + $img = resize_imagex($image_data, 100, 100); if ($img) { @@ -470,25 +470,25 @@ function check_image($image) { } else { - header('Location: guilds.php?name='. $_GET['name']); + header('Location: guilds.php?error=Only gif images accepted, you uploaded:['.$path_info['extension'].'].&name='. $_GET['name']); exit(); } } else { - header('Location: guilds.php?name='. $_GET['name']); + header('Location: guilds.php?error=Only gif images accepted, you uploaded:['.$check['mime'].'].&name='. $_GET['name']); exit(); } } else { - header('Location: guilds.php?name='. $_GET['name']); + header('Location: guilds.php?error=Uploaded image is invalid.&name='. $_GET['name']); exit(); } } else { - header('Location: guilds.php?name='. $_GET['name']); + header('Location: guilds.php?error=Only gif images are accepted, you uploaded:['.$image_data['type'].'].&name='. $_GET['name']); exit(); } } diff --git a/engine/function/users.php b/engine/function/users.php index aa2b6b0..4ca5a93 100644 --- a/engine/function/users.php +++ b/engine/function/users.php @@ -490,6 +490,12 @@ function get_guild_id($name) { return ($data !== false) ? $data['id'] : false; } +// Returns guild data from name +function get_guild_data($name) { + $name = sanitize($name); + return mysql_select_single("SELECT `id`, `name`, `ownerid`, `creationdata`, `motd` FROM `guilds` WHERE `name`='$name' LIMIT 1;"); +} + // Get complete list of guilds function get_guilds_list() { return mysql_select_multi("SELECT `id`, `name`, `creationdata` FROM `guilds` ORDER BY `name`;"); diff --git a/engine/guildimg/default@logo.gif b/engine/guildimg/default@logo.gif index 11b1585..404a0df 100644 Binary files a/engine/guildimg/default@logo.gif and b/engine/guildimg/default@logo.gif differ diff --git a/engine/init.php b/engine/init.php index 58fe6d2..e405099 100644 --- a/engine/init.php +++ b/engine/init.php @@ -33,7 +33,7 @@ Token::generate(); if (user_logged_in() === true) { $session_user_id = $_SESSION['user_id']; - $user_data = user_data($session_user_id, 'id', 'name', 'password', 'email'); + $user_data = user_data($session_user_id, 'id', 'name', 'password', 'email', 'premdays'); $user_znote_data = user_znote_account_data($session_user_id, 'ip', 'created', 'points', 'cooldown'); } diff --git a/guilds.php b/guilds.php index 5d80414..59ee96b 100644 --- a/guilds.php +++ b/guilds.php @@ -25,7 +25,10 @@ if (empty($_GET['name'])) {

Guild List:

@@ -124,7 +127,8 @@ if (user_logged_in() === true) {
+ ".sanitize($_GET['error'])."

" : ""; ?>
@@ -176,7 +181,7 @@ if (user_logged_in() === true) {

Guild:

-

Motive of the Guild

+

@@ -382,6 +387,13 @@ if ($highest_access >= 2) { } else echo 'That character is already invited(or a member) on this guild.'; } else echo 'That character name does not exist.'; } + // Guild Message (motd) + if (!empty($_POST['motd'])) { + $motd = sanitize($_POST['motd']); + mysql_update("UPDATE `guilds` SET `motd`='$motd' WHERE `id`='$gid' LIMIT 1;"); + header('Location: guilds.php?name='. $_GET['name']); + exit(); + } if (!empty($_POST['disband'])) { // @@ -561,7 +573,7 @@ if ($highest_access >= 2) { + + + + 1) { ?> diff --git a/myaccount.php b/myaccount.php index b23f8a3..6e8b457 100644 --- a/myaccount.php +++ b/myaccount.php @@ -76,8 +76,9 @@ if (!empty($_POST['change_name'])) { } else $player = mysql_select_single("SELECT `id`, `account_id`, `online` FROM `players` WHERE `name` = '$oldname'"); // Check if player has bough ticket - $order = mysql_select_single("SELECT `id`, `account_id` FROM `znote_shop_orders` WHERE `type`='4' LIMIT 1;"); + $order = mysql_select_single("SELECT `id`, `account_id` FROM `znote_shop_orders` WHERE `type`='4' AND `account_id`='".$player['account_id']."' LIMIT 1;"); if ($order !== false) { + //data_dump($order, array($player['account_id'], $session_user_id), "data"); // Check if player and account matches if ($session_user_id == $player['account_id'] && $session_user_id == $order['account_id']) { // Check if new name is not occupied @@ -88,7 +89,7 @@ if (!empty($_POST['change_name'])) { if ($newname !== false) { $error = false; // name restriction - $resname = explode(" ", $_POST['name']); + $resname = explode(" ", $newname); foreach($resname as $res) { if(in_array(strtolower($res), $config['invalidNameTags'])) { $error = true; @@ -217,10 +218,11 @@ if (!empty($_POST['selected_comment'])) { ?>

My account

-

Welcome to your account page,

- +

Welcome to your account page,
+ You have days remaining premium account.

Character List: characters.