[add] option in config for define title page
This commit is contained in:
parent
a0a20ab6fc
commit
d20c4eee82
|
@ -1,5 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
mysqldb="fail2bancount"
|
||||
mysqlpw=""
|
||||
mysqluser="fail2bancount"
|
||||
title="MyFail2BanInfo"
|
16
index.php
16
index.php
|
@ -1,18 +1,18 @@
|
|||
<?php
|
||||
$config = parse_ini_file('bin/bancount.cfg');
|
||||
|
||||
echo "<!DOCTYPE html>\n";
|
||||
echo "<html lang='en'>\n";
|
||||
echo "<head>\n";
|
||||
echo "\t<title>Fail2BanCount</title>\n";
|
||||
echo "\t<title>",$config['title'],"</title>\n";
|
||||
echo "\t<meta http-equiv='content-type' content='text/html; charset=utf-8' />\n";
|
||||
echo "\t<meta name='description' content='Fail2BanCount' />\n";
|
||||
echo "\t<meta name='description' content=",$config['title']," />\n";
|
||||
echo "\t<!-- CSS/STYLESHEET -->\n";
|
||||
echo "\t<link rel='stylesheet' href='/bancount.css' type='text/css' />\n";
|
||||
echo "</head>\n";
|
||||
echo "<body>\n";
|
||||
echo "<div id='header'>\n";
|
||||
|
||||
$bddCfg = parse_ini_file('bin/bancount.cfg');
|
||||
|
||||
|
||||
// Fail2BanCount - Displays information from the database
|
||||
// I won't claim this is all my original code, as it has
|
||||
|
@ -22,9 +22,9 @@ $bddCfg = parse_ini_file('bin/bancount.cfg');
|
|||
// Database connection info
|
||||
|
||||
$db_host = '127.0.0.1';
|
||||
$db_user = $bddCfg['mysqluser'];
|
||||
$db_pwd = $bddCfg['mysqlpw'];
|
||||
$database = $bddCfg['mysqldb'];
|
||||
$db_user = $config['mysqluser'];
|
||||
$db_pwd = $config['mysqlpw'];
|
||||
$database = $config['mysqldb'];
|
||||
|
||||
// Page variable
|
||||
|
||||
|
@ -130,7 +130,7 @@ $currentlybanned = $numbans - $numunbans;
|
|||
|
||||
// Print some HTML
|
||||
|
||||
echo "\t<h1>Fail2BanCount</h1>\n";
|
||||
echo "\t<h1>",$config['title'],"</h1>\n";
|
||||
echo "</div>\n";
|
||||
echo "<div id='container'>\n";
|
||||
|
||||
|
|
Loading…
Reference in New Issue