forked from pecesama/GelatoCMS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.php
51 lines (40 loc) · 1.87 KB
/
install.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
if(!defined('entry') || !entry) define('entry',true);
/* ===========================
gelato CMS - A PHP based tumblelog CMS
development version
http://www.gelatocms.com/
gelato CMS is a free software licensed under the GPL 2.0
Copyright (C) 2007 by Pedro Santana <pecesama at gmail dot com>
=========================== */
// Received a valid request, better start setting globals we'll need throughout the app in entry.php
require_once('entry.php');
$configFile = Absolute_Path."config.php";
if(file_exists($configFile)){
require_once($configFile);
}else{
exit('You need to rename config-sample.php to config.php and fill out the required details.');
}
global $user, $conf, $tumble;
$install = new Install();
if($install->is_gelato_installed()){
header("location: index.php");
exit;
}
$install->data = $_POST;
$install->check_form();
$theme = new themes;
$theme->set('version',util::version());
$theme->set('showForm',$install->showForm);
$theme->set('db_login',isset($install->data['db_login'])? $install->data['db_login'] : '');
$theme->set('login',isset($install->data['login'])?$install->data['login']:'');
$theme->set('email',isset($install->data['email'])?$install->data['email']:'');
$theme->set('title',isset($install->data['title'])?$install->data['title']:'');
$theme->set('description',isset($install->data['description'])?$install->data['description']:'');
$theme->set('url_installation',(isset($install->data['url_installation']) and $install->data['url_installation'])?$install->data['url_installation']:(isset($_SERVER['SCRIPT_URI'])?substr($_SERVER["SCRIPT_URI"], 0, -12):''));
$theme->set('themes',util::getThemes());
$theme->set('langs',util::getLangs());
for($c=1;$c<=10;$c++)$errores[$c] = $install->mostrarerror($c);
$theme->set('error',$errores);
$theme->display(Absolute_Path.'admin/themes/admin/install.htm');
?>