More work on web setup form

This commit is contained in:
Duncan Sommerville 2014-11-28 16:48:08 -05:00
parent 63e51f7c7c
commit 6838694a8b
2 changed files with 32 additions and 160 deletions

View File

@ -1,30 +1,49 @@
<?php
foreach($_POST as $e) {
echo $e;
}
?>
<html style="background-color:#111141;">
<head>
<link rel="stylesheet" type="text/css" href="css/bootstrap-3.3.1.min.css">
<script type="text/javascript" src="js/libs/jquery-1.8.3.min.js"></script>
</head>
<body style="background-color:#111141;color:white;padding: 2em 0; min-width: 400px; width: 30%; text-align: center; margin: 3em auto;">
<body style="background-color: #111141; color: white; padding: 2em 0; min-width: 400px; width: 30%; text-align: center; margin: 3em auto;">
<img src="css/images/airtime_logo_jp.png" style="margin-bottom: .5em;" /><br/>
<form role="form" style="margin-top: 2em;">
<h2>Database Settings</h2>
<div class="form-group col-xs-6">
<form action="#" role="form" style="width: 50%; margin: auto;" id="dbSettingsForm">
<h3 style="margin: 1em 0;">Database Settings</h3>
<div class="form-group">
<label class="sr-only" for="dbUser">Database Username</label>
<input class="form-control" type="text" id="dbUser" placeholder="Username"/>
<input required class="form-control" type="text" id="dbUser" placeholder="Username"/>
</div>
<div class="form-group col-xs-6">
<div class="form-group">
<label class="sr-only" for="dbPass">Database Password</label>
<input class="form-control" type="password" id="dbPass" placeholder="Password"/>
<input required class="form-control" type="password" id="dbPass" placeholder="Password"/>
</div>
<div class="form-group col-xs-6">
<div class="form-group">
<label class="sr-only" for="dbName">Database Name</label>
<input class="form-control" type="text" id="dbName" placeholder="Name"/>
<input required class="form-control" type="text" id="dbName" placeholder="Name"/>
</div>
<div class="form-group col-xs-6">
<div class="form-group">
<label class="sr-only" for="dbHost">Database Host</label>
<input class="form-control" type="text" id="dbHost" placeholder="Host" value="localhost"/>
<input required class="form-control" type="text" id="dbHost" placeholder="Host" value="localhost"/>
</div>
<input type="submit" class="btn btn-default"/>
</form>
<div class="form-group">
<input type="submit" class="btn btn-default"/>
</div>
</form>
<script>
$("#dbSettingsForm").submit(function(e) {
e.preventDefault();
$.post('#', $('form').serialize(), function(data) {
console.log(data);
});
});
</script>
</body>
</html>

View File

@ -1,147 +0,0 @@
# ----------------------------------------------------------------------
# A I R T I M E C O N F I G U R A T I O N
# ----------------------------------------------------------------------
#
# This is an example configuration for Airtime. If you just want to
# get started with a basic Airtime setup, or don't know if you should
# be reconfiguring any of the following values, just rename this file
# to 'airtime.conf'.
#
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# D A T A B A S E
# ----------------------------------------------------------------------
#
# These settings are used to configure your database connection.
#
# host: The hostname of the database server.
# On a default Airtime installation, set this to localhost.
#
# dbname: The name of the Airtime database.
# The default is airtime.
#
# dbuser: The username for the Airtime database user.
# The default is airtime.
#
# dbpass: The password for the Airtime database user.
# The default is airtime.
#
[database]
host = localhost
dbname = airtime
dbuser = airtime
dbpass = airtime
#
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# R A B B I T M Q
# ----------------------------------------------------------------------
#
# These settings are used to configure the RabbitMQ messaging
# configuration for your Airtime installation.
#
# host: The IP address for the RabbitMQ service.
# The default is 127.0.0.1.
#
# port: The port for the RabbitMQ service.
# The default is 5672.
#
# user: The username for the RabbitMQ user.
# The default is guest.
#
# password: The password for the RabbitMQ user.
# The default is guest.
#
# vhost: The virtual host for the RabbitMQ service database.
# The default is /.
#
[rabbitmq]
host = 127.0.0.1
port = 5672
user = guest
password = guest
vhost = /
#
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# G E N E R A L S E T T I N G S
# ----------------------------------------------------------------------
#
# These settings are used for Airtime's webserver configuration, and
# for general-purpose properties.
#
# api_key: The API key for your Airtime installation.
# The value is generated the first time you use Airtime.
#
# web_server_user: The default webserver user.
# The default is www-data.
#
# base_url: The host name for your webserver.
# The default is localhost.
#
# base_port: The port for your webserver.
# The default is 80.
#
# base_dir: The root directory for your Airtime installation
# on your webserver, relative to the base_url.
# The default is /.
#
# cache_ahead_hours: How many hours ahead of time the Airtime playout
# engine (PYPO) should cache scheduled media files.
# The default is 1.
#
[general]
api_key =
web_server_user = www-data
base_url = localhost
base_port = 80
base_dir = /
cache_ahead_hours = 1
#
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# M O N I T
# ----------------------------------------------------------------------
#
# monit_user: The username for the Monit user.
# The default is guest.
#
# monit_password: The password for the Monit user.
# The default is airtime.
#
[monit]
monit_user = guest
monit_password = airtime
#
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# S O U N D C L O U D
# ----------------------------------------------------------------------
#
# connection_retries: The number of times to retry the connection to
# Soundcloud.
# The default is 3.
#
# time_between_retries: The time between connection retries, in seconds.
# The default is 60.
#
[soundcloud]
connection_retries = 3
time_between_retries = 60
#
# ----------------------------------------------------------------------