Added laconica logo

Updated installation page markup
This commit is contained in:
Sarven Capadisli 2009-05-01 03:50:24 +00:00
parent d30df07908
commit fb8340fb54
2 changed files with 93 additions and 68 deletions

View File

@ -52,23 +52,21 @@ function checkPrereqs()
foreach ($reqs as $req) { foreach ($reqs as $req) {
if (!checkExtension($req)) { if (!checkExtension($req)) {
?><p class="error">Cannot load required extension &quot;<?php echo $req; ?>&quot;.</p><?php ?><p class="error">Cannot load required extension: <code><?php echo $req; ?></code></p><?php
return false; return false;
} }
} }
if (!is_writable(INSTALLDIR)) { if (!is_writable(INSTALLDIR)) {
?><p class="error">Cannot write config file to &quot;<?php echo INSTALLDIR; ?>&quot;.</p> ?><p class="error">Cannot write config file to: <code><?php echo INSTALLDIR; ?></code></p>
<p>On your server, try this command:</p> <p>On your server, try this command: <code>chmod a+w <?php echo INSTALLDIR; ?></code>
<blockquote>chmod a+w <?php echo INSTALLDIR; ?></blockquote>
<?php <?php
return false; return false;
} }
if (!is_writable(INSTALLDIR.'/avatar/')) { if (!is_writable(INSTALLDIR.'/avatar/')) {
?><p class="error">Cannot write avatar directory &quot;<?php echo INSTALLDIR; ?>/avatar/&quot;.</p> ?><p class="error">Cannot write avatar directory: <code><?php echo INSTALLDIR; ?>/avatar/</code></p>
<p>On your server, try this command:</p> <p>On your server, try this command: <code>chmod a+w <?php echo INSTALLDIR; ?>/avatar/</code></p>
<blockquote>chmod a+w <?php echo INSTALLDIR; ?>/avatar/</blockquote>
<? <?
return false; return false;
} }
@ -89,65 +87,78 @@ function checkExtension($name)
function showForm() function showForm()
{ {
?> ?>
<p>Enter your database connection information below to initialize the database.</p> </ul>
<form method='post' action='install.php'> </dd>
<fieldset> </dl>
<ul class='form_data'> <dl id="page_notice" class="system_notice">
<li> <dt>Page notice</dt>
<label for='sitename'>Site name</label> <dd>
<input type='text' id='sitename' name='sitename' /> <div class="instructions">
<p>The name of your site</p> <p>Enter your database connection information below to initialize the database.</p>
</li> </div>
<li> </dd>
<li> </dl>
<label for='host'>Hostname</label> <form method="post" action="install.php" class="form_settings" id="form_install">
<input type='text' id='host' name='host' /> <fieldset>
<p>Database hostname</p> <legend>Connection settings</legend>
</li> <ul class="form_data">
<li> <li>
<label for='host'>Database</label> <label for="sitename">Site name</label>
<input type='text' id='database' name='database' /> <input type="text" id="sitename" name="sitename" />
<p>Database name</p> <p class="form_guide">The name of your site</p>
</li> </li>
<li> <li>
<label for='username'>Username</label> <li>
<input type='text' id='username' name='username' /> <label for="host">Hostname</label>
<p>Database username</p> <input type="text" id="host" name="host" />
</li> <p class="form_guide">Database hostname</p>
<li> </li>
<label for='password'>Password</label> <li>
<input type='password' id='password' name='password' /> <label for="host">Database</label>
<p>Database password</p> <input type="text" id="database" name="database" />
</li> <p class="form_guide">Database name</p>
</ul> </li>
<input type='submit' name='submit' value='Submit'> <li>
</fieldset> <label for="username">Username</label>
<input type="text" id="username" name="username" />
<p class="form_guide">Database username</p>
</li>
<li>
<label for="password">Password</label>
<input type="password" id="password" name="password" />
<p class="form_guide">Database password</p>
</li>
</ul>
<input type="submit" name="submit" class="submit" value="Submit" />
</fieldset>
</form> </form>
<? <?php
} }
function updateStatus($status, $error=false) function updateStatus($status, $error=false)
{ {
?> ?>
<li> <li <?php echo ($error) ? 'class="error"': ''; ?>><?print $status;?></li>
<?
print $status; <?php
?>
</li>
<?
} }
function handlePost() function handlePost()
{ {
?> ?>
<ul>
<? <?php
$host = $_POST['host']; $host = $_POST['host'];
$database = $_POST['database']; $database = $_POST['database'];
$username = $_POST['username']; $username = $_POST['username'];
$password = $_POST['password']; $password = $_POST['password'];
$sitename = $_POST['sitename']; $sitename = $_POST['sitename'];
?>
<dl class="system_notice">
<dt>Page notice</dt>
<dd>
<ul>
<?php
if (empty($host)) { if (empty($host)) {
updateStatus("No hostname specified.", true); updateStatus("No hostname specified.", true);
showForm(); showForm();
@ -222,8 +233,8 @@ function handlePost()
} }
updateStatus("Done!"); updateStatus("Done!");
?> ?>
</ul>
<? <?php
} }
function writeConf($sitename, $sqlUrl) function writeConf($sitename, $sqlUrl)
@ -253,21 +264,35 @@ function runDbScript($filename, $conn)
} }
?> ?>
<html> <?php echo"<?"; ?> xml version="1.0" encoding="UTF-8" <?php echo "?>"; ?>
<head> <!DOCTYPE html
<title>Install Laconica</title> PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<link rel="stylesheet" type="text/css" href="theme/base/css/display.css?version=0.7.1" media="screen, projection, tv"/> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<link rel="stylesheet" type="text/css" href="theme/base/css/modal.css?version=0.7.1" media="screen, projection, tv"/> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<link rel="stylesheet" type="text/css" href="theme/default/css/display.css?version=0.7.1" media="screen, projection, tv"/> <head>
</head> <title>Install Laconica</title>
<body> <link rel="stylesheet" type="text/css" href="theme/base/css/display.css?version=0.8" media="screen, projection, tv"/>
<div id="wrap"> <link rel="stylesheet" type="text/css" href="theme/default/css/display.css?version=0.8" media="screen, projection, tv"/>
<div id="core"> <!--[if IE]><link rel="stylesheet" type="text/css" href="theme/base/css/ie.css?version=0.8" /><![endif]-->
<div id="content"> <!--[if lte IE 6]><link rel="stylesheet" type="text/css" theme/base/css/ie6.css?version=0.8" /><![endif]-->
<h1>Install Laconica</h1> <!--[if IE]><link rel="stylesheet" type="text/css" href="theme/earthy/css/ie.css?version=0.8" /><![endif]-->
</head>
<body id="install">
<div id="wrap">
<div id="header">
<address id="site_contact" class="vcard">
<a class="url home bookmark" href=".">
<img class="logo photo" src="theme/default/logo.png" alt="Laconica"/>
<span class="fn org">Laconica</span>
</a>
</address>
</div>
<div id="core">
<div id="content">
<h1>Install Laconica</h1>
<?php main(); ?> <?php main(); ?>
</div> </div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>

BIN
theme/default/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB