Skip to content

Commit aac1d83

Browse files
committed
Mise à part des paramètres de db
1 parent 043dc06 commit aac1d83

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
scores/
22
temp/
33
sources/
4-
include/db.php
4+
include/credentials.php
55
*~
66
license.txt
77
readme.html

include/credentials.php.sample

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
define("HOST", "localhost"); // The host you want to connect to.
3+
define("USER", "user"); // The database username.
4+
define("PASSWORD", "password"); // The database password.
5+
define("DATABASE", "database"); // The database name.
6+
?>
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@ function chant_from_id($c) {
66
$req1 = $mysqli->query($sql1) or die('Erreur SQL !<br />'.$sql1.'<br />'.$mysqli->error);
77
$chants = array();
88
$ch = $req1->fetch_assoc();
9-
return array($ch['office-part'], $ch['incipit'] > ''?$ch['incipit']:'░░░░', $ch['gabc'] > '', $ch['version']);
9+
return array($ch['office-part'], $ch['incipit'], $ch['gabc'] > '', $ch['version']);
1010
}
1111

12-
define("HOST", ""); // The host you want to connect to.
13-
define("USER", ""); // The database username.
14-
define("PASSWORD", ""); // The database password.
15-
define("DATABASE", ""); // The database name.
16-
12+
include('credentials.php');
13+
1714
$mysqli = new mysqli(HOST, USER, PASSWORD, DATABASE);
1815

1916
$mysqli->query('SET NAMES utf8');

0 commit comments

Comments
 (0)