A tumblelog CMS built on AJAX, PHP and MySQL.

install.php 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <?php
  2. if(!defined('entry'))define('entry', true);
  3. /* ===========================
  4. gelato CMS - A PHP based tumblelog CMS
  5. development version
  6. http://www.gelatocms.com/
  7. gelato CMS is a free software licensed under the GPL 2.0
  8. Copyright (C) 2007 by Pedro Santana <pecesama at gmail dot com>
  9. =========================== */
  10. $configFile = dirname(__FILE__).DIRECTORY_SEPARATOR."config.php";
  11. include('classes/functions.php');
  12. include('classes/install.class.php');
  13. $install = new Install();
  14. $install->data = $_POST;
  15. $install->check_form();
  16. ?>
  17. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  18. <html xmlns="http://www.w3.org/1999/xhtml">
  19. <head>
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  21. <meta name="generator" content="gelato cms <?php echo version();?>" />
  22. <title>gelato :: installation</title>
  23. <link rel="shortcut icon" href="images/favicon.ico" />
  24. <style type="text/css" media="screen">
  25. @import "admin/css/style.css";
  26. </style>
  27. </head>
  28. <body>
  29. <div id="cont">
  30. <div id="head">
  31. <h1><a href="index.php" title="gelato :: home">gelato cms</a></h1>
  32. </div>
  33. <div id="main">
  34. <?php
  35. if ($install->showForm) {
  36. ?>
  37. <div class="box">
  38. <ul class="menu manage">
  39. <h3>gelato :: installation</h3>
  40. <li class="selected"><a>Install</a></li>
  41. </ul>
  42. <div class="tabla">
  43. <form action="install.php" method="post" id="config_form" autocomplete="off" class="newpost">
  44. <fieldset>
  45. <legend class="install">Database Settings</legend>
  46. <ul>
  47. <li><label for="login">User:</label>
  48. <input type="text" name="db_login" id="db_login" value="" class="txt"/><?php echo $install->mostrarerror("1")?></li>
  49. <li><label for="password">Password:</label>
  50. <input type="password" name="db_password" id="db_password" value="" class="txt"/><?php echo $install->mostrarerror("2")?></li>
  51. <li><label for="password2">Re-type password:</label>
  52. <input type="password" name="db_password2" id="db_password2" value="" class="txt"/><?php echo $install->mostrarerror("3")?></li>
  53. <li><label for="email">Database Host:</label>
  54. <input type="text" name="db_host" id="db_host" value="localhost" class="txt"/><?php echo $install->mostrarerror("7")?></li>
  55. <li><label for="email">Database Name:</label>
  56. <input type="text" name="db_name" id="db_name" value="gelatocms" class="txt"/><?php echo $install->mostrarerror("8")?></li>
  57. </ul>
  58. </fieldset><br />
  59. <fieldset>
  60. <legend class="install">Admin user</legend>
  61. <ul>
  62. <li><label for="login">User:</label>
  63. <input type="text" name="login" id="login" value="" class="txt"/><?php echo $install->mostrarerror("1")?></li>
  64. <li><label for="password">Password:</label>
  65. <input type="password" name="password" id="password" value="" class="txt"/><?php echo $install->mostrarerror("2")?></li>
  66. <li><label for="password2">Re-type password:</label>
  67. <input type="password" name="password2" id="password2" value="" class="txt"/><?php echo $install->mostrarerror("3")?></li>
  68. <li><label for="email">E-mail:</label>
  69. <input type="text" name="email" id="email" value="" class="txt"/><?php echo $install->mostrarerror("4")?></li>
  70. </ul>
  71. </fieldset><br />
  72. <fieldset>
  73. <legend class="install">Tumblelog configuration</legend>
  74. <ul>
  75. <li><label for="title">Title:</label>
  76. <input type="text" name="title" id="title" value="" class="txt"/></li>
  77. <li><label for="description">Description:</label>
  78. <input type="text" name="description" id="description" value="" class="txt"/></li>
  79. <li><label for="url_installation">Installation URL</label>
  80. <input type="text" name="url_installation" id="url_installation" value="<?php print substr($_SERVER["SCRIPT_URI"], '0', '-12'); ?>" class="txt"/><?php echo $install->mostrarerror("5")?></li>
  81. <li><label for="posts_limit">Post limit:</label>
  82. <input type="text" name="posts_limit" id="posts_limit" value="10" class="txt"/></li>
  83. <li><label for="lang">Language:</label>
  84. <select id="lang" name="lang">
  85. <option value="en" selected="selected">english</option>
  86. </select>
  87. </li>
  88. <li><label for="template">Template:</label>
  89. <select id="template" name="template">
  90. <?php
  91. $themes = getThemes();
  92. foreach ($themes as $theme) {
  93. echo "<option value=\"".$theme."\" selected=\"true\">".$theme."</option>\n";
  94. }
  95. ?> </select>
  96. <li>
  97. <li><label for="time_offsets">Time Offset:</label>
  98. <select id="time_offsets" name="time_offsets">
  99. <option value="-12,Pacific/Kwajalein">(GMT -12:00) International Date Line West</option>
  100. <option value="-11,Pacific/Samoa">(GMT -11:00) Midway Island, Samoa</option>
  101. <option value="-10,Pacific/Honolulu">(GMT -10:00) Hawaii</option>
  102. <option value="-9,US/Alaska">(GMT -9:00) Alaska</option>
  103. <option value="-8,US/Pacific">(GMT -8:00) Pacific Time (US &amp; Canada); Tijuana</option>
  104. <option value="-7,US/Mountain">(GMT -7:00) Mountain Time (US &amp; Canada)</option>
  105. <option value="-7,US/Arizona">(GMT -7:00) Arizona</option>
  106. <option value="-7,Mexico/BajaNorte">(GMT -7:00) Chihuahua, La Paz, Mazatlan</option>
  107. <option value="-6,US/Central">(GMT -6:00) Central Time (US &amp; Canada)</option>
  108. <option value="-6,America/Costa_Rica">(GMT -6:00) Central America</option>
  109. <option value="-6,Mexico/General" selected="selected">(GMT -6:00) Guadalajara, Mexico City, Monterrey</option>
  110. <option value="-6,Canada/Saskatchewan">(GMT -6:00) Saskatchewan</option>
  111. <option value="-5,US/Eastern">(GMT -5:00) Eastern Time (US &amp; Canada)</option>
  112. <option value="-5,America/Bogota">(GMT -5:00) Bogota, Lima, Quito</option>
  113. <option value="-5,US/East-Indiana">(GMT -5:00) Indiana (East)</option>
  114. <option value="-4,Canada/Eastern">(GMT -4:00) Atlantic Time (Canada)</option>
  115. <option value="-4,America/Caracas">(GMT -4:00) Caracas, La Paz</option>
  116. <option value="-4,America/Santiago">(GMT -4:00) Santiago</option>
  117. <option value="-3.50,Canada/Newfoundland">(GMT -3:30) Newfoundland</option>
  118. <option value="-3,Canada/Atlantic">(GMT -3:00) Brasilia, Greenland</option>
  119. <option value="-3,America/Buenos_Aires">(GMT -3:00) Buenos Aires, Georgetown</option>
  120. <option value="-1,Atlantic/Cape_Verde">(GMT -1:00) Cape Verde Is.</option>
  121. <option value="-1,Atlantic/Azores">(GMT -1:00) Azores</option>
  122. <option value="0,Africa/Casablanca">(GMT) Casablanca, Monrovia</option>
  123. <option value="0,Europe/Dublin">(GMT) Greenwich Mean Time : Dublin, Edinburgh, London</option>
  124. <option value="1,Europe/Amsterdam">(GMT +1:00) Amsterdam, Berlin, Rome, Stockholm, Vienna</option>
  125. <option value="1,Europe/Prague">(GMT +1:00) Belgrade, Bratislava, Budapest, Prague</option>
  126. <option value="1,Europe/Paris">(GMT +1:00) Brussels, Copenhagen, Madrid, Paris</option>
  127. <option value="1,Europe/Warsaw">(GMT +1:00) Sarajevo, Skopje, Warsaw, Zagreb</option>
  128. <option value="1,Africa/Bangui">(GMT +1:00) West Central Africa</option>
  129. <option value="2,Europe/Istanbul">(GMT +2:00) Athens, Beirut, Bucharest, Cairo, Istanbul </option>
  130. <option value="2,Asia/Jerusalem">(GMT +2:00) Harare, Jerusalem, Pretoria</option>
  131. <option value="2,Europe/Kiev">(GMT +2:00) Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius</option>
  132. <option value="3,Asia/Riyadh">(GMT +3:00) Kuwait, Nairobi, Riyadh</option>
  133. <option value="3,Europe/Moscow">(GMT +3:00) Baghdad, Moscow, St. Petersburg, Volgograd</option>
  134. <option value="3.50,Asia/Tehran">(GMT +3:30) Tehran</option>
  135. <option value="4,Asia/Muscat">(GMT +4:00) Abu Dhabi, Muscat</option>
  136. <option value="4,Asia/Baku">(GMT +4:00) Baku, Tbilsi, Yerevan</option>
  137. <option value="4.50,Asia/Kabul">(GMT +4:30) Kabul</option>
  138. <option value="5,Asia/Yekaterinburg">(GMT +5:00) Yekaterinburg</option>
  139. <option value="5,Asia/Karachi">(GMT +5:00) Islamabad, Karachi, Tashkent</option>
  140. <option value="5.50,Asia/Calcutta">(GMT +5:30) Chennai, Calcutta, Mumbai, New Delhi</option>
  141. <option value="5.75,Asia/Katmandu">(GMT +5:45) Katmandu</option>
  142. <option value="6,Asia/Almaty">(GMT +6:00) Almaty, Novosibirsk</option>
  143. <option value="6,Asia/Dhaka">(GMT +6:00) Astana, Dhaka, Sri Jayawardenepura</option>
  144. <option value="6.50,Asia/Rangoon">(GMT +6:30) Rangoon</option>
  145. <option value="7,Asia/Bangkok">(GMT +7:00) Bangkok, Hanoi, Jakarta</option>
  146. <option value="7,Asia/Krasnoyarsk">(GMT +7:00) Krasnoyarsk</option>
  147. <option value="8,Asia/Hong_Kong">(GMT +8:00) Beijing, Chongqing, Hong Kong, Urumqi</option>
  148. <option value="8,Asia/Irkutsk">(GMT +8:00) Irkutsk, Ulaan Bataar</option>
  149. <option value="8,Asia/Singapore">(GMT +8:00) Kuala Lumpar, Perth, Singapore, Taipei</option>
  150. <option value="9,Asia/Tokyo">(GMT +9:00) Osaka, Sapporo, Tokyo</option>
  151. <option value="9,Asia/Seoul">(GMT +9:00) Seoul</option>
  152. <option value="9,Asia/Yakutsk">(GMT +9:00) Yakutsk</option>
  153. <option value="9.50,Australia/Adelaide">(GMT +9:30) Adelaide</option>
  154. <option value="9.50Australia/Darwin">(GMT +9:30) Darwin</option>
  155. <option value="10,Australia/Brisbane">(GMT +10:00) Brisbane, Guam, Port Moresby</option>
  156. <option value="10,Australia/Canberra">(GMT +10:00) Canberra, Hobart, Melbourne, Sydney, Vladivostok</option>
  157. <option value="11,Asia/Magadan">(GMT +11:00) Magadan, Soloman Is., New Caledonia</option>
  158. <option value="12,Pacific/Auckland">(GMT +12:00) Auckland, Wellington</option>
  159. <option value="12,Pacific/Fiji">(GMT +12:00) Fiji, Kamchatka, Marshall Is.</option>
  160. </select>
  161. </li>
  162. </ul>
  163. </fieldset>
  164. <p>
  165. <input type="hidden" name="website" id="website" value="" />
  166. <input type="hidden" name="about" id="about" value="" />
  167. <input type="hidden" name="action" id="action" value="config" />
  168. <input type="submit" name="btnsubmit" id="btnsubmit" value="<< Install >>" class="submit"/>
  169. </p>
  170. </form>
  171. </div>
  172. <div class="footer-box">&nbsp;</div>
  173. </div>
  174. <?php
  175. } else {
  176. echo "<p><em>Finished!</em></p>";
  177. echo "<p>Now you can <a href=\"login.php\" class=\"inslnl\">log in</a> with your <strong>username</strong> and <strong>password</strong></p>";
  178. }
  179. ?>
  180. </div>
  181. <div id="foot">
  182. <a href="http://www.gelatocms.com/" title="gelato CMS">gelato CMS</a> :: PHP/MySQL Tumblelog Content Management System.
  183. </div>
  184. </div>
  185. </body>
  186. </html>