diff --git a/install.php b/install.php index e10db49..c8e1795 100644 --- a/install.php +++ b/install.php @@ -1,8 +1,9 @@  @@ -66,165 +67,157 @@ '; - - if(!is_writable('./other/dbconfig.php')) { - $err_msg = $lang['isntwicfg']; - $err_lvl = 2; - } else { - $count = 1; - if(($mysqlcon->exec("DROP DATABASE `$dbname`")) === false) { } - - if($mysqlcon->exec("CREATE DATABASE `$dbname`") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - if($mysqlcon->exec("CREATE TABLE `$dbname`.`user` (`uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`cldbid` int(10) NOT NULL default '0',`count` DECIMAL(14,3) NOT NULL default '0',`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,`lastseen` int(10) UNSIGNED NOT NULL default '0',`grpid` int(10) NOT NULL default '0',`nextup` int(10) NOT NULL default '0',`idle` DECIMAL(14,3) NOT NULL default '0',`cldgroup` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`online` tinyint(1) NOT NULL default '0',`boosttime` int(10) UNSIGNED NOT NULL default '0',`rank` smallint(5) UNSIGNED NOT NULL default '65535',`platform` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,`nation` char(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,`version` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,`firstcon` int(10) UNSIGNED NOT NULL default '0',`except` tinyint(1) NOT NULL default '0',`grpsince` int(10) UNSIGNED NOT NULL default '0',`cid` int(10) NOT NULL default '0')") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } else { - if($mysqlcon->exec("CREATE INDEX `user_version` ON `$dbname`.`user` (`version`)") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - if($mysqlcon->exec("CREATE INDEX `user_cldbid` ON `$dbname`.`user` (`cldbid` ASC,`uuid`,`rank`)") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - if($mysqlcon->exec("CREATE INDEX `user_online` ON `$dbname`.`user` (`online`,`lastseen`)") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`groups` (`sgid` int(10) UNSIGNED NOT NULL default '0' PRIMARY KEY,`sgidname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,`iconid` bigint(10) NOT NULL default '0',`icondate` int(10) UNSIGNED NOT NULL default '0',`sortid` int(10) NOT NULL default '0',`type` tinyint(1) NOT NULL default '0',`ext` char(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`cfg_params` (`param` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY, `value` varchar(21588) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`server_usage` (`timestamp` int(10) UNSIGNED NOT NULL default '0',`clients` smallint(5) UNSIGNED NOT NULL default '0',`channel` smallint(5) UNSIGNED NOT NULL default '0')") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } else { - if($mysqlcon->exec("CREATE INDEX `serverusage_timestamp` ON `$dbname`.`server_usage` (`timestamp`)") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`user_snapshot` (`id` tinyint(3) UNSIGNED NOT NULL default '0',`cldbid` int(10) UNSIGNED NOT NULL default '0',`count` int(10) UNSIGNED NOT NULL default '0',`idle` int(10) UNSIGNED NOT NULL default '0',PRIMARY KEY (`id`,`cldbid`));") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } else { - if($mysqlcon->exec("CREATE INDEX `snapshot_id` ON `$dbname`.`user_snapshot` (`id`)") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - if($mysqlcon->exec("CREATE INDEX `snapshot_cldbid` ON `$dbname`.`user_snapshot` (`cldbid`)") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_server` (`total_user` int(10) NOT NULL default '0',`total_online_time` bigint(13) NOT NULL default '0',`total_online_month` bigint(11) NOT NULL default '0',`total_online_week` bigint(11) NOT NULL default '0',`total_active_time` bigint(11) NOT NULL default '0',`total_inactive_time` bigint(11) NOT NULL default '0',`country_nation_name_1` varchar(3) NOT NULL default '0',`country_nation_name_2` varchar(3) NOT NULL default '0',`country_nation_name_3` varchar(3) NOT NULL default '0',`country_nation_name_4` varchar(3) NOT NULL default '0',`country_nation_name_5` varchar(3) NOT NULL default '0',`country_nation_1` int(10) NOT NULL default '0',`country_nation_2` int(10) NOT NULL default '0',`country_nation_3` int(10) NOT NULL default '0',`country_nation_4` int(10) NOT NULL default '0',`country_nation_5` int(10) NOT NULL default '0',`country_nation_other` int(10) NOT NULL default '0',`platform_1` int(10) NOT NULL default '0',`platform_2` int(10) NOT NULL default '0',`platform_3` int(10) NOT NULL default '0',`platform_4` int(10) NOT NULL default '0',`platform_5` int(10) NOT NULL default '0',`platform_other` int(10) NOT NULL default '0',`version_name_1` varchar(35) NOT NULL default '0',`version_name_2` varchar(35) NOT NULL default '0',`version_name_3` varchar(35) NOT NULL default '0',`version_name_4` varchar(35) NOT NULL default '0',`version_name_5` varchar(35) NOT NULL default '0',`version_1` int(10) NOT NULL default '0',`version_2` int(10) NOT NULL default '0',`version_3` int(10) NOT NULL default '0',`version_4` int(10) NOT NULL default '0',`version_5` int(10) NOT NULL default '0',`version_other` int(10) NOT NULL default '0',`server_status` tinyint(1) NOT NULL default '0',`server_free_slots` smallint(5) NOT NULL default '0',`server_used_slots` smallint(5) NOT NULL default '0',`server_channel_amount` smallint(5) NOT NULL default '0',`server_ping` smallint(5) NOT NULL default '0',`server_packet_loss` float (4,4),`server_bytes_down` bigint(11) NOT NULL default '0',`server_bytes_up` bigint(11) NOT NULL default '0',`server_uptime` bigint(11) NOT NULL default '0',`server_id` smallint(5) NOT NULL default '0',`server_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`server_pass` tinyint(1) NOT NULL default '0',`server_creation_date` bigint(11) NOT NULL default '0',`server_platform` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`server_weblist` tinyint(1) NOT NULL default '0',`server_version` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`user_today` int(10) NOT NULL default '0',`user_week` int(10) NOT NULL default '0',`user_month` int(10) NOT NULL default '0',`user_quarter` int(10) NOT NULL default '0')") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_user` (`uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`removed` tinyint(1) NOT NULL default '0',`total_connections` MEDIUMINT(8) UNSIGNED NOT NULL default '0',`count_week` mediumint(8) UNSIGNED NOT NULL default '0',`count_month` mediumint(8) UNSIGNED NOT NULL default '0',`idle_week` mediumint(8) UNSIGNED NOT NULL default '0',`idle_month` mediumint(8) UNSIGNED NOT NULL default '0',`client_description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`base64hash` char(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,`client_total_up` bigint(15) NOT NULL default '0',`client_total_down` bigint(15) NOT NULL default '0',`active_week` mediumint(8) UNSIGNED NOT NULL default '0',`active_month` mediumint(8) UNSIGNED NOT NULL default '0',`last_calculated` int(10) UNSIGNED NOT NULL default '0')") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - - if($mysqlcon->exec("INSERT INTO `$dbname`.`stats_server` SET `total_user`='9999'") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`admin_addtime` (`uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`timestamp` int(10) UNSIGNED NOT NULL default '0',`timecount` int(10) NOT NULL default '0', PRIMARY KEY (`uuid`,`timestamp`))") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`user_iphash` (`uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`iphash` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`ip` varchar(39) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`job_check` (`job_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`timestamp` int(10) UNSIGNED NOT NULL default '0')") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - - if($mysqlcon->exec("INSERT INTO `$dbname`.`job_check` (`job_name`) VALUES ('calc_user_limit'),('calc_user_lastscan'),('check_update'),('database_export'),('get_version'),('clean_db'),('clean_clients'),('calc_donut_chars'),('calc_server_stats'),('get_avatars'),('last_snapshot_id'),('last_snapshot_time'),('last_update'),('reload_trigger'),('reset_user_time'),('reset_user_delete'),('reset_group_withdraw'),('reset_webspace_cache'),('reset_usage_graph'),('reset_stop_after'),('runtime_check'),('update_groups')") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } + if (!writeDatabaseConfig($type, $host, $user, $pass, $dbname)) { + $err_msg = $lang['isntwicfg']; + $err_lvl = 2; + return; + } - if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_nations` (`nation` char(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`count` smallint(5) UNSIGNED NOT NULL default '0')") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_versions` (`version` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`count` smallint(5) UNSIGNED NOT NULL default '0')") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_platforms` (`platform` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`count` smallint(5) UNSIGNED NOT NULL default '0')") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } else { - if($mysqlcon->exec("INSERT INTO `$dbname`.`stats_platforms` (`platform`,`count`) VALUES ('Windows',0),('Android',0),('OSX',0),('iOS',0),('Linux',0)") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`addons_config` (`param` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci UNIQUE,`value` varchar(5000) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - - if($mysqlcon->exec("INSERT INTO `$dbname`.`addons_config` (`param`,`value`) VALUES ('assign_groups_active','0'),('assign_groups_name',''),('assign_groups_excepted_groupids',''),('assign_groups_groupids',''),('assign_groups_limit','')") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`addon_assign_groups` (`uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`grpids` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } - - if($mysqlcon->exec("CREATE TABLE `$dbname`.`csrf_token` (`token` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY, `timestamp` int(10) UNSIGNED NOT NULL default '0', `sessionid` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL)") === false) { - $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; - $count++; - } + $count = 1; + if(($mysqlcon->exec("DROP DATABASE `$dbname`")) === false) { } - if($count == 1) { - $err_msg = sprintf($lang['instdbsuc'], $dbname); $err_lvl = NULL; - $install_webuser = 1; - - $dbconfig = fopen('./other/dbconfig.php','w'); - if(!fwrite($dbconfig, $newconfig)) { - $err_msg = $lang['isntwicfg']; - $err_lvl = 2; - } - fclose($dbconfig); - } - } + if($mysqlcon->exec("CREATE DATABASE `$dbname`") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`user` (`uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`cldbid` int(10) NOT NULL default '0',`count` DECIMAL(14,3) NOT NULL default '0',`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,`lastseen` int(10) UNSIGNED NOT NULL default '0',`grpid` int(10) NOT NULL default '0',`nextup` int(10) NOT NULL default '0',`idle` DECIMAL(14,3) NOT NULL default '0',`cldgroup` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`online` tinyint(1) NOT NULL default '0',`boosttime` int(10) UNSIGNED NOT NULL default '0',`rank` smallint(5) UNSIGNED NOT NULL default '65535',`platform` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,`nation` char(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,`version` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,`firstcon` int(10) UNSIGNED NOT NULL default '0',`except` tinyint(1) NOT NULL default '0',`grpsince` int(10) UNSIGNED NOT NULL default '0',`cid` int(10) NOT NULL default '0')") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } else { + if($mysqlcon->exec("CREATE INDEX `user_version` ON `$dbname`.`user` (`version`)") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + if($mysqlcon->exec("CREATE INDEX `user_cldbid` ON `$dbname`.`user` (`cldbid` ASC,`uuid`,`rank`)") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + if($mysqlcon->exec("CREATE INDEX `user_online` ON `$dbname`.`user` (`online`,`lastseen`)") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`groups` (`sgid` int(10) UNSIGNED NOT NULL default '0' PRIMARY KEY,`sgidname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,`iconid` bigint(10) NOT NULL default '0',`icondate` int(10) UNSIGNED NOT NULL default '0',`sortid` int(10) NOT NULL default '0',`type` tinyint(1) NOT NULL default '0',`ext` char(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`cfg_params` (`param` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY, `value` varchar(21588) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`server_usage` (`timestamp` int(10) UNSIGNED NOT NULL default '0',`clients` smallint(5) UNSIGNED NOT NULL default '0',`channel` smallint(5) UNSIGNED NOT NULL default '0')") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } else { + if($mysqlcon->exec("CREATE INDEX `serverusage_timestamp` ON `$dbname`.`server_usage` (`timestamp`)") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`user_snapshot` (`id` tinyint(3) UNSIGNED NOT NULL default '0',`cldbid` int(10) UNSIGNED NOT NULL default '0',`count` int(10) UNSIGNED NOT NULL default '0',`idle` int(10) UNSIGNED NOT NULL default '0',PRIMARY KEY (`id`,`cldbid`));") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } else { + if($mysqlcon->exec("CREATE INDEX `snapshot_id` ON `$dbname`.`user_snapshot` (`id`)") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + if($mysqlcon->exec("CREATE INDEX `snapshot_cldbid` ON `$dbname`.`user_snapshot` (`cldbid`)") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_server` (`total_user` int(10) NOT NULL default '0',`total_online_time` bigint(13) NOT NULL default '0',`total_online_month` bigint(11) NOT NULL default '0',`total_online_week` bigint(11) NOT NULL default '0',`total_active_time` bigint(11) NOT NULL default '0',`total_inactive_time` bigint(11) NOT NULL default '0',`country_nation_name_1` varchar(3) NOT NULL default '0',`country_nation_name_2` varchar(3) NOT NULL default '0',`country_nation_name_3` varchar(3) NOT NULL default '0',`country_nation_name_4` varchar(3) NOT NULL default '0',`country_nation_name_5` varchar(3) NOT NULL default '0',`country_nation_1` int(10) NOT NULL default '0',`country_nation_2` int(10) NOT NULL default '0',`country_nation_3` int(10) NOT NULL default '0',`country_nation_4` int(10) NOT NULL default '0',`country_nation_5` int(10) NOT NULL default '0',`country_nation_other` int(10) NOT NULL default '0',`platform_1` int(10) NOT NULL default '0',`platform_2` int(10) NOT NULL default '0',`platform_3` int(10) NOT NULL default '0',`platform_4` int(10) NOT NULL default '0',`platform_5` int(10) NOT NULL default '0',`platform_other` int(10) NOT NULL default '0',`version_name_1` varchar(35) NOT NULL default '0',`version_name_2` varchar(35) NOT NULL default '0',`version_name_3` varchar(35) NOT NULL default '0',`version_name_4` varchar(35) NOT NULL default '0',`version_name_5` varchar(35) NOT NULL default '0',`version_1` int(10) NOT NULL default '0',`version_2` int(10) NOT NULL default '0',`version_3` int(10) NOT NULL default '0',`version_4` int(10) NOT NULL default '0',`version_5` int(10) NOT NULL default '0',`version_other` int(10) NOT NULL default '0',`server_status` tinyint(1) NOT NULL default '0',`server_free_slots` smallint(5) NOT NULL default '0',`server_used_slots` smallint(5) NOT NULL default '0',`server_channel_amount` smallint(5) NOT NULL default '0',`server_ping` smallint(5) NOT NULL default '0',`server_packet_loss` float (4,4),`server_bytes_down` bigint(11) NOT NULL default '0',`server_bytes_up` bigint(11) NOT NULL default '0',`server_uptime` bigint(11) NOT NULL default '0',`server_id` smallint(5) NOT NULL default '0',`server_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`server_pass` tinyint(1) NOT NULL default '0',`server_creation_date` bigint(11) NOT NULL default '0',`server_platform` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`server_weblist` tinyint(1) NOT NULL default '0',`server_version` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`user_today` int(10) NOT NULL default '0',`user_week` int(10) NOT NULL default '0',`user_month` int(10) NOT NULL default '0',`user_quarter` int(10) NOT NULL default '0')") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_user` (`uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`removed` tinyint(1) NOT NULL default '0',`total_connections` MEDIUMINT(8) UNSIGNED NOT NULL default '0',`count_week` mediumint(8) UNSIGNED NOT NULL default '0',`count_month` mediumint(8) UNSIGNED NOT NULL default '0',`idle_week` mediumint(8) UNSIGNED NOT NULL default '0',`idle_month` mediumint(8) UNSIGNED NOT NULL default '0',`client_description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`base64hash` char(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,`client_total_up` bigint(15) NOT NULL default '0',`client_total_down` bigint(15) NOT NULL default '0',`active_week` mediumint(8) UNSIGNED NOT NULL default '0',`active_month` mediumint(8) UNSIGNED NOT NULL default '0',`last_calculated` int(10) UNSIGNED NOT NULL default '0')") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("INSERT INTO `$dbname`.`stats_server` SET `total_user`='9999'") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`admin_addtime` (`uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`timestamp` int(10) UNSIGNED NOT NULL default '0',`timecount` int(10) NOT NULL default '0', PRIMARY KEY (`uuid`,`timestamp`))") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`user_iphash` (`uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`iphash` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`ip` varchar(39) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`job_check` (`job_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`timestamp` int(10) UNSIGNED NOT NULL default '0')") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("INSERT INTO `$dbname`.`job_check` (`job_name`) VALUES ('calc_user_limit'),('calc_user_lastscan'),('check_update'),('database_export'),('get_version'),('clean_db'),('clean_clients'),('calc_donut_chars'),('calc_server_stats'),('get_avatars'),('last_snapshot_id'),('last_snapshot_time'),('last_update'),('reload_trigger'),('reset_user_time'),('reset_user_delete'),('reset_group_withdraw'),('reset_webspace_cache'),('reset_usage_graph'),('reset_stop_after'),('runtime_check'),('update_groups')") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_nations` (`nation` char(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`count` smallint(5) UNSIGNED NOT NULL default '0')") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_versions` (`version` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`count` smallint(5) UNSIGNED NOT NULL default '0')") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_platforms` (`platform` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`count` smallint(5) UNSIGNED NOT NULL default '0')") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } else { + if($mysqlcon->exec("INSERT INTO `$dbname`.`stats_platforms` (`platform`,`count`) VALUES ('Windows',0),('Android',0),('OSX',0),('iOS',0),('Linux',0)") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`addons_config` (`param` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci UNIQUE,`value` varchar(5000) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("INSERT INTO `$dbname`.`addons_config` (`param`,`value`) VALUES ('assign_groups_active','0'),('assign_groups_name',''),('assign_groups_excepted_groupids',''),('assign_groups_groupids',''),('assign_groups_limit','')") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`addon_assign_groups` (`uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`grpids` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($mysqlcon->exec("CREATE TABLE `$dbname`.`csrf_token` (`token` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY, `timestamp` int(10) UNSIGNED NOT NULL default '0', `sessionid` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL)") === false) { + $err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'
'; $err_lvl = 2; + $count++; + } + + if($count == 1) { + $err_msg = sprintf($lang['instdbsuc'], $dbname); $err_lvl = NULL; + $install_webuser = 1; + + if(!writeDatabaseConfig()) { + $err_msg = $lang['isntwicfg']; + $err_lvl = 2; + } + } } if (isset($_POST['install'])) { @@ -254,7 +247,7 @@ function install($type, $host, $user, $pass, $dbname, $lang, $mysqlcon, &$err_ms } } - if(!is_writable('./other/dbconfig.php')) { + if(!is_writable(DB_CONFIG)) { $err_msg = $lang['isntwicfg']; $err_lvl = 2; } @@ -274,7 +267,7 @@ function install($type, $host, $user, $pass, $dbname, $lang, $mysqlcon, &$err_ms } if(isset($_POST['confweb'])) { - require_once('other/dbconfig.php'); + require_once(DB_CONFIG); $user=$_POST['user']; $pass=password_hash($_POST['pass'], PASSWORD_DEFAULT); $logpath = addslashes(__DIR__."/logs/"); @@ -315,7 +308,7 @@ function install($type, $host, $user, $pass, $dbname, $lang, $mysqlcon, &$err_ms unset($err_msg); unset($err_lvl); $err_msg = ''; - if(!is_writable('./other/dbconfig.php')) { + if(!is_writable(DB_CONFIG)) { $err_msg = $lang['isntwicfg']; $err_lvl = 3; } diff --git a/jobs/calc_serverstats.php b/jobs/calc_serverstats.php index 756a810..68ef1e7 100644 --- a/jobs/calc_serverstats.php +++ b/jobs/calc_serverstats.php @@ -1,4 +1,71 @@ ref, 10); + if (preg_match("/^[0-9]+\.[0-9]+\.[0-9]+.*/", $tag)) { + array_push($versions,$tag); + } + } + + // sort descending + function s($a,$b) { + return version_compare($b, $a); + } + usort($versions, "s"); + + return $versions +} + +function sendUsageData($cfg) { + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, 'https://ts-n.net/ranksystem/'.$cfg['version_update_channel']); + curl_setopt($ch, CURLOPT_REFERER, 'TSN Ranksystem'); + curl_setopt($ch, CURLOPT_USERAGENT, + $cfg['version_current_using'].";". + php_uname("s").";". + php_uname("r").";". + phpversion().";". + $dbtype.";". + $cfg['teamspeak_host_address'].";". + $cfg['teamspeak_voice_port'].";". + __DIR__.";". + $total_user.";". + $user_today.";". + $user_week.";". + $user_month.";". + $user_quarter.";". + $total_online_week.";". + $total_online_month.";". + $total_active_time.";". + $total_inactive_time.";". + $cfg['temp_ts_version'].";". + $cfg['temp_db_version'] + ); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false); + curl_setopt($ch, CURLOPT_MAXREDIRS, 10); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); + curl_exec($ch); + curl_close($ch); +} + function calc_serverstats($ts3,$mysqlcon,&$cfg,$dbname,$dbtype,$serverinfo,&$db_cache,$phpcommand,$lang) { $starttime = microtime(true); $nowtime = time(); @@ -381,39 +448,9 @@ function calc_serverstats($ts3,$mysqlcon,&$cfg,$dbname,$dbtype,$serverinfo,&$db_ if ($db_cache['job_check']['get_version']['timestamp'] < ($nowtime - 43199)) { $db_cache['job_check']['get_version']['timestamp'] = $nowtime; - enter_logfile($cfg,6,"Get the latest Ranksystem Version."); - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, 'https://ts-n.net/ranksystem/'.$cfg['version_update_channel']); - curl_setopt($ch, CURLOPT_REFERER, 'TSN Ranksystem'); - curl_setopt($ch, CURLOPT_USERAGENT, - $cfg['version_current_using'].";". - php_uname("s").";". - php_uname("r").";". - phpversion().";". - $dbtype.";". - $cfg['teamspeak_host_address'].";". - $cfg['teamspeak_voice_port'].";". - __DIR__.";". - $total_user.";". - $user_today.";". - $user_week.";". - $user_month.";". - $user_quarter.";". - $total_online_week.";". - $total_online_month.";". - $total_active_time.";". - $total_inactive_time.";". - $cfg['temp_ts_version'].";". - $cfg['temp_db_version'] - ); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false); - curl_setopt($ch, CURLOPT_MAXREDIRS, 10); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); - $cfg['version_latest_available'] = curl_exec($ch); - curl_close($ch); + + sendUsageData($cfg); + $cfg['versions_available'] = getAvailableVersions(); if(version_compare($cfg['version_latest_available'], $cfg['version_current_using'], '>') && $cfg['version_latest_available'] != NULL) { enter_logfile($cfg,4,$lang['upinf']); diff --git a/jobs/check_db.php b/jobs/check_db.php index 74483d8..4ac1ba7 100644 --- a/jobs/check_db.php +++ b/jobs/check_db.php @@ -1,4 +1,6 @@ exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('version_current_using','{$cfg['version_latest_available']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)") === false) { enter_logfile($cfg,1," An error happens due updating the Ranksystem Database:".print_r($mysqlcon->errorInfo(), true)); - shutdown($mysqlcon,$cfg,1," Check the database connection and properties in other/dbconfig.php and check also the database permissions."); + shutdown($mysqlcon,$cfg,1," Check the database connection and properties in '".DB_CONFIG."' and check also the database permissions."); } else { $cfg['version_current_using'] = $cfg['version_latest_available']; enter_logfile($cfg,4," Database successfully updated!"); diff --git a/jobs/update_rs.php b/jobs/update_rs.php index 6c24f5b..4b58ce7 100644 --- a/jobs/update_rs.php +++ b/jobs/update_rs.php @@ -1,5 +1,29 @@ =')) { + return($sqlexec); + } foreach ($tables as $table) { try { @@ -111,7 +147,7 @@ function update_rs($mysqlcon,$lang,$cfg,$dbname,$phpcommand,$norotate=NULL) { if(!is_dir(substr(__DIR__,0,-4).$thisFileName)) { $contents = $zip->getFromName($thisFileName); $updateThis = ''; - if($thisFileName == 'other/dbconfig.php' || $thisFileName == 'install.php' || $thisFileName == 'other/phpcommand.php' || $thisFileName == 'logs/autostart_deactivated') { + if($thisFileName == DB_CONFIG || $thisFileName == 'install.php' || $thisFileName == 'other/phpcommand.php' || $thisFileName == 'logs/autostart_deactivated') { enter_logfile($cfg,5," Did not touch ".$thisFileName,$norotate); } else { if(($updateThis = fopen(substr(__DIR__,0,-4).'/'.$thisFileName, 'w')) === false) { diff --git "a/languages/core_ar_\330\247\331\204\330\271\330\261\330\250\331\212\330\251_arab.php" "b/languages/core_ar_\330\247\331\204\330\271\330\261\330\250\331\212\330\251_arab.php" index d75365f..bb8dd40 100644 --- "a/languages/core_ar_\330\247\331\204\330\271\330\261\330\250\331\212\330\251_arab.php" +++ "b/languages/core_ar_\330\247\331\204\330\271\330\261\330\250\331\212\330\251_arab.php" @@ -1,4 +1,5 @@ added to the Ranksystem now."; @@ -60,7 +61,7 @@ $lang['insterr2'] = "%1\$s is needed but seems not to be installed. Install %1\$s and try it again!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr3'] = "PHP %1\$s function is needed to be enabled but seems to be disabled. Please enable the PHP %1\$s function and try it again!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr4'] = "Your PHP version (%s) is below 5.5.0. Update your PHP and try it again!"; -$lang['isntwicfg'] = "Can't save the database configuration! Please edit the 'other/dbconfig.php' with a chmod 740 (on windows 'full access') and try again after."; +$lang['isntwicfg'] = "Can't save the database configuration! Please edit the '".DB_CONFIG."' with a chmod 740 (on windows 'full access') and try again after."; $lang['isntwicfg2'] = "Configurate Webinterface"; $lang['isntwichm'] = "Write Permissions failed on folder \"%s\". Please give them a chmod 740 (on windows 'full access') and try to start the Ranksystem again."; $lang['isntwiconf'] = "Open the %s to configure the Ranksystem!"; @@ -408,7 +409,7 @@ $lang['wiconferr'] = "There is an error in the configuration of the Ranksystem. Please go to the webinterface and correct the rank settings!"; $lang['widaform'] = "نظام التاريخ"; $lang['widaformdesc'] = "اختر كيفية ضهور التاريخ.

Example:
%a ايام, %h ساعات, %i دقائق, %s ثوان"; -$lang['widbcfgerr'] = "'other/dbconfig.php'خلل عند حفظ تعديلات قاعدة البيانات فشل الاتصال مع "; +$lang['widbcfgerr'] = "'".DB_CONFIG."'خلل عند حفظ تعديلات قاعدة البيانات فشل الاتصال مع '"; $lang['widbcfgsuc'] = "تعديلات قاعدة البيانات حفظت بنجاح"; $lang['widbg'] = "Log-Level"; $lang['widbgdesc'] = "Set up the Log-Level of the Ranksystem. With this you can decide, how much information should be written to the file \"ranksystem.log\"

The higher the Log-Level, the more information you'll get.

Changing the Log-Level will take effect with the next restart of the Ranksystem bot.

Please don't let the Ranksystem running longer on \"6 - DEBUG\" this could impair your filesystem!"; diff --git "a/languages/core_az_Az\311\231rbaycan_az.php" "b/languages/core_az_Az\311\231rbaycan_az.php" index b2ac311..3863c4e 100644 --- "a/languages/core_az_Az\311\231rbaycan_az.php" +++ "b/languages/core_az_Az\311\231rbaycan_az.php" @@ -1,4 +1,5 @@ indi Ranks Sisteminə əlavə edildi"; @@ -60,7 +61,7 @@ $lang['insterr2'] = "%1\$s tələb olunur, lakin quraşdırılmamışdır. Yüklə %1\$s və yenidən cəhd edin!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr3'] = "PHP %1\$s function is needed to be enabled but seems to be disabled. Please enable the PHP %1\$s function and try it again!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr4'] = "PHP versiyanız (%s) 5.5.0-dən aşağıdır. PHP-ni yeniləyin və yenidən cəhd edin!"; -$lang['isntwicfg'] = "Verilənlər bazası konfiqurasiyasını saxlaya bilmir! Tam yazma icazələrini təyin edin 'other/dbconfig.php' (Linux: chmod 740; Windows: 'full access') və sonra yenidən cəhd edin."; +$lang['isntwicfg'] = "Verilənlər bazası konfiqurasiyasını saxlaya bilmir! Tam yazma icazələrini təyin edin '".DB_CONFIG."' (Linux: chmod 740; Windows: 'full access') və sonra yenidən cəhd edin."; $lang['isntwicfg2'] = "Veb-interfeysin konfiqurasiyası"; $lang['isntwichm'] = "\"%s\" qovluğunda qeyd icazəsi yoxdur. Tam hüquqlar verin (Linux: chmod 740; Windows: 'full access') və Ranksystem'i yenidən başlatmağa çalışın."; $lang['isntwiconf'] = "Ranksystem'i konfiqurasiya etmək üçün %s açın!"; @@ -408,7 +409,7 @@ $lang['wiconferr'] = "Ranksystem-in konfiqurasiyasında bir səhv var. Veb-interfeysə keçin və rank parametrləri düzəlt!"; $lang['widaform'] = "Tarix formatı"; $lang['widaformdesc'] = "Göstərilən tarix formatını seçin.

Məsələn:
%a gün, %h saat, %i dəqiqə, %s saniyə"; -$lang['widbcfgerr'] = "Verilənlər bazası konfiqurasiyaları qənaət edərkən səhv baş verdi! 'other/dbconfig.php' bağlantısı uğursuz oldu."; +$lang['widbcfgerr'] = "Verilənlər bazası konfiqurasiyaları qənaət edərkən səhv baş verdi! '".DB_CONFIG."' bağlantısı uğursuz oldu."; $lang['widbcfgsuc'] = "Verilənlər bazası konfiqurasiyaları uğurla qeyd edildi."; $lang['widbg'] = "Log Səviyyəsi"; $lang['widbgdesc'] = "Sıralama sistemi log səviyyəsi seçin. Bununla siz \"ranksystem.log\" faylına neçə məlumatın yazılmasına qərar verə bilərsiniz.

Giriş səviyyəsinin nə qədər yüksək olduğu halda daha çox məlumat alacaqsınız.

Giriş Səviyyəsinin dəyişdirilməsi Ranksystem botun yenidən başlaması ilə qüvvəyə çatır.

Xahiş edirik Ranksystem-ın \"6 - DEBUG\" üzərindən daha uzun müddət çalışmasına imkan verməyin, bu sizin fayl sisteminizə zərbə vuracaq!"; diff --git "a/languages/core_cz_\304\214e\305\241tina_cz.php" "b/languages/core_cz_\304\214e\305\241tina_cz.php" index d22d61f..509c798 100644 --- "a/languages/core_cz_\304\214e\305\241tina_cz.php" +++ "b/languages/core_cz_\304\214e\305\241tina_cz.php" @@ -1,4 +1,5 @@ přidán do Ranksystem."; @@ -60,7 +61,7 @@ $lang['insterr2'] = "%1\$s je potřebný k instalaci, ale není nainstalován! Nainstalujte ho pomocí %1\$s a zkuste to znovu!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr3'] = "PHP %1\$s function is needed to be enabled but seems to be disabled. Please enable the PHP %1\$s function and try it again!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr4'] = "Vaše PHP verze (%s) je nižší než 5.5.0. Prosím aktulizujte PHP a zkuste to znovu!"; -$lang['isntwicfg'] = "Nemohu uložit konfiguraci do databáze! Prosím přidělte všechna práva souboru 'other/dbconfig.php' (Linux: chmod 740; Windows: 'full access') a zkuste to znovu!"; +$lang['isntwicfg'] = "Nemohu uložit konfiguraci do databáze! Prosím přidělte všechna práva souboru '".DB_CONFIG."' (Linux: chmod 740; Windows: 'full access') a zkuste to znovu!"; $lang['isntwicfg2'] = "Nakonfigurujte webinterface"; $lang['isntwichm'] = "Práva pro zápis do složky \"%s\" nejsou plná! Prosím přidělte všechna práva pomocí (Linux: chmod 740; Windows: 'full access') a aktulizujte (obnovte- F5) stránku."; $lang['isntwiconf'] = "Otevřete %s pro nastavení Ranksystemu."; @@ -408,7 +409,7 @@ $lang['wiconferr'] = "Došlo k chybě v konfiguraci systému Ranks. Přejděte na webové rozhraní a opravte nastavení jádra. Zvláště zkontrolujte konfiguraci 'rank'!"; $lang['widaform'] = "Časový formát"; $lang['widaformdesc'] = "Vyberte formát zobrazení data.

Příklad:
% a dny,% h hodiny,% i mins,% s secs"; -$lang['widbcfgerr'] = "Chyba při ukládání konfigurací databáze! Připojení selhalo nebo chyba zápisu pro 'other / dbconfig.php'"; +$lang['widbcfgerr'] = "Chyba při ukládání konfigurací databáze! Připojení selhalo nebo chyba zápisu pro '".DB_CONFIG."'"; $lang['widbcfgsuc'] = "Databázové konfigurace byly úspěšně uloženy."; $lang['widbg'] = "Log-Level"; $lang['widbgdesc'] = "Set up the Log-Level of the Ranksystem. With this you can decide, how much information should be written to the file \"ranksystem.log\"

The higher the Log-Level, the more information you'll get.

Changing the Log-Level will take effect with the next restart of the Ranksystem bot.

Please don't let the Ranksystem running longer on \"6 - DEBUG\" this could impair your filesystem!"; diff --git a/languages/core_de_Deutsch_de.php b/languages/core_de_Deutsch_de.php index 01c2da4..9c799de 100644 --- a/languages/core_de_Deutsch_de.php +++ b/languages/core_de_Deutsch_de.php @@ -1,4 +1,5 @@ wurde nun zum Ranksystem hinzugefügt."; @@ -60,7 +61,7 @@ $lang['insterr2'] = "%1\$s wird benötigt, scheint jedoch nicht installiert zu sein. Installiere %1\$s und versuche es erneut!
Pfad zur PHP Konfig-Datei, sofern definiert und diese geladen wurde: %3\$s"; $lang['insterr3'] = "Die PHP Funktion %1\$s wird benötigt, scheint jedoch deaktiviert zu sein. Bitte aktiviere PHP %1\$s und versuche es erneut!
Pfad zur PHP Konfig-Datei, sofern definiert und diese geladen wurde: %3\$s"; $lang['insterr4'] = "Deine PHP Version (%s) ist unter 5.5.0. Aktualisiere dein PHP und versuche es erneut!"; -$lang['isntwicfg'] = "Die Datenbankkonfigurationen konnten nicht gespeichert werden! Bitte versehe die 'other/dbconfig.php' mit einem chmod 740 (für Windows 'Vollzugriff') und versuche es anschließend erneut."; +$lang['isntwicfg'] = "Die Datenbankkonfigurationen konnten nicht gespeichert werden! Bitte versehe die '".DB_CONFIG."' mit einem chmod 740 (für Windows 'Vollzugriff') und versuche es anschließend erneut."; $lang['isntwicfg2'] = "Konfiguriere Webinterface"; $lang['isntwichm'] = "Schreibrechte fehlen für Verzeichnis \"%s\". Bitte setze auf dieses einen chmod 740 (für Windows 'Vollzugriff') und starte anschließend das Ranksystem erneut."; $lang['isntwiconf'] = "Öffne das %s um das Ranksystem zu konfigurieren!"; @@ -409,7 +410,7 @@ $lang['wiconferr'] = "Es ist ein Fehler in der Konfiguration des Ranksystems. Bitte prüfe im Webinterface die Rank-Einstellungen auf Richtigkeit!"; $lang['widaform'] = "Datumsformat"; $lang['widaformdesc'] = "Gebe ein Datumsformat zur Anzeige vor.

Beispiel:
%a Tage, %h Std., %i Min., %s Sek."; -$lang['widbcfgerr'] = "Fehler beim Speichern der Datenbank Einstellungen! Verbindung zur Datenbank oder speichern der 'other/dbconfig.php' nicht möglich."; +$lang['widbcfgerr'] = "Fehler beim Speichern der Datenbank Einstellungen! Verbindung zur Datenbank oder speichern der '".DB_CONFIG."' nicht möglich."; $lang['widbcfgsuc'] = "Datenbank Einstellungen erfolgreich gespeichert."; $lang['widbg'] = "Log-Level"; $lang['widbgdesc'] = "Bestimme das Log-Level des Ranksystems. Damit wird festgelegt, wie viele Informationen in die Datei \"ranksystem.log\" geschrieben werden sollen.

Je höher das Log-Level, desto mehr Informationen werden ausgegeben.

Ein Wechsel des Log-Levels wird mit dem nächsten Neustart des Ranksystem Bots wirksam.

Bitte lasse das Ranksystem nicht längere Zeit unter \"6 - DEBUG\" laufen. Dies könnte das Dateisystem beeinträchtigen!"; diff --git a/languages/core_en_english_gb.php b/languages/core_en_english_gb.php index dbcdd01..1e0127f 100644 --- a/languages/core_en_english_gb.php +++ b/languages/core_en_english_gb.php @@ -1,4 +1,5 @@ %1\$s and try it again!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr3'] = "PHP %1\$s function is needed to be enabled but seems to be disabled. Please enable the PHP %1\$s function and try it again!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr4'] = "Your PHP version (%s) is below 5.5.0. Update your PHP and try it again!"; -$lang['isntwicfg'] = "Can't save the database configuration! Please assign full write-out permissions on 'other/dbconfig.php' (Linux: chmod 740; Windows: 'full access') and try again after."; +$lang['isntwicfg'] = "Can't save the database configuration! Please assign full write-out permissions on '".DB_CONFIG."' (Linux: chmod 740; Windows: 'full access') and try again after."; $lang['isntwicfg2'] = "Configure Webinterface"; $lang['isntwichm'] = "Write-out permissions on folder \"%s\" are missing. Please assign full rights (Linux: chmod 740; Windows: 'full access') and try to start the Ranksystem again."; $lang['isntwiconf'] = "Open the %s to configure the Ranksystem!"; @@ -408,7 +409,7 @@ $lang['wiconferr'] = "There is an error in the configuration of the Ranksystem. Please go to the webinterface and correct the rank settings!"; $lang['widaform'] = "Date format"; $lang['widaformdesc'] = "Choose the showing date format.

Example:
%a days, %h hours, %i mins, %s secs"; -$lang['widbcfgerr'] = "Error while saving the database configurations! Connection failed or write-out error for 'other/dbconfig.php'"; +$lang['widbcfgerr'] = "Error while saving the database configurations! Connection failed or write-out error for '".DB_CONFIG."'"; $lang['widbcfgsuc'] = "Database configurations saved successfully."; $lang['widbg'] = "Log-Level"; $lang['widbgdesc'] = "Set up the Log-Level of the Ranksystem. With this you can decide, how much information should be written to the file \"ranksystem.log\"

The higher the Log-Level, the more information you'll get.

Changing the Log-Level will take effect with the next restart of the Ranksystem bot.

Please don't let the Ranksystem running longer on \"6 - DEBUG\" this could impair your filesystem!"; diff --git "a/languages/core_es_espa\303\261ol_es.php" "b/languages/core_es_espa\303\261ol_es.php" index 80861b8..d2500b2 100644 --- "a/languages/core_es_espa\303\261ol_es.php" +++ "b/languages/core_es_espa\303\261ol_es.php" @@ -1,4 +1,5 @@ agregada a Ranksystem ahora."; @@ -60,7 +61,7 @@ $lang['insterr2'] = "Se necesita %1\$s pero parece que no está instalado. Instalar %1\$s y prueba de nuevo!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr3'] = "La función %1\$s debe estar habilitada pero parece estar deshabilitada. Por favor activa el PHP %1\$s funcion e intentalo de nuevo!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr4'] = "Your PHP version (%s) is below 5.5.0. Update your PHP and try it again!"; -$lang['isntwicfg'] = "Can't save the database configuration! Please assign full rights on 'other/dbconfig.php' (Linux: chmod 740; Windows: 'full access') and try again after."; +$lang['isntwicfg'] = "Can't save the database configuration! Please assign full rights on '".DB_CONFIG."' (Linux: chmod 740; Windows: 'full access') and try again after."; $lang['isntwicfg2'] = "Configurar Webinterface"; $lang['isntwichm'] = "Permisos de escritura en la carpeta \"%s\" están ausentes. Por favor asigne todos los derechos (Linux: chmod 740; Windows: 'acceso completo') y tratar de iniciar el Ranksystem de nuevo."; $lang['isntwiconf'] = "Abre el %s para configurar el Ranksystem!"; @@ -408,7 +409,7 @@ $lang['wiconferr'] = "Hay un error en la configuración del Ranksystem. Vaya a la webinterface y corrija la Configuración rank!"; $lang['widaform'] = "Formato de fecha"; $lang['widaformdesc'] = "Elija el formato de fecha que se muestra.

Ejemplo:
%a dias, %h horas, %i minutos, %s segundos"; -$lang['widbcfgerr'] = "¡Error al guardar las configuraciones de la base de datos! Error de conexión o error de escritura para 'other/dbconfig.php'"; +$lang['widbcfgerr'] = "¡Error al guardar las configuraciones de la base de datos! Error de conexión o error de escritura para '".DB_CONFIG."'"; $lang['widbcfgsuc'] = "Configuraciones de bases de datos guardadas con éxito."; $lang['widbg'] = "Log-Level"; $lang['widbgdesc'] = "Set up the Log-Level of the Ranksystem. With this you can decide, how much information should be written to the file \"ranksystem.log\"

The higher the Log-Level, the more information you'll get.

Changing the Log-Level will take effect with the next restart of the Ranksystem bot.

Please don't let the Ranksystem running longer on \"6 - DEBUG\" this could impair your filesystem!"; diff --git "a/languages/core_fr_fran\303\247ais_fr.php" "b/languages/core_fr_fran\303\247ais_fr.php" index dfb4f9b..87258aa 100644 --- "a/languages/core_fr_fran\303\247ais_fr.php" +++ "b/languages/core_fr_fran\303\247ais_fr.php" @@ -1,4 +1,5 @@ Il vient d'être ajouté dans le Ranksystem."; @@ -60,7 +61,7 @@ $lang['insterr2'] = "%1\$s est nécessaire, mais semble ne pas être installé. Installez %1\$s et essayez à nouveau !
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr3'] = "La fonction PHP %1\$s doit être activé, mais semble être désactivé. Veuillez activer la fonction PHP %1\$s et essayez à nouveau !
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr4'] = "Votre version PHP (%s) est inférieure à 5.5.0. Mettez à jour votre version de PHP et essayez à nouveau !"; -$lang['isntwicfg'] = "Impossible d'enregistrer la configuration de la base de données ! Veuillez modifier le fichier 'other/dbconfig.php' avec un chmod 740 (dans la fênetre 'accès complet') et essayez de nouveau après."; +$lang['isntwicfg'] = "Impossible d'enregistrer la configuration de la base de données ! Veuillez modifier le fichier '".DB_CONFIG."' avec un chmod 740 (dans la fênetre 'accès complet') et essayez de nouveau après."; $lang['isntwicfg2'] = "Configurer l'interface Web"; $lang['isntwichm'] = "Échec des autorisations d'écriture sur le dossier \"%s\". Veuillez modifier le dossier avec un chmod 740 (dans la fênetre 'accès complet') et essayez de nouveau après de démarer le ranksystem."; $lang['isntwiconf'] = "Ouvrez le %s pour configurer le système de classement !"; @@ -408,7 +409,7 @@ $lang['wiconferr'] = "Il y a une erreur dans la configuration du Ranksystem. Veuillez aller à l'interface Web et corriger les paramètres de rank (coeur)!"; $lang['widaform'] = "Format de date"; $lang['widaformdesc'] = "Choisissez le format de date à afficher.

Exemple:
%a jours, %h heures, %i minutes, %s secondes"; -$lang['widbcfgerr'] = "Erreur lors de l'enregistrement des configurations de base de données ! Échec de la connexion ou erreur d'écriture pour le fichier 'other/dbconfig.php'"; +$lang['widbcfgerr'] = "Erreur lors de l'enregistrement des configurations de base de données ! Échec de la connexion ou erreur d'écriture pour le fichier '".DB_CONFIG."'"; $lang['widbcfgsuc'] = "Configuration de la base de données enregistrée avec succès."; $lang['widbg'] = "Log-Level"; $lang['widbgdesc'] = "Set up the Log-Level of the Ranksystem. With this you can decide, how much information should be written to the file \"ranksystem.log\"

The higher the Log-Level, the more information you'll get.

Changing the Log-Level will take effect with the next restart of the Ranksystem bot.

Please don't let the Ranksystem running longer on \"6 - DEBUG\" this could impair your filesystem!"; diff --git a/languages/core_hu_Hungary_hu.php b/languages/core_hu_Hungary_hu.php index aa0130d..424c1eb 100644 --- a/languages/core_hu_Hungary_hu.php +++ b/languages/core_hu_Hungary_hu.php @@ -1,4 +1,5 @@ hozzáadva a Ranksystemhez."; @@ -60,7 +61,7 @@ $lang['insterr2'] = "%1\$s szükséges, de úgy tűnik, hogy nincs telepítve. Telepítsd %1\$s és próbáld újra!
A PHP konfigurációs fájl elérési útja, ha az definiálva és aktiválva van: %3\$s"; $lang['insterr3'] = "PHP %1\$s funkciónak engedélyezve kell lennie, de úgy tűnik, hogy nincs. Engedélyezd PHP %1\$s funkciót és próbáld újra!
A PHP konfigurációs fájl elérési útja, ha az definiálva és aktiválva van: %3\$s"; $lang['insterr4'] = "A te PHP verziód (%s) 5.5.0 alatt van. Frissítsd a PHP-t és próbáld újra!"; -$lang['isntwicfg'] = "Nem menthető az adatbázis-konfiguráció! Kérjük, rendeljen hozzá teljes kiírási engedélyt az 'other / dbconfig.php' fájlhoz (Linux: chmod 740; Windows: 'full access'), majd próbálja újra."; +$lang['isntwicfg'] = "Nem menthető az adatbázis-konfiguráció! Kérjük, rendeljen hozzá teljes kiírási engedélyt az '".DB_CONFIG."' fájlhoz (Linux: chmod 740; Windows: 'full access'), majd próbálja újra."; $lang['isntwicfg2'] = "A webinterfész konfigurálása"; $lang['isntwichm'] = "A kiírási engedély erre a mappára \"%s\" hiányzik. Kérjük, adjon teljes jogokat (Linux: chmod 740; Windows: 'full access'), és próbálja újra elindítani a Ranksystem-t."; $lang['isntwiconf'] = "Nyisd meg a %s a RankSystem konfigurálásához!"; @@ -408,7 +409,7 @@ $lang['wiconferr'] = "Hiba történt a Ranksystem konfigurációjában. Kérjük, lépjen a webes felületre, és javítsa ki a Core beállításokat. Különösen ellenőrizze a 'rangsor meghatározását'!"; $lang['widaform'] = "Dátum forma"; $lang['widaformdesc'] = "Válassza ki a megjelenő dátumformátumot.

Példa:
%a nap, %h óra, %i perc, %s másodperc"; -$lang['widbcfgerr'] = "Hiba az adatbázis-konfigurációk mentése közben! A kapcsolat meghiúsult, vagy kiírási hiba történt a 'other / dbconfig.php' számára"; +$lang['widbcfgerr'] = "Hiba az adatbázis-konfigurációk mentése közben! A kapcsolat meghiúsult, vagy kiírási hiba történt a '".DB_CONFIG."' számára"; $lang['widbcfgsuc'] = "Az adatbázis-konfigurációk sikeresen mentve."; $lang['widbg'] = "Naplófájl-Szint"; $lang['widbgdesc'] = "Állítsa be a Ranksystem naplózási szintjét. Ezzel eldöntheti, mennyi információt kell írni a \"ranksystem.log\" fájlba.\"

Minél magasabb a naplózási szint, annál több információt kap.

A Naplószint megváltoztatása a Ranksystem bot következő újraindításával lép hatályba.

Kérjük, ne hagyja, hogy a Ranksystem hosszabb ideig működjön a \"6 - DEBUG\" endszeren, mert ez ronthatja a fájlrendszert!"; diff --git a/languages/core_it_Italiano_it.php b/languages/core_it_Italiano_it.php index d6a7478..c67efe5 100644 --- a/languages/core_it_Italiano_it.php +++ b/languages/core_it_Italiano_it.php @@ -1,4 +1,5 @@ L'utente è stato aggiunto al sistema."; @@ -60,7 +61,7 @@ $lang['insterr2'] = "%1\$s è necessario ma non sembra essere installato. Installa %1\$s e riprova!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr3'] = "La funzione PHP %1\$s deve essere abilitata, ma sembra non lo sia. Per favore, abilita la funzione PHP %1\$s e riprova!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr4'] = "La tua versione PHP (%s) is antecedente alla 5.5.0. Aggiorna la tua PHP e prova ancora!"; -$lang['isntwicfg'] = "Impossibile salvare la configurazione del database! Modifica il file 'other/dbconfig.php' dandogli i permessi 740 (chmod 740 nomefile on windows 'full access') e riprova."; +$lang['isntwicfg'] = "Impossibile salvare la configurazione del database! Modifica il file '".DB_CONFIG."' dandogli i permessi 740 (chmod 740 nomefile on windows 'full access') e riprova."; $lang['isntwicfg2'] = "Configura Webinterface"; $lang['isntwichm'] = "Permessi di scrittura negati per la cartella \"%s\". Per favore dai i permessi chmod 740 (on windows 'full access') e prova ad avviare il Ranksystem di nuovo."; $lang['isntwiconf'] = "Apri la %s per configurare il Ranksystem!"; @@ -408,7 +409,7 @@ $lang['wiconferr'] = "C'è un errore nella configurazione del RankSystem. Vai nell'interfaccia web i sistema le Impostazioni rank!"; $lang['widaform'] = "Formato data"; $lang['widaformdesc'] = "scegli il formato della data.

Esempio:
%a Giorni, %h Ore, %i Min, %s Sec"; -$lang['widbcfgerr'] = "Errore nel salvataggio della configurazione del database! Connessione fallita o errore nella sovrascrittura del file 'other/dbconfig.php'"; +$lang['widbcfgerr'] = "Errore nel salvataggio della configurazione del database! Connessione fallita o errore nella sovrascrittura del file '".DB_CONFIG."'"; $lang['widbcfgsuc'] = "Configurazione del database salvata con successo."; $lang['widbg'] = "Log-Level"; $lang['widbgdesc'] = "Set up the Log-Level of the Ranksystem. With this you can decide, how much information should be written to the file \"ranksystem.log\"

The higher the Log-Level, the more information you'll get.

Changing the Log-Level will take effect with the next restart of the Ranksystem bot.

Please don't let the Ranksystem running longer on \"6 - DEBUG\" this could impair your filesystem!"; diff --git a/languages/core_nl_Nederlands_nl.php b/languages/core_nl_Nederlands_nl.php index 7dda3c3..2a2a59b 100644 --- a/languages/core_nl_Nederlands_nl.php +++ b/languages/core_nl_Nederlands_nl.php @@ -1,4 +1,5 @@ zojuist toegevoegd aan ranksysteem."; @@ -60,7 +61,7 @@ $lang['insterr2'] = "%1\$s is nodig maar is niet geinstalleerd. Installeer %1\$s en probeer nogmaals!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr3'] = "PHP %1\$s function moet zijn ingeschakeld maar is uitgeschakeld. Schakel A.U.B. PHP %1\$s functie en probeer nogmaals!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr4'] = "Je PHP versie (%s) is onder 5.5.0. Update je PHP en probeer nogmaals!"; -$lang['isntwicfg'] = "Kan de database configuratie niet opslaan! Bewerk A.U.B de 'other/dbconfig.php' met chmod 740 (op windows 'full access') en probeer nogmaals."; +$lang['isntwicfg'] = "Kan de database configuratie niet opslaan! Bewerk A.U.B de '".DB_CONFIG."' met chmod 740 (op windows 'full access') en probeer nogmaals."; $lang['isntwicfg2'] = "Configuratie Webinterface"; $lang['isntwichm'] = "Schrijven toestemming mislukt op map \"%s\". Geef A.U.B. chmod 740 (op windows 'full access') en probeer de Ranksysteem nogmaals te starten."; $lang['isntwiconf'] = "Open de %s om het Ranksysteem te configureren!"; @@ -408,7 +409,7 @@ $lang['wiconferr'] = "There is an error in the configuration of the Ranksystem. Please go to the webinterface and correct the rank settings!"; $lang['widaform'] = "Date format"; $lang['widaformdesc'] = "Choose the showing date format.

Example:
%a days, %h hours, %i mins, %s secs"; -$lang['widbcfgerr'] = "Error while saving the database configurations! Connection failed or writeout error for 'other/dbconfig.php'"; +$lang['widbcfgerr'] = "Error while saving the database configurations! Connection failed or writeout error for '".DB_CONFIG."'"; $lang['widbcfgsuc'] = "Database configurations saved successfully."; $lang['widbg'] = "Log-Level"; $lang['widbgdesc'] = "Set up the Log-Level of the Ranksystem. With this you can decide, how much information should be written to the file \"ranksystem.log\"

The higher the Log-Level, the more information you'll get.

Changing the Log-Level will take effect with the next restart of the Ranksystem bot.

Please don't let the Ranksystem running longer on \"6 - DEBUG\" this could impair your filesystem!"; diff --git a/languages/core_pl_polski_pl.php b/languages/core_pl_polski_pl.php index b1de754..326c392 100644 --- a/languages/core_pl_polski_pl.php +++ b/languages/core_pl_polski_pl.php @@ -1,4 +1,5 @@ dodany do Ranksystemu teraz."; @@ -60,7 +61,7 @@ $lang['insterr2'] = "%1\$s jest potrzebny, ale wydaje się, ze nie jest zainstalowany. Zainstaluj %1\$s i sprobuj ponownie!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr3'] = "Funkcja PHP %1\$s musi byc włączona, ale wydaje się byc wyłączona. Włącz funkcje PHP %1\$s i sprobuj ponownie!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr4'] = "Twoja wersja PHP (%s) jest starsza niz 5.5.0. Zaktualizuj PHP i sprobuj ponownie!"; -$lang['isntwicfg'] = "Nie można zapisać konfiguracji bazy danych! Proszę przypisać pełne prawa do 'other/dbconfig.php' (Linux: chmod 740; Windows: 'pełny dostep') i sprobowac ponownie ponownie."; +$lang['isntwicfg'] = "Nie można zapisać konfiguracji bazy danych! Proszę przypisać pełne prawa do '".DB_CONFIG."' (Linux: chmod 740; Windows: 'pełny dostep') i sprobowac ponownie ponownie."; $lang['isntwicfg2'] = "Skonfiguruj interfejs WWW"; $lang['isntwichm'] = "Zapisywanie uprawnien do folderu \"%s\" jest nieobecne. Przydziel pełne prawa (Linux: chmod 740; Windows: 'pełny dostep') i sprobuj ponownie uruchomic system Ranksystem."; $lang['isntwiconf'] = "Otworz %s aby skonfigurowac system rang!"; @@ -408,7 +409,7 @@ $lang['wiconferr'] = "Wystąpił błąd w konfiguracji systemu Ranksystem. Przejdz do interfejsu sieciowego i popraw ustawienia podstawowe. Szczegolnie sprawdz konfiguracje 'rank up'!"; $lang['widaform'] = "Format daty"; $lang['widaformdesc'] = "Wybierz format daty wyświetlania.

Przykład:
%a days, %h hours, %i mins, %s secs"; -$lang['widbcfgerr'] = "Błąd podczas zapisywania konfiguracji bazy danych! Połączenie nie powiodło się lub błąd zapisu dla 'other/dbconfig.php'"; +$lang['widbcfgerr'] = "Błąd podczas zapisywania konfiguracji bazy danych! Połączenie nie powiodło się lub błąd zapisu dla '".DB_CONFIG."'"; $lang['widbcfgsuc'] = "Konfiguracje bazy danych zostały pomyślnie zapisane."; $lang['widbg'] = "Log-Level"; $lang['widbgdesc'] = "Set up the Log-Level of the Ranksystem. With this you can decide, how much information should be written to the file \"ranksystem.log\"

The higher the Log-Level, the more information you'll get.

Changing the Log-Level will take effect with the next restart of the Ranksystem bot.

Please don't let the Ranksystem running longer on \"6 - DEBUG\" this could impair your filesystem!"; diff --git "a/languages/core_pt_Portugu\303\252s_pt.php" "b/languages/core_pt_Portugu\303\252s_pt.php" index d750c71..6707e14 100644 --- "a/languages/core_pt_Portugu\303\252s_pt.php" +++ "b/languages/core_pt_Portugu\303\252s_pt.php" @@ -1,4 +1,5 @@ adicionado ao sistema de ranking agora."; @@ -60,7 +61,7 @@ $lang['insterr2'] = "%1\$s é necessário, mas parece que não está instalado. Instalar %1\$s e tente novamente!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr3'] = "A função PHP %1\$s precisa ser ativada, mas parece estar desativada. Por favor, ative o PHP %1\$s e tente novamente!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr4'] = "Sua versão PHP (%s) está abaixo de 5.5.0. Atualize seu PHP e tente novamente!"; -$lang['isntwicfg'] = "Não é possível salvar a configuração do banco de dados! Edite o 'other/dbconfig.php' com um chmod 740 (no windows 'acesso total') e tente novamente após."; +$lang['isntwicfg'] = "Não é possível salvar a configuração do banco de dados! Edite o '".DB_CONFIG."' com um chmod 740 (no windows 'acesso total') e tente novamente após."; $lang['isntwicfg2'] = "Configure a Interface da Web"; $lang['isntwichm'] = "Permissões de gravação falhou na pasta \"%s\". Por favor, dê a permissão chmod 740 (no windows 'acesso total') e tente iniciar o Sistema de ranking novamente."; $lang['isntwiconf'] = "Abra o %s para configurar o Sistema de ranking!"; @@ -408,7 +409,7 @@ $lang['wiconferr'] = "Há um erro na configuração do Sistema de ranking. Acesse a interface da web e corrija as Configurações do núcleo. Especialmente verifique o config 'Classificações'!!"; $lang['widaform'] = "Formato de data"; $lang['widaformdesc'] = "Escolha o formato da data de exibição.

