Advertisement
Guest User

Untitled

a guest
Nov 8th, 2016
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.32 KB | None | 0 0
  1. <?php
  2. /*
  3. Title: Droppy installation
  4.  
  5. Thanks to riliwanrabo for design
  6. */
  7.  
  8. error_reporting(0);
  9.  
  10. session_start();
  11.  
  12. ob_start();
  13.  
  14. $install_version = '1.3.1';
  15. $time = time();
  16.  
  17. if($_POST['action'] == 'dbsettings') {
  18. $mysqli_test = new mysqli($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname']);
  19.  
  20. if ($mysqli_test->connect_errno ) {
  21. header('Location: install.php?page=1&db=error');
  22. }
  23. else
  24. {
  25. $db_file = file_get_contents(dirname(__FILE__) . '/config/db.php');
  26. $get_values = array(
  27. '#db_host#',
  28. '#db_user#',
  29. '#db_pass#',
  30. '#db_name#'
  31. );
  32. $change = array(
  33. $_POST['dbhost'],
  34. $_POST['dbuser'],
  35. $_POST['dbpass'],
  36. $_POST['dbname']
  37. );
  38.  
  39. $db_config = str_replace($get_values, $change, $db_file);
  40.  
  41. file_put_contents('config/db.php', $db_config);
  42. header('Location: install.php?action=inserttabledata');
  43. }
  44. $mysqli_test->close();
  45. }
  46. if($_GET['action'] == 'inserttabledata') {
  47. require_once dirname(__FILE__) . '/config/config.php';
  48. if(dirname($_SERVER['PHP_SELF']) == '/') {
  49. $site = 'http://' . $_SERVER['SERVER_NAME'] . '/';
  50. }
  51. else
  52. {
  53. $site = 'http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['PHP_SELF']) . '/';
  54. }
  55.  
  56. $mysqli->query("CREATE TABLE IF NOT EXISTS `$table_accounts` (
  57. `id` int(11) NOT NULL AUTO_INCREMENT,
  58. `email` varchar(100) NOT NULL,
  59. `password` varchar(100) NOT NULL,
  60. `ip` varchar(100) NOT NULL,
  61. PRIMARY KEY (`id`)
  62. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  63. $mysqli->query("CREATE TABLE IF NOT EXISTS `$table_downloads` (
  64. `id` int(100) NOT NULL AUTO_INCREMENT,
  65. `download_id` varchar(100) NOT NULL,
  66. `time` int(100) NOT NULL,
  67. `ip` varchar(100) NOT NULL,
  68. `email` varchar(100) NOT NULL,
  69. PRIMARY KEY (`id`)
  70. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  71. $mysqli->query("CREATE TABLE IF NOT EXISTS `$table_files` (
  72. `id` int(100) NOT NULL AUTO_INCREMENT,
  73. `upload_id` varchar(500) NOT NULL,
  74. `secret_code` varchar(500) NOT NULL,
  75. `file` varchar(500) NOT NULL,
  76. PRIMARY KEY (`id`)
  77. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  78. $mysqli->query("CREATE TABLE IF NOT EXISTS `$table_settings` (
  79. `id` int(100) NOT NULL AUTO_INCREMENT,
  80. `site_name` varchar(100) NOT NULL,
  81. `site_title` varchar(100) NOT NULL,
  82. `site_desc` varchar(200) NOT NULL,
  83. `site_url` varchar(100) NOT NULL,
  84. `lock_page` varchar(100) NOT NULL,
  85. `name_on_file` varchar(100) NOT NULL,
  86. `max_size` int(100) NOT NULL,
  87. `max_files` int(100) NOT NULL,
  88. `max_file_reports` int(100) NOT NULL,
  89. `blocked_types` varchar(1000) NOT NULL,
  90. `expire` int(100) NOT NULL,
  91. `upload_dir` varchar(100) NOT NULL,
  92. `favicon_path` varchar(100) NOT NULL,
  93. `logo_path` varchar(100) NOT NULL,
  94. `language` varchar(100) NOT NULL,
  95. `bg_timer` int(100) NOT NULL,
  96. `default_destruct` varchar(100) NOT NULL,
  97. `default_sharetype` varchar(100) NOT NULL,
  98. `default_email_to` varchar(100) NOT NULL,
  99. `password_enabled` varchar(100) NOT NULL,
  100. `analytics` text NOT NULL,
  101. `accept_terms` varchar(100) NOT NULL,
  102. `email_from_name` varchar(100) NOT NULL,
  103. `email_from_email` varchar(100) NOT NULL,
  104. `email_to_name` varchar(100) NOT NULL,
  105. `email_server` varchar(100) NOT NULL,
  106. `smtp_host` varchar(100) NOT NULL,
  107. `smtp_auth` varchar(100) NOT NULL,
  108. `smtp_secure` varchar(100) NOT NULL,
  109. `smtp_port` int(100) NOT NULL,
  110. `smtp_username` varchar(100) NOT NULL,
  111. `smtp_password` varchar(100) NOT NULL,
  112. `terms_text` text NOT NULL,
  113. `about_text` text NOT NULL,
  114. `ad_1_enabled` varchar(100) NOT NULL,
  115. `ad_1_code` text NOT NULL,
  116. `ad_2_enabled` varchar(100) NOT NULL,
  117. `ad_2_code` text NOT NULL,
  118. `purchase_code` varchar(100) NOT NULL,
  119. `version` varchar(100) NOT NULL,
  120. `last_update_check` int(100) NOT NULL,
  121. PRIMARY KEY (`id`)
  122. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  123. $mysqli->query("INSERT INTO `$table_settings` (`id`, `site_name`, `site_title`, `site_desc`, `site_url`, `lock_page`, `name_on_file`, `max_size`, `max_files`, `max_file_reports`, `blocked_types`, `expire`, `upload_dir`, `favicon_path`, `logo_path`, `language`, `bg_timer`, `default_destruct`, `default_sharetype`, `default_email_to`, `password_enabled`, `accept_terms`, `email_from_name`, `email_from_email`, `email_to_name`, `email_server`, `smtp_host`, `smtp_auth`, `smtp_secure`, `smtp_port`, `smtp_username`, `smtp_password`, `terms_text`, `about_text`, `ad_1_enabled`, `ad_1_code`, `ad_2_enabled`, `ad_2_code`, `purchase_code`, `version`, `last_update_check`) VALUES
  124. (1, 'Droppy', 'Droppy - Online file sharing', 'Online file sharing, share large or small files with friends and family.', '$site', 'false', 'droppy', 2048, '200', 0, 'image/bmp,application/exe', 0, 'uploads/', 'src/images/icon.png', 'src/images/logo.png', 'English.php', 60, 'no', 'mail', '', 'yes', 'no', 'No-Reply Droppy', 'noreply@example.com', 'Droppy User', 'LOCAL', '', '', '', '', '', '', 'This is a example of an terms of service page', 'This is a example of an about page. Fill in your own information here.', 'false', 'Fill in your code here', 'false', 'Fill in your code here', '', '$install_version', '$time');");
  125. $mysqli->query("CREATE TABLE IF NOT EXISTS `$table_social` (
  126. `id` int(100) NOT NULL AUTO_INCREMENT,
  127. `facebook` varchar(100) NOT NULL,
  128. `twitter` varchar(100) NOT NULL,
  129. `google` varchar(100) NOT NULL,
  130. `instagram` varchar(100) NOT NULL,
  131. `github` varchar(100) NOT NULL,
  132. `tumblr` varchar(100) NOT NULL,
  133. `pinterest` varchar(100) NOT NULL,
  134. PRIMARY KEY (`id`)
  135. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  136. $mysqli->query("INSERT INTO `$table_social` (`id`, `facebook`, `twitter`, `google`, `instagram`, `github`, `tumblr`, `pinterest`) VALUES
  137. (1, 'http://facebook.com', 'http://twitter.com', 'http://google.com', '', '', '', '');");
  138. $mysqli->query("CREATE TABLE IF NOT EXISTS `$table_templates` (
  139. `id` int(11) NOT NULL AUTO_INCREMENT,
  140. `type` varchar(100) NOT NULL,
  141. `msg` text NOT NULL,
  142. `lang` varchar(100) NOT NULL,
  143. PRIMARY KEY (`id`)
  144. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  145. $mysqli->query("INSERT INTO `$table_templates` (`type`, `msg`, `lang`) VALUES
  146. ('receiver', 'Dear,\n\nYou have received some file(s) from {email_from} with a total size of {size} MB.\nThe file(s) will be destroyed after {expire_time}.\n\n<b>Files:</b>\n{file_list}\n\n<b>Message:</b>\n{message}\n\n{download_btn}\n\nBest regards,\n{site_name}', 'English.php'),
  147. ('sender', 'Dear,\n\nThank you for using {site_name} the file(s) with a total of {size} MB have been sent to the recipients.\nIt will be destroyed after {expire_time}.\n\n<b>Files sent to:</b>\n{email_list}\n<b>Files sent:</b>\n{file_list}\n\n{download_btn}\n\nBest regards,\n{site_name}\n', 'English.php'),
  148. ('destroyed', 'Dear,\n\nYour files on {site_name} have been destroyed.\n\n<b>Files destroyed:</b>\n{file_list}\n\n{download_btn}\n\nBest regards,\n{site_name}', 'English.php'),
  149. ('downloaded', 'Dear,\n\nThis is just an email to let you know that {download_email} has downloaded your file.\n\n<b>Files:</b>\n{file_list}\n\n<b>Receivers:</b>\n{email_list}\n\n{download_btn}\n\nBest regards,\n{site_name}', 'English.php'),
  150. ('receiver_subject', 'You have received some files !', 'English.php'),
  151. ('sender_subject', 'Your items have been sent !', 'English.php'),
  152. ('destroyed_subject', 'Your items have been destroyed !', 'English.php'),
  153. ('downloaded_subject', 'Someone has downloaded your items !', 'English.php'),
  154. ('receiver', 'Beste,\r\n\r\n{email_from} heeft u bestanden gestuurd met een totale grootte van {size} MB\r\nDe bestanden worden vernietigd over {expire_time}\r\n\r\n<b>Bestanden:</b>\r\n{file_list}\r\n\r\n<b>Bericht:</b>\r\n{message}\r\n\r\n{download_btn}\r\n\r\nMet vriendelijke groet,\r\n{site_name}', 'Dutch.php'),
  155. ('sender', 'Beste,\r\n\r\nBedankt voor het gebruiken van {site_name}, de bestanden zijn succesvol naar de ontvangers gestuurd.\r\nDe bestanden worden vernietigd in {expire_time}\r\n\r\n<b>Verstuurd naar:</b>\r\n{email_list}\r\n<b>Bestanden verstuurd:</b>\r\n{file_list}\r\n\r\n{download_btn}\r\n\r\nMet vriendelijke groet,\r\n{site_name}\r\n', 'Dutch.php'),
  156. ('destroyed', 'Beste,\r\n\r\nUw bestanden op {site_name} zijn vernietigd.\r\n\r\n<b>Bestanden vernietigd:</b>\r\n{file_list}\r\n<b>Bestanden waren verstuurd naar:</b>\r\n{email_list}\r\n\r\nMet vriendelijke groet,\r\n{site_name}', 'Dutch.php'),
  157. ('downloaded', 'Beste,\r\n\r\nDit is een email om u ervan op hoogte te stellen dat {download_email} uw bestanden heeft gedownload.\r\n\r\n<b>Bestanden:</b>\r\n{file_list}\r\n\r\n<b>Ontvangers:</b>\r\n{email_list}\r\n\r\n{download_btn}\r\n\r\nMet vriendelijke groet,\r\n{site_name}', 'Dutch.php'),
  158. ('receiver_subject', 'U heeft bestanden ontvangen', 'Dutch.php'),
  159. ('sender_subject', 'Uw bestanden zijn verzonden', 'Dutch.php'),
  160. ('destroyed_subject', 'Uw bestanden zijn vernietigd', 'Dutch.php'),
  161. ('downloaded_subject', 'Iemand heeft uw bestanden gedownload.', 'Dutch.php');");
  162. $mysqli->query("CREATE TABLE IF NOT EXISTS `$table_uploads` (
  163. `id` int(100) NOT NULL AUTO_INCREMENT,
  164. `upload_id` varchar(200) NOT NULL,
  165. `email_from` varchar(500) NOT NULL,
  166. `message` varchar(5000) NOT NULL,
  167. `secret_code` varchar(500) NOT NULL,
  168. `password` varchar(100) NOT NULL,
  169. `status` varchar(100) NOT NULL,
  170. `size` varchar(100) NOT NULL,
  171. `time` int(100) NOT NULL,
  172. `time_expire` int(100) NOT NULL,
  173. `ip` varchar(100) NOT NULL,
  174. `count` int(100) NOT NULL,
  175. `share` varchar(100) NOT NULL,
  176. `destruct` varchar(100) NOT NULL,
  177. `flag` varchar(100) NOT NULL,
  178. `lang` varchar(100) NOT NULL,
  179. PRIMARY KEY (`id`)
  180. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  181. $mysqli->query("CREATE TABLE IF NOT EXISTS `$table_backgrounds` (
  182. `id` int(11) NOT NULL AUTO_INCREMENT,
  183. `src` varchar(100) NOT NULL,
  184. `url` varchar(100) NOT NULL,
  185. PRIMARY KEY (`id`)
  186. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  187. $mysqli->query("INSERT INTO `$table_backgrounds` (`id`, `src`, `url`) VALUES
  188. (1, 'src/images/bg3.jpg', 'http://proxibolt.com'),
  189. (2, 'src/images/bg2.jpg', 'http://proxibolt.com');");
  190. $mysqli->query("CREATE TABLE IF NOT EXISTS `$table_receivers` (
  191. `id` int(100) NOT NULL AUTO_INCREMENT,
  192. `upload_id` varchar(100) NOT NULL,
  193. `email` varchar(100) NOT NULL,
  194. `private_id` varchar(200) NOT NULL,
  195. PRIMARY KEY (`id`)
  196. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
  197. $mysqli->query("CREATE TABLE IF NOT EXISTS `$table_language` (
  198. `id` int(100) NOT NULL AUTO_INCREMENT,
  199. `name` varchar(100) NOT NULL,
  200. `path` varchar(100) NOT NULL,
  201. PRIMARY KEY (`id`)
  202. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  203. $mysqli->query("INSERT INTO `$table_language` (`name`, `path`) VALUES
  204. ('English', 'English.php'),
  205. ('Dutch', 'Dutch.php');");
  206. $mysqli->query("CREATE TABLE IF NOT EXISTS `$table_plugins` (
  207. `id` int(100) NOT NULL AUTO_INCREMENT,
  208. `name` varchar(100) NOT NULL,
  209. `path` varchar(200) NOT NULL,
  210. `status` varchar(100) NOT NULL,
  211. `version` varchar(100) NOT NULL,
  212. PRIMARY KEY (`id`)
  213. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  214. $mysqli->query("CREATE TABLE IF NOT EXISTS `$table_users` (
  215. `id` int(100) NOT NULL AUTO_INCREMENT,
  216. `email` varchar(100) NOT NULL,
  217. `password` varchar(100) NOT NULL,
  218. `ip` varchar(100) NOT NULL,
  219. PRIMARY KEY (`id`)
  220. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  221. $mysqli->query("CREATE TABLE IF NOT EXISTS `$table_themes` (
  222. `id` int(100) NOT NULL AUTO_INCREMENT,
  223. `name` varchar(100) NOT NULL,
  224. `path` varchar(200) NOT NULL,
  225. `status` varchar(50) NOT NULL,
  226. PRIMARY KEY (id)
  227. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  228. $mysqli->query("INSERT INTO `$table_themes` (`id`, `name`, `path`, `status`) VALUES
  229. (1, 'Default', 'default/', 'ready'),
  230. (2, 'OldTimer', 'oldtimer/', 'stopped'),
  231. (3, 'Grey-Dark', 'grey/', 'stopped');");
  232. $mysqli->query("CREATE TABLE `$table_log` (
  233. `id` int(100) NOT NULL AUTO_INCREMENT,
  234. `time` int(100) NOT NULL,
  235. `msg` text NOT NULL,
  236. primary key (id)
  237. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  238. $mysqli->query("CREATE TABLE `$table_pages` (
  239. `id` int(100) NOT NULL AUTO_INCREMENT,
  240. `type` varchar(100) NOT NULL,
  241. `title` varchar(200) NOT NULL,
  242. `parent` varchar(100) NOT NULL,
  243. `path` varchar(200) NOT NULL,
  244. `custom_html` varchar(500) NOT NULL,
  245. primary key (id)
  246. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  247. $mysqli->query("CREATE TABLE `$table_popups` (
  248. `id` int(100) NOT NULL AUTO_INCREMENT,
  249. `title` varchar(100) NOT NULL,
  250. `path` varchar(100) NOT NULL,
  251. primary key (id)
  252. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  253. $mysqli->query("CREATE TABLE IF NOT EXISTS $table_updates (
  254. `id` int(100) NOT NULL AUTO_INCREMENT,
  255. `version` varchar(100) NOT NULL,
  256. `type` varchar(100) NOT NULL,
  257. `date` varchar(100) NOT NULL,
  258. PRIMARY KEY (`id`)
  259. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  260.  
  261. header('Location: install.php?page=2&db=ok');
  262. }
  263. if($_POST['action'] == 'p_code') {
  264. function post_to_url($url, $data) {
  265. $fields = '';
  266. foreach ($data as $key => $value) {
  267. $fields .= $key . '=' . $value . '&';
  268. }
  269. rtrim($fields, '&');
  270.  
  271. $post = curl_init();
  272.  
  273. curl_setopt($post, CURLOPT_URL, $url);
  274. curl_setopt($post, CURLOPT_POST, count($data));
  275. curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
  276. curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);
  277.  
  278. $result = curl_exec($post);
  279.  
  280. curl_close($post);
  281. return $result;
  282. }
  283.  
  284. $data = array(
  285. "purchase_code" => $_POST['code'],
  286. "ip" => $_SERVER['SERVER_ADDR']
  287. );
  288.  
  289. $surl = 'http://api.proxibolt.com/verify/droppy/install_verify.php';
  290. $res = post_to_url($surl, $data);
  291.  
  292. if($res == '1') {
  293. $_SESSION['p'] = 'valid';
  294. header('Location: install.php?page=1');
  295. }
  296. elseif($res == '2') {
  297. header('Location: install.php?page=validate&p=2');
  298. }
  299. elseif($res == '3') {
  300. header('Location: install.php?page=validate&p=3');
  301. }
  302. }
  303. if($_POST['action'] == 'createuser') {
  304. include dirname(__FILE__) . '/config/config.php';
  305. $email = mysqli_real_escape_string($mysqli, $_POST['email']);
  306. $password = md5(mysqli_real_escape_string($mysqli, $_POST['password']));
  307. $ip = $_SERVER['REMOTE_ADDR'];
  308.  
  309. $mysqli->query("INSERT INTO $table_accounts (`email`, `password`, `ip`) VALUES ('$email','$password','$ip')");
  310. header('Location: install.php?page=3&user=ok');
  311. }
  312. ?>
  313. <!DOCTYPE html>
  314. <html lang="en">
  315.  
  316. <head>
  317. <link href="src/css/bootstrap/bootstrap.css" rel="stylesheet">
  318. <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
  319. <!--<link href="../css/install.css" rel="stylesheet">-->
  320. <style>
  321. @import url(http://fonts.googleapis.com/css?family=Roboto+Condensed:400,700);
  322.  
  323. body {
  324. background: url('src/images/bg_install.jpg') no-repeat center center fixed;
  325. -webkit-background-size: cover;
  326. -moz-background-size: cover;
  327. -o-background-size: cover;
  328. background-size: cover;
  329. }
  330.  
  331. .board{
  332. width: 75%;
  333. margin: 60px auto;
  334. height: 550px;
  335. background: #fff;
  336. /*box-shadow: 10px 10px #ccc,-10px 20px #ddd;*/
  337. }
  338. .board .nav-tabs {
  339. position: relative;
  340. /* border-bottom: 0; */
  341. /* width: 80%; */
  342. margin: 40px auto;
  343. margin-bottom: 0;
  344. box-sizing: border-box;
  345.  
  346. }
  347.  
  348. .board > div.board-inner{
  349. background: #fafafa url(http://subtlepatterns.com/patterns/geometry2.png);
  350. background-size: 30%;
  351. }
  352.  
  353. p.narrow{
  354. width: 60%;
  355. margin: 10px auto;
  356. }
  357.  
  358. .liner{
  359. height: 2px;
  360. background: #ddd;
  361. position: absolute;
  362. width: 50%;
  363. margin: 0 auto;
  364. left: 0;
  365. right: 0;
  366. top: 50%;
  367. z-index: 1;
  368. }
  369.  
  370. .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
  371. color: #555555;
  372. cursor: default;
  373. /* background-color: #ffffff; */
  374. border: 0;
  375. border-bottom-color: transparent;
  376. }
  377.  
  378. span.round-tabs{
  379. width: 70px;
  380. height: 70px;
  381. line-height: 70px;
  382. display: inline-block;
  383. border-radius: 100px;
  384. background: white;
  385. z-index: 2;
  386. position: absolute;
  387. left: 0;
  388. text-align: center;
  389. font-size: 25px;
  390. }
  391.  
  392. span.round-tabs.one{
  393. color: rgb(34, 194, 34);border: 2px solid rgb(34, 194, 34);
  394. }
  395.  
  396. li.active span.round-tabs.one{
  397. background: #fff !important;
  398. border: 2px solid #ddd;
  399. color: rgb(34, 194, 34);
  400. }
  401.  
  402. span.round-tabs.two{
  403. color: #febe29;border: 2px solid #febe29;
  404. }
  405.  
  406. li.active span.round-tabs.two{
  407. background: #fff !important;
  408. border: 2px solid #ddd;
  409. color: #febe29;
  410. }
  411.  
  412. span.round-tabs.three{
  413. color: #3e5e9a;border: 2px solid #3e5e9a;
  414. }
  415.  
  416. li.active span.round-tabs.three{
  417. background: #fff !important;
  418. border: 2px solid #ddd;
  419. color: #3e5e9a;
  420. }
  421.  
  422. span.round-tabs.four{
  423. color: #f1685e;border: 2px solid #f1685e;
  424. }
  425.  
  426. li.active span.round-tabs.four{
  427. background: #fff !important;
  428. border: 2px solid #ddd;
  429. color: #f1685e;
  430. }
  431.  
  432. span.round-tabs.five{
  433. color: #999;border: 2px solid #999;
  434. }
  435.  
  436. li.active span.round-tabs.five{
  437. background: #fff !important;
  438. border: 2px solid #ddd;
  439. color: #999;
  440. }
  441.  
  442. .nav-tabs > li.active > a span.round-tabs{
  443. background: #fafafa;
  444. }
  445. .nav-tabs > li {
  446. width: 20%;
  447. }
  448. /*li.active:before {
  449. content: " ";
  450. position: absolute;
  451. left: 45%;
  452. opacity:0;
  453. margin: 0 auto;
  454. bottom: -2px;
  455. border: 10px solid transparent;
  456. border-bottom-color: #fff;
  457. z-index: 1;
  458. transition:0.2s ease-in-out;
  459. }*/
  460. li:after {
  461. content: " ";
  462. position: absolute;
  463. left: 45%;
  464. opacity:0;
  465. margin: 0 auto;
  466. bottom: 0px;
  467. border: 5px solid transparent;
  468. border-bottom-color: #ddd;
  469. transition:0.1s ease-in-out;
  470.  
  471. }
  472. li.active:after {
  473. content: " ";
  474. position: absolute;
  475. left: 45%;
  476. opacity:1;
  477. margin: 0 auto;
  478. bottom: 0px;
  479. border: 10px solid transparent;
  480. border-bottom-color: #ddd;
  481.  
  482. }
  483. .nav-tabs > li a{
  484. width: 70px;
  485. height: 70px;
  486. margin: 20px auto;
  487. border-radius: 100%;
  488. padding: 0;
  489. }
  490.  
  491. .nav-tabs > li a:hover{
  492. background: transparent;
  493. }
  494.  
  495. .tab-content{
  496. }
  497. .tab-pane{
  498. position: relative;
  499. padding-top: 10px;
  500. }
  501. .tab-content .head{
  502. font-family: 'Roboto Condensed', sans-serif;
  503. font-size: 25px;
  504. text-transform: uppercase;
  505. padding-bottom: 10px;
  506. }
  507. .btn-outline-rounded{
  508. padding: 10px 40px;
  509. margin: 20px 0;
  510. border: 2px solid transparent;
  511. border-radius: 25px;
  512. }
  513.  
  514. .btn.green{
  515. background-color:#5cb85c;
  516. /*border: 2px solid #5cb85c;*/
  517. color: #ffffff;
  518. }
  519.  
  520.  
  521.  
  522. @media( max-width : 585px ){
  523.  
  524. .board {
  525. width: 90%;
  526. height:auto !important;
  527. }
  528. span.round-tabs {
  529. font-size:16px;
  530. width: 50px;
  531. height: 50px;
  532. line-height: 50px;
  533. }
  534. .tab-content .head{
  535. font-size:20px;
  536. }
  537. .nav-tabs > li a {
  538. width: 50px;
  539. height: 50px;
  540. line-height:50px;
  541. }
  542.  
  543. li.active:after {
  544. content: " ";
  545. position: absolute;
  546. left: 35%;
  547. }
  548.  
  549. .btn-outline-rounded {
  550. padding:12px 20px;
  551. }
  552. }
  553. </style>
  554. </head>
  555. <body>
  556. <section style="background-color: transparent;">
  557. <div class="container">
  558. <div class="row">
  559. <div class="board">
  560. <!-- <h2>Welcome to IGHALO!<sup>™</sup></h2>-->
  561. <div class="board-inner">
  562. <ul class="nav nav-tabs" id="myTab" style="padding-left: 140px">
  563. <div class="liner"></div>
  564. <?php
  565. if(!isset($_GET['page'])) {
  566. echo '<li class="active">';
  567. }
  568. else
  569. {
  570. echo '<li>';
  571. }
  572. ?>
  573. <a title="Welcome">
  574. <span class="round-tabs one">
  575. <i class="glyphicon glyphicon-home"></i>
  576. </span>
  577. </a>
  578. </li>
  579.  
  580. <?php
  581. if($_GET['page'] == '1') {
  582. echo '<li class="active">';
  583. }
  584. else
  585. {
  586. echo '<li>';
  587. }
  588. ?>
  589. <a title="Database settings">
  590. <span class="round-tabs two">
  591. <i class="fa fa-database"></i>
  592. </span>
  593. </a>
  594. </li>
  595. <?php
  596. if($_GET['page'] == '2') {
  597. echo '<li class="active">';
  598. }
  599. else
  600. {
  601. echo '<li>';
  602. }
  603. ?>
  604. <a title="Create admin user">
  605. <span class="round-tabs three">
  606. <i class="glyphicon glyphicon-user"></i>
  607. </span>
  608. </a>
  609. </li>
  610.  
  611. <?php
  612. if($_GET['page'] == '43') {
  613. echo '<li class="active">';
  614. }
  615. else
  616. {
  617. echo '<li>';
  618. }
  619. ?>
  620. <a title="Success">
  621. <span class="round-tabs five">
  622. <i class="glyphicon glyphicon-ok"></i>
  623. </span>
  624. </a>
  625. </li>
  626.  
  627. </ul></div>
  628.  
  629. <div id="tab-content">
  630. <div class="tab-pane" id="home">
  631. <?php
  632. if(!isset($_GET['page'])) :
  633. $total_checks = 0;
  634. ?>
  635. <div style="padding-top: 60px;">
  636. <h3 class="head text-center">Droppy installation</h3>
  637. <p class="narrow text-center">
  638. Thank you for purchasing our product, before you can use Droppy you need to follow these small steps.
  639. </p>
  640. <hr>
  641. <p class="narrow text-center"><strong style="font-size: 20px;">Requirements:</strong><br>
  642. <?php if(function_exists('mysqli_connect')) { echo '<i class="fa fa-check"></i>'; $total_checks++; } else { echo '<i class="fa fa-times"></i>'; } ?> MySqli installed <br>
  643. <?php if(function_exists('curl_version')) { echo '<i class="fa fa-check"></i>'; $total_checks++; } else { echo '<i class="fa fa-times"></i>'; } ?> PHP Curl installed <br>
  644. <?php if(file_exists('.htaccess')) { echo '<i class="fa fa-check"></i>'; $total_checks++; } else { echo '<i class="fa fa-times"></i>'; } ?> .htaccess file found <br>
  645. </p>
  646.  
  647. <p class="text-center">
  648. <?php
  649. if($total_checks == 3) :
  650. ?>
  651. <a href="?page=validate" class="btn btn-success btn-outline-rounded green"> Start the installation</a>
  652. <?php
  653. else:
  654. ?>
  655. <a href="?page=validate" onclick="return confirm('Are you sure you want to proceed even though the requirements are not correct ?');" class="btn btn-danger btn-outline-rounded red"> Start install with not all the correct requirements</a>
  656. <?php
  657. endif;
  658. ?>
  659. </p>
  660. </div>
  661. <?php
  662. endif;
  663. if($_GET['page'] == 'validate') :
  664. if($_GET['p'] == '2') {
  665. echo '<div class="alert alert-danger" role="alert" style="margin-right: auto; margin-left: auto; width: 70%; text-align: center;">Purchase code incorrect</div>';
  666. }
  667. if($_GET['p'] == '3') {
  668. echo '<div class="alert alert-danger" role="alert" style="width: 80%; margin-right: auto; margin-left: auto;">Droppy and this purchase code are already in use on another IP address, if you would like to use Droppy on two systems you will need to purchase another license <a href="http://codecanyon.net/item/droppy-online-file-sharing/10575317">here</a></div>';
  669. echo '<div class="alert alert-warning" role="alert" style="width: 80%; margin-right: auto; margin-left: auto;">If you would like to transfer Droppy over to another IP address you will need to contact us <a href="http://support.proxibolt.com">here</a>.</div>';
  670. }
  671. ?>
  672. <h3 style="text-align: center;">Droppy validate purchase</h3>
  673. <form method="POST" action='install.php'>
  674. <div class="narrow text-center" style="margin-left: auto; margin-right: auto; width: 70%; padding-top: 20px;">
  675. <input type="hidden" name="action" value="p_code">
  676. <div class="input-group" style="padding-top: 10px;">
  677. <div class="input-group-addon"><i class="fa fa-lock"></i></div>
  678. <input type="text" class="form-control" name="code" placeholder="Purchase code" required="required">
  679. </div>
  680. <p><i>Don't know where to find your purchase code ? Please give a look to this article: <a href="https://help.market.envato.com/hc/en-us/articles/202822600-Where-Can-I-Find-my-Purchase-Code-">here</a></i></p>
  681. </div>
  682. <p class="text-center">
  683. <input type="submit" class="btn btn-success btn-outline-rounded green" value="Submit">
  684. </p>
  685. </form>
  686. <?php
  687. endif;
  688. if($_GET['page'] == 1 && $_SESSION['p'] == 'valid') :
  689. if($_GET['db'] == 'error') {
  690. echo '<div class="alert alert-danger" role="alert" style="margin-right: auto; margin-left: auto; width: 70%; text-align: center;">Droppy could not connect to the database please try again !</div>';
  691. }
  692. ?>
  693. <h3 style="text-align: center;">Droppy database settings</h3>
  694. <form method="POST" action='install.php'>
  695. <div class="narrow text-center" style="margin-left: auto; margin-right: auto; width: 70%; padding-top: 20px;">
  696. <input type="hidden" name="action" value="dbsettings">
  697. <div class="input-group" style="padding-top: 10px;">
  698. <div class="input-group-addon"><i class="fa fa-database"></i></div>
  699. <input type="text" class="form-control" name="dbhost" placeholder="Database host" required="required">
  700. </div>
  701. <div class="input-group" style="padding-top: 10px;">
  702. <div class="input-group-addon"><i class="fa fa-database"></i></div>
  703. <input type="text" class="form-control" name="dbuser" placeholder="Database username" required="required">
  704. </div>
  705. <div class="input-group" style="padding-top: 10px;">
  706. <div class="input-group-addon"><i class="fa fa-database"></i></div>
  707. <input type="password" class="form-control" name="dbpass" placeholder="Database password" required="required">
  708. </div>
  709. <div class="input-group" style="padding-top: 10px;">
  710. <div class="input-group-addon"><i class="fa fa-database"></i></div>
  711. <input type="text" class="form-control" name="dbname" placeholder="Database name" required="required">
  712. </div>
  713.  
  714. </div>
  715. <p class="text-center">
  716. <input type="submit" class="btn btn-success btn-outline-rounded green" value="Submit">
  717. </p>
  718. </form>
  719. <?php
  720. endif;
  721. if($_GET['page'] == 2 && $_SESSION['p'] == 'valid') :
  722. ?>
  723. <h3 style="text-align: center;">Create admin user</h3>
  724. <form method="POST" action='install.php'>
  725. <div class="narrow text-center" style="margin-left: auto; margin-right: auto; width: 70%; padding-top: 20px;">
  726. <input type="hidden" name="action" value="createuser">
  727. <div class="input-group" style="padding-top: 10px;">
  728. <div class="input-group-addon"><i class="fa fa-user"></i></div>
  729. <input type="email" class="form-control" name="email" placeholder="Admin e-mail" required="required">
  730. </div>
  731. <div class="input-group" style="padding-top: 10px;">
  732. <div class="input-group-addon"><i class="fa fa-lock"></i></div>
  733. <input type="password" class="form-control" name="password" placeholder="Admin password" required="required">
  734. </div>
  735. </div>
  736. <p class="text-center">
  737. <input type="submit" class="btn btn-success btn-outline-rounded green" value="Create user">
  738. </p>
  739. </form>
  740. <?php
  741. endif;
  742. if($_GET['page'] == 3 && $_SESSION['p'] == 'valid') :
  743. ?>
  744. <h3 style="text-align: center;">Completed !</h3>
  745. <div style="padding-top: 40px; text-align: center;">
  746. <p>The installation of droppy has been finished successfully !</p>
  747. <p>You can login to your admin panel <a href="admin/index.php">here</a>.</p>
  748. <p>Do not forget to delete this file (install.php) !</p>
  749. </div>
  750. <p class="text-center">
  751. <a href="index.php" class="btn btn-success btn-outline-rounded green"><i class="glyphicon glyphicon-home"></i> Go to home page</a>
  752. </p>
  753. <?php
  754. endif;
  755. ?>
  756. </div>
  757. <div class="clearfix"></div>
  758. </div>
  759.  
  760. </div>
  761. </div>
  762. </div>
  763. </section>
  764. </body>
  765.  
  766. <script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
  767. <script src="src/js/bootstrap.min.js"></script>
  768. <script type="text/javascript">
  769. $(function(){
  770. $('a[title]').tooltip();
  771. });
  772.  
  773. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement