|
@@ -25,6 +25,7 @@ if (!file_exists($configFile)) {
|
25
|
25
|
$showForm = true;
|
26
|
26
|
}
|
27
|
27
|
|
|
28
|
+
|
28
|
29
|
include("classes/functions.php");
|
29
|
30
|
|
30
|
31
|
$errors_d=array();
|
|
@@ -42,7 +43,7 @@ if (isset($_POST['action'])){
|
42
|
43
|
$action=$_POST['action'];
|
43
|
44
|
}
|
44
|
45
|
|
45
|
|
-if ($action=="config") {
|
|
46
|
+if ($action=="config" && !is_db_installed()) {
|
46
|
47
|
|
47
|
48
|
$sep_err="";
|
48
|
49
|
|
|
@@ -83,6 +84,9 @@ if ($action=="config") {
|
83
|
84
|
$showForm=true;
|
84
|
85
|
}
|
85
|
86
|
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+ $showForm = (!is_db_installed());
|
86
|
90
|
|
87
|
91
|
?>
|
88
|
92
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
@@ -347,6 +351,7 @@ function install_db($login, $password, $email, $title, $description, $url_instal
|
347
|
351
|
|
348
|
352
|
$db->ejecutarConsulta($sqlStr);
|
349
|
353
|
|
|
354
|
+ $db->cierraConexion();
|
350
|
355
|
return true;
|
351
|
356
|
}
|
352
|
357
|
|
|
@@ -365,4 +370,15 @@ function mostrarerror($errors,$errors_d,$n) {
|
365
|
370
|
return "";
|
366
|
371
|
}
|
367
|
372
|
}
|
|
373
|
+
|
|
374
|
+function is_db_installed(){
|
|
375
|
+
|
|
376
|
+ $db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
|
|
377
|
+
|
|
378
|
+ $sqlStr = "SELECT * FROM `".Table_prefix."config`";
|
|
379
|
+
|
|
380
|
+ $db->ejecutarConsulta($sqlStr);
|
|
381
|
+
|
|
382
|
+ return ($db->contarRegistros() > 0);
|
|
383
|
+}
|
368
|
384
|
?>
|