die('Sorry, I need a tr-config-sample.php file to work from. Please re-upload this file from your Graceric installation.');
$configFile = file('tr-config-sample.php');
if (!is_writable('./')) die("Sorry, I can't write to the directory. You'll have to either change the permissions on your Graceric directory or create your tr-config.php manually.");
font-family: Georgia, "Times New Roman", Times, serif;
margin-left: 20%;
margin-right: 20%;
padding: .2em 2em;
}
h1 {
color: #006;
font-size: 18px;
font-weight: lighter;
}
h2 {
font-size: 16px;
}
p, li, dt {
line-height: 140%;
padding-bottom: 2px;
}
ul, ol {
padding: 5px 5px 5px 20px;
}
#logo {
margin-bottom: 2em;
}
.step a, .step input {
font-size: 2em;
}
td input {
font-size: 1.5em;
}
.step, th {
text-align: right;
}
#footer {
text-align: center;
border-top: 1px solid #ccc;
padding-top: 1em;
font-style: italic;
}
-->
</style>
</head>
<body>
<h1 id="logo">Hologon Install</h1>
<?php
// Check if tr-config.php has been created
if (file_exists('tr-config.php'))
die("<p>The file 'tr-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install/install.php'>installing now</a>.</p></body></html>");
switch($step) {
case 0:
?>
<p>Welcome to Hologon. Before getting started, we need some information on the database. You will need to know the following items before proceeding.</p>
<ol>
<li>Database name</li>
<li>Database username</li>
<li>Database password</li>
<li>Database host</li>
<li>Table prefix (if you want to run more than one Graceric in a single database) </li>
</ol>
<p><strong>If for any reason this automatic file creation doesn't work, don't worry. All this does is fill in the database information to a configuration file. You may also simply open <code>tr-config-sample.php</code> in a text editor, fill in your information, and save it as <code>tr-config.php</code>. </strong></p>
<p>In all likelihood, these items were supplied to you by your ISP. If you do not have this information, then you will need to contact them before you can continue. If you’re all ready, <a href="setup-config.php?step=1">let’s go</a>! </p>
<td>This version is for utf8 database charset only. You can also download gb2312 charset version <a href="http://www.ericfish.com/hologon">here</a></td>
<p>All right sparky! You've made it through this part of the installation. Graceric can now communicate with your database. If you are ready, time now to <a href="install/install.php?prefix=<?=$prefix?>&charset=<?=$charset?>">run the install!</a></p>
<?php
break;
}
?>
<p id="footer"><a href="http://www.ericfish.com/hologon">Hologon</a>, will be the best digg mode open source site in the future.</p>