array("ชื่อแม่ของฉัน", "ชื่อพ่อของฉัน", "สถานที่เกิดของฉัน", "ชื่อดาราคนโปรดของฉัน", "ยี่ห้อคอมพิวเตอร์ของฉัน", "อาหารจานโปรดของฉัน", "เลขบัตรประชาชน",),); $ConfigiMC->UpdateArrayConfig("feature", $NewConfig["forgot_pwd"]); file_put_contents("backend/version.info", "v1.2"); DisplayMSG("success", "Update system v1.1 to v1.2 success.", "index.php"); exit(); } if ($VersionNewiMC == "v1.2") { $InsertTable = "CREATE TABLE IF NOT EXISTS `shop_redeem` ( `id` bigint(11) NOT NULL AUTO_INCREMENT, `type` enum('point','item') NOT NULL DEFAULT 'point', `code` varchar(255) DEFAULT NULL, `value` varchar(255) DEFAULT NULL, `status` enum('pending','used','times') CHARACTER SET latin1 NOT NULL DEFAULT 'pending', `used_data` text, `time_create` int(25) DEFAULT NULL, `time_update` int(25) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"; @mysqli_query($conn, $InsertTable); $NewConfigTopup = array("20" => "20", "50" => $Config["topup"]["50"], "90" => $Config["topup"]["90"], "150" => $Config["topup"]["150"], "300" => $Config["topup"]["300"], "500" => $Config["topup"]["500"], "1000" => $Config["topup"]["1000"],); $ConfigiMC->UpdateArrayConfig("topup", $NewConfigTopup); $NewConfigTopupEvent = array("event" => "false", "20" => array("date_start" => "", "date_end" => "", "point" => "", "item" => "", "desc" => ""), "50" => array("date_start" => "", "date_end" => "", "point" => "", "item" => "", "desc" => ""), "90" => array("date_start" => "", "date_end" => "", "point" => "", "item" => "", "desc" => ""), "150" => array("date_start" => "", "date_end" => "", "point" => "", "item" => "", "desc" => ""), "300" => array("date_start" => "", "date_end" => "", "point" => "", "item" => "", "desc" => ""), "500" => array("date_start" => "", "date_end" => "", "point" => "", "item" => "", "desc" => ""), "1000" => array("date_start" => "", "date_end" => "", "point" => "", "item" => "", "desc" => ""),); $ConfigiMC->UpdateArrayConfig("topup_event", $NewConfigTopupEvent); file_put_contents("backend/version.info", "v1.3"); DisplayMSG("success", "Update system v1.2 to v1.3 success.", "index.php"); exit(); } if ($VersionNewiMC == "v1.3") { @mysqli_query($conn, "ALTER TABLE `shop_item` ADD `server_id` INT( 10 ) NOT NULL DEFAULT '0' AFTER `cat_id` ;"); @mysqli_query($conn, "ALTER TABLE `" . $Config["minecraft"]["authme"]["database"] . "` ADD `random_data` VARCHAR( 50 ) NULL DEFAULT NULL AFTER `point` ;"); @mysqli_query($conn, "ALTER TABLE `shop_history` CHANGE `type` `type` ENUM( 'buyitem', 'random' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;"); $ConfigiMC->UpdateConfig("feature", "bungeecord", "no"); $NewConfigBungeeCord = array(array("id" => "lobby", "name" => "Lobby Server", "ip" => "127.0.0.1", "query_port" => 25566, "rcon_port" => 25576, "rcon_password" => "NewiMC1234"), array("id" => "game", "name" => "Game Server", "ip" => "127.0.0.1", "query_port" => 25567, "rcon_port" => 25577, "rcon_password" => "NewiMC1234"),); $ConfigiMC->UpdateConfig("feature", "bungeecord_server", $NewConfigBungeeCord); $NewConfigBungeeCord_default = array("ip" => "127.0.0.1", "query_port" => 25565); $ConfigiMC->UpdateConfig("feature", "bungeecord_default", $NewConfigBungeeCord_default); $ConfigiMC->UpdateConfig("feature", "random", "no"); $NewConfigRandom = array("setting" => array("type" => "time", "point_value" => 10, "time_value" => 300, "server" => "default"), "data" => array(array("percentage" => 25, "type" => "point", "value" => array(10, 50)), array("percentage" => 20, "type" => "point", "value" => array(50, 100)), array("percentage" => 5, "type" => "point", "value" => array(100, 150)), array("percentage" => 10, "type" => "command", "value" => array("give 265 10", "give 266 5")), array("percentage" => 10, "type" => "command", "value" => array("give 265 32", "give 266 15")), array("percentage" => 10, "type" => "command", "value" => array("give 265 64", "give 266 32")), array("percentage" => 5, "type" => "command", "value" => array("give 266 16", "give 264 16")), array("percentage" => 5, "type" => "command", "value" => array("give 266 32", "give 264 32")), array("percentage" => 5, "type" => "command", "value" => array("give 266 64", "give 264 64")), array("percentage" => 5, "type" => "command", "value" => array("give 266 64", "give 264 64", "give 276 1")),),); $ConfigiMC->UpdateConfig("feature", "random_setting", $NewConfigRandom); file_put_contents("backend/version.info", "v1.4"); DisplayMSG("success", "Update system v1.3 to v1.4 success.", "index.php"); exit(); } if ($VersionNewiMC == "v1.4") { file_put_contents("backend/version.info", "v1.5"); DisplayMSG("success", "Update system v1.4 to v1.5 success.", "index.php"); exit(); } if ($VersionNewiMC == "v1.5") { file_put_contents("backend/version.info", "v1.6"); DisplayMSG("success", "Update system v1.5 to v1.6 success.", "index.php"); exit(); } if ($VersionNewiMC == "v1.6") { @mysqli_query($conn, "CREATE TABLE IF NOT EXISTS `shop_truewallet` ( `id` bigint(11) NOT NULL AUTO_INCREMENT, `claim_by` varchar(50) DEFAULT NULL, `claim_on` datetime DEFAULT NULL, `claim_ip` varchar(25) DEFAULT NULL, `transaction_id` bigint(20) DEFAULT NULL, `transfer_date` varchar(20) DEFAULT NULL, `transfer_phone` varchar(10) DEFAULT NULL, `transfer_amount` double(64,2) DEFAULT NULL, `log_value` varchar(255) DEFAULT NULL, `hash` varchar(50) DEFAULT NULL, `time_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); $NewConfigTruewallet = array("function" => "no", "phone" => "0000000000", "server" => "default", "email" => "wallet_email@email.com", "password" => "wallet_password", "data" => array(10 => array("details" => "TrueWallet 10฿", "point" => 15, "command" => NULL), 50 => array("details" => "TrueWallet 50฿", "point" => 75, "command" => NULL), 100 => array("details" => "TrueWallet 100฿ + Diamond x10", "point" => 150, "command" => array("give 264 10")), 300 => array("details" => "TrueWallet 300฿ + Diamond x32", "point" => 450, "command" => array("give 264 32")), 500 => array("details" => "TrueWallet 500฿ + Diamond x64", "point" => 750, "command" => array("give 264 64")), 1000 => array("details" => "TrueWallet 1,000฿ + Diamond x64 + Diamond Sword x3", "point" => 750, "command" => array("give 264 64", "give 276 3")),),); $ConfigiMC->UpdateArrayConfig("truewallet", $NewConfigTruewallet); file_put_contents("backend/version.info", "v1.7"); DisplayMSG("success", "Update system v1.6 to v1.7 success.", "index.php"); exit(); } if ($VersionNewiMC == "v1.7") { $ItemQuery = @mysqli_query($conn, "SELECT * FROM `shop_item`"); while ($ItemArr = mysqli_fetch_assoc($ItemQuery)) { if (!is_array(json_decode($ItemArr["value"], TRUE))) { $NewValue = ""; if ($ItemArr["type"] == "item") { $NewValue = array("give " . $ItemArr["value"] . " " . $ItemArr["count"]); } else { $NewValue = array($ItemArr["value"]); } @mysqli_query($conn, "UPDATE `shop_item` SET `value`='" . json_encode($NewValue) . "' WHERE `id`='" . $ItemArr["id"] . "' LIMIT 1;"); } } sleep(1); @mysqli_query($conn, "ALTER TABLE `shop_item` DROP `type`;"); @mysqli_query($conn, "ALTER TABLE `shop_item` CHANGE `value` `value` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ;"); file_put_contents("backend/version.info", "v1.8"); DisplayMSG("success", "Update system v1.7 to v1.8 success.", "index.php"); exit(); } if ($VersionNewiMC == "v1.8") { $NewConfigSetting = array("member_register" => "yes", "member_forgot" => "yes", "online_check" => "yes", "site" => "no"); $ConfigiMC->UpdateConfig("site", "function", $NewConfigSetting); $UpdateSQL = "ALTER TABLE `shop_truewallet` CHANGE `claim_on` `claim_on` DATETIME NULL DEFAULT NULL , CHANGE `time_create` `time_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ;"; @mysqli_query($conn, $UpdateSQL); file_put_contents("backend/version.info", "v1.9"); DisplayMSG("success", "Update system v1.8 to v1.9 success.", "index.php"); exit(); }; echo ''; if ($_SESSION["installed"] == "true") { @unlink("install.php"); @unlink("installed.php"); $_SESSION["installed"] = ""; } else { if ($Config["site"]["installed"] == "false") { if (file_exists("install.php")) { header("Location: install.php"); } } }; echo ''; require_once ('include/class.license.php'); if ($_GET["action"] == "license"): $domain = str_replace('www.', '', $_SERVER['HTTP_HOST']); $ip = $_SERVER['SERVER_ADDR']; if ($_POST["do"] == "register") { if (file_exists("newimc.key")) { if (!@unlink("newimc.key")) { exit(json_encode(array("result" => false, "msg" => "ไม่สามารถ Delete Key ได้, กรุณาลบไฟล์ imc.key ออกจากระบบ"))); } } $license = new GamerXP_License("New_iMC"); $registerinfo = $license->registerkey($_POST["key"]); if ($registerinfo['info'] == 'success') { $ConfigiMC->UpdateConfig("license", "key", $_POST["key"]); exit(json_encode(array("result" => true, "msg" => "ลงทะเบียน Register Key นี้เรียบร้อยแล้ว
กรุณา Refresh หน้านี้ใหม่"))); } elseif ($registerinfo['info'] == 'expire') { exit(json_encode(array("result" => false, "msg" => "Register Key นี้้หมดอายุการใช้งานไปแล้ว"))); } elseif ($registerinfo['info'] == 'ip_lock') { exit(json_encode(array("result" => false, "msg" => "IP '" . $ip . "' นี้ไม่ถูกต้อง"))); } elseif ($registerinfo['info'] == 'domain_lock') { exit(json_encode(array("result" => false, "msg" => "Domain '" . $domain . "' นี้ไม่ถูกต้อง"))); } elseif ($registerinfo['info'] == 'license_invaild') { exit(json_encode(array("result" => false, "msg" => "Register Key '" . $_POST["key"] . "' นี้ไม่ถูกต้อง"))); } exit(json_encode(array("result" => false, "msg" => "ไม่สามารถดำเนินการต่อไปได้ (ERROR: " . $registerinfo['info'] . ")"))); } exit(); endif;; echo ''; if ($_GET["do"] == "playeronline"): $ServerQuery = ServerQuery(); echo json_encode($ServerQuery, JSON_UNESCAPED_UNICODE); exit(); endif; if ($Config["site"]["function"]["site"] == "yes") { DisplayMSG("danger", "Website is not available right now.
เว็บไซต์ไม่พร้อมให้บริการในขณะนี้"); }; echo ' '; echo $Config['site']['title']; echo ' '; include ("pages/inc.meta.php");; echo ' '; $menu = "home"; include ("pages/template.header.php");; echo '
'; $CenterData = getFrontend("center"); foreach ($CenterData as $Key => $Data) {; echo '
'; echo $Data[0]; echo '
'; echo CenterTemplate($Data[1], $Data); echo '
'; }; echo '
'; include ("pages/template.right.php");; echo '
'; $ContentData = getFrontend("content"); foreach ($ContentData as $Key => $Data) { echo ContentTemplate($Data[2], $Data); }; echo '
'; $FOOTERKey = "MjM4o7Qa3zcR5Jxi"; require_once ("pages/template.footer.php");; echo ' ';