75a7e95a932bad3daed7913a8bdd346b78c92d4e
[lhc/web/wiklou.git] / includes / templates / NoLocalSettings.php
1 <?php
2 /**
3 * @file
4 * @ingroup Templates
5 */
6
7 # Prevent XSS
8 if ( isset( $wgVersion ) ) {
9 $wgVersion = htmlspecialchars( $wgVersion );
10 } else {
11 $wgVersion = 'VERSION';
12 }
13 # Set the path in case we hit a page such as /index.php/Main_Page
14 # Could use <base href> but then we have to worry about http[s]/port #/etc.
15 $ext = strpos( $_SERVER['SCRIPT_NAME'], 'index.php5' ) === false ? 'php' : 'php5';
16 $path = '';
17 if( isset( $_SERVER['SCRIPT_NAME'] )) {
18 $path = htmlspecialchars( preg_replace('/index.php5?/', '', $_SERVER['SCRIPT_NAME']) );
19 }
20 ?>
21 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
22 <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
23 <head>
24 <title>MediaWiki <?php echo $wgVersion ?></title>
25 <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
26 <style type='text/css' media='screen, projection'>
27 html, body {
28 color: #000;
29 background-color: #fff;
30 font-family: sans-serif;
31 text-align: center;
32 }
33
34 h1 {
35 font-size: 150%;
36 }
37 </style>
38 </head>
39 <body>
40 <img src="<?php echo $path ?>skins/common/images/mediawiki.png" alt='The MediaWiki logo' />
41
42 <h1>MediaWiki <?php echo $wgVersion ?></h1>
43 <div class='error'>
44 <?php
45 if ( file_exists( 'config/LocalSettings.php' ) ) {
46 echo( 'To complete the installation, move <tt>config/LocalSettings.php</tt> to the parent directory.' );
47 } else {
48 echo( "Please <a href=\"${path}config/index.{$ext}\" title='setup'> set up the wiki</a> first." );
49 }
50 ?>
51
52 </div>
53 </body>
54 </html>