Exemplo:
%a Dias, %h horas, %i minutos, %s segundos"; -$lang['widbcfgerr'] = "Erro ao salvar as configurações do banco de dados! A conexão falhou ou escreveu erro para 'other/dbconfig.php'"; +$lang['widbcfgerr'] = "Erro ao salvar as configurações do banco de dados! A conexão falhou ou escreveu erro para '".DB_CONFIG."'"; $lang['widbcfgsuc'] = "Configurações de banco de dados salvas com sucesso."; $lang['widbg'] = "Log-Level"; $lang['widbgdesc'] = "Configurar o nível de log do sistema de ranking. Com isso, você pode decidir quanta informação deve ser gravada no arquivo \"ranksystem.log\"

Quanto maior o nível de log, mais informações você obterá.

Alterar o nível de log entrará em vigor com a próxima reinicialização do sistema de ranking.

Por favor, não deixe o Ranksystem funcionando por muito tempo com \"6 - DEBUG\" isso pode prejudicar seu sistema de arquivos!"; diff --git "a/languages/core_ro_Rom\303\242n\304\203_ro.php" "b/languages/core_ro_Rom\303\242n\304\203_ro.php" index 174de13..a06fcf6 100644 --- "a/languages/core_ro_Rom\303\242n\304\203_ro.php" +++ "b/languages/core_ro_Rom\303\242n\304\203_ro.php" @@ -1,4 +1,5 @@ adaugat la Sistem Rank acum."; @@ -60,7 +61,7 @@ $lang['insterr2'] = "%1\$s este necesar, dar nu pare sa fie instalat. Instalare %1\$s si incearca din nou!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr3'] = "Functia PHP %1\$s trebuie sa fie activata, dar pare sa fie dezactivata. Activati funcia PHP %1\$s si incearca din nou!
Path to your PHP config file, if one is defined and loaded: %3\$s"; $lang['insterr4'] = "Versiunea dvs. PHP (%s) este sub 5.5.0. Actualizati-va PHP-ul si ?ercati din nou!"; -$lang['isntwicfg'] = "Nu se poate salva configura?ia bazei de date ! Va rugam sa modifica?i 'other/dbconfig.php' cu acces chmod 740 (windows 'full access') ?i incerca?i iar."; +$lang['isntwicfg'] = "Nu se poate salva configura?ia bazei de date ! Va rugam sa modifica?i '".DB_CONFIG."' cu acces chmod 740 (windows 'full access') ?i incerca?i iar."; $lang['isntwicfg2'] = "Configure Webinterface"; $lang['isntwichm'] = "Scrierea permisiunilor a esuat in dosarul \"%s\". Va rugam sa le dati un chmod 740 (pe accesul complet la ferestre) ?i sa ?erca?i sa porni?i din nou sistemul Ranks."; $lang['isntwiconf'] = "Deschide?i %s sa configura?i Ranksystem!"; @@ -408,7 +409,7 @@ $lang['wiconferr'] = "There is an error in the configuration of the Ranksystem. Please go to the webinterface and correct the rank settings!"; $lang['widaform'] = "Format data"; $lang['widaformdesc'] = "Choose the showing date format.

Example:
%a days, %h hours, %i mins, %s secs"; -$lang['widbcfgerr'] = "Error while saving the database configurations! Connection failed or writeout error for 'other/dbconfig.php'"; +$lang['widbcfgerr'] = "Error while saving the database configurations! Connection failed or writeout error for '".DB_CONFIG."'"; $lang['widbcfgsuc'] = "Database configurations saved successfully."; $lang['widbg'] = "Log-Level"; $lang['widbgdesc'] = "Set up the Log-Level of the Ranksystem. With this you can decide, how much information should be written to the file \"ranksystem.log\"

The higher the Log-Level, the more information you'll get.

Changing the Log-Level will take effect with the next restart of the Ranksystem bot.

Please don't let the Ranksystem running longer on \"6 - DEBUG\" this could impair your filesystem!"; diff --git "a/languages/core_ru_P\321\203\321\201\321\201\320\272\320\270\320\271_ru.php" "b/languages/core_ru_P\321\203\321\201\321\201\320\272\320\270\320\271_ru.php" index f5b410a..76a9f52 100644 --- "a/languages/core_ru_P\321\203\321\201\321\201\320\272\320\270\320\271_ru.php" +++ "b/languages/core_ru_P\321\203\321\201\321\201\320\272\320\270\320\271_ru.php" @@ -1,4 +1,5 @@ %1\$s модуль и попробуйте заново!
Путь к конфигурационному файлу PHP, если он указан и загружен, таков: %3\$s"; $lang['insterr3'] = "Для работы системы рангов требуется наличие включеной функции PHP %1\$s. Пожалуйста, включите данную %1\$s функцию и попробуйте заново!
Путь к конфигурационному файлу PHP, если он указан и загружен, таков: %3\$s"; $lang['insterr4'] = "Ваша версия PHP (%s) ниже допустимой 5.5.0. Пожалуйста, обновите версию PHP и попробуйте заново!"; -$lang['isntwicfg'] = "Не получилось записать настройки базы данных! Пожалуйста, установите права на запись 'other/dbconfig.php' chmod 740 (В windows 'Полный доступ') и попробуйте заново."; +$lang['isntwicfg'] = "Не получилось записать настройки базы данных! Пожалуйста, установите права на запись '".DB_CONFIG."' chmod 740 (В windows 'Полный доступ') и попробуйте заново."; $lang['isntwicfg2'] = "Конфигурирование веб-интерфейса"; $lang['isntwichm'] = "Отсутствуют права на запись в папку \"%s\". Пожалуйста, установите на эту папку права chmod 740 (В windows 'полный доступ') и повторите этот этап заново."; $lang['isntwiconf'] = "Затем откройте страницу %s для настройки системы рангов!"; @@ -408,7 +409,7 @@ $lang['wiconferr'] = "Есть ошибка в конфигурации системы рангов. Пожалуйста, выполните вход в панель управления и проверьте настройки раздела 'Настройка системы рангов'. Особенно тщательно проверьте 'Ранги'!"; $lang['widaform'] = "Формат даты"; $lang['widaformdesc'] = "Выберите формат показа даты.

Пример:
%a дней, %h часов, %i минут, %s секунд"; -$lang['widbcfgerr'] = "Ошибка сохранения настроек в базе данных! Ошибка подключения, проверьте на правильность настройки '/other/dbconfig.php'"; +$lang['widbcfgerr'] = "Ошибка сохранения настроек в базе данных! Ошибка подключения, проверьте на правильность настройки '".DB_CONFIG."'"; $lang['widbcfgsuc'] = "Настройки базы данных успешно сохранены."; $lang['widbg'] = "Уровень логирования"; $lang['widbgdesc'] = "Настройка уровня логирования системы рангов. Вы можете решить, какую информацию необходимо записывать в лог-файл \"ranksystem.log\"

Чем выше уровень, тем больше информации будет записано.

Изменения данного параметра будут применены только после перезапуска системы рангов.

Не рекомендуется использовать \"6 - DEBUG\" на постоянной основе. Может привести к большому количеству записи в лог и замедлению работы системы рангов!"; diff --git a/other/_constants.php b/other/_constants.php new file mode 100644 index 0000000..ad2e651 --- /dev/null +++ b/other/_constants.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/other/_functions.php b/other/_functions.php index 73ecdb1..8283dab 100644 --- a/other/_functions.php +++ b/other/_functions.php @@ -1,4 +1,5 @@ '; + + try { + $dbconfig = fopen(DB_CONFIG,'w'); + $successful = fwrite($dbconfig, $newconfig) != False; + fclose($dbconfig); + } catch (Exception $e) { + $successful = False + } + + return $successful; +} ?> \ No newline at end of file diff --git a/other/config.php b/other/config.php index dd18023..5bfc129 100644 --- a/other/config.php +++ b/other/config.php @@ -1,5 +1,6 @@ \ No newline at end of file diff --git a/webinterface/db.php b/webinterface/db.php index 655930b..11b3d2a 100644 --- a/webinterface/db.php +++ b/webinterface/db.php @@ -1,4 +1,6 @@ '; $dbserver = $_POST['dbtype'].':host='.$_POST['dbhost'].';dbname='.$_POST['dbname'].';charset=utf8mb4'; try { $mysqlcon = new PDO($dbserver, $_POST['dbuser'], $_POST['dbpass']); - $handle=fopen('../other/dbconfig.php','w'); - if(!fwrite($handle,$newconfig)) - { + if(!writeDatabaseConfig($_POST['dbtype'], $_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'])) { $err_msg = sprintf($lang['widbcfgerr']); $err_lvl = 3; } else {