Advertisement
Guest User

Untitled

a guest
Sep 30th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.95 KB | None | 0 0
  1. <?php
  2. if(isset($_POST['install'])){
  3. if(isset($_POST['forumTitle']) && isset($_POST['mysqlDatabase']) && isset($_POST['mysqlUsername']) && isset($_POST['mysqlPassword']) && isset($_POST['adminUsername']) && isset($_POST['adminEmail'])){
  4. $ftitle = $_POST['forumTitle'];
  5. $fdbname = $_POST['mysqlDatabase'];
  6. $fdbuser = $_POST['mysqlUsername'];
  7. $fdbpass = $_POST['mysqlPassword'];
  8. $fadmin = $_POST['adminUsername'];
  9. $femail = $_POST['adminEmail'];
  10. if( $_SERVER['HTTPS']){
  11. $flink = "https://".$_SERVER['HTTP_HOST'];
  12. }else{
  13. $flink = "http://".$_SERVER['HTTP_HOST'];
  14. }
  15. $conn = mysqli_connect('localhost',$fdbuser,$fdbpass);
  16. $dbcon = mysqli_select_db($conn,$fdbname);
  17. if(!$conn){
  18. die("Connection failed : " . mysqli_error());
  19. }else if(!$dbcon){
  20. die("Database Connection failed : " . mysqli_error());
  21. }else{
  22. $query = mysqli_query($conn,"CREATE TABLE `000_access_tokens` (
  23. `id` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
  24. `user_id` int(10) unsigned NOT NULL,
  25. `last_activity` int(11) NOT NULL,
  26. `lifetime` int(11) NOT NULL,
  27. PRIMARY KEY (`id`)
  28. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  29. $query = mysqli_query($conn,"CREATE TABLE `000_api_keys` (
  30. `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  31. PRIMARY KEY (`id`)
  32. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;");
  33. $query = mysqli_query($conn,"CREATE TABLE `000_auth_tokens` (
  34. `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  35. `payload` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  36. `created_at` timestamp NOT NULL,
  37. PRIMARY KEY (`id`)
  38. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  39. $query = mysqli_query($conn,"CREATE TABLE `000_discussions` (
  40. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  41. `title` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
  42. `comments_count` int(10) unsigned NOT NULL DEFAULT '0',
  43. `participants_count` int(10) unsigned NOT NULL DEFAULT '0',
  44. `number_index` int(10) unsigned NOT NULL DEFAULT '0',
  45. `start_time` datetime NOT NULL,
  46. `start_user_id` int(10) unsigned DEFAULT NULL,
  47. `start_post_id` int(10) unsigned DEFAULT NULL,
  48. `last_time` datetime DEFAULT NULL,
  49. `last_user_id` int(10) unsigned DEFAULT NULL,
  50. `last_post_id` int(10) unsigned DEFAULT NULL,
  51. `last_post_number` int(10) unsigned DEFAULT NULL,
  52. `hide_time` datetime DEFAULT NULL,
  53. `hide_user_id` int(10) unsigned DEFAULT NULL,
  54. `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  55. `is_private` tinyint(1) NOT NULL DEFAULT '0',
  56. `is_approved` tinyint(1) NOT NULL DEFAULT '1',
  57. `is_locked` tinyint(1) NOT NULL DEFAULT '0',
  58. `is_sticky` tinyint(1) NOT NULL DEFAULT '0',
  59. PRIMARY KEY (`id`)
  60. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  61. $query = mysqli_query($conn,"CREATE TABLE `000_discussions_tags` (
  62. `discussion_id` int(10) unsigned NOT NULL,
  63. `tag_id` int(10) unsigned NOT NULL,
  64. PRIMARY KEY (`discussion_id`,`tag_id`)
  65. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  66. $query = mysqli_query($conn,"CREATE TABLE `000_email_tokens` (
  67. `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  68. `email` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  69. `user_id` int(10) unsigned NOT NULL,
  70. `created_at` timestamp NOT NULL,
  71. PRIMARY KEY (`id`)
  72. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  73. $query = mysqli_query($conn,"CREATE TABLE `000_flags` (
  74. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  75. `post_id` int(10) unsigned NOT NULL,
  76. `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  77. `user_id` int(10) unsigned DEFAULT NULL,
  78. `reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  79. `reason_detail` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  80. `time` datetime NOT NULL,
  81. PRIMARY KEY (`id`)
  82. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  83. $query = mysqli_query($conn,"CREATE TABLE `000_groups` (
  84. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  85. `name_singular` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  86. `name_plural` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  87. `color` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  88. `icon` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  89. PRIMARY KEY (`id`)
  90. ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  91. $query = mysqli_query($conn,"CREATE TABLE `000_mentions_posts` (
  92. `post_id` int(10) unsigned NOT NULL,
  93. `mentions_id` int(10) unsigned NOT NULL,
  94. PRIMARY KEY (`post_id`,`mentions_id`)
  95. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  96. $query = mysqli_query($conn,"CREATE TABLE `000_mentions_users` (
  97. `post_id` int(10) unsigned NOT NULL,
  98. `mentions_id` int(10) unsigned NOT NULL,
  99. PRIMARY KEY (`post_id`,`mentions_id`)
  100. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  101. $query = mysqli_query($conn,"CREATE TABLE `000_migrations` (
  102. `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  103. `extension` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL
  104. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  105. $query = mysqli_query($conn,"CREATE TABLE `000_notifications` (
  106. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  107. `user_id` int(10) unsigned NOT NULL,
  108. `sender_id` int(10) unsigned DEFAULT NULL,
  109. `type` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  110. `subject_type` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  111. `subject_id` int(10) unsigned DEFAULT NULL,
  112. `data` blob,
  113. `time` datetime NOT NULL,
  114. `is_read` tinyint(1) NOT NULL DEFAULT '0',
  115. `is_deleted` tinyint(1) NOT NULL DEFAULT '0',
  116. PRIMARY KEY (`id`)
  117. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  118. $query = mysqli_query($conn,"CREATE TABLE `000_password_tokens` (
  119. `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  120. `user_id` int(10) unsigned NOT NULL,
  121. `created_at` timestamp NOT NULL,
  122. PRIMARY KEY (`id`)
  123. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  124. $query = mysqli_query($conn,"CREATE TABLE `000_permissions` (
  125. `group_id` int(10) unsigned NOT NULL,
  126. `permission` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  127. PRIMARY KEY (`group_id`,`permission`)
  128. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  129. $query = mysqli_query($conn,"CREATE TABLE `000_posts` (
  130. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  131. `discussion_id` int(10) unsigned NOT NULL,
  132. `number` int(10) unsigned DEFAULT NULL,
  133. `time` datetime NOT NULL,
  134. `user_id` int(10) unsigned DEFAULT NULL,
  135. `type` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  136. `content` text COLLATE utf8mb4_unicode_ci,
  137. `edit_time` datetime DEFAULT NULL,
  138. `edit_user_id` int(10) unsigned DEFAULT NULL,
  139. `hide_time` datetime DEFAULT NULL,
  140. `hide_user_id` int(10) unsigned DEFAULT NULL,
  141. `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  142. `is_private` tinyint(1) NOT NULL DEFAULT '0',
  143. `is_approved` tinyint(1) NOT NULL DEFAULT '1',
  144. PRIMARY KEY (`id`),
  145. UNIQUE KEY `posts_discussion_id_number_unique` (`discussion_id`,`number`),
  146. FULLTEXT KEY `content` (`content`)
  147. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  148. $query = mysqli_query($conn,"CREATE TABLE `000_posts_likes` (
  149. `post_id` int(10) unsigned NOT NULL,
  150. `user_id` int(10) unsigned NOT NULL,
  151. PRIMARY KEY (`post_id`,`user_id`)
  152. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  153. $query = mysqli_query($conn,"CREATE TABLE `000_settings` (
  154. `key` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  155. `value` text COLLATE utf8mb4_unicode_ci,
  156. PRIMARY KEY (`key`)
  157. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  158. $query = mysqli_query($conn,"CREATE TABLE `000_tags` (
  159. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  160. `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  161. `slug` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  162. `description` text COLLATE utf8mb4_unicode_ci,
  163. `color` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  164. `background_path` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  165. `background_mode` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  166. `position` int(11) DEFAULT NULL,
  167. `parent_id` int(10) unsigned DEFAULT NULL,
  168. `default_sort` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  169. `is_restricted` tinyint(1) NOT NULL DEFAULT '0',
  170. `is_hidden` tinyint(1) NOT NULL DEFAULT '0',
  171. `discussions_count` int(10) unsigned NOT NULL DEFAULT '0',
  172. `last_time` datetime DEFAULT NULL,
  173. `last_discussion_id` int(10) unsigned DEFAULT NULL,
  174. PRIMARY KEY (`id`),
  175. UNIQUE KEY `tags_slug_unique` (`slug`)
  176. ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  177. $query = mysqli_query($conn,"CREATE TABLE `000_users` (
  178. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  179. `username` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  180. `email` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  181. `is_activated` tinyint(1) NOT NULL DEFAULT '0',
  182. `password` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  183. `bio` text COLLATE utf8mb4_unicode_ci,
  184. `avatar_path` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  185. `preferences` blob,
  186. `join_time` datetime DEFAULT NULL,
  187. `last_seen_time` datetime DEFAULT NULL,
  188. `read_time` datetime DEFAULT NULL,
  189. `notifications_read_time` datetime DEFAULT NULL,
  190. `discussions_count` int(10) unsigned NOT NULL DEFAULT '0',
  191. `comments_count` int(10) unsigned NOT NULL DEFAULT '0',
  192. `flags_read_time` datetime DEFAULT NULL,
  193. `suspend_until` datetime DEFAULT NULL,
  194. PRIMARY KEY (`id`),
  195. UNIQUE KEY `users_username_unique` (`username`),
  196. UNIQUE KEY `users_email_unique` (`email`)
  197. ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  198. $query = mysqli_query($conn,"CREATE TABLE `000_users_discussions` (
  199. `user_id` int(10) unsigned NOT NULL,
  200. `discussion_id` int(10) unsigned NOT NULL,
  201. `read_time` datetime DEFAULT NULL,
  202. `read_number` int(10) unsigned DEFAULT NULL,
  203. `subscription` enum('follow','ignore') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  204. PRIMARY KEY (`user_id`,`discussion_id`)
  205. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  206. $query = mysqli_query($conn,"CREATE TABLE `000_users_groups` (
  207. `user_id` int(10) unsigned NOT NULL,
  208. `group_id` int(10) unsigned NOT NULL,
  209. PRIMARY KEY (`user_id`,`group_id`)
  210. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  211. $query = mysqli_query($conn,"CREATE TABLE `000_users_tags` (
  212. `user_id` int(10) unsigned NOT NULL,
  213. `tag_id` int(10) unsigned NOT NULL,
  214. `read_time` datetime DEFAULT NULL,
  215. `is_hidden` tinyint(1) NOT NULL DEFAULT '0',
  216. PRIMARY KEY (`user_id`,`tag_id`)
  217. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
  218. $fpass = '$2y$10$gmKe2WP50D2n7eL92DSrLeEVpwMLYvier5BACjwCh/wYX/YkzlrUS';
  219. $query2 = mysqli_multi_query($conn,"INSERT INTO `000_groups`(`id`,`name_singular`, `name_plural`, `color`, `icon`) VALUES ('1','Admin','Admins','#B72A2A','wrench'), ('2','Guest','Guests','',''), ('3','Member','Members','',''), ('4','Moderator','Moderators','#80349E','bolt')");
  220. $query3 = mysqli_multi_query($conn,"INSERT INTO `000_migrations` (`migration`,`extension`) VALUES('2015_02_24_000000_create_access_tokens_table',NULL), ('2015_02_24_000000_create_api_keys_table',NULL), ('2015_02_24_000000_create_config_table',NULL), ('2015_02_24_000000_create_discussions_table',NULL), ('2015_02_24_000000_create_email_tokens_table',NULL), ('2015_02_24_000000_create_groups_table',NULL), ('2015_02_24_000000_create_notifications_table',NULL), ('2015_02_24_000000_create_password_tokens_table',NULL), ('2015_02_24_000000_create_permissions_table',NULL), ('2015_02_24_000000_create_posts_table',NULL), ('2015_02_24_000000_create_users_discussions_table',NULL), ('2015_02_24_000000_create_users_groups_table',NULL), ('2015_02_24_000000_create_users_table',NULL), ('2015_09_15_000000_create_auth_tokens_table',NULL), ('2015_09_20_224327_add_hide_to_discussions',NULL), ('2015_09_22_030432_rename_notification_read_time',NULL), ('2015_10_07_130531_rename_config_to_settings',NULL), ('2015_10_24_194000_add_ip_address_to_posts',NULL), ('2015_12_05_042721_change_access_tokens_columns',NULL), ('2015_12_17_194247_change_settings_value_column_to_text',NULL), ('2016_02_04_095452_add_slug_to_discussions',NULL), ('2017_04_07_114138_add_is_private_to_discussions',NULL), ('2017_04_07_114138_add_is_private_to_posts',NULL), ('2017_04_09_152230_change_posts_content_column_to_mediumtext',NULL), ('2015_09_21_011527_add_is_approved_to_discussions',NULL)");
  221. $query4 = mysqli_multi_query($conn,"INSERT INTO `000_migrations` (`migration`,`extension`) VALUES('2015_09_21_011706_add_is_approved_to_posts',NULL), ('2017_07_22_000000_add_default_permissions',NULL), ('2015_09_02_000000_add_flags_read_time_to_users_table',NULL), ('2015_09_02_000000_create_flags_table',NULL), ('2017_07_22_000000_add_default_permissions',NULL), ('2015_05_11_000000_create_posts_likes_table',NULL), ('2015_09_04_000000_add_default_like_permissions',NULL), ('2015_02_24_000000_add_locked_to_discussions',NULL), ('2017_07_22_000000_add_default_permissions',NULL), ('2015_05_11_000000_create_mentions_posts_table',NULL), ('2015_05_11_000000_create_mentions_users_table',NULL), ('2015_02_24_000000_add_sticky_to_discussions',NULL), ('2017_07_22_000000_add_default_permissions',NULL), ('2015_05_11_000000_add_subscription_to_users_discussions_table',NULL), ('2015_05_11_000000_add_suspended_until_to_users_table',NULL), ('2015_09_14_000000_rename_suspended_until_column',NULL), ('2017_07_22_000000_add_default_permissions',NULL), ('2015_02_24_000000_create_discussions_tags_table',NULL), ('2015_02_24_000000_create_tags_table',NULL), ('2015_02_24_000000_create_users_tags_table',NULL), ('2015_02_24_000000_set_default_settings',NULL), ('2015_10_19_061223_make_slug_unique',NULL), ('2017_07_22_000000_add_default_permissions','flarum-approval')");
  222. $query5 = mysqli_multi_query($conn,"INSERT INTO `000_permissions` (`group_id`,`permission`) VALUES('2','viewDiscussions'), ('3','discussion.flagPosts'), ('3','discussion.likePosts'), ('3','discussion.reply'), ('3','discussion.replyWithoutApproval'), ('3','discussion.startWithoutApproval'), ('3','startDiscussion'), ('3','viewUserList'), ('4','discussion.approvePosts'), ('4','discussion.editPosts'), ('4','discussion.hide'), ('4','discussion.lock'), ('4','discussion.rename'), ('4','discussion.sticky'), ('4','discussion.tag'), ('4','discussion.viewFlags'), ('4','discussion.viewIpsPosts'), ('4','user.suspend')");
  223. $query6 = mysqli_multi_query($conn,"INSERT INTO `000_settings` (`key`,`value`) VALUES('version','0.1.0-beta.7'), ('allow_post_editing','reply'), ('allow_renaming','10'), ('allow_sign_up','1'), ('custom_less',''), ('default_locale','en'), ('default_route','/all'), ('extensions_enabled','[".'"flarum-approval","flarum-bbcode","flarum-emoji","flarum-english","flarum-flags","flarum-likes","flarum-lock","flarum-markdown","flarum-mentions","flarum-sticky","flarum-subscriptions","flarum-suspend","flarum-tags"]'."'), ('forum_title','".$ftitle."'), ('forum_description',''), ('mail_driver','mail'), ('mail_from','noreply@localhost'), ('theme_colored_header','0'), ('theme_dark_mode','0'), ('theme_primary_color','#FF0000'), ('theme_secondary_color','#FFFFFF'), ('welcome_message','This is beta software and you should not use it in production, the installer was made by CKHAWAND from 000webhost!'), ('welcome_title','Welcome to 000webhost flarum installation'), ('flarum-tags.max_primary_tags','1'), ('flarum-tags.min_primary_tags','1'), ('flarum-tags.max_secondary_tags','3'), ('flarum-tags.min_secondary_tags','0')");
  224. $query7 = mysqli_multi_query($conn,"INSERT INTO `000_tags`(`id`, `name`, `slug`, `description`, `color`, `background_path`, `background_mode`, `position`, `parent_id`, `default_sort`, `is_restricted`, `is_hidden`, `discussions_count`, `last_time`, `last_discussion_id`) VALUES ('1','General','general',NULL,'#888',NULL,NULL,'0',NULL,NULL,'0','0','0',NULL,NULL)");
  225. $query8 = mysqli_multi_query($conn,"INSERT INTO `000_users`(`id`, `username`, `email`, `is_activated`, `password`, `bio`, `avatar_path`, `preferences`, `join_time`, `last_seen_time`, `read_time`, `notifications_read_time`, `discussions_count`, `comments_count`, `flags_read_time`, `suspend_until`) VALUES ('1','".$fadmin."','".$femail."','1','".$fpass."',NULL,NULL,NULL,'".date("Y-m-d h:i:sa")."','".date("Y-m-d h:i:sa")."',NULL,NULL,'0','0',NULL,NULL)");
  226. $query9 = mysqli_multi_query($conn,"INSERT INTO `000_users_groups`(`user_id`, `group_id`) VALUES ('1','1')");
  227. file_put_contents("installer.zip", fopen("http://000webhost.ml/000flarum.zip", 'r'));
  228. $zip = new ZipArchive;
  229. $zip->open('installer.zip');
  230. $zip->extractTo('./');
  231. $zip->close();
  232. $myFile = "installer.zip";
  233. $installerFile = "install.php";
  234. unlink($myFile);
  235. unlink(basename(__FILE__));
  236. $config = "<?php" . " return array (
  237. 'debug' => false,
  238. 'database' =>
  239. array (
  240. 'driver' => 'mysql',
  241. 'host' => 'localhost',
  242. 'database' => '".$fdbname."',
  243. 'username' => '".$fdbuser."',
  244. 'password' => '".$fdbpass."',
  245. 'charset' => 'utf8mb4',
  246. 'collation' => 'utf8mb4_unicode_ci',
  247. 'prefix' => '000_',
  248. 'port' => '3306',
  249. ),
  250. 'url' => '".$flink."',
  251. 'paths' =>
  252. array (
  253. 'api' => 'api',
  254. 'admin' => 'admin',
  255. ),
  256. );";
  257. file_put_contents("config.php", "");
  258. file_put_contents("config.php", $config);
  259. header('Location: '.$flink);
  260. }
  261. }
  262. }
  263. ?><!doctype html>
  264. <html>
  265. <head>
  266. <meta charset="utf-8">
  267. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  268. <title>Install Flarum</title>
  269. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
  270.  
  271. <style>
  272. @import url(//fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700,600);
  273.  
  274. body {
  275. background: #fff;
  276. margin: 0;
  277. padding: 0;
  278. line-height: 1.5;
  279. }
  280. body, input, button {
  281. font-family: 'Open Sans', sans-serif;
  282. font-size: 16px;
  283. color: #7E96B3;
  284. }
  285. .container {
  286. max-width: 515px;
  287. margin: 0 auto;
  288. padding: 100px 30px;
  289. text-align: center;
  290. }
  291. a {
  292. color: #e7652e;
  293. text-decoration: none;
  294. }
  295. a:hover {
  296. text-decoration: underline;
  297. }
  298.  
  299. h1 {
  300. margin-bottom: 40px;
  301. }
  302. h2 {
  303. font-size: 28px;
  304. font-weight: normal;
  305. color: #3C5675;
  306. margin-bottom: 0;
  307. }
  308.  
  309. form {
  310. margin-top: 40px;
  311. }
  312. .FormGroup {
  313. margin-bottom: 20px;
  314. }
  315. .FormGroup .FormField:first-child input {
  316. border-top-left-radius: 4px;
  317. border-top-right-radius: 4px;
  318. }
  319. .FormGroup .FormField:last-child input {
  320. border-bottom-left-radius: 4px;
  321. border-bottom-right-radius: 4px;
  322. }
  323. .FormField input {
  324. background: #EDF2F7;
  325. margin: 0 0 1px;
  326. border: 2px solid transparent;
  327. transition: background 0.2s, border-color 0.2s, color 0.2s;
  328. width: 100%;
  329. padding: 15px 15px 15px 180px;
  330. box-sizing: border-box;
  331. }
  332. .FormField input:focus {
  333. border-color: #e7652e;
  334. background: #fff;
  335. color: #444;
  336. outline: none;
  337. }
  338. .FormField label {
  339. float: left;
  340. width: 160px;
  341. text-align: right;
  342. margin-right: -160px;
  343. position: relative;
  344. margin-top: 18px;
  345. font-size: 14px;
  346. pointer-events: none;
  347. opacity: 0.7;
  348. }
  349. button {
  350. background: #3C5675;
  351. color: #fff;
  352. border: 0;
  353. font-weight: bold;
  354. border-radius: 4px;
  355. cursor: pointer;
  356. padding: 15px 30px;
  357. -webkit-appearance: none;
  358. }
  359. button[disabled] {
  360. opacity: 0.5;
  361. }
  362.  
  363. #error {
  364. background: #D83E3E;
  365. color: #fff;
  366. padding: 15px 20px;
  367. border-radius: 4px;
  368. margin-bottom: 20px;
  369. }
  370.  
  371. .animated {
  372. -webkit-animation-fill-mode: both;
  373. animation-fill-mode: both;
  374.  
  375. -webkit-animation-duration: 0.5s;
  376. animation-duration: 0.5s;
  377.  
  378. animation-delay: 1.7s;
  379. -webkit-animation-delay: 1.7s;
  380. }
  381. @-webkit-keyframes fadeIn {
  382. 0% {opacity: 0}
  383. 100% {opacity: 1}
  384. }
  385. @keyframes fadeIn {
  386. 0% {opacity: 0}
  387. 100% {opacity: 1}
  388. }
  389. .fadeIn {
  390. -webkit-animation-name: fadeIn;
  391. animation-name: fadeIn;
  392. }
  393.  
  394. .Errors {
  395. margin-top: 50px;
  396. }
  397. .Errors .Error:first-child {
  398. border-top-left-radius: 4px;
  399. border-top-right-radius: 4px;
  400. }
  401. .Errors .Error:last-child {
  402. border-bottom-left-radius: 4px;
  403. border-bottom-right-radius: 4px;
  404. }
  405. .Error {
  406. background: #EDF2F7;
  407. margin: 0 0 1px;
  408. padding: 20px 25px;
  409. text-align: left;
  410. }
  411. .Error-message {
  412. font-size: 16px;
  413. color: #3C5675;
  414. font-weight: normal;
  415. margin: 0;
  416. }
  417. .Error-detail {
  418. font-size: 13px;
  419. margin: 5px 0 0;
  420. }
  421. </style>
  422. </head>
  423.  
  424. <body>
  425. <div class="container">
  426. <h1>
  427. <svg width="300px" height="80px" viewBox="0 0 300 80" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
  428. <!-- Generator: Sketch 3.3 (11970) - http://www.bohemiancoding.com/sketch -->
  429. <title>Bottom + Top</title>
  430. <desc>Created with Sketch.</desc>
  431. <defs>
  432. <rect id="path-1" x="32" y="0" width="32" height="76">
  433. <animate begin="0.5s" dur="0.3s" attributeName="x" values="32;0" fill="freeze" calcMode="spline" keySplines="0.2 1 0.5 1" keyTimes="0;1" />
  434. </rect>
  435. <linearGradient x1="50%" y1="100%" x2="50%" y2="0%" id="linearGradient-3">
  436. <stop stop-color="#E7762E" offset="0%">
  437. <animate begin="0.8s" dur="0.3s" attributeName="stop-color" values="#E7762E;#D22929" fill="freeze" />
  438. </stop>
  439. <stop stop-color="#E7562E" offset="100%">
  440. <animate begin="0.8s" dur="0.3s" attributeName="stop-color" values="#E7562E;#B71717" fill="freeze" />
  441. </stop>
  442. </linearGradient>
  443. <rect id="path-4" x="0" y="-10" width="0" height="76">
  444. <animate begin="0.8s" dur="0.5s" attributeName="width" values="0;56" fill="freeze" calcMode="spline" keySplines="0.2 1 0.5 1" keyTimes="0;1" />
  445. </rect>
  446. <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-6">
  447. <stop stop-color="#E7762E" offset="0%"></stop>
  448. <stop stop-color="#E7562E" offset="100%"></stop>
  449. </linearGradient>
  450. </defs>
  451. <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
  452. <g id="Bottom-+-Top" sketch:type="MSLayerGroup">
  453. <g id="Bottom" transform="translate(0.000000, 7.000000)">
  454. <mask id="mask-2" sketch:name="Mask" fill="white">
  455. <use xlink:href="#path-1"></use>
  456. </mask>
  457. <use id="Mask" opacity="0" fill="#D8D8D8" sketch:type="MSShapeGroup" xlink:href="#path-1"></use>
  458. <path d="M0.0145378441,47.0458273 L0.000987815598,5.99282032 C0.000442260108,4.3399313 1.13889694,3.71181059 2.53773397,4.58608373 L32,23 L32,69 L4.39928747,52.2490987 C0.574247043,50.1665474 0.0199042738,48.873991 0.0145378441,47.0458273 Z" fill="url(#linearGradient-3)" sketch:type="MSShapeGroup" mask="url(#mask-2)">
  459. <animate begin="0.5s" dur="0.3s" attributeName="d" values="M0.0145378441,47.0458273 L0.000987815598,5.99282032 C0.000442260108,4.3399313 1.13889694,3.71181059 2.53773397,4.58608373 L32,0 L32,46 L4.39928747,52.2490987 C0.574247043,50.1665474 0.0199042738,48.873991 0.0145378441,47.0458273 Z;
  460. M0.0145378441,47.0458273 L0.000987815598,5.99282032 C0.000442260108,4.3399313 1.13889694,3.71181059 2.53773397,4.58608373 L32,23 L32,69 L4.39928747,52.2490987 C0.574247043,50.1665474 0.0199042738,48.873991 0.0145378441,47.0458273 Z" fill="freeze" calcMode="spline" keySplines="0.2 1 0.8 1" keyTimes="0;1" />
  461. </path>
  462. <animate begin="0.5s" dur="0.3s" attributeName="opacity" values="0;1" fill="freeze" />
  463. <animateTransform begin="0.5s" attributeName="transform" type="translate" dur="0.3s" from="0 12" to="0 7" fill="freeze" calcMode="spline" keySplines="0.2 0.5 0.3 1" keyTimes="0;1" />
  464. </g>
  465. <g id="Top" transform="translate(0.000000, 10.000000)">
  466. <mask id="mask-5" sketch:name="Mask" fill="white">
  467. <use xlink:href="#path-4"></use>
  468. </mask>
  469. <use id="Mask" opacity="0" fill="#D8D8D8" sketch:type="MSShapeGroup" xlink:href="#path-4"></use>
  470. <path d="M3.00269837,1.27897692e-13 C1.34435385,1.27897692e-13 -4.39794873e-15,1.34085738 -1.03476577e-15,3.0069809 L8.17124146e-14,44 C0.0832958827,45.4090137 0.0117058737,46.8780591 4.48557525,49.2828738 C4.48557525,49.2828738 0.101798528,45.0234689 7,45 L56,45 L56,1.27897692e-13 L3.00269837,1.27897692e-13 Z" fill="url(#linearGradient-6)" sketch:type="MSShapeGroup" mask="url(#mask-5)">
  471. <animate begin="0.8s" dur="0.5s" attributeName="d" values="M3.00269837,1.27897692e-13 C1.34435385,1.27897692e-13 -4.39794873e-15,1.34085738 -1.03476577e-15,3.0069809 L8.17124146e-14,44 C0.0832958827,45.4090137 0.0117058737,46.8780591 4.48557525,49.2828738 C4.48557525,49.2828738 0.101798528,45.0234689 7,45 L51,25 L51,-20 L3.00269837,1.27897692e-13 Z;
  472. M3.00269837,1.27897692e-13 C1.34435385,1.27897692e-13 -4.39794873e-15,1.34085738 -1.03476577e-15,3.0069809 L8.17124146e-14,44 C0.0832958827,45.4090137 0.0117058737,46.8780591 4.48557525,49.2828738 C4.48557525,49.2828738 0.101798528,45.0234689 7,45 L56,45 L56,1.27897692e-13 L3.00269837,1.27897692e-13 Z" fill="freeze" calcMode="spline" keySplines="0.2 1 0.8 1" keyTimes="0;1" />
  473. </path>
  474. </g>
  475. <g transform="translate(20, 7)">
  476. <path d="M61,15 L61,29 L76,29 L76,42 L61,42 L61,69 L49,69 L49,3 L78,3 L78,15 L61,15 Z M82,69 L82,3 L94,3 L94,57 L111,57 L111,69 L82,69 Z M138,56 L129,56 L127,69 L114,69 L126,3 L141,3 L153,69 L140,69 L138,56 Z M132,33 L131,44 L137,44 L136,33 L134,20 L132,33 Z M172,3 C174.651923,3 177.052072,3.33189323 179,4 C181.427094,4.65948608 183.310756,5.76579685 185,7 C186.470494,8.86351349 187.70095,10.8864818 189,13 C189.463112,15.8807596 189.903646,18.9310165 190,23 C189.903646,27.0230109 189.326395,30.6896409 188,34 C187.017355,36.3793246 185.25522,38.6551639 183,40 L192,69 L179,69 L172,43 L169,43 L169,69 L157,69 L157,3 L172,3 Z M169,15 L169,31 L171,31 C171.936847,31 172.821049,30.88618 174,31 C174.463162,30.4308932 175.20526,29.9918732 176,29 C176.531582,28.6910537 177.05263,27.8292737 177,27 C177.810528,25.6829215 178,24.2683015 178,23 C178,19.9105561 177.384217,18.0081361 176,17 C174.921046,15.60162 173.326326,15 171,15 L169,15 Z M226,3 L226,53 C226,58.9130101 224.647901,63.1502478 222,66 C219.239423,68.630066 215.243219,70 210,70 C199.318257,70 194,64.3928283 194,53 L194,3 L206,3 L206,53 C206.259155,54.9943015 206.619715,56.0615757 207,57 C208.061975,57.2722332 208.933328,57.574893 210,58 C210.976531,57.574893 211.83286,57.2722332 213,57 C213.215027,56.0615757 213.560563,54.9943015 214,53 L214,3 L226,3 Z M250,56 L248,48 L245,38 L244,38 L244,69 L232,69 L232,3 L244,3 L250,21 L254,34 L255,34 L259,20 L265,3 L277,3 L277,69 L265,69 L265,38 L264,38 L261,48 L259,56 L250,56 Z" id="FLARUM" fill="url(#linearGradient-6)" sketch:type="MSShapeGroup" opacity="0">
  477. <animate begin="1.2s" dur="0.2s" attributeType="CSS" attributeName="opacity" from="0" to="1" fill="freeze" />
  478. <!-- <animateTransform begin="1.2s" attributeName="transform" type="translate" dur="0.5s" from="-2 0" to="0 0" fill="freeze" calcMode="spline" keySplines="0.2 0.5 0.3 1" keyTimes="0;1" /> -->
  479. </path>
  480. </g>
  481. </g>
  482. </g>
  483. </svg>
  484. </h1>
  485.  
  486. <div class="animated fadeIn">
  487. <h2>Install Flarum</h2>
  488. <p>By CKHAWAND From 000webhost</p><br>
  489. <p>Set up your forum by filling out your details below. If you have any trouble, get help on the <a href="http://flarum.org/docs/installation" target="_blank">Flarum website</a>.</p>
  490.  
  491. <form method="post" action="installer.php">
  492. <div id="error" style="display:none"></div>
  493.  
  494. <div class="FormGroup">
  495. <div class="FormField">
  496. <label>Forum Title</label>
  497. <input name="forumTitle" required>
  498. </div>
  499. </div>
  500.  
  501. <div class="FormField">
  502. <label>MySQL Database</label>
  503. <input name="mysqlDatabase" required>
  504. </div>
  505.  
  506. <div class="FormField">
  507. <label>MySQL Username</label>
  508. <input name="mysqlUsername" required>
  509. </div>
  510.  
  511. <div class="FormField">
  512. <label>MySQL Password</label>
  513. <input type="password" name="mysqlPassword" required>
  514. </div>
  515. </div>
  516.  
  517. <div class="FormGroup">
  518. <div class="FormField">
  519. <label>Admin Username</label>
  520. <input name="adminUsername" required>
  521. </div>
  522.  
  523. <div class="FormField">
  524. <label>Admin Email</label>
  525. <input name="adminEmail" required>
  526. </div>
  527.  
  528. <div class="FormField">
  529. <label>Admin Password (Change it when done installing)</label>
  530. <input type="text" value="12345678" disabled>
  531. </div>
  532. </div>
  533.  
  534. <div class="FormButtons">
  535. <button type="submit" name="install">Install Flarum</button>
  536. </div>
  537. </form>
  538. <a target="_blank" href="https://www.copyrighted.com/copyrights/view/xqx1-ddfl-19jj-n4mk"><img border="0" alt="Copyrighted.com Registered &amp; Protected
  539. XQX1-DDFL-19JJ-N4MK" title="Copyrighted.com Registered &amp; Protected
  540. XQX1-DDFL-19JJ-N4MK" width="150" height="40" src="https://static.copyrighted.com/images/seal.gif" /></a>
  541. <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
  542. </div>
  543. </div>
  544. </body>
  545. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement