Skip to content
This repository has been archived by the owner on Apr 30, 2018. It is now read-only.

Commit

Permalink
webMCRex 2.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
PolarWooolf committed Aug 1, 2015
2 parents 0c890ff + 8b42aed commit 0799975
Show file tree
Hide file tree
Showing 40 changed files with 504 additions and 430 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ upload/MineCraft/tmp/skin_buffer/
upload/main.cfg.php
*log.txt
log.txt
upload/cache/*.php
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# webMCR

- **Author** : NC22 (modified by WorldsOfCubes Group)
- **Version** : 2.0
- **Version** : 2.1
- **Website** : [WorldsOfCubes.NET](http://WorldsOfCubes.NET)
- **Wiki** : [bitbucket.org/WorldsOfCubes/webmcrex/wiki](http://bitbucket.org/WorldsOfCubes/webmcrex/wiki)

Expand Down
2 changes: 1 addition & 1 deletion README_RUS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# webMCR

- **Автор** : NC22 (modified by WorldsOfCubes Group)
- **Версия** : 2.0
- **Версия** : 2.1
- **Сайт** : [WorldsOfCubes.NET](http://WorldsOfCubes.NET)
- **Вики** : [bitbucket.org/WorldsOfCubes/webmcrex/wiki](http://bitbucket.org/WorldsOfCubes/webmcrex/wiki)

Expand Down
9 changes: 8 additions & 1 deletion upload/action.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
exit;
$method = (isset($_POST['method'])) ? $_POST['method'] : $_GET['method'];

if((!isset($config['debug']) or !$config['debug']) and is_dir(MCR_ROOT.'install'))
exit("Please remove 'install' directory");
switch ($method) {
case 'comment':
case 'del_com':
Expand Down Expand Up @@ -232,8 +234,13 @@

$mod_user = $user;

if ($user->lvl() >= 15 and !empty($_POST['user_id']))
if ($user->lvl() >= 15 and !empty($_POST['user_id'])) {

if(!isset($_POST['passwrd']) or ! $user->authenticate($_POST['passwrd']))
aExit(2, lng("WRONG_PASSWORD"));

$mod_user = new User((int)$_POST['user_id']);
}

if (!$mod_user->id())
aExit(2, lng('USER_NOT_EXIST'));
Expand Down
3 changes: 3 additions & 0 deletions upload/cache/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Files *>
Deny from all
</Files>
19 changes: 12 additions & 7 deletions upload/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ function show_error($html, $page) {
$mode = $config['s_dpage'];
if ($mode == 'users')
$mode = 'user';

if((!isset($config['debug']) or !$config['debug']) and is_dir(MCR_ROOT.'install')){
$content_main = View::ShowStaticPage('remove_install.html', 'other/install/');
$page = lng('REMOVE_INSTALL_FOLDER');
} else
switch ($mode) {
case 'start':
$page = 'Начать игру';
Expand Down Expand Up @@ -172,13 +175,15 @@ function show_error($html, $page) {
$content_js .= InitJS();
if (!empty($user) and $mode != 'pm')
$content_side .= CheckPM();
ob_start();
//ob_start();
if ($tpl_cache_info['updated'])
TemplateParser::UpdateCacheInfo();
include View::Get('index.html');
$html_page = ob_get_clean();
loadTool("template.class.php");
$parser = new TemplateParser();
$html_page = $parser->parse($html_page);
echo $html_page;
//$html_page = ob_get_clean();
//loadTool("template.class.php");
//$parser = new TemplateParser();
//$html_page = $parser->parse($html_page);
//echo $html_page;
if(isset($config['debug']) and $config['debug']) {
echo (memory_get_usage() - $mem_start)/1024 . "КБ памяти использовано";
echo "\n<br />SQL запросов сделано: ".$queries."\r\n";
Expand Down
1 change: 1 addition & 0 deletions upload/install/CMS/config/config_usual.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
);

$site_ways = array(
'cache' => 'cache/',
'style' => 'style/',
'mcraft' => 'MineCraft/',
'skins' => 'MinecraftSkins/',
Expand Down
92 changes: 0 additions & 92 deletions upload/install/CMS/config/config_wocauth.php

This file was deleted.

2 changes: 2 additions & 0 deletions upload/install/CMS/sql/sql_authme.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@

BD($bd_alter_users."ADD `{$bd_users['deadtry']}` tinyint(1) DEFAULT 0;");
BD($bd_alter_users."ADD `{$bd_users['female']}` tinyint(1) NOT NULL DEFAULT '2';");
BD($bd_alter_users."ADD `wocid` bigint(20) NOT NULL DEFAULT 0;");
BD($bd_alter_users."ADD `{$bd_users['email']}` varchar(50) DEFAULT NULL;");
BD($bd_alter_users."ADD `{$bd_users['tmp']}` char(32) NOT NULL DEFAULT '0';");
BD($bd_alter_users."ADD `woctoken` char(32) DEFAULT NULL;");
BD($bd_alter_users."ADD `{$bd_users['group']}` int(10) NOT NULL DEFAULT 1;");
BD($bd_alter_users."ADD `comments_num` int(10) NOT NULL DEFAULT 0;");
BD($bd_alter_users."ADD `gameplay_last` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
Expand Down
10 changes: 6 additions & 4 deletions upload/install/CMS/sql/sql_common.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@
('email-name', 'Info'),
('email-mail', 'noreply@noreply.ru');");

if (!BD_ColumnExist($bd_names['users'], 'pass_set') && $mode == "wocauth")

BD("ALTER TABLE `{$bd_names['users']}` ADD `pass_set` tinyint(1) NOT NULL DEFAULT 0;");

/* webMCR 2.05 UPDATE */

if (!BD_ColumnExist($bd_names['ip_banning'], 'ban_type'))
Expand Down Expand Up @@ -285,6 +281,12 @@
BD("ALTER TABLE `{$bd_names['groups']}` ADD `change_prefix` SMALLINT(1) NOT NULL DEFAULT 0;");
}

/* webMCRex 2.1b4 UPDATE, fixed in 2.0b5 */
if (!BD_ColumnExist($bd_names['users'], 'wocid')) {
BD("ALTER TABLE `{$bd_names['users']}` ADD `wocid` bigint(20) NOT NULL DEFAULT 0;");
BD("ALTER TABLE `{$bd_names['users']}` ADD `woctoken` char(32) NOT NULL DEFAULT '';");
}

BD("CREATE TABLE IF NOT EXISTS `{$bd_names['action_log']}` (
`IP` varchar(16) NOT NULL,
`first_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
Expand Down
2 changes: 2 additions & 0 deletions upload/install/CMS/sql/sql_usual.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
BD("CREATE TABLE IF NOT EXISTS `{$bd_names['users']}` (
`{$bd_users['id']}` bigint(20) NOT NULL AUTO_INCREMENT,
`{$bd_users['login']}` char(32) DEFAULT NULL,
`wocid` bigint(20) NOT NULL DEFAULT 0,
`{$bd_users['female']}` tinyint(1) NOT NULL DEFAULT '2',
`{$bd_users['deadtry']}` tinyint(1) DEFAULT 0,
`{$bd_users['email']}` varchar(50) default NULL,
`{$bd_users['password']}` char(32) DEFAULT NULL,
`{$bd_users['tmp']}` char(32) NOT NULL DEFAULT '0',
`woctoken` bigint(20) NOT NULL DEFAULT 0,
`{$bd_users['ip']}` varchar(16) DEFAULT NULL,
`{$bd_users['group']}` int(10) NOT NULL DEFAULT 1,
`comments_num` int(10) NOT NULL DEFAULT 0,
Expand Down
44 changes: 0 additions & 44 deletions upload/install/CMS/sql/sql_wocauth.php

This file was deleted.

2 changes: 2 additions & 0 deletions upload/install/CMS/sql/sql_xauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@

BD($bd_alter_users."ADD `{$bd_users['deadtry']}` tinyint(1) DEFAULT 0;");
BD($bd_alter_users."ADD `{$bd_users['session']}` varchar(255) DEFAULT NULL;");
BD($bd_alter_users."ADD `wocid` bigint(20) NOT NULL DEFAULT 0;");
BD($bd_alter_users."ADD `{$bd_users['clientToken']}` varchar(255) DEFAULT NULL;");
BD($bd_alter_users."ADD `{$bd_users['server']}` varchar(255) DEFAULT NULL;");
BD($bd_alter_users."ADD `{$bd_users['tmp']}` char(32) NOT NULL DEFAULT '0';");
BD($bd_alter_users."ADD `woctoken` char(32) DEFAULT NULL;");
BD($bd_alter_users."ADD `{$bd_users['female']}` tinyint(1) NOT NULL DEFAULT '0';");
BD($bd_alter_users."ADD `{$bd_users['ip']}` varchar(16) DEFAULT NULL;");
BD($bd_alter_users."ADD `{$bd_users['group']}` int(10) NOT NULL DEFAULT 1;");
Expand Down
Loading

0 comments on commit 0799975

Please sign in to comment.