1<?php if ( !defined( 'HABARI_PATH' ) ) { die('No direct access'); } ?> 2<?php include( 'header.php' ); ?> 3<?php if ( !isset( $form_errors ) ) $form_errors = array(); ?> 4<?php function elem_if_set($a, $k) { if (isset($a[$k])) { return $a[$k]; } } ?> 5 6<form action="" method="post" id="installform"> 7<input type="hidden" name="locale" value="<?php echo Utils::htmlspecialchars($locale); ?>" /> 8 9<div class="installstep ready" id="databasesetup"> 10 <h2><?php _e('Database Setup'); ?></h2> 11 <a href="#" class="help-me"><?php _e('Help'); ?></a> 12 <div class="options"> 13 14 <div class="inputfield"> 15 <label for="db_type"><?php _e('Database Type'); ?> <strong>*</strong></label> 16 <select id="db_type" name="db_type" tabindex="<?php echo $tab++; ?>"> 17 <?php 18 foreach($pdo_drivers as $value => $text){ 19 echo '<option value="'.$value.'"'; 20 if ($db_type == (string)$value) { 21 echo ' selected="selected"'; 22 } 23 echo '>' . $text . "</option>\n"; 24 } 25 foreach($pdo_missing_drivers as $value => $text){ 26 echo '<optgroup label="' . _t('%1$s - missing PDO driver, see help', array($text)) . '"></optgroup>'; 27 } 28 ?> 29 </select> 30 <div class="help"> 31 <?php _e('<strong>Database Type</strong> specifies the type of database to which Habari will connect. Changing this setting may affect the other fields that are available here. If the database engine that you wanted to use is not in this list, you may need to install a PDO driver to enable it.'); ?> 32 <a href="#"><?php _e('Learn More…'); ?></a> 33 </div> 34 </div> 35 36 <h3 class="javascript-disabled"><?php _e('MySQL Settings'); ?></h3> 37 <div class="javascript-disabled"><?php _e('Use the settings below only if you have selected MySQL as your database engine.'); ?></div> 38 39 <div class="inputfield formysql"> 40 <label for="mysqldatabasehost"><?php _e('Database Host'); ?> <strong>*</strong></label> 41 <input type="text" id="mysqldatabasehost" name="mysql_db_host" value="<?php echo $db_host; ?>" tabindex="<?php echo $tab++ ?>" /> 42 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 43 <div class="warning"><?php echo elem_if_set( $form_errors, 'mysql_db_host'); ?></div> 44 <div class="help"> 45 <?php _e('<strong>Database Host</strong> is the host (domain) name or server IP address of the server that runs the MySQL database to which Habari will connect. If MySQL is running on your web server, and most of the time it is, "localhost" is usually a good value for this field.'); ?> 46 <a href="#"><?php _e('Learn More…'); ?></a> 47 </div> 48 </div> 49 50 <div class="inputfield formysql"> 51 <label for="mysqldatabaseuser"><?php _e('Username'); ?> <strong>*</strong></label> 52 <input type="text" id="mysqldatabaseuser" name="mysql_db_user" value="<?php echo $db_user; ?>" tabindex="<?php echo $tab++ ?>" /> 53 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 54 <div class="warning"><?php echo elem_if_set( $form_errors, 'mysql_db_user'); ?></div> 55 <div class="help"> 56 <?php _e('<strong>Database User</strong> is the username used to connect Habari to the MySQL database.'); ?> 57 <a href="#"><?php _e('Learn More…'); ?></a> 58 </div> 59 </div> 60 61 <div class="inputfield formysql"> 62 <label for="mysqldatabasepass"><?php _e('Password'); ?> <strong>*</strong></label> 63 <input type="password" id="mysqldatabasepass" name="mysql_db_pass" value="<?php /* echo $db_pass; */ ?>" tabindex="<?php echo $tab++ ?>" /> 64 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 65 <div class="warning"><?php echo elem_if_set( $form_errors, 'mysql_db_pass'); ?></div> 66 <div class="help"> 67 <?php _e('<strong>Database Password</strong> is the password used to connect the specified user to the MySQL database.'); ?> 68 <a href="#"><?php _e('Learn More…'); ?></a> 69 </div> 70 </div> 71 72 <div class="inputfield formysql"> 73 <label for="mysqldatabasename"><?php _e('Database Name'); ?> <strong>*</strong></label> 74 <input type="text" id="mysqldatabasename" name="mysql_db_schema" value="<?php echo $db_schema; ?>" tabindex="<?php echo $tab++ ?>" /> 75 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 76 <div class="warning"><?php echo elem_if_set( $form_errors, 'mysql_db_schema'); ?></div> 77 <div class="help"> 78 <?php _e('<strong>Database Name</strong> is the name of the MySQL database to which Habari will connect.'); ?> 79 <a href="#"><?php _e('Learn More…'); ?></a> 80 </div> 81 </div> 82 83 <h3 class="javascript-disabled"><?php _e('PostgreSQL Settings'); ?></h3> 84 <div class="javascript-disabled"><?php _e('Use the settings below only if you have selected PostgreSQL as your database engine.'); ?></div> 85 86 <div class="inputfield forpgsql"> 87 <label for="pgsqldatabasehost"><?php _e('Database Host'); ?> <strong>*</strong></label> 88 <input type="text" id="pgsqldatabasehost" name="pgsql_db_host" value="<?php echo $db_host; ?>" tabindex="<?php echo $tab++ ?>" /> 89 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 90 <div class="warning"><?php echo elem_if_set( $form_errors, 'pgsql_db_host'); ?></div> 91 <div class="help"> 92 <?php _e('<strong>Database Host</strong> is the host (domain) name or server IP address of the server that runs the PostgreSQL database to which Habari will connect. If PostgreSQL is running on your web server, and most of the time it is, "localhost" is usually a good value for this field.'); ?> 93 <a href="#"><?php _e('Learn More…'); ?></a> 94 </div> 95 </div> 96 97 <div class="inputfield forpgsql"> 98 <label for="pgsqldatabaseuser"><?php _e('Username'); ?> <strong>*</strong></label> 99 <input type="text" id="pgsqldatabaseuser" name="pgsql_db_user" value="<?php echo $db_user; ?>" tabindex="<?php echo $tab++ ?>" /> 100 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 101 <div class="warning"><?php echo elem_if_set( $form_errors, 'pgsql_db_user'); ?></div> 102 <div class="help"> 103 <?php _e('<strong>Database User</strong> is the username used to connect Habari to the PostgreSQL database.'); ?> 104 <a href="#"><?php _e('Learn More…'); ?></a> 105 </div> 106 </div> 107 108 <div class="inputfield forpgsql"> 109 <label for="pgsqldatabasepass"><?php _e('Password'); ?> <strong>*</strong></label> 110 <input type="password" id="pgsqldatabasepass" name="pgsql_db_pass" value="<?php /* echo $db_pass; */ ?>" tabindex="<?php echo $tab++ ?>" /> 111 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 112 <div class="warning"><?php echo elem_if_set( $form_errors, 'pgsql_db_pass'); ?></div> 113 <div class="help"> 114 <?php _e('<strong>Database Password</strong> is the password used to connect the specified user to the PostgreSQL database.'); ?> 115 <a href="#"><?php _e('Learn More…'); ?></a> 116 </div> 117 </div> 118 119 <div class="inputfield forpgsql"> 120 <label for="pgsqldatabasename"><?php _e('Database Name'); ?> <strong>*</strong></label> 121 <input type="text" id="pgsqldatabasename" name="pgsql_db_schema" value="<?php echo $db_schema; ?>" tabindex="<?php echo $tab++ ?>" /> 122 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 123 <div class="warning"><?php echo elem_if_set( $form_errors, 'pgsql_db_schema'); ?></div> 124 <div class="help"> 125 <?php _e('<strong>Database Name</strong> is the name of the PostgreSQL database to which Habari will connect.'); ?> 126 <a href="#"><?php _e('Learn More…'); ?></a> 127 </div> 128 </div> 129 130 <h3 class="javascript-disabled"><?php _e('SQLite Settings'); ?> <strong>*</strong></h3> 131 <div class="javascript-disabled"><?php _e('Use the settings below only if you have selected SQLite as your database engine.'); ?></div> 132 133 <div class="inputfield forsqlite"> 134 <label for="databasefile"><?php _e('Data file'); ?> <strong>*</strong></label> 135 <input type="text" id="databasefile" name="db_file" value="<?php echo $db_file; ?>" tabindex="<?php echo $tab++ ?>" /> 136 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 137 <div class="warning"><?php echo elem_if_set( $form_errors, 'db_file'); ?></div> 138 <div class="help"> 139 <?php _e('<strong>Data file</strong> is the SQLite file that will store your Habari data. This should be the path to where your data file resides, relative to the Habari user directory.'); ?> <a href="#"><?php _e('Learn More…'); ?></a> 140 </div> 141 </div> 142 </div> 143 144 <div class="advanced-options"> 145 <div class="inputfield"> 146 <label for="tableprefix"><?php _e('Table Prefix'); ?></label> 147 <input type="text" id="tableprefix" name="table_prefix" value="<?php echo $table_prefix; ?>" tabindex="<?php echo $tab++ ?>" /> 148 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 149 <div class="warning"><?php echo elem_if_set( $form_errors, 'table_prefix'); ?></div> 150 <div class="help"> 151 <?php _e('<strong>Table Prefix</strong> is a prefix that will be appended to each table that Habari creates in the database, making it easy to distinguish those tables in the database from those of other installations.'); ?> 152 <a href="#"><?php _e('Learn More…'); ?></a> 153 </div> 154 </div> 155 <div class="inputfield"> 156 <button type="button" name="check_db_connection" id="check_db_connection" tabindex="<?php echo $tab++ ?>"><?php _e('Check Database Connection'); ?></button> 157 </div> 158 </div> 159 <div class="bottom"></div> 160</div> 161 162<div class="next-section"></div> 163 164<div class="installstep ready" id="siteconfiguration"> 165 <h2><?php _e('Site Configuration'); ?></h2> 166 <a href="#" class="help-me"><?php _e('Help'); ?></a> 167 <div class="options"> 168 169 <div class="inputfield"> 170 <label for="sitename"><?php _e('Site Name'); ?> <strong>*</strong></label> 171 <input type="text" id="sitename" name="blog_title" value="<?php echo $blog_title; ?>" tabindex="<?php echo $tab++ ?>" /> 172 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 173 <div class="warning"><?php echo elem_if_set( $form_errors, 'blog_title'); ?></div> 174 <div class="help"> 175 <?php _e('<strong>Site Name</strong> is the name of your site as it will appear 176 to your visitors.'); ?> <a href="#"><?php _e('Learn More…'); ?></a> 177 </div> 178 </div> 179 180 <div class="inputfield"> 181 <label for="adminuser"><?php _e('Username'); ?> <strong>*</strong></label> 182 <input type="text" id="adminuser" name="admin_username" value="<?php echo $admin_username; ?>" tabindex="<?php echo $tab++ ?>" /> 183 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 184 <div class="warning"><?php echo elem_if_set( $form_errors, 'admin_username'); ?></div> 185 <div class="help"> 186 <?php _e('<strong>Username</strong> is the username of the initial user in Habari.'); ?> <a href="#"><?php _e('Learn More…'); ?></a> 187 </div> 188 </div> 189 190 <div class="inputfield"> 191 <label for="adminpass1"><?php _e('Password'); ?> <strong>*</strong></label> 192 <input type="password" id="adminpass1" name="admin_pass1" value="<?php echo $admin_pass1; ?>" tabindex="<?php echo $tab++ ?>" /> 193 <label for="adminpass2"><?php _e('Password (again)'); ?> <strong>*</strong></label> 194 <input type="password" id="adminpass2" name="admin_pass2" value="<?php echo $admin_pass2; ?>" tabindex="<?php echo $tab++ ?>" /> 195 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 196 <div class="warning"><?php echo elem_if_set( $form_errors, 'admin_pass'); ?></div> 197 <div class="help"> 198 <?php _e('<strong>Password</strong> is the password of the initial user in Habari. Both password fields must match.'); ?> <a href="#"><?php _e('Learn More…'); ?></a> 199 </div> 200 </div> 201 202 <div class="inputfield"> 203 <label for="adminemail"><?php _e('Admin Email'); ?> <strong>*</strong></label> 204 <input type="text" id="adminemail" name="admin_email" value="<?php echo $admin_email; ?>" tabindex="<?php echo $tab++ ?>" /> 205 <img class="status" src="<?php Site::out_url( 'habari' ); ?>/system/installer/images/ready.png" alt="" /> 206 <div class="warning"><?php echo elem_if_set( $form_errors, 'admin_email'); ?></div> 207 <div class="help"> 208 <?php _e('<strong>Admin Email</strong> is the email address of the first user account.'); ?> 209 <a href="#"><?php _e('Learn More…'); ?></a> 210 </div> 211 </div> 212 213 </div> 214 <div class="bottom"></div> 215</div> 216 217<div class="next-section"></div> 218 219<div class="installstep ready" id="pluginactivation"> 220 <h2><?php _e('Plugin Activation'); ?></h2> 221 <a href="#" class="help-me"><?php _e('Help'); ?></a> 222 <div class="options items"> 223 <?php foreach($plugins as $plugin) { ?> 224 <?php if ( !isset($plugin['info']) ) { ?> 225 226 <div class="item clear"> 227 <div class="head"> 228 <p><?php printf( _t('The plugin file %s is a legacy plugin, and does not include an XML info file.'), $plugin['file'] ); ?></p> 229 </div> 230 </div> 231 232 <?php } else { ?> 233 <div class="item clear"> 234 <div class="head"> 235 <span class="checkbox"><input type="checkbox" name="plugin_<?php echo $plugin['plugin_id']; ?>" 236 id="plugin_<?php echo $plugin['plugin_id']; ?>"<?php if ($plugin['recommended']) echo ' checked="checked"'; ?> tabindex="<?php echo $tab++ ?>" /></span><label for="plugin_<?php echo $plugin['plugin_id']; ?>" class="name"><?php echo $plugin['info']->name; ?> <span class="version"><?php echo $plugin['info']->version; ?></span></label> 237 </div> 238 <div class="help"><?php echo $plugin['info']->description; ?></div> 239 </div> 240 <?php } ?> 241 <?php } ?> 242 <div class="controls item"> 243 <span class="checkbox"><input type="checkbox" name="checkbox_controller" id="checkbox_controller" tabindex="<?php echo $tab++ ?>" /></span> 244 <label for="checkbox_controller">None Selected</label> 245 </div> 246 </div> 247 <div class="bottom"></div> 248</div> 249 250<div class="next-section"></div> 251 252<div class="installstep ready" id="install"> 253 <h2><?php _e('Install'); ?></h2> 254 <div class="options"> 255 <div class="inputfield submit"> 256 <p><?php _e('Habari now has all of the information needed to install itself on your server.'); ?></p> 257 <input type="submit" name="submit" value="<?php _e('Install Habari'); ?>" id="submitinstall" tabindex="<?php echo $tab++ ?>" /> 258 </div> 259 </div> 260 <div class="bottom"></div> 261</div> 262 263</form> 264 265<script type="text/javascript" src="<?php Site::out_url('habari'); ?>/system/installer/script.js"></script> 266 267<?php include( 'footer.php' ); ?> 268